diff options
Diffstat (limited to 'doPatch.go')
| -rw-r--r-- | doPatch.go | 15 |
1 files changed, 12 insertions, 3 deletions
@@ -19,13 +19,15 @@ func doPatch() error { if argv.Patch.List != nil { return doPatchList() } + + // if no option is given to patch, list out the + // repos that have patches ready in them findReposWithPatches() if me.found.Len() == 0 { - log.Info("you have no patches in your user branches") - okExit("patch list empty") + log.Info("you currently have no patches in your user branches") + return nil } me.forge.PrintHumanTable(me.found) - return nil } @@ -63,6 +65,7 @@ func dumpPatchset(pset *forgepb.Patchset) bool { if IsValidPatch(p) { // ok } else { + pset.State = "BROKEN" bad += 1 } count += 1 @@ -77,6 +80,9 @@ func dumpPatchset(pset *forgepb.Patchset) bool { func IsValidPatch(p *forgepb.Patch) bool { basepath, filename := filepath.Split(p.Filename) repo := me.forge.FindByGoPath(basepath) + if argv.Verbose { + log.Info("start:", p.StartHash, "end:", p.CommitHash, "file:", basepath, filename, "devel version", repo.GetDevelVersion()) + } if repo == nil { log.Info("can not apply patch! repo not found", basepath, filename) return false @@ -85,6 +91,9 @@ func IsValidPatch(p *forgepb.Patch) bool { log.Info("can not apply patch! devel hash mismatch", basepath, filename) return false } + if repo.DevelHash() == p.StartHash { + log.Info("local devel hash:", repo.DevelHash(), "matches patch hash", p.StartHash, "and can be applied") + } log.Info("start:", p.StartHash, "end:", p.CommitHash, "file:", basepath, filename, "devel version", repo.GetDevelVersion()) for _, line := range p.Files { log.Info("\t", line) |
