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

martinvonz (Martin von Zweigbergk) phabricator at mercurial-scm.org
Mon Sep 2 02:44:51 EDT 2019


martinvonz added a comment.


  In D6775#99509 <https://phab.mercurial-scm.org/D6775#99509>, @yuja wrote:
  
  >> - 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.
  
  Sounds reasonable. I'll send a follow-up patch. Feel free to apply it on top of fold it in.

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