diff options
| -rw-r--r-- | argv.go | 3 | ||||
| -rw-r--r-- | argvAutocomplete.go | 8 | ||||
| -rw-r--r-- | cobol.go | 3 | ||||
| -rw-r--r-- | windowRepos.go | 10 |
4 files changed, 21 insertions, 3 deletions
@@ -20,6 +20,7 @@ type args struct { Patch *PatchCmd `arg:"subcommand:patch" help:"examine and make patch sets"` GitPull *FindCmd `arg:"subcommand:pull" help:"run 'git pull'"` Rescan *EmptyCmd `arg:"subcommand:rescan" help:"recreate the git protobuf repos.pb file"` + Delete *EmptyCmd `arg:"subcommand:delete" help:"untrack a repo"` URL string `arg:"--connect" help:"gowebd url"` Bash bool `arg:"--bash" help:"generate bash completion"` BashAuto []string `arg:"--auto-complete" help:"does the actual autocompletion"` @@ -29,6 +30,8 @@ type args struct { 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"` diff --git a/argvAutocomplete.go b/argvAutocomplete.go index ca38d95..c371bb4 100644 --- a/argvAutocomplete.go +++ b/argvAutocomplete.go @@ -12,6 +12,10 @@ import ( // used for shell auto completion // var ARGNAME string = "forge" // todo: get this from $0 ? +func (a *EmptyCmd) deleteMatch() { + fmt.Println("go.wit.com/lib/gui/repostatus") +} + func (args) doBashAuto() { argv.doBashHelp() switch argv.BashAuto[0] { @@ -32,10 +36,12 @@ func (args) doBashAuto() { fmt.Println("--force") case "master": fmt.Println("--force") + case "delete": + argv.Delete.deleteMatch() default: if argv.BashAuto[0] == ARGNAME { // list the subcommands here - fmt.Println("--bash checkout config dirty hard-reset list patch pull rescan") + fmt.Println("--bash checkout config dirty delete hard-reset list patch pull rescan") } } os.Exit(0) @@ -165,6 +165,9 @@ func verifyPrint(repo *gitpb.Repo) { if me.forge.Config.IsReadOnly(repo.GetGoPath()) { end += "(readonly) " } + if repo.GetMasterBranchName() != "master" && repo.GetMasterBranchName() != "main" { + end += "(m:" + repo.GetMasterBranchName() + ") " + } log.Info(start, end) } diff --git a/windowRepos.go b/windowRepos.go index 2178c77..5f3cf25 100644 --- a/windowRepos.go +++ b/windowRepos.go @@ -127,7 +127,7 @@ func (r *repoWindow) repoMenu() *gui.Node { box2.NewButton("test master merge", func() { r.Disable() r.mergeAllDevelToMain() - r.reInitForge() + // r.reInitForge() r.Enable() }) @@ -176,8 +176,14 @@ func (r *repoWindow) mergeAllDevelToMain() bool { } if result, err := repo.MergeDevelToMaster(); err == nil { log.Warn("MERGE WORKED", repo.GetFullPath()) + repo.Reload() + vrepo := me.repos.View.FindByPath(repo.GetGoPath()) + if vrepo != nil { + vrepo.UpdatePb(repo) + vrepo.NewScan() + } // continue - return true + continue } else { log.Warn("THINGS FAILED ", repo.GetFullPath()) log.Warn("err", err) |
