changeset 32523:1fb0a85fb20e

py3: use pycompat.bytestr so that we don't get ascii values This fixes `hg files 'set:(**.py)'` which makes test-check-py3-compat.t able to run on Python 3. So if you now do `python3 ./run-tests.py test-check-py3-compat`, the test will actually run.
author Pulkit Goyal <7895pulkit@gmail.com>
date Mon, 29 May 2017 16:21:15 +0530
parents 9ed70525fd6e
children 6e9a2c9c1f37
files mercurial/fileset.py
diffstat 1 files changed, 2 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/fileset.py	Mon May 29 16:08:37 2017 +0530
+++ b/mercurial/fileset.py	Mon May 29 16:21:15 2017 +0530
@@ -14,6 +14,7 @@
     error,
     merge,
     parser,
+    pycompat,
     registrar,
     scmutil,
     util,
@@ -43,6 +44,7 @@
 
 def tokenize(program):
     pos, l = 0, len(program)
+    program = pycompat.bytestr(program)
     while pos < l:
         c = program[pos]
         if c.isspace(): # skip inter-token whitespace