diff options
| author | Jeff Carr <[email protected]> | 2025-01-29 09:43:42 -0600 |
|---|---|---|
| committer | Jeff Carr <[email protected]> | 2025-01-29 12:18:16 -0600 |
| commit | f61891ca88c8073466ab8e43d8feffbf5f1bb913 (patch) | |
| tree | 8719bc85b7ac128c806331ca74183b32b01d2f22 /windowViewPatch.go | |
| parent | f2281a2102d5821d337029a9f36395b955f3ec80 (diff) | |
shows all the patches
Diffstat (limited to 'windowViewPatch.go')
| -rw-r--r-- | windowViewPatch.go | 30 |
1 files changed, 22 insertions, 8 deletions
diff --git a/windowViewPatch.go b/windowViewPatch.go index a59baa7..eeac7c7 100644 --- a/windowViewPatch.go +++ b/windowViewPatch.go @@ -62,7 +62,7 @@ func makePatchWindow(pset *forgepb.Patchset) *patchWindow { pw := new(patchWindow) // sync.Once() - pw.win = gadgets.RawBasicWindow("Patcheset for") + pw.win = gadgets.RawBasicWindow("Patcheset for " + pset.Name + " (" + pset.Comment + ")") pw.win.Make() pw.stack = pw.win.Box().NewBox("bw vbox", false) @@ -75,6 +75,13 @@ func makePatchWindow(pset *forgepb.Patchset) *patchWindow { grid := pw.stack.NewGrid("", 0, 0) grid.NewLabel(pset.GitAuthorName) + grid.NewLabel(pset.GitAuthorEmail) + grid.NextRow() + grid.NewLabel("start branch: " + pset.StartBranchName) + grid.NewLabel(pset.StartBranchHash) + grid.NextRow() + grid.NewLabel("end branch: " + pset.EndBranchName) + grid.NewLabel(pset.EndBranchHash) /* r.shelf = r.initGroup() @@ -86,14 +93,21 @@ func makePatchWindow(pset *forgepb.Patchset) *patchWindow { g := pw.stack.NewGroup("PatchSet List") // add the patch grid - g.NewGrid("", 0, 0) + filegrid := g.NewGrid("", 0, 0) + + all := pset.Patches.SortByFilename() + for all.Scan() { + p := all.Next() + // if IsValidPatch(p) { + filegrid.NewLabel(p.Filename) + filegrid.NewLabel(p.RepoPath) + filegrid.NewLabel(p.BranchName) + filegrid.NewLabel(p.BranchHash) + filegrid.NewLabel(p.CommitHash) + filegrid.NewLabel(p.StartHash) + filegrid.NextRow() + } - /* - for i, line := range lines { - log.Info(i, line) - r.addFile(line) - } - */ return pw } |
