trying to create branches

This commit is contained in:
Jeff Carr 2024-02-16 20:37:23 -06:00
parent c253a30fb6
commit 63a79121e3
8 changed files with 24 additions and 19 deletions

View File

@ -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()

View File

@ -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()
}()
}
}

View File

@ -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()
}
})

View File

@ -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()

View File

@ -45,7 +45,6 @@ func main() {
handleCmdLine()
for _, repo := range me.allrepos {
repo.status.UpdateNew()
repo.newScan()
}
me.Enable()

View File

@ -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")

19
scan.go
View File

@ -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)