diff options
Diffstat (limited to 'windowPatchsets.go')
| -rw-r--r-- | windowPatchsets.go | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/windowPatchsets.go b/windowPatchsets.go index 4251a19..9c005fe 100644 --- a/windowPatchsets.go +++ b/windowPatchsets.go @@ -145,7 +145,7 @@ func makePatchsetsWin() *stdPatchsetTableWin { all := me.psets.All() for all.Scan() { pset := all.Next() - AddNotDonePatches(notdone, pset) + AddNotDonePatches(notdone, pset, false) } for patch := range notdone.IterAll() { @@ -266,7 +266,7 @@ func setPatchsetState(p *forgepb.Patchset) { // log.Info("patch:", patch.StartHash, patch.CommitHash, patch.RepoNamespace, patch.Filename) repo := me.forge.FindByGoPath(patch.RepoNamespace) if repo == nil { - log.Info("couldn't find repo", patch.RepoNamespace) + log.Info("could not find repo", patch.RepoNamespace) bad = true continue } @@ -332,7 +332,7 @@ func setNewCommitHash(p *forgepb.Patchset) bool { repo := me.forge.FindByGoPath(patch.RepoNamespace) if repo == nil { - log.Info("couldn't find repo", patch.RepoNamespace) + log.Info("could not find repo", patch.RepoNamespace) continue } @@ -356,7 +356,7 @@ func setNewCommitHash(p *forgepb.Patchset) bool { return done } -func AddNotDonePatches(notdone *forgepb.Patches, pset *forgepb.Patchset) { +func AddNotDonePatches(notdone *forgepb.Patches, pset *forgepb.Patchset, full bool) { for patch := range pset.Patches.IterAll() { comment := cleanSubject(patch.Comment) @@ -367,8 +367,10 @@ func AddNotDonePatches(notdone *forgepb.Patches, pset *forgepb.Patchset) { repo := me.forge.FindByGoPath(patch.RepoNamespace) if repo == nil { - log.Info("couldn't find repo", patch.RepoNamespace) - notdone.Append(patch) + log.Info("could not find repo", patch.RepoNamespace) + if full { + notdone.AppendByCommitHash(patch) // double check to ensure the commit hash isn't added twice + } continue } |
