diff options
Diffstat (limited to 'windowPatches.go')
| -rw-r--r-- | windowPatches.go | 29 |
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() { |
