code moved to gitpb

This commit is contained in:
Jeff Carr 2024-12-06 01:50:03 -06:00
parent e25095f2e7
commit 7f1f8d4028
3 changed files with 27 additions and 52 deletions

View File

@ -1,19 +1,18 @@
package forgepb package forgepb
import ( import (
"errors"
"go.wit.com/lib/gui/repostatus"
"go.wit.com/log" "go.wit.com/log"
) )
func (f *Forge) GitPull() bool { func (f *Forge) GitPull() bool {
f.Repos.RillGitPull(5, 5)
/*
var localonly int var localonly int
var badmap int var badmap int
log.Log(FORGEPBWARN, "running git pull everywhere") log.Log(FORGEPBWARN, "running git pull everywhere")
var failed int = 0 var failed int = 0
loop := f.Repos.SortByGoPath()
for loop.Scan() { for loop.Scan() {
repo := loop.Next() repo := loop.Next()
if out, err := repo.GitPull(); err == nil { if out, err := repo.GitPull(); err == nil {
@ -34,6 +33,7 @@ func (f *Forge) GitPull() bool {
if localonly != 0 { 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. ignored local only branches =", localonly)
} }
*/
return true return true
} }

View File

@ -108,31 +108,6 @@ func IsGitDir(dir string) bool {
return info.IsDir() 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 // rill is awesome. long live rill
// attempt scan with rill // attempt scan with rill
func (f *Forge) rillScanDirs(gopaths []string) (int, error) { func (f *Forge) rillScanDirs(gopaths []string) (int, error) {

View File

@ -50,7 +50,7 @@ func Init() *Forge {
log.Warn("zoopb.ConfigLoad() failed", err) log.Warn("zoopb.ConfigLoad() failed", err)
os.Exit(-1) os.Exit(-1)
} }
// f.Machine.InitWit() f.Machine.InitWit()
start := f.Repos.Len() start := f.Repos.Len()
f.ScanGoSrc() f.ScanGoSrc()