mercurial/help/internals/wireprotocol.txt
changeset 37319 36d17f37db91
parent 37299 e9aadee698cf
child 37393 afcfdf53e4b5
equal deleted inserted replaced
37318:9954d0e2ad00 37319:36d17f37db91
   697 ``%`` followed by that character. However, future versions of the
   697 ``%`` followed by that character. However, future versions of the
   698 wire protocol reserve the right to allow clients to opt in to receiving
   698 wire protocol reserve the right to allow clients to opt in to receiving
   699 formatting strings with additional formatters, hence why ``%%`` is
   699 formatting strings with additional formatters, hence why ``%%`` is
   700 required to represent the literal ``%``.
   700 required to represent the literal ``%``.
   701 
   701 
   702 The raw frame consists of a series of data structures representing
   702 The frame payload consists of a CBOR array of CBOR maps. Each map
   703 textual atoms to print. Each atom begins with a struct defining the
   703 defines an *atom* of text data to print. Each *atom* has the following
   704 size of the data that follows:
   704 bytestring keys:
   705 
   705 
   706 * A 16-bit little endian unsigned integer denoting the length of the
   706 msg
   707   formatting string.
   707    (bytestring) The formatting string. Content MUST be ASCII.
   708 * An 8-bit unsigned integer denoting the number of label strings
   708 args (optional)
   709   that follow.
   709    Array of bytestrings defining arguments to the formatting string.
   710 * An 8-bit unsigned integer denoting the number of formatting string
   710 labels (optional)
   711   arguments strings that follow.
   711    Array of bytestrings defining labels to apply to this atom.
   712 * An array of 8-bit unsigned integers denoting the lengths of
       
   713   *labels* data.
       
   714 * An array of 16-bit unsigned integers denoting the lengths of
       
   715   formatting strings.
       
   716 * The formatting string, encoded as UTF-8.
       
   717 * 0 or more ASCII strings defining labels to apply to this atom.
       
   718 * 0 or more UTF-8 strings that will be used as arguments to the
       
   719   formatting string.
       
   720 
       
   721 TODO use ASCII for formatting string.
       
   722 
   712 
   723 All data to be printed MUST be encoded into a single frame: this frame
   713 All data to be printed MUST be encoded into a single frame: this frame
   724 does not support spanning data across multiple frames.
   714 does not support spanning data across multiple frames.
   725 
   715 
   726 All textual data encoded in these frames is assumed to be line delimited.
   716 All textual data encoded in these frames is assumed to be line delimited.