fix commandline patch submit
This commit is contained in:
parent
fc9c26cc8d
commit
2b10e228d2
5
argv.go
5
argv.go
|
@ -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 {
|
||||
|
|
|
@ -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")
|
||||
}
|
||||
}
|
5
main.go
5
main.go
|
@ -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("")
|
||||
}
|
||||
|
||||
|
|
|
@ -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() {
|
||||
|
|
Loading…
Reference in New Issue