This is an archive of the discontinued Mercurial Phabricator instance.

wireprotov2: decode responses to their expected types
ClosedPublic

Authored by indygreg on Apr 14 2018, 8:21 PM.

Details

Summary

Callers of established wire protocol commands expect the
response from that command to be decoded into a data structure.
It's not very useful if callers get back a stream of bytes and
don't know how they should be interpreted - especially since that
stream of bytes varies by wire protocol and even the transport
within that protocol version.

This commit establishes decoding functions for various command
responses so callers of those commands get the response type
they expect.

In theory, this should make the version 2 HTTP peer usable for
various operations. But I haven't tested to confirm.

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.Apr 14 2018, 8:21 PM
durin42 accepted this revision.Apr 16 2018, 6:52 PM
This revision is now accepted and ready to land.Apr 16 2018, 6:52 PM
This revision was automatically updated to reflect the committed changes.