fix commandline patch submit

This commit is contained in:
Jeff Carr 2025-01-17 13:59:59 -06:00
parent fc9c26cc8d
commit 2b10e228d2
4 changed files with 19 additions and 10 deletions

View File

@ -37,8 +37,9 @@ type EmptyCmd struct {
type testCmd string
type PatchCmd struct {
List *EmptyCmd `arg:"subcommand:list" help:"list available patches"`
Show *EmptyCmd `arg:"subcommand:show" help:"show a specific patch"`
List *EmptyCmd `arg:"subcommand:list" help:"list available patches"`
Show *EmptyCmd `arg:"subcommand:show" help:"show a specific patch"`
Submit string `arg:"--submit" help:"name of patchset"`
}
type ConfigAddCmd struct {

13
doSubmitPatch.go Normal file
View File

@ -0,0 +1,13 @@
package main
import (
"go.wit.com/log"
)
func doSubmit(name string) {
if err := sendDevelDiff(name); err != nil {
log.Info("sending patches failed", err)
} else {
log.Info("sent patch set ok")
}
}

View File

@ -172,9 +172,8 @@ func main() {
okExit("")
}
if argv.Patch != nil {
if argv.Patch.Show != nil {
sendDevelDiff("fixme")
// sendMasterDiff()
if argv.Patch.Submit != "" {
doSubmit(argv.Patch.Submit)
okExit("")
}

View File

@ -71,11 +71,7 @@ func submitPatchesBox(box *gui.Node) *patchSummary {
}
}
s.submitB = s.grid.NewButton("Submit", func() {
if err := sendDevelDiff(s.reason.String()); err != nil {
log.Info("sending patches failed", err)
} else {
log.Info("sent patch set ok")
}
doSubmit(s.reason.String())
})
s.grid.NewButton("List Patchsets", func() {