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 testCmd string
|
||||||
|
|
||||||
type PatchCmd struct {
|
type PatchCmd struct {
|
||||||
List *EmptyCmd `arg:"subcommand:list" help:"list available patches"`
|
List *EmptyCmd `arg:"subcommand:list" help:"list available patches"`
|
||||||
Show *EmptyCmd `arg:"subcommand:show" help:"show a specific patch"`
|
Show *EmptyCmd `arg:"subcommand:show" help:"show a specific patch"`
|
||||||
|
Submit string `arg:"--submit" help:"name of patchset"`
|
||||||
}
|
}
|
||||||
|
|
||||||
type ConfigAddCmd struct {
|
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("")
|
okExit("")
|
||||||
}
|
}
|
||||||
if argv.Patch != nil {
|
if argv.Patch != nil {
|
||||||
if argv.Patch.Show != nil {
|
if argv.Patch.Submit != "" {
|
||||||
sendDevelDiff("fixme")
|
doSubmit(argv.Patch.Submit)
|
||||||
// sendMasterDiff()
|
|
||||||
okExit("")
|
okExit("")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -71,11 +71,7 @@ func submitPatchesBox(box *gui.Node) *patchSummary {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
s.submitB = s.grid.NewButton("Submit", func() {
|
s.submitB = s.grid.NewButton("Submit", func() {
|
||||||
if err := sendDevelDiff(s.reason.String()); err != nil {
|
doSubmit(s.reason.String())
|
||||||
log.Info("sending patches failed", err)
|
|
||||||
} else {
|
|
||||||
log.Info("sent patch set ok")
|
|
||||||
}
|
|
||||||
})
|
})
|
||||||
|
|
||||||
s.grid.NewButton("List Patchsets", func() {
|
s.grid.NewButton("List Patchsets", func() {
|
||||||
|
|
Loading…
Reference in New Issue