diff options
| -rw-r--r-- | doGui.go | 6 | ||||
| -rw-r--r-- | doPatch.go | 2 | ||||
| -rw-r--r-- | windowPatches.go | 25 |
3 files changed, 23 insertions, 10 deletions
@@ -49,9 +49,9 @@ func doGui() { // this is just interesting to see how fast it is on various boxes // and with how many repos you are working with. On my current laptop // I have 320 repos and when I'm using it and most things are in memory - // cache, it takes around - // 13G 424266 total files - + // cache, it took: rill repos.Reload() took (2ms) + // which is hard to believe when my ~/go/src is 13G with 424266 files + // nevermind, there must be something wrong with the code right now log.Printf("rill repos.Reload() took (%s)\n", shell.FormatDuration(time.Since(now))) os.Exit(0) } @@ -39,7 +39,7 @@ func doPatch() error { func doPatchList() error { psets, err := openPatchsets() if err != nil { - log.Info("Get Patchsets failed", err) + log.Info("Open Patchsets failed", err) return err } log.Info("got psets len", len(psets.Patchsets)) diff --git a/windowPatches.go b/windowPatches.go index ae6a3b9..6ea187b 100644 --- a/windowPatches.go +++ b/windowPatches.go @@ -63,11 +63,6 @@ func (r *patchesWindow) initWindow() { // update the stats about the repos and patches r.Update() - - g := r.stack.NewGroup("Patchset List") - - // add the grid - r.psetgrid = g.RawGrid() } func (r *patchesWindow) submitPatchesBox() { @@ -133,15 +128,33 @@ func (r *patchesWindow) submitPatchesBox() { } } }) - r.submitB.Disable() grid.NextRow() + + g := r.stack.NewGroup("Patchset List") + // add the grid + r.psetgrid = g.RawGrid() + + psets, err := openPatchsets() + if err != nil { + log.Info("Open Patchsets failed", err) + // return err + } else { + log.Info("got psets len", len(psets.Patchsets)) + all := psets.SortByName() + for all.Scan() { + pset := all.Next() + // log.Info("pset name =", pset.Name) + r.addPatchsetNew(pset) + } + } } func (r *patchesWindow) addPatchsetNew(pset *forgepb.Patchset) { r.psetgrid.NewLabel(pset.Name) r.psetgrid.NewLabel(pset.Comment) r.psetgrid.NewLabel(pset.GitAuthorName) + r.psetgrid.NewLabel(pset.State) var win *patchWindow r.psetgrid.NewButton("View", func() { |
