--- a/hgext/keyword.py Tue Sep 04 17:33:59 2018 +0300
+++ b/hgext/keyword.py Tue Sep 04 17:53:54 2018 +0300
@@ -208,7 +208,7 @@
def _shrinktext(text, subfunc):
'''Helper for keyword expansion removal in text.
Depending on subfunc also returns number of substitutions.'''
- return subfunc(r'$\1$', text)
+ return subfunc(br'$\1$', text)
def _preselect(wstatus, changed):
'''Retrieves modified and added files from a working directory state
@@ -250,12 +250,12 @@
@util.propertycache
def rekw(self):
'''Returns regex for unexpanded keywords.'''
- return re.compile(r'\$(%s)\$' % self.escape)
+ return re.compile(br'\$(%s)\$' % self.escape)
@util.propertycache
def rekwexp(self):
'''Returns regex for expanded keywords.'''
- return re.compile(r'\$(%s): [^$\n\r]*? \$' % self.escape)
+ return re.compile(br'\$(%s): [^$\n\r]*? \$' % self.escape)
def substitute(self, data, path, ctx, subfunc):
'''Replaces keywords in data with expanded template.'''