Show More
@@ -60,6 +60,10 b' class verifier(object):' | |||||
60 | self.refersmf = False |
|
60 | self.refersmf = False | |
61 | self.fncachewarned = False |
|
61 | self.fncachewarned = False | |
62 |
|
62 | |||
|
63 | def warn(self, msg): | |||
|
64 | self.ui.warn(msg + "\n") | |||
|
65 | self.warnings[0] += 1 | |||
|
66 | ||||
63 | def verify(self): |
|
67 | def verify(self): | |
64 | repo = self.repo |
|
68 | repo = self.repo | |
65 | mflinkrevs = {} |
|
69 | mflinkrevs = {} | |
@@ -96,9 +100,6 b' class verifier(object):' | |||||
96 | inst = repr(inst) |
|
100 | inst = repr(inst) | |
97 | err(linkrev, "%s: %s" % (msg, inst), filename) |
|
101 | err(linkrev, "%s: %s" % (msg, inst), filename) | |
98 |
|
102 | |||
99 | def warn(msg): |
|
|||
100 | ui.warn(msg + "\n") |
|
|||
101 | warnings[0] += 1 |
|
|||
102 |
|
103 | |||
103 | def checklog(obj, name, linkrev): |
|
104 | def checklog(obj, name, linkrev): | |
104 | if not len(obj) and (havecl or havemf): |
|
105 | if not len(obj) and (havecl or havemf): | |
@@ -113,9 +114,9 b' class verifier(object):' | |||||
113 |
|
114 | |||
114 | if obj.version != revlog.REVLOGV0: |
|
115 | if obj.version != revlog.REVLOGV0: | |
115 | if not revlogv1: |
|
116 | if not revlogv1: | |
116 | warn(_("warning: `%s' uses revlog format 1") % name) |
|
117 | self.warn(_("warning: `%s' uses revlog format 1") % name) | |
117 | elif revlogv1: |
|
118 | elif revlogv1: | |
118 | warn(_("warning: `%s' uses revlog format 0") % name) |
|
119 | self.warn(_("warning: `%s' uses revlog format 0") % name) | |
119 |
|
120 | |||
120 | def checkentry(obj, i, node, seen, linkrevs, f): |
|
121 | def checkentry(obj, i, node, seen, linkrevs, f): | |
121 | lr = obj.linkrev(obj.rev(node)) |
|
122 | lr = obj.linkrev(obj.rev(node)) | |
@@ -133,7 +134,8 b' class verifier(object):' | |||||
133 | if lrugetctx(l)[f].filenode() == node] |
|
134 | if lrugetctx(l)[f].filenode() == node] | |
134 | except Exception: |
|
135 | except Exception: | |
135 | pass |
|
136 | pass | |
136 |
warn(_(" (expected %s)") % |
|
137 | self.warn(_(" (expected %s)") % | |
|
138 | " ".join(map(str, linkrevs))) | |||
137 | lr = None # can't be trusted |
|
139 | lr = None # can't be trusted | |
138 |
|
140 | |||
139 | try: |
|
141 | try: | |
@@ -282,7 +284,7 b' class verifier(object):' | |||||
282 | try: |
|
284 | try: | |
283 | storefiles.remove(ff) |
|
285 | storefiles.remove(ff) | |
284 | except KeyError: |
|
286 | except KeyError: | |
285 | warn(_(" warning: revlog '%s' not in fncache!") % ff) |
|
287 | self.warn(_(" warning: revlog '%s' not in fncache!") % ff) | |
286 | self.fncachewarned = True |
|
288 | self.fncachewarned = True | |
287 |
|
289 | |||
288 | checklog(fl, f, lr) |
|
290 | checklog(fl, f, lr) | |
@@ -324,8 +326,8 b' class verifier(object):' | |||||
324 | found = True |
|
326 | found = True | |
325 | break |
|
327 | break | |
326 | if not found: |
|
328 | if not found: | |
327 | warn(_("warning: copy source of '%s' not" |
|
329 | self.warn(_("warning: copy source of '%s' not" | |
328 | " in parents of %s") % (f, ctx)) |
|
330 | " in parents of %s") % (f, ctx)) | |
329 | fl2 = repo.file(rp[0]) |
|
331 | fl2 = repo.file(rp[0]) | |
330 | if not len(fl2): |
|
332 | if not len(fl2): | |
331 | err(lr, _("empty or missing copy source revlog " |
|
333 | err(lr, _("empty or missing copy source revlog " | |
@@ -347,7 +349,7 b' class verifier(object):' | |||||
347 | ui.progress(_('checking'), None) |
|
349 | ui.progress(_('checking'), None) | |
348 |
|
350 | |||
349 | for f in storefiles: |
|
351 | for f in storefiles: | |
350 | warn(_("warning: orphan revlog '%s'") % f) |
|
352 | self.warn(_("warning: orphan revlog '%s'") % f) | |
351 |
|
353 | |||
352 | ui.status(_("%d files, %d changesets, %d total revisions\n") % |
|
354 | ui.status(_("%d files, %d changesets, %d total revisions\n") % | |
353 | (len(files), len(cl), revisions)) |
|
355 | (len(files), len(cl), revisions)) |
General Comments 0
You need to be logged in to leave comments.
Login now