Mercurial > hg
changeset 38107:44ef9bb7ccd9
py3: add b'' prefixes in contrib/hg-ssh
# skip-blame because just b'' prefixes
Differential Revision: https://phab.mercurial-scm.org/D3629
author | Pulkit Goyal <7895pulkit@gmail.com> |
---|---|
date | Sun, 20 May 2018 17:33:18 +0530 |
parents | a0e4d654bceb |
children | e69628f36196 |
files | contrib/hg-ssh |
diffstat | 1 files changed, 6 insertions(+), 6 deletions(-) [+] |
line wrap: on
line diff
--- a/contrib/hg-ssh Fri May 18 16:28:45 2018 +0530 +++ b/contrib/hg-ssh Sun May 20 17:33:18 2018 +0530 @@ -69,15 +69,15 @@ path = cmdargv[2] repo = os.path.normpath(os.path.join(cwd, os.path.expanduser(path))) if repo in allowed_paths: - cmd = ['-R', repo, 'serve', '--stdio'] + cmd = [b'-R', repo, b'serve', b'--stdio'] req = dispatch.request(cmd) if readonly: if not req.ui: req.ui = uimod.ui.load() - req.ui.setconfig('hooks', 'pretxnopen.hg-ssh', - 'python:__main__.rejectpush', 'hg-ssh') - req.ui.setconfig('hooks', 'prepushkey.hg-ssh', - 'python:__main__.rejectpush', 'hg-ssh') + req.ui.setconfig(b'hooks', b'pretxnopen.hg-ssh', + b'python:__main__.rejectpush', b'hg-ssh') + req.ui.setconfig(b'hooks', b'prepushkey.hg-ssh', + b'python:__main__.rejectpush', b'hg-ssh') dispatch.dispatch(req) else: sys.stderr.write('Illegal repository "%s"\n' % repo) @@ -87,7 +87,7 @@ sys.exit(255) def rejectpush(ui, **kwargs): - ui.warn(("Permission denied\n")) + ui.warn((b"Permission denied\n")) # mercurial hooks use unix process conventions for hook return values # so a truthy return means failure return True