diff --git a/Makefile b/Makefile index 4231a6d..f7f8235 100644 --- a/Makefile +++ b/Makefile @@ -55,3 +55,6 @@ pull: install mine: install forge --find-mine + +gui: install + forge --do-gui diff --git a/exit.go b/exit.go new file mode 100644 index 0000000..7b8b027 --- /dev/null +++ b/exit.go @@ -0,0 +1,18 @@ +package main + +import ( + "os" + + "go.wit.com/log" +) + +func okExit(thing string) { + log.Info(thing, "ok") + // log.Info("Finished go-clean on", check.GetGoPath(), "ok") + os.Exit(0) +} + +func badExit(err error) { + log.Info("forge failed: ", err, me.forge.GetGoSrc()) + os.Exit(-1) +} diff --git a/main.go b/main.go index 622ddfe..79eba12 100644 --- a/main.go +++ b/main.go @@ -66,8 +66,21 @@ func main() { // do the gui at the very end if argv.DoGui { + pset, err := me.forge.MakePatchSet() + if err != nil { + badExit(err) + } + all := pset.SortByFilename() + for all.Scan() { + p := all.Next() + log.Info("read in patch:", p.Filename) + } + err = me.forge.SendPatchSet(pset) + if err != nil { + badExit(err) + } + okExit("patches") doGui() - os.Exit(0) } if !done { // if nothing was selected, print out a table of them on STDOUT diff --git a/subitPatches.go b/subitPatches.go index dead524..ea1e099 100644 --- a/subitPatches.go +++ b/subitPatches.go @@ -176,8 +176,8 @@ func submitPatchesBox(box *gui.Node) *patchSummary { s.submitB.Disable() s.grid.NextRow() - s.unknownOL.Disable() - s.unknownSubmitB.Disable() + // s.unknownOL.Disable() + // s.unknownSubmitB.Disable() s.grid.NextRow() return s @@ -229,12 +229,12 @@ func (s *patchSummary) Update() { if dirty == 0 { s.reason.Enable() s.submitB.Enable() - s.unknownOL.Enable() - s.unknownSubmitB.Enable() + // s.unknownOL.Enable() + // s.unknownSubmitB.Enable() } else { s.reason.Disable() s.submitB.Enable() - s.unknownOL.Enable() - s.unknownSubmitB.Enable() + // s.unknownOL.Enable() + // s.unknownSubmitB.Enable() } }