summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeff Carr <[email protected]>2025-10-07 19:48:19 -0500
committerJeff Carr <[email protected]>2025-10-07 19:48:19 -0500
commit2b01cc8c01a82bf8c5fbecea831e61660d9103f7 (patch)
tree5f5e45b4c6fe4623d9ef78aeac5a8e17b62e7ebc
parentefb902aabac2b90d80180fa7e1adcfd443012250 (diff)
try again with statsv0.25.69
-rw-r--r--doPull.go26
1 files changed, 21 insertions, 5 deletions
diff --git a/doPull.go b/doPull.go
index 2bc96de..17328fe 100644
--- a/doPull.go
+++ b/doPull.go
@@ -7,6 +7,7 @@ import (
"strings"
"time"
+ "go.wit.com/lib/config"
"go.wit.com/lib/gui/shell"
"go.wit.com/lib/protobuf/forgepb"
"go.wit.com/lib/protobuf/gitpb"
@@ -165,16 +166,31 @@ func doPull() error {
}
if argv.Pull.Force || argv.Force {
- now := time.Now()
stats := me.forge.RillFuncError(rillPull)
count := me.forge.RillReload()
if count != 0 {
me.forge.ConfigSave()
}
-
- total, count, nope, _ := me.forge.IsEverythingOnMaster()
- log.Printf("Master branch check. %d total repos. (%d git pulled) (%d not on master branch) (%s) git pull total=FIXME%d\n", total, count, nope, shell.FormatDuration(time.Since(now)), len(stats))
- return nil
+ repoerr := gitpb.NewRepos()
+ for path, stat := range stats {
+ if stat.Err == nil {
+ continue
+ }
+ repo := me.forge.Repos.FindByFullPath(path)
+ if repo == nil {
+ log.Info("path deleted while running?", path)
+ continue
+ }
+ r := repoerr.Append(repo)
+ r.State = "git pull failed"
+ dur := stat.End.Sub(stat.Start)
+ if dur > 1*time.Second {
+ msg := log.Sprintf("pull time (%s)", config.FormatDuration(dur))
+ r.State = msg
+ }
+ }
+ me.forge.PrintPullTable(repoerr)
+ me.sh.GoodExit("git pull done")
}
log.Info("do a pull check here?")