diff --git a/mercurial/fileset.py b/mercurial/fileset.py --- a/mercurial/fileset.py +++ b/mercurial/fileset.py @@ -14,6 +14,7 @@ from . import ( error, merge, parser, + pycompat, registrar, scmutil, util, @@ -43,6 +44,7 @@ globchars = ".*{}[]?/\\_" 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