diff --git a/addRepo.go b/addRepo.go index a44dffa..03d8135 100644 --- a/addRepo.go +++ b/addRepo.go @@ -103,7 +103,6 @@ func addRepo(grid *gui.Node, path string, master string, devel string, user stri // commit was not done, restore diff newRepo.status.RunCmd([]string{"git", "restore", "--staged", "."}) } else { - newRepo.status.UpdateNew() newRepo.newScan() } me.reposwin.Enable() diff --git a/args.go b/args.go index 84080c2..b2a8952 100644 --- a/args.go +++ b/args.go @@ -9,6 +9,7 @@ package main import ( "go.wit.com/dev/alexflint/arg" "go.wit.com/lib/debugger" + "go.wit.com/lib/gui/logsettings" "go.wit.com/log" ) @@ -30,4 +31,12 @@ func init() { debugger.DebugWindow() }() } + if debugger.ArgLogger() { + log.Info("cmd line --loggger == true") + go func() { + log.Sleep(4) + logsettings.LogWindow() + logsettings.LogWindow() + }() + } } diff --git a/globalBuildOptions.go b/globalBuildOptions.go index 20b3eb4..2ded629 100644 --- a/globalBuildOptions.go +++ b/globalBuildOptions.go @@ -83,7 +83,6 @@ func globalBuildOptions(vbox *gui.Node) { log.Warn("setting all branches to", targetName) for _, repo := range me.allrepos { repo.status.CheckoutBranch(targetName) - repo.status.UpdateNew() repo.newScan() } }) diff --git a/globalDisplayOptions.go b/globalDisplayOptions.go index 877ff92..b1691fc 100644 --- a/globalDisplayOptions.go +++ b/globalDisplayOptions.go @@ -10,6 +10,10 @@ import ( func globalDisplaySetRepoState() { for _, repo := range me.allrepos { + if repo.status.IsDirty() { + repo.Show() + continue + } if me.autoHideReadOnly.Checked() { if repo.status.ReadOnly() { repo.Hide() diff --git a/main.go b/main.go index 34f774a..7677384 100644 --- a/main.go +++ b/main.go @@ -45,7 +45,6 @@ func main() { handleCmdLine() for _, repo := range me.allrepos { - repo.status.UpdateNew() repo.newScan() } me.Enable() diff --git a/repolist.go b/repolist.go index a3c46e9..5d198c7 100644 --- a/repolist.go +++ b/repolist.go @@ -214,14 +214,13 @@ func mergeAllDevelToMain() bool { continue } log.Info("found", repo.String(), repo.dirtyLabel.String()) - repo.status.UpdateNew() + repo.newScan() if repo.status.RunDevelMergeB() { log.Warn("THINGS SEEM OK fullAutomation() returned true.") } else { log.Warn("THINGS FAILED fullAutomation() returned false") return false } - repo.status.UpdateNew() repo.newScan() } log.Warn("EVERYTHING WORKED") @@ -244,14 +243,13 @@ func mergeAllUserToDevel() bool { continue } log.Info("found", repo.String(), repo.dirtyLabel.String()) - repo.status.UpdateNew() + repo.newScan() if repo.status.RunDevelMergeB() { log.Warn("THINGS SEEM OK fullAutomation() returned true.") } else { log.Warn("THINGS FAILED fullAutomation() returned false") return false } - repo.status.UpdateNew() repo.newScan() } log.Warn("EVERYTHING WORKED") diff --git a/scan.go b/scan.go index 0e05cc5..6b6b6b8 100644 --- a/scan.go +++ b/scan.go @@ -13,7 +13,6 @@ func scanRepositories() { log.Info("Scanned", me.summary.totalOL.String(), "repositories. todo: count/show changes") t := timeFunction(func() { for _, repo := range me.allrepos { - repo.status.UpdateNew() repo.newScan() } }) @@ -26,15 +25,11 @@ func (r *repo) newScan() bool { log.Warn("repo.status = nil. not initialized for some reason") return false } - // r.scan() - /* - if repostatus.VerifyLocalGoRepo(r.getPath()) { - log.Verbose("repo actually exists", r.getPath()) - } else { - log.Warn("repo does not exist", r.getPath()) - return false - } - */ + + // first run the repostatus update + r.status.UpdateNew() + + // now read those values and display them in our table mname := r.status.GetMasterBranchName() mver := r.status.GetMasterVersion() mver = mver + " (" + mname + ")" @@ -63,7 +58,9 @@ func (r *repo) newScan() bool { if c, ok := r.status.Changed(); ok { c := strings.TrimSpace(c) - log.Warn("repo", r.status.Path(), "changed", c) + for _, line := range strings.Split(c, "\n") { + log.Info(r.status.Path(), line) + } } status := r.status.GetStatus() r.dirtyLabel.SetLabel(status) diff --git a/structs.go b/structs.go index 1f24534..d6fd2d1 100644 --- a/structs.go +++ b/structs.go @@ -84,7 +84,7 @@ type autoType struct { // these hold the branches that the user can switch all // the repositories to them - newBranch *gui.Node + newBranch *gui.Node setBranchB *gui.Node }