diff --git a/argv.go b/argv.go index beee036..8d9c311 100644 --- a/argv.go +++ b/argv.go @@ -23,6 +23,7 @@ type args struct { 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"` + Force bool `arg:"--force" help:"try to strong arm things"` } type EmptyCmd struct { diff --git a/argvAutocomplete.go b/argvAutocomplete.go index ac491ad..ca38d95 100644 --- a/argvAutocomplete.go +++ b/argvAutocomplete.go @@ -27,8 +27,11 @@ func (args) doBashAuto() { fmt.Println("--list --submit --show") case "dirty": case "user": + fmt.Println("--force") case "devel": + fmt.Println("--force") case "master": + fmt.Println("--force") default: if argv.BashAuto[0] == ARGNAME { // list the subcommands here diff --git a/main.go b/main.go index 77cd01c..be2f0b6 100644 --- a/main.go +++ b/main.go @@ -62,7 +62,11 @@ func main() { if argv.Checkout != nil { if argv.Checkout.User != nil { - me.forge.CheckoutUser() + if argv.Force { + me.forge.CheckoutUserForce() + } else { + me.forge.CheckoutUser() + } me.forge = forgepb.Init() me.found = new(gitpb.Repos) argv.Checkout.User.findRepos() diff --git a/windowRepos.go b/windowRepos.go index bc84893..7d47c1a 100644 --- a/windowRepos.go +++ b/windowRepos.go @@ -159,24 +159,25 @@ func (r *repoWindow) mergeAllDevelToMain() bool { for loop.Scan() { repo := loop.Next() if me.forge.Config.IsReadOnly(repo.GetGoPath()) { - log.Info("skipping readonly", repo.GetFullPath()) + // log.Info("skipping readonly", repo.GetFullPath()) continue } if repo.IsDirty() { log.Info("skipping dirty", repo.GetFullPath()) continue } - if repo.GetCurrentBranchName() != repo.GetDevelBranchName() { - log.Info("not on devel branch", repo.GetFullPath()) + if repo.GetDevelVersion() != repo.GetUserVersion() { + log.Info("devel and user branch are different", repo.GetFullPath()) continue } if repo.GetDevelVersion() == repo.GetMasterVersion() { - log.Info("devel and master branch are the same", repo.GetFullPath()) + // log.Info("devel and master branch are the same", repo.GetFullPath()) continue } if result, err := repo.MergeDevelToMaster(); err == nil { log.Warn("MERGE WORKED", repo.GetFullPath()) - continue + // continue + return true } else { log.Warn("THINGS FAILED ", repo.GetFullPath()) log.Warn("err", err)