diff --git a/checkout.go b/checkout.go index 2b0e3f2..2180c22 100644 --- a/checkout.go +++ b/checkout.go @@ -1,7 +1,6 @@ package gitpb import ( - "fmt" "path/filepath" "go.wit.com/log" @@ -28,7 +27,7 @@ func (repo *Repo) CheckoutDevel() bool { func (repo *Repo) CheckoutUser() error { bName := repo.GetUserBranchName() // log.Info("attempting checkout user", repo.GetGoPath(), bName) - err := repo.checkoutBranchNew(bName) + err := repo.createUserBranchNew(bName) if err != nil { log.Info("attempting checkout user error", repo.GetGoPath(), bName, err) } @@ -68,7 +67,7 @@ func (repo *Repo) checkoutBranch(bName string) bool { return true } -func (repo *Repo) checkoutBranchNew(branch string) error { +func (repo *Repo) createUserBranchNew(branch string) error { if branch == "" || branch == "uerr" { log.Info("forge.gitpb logic err. branch name was:", branch) return nil @@ -101,7 +100,14 @@ func (repo *Repo) checkoutBranchNew(branch string) error { } if repo.GetCurrentBranchName() != repo.GetDevelBranchName() { - return fmt.Errorf("repo must be on devel branch %s", repo.GetGoPath()) + repo.CheckoutDevel() + } + repo.Reload() + + if repo.GetCurrentBranchName() != repo.GetDevelBranchName() { + log.Info("create user branch will probably fail", repo.GetGoPath()) + // TODO: FIX THIS + // return fmt.Errorf("repo must be on devel branch %s", repo.GetGoPath()) } // log.Info("forge.gitpb try to create", branch, repo.GetGoPath()) diff --git a/goDep.parseGoSum.go b/goDep.parseGoSum.go index 0008e9b..14bc319 100644 --- a/goDep.parseGoSum.go +++ b/goDep.parseGoSum.go @@ -21,8 +21,8 @@ func (repo *Repo) ParseGoSum() bool { // that means, there is not a go.sum file // because the package is completely self contained! if err := repo.setPrimitive(); err != nil { - // temporarily enabled this - log.Info("gitpb.ParseGoSum()", err) + // temporarily enabled this. this is really noisy + // log.Info("gitpb.ParseGoSum()", err) return false } if repo.GetGoPrimitive() { diff --git a/reloadRepoType.go b/reloadRepoType.go index 0bca691..98ec339 100644 --- a/reloadRepoType.go +++ b/reloadRepoType.go @@ -73,7 +73,7 @@ func (repo *Repo) goListRepoType() string { result, err := repo.RunQuiet(cmd) if err != nil { - log.Warn("go list binary detect failed", err) + // log.Info("go list binary detect failed", err) return "" } output := strings.TrimSpace(strings.Join(result.Stdout, "\n")) diff --git a/shell.go b/shell.go index d104eb8..6a7b996 100644 --- a/shell.go +++ b/shell.go @@ -48,7 +48,7 @@ func (repo *Repo) RunRealtimeVerbose(cmd []string) cmd.Status { } func (repo *Repo) RunQuiet(cmd []string) (*cmd.Status, error) { - result := shell.RunQuiet(cmd) + result := shell.PathRunQuiet(repo.FullPath, cmd) if result.Error != nil { log.Warn(repo.GetGoPath(), cmd, "wow. golang is cool. an os.Error:", result.Error) return &result, result.Error