repository: implement generic capability methods on peer class
These methods are part of the peer interface, are generic, and can
be implemented in terms of other members of the peer interface. So we
implement them on the peer base class as a convenience.
The implementation is essentially copied from peer.py. The code
in peer.py will eventually be deleted.
Differential Revision: https://phab.mercurial-scm.org/D334
repository: formalize wire protocol interface
There are a well-defined set of commands constituting the wire
protocol. Interaction with these and methods for calling them in
batches are exposed via methods on peer instances.
Let's formalize support for these features in abstract classes.
The command parts come from the existing wireproto.wirepeer class.
The batch methods come from peer.peerrepository.
Ample documentation has been added as part of defining the interfaces.
# no-check-commit
Differential Revision: https://phab.mercurial-scm.org/D333