D4237: grep: difflib sequencematcher opcodes are native strs
durin42 (Augie Fackler)
phabricator at mercurial-scm.org
Fri Aug 10 03:20:38 UTC 2018
durin42 created this revision.
Herald added a subscriber: mercurial-devel.
Herald added a reviewer: hg-reviewers.
REPOSITORY
rHG Mercurial
REVISION DETAIL
https://phab.mercurial-scm.org/D4237
AFFECTED FILES
mercurial/commands.py
CHANGE DETAILS
diff --git a/mercurial/commands.py b/mercurial/commands.py
--- a/mercurial/commands.py
+++ b/mercurial/commands.py
@@ -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):
To: durin42, #hg-reviewers
Cc: mercurial-devel
More information about the Mercurial-devel
mailing list