[PATCH 17 of 18 "] verify: small refactoring and documentation in `_verifymanifest`
Pierre-Yves David
pierre-yves.david at ens-lyon.org
Wed Mar 6 11:29:33 EST 2019
# HG changeset patch
# User Pierre-Yves David <pierre-yves.david at octobus.net>
# Date 1551879782 -3600
# Wed Mar 06 14:43:02 2019 +0100
# Node ID 92091b3de1503bf562fe5bf2b544781f92702738
# Parent a6b80a595d5e6a94e13d08150636faa0ca4729e5
# EXP-Topic verify
# Available At https://bitbucket.org/octobus/mercurial-devel/
# hg pull https://bitbucket.org/octobus/mercurial-devel/ -r 92091b3de150
verify: small refactoring and documentation in `_verifymanifest`
Small changes to make this area of code clearer.
diff --git a/mercurial/verify.py b/mercurial/verify.py
--- a/mercurial/verify.py
+++ b/mercurial/verify.py
@@ -334,8 +334,10 @@ class verifier(object):
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)
More information about the Mercurial-devel
mailing list