summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeff Carr <[email protected]>2025-08-31 15:05:27 -0500
committerJeff Carr <[email protected]>2025-08-31 15:05:27 -0500
commitf754a93493e6a12c1d60dec9b71be841b9aaa2b6 (patch)
tree3fa926eb2e8d08df2731cf1ed3b4d04d2e456d21
parenta84db9a7880bd2f464bb9d14e8a1cb31fcd0562b (diff)
cleanups for "forge normal"
-rw-r--r--doNormal.go24
1 files changed, 20 insertions, 4 deletions
diff --git a/doNormal.go b/doNormal.go
index 7a00a16..7ba172b 100644
--- a/doNormal.go
+++ b/doNormal.go
@@ -6,16 +6,32 @@ package main
// checks that repos are in a "normal" state
import (
+ "time"
+
"go.wit.com/lib/protobuf/gitpb"
"go.wit.com/log"
)
func doNormal() bool {
- if allerr := me.forge.RillRepos(checkNormalRepoState); len(allerr) != 0 {
- log.Info("Some repos are not in a 'normal' state. error count =", len(allerr))
- for repo, err := range allerr {
- log.Info("ABNORMAL:", repo.GetFullPath(), err)
+ doCheckDirtyAndConfigSave()
+
+ var count int
+ stats := me.forge.RillRepos(checkNormalRepoState)
+ for path, stat := range stats {
+ dur := stat.End.Sub(stat.Start)
+ if dur > time.Second {
+ log.Infof("%-30v %s took a long time\n", dur, path)
}
+ 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.Info("got path", path, stat.Err)
+ count += 1
+ }
+ if count > 0 {
+ log.Info("Some repos are not in a 'normal' state. error count =", count)
return false
}
return true