D4432: py3: do .decode(), .encode() dance in runtests.py

yuja (Yuya Nishihara) phabricator at mercurial-scm.org
Sat Sep 1 00:29:23 UTC 2018


yuja added a comment.


  >   def toggletrace(cmd):
  > 
  > - quoted = shellquote(cmd.strip()).replace(b'\\', b'\\\\') +            cmd = cmd.decode('ascii') +            quoted = shellquote(cmd.strip()).encode('ascii') +            quoted = quoted.replace(b'\\', b'\\\\')
  
  Perhaps _bytespath/_strpath can be used to avoid possible side effect on
  Python 2.

REPOSITORY
  rHG Mercurial

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

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


More information about the Mercurial-devel mailing list