Show More
@@ -250,9 +250,28 b' def repository(' | |||||
250 | def peer(uiorrepo, opts, path, create=False, intents=None, createopts=None): |
|
250 | def peer(uiorrepo, opts, path, create=False, intents=None, createopts=None): | |
251 | '''return a repository peer for the specified path''' |
|
251 | '''return a repository peer for the specified path''' | |
252 | rui = remoteui(uiorrepo, opts) |
|
252 | rui = remoteui(uiorrepo, opts) | |
253 | return _peerorrepo( |
|
253 | scheme = urlutil.url(path).scheme | |
254 | rui, path, create, intents=intents, createopts=createopts |
|
254 | if scheme in peer_schemes: | |
255 | ).peer() |
|
255 | cls = peer_schemes[scheme] | |
|
256 | peer = cls.instance( | |||
|
257 | rui, | |||
|
258 | path, | |||
|
259 | create, | |||
|
260 | intents=intents, | |||
|
261 | createopts=createopts, | |||
|
262 | ) | |||
|
263 | _setup_repo_or_peer(rui, peer) | |||
|
264 | else: | |||
|
265 | # this is a repository | |||
|
266 | repo = repository( | |||
|
267 | rui, | |||
|
268 | path, | |||
|
269 | create, | |||
|
270 | intents=intents, | |||
|
271 | createopts=createopts, | |||
|
272 | ) | |||
|
273 | peer = repo.peer() | |||
|
274 | return peer | |||
256 |
|
275 | |||
257 |
|
276 | |||
258 | def defaultdest(source): |
|
277 | def defaultdest(source): |
General Comments 0
You need to be logged in to leave comments.
Login now