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