summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gitCheckout.go52
-rw-r--r--goSrcScan.go25
-rw-r--r--init.go2
3 files changed, 27 insertions, 52 deletions
diff --git a/gitCheckout.go b/gitCheckout.go
index 1ade5c6..612464f 100644
--- a/gitCheckout.go
+++ b/gitCheckout.go
@@ -1,39 +1,39 @@
package forgepb
import (
- "errors"
-
- "go.wit.com/lib/gui/repostatus"
"go.wit.com/log"
)
func (f *Forge) GitPull() bool {
- var localonly int
- var badmap int
+ f.Repos.RillGitPull(5, 5)
+ /*
- log.Log(FORGEPBWARN, "running git pull everywhere")
- var failed int = 0
- loop := f.Repos.SortByGoPath()
- for loop.Scan() {
- repo := loop.Next()
- if out, err := repo.GitPull(); err == nil {
- log.Log(FORGEPBWARN, "Ran git pull ok", repo.GetGoPath(), out)
- } else {
- failed += 1
- // repo.DumpTags()
- if errors.Is(repostatus.ErrorGitPullOnLocal, err) {
- localonly += 1
- continue
+ var localonly int
+ var badmap int
+
+ log.Log(FORGEPBWARN, "running git pull everywhere")
+ var failed int = 0
+ for loop.Scan() {
+ repo := loop.Next()
+ if out, err := repo.GitPull(); err == nil {
+ log.Log(FORGEPBWARN, "Ran git pull ok", repo.GetGoPath(), out)
+ } else {
+ failed += 1
+ // repo.DumpTags()
+ if errors.Is(repostatus.ErrorGitPullOnLocal, err) {
+ localonly += 1
+ continue
+ }
+ badmap += 1
+ log.Log(FORGEPBWARN, "bad unknown git error", repo.GetGoPath(), out, err)
}
- badmap += 1
- log.Log(FORGEPBWARN, "bad unknown git error", repo.GetGoPath(), out, err)
}
- }
- log.Log(FORGEPBWARN, "Ran git pull in all repos. failure count =", failed)
- log.Log(FORGEPBWARN, "Ran git pull in all repos. bad errors =", badmap)
- if localonly != 0 {
- log.Log(FORGEPBWARN, "Ran git pull in all repos. ignored local only branches =", localonly)
- }
+ log.Log(FORGEPBWARN, "Ran git pull in all repos. failure count =", failed)
+ log.Log(FORGEPBWARN, "Ran git pull in all repos. bad errors =", badmap)
+ if localonly != 0 {
+ log.Log(FORGEPBWARN, "Ran git pull in all repos. ignored local only branches =", localonly)
+ }
+ */
return true
}
diff --git a/goSrcScan.go b/goSrcScan.go
index 9aedd85..d7a6cea 100644
--- a/goSrcScan.go
+++ b/goSrcScan.go
@@ -108,31 +108,6 @@ func IsGitDir(dir string) bool {
return info.IsDir()
}
-/*
-// rill is awesome. long live rill
-func rillAddDirs(gopaths []string) {
- // Convert a slice of user IDs into a channel
- ids := rill.FromSlice(gopaths, nil)
-
- // Read users from the API.
- // Concurrency = 20
- dirs := rill.Map(ids, 20, func(id string) (*repolist.RepoRow, error) {
- return me.repos.View.FindByName(id), nil
- })
-
- // Activate users.
- // Concurrency = 10
- err := rill.ForEach(dirs, 10, func(repo *repolist.RepoRow) error {
- fmt.Printf("Repo found : %s\n", repo.GoPath())
- repo.Run([]string{"git", "pull"})
- return nil
- })
-
- // Handle errors
- fmt.Println("Error:", err)
-}
-*/
-
// rill is awesome. long live rill
// attempt scan with rill
func (f *Forge) rillScanDirs(gopaths []string) (int, error) {
diff --git a/init.go b/init.go
index 1d41d62..93d0cbb 100644
--- a/init.go
+++ b/init.go
@@ -50,7 +50,7 @@ func Init() *Forge {
log.Warn("zoopb.ConfigLoad() failed", err)
os.Exit(-1)
}
- // f.Machine.InitWit()
+ f.Machine.InitWit()
start := f.Repos.Len()
f.ScanGoSrc()