mercurial/hgweb/webutil.py
changeset 36183 44a519ec5077
parent 36180 34e850440271
child 36258 af0a19d8812b
--- a/mercurial/hgweb/webutil.py	Wed Feb 14 15:58:11 2018 +0530
+++ b/mercurial/hgweb/webutil.py	Wed Feb 14 16:06:54 2018 +0530
@@ -626,7 +626,7 @@
         # delimiters. the replace format and flags are optional, but
         # delimiters are required.
         match = re.match(
-            r'^s%s(.+)(?:(?<=\\\\)|(?<!\\))%s(.*)%s([ilmsux])*$'
+            br'^s%s(.+)(?:(?<=\\\\)|(?<!\\))%s(.*)%s([ilmsux])*$'
             % (delim, delim, delim), pattern)
         if not match:
             repo.ui.warn(_("websub: invalid pattern for %s: %s\n")
@@ -634,7 +634,7 @@
             continue
 
         # we need to unescape the delimiter for regexp and format
-        delim_re = re.compile(r'(?<!\\)\\%s' % delim)
+        delim_re = re.compile(br'(?<!\\)\\%s' % delim)
         regexp = delim_re.sub(unesc, match.group(1))
         format = delim_re.sub(unesc, match.group(2))