Mercurial > public > mercurial-scm > hg-stable
diff mercurial/repository.py @ 37633:33a6eee08db2
wireproto: remove iterbatch() from peer interface (API)
Good riddance.
Some tests have been ported to the new API. This probably should
have been done in earlier commits. But duplicating the test coverage
would have been difficult. It was easier this way.
.. api::
The wire protocol peer's ``iterbatch()`` for bulk executing commands
has been remove.d Use ``peer.commandexecutor()`` instead.
Differential Revision: https://phab.mercurial-scm.org/D3271
author | Gregory Szorc <gregory.szorc@gmail.com> |
---|---|
date | Wed, 11 Apr 2018 16:18:26 -0700 |
parents | e1b32dc4646c |
children | cc8c06835097 |
line wrap: on
line diff
--- a/mercurial/repository.py Fri Apr 13 11:08:46 2018 -0700 +++ b/mercurial/repository.py Wed Apr 11 16:18:26 2018 -0700 @@ -284,29 +284,6 @@ All peer instances must conform to this interface. """ - def iterbatch(): - """Obtain an object to be used for multiple method calls. - - Various operations call several methods on peer instances. If each - method call were performed immediately and serially, this would - require round trips to remote peers and/or would slow down execution. - - Some peers have the ability to "batch" method calls to avoid costly - round trips or to facilitate concurrent execution. - - This method returns an object that can be used to indicate intent to - perform batched method calls. - - The returned object is a proxy of this peer. It intercepts calls to - batchable methods and queues them instead of performing them - immediately. This proxy object has a ``submit`` method that will - perform all queued batchable method calls. A ``results()`` method - exposes the results of queued/batched method calls. It is a generator - of results in the order they were called. - - Not all peers or wire protocol implementations may actually batch method - calls. However, they must all support this API. - """ class ipeerbaselegacycommands(ipeerbase, ipeerlegacycommands): """Unified peer interface that supports legacy commands."""