Mercurial > hg
comparison 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 |
comparison
equal
deleted
inserted
replaced
17796:1b51638bf44a | 17851:7aa7380691b8 |
---|---|
5 # This software may be used and distributed according to the terms of the | 5 # This software may be used and distributed according to the terms of the |
6 # GNU General Public License version 2 or any later version. | 6 # GNU General Public License version 2 or any later version. |
7 | 7 |
8 from node import nullid, short | 8 from node import nullid, short |
9 from i18n import _ | 9 from i18n import _ |
10 import os | 10 import os, posixpath |
11 import revlog, util, error | 11 import revlog, util, error |
12 | 12 |
13 def verify(repo): | 13 def verify(repo): |
14 lock = repo.lock() | 14 lock = repo.lock() |
15 try: | 15 try: |
234 | 234 |
235 for ff in fl.files(): | 235 for ff in fl.files(): |
236 try: | 236 try: |
237 storefiles.remove(ff) | 237 storefiles.remove(ff) |
238 except KeyError: | 238 except KeyError: |
239 err(lr, _("missing revlog!"), ff) | 239 # under hg < 2.4, convert didn't sanitize paths properly, |
240 # so a converted repo may contain repeated slashes | |
241 try: | |
242 storefiles.remove(posixpath.normpath(ff)) | |
243 except KeyError: | |
244 err(lr, _("missing revlog!"), ff) | |
240 | 245 |
241 checklog(fl, f, lr) | 246 checklog(fl, f, lr) |
242 seen = {} | 247 seen = {} |
243 rp = None | 248 rp = None |
244 for i in fl: | 249 for i in fl: |