diff options
Diffstat (limited to 'doGui.go')
| -rw-r--r-- | doGui.go | 31 |
1 files changed, 3 insertions, 28 deletions
@@ -36,9 +36,7 @@ func debug() { if me.repoWritableB != nil { found := gitpb.NewRepos() - all := me.forge.Repos.SortByFullPath() - for all.Scan() { - repo := all.Next() + for repo := range me.forge.Repos.IterByFullPath() { if me.forge.Config.IsReadOnly(repo.GetGoPath()) { continue } @@ -291,28 +289,6 @@ func forgeSwitchMode(newMode forgepb.ForgeMode) { me.forge.Config.ConfigSave() } -/* -func doDisableUserW() { - me.argvCheckoutUser = false - - var count int - all := me.forge.Repos.SortByFullPath() - for all.Scan() { - repo := all.Next() - if !repo.IsLocalBranch(repo.GetUserBranchName()) { - // log.Info("repo doesn't have user branch", repo.GetGoPath()) - continue - } - count += 1 - } - - if count > 0 { - s := fmt.Sprintf("git delete %d user branches", count) - return - } -} -*/ - // this is the magic that generates a window directly from the protocol buffer func makeStandardReposGrid(pb *gitpb.Repos) *gitpb.ReposTable { t := pb.NewTable("testDirty") @@ -356,9 +332,7 @@ func makeStandardReposWindow(title string, pb *gitpb.Repos) (*gitpb.ReposTable, func findMergeToDevel() *gitpb.Repos { found := gitpb.NewRepos() - all := me.forge.Repos.SortByFullPath() - for all.Scan() { - repo := all.Next() + for repo := range me.forge.Repos.IterByFullPath() { // this sees if user has patches for devel. If it does, add it to me.found if repo.CountDiffObjects(repo.GetUserBranchName(), repo.GetDevelBranchName()) > 0 { @@ -383,6 +357,7 @@ func findMergeToMaster() { all := me.forge.Repos.SortByFullPath() for all.Scan() { repo := all.Next() + if me.forge.Config.IsReadOnly(repo.GetGoPath()) { continue } |
