Wed, 28 Mar 2018 14:52:57 -0700 stringutil: add function to pretty print an object
Gregory Szorc <gregory.szorc@gmail.com> [Wed, 28 Mar 2018 14:52:57 -0700] rev 37300
stringutil: add function to pretty print an object This is inspired by the pprint() module/function (which we can't use because the output is different on Python 2 and 3 - namely the use of b'' literals). We hook it up to `hg debugwireproto` for printing the response to a wire protocol command. This foreshadows future peer work, which will support decoding CBOR responses into rich data structures. Differential Revision: https://phab.mercurial-scm.org/D2987
Wed, 28 Mar 2018 13:30:24 -0700 wireproto: add frame flag to denote payloads as CBOR
Gregory Szorc <gregory.szorc@gmail.com> [Wed, 28 Mar 2018 13:30:24 -0700] rev 37299
wireproto: add frame flag to denote payloads as CBOR We may eventually want a separate frame type for this. But for now this is the easiest to implement. Differential Revision: https://phab.mercurial-scm.org/D2986
Wed, 28 Mar 2018 13:01:28 -0700 wireproto: implement custom __repr__ for frame
Gregory Szorc <gregory.szorc@gmail.com> [Wed, 28 Mar 2018 13:01:28 -0700] rev 37298
wireproto: implement custom __repr__ for frame This version won't print the full payload (which could be large). It also prints human friendly values for types and flags. Differential Revision: https://phab.mercurial-scm.org/D2985
(0) -30000 -10000 -3000 -1000 -300 -100 -30 -10 -3 +3 +10 +30 +100 +300 +1000 +3000 +10000 tip