verify: small refactoring and documentation in `_verifymanifest`
Small changes to make this area of code clearer.
--- a/mercurial/verify.py Wed Mar 06 12:39:44 2019 +0100
+++ b/mercurial/verify.py Wed Mar 06 14:43:02 2019 +0100
@@ -334,8 +334,10 @@
progress.complete()
if self.havemf:
- for c, m in sorted([(c, m) for m in mflinkrevs
- for c in mflinkrevs[m]]):
+ # since we delete entry in `mflinkrevs` during iteration, any
+ # remaining entries are "missing". We need to issue errors for them.
+ changesetpairs = [(c, m) for m in mflinkrevs for c in mflinkrevs[m]]
+ for c, m in sorted(changesetpairs):
if dir:
self._err(c, _("parent-directory manifest refers to unknown"
" revision %s") % short(m), label)