mercurial/debugcommands.py
changeset 39378 0f549da54379
parent 39330 655b5b465953
child 39449 e5eb67dea6e8
equal deleted inserted replaced
39377:b4e7e1f09c09 39378:0f549da54379
  3242                     res = e.callcommand(command, args).result()
  3242                     res = e.callcommand(command, args).result()
  3243 
  3243 
  3244                 if isinstance(res, wireprotov2peer.commandresponse):
  3244                 if isinstance(res, wireprotov2peer.commandresponse):
  3245                     val = list(res.cborobjects())
  3245                     val = list(res.cborobjects())
  3246                     ui.status(_('response: %s\n') %
  3246                     ui.status(_('response: %s\n') %
  3247                               stringutil.pprint(val, bprefix=True))
  3247                               stringutil.pprint(val, bprefix=True, indent=2))
  3248 
       
  3249                 else:
  3248                 else:
  3250                     ui.status(_('response: %s\n') %
  3249                     ui.status(_('response: %s\n') %
  3251                               stringutil.pprint(res, bprefix=True))
  3250                               stringutil.pprint(res, bprefix=True, indent=2))
  3252 
  3251 
  3253         elif action == 'batchbegin':
  3252         elif action == 'batchbegin':
  3254             if batchedcommands is not None:
  3253             if batchedcommands is not None:
  3255                 raise error.Abort(_('nested batchbegin not allowed'))
  3254                 raise error.Abort(_('nested batchbegin not allowed'))
  3256 
  3255 
  3320                 getattr(e, 'read', lambda: None)()
  3319                 getattr(e, 'read', lambda: None)()
  3321                 continue
  3320                 continue
  3322 
  3321 
  3323             if res.headers.get('Content-Type') == 'application/mercurial-cbor':
  3322             if res.headers.get('Content-Type') == 'application/mercurial-cbor':
  3324                 ui.write(_('cbor> %s\n') %
  3323                 ui.write(_('cbor> %s\n') %
  3325                          stringutil.pprint(cbor.loads(body), bprefix=True))
  3324                          stringutil.pprint(cbor.loads(body), bprefix=True,
       
  3325                                            indent=2))
  3326 
  3326 
  3327         elif action == 'close':
  3327         elif action == 'close':
  3328             peer.close()
  3328             peer.close()
  3329         elif action == 'readavailable':
  3329         elif action == 'readavailable':
  3330             if not stdout or not stderr:
  3330             if not stdout or not stderr: