summaryrefslogtreecommitdiff
path: root/windowMain.go
diff options
context:
space:
mode:
authorJeff Carr <[email protected]>2025-01-05 06:14:06 -0600
committerJeff Carr <[email protected]>2025-01-05 06:14:06 -0600
commit6ded56a13ac7f0e419023e52adae8bd989fe4f94 (patch)
tree963bfa6e0ba5b6dbc2fc733c6eaaf0f8ef5566ae /windowMain.go
parent2c7e15ccfacd065029b5de4360288d72815bc907 (diff)
more overall checking for branch changes
Diffstat (limited to 'windowMain.go')
-rw-r--r--windowMain.go30
1 files changed, 25 insertions, 5 deletions
diff --git a/windowMain.go b/windowMain.go
index eb55656..c17f766 100644
--- a/windowMain.go
+++ b/windowMain.go
@@ -84,12 +84,32 @@ func globalBuildOptions(vbox *gui.Node) {
me.setBranchB = grid.NewButton("set current branch to:", func() {
targetName := me.newBranch.String()
log.Warn("setting all branches to", targetName)
- loop := me.repos.View.ReposSortByName()
- for loop.Scan() {
- repo := loop.Repo()
- repo.Status.CheckoutBranch(targetName)
- repo.Scan()
+ if targetName == "devel" {
+ if !doAllCheckoutDevel() {
+ okExit("")
+ }
+ return
}
+ if targetName == "master" {
+ log.Info("Don't know how to set", targetName, "yet")
+ return
+ }
+ // just assume user
+ if targetName == "jcarr" {
+ if doAllCheckoutUser() {
+ return
+ }
+ log.Info("switching to user branches failed")
+ return
+ }
+ /*
+ loop := me.repos.View.ReposSortByName()
+ for loop.Scan() {
+ repo := loop.Repo()
+ repo.Status.CheckoutBranch(targetName)
+ repo.Scan()
+ }
+ */
})
me.newBranch = grid.NewCombobox()
me.newBranch.AddText("master")