Mercurial > public > mercurial-scm > hg
comparison mercurial/hg.py @ 14606:6e631c24c6d9
hg: move peerschemes back to schemes
This will avoid breaking things with extensions until peers are fully
separated from repos.
author | Matt Mackall <mpm@selenic.com> |
---|---|
date | Mon, 13 Jun 2011 16:25:18 -0500 |
parents | 9f1139cf5c76 |
children | bd1acea552ff |
comparison
equal
deleted
inserted
replaced
14605:9f1139cf5c76 | 14606:6e631c24c6d9 |
---|---|
59 if u.fragment: | 59 if u.fragment: |
60 branch = u.fragment | 60 branch = u.fragment |
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 peerschemes = { | 64 schemes = { |
65 'bundle': bundlerepo, | 65 'bundle': bundlerepo, |
66 'file': _local, | 66 'file': _local, |
67 'http': httprepo, | 67 'http': httprepo, |
68 'https': httprepo, | 68 'https': httprepo, |
69 'ssh': sshrepo, | 69 'ssh': sshrepo, |
71 } | 71 } |
72 | 72 |
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 = peerschemes.get(scheme) or peerschemes['file'] | 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: |
80 return thing | 80 return thing |
81 | 81 |