match: make regular expression bytes to prevent TypeError
authorPulkit Goyal <7895pulkit@gmail.com>
Thu, 16 Mar 2017 07:52:47 +0530
changeset 31420 40704098853f
parent 31419 1fc3d1f02865
child 31421 5c9cda37d7f6
match: make regular expression bytes to prevent TypeError
mercurial/match.py
--- a/mercurial/match.py	Thu Mar 16 06:32:33 2017 +0530
+++ b/mercurial/match.py	Thu Mar 16 07:52:47 2017 +0530
@@ -747,7 +747,7 @@
         if "#" in line:
             global _commentre
             if not _commentre:
-                _commentre = util.re.compile(r'((?:^|[^\\])(?:\\\\)*)#.*')
+                _commentre = util.re.compile(br'((?:^|[^\\])(?:\\\\)*)#.*')
             # remove comments prefixed by an even number of escapes
             m = _commentre.search(line)
             if m: