##// END OF EJS Templates
verify: make the `warn` method private...
marmoute -
r42028:c66037fb default
parent child Browse files
Show More
@@ -51,7 +51,7 b' class verifier(object):'
51 self.skipflags = repo.ui.configint('verify', 'skipflags')
51 self.skipflags = repo.ui.configint('verify', 'skipflags')
52 self.warnorphanstorefiles = True
52 self.warnorphanstorefiles = True
53
53
54 def warn(self, msg):
54 def _warn(self, msg):
55 """record a "warning" level issue"""
55 """record a "warning" level issue"""
56 self.ui.warn(msg + "\n")
56 self.ui.warn(msg + "\n")
57 self.warnings += 1
57 self.warnings += 1
@@ -87,9 +87,9 b' class verifier(object):'
87
87
88 if obj.version != revlog.REVLOGV0:
88 if obj.version != revlog.REVLOGV0:
89 if not self.revlogv1:
89 if not self.revlogv1:
90 self.warn(_("warning: `%s' uses revlog format 1") % name)
90 self._warn(_("warning: `%s' uses revlog format 1") % name)
91 elif self.revlogv1:
91 elif self.revlogv1:
92 self.warn(_("warning: `%s' uses revlog format 0") % name)
92 self._warn(_("warning: `%s' uses revlog format 0") % name)
93
93
94 def checkentry(self, obj, i, node, seen, linkrevs, f):
94 def checkentry(self, obj, i, node, seen, linkrevs, f):
95 lr = obj.linkrev(obj.rev(node))
95 lr = obj.linkrev(obj.rev(node))
@@ -107,8 +107,8 b' class verifier(object):'
107 if self.lrugetctx(l)[f].filenode() == node]
107 if self.lrugetctx(l)[f].filenode() == node]
108 except Exception:
108 except Exception:
109 pass
109 pass
110 self.warn(_(" (expected %s)") % " ".join
110 self._warn(_(" (expected %s)") % " ".join
111 (map(pycompat.bytestr, linkrevs)))
111 (map(pycompat.bytestr, linkrevs)))
112 lr = None # can't be trusted
112 lr = None # can't be trusted
113
113
114 try:
114 try:
@@ -293,7 +293,7 b' class verifier(object):'
293 subdirprogress.complete()
293 subdirprogress.complete()
294 if self.warnorphanstorefiles:
294 if self.warnorphanstorefiles:
295 for f in sorted(storefiles):
295 for f in sorted(storefiles):
296 self.warn(_("warning: orphan data file '%s'") % f)
296 self._warn(_("warning: orphan data file '%s'") % f)
297
297
298 return filenodes
298 return filenodes
299
299
@@ -376,7 +376,7 b' class verifier(object):'
376 storefiles.remove(ff)
376 storefiles.remove(ff)
377 except KeyError:
377 except KeyError:
378 if self.warnorphanstorefiles:
378 if self.warnorphanstorefiles:
379 self.warn(_(" warning: revlog '%s' not in fncache!") %
379 self._warn(_(" warning: revlog '%s' not in fncache!") %
380 ff)
380 ff)
381 self.fncachewarned = True
381 self.fncachewarned = True
382
382
@@ -392,7 +392,7 b' class verifier(object):'
392 linkrev = None
392 linkrev = None
393
393
394 if problem.warning:
394 if problem.warning:
395 self.warn(problem.warning)
395 self._warn(problem.warning)
396 elif problem.error:
396 elif problem.error:
397 self.err(linkrev if linkrev is not None else lr,
397 self.err(linkrev if linkrev is not None else lr,
398 problem.error, f)
398 problem.error, f)
@@ -425,7 +425,7 b' class verifier(object):'
425 if lr is not None and ui.verbose:
425 if lr is not None and ui.verbose:
426 ctx = lrugetctx(lr)
426 ctx = lrugetctx(lr)
427 if not any(rp[0] in pctx for pctx in ctx.parents()):
427 if not any(rp[0] in pctx for pctx in ctx.parents()):
428 self.warn(_("warning: copy source of '%s' not"
428 self._warn(_("warning: copy source of '%s' not"
429 " in parents of %s") % (f, ctx))
429 " in parents of %s") % (f, ctx))
430 fl2 = repo.file(rp[0])
430 fl2 = repo.file(rp[0])
431 if not len(fl2):
431 if not len(fl2):
@@ -450,6 +450,6 b' class verifier(object):'
450
450
451 if self.warnorphanstorefiles:
451 if self.warnorphanstorefiles:
452 for f in sorted(storefiles):
452 for f in sorted(storefiles):
453 self.warn(_("warning: orphan data file '%s'") % f)
453 self._warn(_("warning: orphan data file '%s'") % f)
454
454
455 return len(files), revisions
455 return len(files), revisions
General Comments 0
You need to be logged in to leave comments. Login now