Mercurial > hg
changeset 42838:f1f9ad5ae4f8
py3: convert hg executable path to bytes in missing case in procutil
We (Google) noticed this in our tests when we use chg and a hg wrapper
script not called 'hg'. The executable then ended up being a native
string, which then failed in chgserver when trying to convert the
environment dict to a byte string.
Differential Revision: https://phab.mercurial-scm.org/D6775
author | Martin von Zweigbergk <martinvonz@google.com> |
---|---|
date | Thu, 29 Aug 2019 23:38:24 -0700 |
parents | cde1c101ab8a |
children | ee0f511b7a22 |
files | mercurial/utils/procutil.py |
diffstat | 1 files changed, 1 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/utils/procutil.py Sat Aug 31 10:26:39 2019 -0700 +++ b/mercurial/utils/procutil.py Thu Aug 29 23:38:24 2019 -0700 @@ -246,7 +246,7 @@ _sethgexecutable(pycompat.fsencode(mainmod.__file__)) else: exe = findexe('hg') or os.path.basename(sys.argv[0]) - _sethgexecutable(exe) + _sethgexecutable(pycompat.fsencode(exe)) return _hgexecutable def _sethgexecutable(path):