summaryrefslogtreecommitdiff
path: root/windowPatches.go
diff options
context:
space:
mode:
authorJeff Carr <[email protected]>2025-01-05 04:54:05 -0600
committerJeff Carr <[email protected]>2025-01-05 04:54:05 -0600
commit79ec3ce469623e70bb8ee29218e0bb1aaae8c39a (patch)
tree73a302176b63b2937fb757d402c6be522bd06fcb /windowPatches.go
parent92ff05cf6fe09578538bb7dde0769d2f72d018a6 (diff)
stop apply if repos are dirty
Diffstat (limited to 'windowPatches.go')
-rw-r--r--windowPatches.go29
1 files changed, 26 insertions, 3 deletions
diff --git a/windowPatches.go b/windowPatches.go
index e153553..443103a 100644
--- a/windowPatches.go
+++ b/windowPatches.go
@@ -164,17 +164,40 @@ func submitPatchesBox(box *gui.Node) *patchSummary {
}
})
- s.grid.NewButton("Show Patchsets", func() {
+ s.grid.NewButton("List Patchsets", func() {
listPatches()
})
- s.grid.NewButton("Get Latest Patchset", func() {
+ s.grid.NewButton("Show Latest Patchset", func() {
lastp := lastPatch()
pset, err := getPatch(lastp)
if err != nil {
return
}
- dumpPatchset(pset)
+
+ if !dumpPatchset(pset) {
+ log.Info("some patches are bad")
+ return
+ }
+ if IsAnythingDirty() {
+ log.Info("You can't apply patches when repos are dirty")
+ doCobol()
+ return
+ }
+ })
+
+ s.grid.NewButton("Apply Latest Patchset", func() {
+ lastp := lastPatch()
+ pset, err := getPatch(lastp)
+ if err != nil {
+ return
+ }
+ if IsAnythingDirty() {
+ log.Info("You can't apply patches when repos are dirty")
+ doCobol()
+ return
+ }
+ applyPatchset(pset)
})
s.grid.NewButton("Show Repos", func() {