# HG changeset patch # User Pulkit Goyal <7895pulkit@gmail.com> # Date 2018-05-20 12:05:57 # Node ID 666d90ace0bb4a8f9a03ff1476d7b3a7b6fe4d20 # Parent e69628f361966858e13b199aa217a8bfe867cb22 py3: use pycompat.fsencode to convert path to bytes Differential Revision: https://phab.mercurial-scm.org/D3631 diff --git a/contrib/hg-ssh b/contrib/hg-ssh --- a/contrib/hg-ssh +++ b/contrib/hg-ssh @@ -39,6 +39,7 @@ import hgdemandimport ; hgdemandimport.e from mercurial import ( dispatch, + pycompat, ui as uimod, ) @@ -69,7 +70,7 @@ def main(): path = cmdargv[2] repo = os.path.normpath(os.path.join(cwd, os.path.expanduser(path))) if repo in allowed_paths: - cmd = [b'-R', repo, b'serve', b'--stdio'] + cmd = [b'-R', pycompat.fsencode(repo), b'serve', b'--stdio'] req = dispatch.request(cmd) if readonly: if not req.ui: