diff options
Diffstat (limited to 'list.go')
| -rw-r--r-- | list.go | 46 |
1 files changed, 43 insertions, 3 deletions
@@ -15,12 +15,52 @@ func list() { os.Exit(0) } + if argv.Private { + repos := me.forge.Repos.SortByGoPath() + for repos.Scan() { + repo := repos.Next() + if me.forge.IsPrivate(repo.GoPath) { + verifyPrint(repo) + } + } + configs := me.forge.Config.SortByGoPath() + for configs.Scan() { + thing := configs.Next() + if thing.Directory { + continue + } + if thing.Private { + found := me.forge.Repos.FindByGoPath(thing.GoPath) + if found == nil { + log.Info("have not downloaded private:", thing.GoPath) + } else { + log.Info("already downloaded private:", thing.GoPath) + } + } + } + os.Exit(0) + } + if argv.List { + var configsave bool repos := me.forge.Repos.SortByGoPath() for repos.Scan() { repo := repos.Next() + if me.forge.IsReadOnly(repo) && !argv.ReadOnly { + if repo.ReadOnly { + continue + } + log.Info("todo: ConfigSave() readonly flag on repo is wrong", repo.GoPath) + repo.ReadOnly = true + configsave = true + continue + } verifyPrint(repo) } + if configsave { + log.Info("should ConfigSave here") + me.forge.Repos.ConfigSave() + } os.Exit(0) } @@ -59,9 +99,9 @@ func verifyPrint(repo *gitpb.Repo) { return } start := fmt.Sprintf("%-40s %-8s %-20s %-20s %-20s", s["gopath"], s["rtype"], s["cver"], s["mver"], s["cver"]) - if s["url"] != "" { - end += "(" + s["url"] + ") " - } + //if s["url"] != "" { + // end += "(" + s["url"] + ") " + //} if repo.ReadOnly { end += "(readonly) " } |
