equal
deleted
inserted
replaced
3015 with peer.commandexecutor() as e: |
3015 with peer.commandexecutor() as e: |
3016 res = e.callcommand(command, args).result() |
3016 res = e.callcommand(command, args).result() |
3017 |
3017 |
3018 if isinstance(res, wireprotov2peer.commandresponse): |
3018 if isinstance(res, wireprotov2peer.commandresponse): |
3019 val = list(res.cborobjects()) |
3019 val = list(res.cborobjects()) |
3020 ui.status(_('response: %s\n') % stringutil.pprint(val)) |
3020 ui.status(_('response: %s\n') % |
|
3021 stringutil.pprint(val, bprefix=True)) |
3021 |
3022 |
3022 else: |
3023 else: |
3023 ui.status(_('response: %s\n') % stringutil.pprint(res)) |
3024 ui.status(_('response: %s\n') % |
|
3025 stringutil.pprint(res, bprefix=True)) |
3024 |
3026 |
3025 elif action == 'batchbegin': |
3027 elif action == 'batchbegin': |
3026 if batchedcommands is not None: |
3028 if batchedcommands is not None: |
3027 raise error.Abort(_('nested batchbegin not allowed')) |
3029 raise error.Abort(_('nested batchbegin not allowed')) |
3028 |
3030 |
3090 except util.urlerr.urlerror as e: |
3092 except util.urlerr.urlerror as e: |
3091 e.read() |
3093 e.read() |
3092 continue |
3094 continue |
3093 |
3095 |
3094 if res.headers.get('Content-Type') == 'application/mercurial-cbor': |
3096 if res.headers.get('Content-Type') == 'application/mercurial-cbor': |
3095 ui.write(_('cbor> %s\n') % stringutil.pprint(cbor.loads(body))) |
3097 ui.write(_('cbor> %s\n') % |
|
3098 stringutil.pprint(cbor.loads(body), bprefix=True)) |
3096 |
3099 |
3097 elif action == 'close': |
3100 elif action == 'close': |
3098 peer.close() |
3101 peer.close() |
3099 elif action == 'readavailable': |
3102 elif action == 'readavailable': |
3100 if not stdout or not stderr: |
3103 if not stdout or not stderr: |