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

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


Closed by commit rHG34a92e84267e: 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/D10819?vs=28344&id=28378

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

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

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
@@ -46,6 +46,10 @@
     b"parent-directory manifest refers to unknown revision %s"
 )
 
+WARN_UNKNOWN_COPY_SOURCE = _(
+    b"warning: copy source of '%s' not in parents of %s"
+)
+
 
 class verifier(object):
     def __init__(self, repo, level=None):
@@ -547,13 +551,7 @@
                         if lr is not None and ui.verbose:
                             ctx = lrugetctx(lr)
                             if not any(rp[0] in pctx for pctx in ctx.parents()):
-                                self._warn(
-                                    _(
-                                        b"warning: copy source of '%s' not"
-                                        b" in parents of %s"
-                                    )
-                                    % (f, ctx)
-                                )
+                                self._warn(WARN_UNKNOWN_COPY_SOURCE % (f, ctx))
                         fl2 = repo.file(rp[0])
                         if not len(fl2):
                             self._err(



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/f0b798c8/attachment-0002.html>


More information about the Mercurial-patches mailing list