shlex.quote() is not happy to work on bytes in Python 3. Let's feed that with
unicodes.
This should make the py3 buildbot green.
hg-reviewers |
shlex.quote() is not happy to work on bytes in Python 3. Let's feed that with
unicodes.
This should make the py3 buildbot green.
Lint Skipped |
Unit Tests Skipped |
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.