##// END OF EJS Templates
revlog: use proper version comparison during verify...
Gregory Szorc -
r39881:e6d3d39c default
parent child Browse files
Show More
@@ -2600,10 +2600,10 class revlog(object):
2600 if di:
2600 if di:
2601 yield revlogproblem(error=_('index contains %d extra bytes') % di)
2601 yield revlogproblem(error=_('index contains %d extra bytes') % di)
2602
2602
2603 if self.version != REVLOGV0:
2603 version = self.version & 0xFFFF
2604 if not state['revlogv1']:
2604
2605 yield revlogproblem(warning=_("warning: `%s' uses revlog "
2605 # The verifier tells us what version revlog we should be.
2606 "format 1") % self.indexfile)
2606 if version != state['expectedversion']:
2607 elif state['revlogv1']:
2607 yield revlogproblem(
2608 yield revlogproblem(warning=_("warning: `%s' uses revlog "
2608 warning=_("warning: '%s' uses revlog format %d; expected %d") %
2609 "format 0") % self.indexfile)
2609 (self.indexfile, version, state['expectedversion']))
@@ -342,7 +342,8 class verifier(object):
342 storefiles.add(_normpath(f))
342 storefiles.add(_normpath(f))
343
343
344 state = {
344 state = {
345 'revlogv1': self.revlogv1,
345 # TODO this assumes revlog storage for changelog.
346 'expectedversion': self.repo.changelog.version & 0xFFFF
346 }
347 }
347
348
348 files = sorted(set(filenodes) | set(filelinkrevs))
349 files = sorted(set(filenodes) | set(filelinkrevs))
General Comments 0
You need to be logged in to leave comments. Login now