debugging, but runs ok
This commit is contained in:
parent
bdf9d97cf9
commit
f4ac491490
|
@ -177,7 +177,7 @@ func (f *Forge) RillRedoGoMod() int {
|
|||
log.Printf("%10s %-50s", "why am I in RillRedoGoMod? old?", repo.GetGoPath())
|
||||
continue
|
||||
}
|
||||
all = append(all, repo)
|
||||
f.Repos.Append(repo)
|
||||
}
|
||||
// Convert a slice of user IDs into a channel
|
||||
ids := rill.FromSlice(all, nil)
|
||||
|
|
|
@ -38,7 +38,7 @@ func (f *Forge) PrintHumanTable(allr *gitpb.Repos) {
|
|||
|
||||
var count int
|
||||
// log.Info(standardStart5("gopath", "cur name", "master", "user", "repo type"))
|
||||
log.Info(standardTable8("repopath", "cur br", "age", "target", "master", "devel", "user", "curver", "repo type"))
|
||||
log.Info(standardTable8("repopath", "cur br", "age", "master", "devel", "user", "curver", "next", "repo type"))
|
||||
all := allr.SortByFullPath()
|
||||
for all.Scan() {
|
||||
repo := all.Next()
|
||||
|
@ -54,7 +54,7 @@ func (f *Forge) PrintHumanTableDirty(allr *gitpb.Repos) {
|
|||
|
||||
var count int
|
||||
// log.Info(standardStart5("gopath", "cur name", "master", "user", "repo type"))
|
||||
log.Info(standardTable8("repopath", "cur br", "age", "master", "devel", "user", "curver", "target", "repo type"))
|
||||
log.Info(standardTable8("repopath", "cur br", "age", "master", "devel", "user", "curver", "next", "repo type"))
|
||||
// all := allr.SortByFullPath()
|
||||
all := allr.All()
|
||||
for all.Scan() {
|
||||
|
@ -161,9 +161,6 @@ func standardTable8(arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9 string)
|
|||
|
||||
func (f *Forge) printRepoToTable(repo *gitpb.Repo) {
|
||||
var end string
|
||||
if repo.IsDirty() {
|
||||
end += "(dirty) "
|
||||
}
|
||||
|
||||
// shortened version numbers
|
||||
var mhort string = repo.GetMasterVersion()
|
||||
|
@ -180,6 +177,11 @@ func (f *Forge) printRepoToTable(repo *gitpb.Repo) {
|
|||
// age := shell.FormatDuration(time.Since(ctime))
|
||||
age := shell.FormatDuration(repo.NewestAge())
|
||||
|
||||
if repo.IsDirty() {
|
||||
age = ""
|
||||
end += "(dirty) "
|
||||
}
|
||||
|
||||
start := standardTable8(gopath, cname, age, mhort, dhort, uhort, chort, thort, rtype)
|
||||
|
||||
if f.Config.IsReadOnly(repo.GetGoPath()) {
|
||||
|
|
10
repoNew.go
10
repoNew.go
|
@ -5,6 +5,7 @@ import (
|
|||
"os"
|
||||
"path/filepath"
|
||||
"regexp"
|
||||
"slices"
|
||||
"strings"
|
||||
|
||||
"go.wit.com/lib/protobuf/gitpb"
|
||||
|
@ -13,11 +14,20 @@ import (
|
|||
|
||||
func (f *Forge) NewGoRepo(gopath string, url string) (*gitpb.Repo, error) {
|
||||
fullpath := filepath.Join(f.GetGoSrc(), gopath)
|
||||
test := f.Repos.FindByFullPath(fullpath)
|
||||
if test != nil {
|
||||
return test, nil
|
||||
}
|
||||
log.Info("LEN START", f.Repos.Len())
|
||||
repo, err := f.Repos.NewGoRepo(fullpath, gopath)
|
||||
if err != nil {
|
||||
log.Info("WARNING. NEW FAILED", fullpath)
|
||||
return nil, err
|
||||
}
|
||||
log.Info("LEN END", f.Repos.Len())
|
||||
slices.Reverse(f.Repos.Repos)
|
||||
log.Info("LEN END", f.Repos.Len())
|
||||
|
||||
repo.URL = url
|
||||
f.VerifyBranchNames(repo)
|
||||
if f.Config.IsReadOnly(repo.GetGoPath()) {
|
||||
|
|
Loading…
Reference in New Issue