[PATCH 2 of 8] py3: make regexp literal bytes in templatefilters.py

Yuya Nishihara yuya at tcha.org
Thu Mar 1 09:17:09 EST 2018


# HG changeset patch
# User Yuya Nishihara <yuya at tcha.org>
# Date 1519904409 18000
#      Thu Mar 01 06:40:09 2018 -0500
# Node ID 4c40aaa3fe1cdee62898dcd43840a070b76eb79b
# Parent  905fd8fbfd54838f8e079719e5ada074d975b824
py3: make regexp literal bytes in templatefilters.py

# skip-blame because just b'' prefixes

diff --git a/mercurial/templatefilters.py b/mercurial/templatefilters.py
--- a/mercurial/templatefilters.py
+++ b/mercurial/templatefilters.py
@@ -145,7 +145,7 @@ def fill(text, width, initindent='', han
     global para_re, space_re
     if para_re is None:
         para_re = re.compile('(\n\n|\n\\s*[-*]\\s*)', re.M)
-        space_re = re.compile(r'  +')
+        space_re = re.compile(br'  +')
 
     def findparas():
         start = 0


More information about the Mercurial-devel mailing list