--- a/mercurial/debugcommands.py Sat Apr 14 11:50:19 2018 -0700
+++ b/mercurial/debugcommands.py Sat Apr 14 11:46:08 2018 -0700
@@ -83,6 +83,7 @@
vfs as vfsmod,
wireprotoframing,
wireprotoserver,
+ wireprotov2peer,
)
from .utils import (
dateutil,
@@ -3012,7 +3013,16 @@
with peer.commandexecutor() as e:
res = e.callcommand(command, args).result()
- ui.status(_('response: %s\n') % stringutil.pprint(res))
+ if isinstance(res, wireprotov2peer.commandresponse):
+ if res.cbor:
+ val = list(res.cborobjects())
+ else:
+ val = [res.b.getvalue()]
+
+ ui.status(_('response: %s\n') % stringutil.pprint(val))
+
+ else:
+ ui.status(_('response: %s\n') % stringutil.pprint(res))
elif action == 'batchbegin':
if batchedcommands is not None: