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 {
|
if err := makeUserBranches(); err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
return nil
|
|
||||||
}
|
}
|
||||||
// this uses rill and is super fast
|
// this uses rill and is super fast
|
||||||
doAllCheckoutUser()
|
doAllCheckoutUser()
|
||||||
|
|
|
@ -7,7 +7,6 @@ import (
|
||||||
"fmt"
|
"fmt"
|
||||||
"path/filepath"
|
"path/filepath"
|
||||||
"slices"
|
"slices"
|
||||||
"strings"
|
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"go.wit.com/lib/gui/shell"
|
"go.wit.com/lib/gui/shell"
|
||||||
|
@ -231,7 +230,7 @@ func countDiffObjects(repo *gitpb.Repo, branch1, branch2 string) int {
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return -1
|
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)
|
return len(r.Stdout)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -216,21 +216,40 @@ func (r *repoWindow) repoMenu() *gui.Node {
|
||||||
me.forge.ConfigSave()
|
me.forge.ConfigSave()
|
||||||
})
|
})
|
||||||
box2.NewButton("update", func() {
|
box2.NewButton("update", func() {
|
||||||
count := 0
|
|
||||||
r.Disable()
|
r.Disable()
|
||||||
defer r.Enable()
|
defer r.Enable()
|
||||||
loop := r.View.ReposSortByName()
|
loop := r.View.ReposSortByName()
|
||||||
for loop.Scan() {
|
for loop.Scan() {
|
||||||
// var repo *repolist.RepoRow
|
// var repo *repolist.RepoRow
|
||||||
view := loop.Repo()
|
view := loop.Repo()
|
||||||
log.Info("doing Update() on", view.GetGoPath())
|
if view.Hidden() {
|
||||||
view.Update()
|
continue
|
||||||
view.Hide()
|
|
||||||
view.Show()
|
|
||||||
count += 1
|
|
||||||
if count > 3 {
|
|
||||||
// return
|
|
||||||
}
|
}
|
||||||
|
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
|
return box2
|
||||||
|
|
Loading…
Reference in New Issue