diff mercurial/verify.py @ 17851:7aa7380691b8

verify: tolerate repeated slashes in a converted repo (issue3665) These slashes are a hangover from issue3612, fixed in e4da793998bf. Although the bugfix in that commit is correct, the test it adds does not replicate the conditions for the bug correctly.
author Bryan O'Sullivan <bryano@fb.com>
date Mon, 22 Oct 2012 18:05:40 -0700
parents 9a1796af4f8d
children a45b33f12627
line wrap: on
line diff
--- a/mercurial/verify.py	Wed Oct 17 15:37:25 2012 -0500
+++ b/mercurial/verify.py	Mon Oct 22 18:05:40 2012 -0700
@@ -7,7 +7,7 @@
 
 from node import nullid, short
 from i18n import _
-import os
+import os, posixpath
 import revlog, util, error
 
 def verify(repo):
@@ -236,7 +236,12 @@
             try:
                 storefiles.remove(ff)
             except KeyError:
-                err(lr, _("missing revlog!"), ff)
+                # under hg < 2.4, convert didn't sanitize paths properly,
+                # so a converted repo may contain repeated slashes
+                try:
+                    storefiles.remove(posixpath.normpath(ff))
+                except KeyError:
+                    err(lr, _("missing revlog!"), ff)
 
         checklog(fl, f, lr)
         seen = {}