summaryrefslogtreecommitdiff
path: root/doCommon.go
diff options
context:
space:
mode:
Diffstat (limited to 'doCommon.go')
-rw-r--r--doCommon.go24
1 files changed, 12 insertions, 12 deletions
diff --git a/doCommon.go b/doCommon.go
index 5c37739..817bcfd 100644
--- a/doCommon.go
+++ b/doCommon.go
@@ -12,24 +12,24 @@ func doScan() {
func doGitPull() {
allerr := me.found.RillGitPull(40, 5)
- all := me.found.SortByGoPath()
+ all := me.found.SortByFullPath()
for all.Scan() {
repo := all.Next()
result := allerr[repo]
if result.Error == gitpb.ErrorGitPullOnDirty {
- log.Info("skip git pull. repo is dirty", repo.GoPath)
+ log.Info("skip git pull. repo is dirty", repo.GetGoPath())
continue
}
if result.Error == gitpb.ErrorGitPullOnLocal {
- log.Info("skip git pull. local branch ", repo.GoPath)
+ log.Info("skip git pull. local branch ", repo.GetGoPath())
continue
}
if result.Exit == 0 {
continue
}
- log.Info("git pull error:", repo.GoPath, result.Error)
- log.Info("git pull error:", repo.GoPath, result.Stdout)
+ log.Info("git pull error:", repo.GetGoPath(), result.Error)
+ log.Info("git pull error:", repo.GetGoPath(), result.Stdout)
}
}
@@ -37,18 +37,18 @@ func doGitReset() {
if !argv.DoGitReset {
return
}
- all := me.found.SortByGoPath()
+ all := me.found.SortByFullPath()
for all.Scan() {
repo := all.Next()
- if me.forge.Config.IsReadOnly(repo.GoPath) {
- // log.Info("is readonly", repo.GoPath)
+ if me.forge.Config.IsReadOnly(repo.GetGoPath()) {
+ // log.Info("is readonly", repo.GetGoPath())
if repo.CheckDirty() {
- log.Info("is readonly and dirty", repo.GoPath)
+ log.Info("is readonly and dirty", repo.GetGoPath())
cmd := []string{"git", "reset", "--hard"}
repo.RunRealtime(cmd)
}
} else {
- // log.Info("is not readonly", repo.GoPath)
+ // log.Info("is not readonly", repo.GetGoPath())
}
}
}
@@ -57,14 +57,14 @@ func checkoutBranches(repo *gitpb.Repo) error {
dname := repo.GetDevelBranchName()
if dname == "" {
if err := me.forge.MakeDevelBranch(repo); err != nil {
- log.Info("verify() no devel branch name", repo.GoPath)
+ log.Info("verify() no devel branch name", repo.GetGoPath())
return err
}
configSave = true
}
if repo.GetUserBranchName() == "" {
if err := me.forge.MakeUserBranch(repo); err != nil {
- log.Info("verify() no devel branch name", repo.GoPath)
+ log.Info("verify() no devel branch name", repo.GetGoPath())
return err
}
configSave = true