Mercurial > hg
comparison hgext/schemes.py @ 13827:f1823b9f073b
url: nuke some newly-introduced underbars in identifiers
author | Matt Mackall <mpm@selenic.com> |
---|---|
date | Thu, 31 Mar 2011 10:43:53 -0500 |
parents | fbf32a6c903e |
children | 924c82157d46 |
comparison
equal
deleted
inserted
replaced
13826:e574207e3bcd | 13827:f1823b9f073b |
---|---|
69 tail = '' | 69 tail = '' |
70 context = dict((str(i + 1), v) for i, v in enumerate(parts)) | 70 context = dict((str(i + 1), v) for i, v in enumerate(parts)) |
71 url = ''.join(self.templater.process(self.url, context)) + tail | 71 url = ''.join(self.templater.process(self.url, context)) + tail |
72 return hg._lookup(url).instance(ui, url, create) | 72 return hg._lookup(url).instance(ui, url, create) |
73 | 73 |
74 def has_drive_letter(orig, path): | 74 def hasdriveletter(orig, path): |
75 for scheme in schemes: | 75 for scheme in schemes: |
76 if path.startswith(scheme + ':'): | 76 if path.startswith(scheme + ':'): |
77 return False | 77 return False |
78 return orig(path) | 78 return orig(path) |
79 | 79 |
93 and os.path.exists('%s:\\' % scheme)): | 93 and os.path.exists('%s:\\' % scheme)): |
94 raise util.Abort(_('custom scheme %s:// conflicts with drive ' | 94 raise util.Abort(_('custom scheme %s:// conflicts with drive ' |
95 'letter %s:\\\n') % (scheme, scheme.upper())) | 95 'letter %s:\\\n') % (scheme, scheme.upper())) |
96 hg.schemes[scheme] = ShortRepository(url, scheme, t) | 96 hg.schemes[scheme] = ShortRepository(url, scheme, t) |
97 | 97 |
98 extensions.wrapfunction(urlmod, 'has_drive_letter', has_drive_letter) | 98 extensions.wrapfunction(urlmod, 'hasdriveletter', hasdriveletter) |