diff options
| author | Jeff Carr <[email protected]> | 2025-01-30 17:59:47 -0600 |
|---|---|---|
| committer | Jeff Carr <[email protected]> | 2025-01-30 17:59:47 -0600 |
| commit | 3db2e7ff6c70a06fc24a49b074dbaf33444c3757 (patch) | |
| tree | aecdc282fe46417dc1d3a12a0133e0bff463ce2f /doPatch.go | |
| parent | 4d4aad27e433ca0658379c4cd1f50c26cfdc33dd (diff) | |
rethink the patch 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) |
