Mercurial > hg-stable
changeset 42889:acf80f9edc85
py3: drop incorrect fsencode(findexe(...)) in procutil
I recently added the bad call, thinking that findexe() was a standard
library function returning a string result, but it's actually our own
function returning bytes. Thanks to Yuya for noticing.
Differential Revision: https://phab.mercurial-scm.org/D6826
author | Martin von Zweigbergk <martinvonz@google.com> |
---|---|
date | Thu, 05 Sep 2019 16:32:33 -0700 |
parents | 3bed541aa65d |
children | 775224e26d74 |
files | mercurial/utils/procutil.py |
diffstat | 1 files changed, 2 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/utils/procutil.py Sat Sep 07 10:08:47 2019 -0700 +++ b/mercurial/utils/procutil.py Thu Sep 05 16:32:33 2019 -0700 @@ -245,11 +245,8 @@ pycompat.fsencode(getattr(mainmod, '__file__', ''))) == 'hg'): _sethgexecutable(pycompat.fsencode(mainmod.__file__)) else: - exe = findexe('hg') - if exe: - _sethgexecutable(pycompat.fsencode(exe)) - else: - _sethgexecutable(os.path.basename(pycompat.sysargv[0])) + _sethgexecutable(findexe('hg') or + os.path.basename(pycompat.sysargv[0])) return _hgexecutable def _sethgexecutable(path):