[PATCH 2 of 6 py3] match: make regular expression bytes to prevent TypeError
Pulkit Goyal
7895pulkit at gmail.com
Thu Mar 16 00:13:17 EDT 2017
# HG changeset patch
# User Pulkit Goyal <7895pulkit at gmail.com>
# Date 1489630967 -19800
# Thu Mar 16 07:52:47 2017 +0530
# Node ID 40704098853f291c09687cdebd5998ea7e3f01ff
# Parent 1fc3d1f02865b105d25ec6d51148dd7a0745e3cf
match: make regular expression bytes to prevent TypeError
diff -r 1fc3d1f02865 -r 40704098853f 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:
More information about the Mercurial-devel
mailing list