##// END OF EJS Templates
verify: allow suppressing warnings about extra files...
Gregory Szorc -
r37435:76d2115c default
parent child Browse files
Show More
@@ -52,6 +52,7 b' class verifier(object):'
52 52 self.fncachewarned = False
53 53 # developer config: verify.skipflags
54 54 self.skipflags = repo.ui.configint('verify', 'skipflags')
55 self.warnorphanstorefiles = True
55 56
56 57 def warn(self, msg):
57 58 self.ui.warn(msg + "\n")
@@ -294,8 +295,9 b' class verifier(object):'
294 295
295 296 if not dir and subdirnodes:
296 297 ui.progress(_('checking'), None)
297 for f in sorted(storefiles):
298 self.warn(_("warning: orphan data file '%s'") % f)
298 if self.warnorphanstorefiles:
299 for f in sorted(storefiles):
300 self.warn(_("warning: orphan data file '%s'") % f)
299 301
300 302 return filenodes
301 303
@@ -369,8 +371,10 b' class verifier(object):'
369 371 try:
370 372 storefiles.remove(ff)
371 373 except KeyError:
372 self.warn(_(" warning: revlog '%s' not in fncache!") % ff)
373 self.fncachewarned = True
374 if self.warnorphanstorefiles:
375 self.warn(_(" warning: revlog '%s' not in fncache!") %
376 ff)
377 self.fncachewarned = True
374 378
375 379 self.checklog(fl, f, lr)
376 380 seen = {}
@@ -481,7 +485,8 b' class verifier(object):'
481 485 short(node), f)
482 486 ui.progress(_('checking'), None)
483 487
484 for f in sorted(storefiles):
485 self.warn(_("warning: orphan data file '%s'") % f)
488 if self.warnorphanstorefiles:
489 for f in sorted(storefiles):
490 self.warn(_("warning: orphan data file '%s'") % f)
486 491
487 492 return len(files), revisions
@@ -35,6 +35,7 b' from mercurial import ('
35 35 pycompat,
36 36 revlog,
37 37 store,
38 verify,
38 39 )
39 40
40 41 # Note for extension authors: ONLY specify testedwith = 'ships-with-hg-core' for
@@ -656,9 +657,17 b' def makestore(orig, requirements, path, '
656 657
657 658 return simplestore(path, vfstype)
658 659
660 def verifierinit(orig, self, *args, **kwargs):
661 orig(self, *args, **kwargs)
662
663 # We don't care that files in the store don't align with what is
664 # advertised. So suppress these warnings.
665 self.warnorphanstorefiles = False
666
659 667 def extsetup(ui):
660 668 localrepo.featuresetupfuncs.add(featuresetup)
661 669
662 670 extensions.wrapfunction(localrepo, 'newreporequirements',
663 671 newreporequirements)
664 672 extensions.wrapfunction(store, 'store', makestore)
673 extensions.wrapfunction(verify.verifier, '__init__', verifierinit)
General Comments 0
You need to be logged in to leave comments. Login now