diff options
| author | Jeff Carr <[email protected]> | 2024-02-14 01:01:00 -0600 |
|---|---|---|
| committer | Jeff Carr <[email protected]> | 2024-02-14 01:01:00 -0600 |
| commit | d7e391fed0843aa56ead128737c2770704846bac (patch) | |
| tree | 8a6092d8ab384272d1a9707536d807ed4e21d2f3 | |
| parent | a223e9f1c3f35edebf25e977fe897c707f6456da (diff) | |
force reverted a branchv0.20.4
Signed-off-by: Jeff Carr <[email protected]>
| -rw-r--r-- | branchesBox.go | 29 | ||||
| -rw-r--r-- | structs.go | 3 |
2 files changed, 31 insertions, 1 deletions
diff --git a/branchesBox.go b/branchesBox.go index 9aa78b9..d24af80 100644 --- a/branchesBox.go +++ b/branchesBox.go @@ -24,8 +24,30 @@ func (rs *RepoStatus) makeBranchesBox() { rs.currentVersion = gadgets.NewOneLiner(newgrid, "current version") newgrid.NextRow() - rs.showBranchesButton = newgrid.NewButton("getBranches()", func() { + rs.switchBranchB = newgrid.NewButton("Switch Branch", func() { + bname := rs.targetBranch.String() + log.Info("Should switch to branch", bname, "here") + + var all [][]string + all = append(all, []string{"git", "checkout", bname}) + if rs.DoAll(all) { + log.Info("branch switched to", bname) + } else { + log.Info("branch switched to", bname, "failed") + } + rs.UpdateCurrent() + }) + + rs.targetBranch = newgrid.NewDropdown() + // rs.targetBranch.AddText("master") + newgrid.NextRow() + + rs.showBranchesButton = newgrid.NewButton("scan branches()", func() { all := rs.getBranches() + for i, s := range all { + log.Log(WARN, "found branch", i, s) + rs.targetBranch.AddText(s) + } i := len(all) log.Log(WARN, "branch count =", i) }) @@ -38,4 +60,9 @@ func (rs *RepoStatus) makeBranchesBox() { log.Log(WARN, "Branches are not perfect") } }) + newgrid.NextRow() + + newgrid.NewButton("Revert master to devel", func() { + rs.RevertMasterToDevel() + }) } @@ -72,4 +72,7 @@ type RepoStatus struct { gitConfig *GitConfig goConfig GoConfig + + switchBranchB *gui.Node + targetBranch *gui.Node } |
