[PATCH 1 of 2] py3: use raw string in comparison
Rishabh Madan
rishabhmadan96 at gmail.com
Tue Mar 14 21:22:30 UTC 2017
# HG changeset patch
# User Rishabh Madan <rishabhmadan96 at gmail.com>
# Date 1489516332 -19800
# Wed Mar 15 00:02:12 2017 +0530
# Node ID edfffaa46e84e546decb48107bc303888ee5501d
# Parent 37acdf027ae2575e7e280c97889a80f1dbd20e98
py3: use raw string in comparison
diff -r 37acdf027ae2 -r edfffaa46e84 mercurial/match.py
--- a/mercurial/match.py Sun Mar 12 11:47:02 2017 -0700
+++ b/mercurial/match.py Wed Mar 15 00:02:12 2017 +0530
@@ -742,7 +742,7 @@
fp = open(filepath)
for lineno, line in enumerate(util.iterfile(fp), start=1):
- if "#" in line:
+ if r"#" in line:
global _commentre
if not _commentre:
_commentre = util.re.compile(r'((?:^|[^\\])(?:\\\\)*)#.*')
@@ -756,7 +756,7 @@
if not line:
continue
- if line.startswith('syntax:'):
+ if line.startswith(r'syntax:'):
s = line[7:].strip()
try:
syntax = syntaxes[s]
More information about the Mercurial-devel
mailing list