check for serious problem of devel < master
This commit is contained in:
parent
b4cb43178b
commit
f72756b089
|
@ -260,7 +260,6 @@ func doCheckoutShared() error {
|
|||
if err := makeUserBranches(); err != nil {
|
||||
return err
|
||||
}
|
||||
return nil
|
||||
}
|
||||
// this uses rill and is super fast
|
||||
doAllCheckoutUser()
|
||||
|
|
|
@ -7,7 +7,6 @@ import (
|
|||
"fmt"
|
||||
"path/filepath"
|
||||
"slices"
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
"go.wit.com/lib/gui/shell"
|
||||
|
@ -231,7 +230,7 @@ func countDiffObjects(repo *gitpb.Repo, branch1, branch2 string) int {
|
|||
if err != nil {
|
||||
return -1
|
||||
}
|
||||
log.Info("countDiffObjects()", cmd, len(r.Stdout), strings.Join(r.Stdout, " "))
|
||||
// log.Info("countDiffObjects()", cmd, len(r.Stdout), strings.Join(r.Stdout, " "))
|
||||
return len(r.Stdout)
|
||||
}
|
||||
|
||||
|
|
|
@ -216,21 +216,40 @@ func (r *repoWindow) repoMenu() *gui.Node {
|
|||
me.forge.ConfigSave()
|
||||
})
|
||||
box2.NewButton("update", func() {
|
||||
count := 0
|
||||
r.Disable()
|
||||
defer r.Enable()
|
||||
loop := r.View.ReposSortByName()
|
||||
for loop.Scan() {
|
||||
// var repo *repolist.RepoRow
|
||||
view := loop.Repo()
|
||||
log.Info("doing Update() on", view.GetGoPath())
|
||||
view.Update()
|
||||
view.Hide()
|
||||
view.Show()
|
||||
count += 1
|
||||
if count > 3 {
|
||||
// return
|
||||
if view.Hidden() {
|
||||
continue
|
||||
}
|
||||
repo := view.GetPb()
|
||||
// log.Info("check master vs devel here on", repo.GetGoPath())
|
||||
if repo.GetDevelVersion() == repo.GetMasterVersion() {
|
||||
continue
|
||||
}
|
||||
b1 := countDiffObjects(repo, repo.GetMasterBranchName(), repo.GetDevelBranchName())
|
||||
if b1 == 0 {
|
||||
// log.Info("master vs devel count is normal b1 == 0", b1)
|
||||
} else {
|
||||
// log.Info("master vs devel count b1 != 0", b1)
|
||||
log.Info("SERIOUS ERROR. DEVEL BRANCH NEEDS MERGE FROM MASTER b1 ==", b1, repo.GetGoPath())
|
||||
}
|
||||
/*
|
||||
// THIS IS TERRIBLE. STOP DEVELOPING AND FIX THIS IF THIS HAPPENS
|
||||
cmd := repo.ConstructGitDiffLog(repo.GetMasterBranchName(), repo.GetDevelBranchName())
|
||||
if _, err := repo.RunVerbose(cmd); err != nil {
|
||||
log.Info("failed", err)
|
||||
}
|
||||
*/
|
||||
/* this is normal
|
||||
cmd := repo.ConstructGitDiffLog(repo.GetDevelBranchName(), repo.GetMasterBranchName())
|
||||
if _, err := repo.RunVerbose(cmd); err != nil {
|
||||
log.Info("failed", err)
|
||||
}
|
||||
*/
|
||||
}
|
||||
})
|
||||
return box2
|
||||
|
|
Loading…
Reference in New Issue