mercurial/verify.py
changeset 27445 cc178057ab49
parent 27444 6647401858ab
child 27446 6b2c1a1871a6
--- a/mercurial/verify.py	Fri Dec 18 16:42:39 2015 -0800
+++ b/mercurial/verify.py	Fri Dec 18 16:42:39 2015 -0800
@@ -58,6 +58,7 @@
         self.revlogv1 = repo.changelog.version != revlog.REVLOGV0
         self.lrugetctx = util.lrucachefunc(repo.changectx)
         self.refersmf = False
+        self.fncachewarned = False
 
     def verify(self):
         repo = self.repo
@@ -256,7 +257,6 @@
             elif size > 0 or not revlogv1:
                 storefiles.add(_normpath(f))
 
-        fncachewarned = False
         files = sorted(set(filenodes) | set(filelinkrevs))
         total = len(files)
         for i, f in enumerate(files):
@@ -283,7 +283,7 @@
                     storefiles.remove(ff)
                 except KeyError:
                     warn(_(" warning: revlog '%s' not in fncache!") % ff)
-                    fncachewarned = True
+                    self.fncachewarned = True
 
             checklog(fl, f, lr)
             seen = {}
@@ -353,7 +353,7 @@
                        (len(files), len(cl), revisions))
         if warnings[0]:
             ui.warn(_("%d warnings encountered!\n") % warnings[0])
-        if fncachewarned:
+        if self.fncachewarned:
             ui.warn(_('hint: run "hg debugrebuildfncache" to recover from '
                       'corrupt fncache\n'))
         if errors[0]: