[Updated] D10815: verify: use some intermediate variables instead of a multi-liner

marmoute (Pierre-Yves David) phabricator at mercurial-scm.org
Tue Jun 1 19:38:41 UTC 2021


Closed by commit rHG9823b3489e90: verify: use some intermediate variables instead of a multi-liner (authored by marmoute).
This revision was automatically updated to reflect the committed changes.
This revision was not accepted when it landed; it landed in state "Needs Review".

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D10815?vs=28340&id=28373

CHANGES SINCE LAST ACTION
  https://phab.mercurial-scm.org/D10815/new/

REVISION DETAIL
  https://phab.mercurial-scm.org/D10815

AFFECTED FILES
  mercurial/verify.py

CHANGE DETAILS

diff --git a/mercurial/verify.py b/mercurial/verify.py
--- a/mercurial/verify.py
+++ b/mercurial/verify.py
@@ -42,6 +42,10 @@
     b'hint: run "hg debugrebuildfncache" to recover from corrupt fncache\n'
 )
 
+WARN_PARENT_DIR_UNKNOWN_REV = _(
+    b"parent-directory manifest refers to unknown revision %s"
+)
+
 
 class verifier(object):
     def __init__(self, repo, level=None):
@@ -372,15 +376,7 @@
             changesetpairs = [(c, m) for m in mflinkrevs for c in mflinkrevs[m]]
             for c, m in sorted(changesetpairs):
                 if dir:
-                    self._err(
-                        c,
-                        _(
-                            b"parent-directory manifest refers to unknown"
-                            b" revision %s"
-                        )
-                        % short(m),
-                        label,
-                    )
+                    self._err(c, WARN_PARENT_DIR_UNKNOWN_REV % short(m), label)
                 else:
                     self._err(
                         c,



To: marmoute, #hg-reviewers
Cc: mercurial-patches
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mercurial-scm.org/pipermail/mercurial-patches/attachments/20210601/ccf1dee9/attachment-0002.html>


More information about the Mercurial-patches mailing list