diff options
| author | Jeff Carr <[email protected]> | 2025-01-30 06:21:26 -0600 |
|---|---|---|
| committer | Jeff Carr <[email protected]> | 2025-01-30 06:21:26 -0600 |
| commit | e7d71c78e22426e3b26b9d89b8ac2a3c02faded6 (patch) | |
| tree | 059993878ed1c10848b7ce022db553d55e63c446 /windowPatches.go | |
| parent | a76028dd23a0f43060e56098a5b0e56ae9c11bbb (diff) | |
GetPatchsets work
Diffstat (limited to 'windowPatches.go')
| -rw-r--r-- | windowPatches.go | 59 |
1 files changed, 30 insertions, 29 deletions
diff --git a/windowPatches.go b/windowPatches.go index decd2ab..9d6e35a 100644 --- a/windowPatches.go +++ b/windowPatches.go @@ -1,27 +1,24 @@ package main import ( - "slices" - "strings" "sync" "go.wit.com/lib/gadgets" - "go.wit.com/lib/protobuf/forgepb" "go.wit.com/log" "go.wit.com/gui" ) type patchesWindow struct { - once sync.Once // only init() the window once - win *gadgets.BasicWindow // the patches window - stack *gui.Node // the top box set as vertical - shelf *gui.Node // the first box in the stack, set as horizontal - grid *gui.Node // the list of available patches - summary *patchSummary // summary of current patches - setgrid *gui.Node // the list of each patchset - setlist map[string]*forgepb.Patchset // a map of the patch names to the protobuf - setwin map[string]*patchWindow // a map of the patch names to the protobuf + once sync.Once // only init() the window once + win *gadgets.BasicWindow // the patches window + stack *gui.Node // the top box set as vertical + shelf *gui.Node // the first box in the stack, set as horizontal + grid *gui.Node // the list of available patches + summary *patchSummary // summary of current patches + setgrid *gui.Node // the list of each patchset + // setlist map[string]*forgepb.Patchset // a map of the patch names to the protobuf + // setwin map[string]*patchWindow // a map of the patch names to the protobuf } func (r *patchesWindow) Hidden() bool { @@ -84,27 +81,30 @@ func (r *patchesWindow) initWindow() { // add the grid r.setgrid = g.NewGrid("", 0, 0) - r.setlist = make(map[string]*forgepb.Patchset) - r.setwin = make(map[string]*patchWindow) + /* + r.setlist = make(map[string]*forgepb.Patchset) + r.setwin = make(map[string]*patchWindow) - // query for current patchsets - lines, err := listPatches() - if err != nil { - log.Info(err) - return - } - slices.Reverse(lines) - count := 0 - for i, line := range lines { - log.Info(i, line) - count += 1 - if count < 10 { - r.addPatchset(line) + // query for current patchsets + lines, err := listPatches() + if err != nil { + log.Info(err) + return } - } - log.Info("Total patchsets:", count) + slices.Reverse(lines) + count := 0 + for i, line := range lines { + log.Info(i, line) + count += 1 + if count < 10 { + r.addPatchset(line) + } + } + log.Info("Total patchsets:", count) + */ } +/* func (r *patchesWindow) addPatchset(line string) { parts := strings.Split(line, "Author:") author := parts[1] @@ -136,3 +136,4 @@ func (r *patchesWindow) addPatchset(line string) { }) r.setgrid.NextRow() } +*/ |
