more attempts at merge
This commit is contained in:
parent
007bf0df9c
commit
7d4bb336b3
39
doGui.go
39
doGui.go
|
@ -245,6 +245,30 @@ func drawWindow(win *gadgets.BasicWindow) {
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func findMergeToDevel() {
|
||||||
|
me.found = new(gitpb.Repos)
|
||||||
|
|
||||||
|
all := me.forge.Repos.SortByFullPath()
|
||||||
|
for all.Scan() {
|
||||||
|
repo := all.Next()
|
||||||
|
|
||||||
|
// this sees if user has patches for devel. If it does, add it to me.found
|
||||||
|
if repo.CountDiffObjects(repo.GetUserBranchName(), repo.GetDevelBranchName()) > 0 {
|
||||||
|
me.found.AppendByGoPath(repo)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
now := time.Now()
|
||||||
|
if me.found.Len() == 0 {
|
||||||
|
log.Info("nothing to merge with devel")
|
||||||
|
return
|
||||||
|
}
|
||||||
|
me.forge.PrintHumanTable(me.found)
|
||||||
|
|
||||||
|
// check for merges from devel
|
||||||
|
total, count, nope, _ := IsEverythingOnDevel()
|
||||||
|
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)))
|
||||||
|
|
||||||
|
}
|
||||||
func findMergeToMaster() {
|
func findMergeToMaster() {
|
||||||
me.found = new(gitpb.Repos)
|
me.found = new(gitpb.Repos)
|
||||||
|
|
||||||
|
@ -273,7 +297,7 @@ func findMergeToMaster() {
|
||||||
}
|
}
|
||||||
|
|
||||||
// this sees if devel has patches for master. If it does, add it to me.found
|
// this sees if devel has patches for master. If it does, add it to me.found
|
||||||
if repo.CountDiffObjects(repo.GetMasterBranchName(), repo.GetDevelBranchName()) > 0 {
|
if repo.CountDiffObjects(repo.GetDevelBranchName(), repo.GetMasterBranchName()) > 0 {
|
||||||
me.found.AppendByGoPath(repo)
|
me.found.AppendByGoPath(repo)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -331,18 +355,7 @@ func mergeDevelToMaster(doit bool) {
|
||||||
}
|
}
|
||||||
|
|
||||||
func mergeUserToDevel(doit bool) {
|
func mergeUserToDevel(doit bool) {
|
||||||
me.found = new(gitpb.Repos)
|
findMergeToDevel()
|
||||||
findReposWithPatches()
|
|
||||||
if me.found.Len() == 0 {
|
|
||||||
log.Info("you currently have no patches in your user branches")
|
|
||||||
return
|
|
||||||
}
|
|
||||||
me.forge.PrintHumanTable(me.found)
|
|
||||||
|
|
||||||
now := time.Now()
|
|
||||||
// check for devel branches
|
|
||||||
total, count, nope, _ := IsEverythingOnDevel()
|
|
||||||
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)))
|
|
||||||
|
|
||||||
if !doit {
|
if !doit {
|
||||||
return
|
return
|
||||||
|
|
Loading…
Reference in New Issue