summaryrefslogtreecommitdiff
path: root/doClean.go
diff options
context:
space:
mode:
Diffstat (limited to 'doClean.go')
-rw-r--r--doClean.go26
1 files changed, 13 insertions, 13 deletions
diff --git a/doClean.go b/doClean.go
index 3cdfb89..8939d56 100644
--- a/doClean.go
+++ b/doClean.go
@@ -40,7 +40,7 @@ func doResetRepo(repo *gitpb.Repo) error {
}
}
} else {
- log.Info(repo.GetGoPath(), err)
+ log.Info(repo.Namespace, err)
}
}
@@ -148,7 +148,7 @@ func doRepoCleanDevel(repo *gitpb.Repo) error {
return log.Errorf("%s is dirty:", repo.GetFullPath())
}
if err := justDeleteTheDevelBranchAlready(repo); err != nil {
- log.Info("justDeleteTheDevel() err", repo.GetGoPath(), err)
+ log.Info("justDeleteTheDevel() err", repo.Namespace, err)
if argv.Clean.Fix != nil {
bname := repo.GetDevelBranchName()
checkPatchIds(repo, repo.GetDevelBranchName(), repo.GetMasterBranchName())
@@ -214,7 +214,7 @@ func doRepoCleanUser(repo *gitpb.Repo) error {
if b1 == 0 {
// every user branch exists in devel. delete user branch
cmd := []string{"git", "branch", "-D", bruser}
- // log.Info("USER IS IN DEVEL", repo.GetGoPath(), cmd)
+ // log.Info("USER IS IN DEVEL", repo.Namespace, cmd)
_, err := repo.RunVerboseOnError(cmd)
return err
}
@@ -232,7 +232,7 @@ func doRepoCleanUser(repo *gitpb.Repo) error {
}
if b1 == 0 {
cmd := []string{"git", "branch", "-D", bruser}
- // log.Info("USER IS IN DEVEL", repo.GetGoPath(), cmd)
+ // log.Info("USER IS IN DEVEL", repo.Namespace, cmd)
_, err := repo.RunVerboseOnError(cmd)
return err
}
@@ -249,7 +249,7 @@ func justDeleteTheDevelBranchAlready(repo *gitpb.Repo) error {
branch := repo.GetDevelBranchName()
remote := filepath.Join("origin", branch)
- if me.forge.Config.IsReadOnly(repo.GetGoPath()) {
+ if me.forge.Config.IsReadOnly(repo.Namespace) {
if repo.IsDevelRemote() {
// just make sure the remote & local branches are the same
return repo.DeleteLocalDevelBranch()
@@ -265,12 +265,12 @@ func justDeleteTheDevelBranchAlready(repo *gitpb.Repo) error {
}
if b1 == 0 {
cmd := []string{"git", "branch", "-D", repo.GetDevelBranchName()}
- // log.Info("DEVEL IS IN REMOTE", repo.GetGoPath(), cmd)
+ // log.Info("DEVEL IS IN REMOTE", repo.Namespace, cmd)
_, err := repo.RunVerboseOnError(cmd)
return err
}
cmd := []string{"git", "push"}
- log.Info("DEVEL LOCAL NEEDS GIT PUSH TO REMOTE", repo.GetGoPath(), cmd)
+ log.Info("DEVEL LOCAL NEEDS GIT PUSH TO REMOTE", repo.Namespace, cmd)
err = repo.RunVerbose(cmd)
return err
}
@@ -284,12 +284,12 @@ func justDeleteTheDevelBranchAlready(repo *gitpb.Repo) error {
}
if b1 == 0 {
cmd := []string{"git", "branch", "-D", repo.GetDevelBranchName()}
- // log.Info("DEVEL IS IN REMOTE", repo.GetGoPath(), cmd)
+ // log.Info("DEVEL IS IN REMOTE", repo.Namespace, cmd)
_, err := repo.RunVerboseOnError(cmd)
return err
}
cmd := []string{"git", "merge something somehow"}
- log.Info("devel local, remote and master branches are wrong", repo.GetGoPath(), cmd, b1)
+ log.Info("devel local, remote and master branches are wrong", repo.Namespace, cmd, b1)
// _, err := repo.RunVerbose(cmd)
return nil
}
@@ -298,15 +298,15 @@ func doGitReset() {
all := me.forge.Repos.SortByFullPath()
for all.Scan() {
repo := all.Next()
- if me.forge.Config.IsReadOnly(repo.GetGoPath()) {
- // log.Info("is readonly", repo.GetGoPath())
+ if me.forge.Config.IsReadOnly(repo.Namespace) {
+ // log.Info("is readonly", repo.Namespace)
if repo.CheckDirty() {
- log.Info("is readonly and dirty", repo.GetGoPath())
+ log.Info("is readonly and dirty", repo.Namespace)
cmd := []string{"git", "reset", "--hard"}
repo.RunRealtime(cmd)
}
} else {
- // log.Info("is not readonly", repo.GetGoPath())
+ // log.Info("is not readonly", repo.Namespace)
}
}
}