early attempt to make a patchset

This commit is contained in:
Jeff Carr 2024-12-11 22:48:52 -06:00
parent ada387b966
commit fdbf6e7dd5
1 changed files with 34 additions and 13 deletions

33
main.go
View File

@ -66,7 +66,19 @@ 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() sendDevelDiff()
sendMasterDiff()
okExit("patches")
doGui()
}
if !done {
// if nothing was selected, print out a table of them on STDOUT
doCobol()
}
}
func sendDevelDiff() {
pset, err := me.forge.MakeDevelPatchSet()
if err != nil { if err != nil {
badExit(err) badExit(err)
} }
@ -79,11 +91,20 @@ func main() {
if err != nil { if err != nil {
badExit(err) badExit(err)
} }
okExit("patches")
doGui()
} }
if !done {
// if nothing was selected, print out a table of them on STDOUT func sendMasterDiff() {
doCobol() pset, err := me.forge.MakeMasterPatchSet()
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)
} }
} }