diff --git a/mercurial/help/internals/wireprotocol.txt b/mercurial/help/internals/wireprotocol.txt --- a/mercurial/help/internals/wireprotocol.txt +++ b/mercurial/help/internals/wireprotocol.txt @@ -631,19 +631,21 @@ server. The command has been fully issued and no new data for this command will be sent. The next frame will belong to a new command. -Bytes Response Data (``0x04``) ------------------------------- +Response Data (``0x04``) +------------------------ -This frame contains raw bytes response data to an issued command. +This frame contains raw response data to an issued command. The following flag values are defined for this type: 0x01 - Data continuation. When set, an additional frame containing raw - response data will follow. + Data continuation. When set, an additional frame containing response data + will follow. 0x02 - End of data. When sent, the response data has been fully sent and + End of data. When set, the response data has been fully sent and no additional frames for this response will be sent. +0x04 + CBOR data. When set, the frame payload consists of CBOR data. The ``0x01`` flag is mutually exclusive with the ``0x02`` flag. diff --git a/mercurial/wireprotoframing.py b/mercurial/wireprotoframing.py --- a/mercurial/wireprotoframing.py +++ b/mercurial/wireprotoframing.py @@ -79,10 +79,12 @@ FLAG_BYTES_RESPONSE_CONTINUATION = 0x01 FLAG_BYTES_RESPONSE_EOS = 0x02 +FLAG_BYTES_RESPONSE_CBOR = 0x04 FLAGS_BYTES_RESPONSE = { b'continuation': FLAG_BYTES_RESPONSE_CONTINUATION, b'eos': FLAG_BYTES_RESPONSE_EOS, + b'cbor': FLAG_BYTES_RESPONSE_CBOR, } FLAG_ERROR_RESPONSE_PROTOCOL = 0x01