fix hidden tracking
Signed-off-by: Jeff Carr <jcarr@wit.com>
This commit is contained in:
parent
4f2f042668
commit
2a46bd2c9e
|
@ -50,11 +50,19 @@ func globalDisplayOptions(box *gui.Node) {
|
||||||
group1 := vbox.NewGroup("Global Display Options")
|
group1 := vbox.NewGroup("Global Display Options")
|
||||||
|
|
||||||
group1.NewButton("Show Repository Window", func() {
|
group1.NewButton("Show Repository Window", func() {
|
||||||
|
if reposwin.Hidden() {
|
||||||
|
log.Info("showing reposwin")
|
||||||
showHideRepos()
|
showHideRepos()
|
||||||
scanForReady()
|
scanForReady()
|
||||||
scanForReady()
|
scanForReady()
|
||||||
reposwin.Toggle()
|
reposwin.Show()
|
||||||
findNextDirty("")
|
findNextDirty("")
|
||||||
|
// double check the found next repo
|
||||||
|
fullDoubleCheckFix()
|
||||||
|
} else {
|
||||||
|
log.Info("hiding reposwin")
|
||||||
|
reposwin.Hide()
|
||||||
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
me.autoHideReadOnly = group1.NewCheckbox("Hide read-only repos").SetChecked(true)
|
me.autoHideReadOnly = group1.NewCheckbox("Hide read-only repos").SetChecked(true)
|
||||||
|
|
|
@ -184,14 +184,13 @@ func createReleaseBox(box *gui.Node) {
|
||||||
release.whitelist[release.current.String()] = release.current
|
release.whitelist[release.current.String()] = release.current
|
||||||
})
|
})
|
||||||
|
|
||||||
release.checkSafeB = release.grid.NewButton("CheckSafeGoSumRemake()", func() {
|
release.checkSafeB = release.grid.NewButton("fullDoubleCheckFix()", func() {
|
||||||
buttonDisable()
|
buttonDisable()
|
||||||
release.current.status.CheckSafeGoSumRemake()
|
if fullDoubleCheckFix() {
|
||||||
release.current.status.MakeRedomod()
|
log.Info("go.sum is clean")
|
||||||
if ok, _ := release.current.status.CheckGoSum(); ok {
|
|
||||||
log.Info("repo has go.sum requirements that are clean")
|
|
||||||
} else {
|
} else {
|
||||||
log.Info("repo go.sum FAILED")
|
log.Info("repo go.sum FAILED")
|
||||||
|
return
|
||||||
}
|
}
|
||||||
buttonEnable()
|
buttonEnable()
|
||||||
})
|
})
|
||||||
|
@ -236,9 +235,9 @@ func createReleaseBox(box *gui.Node) {
|
||||||
buttonEnable()
|
buttonEnable()
|
||||||
})
|
})
|
||||||
|
|
||||||
release.grid.NewButton("release(5)", func() {
|
release.grid.NewButton("release(15)", func() {
|
||||||
buttonDisable()
|
buttonDisable()
|
||||||
for n := 0; n <= 5; n++ {
|
for n := 0; n <= 15; n++ {
|
||||||
if doRelease() {
|
if doRelease() {
|
||||||
log.Info("doRelease() worked")
|
log.Info("doRelease() worked")
|
||||||
} else {
|
} else {
|
||||||
|
@ -255,6 +254,25 @@ func createReleaseBox(box *gui.Node) {
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func fullDoubleCheckFix() bool {
|
||||||
|
release.current.status.CheckSafeGoSumRemake()
|
||||||
|
release.current.status.MakeRedomod()
|
||||||
|
if ok, _ := release.current.status.CheckGoSum(); ok {
|
||||||
|
log.Info("go.sum is clean")
|
||||||
|
} else {
|
||||||
|
log.Info("repo go.sum FAILED")
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
if ok, _ := release.current.status.CheckGoSum(); ok {
|
||||||
|
log.Info("repo has go.sum requirements that are clean")
|
||||||
|
// release.current.setGoSumStatus("CLEAN")
|
||||||
|
release.status.SetValue("GOOD")
|
||||||
|
release.notes.SetValue("CheckGoSum() does not seem to lie")
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
func goodCheckGoSum() bool {
|
func goodCheckGoSum() bool {
|
||||||
tmp := release.current.String()
|
tmp := release.current.String()
|
||||||
log.Info("goodCheckGoSum() START on repo:", tmp, "STATUS =", release.current.getGoSumStatus())
|
log.Info("goodCheckGoSum() START on repo:", tmp, "STATUS =", release.current.getGoSumStatus())
|
||||||
|
|
|
@ -75,13 +75,11 @@ func (r *repo) Show() {
|
||||||
func repoworld() {
|
func repoworld() {
|
||||||
reposwin = gadgets.NewBasicWindow(me.myGui, "All git repositories in ~/go/src/")
|
reposwin = gadgets.NewBasicWindow(me.myGui, "All git repositories in ~/go/src/")
|
||||||
reposwin.Make()
|
reposwin.Make()
|
||||||
|
|
||||||
reposbox = reposwin.Box().NewBox("bw vbox", false)
|
|
||||||
reposwin.Draw()
|
|
||||||
reposwin.Custom = func() {
|
reposwin.Custom = func() {
|
||||||
log.Warn("GOT HERE: main() gadgets.NewBasicWindow() close")
|
log.Warn("GOT HERE: main() gadgets.NewBasicWindow() close")
|
||||||
log.Warn("Should I do something special here?")
|
log.Warn("Should I do something special here?")
|
||||||
}
|
}
|
||||||
|
reposbox = reposwin.Box().NewBox("bw vbox", false)
|
||||||
|
|
||||||
reposgroup = reposbox.NewGroup("go repositories (read from ~/.config/myrepolist)")
|
reposgroup = reposbox.NewGroup("go repositories (read from ~/.config/myrepolist)")
|
||||||
reposgrid = reposgroup.NewGrid("test", 7, 1)
|
reposgrid = reposgroup.NewGrid("test", 7, 1)
|
||||||
|
@ -120,8 +118,6 @@ func repoworld() {
|
||||||
log.Info("addRepo()", i, tmp)
|
log.Info("addRepo()", i, tmp)
|
||||||
addRepo(reposgrid, tmp, "master", "master", "master")
|
addRepo(reposgrid, tmp, "master", "master", "master")
|
||||||
}
|
}
|
||||||
|
|
||||||
reposwin.Toggle()
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func addRepo(grid *gui.Node, path string, master string, devel string, user string) {
|
func addRepo(grid *gui.Node, path string, master string, devel string, user string) {
|
||||||
|
|
Loading…
Reference in New Issue