This is an archive of the discontinued Mercurial Phabricator instance.

repository: formalize wire protocol interface
ClosedPublic

Authored by indygreg on Aug 11 2017, 12:20 AM.

Details

Summary

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.

Diff Detail

Repository
rHG Mercurial
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

indygreg created this revision.Aug 11 2017, 12:20 AM
durin42 added inline comments.
mercurial/repository.py
68

spelling: interfac

226

Probably also note that at the wireprotocol layer, it is known that not all peers stream batch responses, so it may not behave as a streaming response even though it's a generator (specifically ssh behaves this way)

indygreg updated this revision to Diff 848.Aug 13 2017, 2:18 PM
This revision was automatically updated to reflect the committed changes.