summaryrefslogtreecommitdiff
path: root/windowPatchset.go
diff options
context:
space:
mode:
Diffstat (limited to 'windowPatchset.go')
-rw-r--r--windowPatchset.go24
1 files changed, 24 insertions, 0 deletions
diff --git a/windowPatchset.go b/windowPatchset.go
index 2ac5138..6f9c6a1 100644
--- a/windowPatchset.go
+++ b/windowPatchset.go
@@ -87,6 +87,30 @@ func makePatchWindow(pset *forgepb.Patchset) *patchWindow {
grid.NewLabel(pset.StartBranchHash)
grid.NewLabel("end branch: " + pset.EndBranchName)
grid.NewLabel(pset.EndBranchHash)
+ grid.NewButton("Apply All", func() {
+ var count int
+ all := pset.Patches.SortByFilename()
+ for all.Scan() {
+ p := all.Next()
+ rn := p.RepoNamespace
+ repo := me.forge.FindByGoPath(rn)
+ if repo == nil {
+ log.Info("Could not figure out repo path", rn)
+ return
+ }
+ filename, err := savePatch(p)
+ if err != nil {
+ log.Info("savePatch() failed", err)
+ return
+ }
+ count += 1
+ if err := applyPatch(repo, filename); err != nil {
+ log.Info("warn user of git am error", err)
+ return
+ }
+ }
+ log.Info("ALL PATCHES WORKED! count =", count)
+ })
grid.NextRow()
g := pw.stack.NewGroup("PatchSet List")