Show More
@@ -93,6 +93,6 b' def extsetup(ui):' | |||||
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. |
|
96 | hg.schemes[scheme] = ShortRepository(url, scheme, t) | |
97 |
|
97 | |||
98 | extensions.wrapfunction(util, 'hasdriveletter', hasdriveletter) |
|
98 | extensions.wrapfunction(util, 'hasdriveletter', hasdriveletter) |
@@ -61,7 +61,7 b' def parseurl(path, branches=None):' | |||||
61 | u.fragment = None |
|
61 | u.fragment = None | |
62 | return str(u), (branch, branches or []) |
|
62 | return str(u), (branch, branches or []) | |
63 |
|
63 | |||
64 |
|
|
64 | schemes = { | |
65 | 'bundle': bundlerepo, |
|
65 | 'bundle': bundlerepo, | |
66 | 'file': _local, |
|
66 | 'file': _local, | |
67 | 'http': httprepo, |
|
67 | 'http': httprepo, | |
@@ -73,7 +73,7 b' peerschemes = {' | |||||
73 | def _peerlookup(path): |
|
73 | def _peerlookup(path): | |
74 | u = util.url(path) |
|
74 | u = util.url(path) | |
75 | scheme = u.scheme or 'file' |
|
75 | scheme = u.scheme or 'file' | |
76 |
thing = |
|
76 | thing = schemes.get(scheme) or schemes['file'] | |
77 | try: |
|
77 | try: | |
78 | return thing(path) |
|
78 | return thing(path) | |
79 | except TypeError: |
|
79 | except TypeError: |
General Comments 0
You need to be logged in to leave comments.
Login now