Show More
@@ -199,7 +199,7 b' class verifier(object):' | |||||
199 | return mflinkrevs, filelinkrevs |
|
199 | return mflinkrevs, filelinkrevs | |
200 |
|
200 | |||
201 | def _verifymanifest(self, mflinkrevs, dir="", storefiles=None, |
|
201 | def _verifymanifest(self, mflinkrevs, dir="", storefiles=None, | |
202 | progress=None): |
|
202 | subdirprogress=None): | |
203 | repo = self.repo |
|
203 | repo = self.repo | |
204 | ui = self.ui |
|
204 | ui = self.ui | |
205 | match = self.match |
|
205 | match = self.match | |
@@ -217,8 +217,8 b' class verifier(object):' | |||||
217 | label = dir |
|
217 | label = dir | |
218 | revlogfiles = mf.files() |
|
218 | revlogfiles = mf.files() | |
219 | storefiles.difference_update(revlogfiles) |
|
219 | storefiles.difference_update(revlogfiles) | |
220 | if progress: # should be true since we're in a subdirectory |
|
220 | if subdirprogress: # should be true since we're in a subdirectory | |
221 | progress() |
|
221 | subdirprogress.increment() | |
222 | if self.refersmf: |
|
222 | if self.refersmf: | |
223 | # Do not check manifest if there are only changelog entries with |
|
223 | # Do not check manifest if there are only changelog entries with | |
224 | # null manifests. |
|
224 | # null manifests. | |
@@ -280,21 +280,17 b' class verifier(object):' | |||||
280 | elif (size > 0 or not revlogv1) and f.startswith('meta/'): |
|
280 | elif (size > 0 or not revlogv1) and f.startswith('meta/'): | |
281 | storefiles.add(_normpath(f)) |
|
281 | storefiles.add(_normpath(f)) | |
282 | subdirs.add(os.path.dirname(f)) |
|
282 | subdirs.add(os.path.dirname(f)) | |
283 | subdircount = len(subdirs) |
|
283 | subdirprogress = ui.makeprogress(_('checking'), unit=_('manifests'), | |
284 | currentsubdir = [0] |
|
284 | total=len(subdirs)) | |
285 | def progress(): |
|
|||
286 | currentsubdir[0] += 1 |
|
|||
287 | ui.progress(_('checking'), currentsubdir[0], total=subdircount, |
|
|||
288 | unit=_('manifests')) |
|
|||
289 |
|
285 | |||
290 | for subdir, linkrevs in subdirnodes.iteritems(): |
|
286 | for subdir, linkrevs in subdirnodes.iteritems(): | |
291 | subdirfilenodes = self._verifymanifest(linkrevs, subdir, storefiles, |
|
287 | subdirfilenodes = self._verifymanifest(linkrevs, subdir, storefiles, | |
292 | progress) |
|
288 | subdirprogress) | |
293 | for f, onefilenodes in subdirfilenodes.iteritems(): |
|
289 | for f, onefilenodes in subdirfilenodes.iteritems(): | |
294 | filenodes.setdefault(f, {}).update(onefilenodes) |
|
290 | filenodes.setdefault(f, {}).update(onefilenodes) | |
295 |
|
291 | |||
296 | if not dir and subdirnodes: |
|
292 | if not dir and subdirnodes: | |
297 | ui.progress(_('checking'), None) |
|
293 | subdirprogress.complete() | |
298 | if self.warnorphanstorefiles: |
|
294 | if self.warnorphanstorefiles: | |
299 | for f in sorted(storefiles): |
|
295 | for f in sorted(storefiles): | |
300 | self.warn(_("warning: orphan data file '%s'") % f) |
|
296 | self.warn(_("warning: orphan data file '%s'") % f) |
General Comments 0
You need to be logged in to leave comments.
Login now