equal
deleted
inserted
replaced
81 url as urlmod, |
81 url as urlmod, |
82 util, |
82 util, |
83 vfs as vfsmod, |
83 vfs as vfsmod, |
84 wireprotoframing, |
84 wireprotoframing, |
85 wireprotoserver, |
85 wireprotoserver, |
|
86 wireprotov2peer, |
86 ) |
87 ) |
87 from .utils import ( |
88 from .utils import ( |
88 dateutil, |
89 dateutil, |
89 procutil, |
90 procutil, |
90 stringutil, |
91 stringutil, |
3010 stringutil.escapestr(output)) |
3011 stringutil.escapestr(output)) |
3011 else: |
3012 else: |
3012 with peer.commandexecutor() as e: |
3013 with peer.commandexecutor() as e: |
3013 res = e.callcommand(command, args).result() |
3014 res = e.callcommand(command, args).result() |
3014 |
3015 |
3015 ui.status(_('response: %s\n') % stringutil.pprint(res)) |
3016 if isinstance(res, wireprotov2peer.commandresponse): |
|
3017 if res.cbor: |
|
3018 val = list(res.cborobjects()) |
|
3019 else: |
|
3020 val = [res.b.getvalue()] |
|
3021 |
|
3022 ui.status(_('response: %s\n') % stringutil.pprint(val)) |
|
3023 |
|
3024 else: |
|
3025 ui.status(_('response: %s\n') % stringutil.pprint(res)) |
3016 |
3026 |
3017 elif action == 'batchbegin': |
3027 elif action == 'batchbegin': |
3018 if batchedcommands is not None: |
3028 if batchedcommands is not None: |
3019 raise error.Abort(_('nested batchbegin not allowed')) |
3029 raise error.Abort(_('nested batchbegin not allowed')) |
3020 |
3030 |