##// END OF EJS Templates
verify: show progress while verifying dirlogs...
Martin von Zweigbergk -
r28205:53f42c8d default
parent child Browse files
Show More
@@ -197,7 +197,8 b' class verifier(object):'
197 197 ui.progress(_('checking'), None)
198 198 return mflinkrevs, filelinkrevs
199 199
200 def _verifymanifest(self, mflinkrevs, dir="", storefiles=None):
200 def _verifymanifest(self, mflinkrevs, dir="", storefiles=None,
201 progress=None):
201 202 repo = self.repo
202 203 ui = self.ui
203 204 mf = self.repo.manifest.dirlog(dir)
@@ -213,6 +214,8 b' class verifier(object):'
213 214 label = dir
214 215 revlogfiles = mf.files()
215 216 storefiles.difference_update(revlogfiles)
217 if progress: # should be true since we're in a subdirectory
218 progress()
216 219 if self.refersmf:
217 220 # Do not check manifest if there are only changelog entries with
218 221 # null manifests.
@@ -263,19 +266,29 b' class verifier(object):'
263 266 if not dir and subdirnodes:
264 267 self.ui.status(_("checking directory manifests\n"))
265 268 storefiles = set()
269 subdirs = set()
266 270 revlogv1 = self.revlogv1
267 271 for f, f2, size in repo.store.datafiles():
268 272 if not f:
269 273 self.err(None, _("cannot decode filename '%s'") % f2)
270 274 elif (size > 0 or not revlogv1) and f.startswith('meta/'):
271 275 storefiles.add(_normpath(f))
276 subdirs.add(os.path.dirname(f))
277 subdircount = len(subdirs)
278 currentsubdir = [0]
279 def progress():
280 currentsubdir[0] += 1
281 ui.progress(_('checking'), currentsubdir[0], total=subdircount,
282 unit=_('manifests'))
272 283
273 284 for subdir, linkrevs in subdirnodes.iteritems():
274 subdirfilenodes = self._verifymanifest(linkrevs, subdir, storefiles)
285 subdirfilenodes = self._verifymanifest(linkrevs, subdir, storefiles,
286 progress)
275 287 for f, onefilenodes in subdirfilenodes.iteritems():
276 288 filenodes.setdefault(f, {}).update(onefilenodes)
277 289
278 290 if not dir and subdirnodes:
291 ui.progress(_('checking'), None)
279 292 for f in sorted(storefiles):
280 293 self.warn(_("warning: orphan revlog '%s'") % f)
281 294
General Comments 0
You need to be logged in to leave comments. Login now