indygreg created this revision.
Herald added a subscriber: mercurial-devel.
Herald added a reviewer: hg-reviewers.

REVISION SUMMARY
  We may eventually want a separate frame type for this. But for
  now this is the easiest to implement.

REPOSITORY
  rHG Mercurial

REVISION DETAIL
  https://phab.mercurial-scm.org/D2986

AFFECTED FILES
  mercurial/help/internals/wireprotocol.txt
  mercurial/wireprotoframing.py

CHANGE DETAILS

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
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.
 



To: indygreg, #hg-reviewers
Cc: mercurial-devel
_______________________________________________
Mercurial-devel mailing list
Mercurial-devel@mercurial-scm.org
https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel

Reply via email to