Mercurial > hg
comparison tests/test-check-interfaces.py @ 37635:cc8c06835097
wireproto: convert legacy commands to command executor
Calls to the legacy commands "changegroup" and "changegroupsubset" have
been ported to the new command executor interface.
Because we always pass arguments by name and not position, some
inconsistent names throughout the code base have been unified.
As part of this change, we no longer had any remaining callers
of the legacy command methods {between, branches, changegroup,
changegroupsubset}. So, these interfaces/methods have been dropped
from peer interfaces. We still have an interface declaring these
methods. But that interface is implemented on the concrete peer
types and isn't part of the generic peer interface. (The
implementations of the command executor continue to call these
methods.)
The ultimate goal is to remove the per-command methods from the
generic peer interface: the only interface-conforming way to
call a command will be with the new executor API. At some point,
we may want to move the methods outside of the peer classes and
change the executor implementations to not call methods directly
on a peer instance.
Differential Revision: https://phab.mercurial-scm.org/D3273
author | Gregory Szorc <gregory.szorc@gmail.com> |
---|---|
date | Fri, 13 Apr 2018 11:12:19 -0700 |
parents | e1b32dc4646c |
children | 856f381ad74b |
comparison
equal
deleted
inserted
replaced
37634:0ed11f9368fd | 37635:cc8c06835097 |
---|---|
87 # Needed so we can open a local repo with obsstore without a warning. | 87 # Needed so we can open a local repo with obsstore without a warning. |
88 ui.setconfig('experimental', 'evolution.createmarkers', True) | 88 ui.setconfig('experimental', 'evolution.createmarkers', True) |
89 | 89 |
90 checkzobject(badpeer()) | 90 checkzobject(badpeer()) |
91 | 91 |
92 ziverify.verifyClass(repository.ipeerbaselegacycommands, | 92 ziverify.verifyClass(repository.ipeerbase, httppeer.httppeer) |
93 httppeer.httppeer) | |
94 checkzobject(httppeer.httppeer(None, None, None, dummyopener(), None, None)) | 93 checkzobject(httppeer.httppeer(None, None, None, dummyopener(), None, None)) |
95 | 94 |
96 ziverify.verifyClass(repository.ipeerconnection, | 95 ziverify.verifyClass(repository.ipeerconnection, |
97 httppeer.httpv2peer) | 96 httppeer.httpv2peer) |
98 ziverify.verifyClass(repository.ipeercapabilities, | 97 ziverify.verifyClass(repository.ipeercapabilities, |
109 | 108 |
110 ziverify.verifyClass(repository.ipeercommandexecutor, | 109 ziverify.verifyClass(repository.ipeercommandexecutor, |
111 wireprotov1peer.peerexecutor) | 110 wireprotov1peer.peerexecutor) |
112 checkzobject(wireprotov1peer.peerexecutor(None)) | 111 checkzobject(wireprotov1peer.peerexecutor(None)) |
113 | 112 |
114 ziverify.verifyClass(repository.ipeerbaselegacycommands, | 113 ziverify.verifyClass(repository.ipeerbase, sshpeer.sshv1peer) |
115 sshpeer.sshv1peer) | |
116 checkzobject(sshpeer.sshv1peer(ui, 'ssh://localhost/foo', None, dummypipe(), | 114 checkzobject(sshpeer.sshv1peer(ui, 'ssh://localhost/foo', None, dummypipe(), |
117 dummypipe(), None, None)) | 115 dummypipe(), None, None)) |
118 | 116 |
119 ziverify.verifyClass(repository.ipeerbaselegacycommands, | 117 ziverify.verifyClass(repository.ipeerbase, sshpeer.sshv2peer) |
120 sshpeer.sshv2peer) | |
121 checkzobject(sshpeer.sshv2peer(ui, 'ssh://localhost/foo', None, dummypipe(), | 118 checkzobject(sshpeer.sshv2peer(ui, 'ssh://localhost/foo', None, dummypipe(), |
122 dummypipe(), None, None)) | 119 dummypipe(), None, None)) |
123 | 120 |
124 ziverify.verifyClass(repository.ipeerbase, bundlerepo.bundlepeer) | 121 ziverify.verifyClass(repository.ipeerbase, bundlerepo.bundlepeer) |
125 checkzobject(bundlerepo.bundlepeer(dummyrepo())) | 122 checkzobject(bundlerepo.bundlepeer(dummyrepo())) |