Mercurial > public > mercurial-scm > hg-stable
comparison mercurial/sshpeer.py @ 37717:0664be4f0c1f
hg: pass command intents to repo/peer creation (API)
The previous commit introduced a mechanism to declare command intents.
This commit changes the repository and peer instantiation mechanism
so the intents are passed down to each repository and peer type so
they can do with them whatever they please.
Currently, nobody does anything with any intent.
Differential Revision: https://phab.mercurial-scm.org/D3377
author | Gregory Szorc <gregory.szorc@gmail.com> |
---|---|
date | Sat, 14 Apr 2018 09:57:44 -0700 |
parents | a81d02ea65db |
children | b4d85bc122bd |
comparison
equal
deleted
inserted
replaced
37716:dfc51a482031 | 37717:0664be4f0c1f |
---|---|
585 else: | 585 else: |
586 _cleanuppipes(ui, stdout, stdin, stderr) | 586 _cleanuppipes(ui, stdout, stdin, stderr) |
587 raise error.RepoError(_('unknown version of SSH protocol: %s') % | 587 raise error.RepoError(_('unknown version of SSH protocol: %s') % |
588 protoname) | 588 protoname) |
589 | 589 |
590 def instance(ui, path, create): | 590 def instance(ui, path, create, intents=None): |
591 """Create an SSH peer. | 591 """Create an SSH peer. |
592 | 592 |
593 The returned object conforms to the ``wireprotov1peer.wirepeer`` interface. | 593 The returned object conforms to the ``wireprotov1peer.wirepeer`` interface. |
594 """ | 594 """ |
595 u = util.url(path, parsequery=False, parsefragment=False) | 595 u = util.url(path, parsequery=False, parsefragment=False) |