Mercurial > hg
changeset 39041:2525c4943c09
grep: difflib sequencematcher opcodes are native strs
Differential Revision: https://phab.mercurial-scm.org/D4237
author | Augie Fackler <augie@google.com> |
---|---|
date | Thu, 09 Aug 2018 23:12:44 -0400 |
parents | f76c1343859d |
children | 9126a4034621 |
files | mercurial/commands.py |
diffstat | 1 files changed, 3 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- 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):