diff options
Diffstat (limited to 'windowPatches.go')
| -rw-r--r-- | windowPatches.go | 24 |
1 files changed, 23 insertions, 1 deletions
diff --git a/windowPatches.go b/windowPatches.go index b12a061..3eb1d7b 100644 --- a/windowPatches.go +++ b/windowPatches.go @@ -57,7 +57,24 @@ func makePatchesWin(patches *forgepb.Patches) *stdPatchTableWin { grid.NewLabel(fmt.Sprintf("total repos")) grid.NextRow() - grid.NewButton("reload", func() { + grid.NewButton("show all", func() { + if me.psets == nil { + log.Info("No Patchsets loaded") + return + } + notdone := new(forgepb.Patches) + + all := me.psets.All() + for all.Scan() { + pset := all.Next() + AddNotDonePatches(notdone, pset, true) + } + + for patch := range notdone.IterAll() { + comment := cleanSubject(patch.Comment) + log.Info("new patch:", patch.NewHash, "commithash:", patch.CommitHash, patch.RepoNamespace, comment) + } + dwin.doPatchesTable(notdone) }) grid.NewButton("Apply All", func() { var count int @@ -135,6 +152,11 @@ func AddPatchesPB(tbox *gui.Node, pb *forgepb.Patches) *forgepb.PatchesTable { t.SetParent(tbox) gitam := t.AddButtonFunc("apply", func(p *forgepb.Patch) string { + rn := p.RepoNamespace + if repo := me.forge.FindByGoPath(rn); repo == nil { + // log.Info("Could not figure out repo path", rn) + return "" + } return "git am" }) gitam.Custom = func(p *forgepb.Patch) { |
