Show More
@@ -243,7 +243,13 b' def repository(' | |||||
243 | def peer(uiorrepo, opts, path, create=False, intents=None, createopts=None): |
|
243 | def peer(uiorrepo, opts, path, create=False, intents=None, createopts=None): | |
244 | '''return a repository peer for the specified path''' |
|
244 | '''return a repository peer for the specified path''' | |
245 | rui = remoteui(uiorrepo, opts) |
|
245 | rui = remoteui(uiorrepo, opts) | |
246 | scheme = urlutil.url(path).scheme |
|
246 | if util.safehasattr(path, 'url'): | |
|
247 | # this is a urlutil.path object | |||
|
248 | scheme = path.url.scheme # pytype: disable=attribute-error | |||
|
249 | # XXX for now we don't do anything more than that | |||
|
250 | path = path.loc # pytype: disable=attribute-error | |||
|
251 | else: | |||
|
252 | scheme = urlutil.url(path).scheme | |||
247 | if scheme in peer_schemes: |
|
253 | if scheme in peer_schemes: | |
248 | cls = peer_schemes[scheme] |
|
254 | cls = peer_schemes[scheme] | |
249 | peer = cls.instance( |
|
255 | peer = cls.instance( |
General Comments 0
You need to be logged in to leave comments.
Login now