changeset 7832:1fce19b9b011

verify: do not abort on fully corrupted revlog
author Benoit Boissinot <benoit.boissinot@ens-lyon.org>
date Sat, 07 Mar 2009 20:04:56 +0100
parents b5ed0ab8cc74
children 794def2fe232
files mercurial/verify.py
diffstat 1 files changed, 6 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- 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: