verify: do not abort on fully corrupted revlog
authorBenoit Boissinot <benoit.boissinot@ens-lyon.org>
Sat, 07 Mar 2009 20:04:56 +0100
changeset 7832 1fce19b9b011
parent 7831 b5ed0ab8cc74
child 7833 794def2fe232
verify: do not abort on fully corrupted revlog
mercurial/verify.py
--- a/mercurial/verify.py	Sat Mar 07 00:59:41 2009 +0100
+++ b/mercurial/verify.py	Sat Mar 07 20:04:56 2009 +0100
@@ -7,7 +7,7 @@
 
 from node import nullid, short
 from i18n import _
-import revlog, util
+import revlog, util, error
 
 def verify(repo):
     lock = repo.lock()
@@ -172,7 +172,11 @@
 
     files = util.sort(util.unique(filenodes.keys() + filelinkrevs.keys()))
     for f in files:
-        fl = repo.file(f)
+        try:
+            fl = repo.file(f)
+        except error.RevlogError, e:
+            err(0, _("broken revlog! (%s)") % e, f)
+            continue
 
         for ff in fl.files():
             try: