summaryrefslogtreecommitdiff
path: root/windowMain.go
diff options
context:
space:
mode:
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")