try to figure out why this fails

This commit is contained in:
Jeff Carr 2025-09-04 21:34:39 -05:00
parent 4063e03108
commit 13aff0d5dc
2 changed files with 9 additions and 11 deletions

View File

@ -26,7 +26,7 @@ func doCheckout() error {
} }
if argv.Checkout.Devel != nil { if argv.Checkout.Devel != nil {
if err := me.forge.DoAllCheckoutDevel(argv.Force); err != nil { if err := me.forge.DoAllCheckoutDevelNew(argv.Force); err != nil {
badExit(err) badExit(err)
} }
okExit("") okExit("")

View File

@ -8,6 +8,7 @@ package main
import ( import (
"time" "time"
"go.wit.com/lib/gui/shell"
"go.wit.com/lib/protobuf/gitpb" "go.wit.com/lib/protobuf/gitpb"
"go.wit.com/log" "go.wit.com/log"
) )
@ -20,13 +21,13 @@ func doNormal() bool {
for path, stat := range stats { for path, stat := range stats {
dur := stat.End.Sub(stat.Start) dur := stat.End.Sub(stat.Start)
if dur > 10*time.Second { if dur > 10*time.Second {
log.Infof("%-30v %s checkNormalRepoState() took a long time\n", dur, path) log.Infof("%s checkNormalRepoState() took a long time (%s)\n", path, shell.FormatDuration(dur))
} }
if stat.Err == nil { if stat.Err == nil {
continue continue
} }
// log.Infof("%-60s, %-60s %v %s\n", stat.Start, stat.End.String(), dur, path) // log.Infof("%-60s, %-60s %v %s\n", stat.Start, stat.End.String(), dur, path)
log.Infof("%-30v %s %v\n", dur, path, stat.Err) // log.Infof("%-30v %s %v\n", dur, path, stat.Err)
// log.Info("got path", path, stat.Err) // log.Info("got path", path, stat.Err)
count += 1 count += 1
} }
@ -57,16 +58,13 @@ func checkNormalRepoState(repo *gitpb.Repo) error {
if repo.GetUserBranchName() == "" { if repo.GetUserBranchName() == "" {
return log.Errorf("user branch name blank") return log.Errorf("user branch name blank")
} }
if _, err := repo.MakeLocalDevelBranch(); err != nil { repo.MakeLocalDevelBranch()
return err
}
if repo.GetCurrentBranchName() != repo.GetUserBranchName() { if repo.GetCurrentBranchName() != repo.GetUserBranchName() {
configSave = true configSave = true
if err := repo.CheckoutUser(); err != nil { repo.CheckoutUser()
return err repo.Reload()
} return log.Errorf("now on user branch")
_, err := me.forge.ReAdd(repo)
return err
} }
return nil return nil
} }