diff options
| author | Jeff Carr <[email protected]> | 2025-02-13 23:46:11 -0600 |
|---|---|---|
| committer | Jeff Carr <[email protected]> | 2025-02-13 23:46:11 -0600 |
| commit | 7d4bb336b3cecec23e611ef420a7052f955200ad (patch) | |
| tree | 2b8a22472551672e9e939ac355076a9eebf52a8a | |
| parent | 007bf0df9c76a4f91781b97e02ec16184416f9f8 (diff) | |
more attempts at mergev0.22.76
| -rw-r--r-- | doGui.go | 39 |
1 files changed, 26 insertions, 13 deletions
@@ -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() { 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 - if repo.CountDiffObjects(repo.GetMasterBranchName(), repo.GetDevelBranchName()) > 0 { + if repo.CountDiffObjects(repo.GetDevelBranchName(), repo.GetMasterBranchName()) > 0 { me.found.AppendByGoPath(repo) } } @@ -331,18 +355,7 @@ func mergeDevelToMaster(doit bool) { } func mergeUserToDevel(doit bool) { - me.found = new(gitpb.Repos) - 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))) + findMergeToDevel() if !doit { return |
