summaryrefslogtreecommitdiff
path: root/globalBuildOptions.go
diff options
context:
space:
mode:
Diffstat (limited to 'globalBuildOptions.go')
-rw-r--r--globalBuildOptions.go23
1 files changed, 17 insertions, 6 deletions
diff --git a/globalBuildOptions.go b/globalBuildOptions.go
index e9aa180..0641d08 100644
--- a/globalBuildOptions.go
+++ b/globalBuildOptions.go
@@ -84,28 +84,39 @@ func globalBuildOptions(box *gui.Node) {
me.userBranch = gadgets.NewBasicCombobox(grid, "default user branch")
me.userBranch.AddText(usr.Username)
- grid.NewLabel("<nil>")
- grid.NewButton("set working branches", func() {
- log.Warn("set working branches here")
- })
+ var newBranch *gui.Node
+ var setBranchB *gui.Node
+
// gadgets.OneLiner(grid, "default user branch")
// select the branch you want to test, build and develop against
// this lets you select your user branch, but, when you are happy
// you can merge everything into the devel branch and make sure it actually
// works. Then, when that is good, merge and version everything in master
- var newBranch *gui.Node
- grid.NewButton("set current branch to:", func() {
+ setBranchB = grid.NewButton("set current branch to:", func() {
log.Warn("set current branch to:", newBranch.String())
/*
me.toMoveToBranch = guiBranch.String()
setCurrentBranch.SetLabel("set all branches to " + me.toMoveToBranch)
me.mainBranch.Disable()
*/
+ for _, repo := range me.allrepos {
+ if repo.status.CheckoutMaster() {
+ log.Warn("set master branch worked", repo.String)
+ repo.newScan()
+ } else {
+ log.Warn("set master branch failed", repo.String)
+ repo.newScan()
+ }
+ // return
+ }
})
newBranch = grid.NewCombobox()
newBranch.AddText("master")
newBranch.AddText("devel")
newBranch.AddText(usr.Username)
newBranch.SetText(usr.Username)
+ newBranch.Custom = func () {
+ setBranchB.SetLabel("set current branches to " + newBranch.String())
+ }
}