summaryrefslogtreecommitdiff
path: root/windowViewPatch.go
diff options
context:
space:
mode:
authorJeff Carr <[email protected]>2025-01-29 10:01:38 -0600
committerJeff Carr <[email protected]>2025-01-29 12:18:16 -0600
commite548b0fb6d0d14cdfb693850d592419f247dc2b1 (patch)
tree559c06893d67c684539766656e960f7230042ac1 /windowViewPatch.go
parentf61891ca88c8073466ab8e43d8feffbf5f1bb913 (diff)
show git commit message. repo namespace
Diffstat (limited to 'windowViewPatch.go')
-rw-r--r--windowViewPatch.go30
1 files changed, 24 insertions, 6 deletions
diff --git a/windowViewPatch.go b/windowViewPatch.go
index eeac7c7..4ea414d 100644
--- a/windowViewPatch.go
+++ b/windowViewPatch.go
@@ -6,6 +6,7 @@ import (
"go.wit.com/lib/gadgets"
"go.wit.com/lib/protobuf/forgepb"
+ "go.wit.com/log"
"go.wit.com/gui"
)
@@ -82,13 +83,28 @@ func makePatchWindow(pset *forgepb.Patchset) *patchWindow {
grid.NextRow()
grid.NewLabel("end branch: " + pset.EndBranchName)
grid.NewLabel(pset.EndBranchHash)
+ grid.NextRow()
- /*
- r.shelf = r.initGroup()
- group1 := r.stack.NewGroup("stuff")
- vbox := group1.Box()
- vbox.Vertical()
- */
+ grid.NewButton("Extract", func() {
+ if err := savePatchset(pset); err != nil {
+ log.Info("Save err:", err)
+ return
+ }
+ })
+ grid.NewButton("Apply", func() {
+ if _, _, _, err := IsEverythingOnDevel(); err != nil {
+ log.Info("You can only apply patches to the devel branch")
+ return
+ }
+ if IsAnythingDirty() {
+ log.Info("You can't apply patches when repos are dirty")
+ me.forge.PrintHumanTable(me.found)
+ return
+ }
+ if argv.Force {
+ applyPatchset(pset)
+ }
+ })
g := pw.stack.NewGroup("PatchSet List")
@@ -99,6 +115,8 @@ func makePatchWindow(pset *forgepb.Patchset) *patchWindow {
for all.Scan() {
p := all.Next()
// if IsValidPatch(p) {
+ filegrid.NewLabel(p.RepoNamespace)
+ filegrid.NewLabel(p.Comment)
filegrid.NewLabel(p.Filename)
filegrid.NewLabel(p.RepoPath)
filegrid.NewLabel(p.BranchName)