Mercurial > hg-stable
comparison hgext/convert/subversion.py @ 10885:9e4d120e3c32 stable
convert/subversion: fix default URL checker prototype
author | Patrick Mezard <pmezard@gmail.com> |
---|---|
date | Mon, 12 Apr 2010 21:19:53 +0200 |
parents | 508fda6b8637 |
children | 02d6149a480b |
comparison
equal
deleted
inserted
replaced
10883:196908117c27 | 10885:9e4d120e3c32 |
---|---|
176 except ValueError: | 176 except ValueError: |
177 proto = 'file' | 177 proto = 'file' |
178 path = os.path.abspath(url) | 178 path = os.path.abspath(url) |
179 if proto == 'file': | 179 if proto == 'file': |
180 path = path.replace(os.sep, '/') | 180 path = path.replace(os.sep, '/') |
181 check = protomap.get(proto, lambda p, p2: False) | 181 check = protomap.get(proto, lambda *args: False) |
182 while '/' in path: | 182 while '/' in path: |
183 if check(ui, path, proto): | 183 if check(ui, path, proto): |
184 return True | 184 return True |
185 path = path.rsplit('/', 1)[0] | 185 path = path.rsplit('/', 1)[0] |
186 return False | 186 return False |