marmoute created this revision.
Herald added a reviewer: hg-reviewers.
Herald added a subscriber: mercurial-patches.

REVISION SUMMARY
  This is shorter and easier to read as the indentation remains the same.
  
  We extract the long message in a module level constant for clarity.

REPOSITORY
  rHG Mercurial

BRANCH
  default

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, mercurial-devel
_______________________________________________
Mercurial-devel mailing list
Mercurial-devel@mercurial-scm.org
https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel

Reply via email to