diff -r 0664be4f0c1f -r ad1c07008e0b mercurial/debugcommands.py --- a/mercurial/debugcommands.py Sat Apr 14 09:57:44 2018 -0700 +++ b/mercurial/debugcommands.py Sat Apr 14 11:49:57 2018 -0700 @@ -2626,6 +2626,8 @@ ('', 'localssh', False, _('start an SSH server for this repo')), ('', 'peer', '', _('construct a specific version of the peer')), ('', 'noreadstderr', False, _('do not read from stderr of the remote')), + ('', 'nologhandshake', False, + _('do not log I/O related to the peer handshake')), ] + cmdutil.remoteopts, _('[PATH]'), optionalrepo=True) @@ -2921,8 +2923,14 @@ # the peer instance to be useful. with ui.configoverride({ ('experimental', 'httppeer.advertise-v2'): True}): + if opts['nologhandshake']: + ui.pushbuffer() + peer = httppeer.makepeer(ui, path, opener=opener) + if opts['nologhandshake']: + ui.popbuffer() + if not isinstance(peer, httppeer.httpv2peer): raise error.Abort(_('could not instantiate HTTP peer for ' 'wire protocol version 2'),