This is an archive of the discontinued Mercurial Phabricator instance.

wireprotov2: change command response protocol to include a leading map
ClosedPublic

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

Details

Summary

The error handling mechanism for the new wire protocol isn't very
well-defined. This commit takes us a step in the right direction
by introducing a leading CBOR map for command responses. This map
will contain an overall result of the command.

Currently, the map indicates whether the command was overall
successful or if an error occurred. And if an error occurred, that
error is present in the map.

There is still a dedicated error frame. My intent is to use that
for protocol-level errors and for errors that are encountered after
the initial response frame has been sent. This will be clarified in a
later commit.

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.