attempt to make a patchset protobuf
This commit is contained in:
parent
aff3268ca6
commit
353290ecb1
3
Makefile
3
Makefile
|
@ -55,3 +55,6 @@ pull: install
|
||||||
|
|
||||||
mine: install
|
mine: install
|
||||||
forge --find-mine
|
forge --find-mine
|
||||||
|
|
||||||
|
gui: install
|
||||||
|
forge --do-gui
|
||||||
|
|
|
@ -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)
|
||||||
|
}
|
15
main.go
15
main.go
|
@ -66,8 +66,21 @@ func main() {
|
||||||
|
|
||||||
// do the gui at the very end
|
// do the gui at the very end
|
||||||
if argv.DoGui {
|
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()
|
doGui()
|
||||||
os.Exit(0)
|
|
||||||
}
|
}
|
||||||
if !done {
|
if !done {
|
||||||
// if nothing was selected, print out a table of them on STDOUT
|
// if nothing was selected, print out a table of them on STDOUT
|
||||||
|
|
|
@ -176,8 +176,8 @@ func submitPatchesBox(box *gui.Node) *patchSummary {
|
||||||
s.submitB.Disable()
|
s.submitB.Disable()
|
||||||
s.grid.NextRow()
|
s.grid.NextRow()
|
||||||
|
|
||||||
s.unknownOL.Disable()
|
// s.unknownOL.Disable()
|
||||||
s.unknownSubmitB.Disable()
|
// s.unknownSubmitB.Disable()
|
||||||
s.grid.NextRow()
|
s.grid.NextRow()
|
||||||
|
|
||||||
return s
|
return s
|
||||||
|
@ -229,12 +229,12 @@ func (s *patchSummary) Update() {
|
||||||
if dirty == 0 {
|
if dirty == 0 {
|
||||||
s.reason.Enable()
|
s.reason.Enable()
|
||||||
s.submitB.Enable()
|
s.submitB.Enable()
|
||||||
s.unknownOL.Enable()
|
// s.unknownOL.Enable()
|
||||||
s.unknownSubmitB.Enable()
|
// s.unknownSubmitB.Enable()
|
||||||
} else {
|
} else {
|
||||||
s.reason.Disable()
|
s.reason.Disable()
|
||||||
s.submitB.Enable()
|
s.submitB.Enable()
|
||||||
s.unknownOL.Enable()
|
// s.unknownOL.Enable()
|
||||||
s.unknownSubmitB.Enable()
|
// s.unknownSubmitB.Enable()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue