diff options
| -rw-r--r-- | rill.go | 6 | ||||
| -rw-r--r-- | scanRepoDir.go | 10 |
2 files changed, 8 insertions, 8 deletions
@@ -164,19 +164,17 @@ func (f *Forge) RillRepos(rillf func(*gitpb.Repo) error) map[string]*RillStats { func (f *Forge) RunOnReposNew(repos *gitpb.Repos, rillf func(*gitpb.Repo) error) *gitpb.Repos { stats := f.RunOnRepos(repos, rillf) failed := gitpb.NewRepos() - counter := 1 for s, stat := range stats { if stat.Err == nil { continue } - counter += 1 found := f.Repos.FindByFullPath(s) if found == nil { log.Info("found", found, "'"+s+"'") panic("wrong namespace logic. couldn't find repo from stats") } newr := failed.Clone(found) - newr.State = fmt.Sprintf("%v (%d)", stat.Err, counter) + newr.State = fmt.Sprintf("%v", stat.Err) } return failed @@ -195,7 +193,7 @@ func (f *Forge) RunOnReposNewDumb(repos *gitpb.Repos, rillf func(*gitpb.Repo) er continue } newr := failed.Clone(repo) - newr.State = fmt.Sprintf("%v (%d)", err, counter) + newr.State = fmt.Sprintf("%v) (%d)", err, counter) counter += 1 } diff --git a/scanRepoDir.go b/scanRepoDir.go index 537acee..e8a85ef 100644 --- a/scanRepoDir.go +++ b/scanRepoDir.go @@ -40,12 +40,14 @@ func (f *Forge) checkNamespace(fullpath string) (*gitpb.Repo, error) { func (f *Forge) RescanRepos() error { gopath := env.Get("gopath") + fullpath := env.FullPath(gopath) if env.Verbose() { - log.Info("RescanRepos() running in", gopath) + log.Info("RescanRepos() running in", fullpath) } - f.scanRepoDir(gopath) - f.Save() - return errors.New("ScanReposByMode() not implemented yet") + f.scanRepoDir(fullpath) + err := f.Save() + // return errors.New("ScanReposByMode() not implemented yet") + return err } // scans for .git/ directories |
