D4237: grep: difflib sequencematcher opcodes are native strs
durin42 (Augie Fackler)
phabricator at mercurial-scm.org
Thu Aug 9 23:37:04 EDT 2018
This revision was automatically updated to reflect the committed changes.
Closed by commit rHG2525c4943c09: grep: difflib sequencematcher opcodes are native strs (authored by durin42, committed by ).
REPOSITORY
rHG Mercurial
CHANGES SINCE LAST UPDATE
https://phab.mercurial-scm.org/D4237?vs=10257&id=10267
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