summaryrefslogtreecommitdiff
path: root/doGui.go
diff options
context:
space:
mode:
authorJeff Carr <[email protected]>2025-09-04 18:32:01 -0500
committerJeff Carr <[email protected]>2025-09-04 18:32:01 -0500
commit78e883a1066904b89658cd48cba4facb8dd18eac (patch)
treebb96848018e90204cda3f87fa5803843158fca03 /doGui.go
parent19ce7eef563c3b72e0bf3947bb130e5e96b0ebbd (diff)
more work on patches
Diffstat (limited to 'doGui.go')
-rw-r--r--doGui.go43
1 files changed, 24 insertions, 19 deletions
diff --git a/doGui.go b/doGui.go
index 579903f..be3200a 100644
--- a/doGui.go
+++ b/doGui.go
@@ -14,6 +14,7 @@ import (
"go.wit.com/lib/fhelp"
"go.wit.com/lib/gadgets"
"go.wit.com/lib/gui/shell"
+ "go.wit.com/lib/protobuf/forgepb"
"go.wit.com/lib/protobuf/gitpb"
"go.wit.com/log"
)
@@ -168,28 +169,32 @@ func drawWindow(win *gadgets.GenericWindow) {
patchesWin.Toggle()
return
}
- // me.forge.GetPatches()
- // loadUpstreamPatchsets()
- /*
- if me.psets == nil {
- log.Info("failed to download current patchsets")
- return
+ // load the current patches protobuf file
+ if err := me.forge.LoadPatchsets(); err != nil {
+ log.Info("patches failed to open", err)
+ if err := me.forge.SavePatchsets(); err != nil {
+ log.Warn("savePatchsets() failed", err)
}
- notdone := new(forgepb.Patches)
+ }
+ // patchesWin = makePatchesWin(me.forge.Patchsets)
+ notdone := new(forgepb.Patches)
- all := me.psets.All()
- for all.Scan() {
- pset := all.Next()
- AddNotDonePatches(notdone, pset, false)
- }
+ if me.forge.Patchsets == nil {
+ log.Info("patchsets == nil")
+ return
+ }
+ all := me.forge.Patchsets.All()
+ for all.Scan() {
+ pset := all.Next()
+ AddAllPatches(notdone, pset, false)
+ // AddNotDonePatches(notdone, pset, false)
+ }
- for patch := range notdone.IterAll() {
- comment := cleanSubject(patch.Comment)
- log.Info("new patch:", patch.NewHash, "commithash:", patch.CommitHash, patch.Namespace, comment)
- }
- // savePatchsets()
- patchesWin = makePatchesWin(notdone)
- */
+ for patch := range notdone.IterAll() {
+ comment := cleanSubject(patch.Comment)
+ log.Info("new patch:", patch.NewHash, "commithash:", patch.CommitHash, patch.Namespace, comment)
+ }
+ patchesWin = makePatchesWin(notdone)
})
var pubWin *gadgets.GenericWindow