summaryrefslogtreecommitdiff
path: root/doGui.go
diff options
context:
space:
mode:
Diffstat (limited to 'doGui.go')
-rw-r--r--doGui.go19
1 files changed, 10 insertions, 9 deletions
diff --git a/doGui.go b/doGui.go
index 382297d..d380f6c 100644
--- a/doGui.go
+++ b/doGui.go
@@ -360,7 +360,7 @@ func findMergeToDevel() *gitpb.Repos {
for repo := range me.forge.Repos.IterByFullPath() {
- // this sees if user has patches for devel. If it does, add it to me.found
+ // this sees if user has patches for devel. If it does, add it to found
if repo.CountDiffObjects(repo.GetUserBranchName(), repo.GetDevelBranchName()) > 0 {
found.AppendByGoPath(repo)
}
@@ -377,8 +377,8 @@ func findMergeToDevel() *gitpb.Repos {
log.Printf("devel branch check. %d total repos. (%d ok) (%d not on devel branch) (%s)\n", total, count, nope, shell.FormatDuration(time.Since(now)))
return found
}
-func findMergeToMaster() {
- me.found = new(gitpb.Repos)
+func findMergeToMaster() *gitpb.Repos {
+ found := new(gitpb.Repos)
all := me.forge.Repos.SortByFullPath()
for all.Scan() {
@@ -407,30 +407,31 @@ func findMergeToMaster() {
// this sees if devel has patches for master. If it does, add it to me.found
if repo.CountDiffObjects(repo.GetDevelBranchName(), repo.GetMasterBranchName()) > 0 {
- me.found.AppendByGoPath(repo)
+ found.AppendByGoPath(repo)
}
}
now := time.Now()
- if me.found.Len() == 0 {
+ if found.Len() == 0 {
log.Info("nothing to merge with master")
- return
+ return found
}
- me.forge.PrintHumanTable(me.found)
+ me.forge.PrintHumanTable(found)
// check for merges from devel
total, count, nope, _ := IsEverythingOnMaster()
log.Printf("Master branch check. %d total repos. (%d ok) (%d not on master branch) (%s)\n", total, count, nope, shell.FormatDuration(time.Since(now)))
+ return found
}
func mergeDevelToMaster(doit bool) {
- findMergeToMaster()
+ found := findMergeToMaster()
if !doit {
return
}
- all := me.found.SortByFullPath()
+ all := found.SortByFullPath()
for all.Scan() {
repo := all.Next()
log.Info("repo:", repo.GetGoPath())