Mercurial > hg
changeset 27445:cc178057ab49
verify: move fncachewarned up to a class variable
This is part of making verify more modular so hooks can extend it.
author | Durham Goode <durham@fb.com> |
---|---|
date | Fri, 18 Dec 2015 16:42:39 -0800 |
parents | 6647401858ab |
children | 6b2c1a1871a6 |
files | mercurial/verify.py |
diffstat | 1 files changed, 3 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- 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]: