grep: difflib sequencematcher opcodes are native strs
Differential Revision: https://phab.mercurial-scm.org/D4237
--- 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):