changeset 39449:e5eb67dea6e8

debugcommands: use our CBOR decoder It implements the set of CBOR needed for the wire protocol. Differential Revision: https://phab.mercurial-scm.org/D4469
author Gregory Szorc <gregory.szorc@gmail.com>
date Tue, 28 Aug 2018 15:37:55 -0700
parents 660879e49b46
children 9f51fd22ed50
files mercurial/debugcommands.py
diffstat 1 files changed, 3 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/debugcommands.py	Tue Aug 28 18:12:04 2018 -0700
+++ b/mercurial/debugcommands.py	Tue Aug 28 15:37:55 2018 -0700
@@ -32,9 +32,6 @@
     nullrev,
     short,
 )
-from .thirdparty import (
-    cbor,
-)
 from . import (
     bundle2,
     changegroup,
@@ -83,6 +80,7 @@
     wireprotov2peer,
 )
 from .utils import (
+    cborutil,
     dateutil,
     procutil,
     stringutil,
@@ -3321,7 +3319,8 @@
 
             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':