mercurial/debugcommands.py
changeset 37718 ad1c07008e0b
parent 37652 fe8c6f9f2914
child 37720 d715a85003c8
equal deleted inserted replaced
37717:0664be4f0c1f 37718:ad1c07008e0b
  2624 @command('debugwireproto',
  2624 @command('debugwireproto',
  2625     [
  2625     [
  2626         ('', 'localssh', False, _('start an SSH server for this repo')),
  2626         ('', 'localssh', False, _('start an SSH server for this repo')),
  2627         ('', 'peer', '', _('construct a specific version of the peer')),
  2627         ('', 'peer', '', _('construct a specific version of the peer')),
  2628         ('', 'noreadstderr', False, _('do not read from stderr of the remote')),
  2628         ('', 'noreadstderr', False, _('do not read from stderr of the remote')),
       
  2629         ('', 'nologhandshake', False,
       
  2630          _('do not log I/O related to the peer handshake')),
  2629     ] + cmdutil.remoteopts,
  2631     ] + cmdutil.remoteopts,
  2630     _('[PATH]'),
  2632     _('[PATH]'),
  2631     optionalrepo=True)
  2633     optionalrepo=True)
  2632 def debugwireproto(ui, repo, path=None, **opts):
  2634 def debugwireproto(ui, repo, path=None, **opts):
  2633     """send wire protocol commands to a server
  2635     """send wire protocol commands to a server
  2919             ui.write(_('creating http peer for wire protocol version 2\n'))
  2921             ui.write(_('creating http peer for wire protocol version 2\n'))
  2920             # We go through makepeer() because we need an API descriptor for
  2922             # We go through makepeer() because we need an API descriptor for
  2921             # the peer instance to be useful.
  2923             # the peer instance to be useful.
  2922             with ui.configoverride({
  2924             with ui.configoverride({
  2923                 ('experimental', 'httppeer.advertise-v2'): True}):
  2925                 ('experimental', 'httppeer.advertise-v2'): True}):
       
  2926                 if opts['nologhandshake']:
       
  2927                     ui.pushbuffer()
       
  2928 
  2924                 peer = httppeer.makepeer(ui, path, opener=opener)
  2929                 peer = httppeer.makepeer(ui, path, opener=opener)
       
  2930 
       
  2931                 if opts['nologhandshake']:
       
  2932                     ui.popbuffer()
  2925 
  2933 
  2926             if not isinstance(peer, httppeer.httpv2peer):
  2934             if not isinstance(peer, httppeer.httpv2peer):
  2927                 raise error.Abort(_('could not instantiate HTTP peer for '
  2935                 raise error.Abort(_('could not instantiate HTTP peer for '
  2928                                     'wire protocol version 2'),
  2936                                     'wire protocol version 2'),
  2929                                   hint=_('the server may not have the feature '
  2937                                   hint=_('the server may not have the feature '