# HG changeset patch # User Gregory Szorc # Date 2018-08-28 22:37:55 # Node ID e5eb67dea6e86003e74ca910a7c713602c67cc55 # Parent 660879e49b46bb4e468239aab42f771c7eae5aba debugcommands: use our CBOR decoder It implements the set of CBOR needed for the wire protocol. Differential Revision: https://phab.mercurial-scm.org/D4469 diff --git a/mercurial/debugcommands.py b/mercurial/debugcommands.py --- a/mercurial/debugcommands.py +++ b/mercurial/debugcommands.py @@ -32,9 +32,6 @@ from .node import ( nullrev, short, ) -from .thirdparty import ( - cbor, -) from . import ( bundle2, changegroup, @@ -83,6 +80,7 @@ from . import ( wireprotov2peer, ) from .utils import ( + cborutil, dateutil, procutil, stringutil, @@ -3321,7 +3319,8 @@ def debugwireproto(ui, repo, path=None, if res.headers.get('Content-Type') == 'application/mercurial-cbor': ui.write(_('cbor> %s\n') % - stringutil.pprint(cbor.loads(body), bprefix=True, + stringutil.pprint(cborutil.decodeall(body)[0], + bprefix=True, indent=2)) elif action == 'close':