diff --git a/Makefile b/Makefile index 39a5522..d662793 100644 --- a/Makefile +++ b/Makefile @@ -1,8 +1,8 @@ VERSION = $(shell git describe --tags) BUILDTIME = $(shell date +%Y.%m.%d) -info: - make dirty +info: install + # make dirty @echo "make restart # remove the repos.pb file" @echo "make private # only the private ones" @echo "make mine # just show my repos" diff --git a/argv.go b/argv.go index 391065a..db94b9c 100644 --- a/argv.go +++ b/argv.go @@ -15,19 +15,19 @@ type FindCmd struct { } type DoCmd struct { - List bool `arg:"--list" help:"just show a table of the current state"` - GitPull bool `arg:"--pull" help:"run 'git pull'"` - GitReset bool `arg:"--git-reset" help:"run 'git reset --hard'"` - Scan bool `arg:"--scan" help:"reload protobuf from .git/"` - Force bool `arg:"--force" help:"force redo things"` - Dirty bool `arg:"--dirty" help:"update git CheckDirty()"` + List bool `arg:"--list" help:"just show a table of the current state"` + GitPull bool `arg:"--pull" help:"run 'git pull'"` + GitReset bool `arg:"--git-reset" help:"run 'git reset --hard'"` + Scan bool `arg:"--scan" help:"reload protobuf from .git/"` + Force bool `arg:"--force" help:"force redo things"` + Dirty bool `arg:"--dirty" help:"update git CheckDirty()"` + PatchSet string `arg:"--patchset" help:"make patch set"` } type args struct { Find *FindCmd `arg:"subcommand:find" help:"select repos (for example, --all or --mine)"` Do *DoCmd `arg:"subcommand:do" help:"do something ('git pull', 'build', 'install', etc)"` Config bool `arg:"--config" help:"show your .config/forge/ settings"` - DoPatchSet bool `arg:"--make-patchset" help:"make patch set"` ListPatchSet bool `arg:"--list-patchset" help:"list patch sets"` DryRun bool `arg:"--dry-run" help:"show what would be run"` Fix bool `arg:"--fix" help:"fix config, save config & exit"` diff --git a/doCommon.go b/doCommon.go index 76c591a..e172f48 100644 --- a/doCommon.go +++ b/doCommon.go @@ -54,7 +54,7 @@ func doCheckDirty() { } } } - doCobol() + // doCobol() log.Info("dirty check took:", shell.FormatDuration(time.Since(now))) me.forge.SetConfigSave(configSave) } diff --git a/main.go b/main.go index 3db4737..8b9672e 100644 --- a/main.go +++ b/main.go @@ -32,6 +32,9 @@ func main() { me = new(mainType) me.pp = arg.MustParse(&argv) me.urlbase = argv.URL + if me.urlbase == "" { + me.urlbase = "https://go.wit.com/" + } me.urlbase = strings.Trim(me.urlbase, "/") // track down why trailing '/' makes http POST not work // load the ~/.config/forge/ config @@ -108,12 +111,11 @@ func main() { doCobol() done = true } - } - - if argv.DoPatchSet { - sendDevelDiff() - // sendMasterDiff() - okExit("patches") + if argv.Do.PatchSet != "" { + sendDevelDiff(argv.Do.PatchSet) + // sendMasterDiff() + okExit("patches") + } } if argv.ListPatchSet { diff --git a/send.go b/send.go index 24db913..900b3b3 100644 --- a/send.go +++ b/send.go @@ -80,26 +80,15 @@ func getPatch(pbfile string) error { return nil } -func sendDevelDiff() { +func sendDevelDiff(name string) { pset, err := me.forge.MakeDevelPatchSet() if err != nil { badExit(err) } + pset.Name = name if err := sendPatches(pset); 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) - } - */ } func sendMasterDiff() { diff --git a/windowPatches.go b/windowPatches.go index f4cb6f6..4685561 100644 --- a/windowPatches.go +++ b/windowPatches.go @@ -157,7 +157,7 @@ func submitPatchesBox(box *gui.Node) *patchSummary { } } s.submitB = s.grid.NewButton("Submit", func() { - sendDevelDiff() + sendDevelDiff(s.reason.String()) /* dirname := "submit-patchset.quilt" patchdir := filepath.Join(me.userHomePwd.String(), dirname)