D3631: py3: use pycompat.fsencode to convert path to bytes

yuja (Yuya Nishihara) phabricator at mercurial-scm.org
Tue May 22 07:20:13 EDT 2018


yuja added a comment.


  >   - a/contrib/hg-ssh +++ b/contrib/hg-ssh @@ -39,6 +39,7 @@
  > 
  >     from mercurial import ( dispatch, +    pycompat, ui as uimod, )
  > 
  >     @@ -69,7 +70,7 @@ 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']
  
  It's probably better to convert sys.argv and cwd to bytes. Otherwise we'll
  have to be a human type checker.

REPOSITORY
  rHG Mercurial

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

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


More information about the Mercurial-devel mailing list