summaryrefslogtreecommitdiff
path: root/handleCmdLine.go
diff options
context:
space:
mode:
Diffstat (limited to 'handleCmdLine.go')
-rw-r--r--handleCmdLine.go21
1 files changed, 11 insertions, 10 deletions
diff --git a/handleCmdLine.go b/handleCmdLine.go
index e49be8d..49c5ef7 100644
--- a/handleCmdLine.go
+++ b/handleCmdLine.go
@@ -3,6 +3,7 @@ package main
import (
"os"
+ "go.wit.com/lib/gui/repolist"
"go.wit.com/log"
)
@@ -18,9 +19,9 @@ func argGitPull() bool {
me.autotypistWindow.Hide()
cmd := []string{"git", "pull"}
var failed int = 0
- for _, repo := range me.allrepos {
+ for _, repo := range repolist.AllRepos() {
log.Info("Running:", repo.String(), cmd)
- err, output := repo.status.RunCmd(cmd)
+ err, output := repo.RunCmd(cmd)
if err == nil {
log.Info(output)
} else {
@@ -38,15 +39,15 @@ func argCheckoutDevel() bool {
log.Info("running git checkout devel everwhere")
me.autotypistWindow.Hide()
var failed int = 0
- for _, repo := range me.allrepos {
- if repo.status.CheckDirty() {
+ for _, repo := range repolist.AllRepos() {
+ if repo.CheckDirty() {
log.Info("skipping dirty repo", repo.String())
continue
}
- branch := repo.status.GetDevelBranchName()
+ branch := repo.GetDevelBranchName()
cmd := []string{"git", "checkout", branch}
log.Info("Running:", cmd, "in", repo.String())
- err, output := repo.status.RunCmd(cmd)
+ err, output := repo.RunCmd(cmd)
if err == nil {
log.Info("git checkout worked", output)
} else {
@@ -65,15 +66,15 @@ func argCheckoutUser() bool {
log.Info("running git checkout devel everwhere")
me.autotypistWindow.Hide()
var failed int = 0
- for _, repo := range me.allrepos {
- if repo.status.CheckDirty() {
+ for _, repo := range repolist.AllRepos() {
+ if repo.CheckDirty() {
log.Info("skipping dirty repo", repo.String())
continue
}
- branch := repo.status.GetUserBranchName()
+ branch := repo.GetUserBranchName()
cmd := []string{"git", "checkout", branch}
log.Info("Running:", cmd, "in", repo.String())
- err, output := repo.status.RunCmd(cmd)
+ err, output := repo.RunCmd(cmd)
if err == nil {
log.Info("git checkout worked", output)
} else {