D6775: py3: convert hg executable path to bytes in missing case in procutil

yuja (Yuya Nishihara) phabricator at mercurial-scm.org
Sat Aug 31 23:02:37 EDT 2019


yuja added a comment.


  > - a/mercurial/utils/procutil.py
  >
  > +++ b/mercurial/utils/procutil.py
  > @@ -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))
  
  Perhaps, `pycompat.sysargv` has to be used instead. Applying `fsencode()`
  on `sys.argv` might be incorrect on Windows.

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST ACTION
  https://phab.mercurial-scm.org/D6775/new/

REVISION DETAIL
  https://phab.mercurial-scm.org/D6775

To: martinvonz, #hg-reviewers, pulkit
Cc: yuja, mercurial-devel


More information about the Mercurial-devel mailing list