comparison mercurial/debugcommands.py @ 51824:b08de326bee4

debugwireproto: redo logging to also work for https
author Joerg Sonnenberger <joerg@bec.de>
date Sun, 30 Jun 2024 02:46:53 +0200
parents 15e680a44502
children f4733654f144
comparison
equal deleted inserted replaced
51823:ace0da86edd0 51824:b08de326bee4
4508 elif path: 4508 elif path:
4509 # We bypass hg.peer() so we can proxy the sockets. 4509 # We bypass hg.peer() so we can proxy the sockets.
4510 # TODO consider not doing this because we skip 4510 # TODO consider not doing this because we skip
4511 # ``hg.wirepeersetupfuncs`` and potentially other useful functionality. 4511 # ``hg.wirepeersetupfuncs`` and potentially other useful functionality.
4512 u = urlutil.url(path) 4512 u = urlutil.url(path)
4513 if u.scheme != b'http': 4513 if u.scheme not in (b'http', b'https'):
4514 raise error.Abort(_(b'only http:// paths are currently supported')) 4514 raise error.Abort(
4515 _(b'only http:// and https:// paths are currently supported')
4516 )
4515 4517
4516 url, authinfo = u.authinfo() 4518 url, authinfo = u.authinfo()
4517 openerargs = { 4519 openerargs = {
4518 'useragent': b'Mercurial debugwireproto', 4520 'useragent': b'Mercurial debugwireproto',
4519 } 4521 }