# HG changeset patch # User Gregory Szorc # Date 1523745491 25200 # Node ID 5cdde615842633ae3f941447b82acb233a6924ae # Parent 0c184ca594bb859a774915b07e8d3aa59b77c86a wireprotov2: remove support for sending bytes response We recently declared that all responses must be CBOR. So remove support for sending a type that isn't CBOR data. Differential Revision: https://phab.mercurial-scm.org/D3387 diff -r 0c184ca594bb -r 5cdde6158426 mercurial/wireprotov2server.py --- a/mercurial/wireprotov2server.py Sat Apr 14 15:36:12 2018 -0700 +++ b/mercurial/wireprotov2server.py Sat Apr 14 15:38:11 2018 -0700 @@ -301,11 +301,7 @@ res.status = b'200 OK' res.headers[b'Content-Type'] = FRAMINGTYPE - if isinstance(rsp, wireprototypes.bytesresponse): - action, meta = reactor.oncommandresponseready(outstream, - command['requestid'], - rsp.data) - elif isinstance(rsp, wireprototypes.cborresponse): + if isinstance(rsp, wireprototypes.cborresponse): encoded = cbor.dumps(rsp.value, canonical=True) action, meta = reactor.oncommandresponseready(outstream, command['requestid'],