changeset 36267:08f061a48a8f

py3: make regexp patterns bytes in extdiff
author Yuya Nishihara <yuya@tcha.org>
date Sat, 17 Feb 2018 18:15:37 +0900
parents 1fa33bd848ee
children be5a6fe3643a
files hgext/extdiff.py
diffstat 1 files changed, 4 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/hgext/extdiff.py	Sat Feb 17 18:14:51 2018 +0900
+++ b/hgext/extdiff.py	Sat Feb 17 18:15:37 2018 +0900
@@ -88,12 +88,12 @@
 configtable = {}
 configitem = registrar.configitem(configtable)
 
-configitem('extdiff', r'opts\..*',
+configitem('extdiff', br'opts\..*',
     default='',
     generic=True,
 )
 
-configitem('diff-tools', r'.*\.diffargs$',
+configitem('diff-tools', br'.*\.diffargs$',
     default=None,
     generic=True,
 )
@@ -279,8 +279,8 @@
             return pre + util.shellquote(replace[key])
 
         # Match parent2 first, so 'parent1?' will match both parent1 and parent
-        regex = (r'''(['"]?)([^\s'"$]*)'''
-                 r'\$(parent2|parent1?|child|plabel1|plabel2|clabel|root)\1')
+        regex = (br'''(['"]?)([^\s'"$]*)'''
+                 br'\$(parent2|parent1?|child|plabel1|plabel2|clabel|root)\1')
         if not do3way and not re.search(regex, cmdline):
             cmdline += ' $parent1 $child'
         cmdline = re.sub(regex, quote, cmdline)