changeset 47364:ba8a9fbed897

verify: use some intermediate variables instead of a multi-liner 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. Differential Revision: https://phab.mercurial-scm.org/D10810
author Pierre-Yves David <pierre-yves.david@octobus.net>
date Tue, 01 Jun 2021 09:03:24 +0200
parents fde1df74d73d
children 9305824d3a97
files mercurial/verify.py
diffstat 1 files changed, 6 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/verify.py	Tue Jun 01 09:01:23 2021 +0200
+++ b/mercurial/verify.py	Tue Jun 01 09:03:24 2021 +0200
@@ -38,6 +38,11 @@
     return f
 
 
+HINT_FNCACHE = _(
+    b'hint: run "hg debugrebuildfncache" to recover from corrupt fncache\n'
+)
+
+
 class verifier(object):
     def __init__(self, repo, level=None):
         self.repo = repo.unfiltered()
@@ -202,12 +207,7 @@
         if self.warnings:
             ui.warn(_(b"%d warnings encountered!\n") % self.warnings)
         if self.fncachewarned:
-            ui.warn(
-                _(
-                    b'hint: run "hg debugrebuildfncache" to recover from '
-                    b'corrupt fncache\n'
-                )
-            )
+            ui.warn(HINT_FNCACHE)
         if self.errors:
             ui.warn(_(b"%d integrity errors encountered!\n") % self.errors)
             if self.badrevs: