diff options
| author | Jeff Carr <[email protected]> | 2025-03-25 07:27:21 -0500 |
|---|---|---|
| committer | Jeff Carr <[email protected]> | 2025-03-25 13:17:00 -0500 |
| commit | 99e30376f0a7835b564e408e877f2faca6ceae29 (patch) | |
| tree | 9b4b3bc04a7deb5008aff57201b05553ce909bbb /windowPatches.go | |
| parent | aed4c927130f5bc52f062dff40f3b48500b14081 (diff) | |
button to show all patchesv0.22.113
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) { |
