summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--doCheckout.go2
-rw-r--r--doNormal.go18
2 files changed, 9 insertions, 11 deletions
diff --git a/doCheckout.go b/doCheckout.go
index 0f47d60..b5944e6 100644
--- a/doCheckout.go
+++ b/doCheckout.go
@@ -26,7 +26,7 @@ func doCheckout() error {
}
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)
}
okExit("")
diff --git a/doNormal.go b/doNormal.go
index da28acd..08044ee 100644
--- a/doNormal.go
+++ b/doNormal.go
@@ -8,6 +8,7 @@ package main
import (
"time"
+ "go.wit.com/lib/gui/shell"
"go.wit.com/lib/protobuf/gitpb"
"go.wit.com/log"
)
@@ -20,13 +21,13 @@ func doNormal() bool {
for path, stat := range stats {
dur := stat.End.Sub(stat.Start)
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 {
continue
}
// 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)
count += 1
}
@@ -57,16 +58,13 @@ func checkNormalRepoState(repo *gitpb.Repo) error {
if repo.GetUserBranchName() == "" {
return log.Errorf("user branch name blank")
}
- if _, err := repo.MakeLocalDevelBranch(); err != nil {
- return err
- }
+ repo.MakeLocalDevelBranch()
+
if repo.GetCurrentBranchName() != repo.GetUserBranchName() {
configSave = true
- if err := repo.CheckoutUser(); err != nil {
- return err
- }
- _, err := me.forge.ReAdd(repo)
- return err
+ repo.CheckoutUser()
+ repo.Reload()
+ return log.Errorf("now on user branch")
}
return nil
}