grep: difflib sequencematcher opcodes are native strs
authorAugie Fackler <augie@google.com>
Thu, 09 Aug 2018 23:12:44 -0400
changeset 39041 2525c4943c09
parent 39040 f76c1343859d
child 39042 9126a4034621
grep: difflib sequencematcher opcodes are native strs Differential Revision: https://phab.mercurial-scm.org/D4237
mercurial/commands.py
--- a/mercurial/commands.py	Thu Aug 09 21:59:32 2018 -0400
+++ b/mercurial/commands.py	Thu Aug 09 23:12:44 2018 -0400
@@ -2608,13 +2608,13 @@
     def difflinestates(a, b):
         sm = difflib.SequenceMatcher(None, a, b)
         for tag, alo, ahi, blo, bhi in sm.get_opcodes():
-            if tag == 'insert':
+            if tag == r'insert':
                 for i in pycompat.xrange(blo, bhi):
                     yield ('+', b[i])
-            elif tag == 'delete':
+            elif tag == r'delete':
                 for i in pycompat.xrange(alo, ahi):
                     yield ('-', a[i])
-            elif tag == 'replace':
+            elif tag == r'replace':
                 for i in pycompat.xrange(alo, ahi):
                     yield ('-', a[i])
                 for i in pycompat.xrange(blo, bhi):