summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeff Carr <[email protected]>2025-01-07 20:28:40 -0600
committerJeff Carr <[email protected]>2025-01-07 20:28:40 -0600
commit33c556f95dad4e24e73638be93dbf2c93992d28e (patch)
treefb91a5e5ad5048574fbdab7227d27c4fdc351246
parent51db8c4f0c6b794afefc20ae0c7dfa58c1ef3dcf (diff)
attempting to set pb repo state
-rw-r--r--argv.go1
-rw-r--r--argvAutocomplete.go3
-rw-r--r--main.go6
-rw-r--r--windowRepos.go11
4 files changed, 15 insertions, 6 deletions
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)