Patchwork D5925: py3: use raw strings and %d for formatting

login
register
mail settings
Submitter phabricator
Date Feb. 11, 2019, 2 a.m.
Message ID <aa1286e634bfbf14b966a842521e5351@localhost.localdomain>
Download mbox | patch
Permalink /patch/38657/
State Not Applicable
Headers show

Comments

phabricator - Feb. 11, 2019, 2 a.m.
This revision was automatically updated to reflect the committed changes.
Closed by commit rHG34ae00a14783: py3: use raw strings and %d for formatting (authored by indygreg, committed by ).

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D5925?vs=14006&id=14012

REVISION DETAIL
  https://phab.mercurial-scm.org/D5925

AFFECTED FILES
  mercurial/debugcommands.py

CHANGE DETAILS




To: indygreg, #hg-reviewers
Cc: mercurial-devel

Patch

diff --git a/mercurial/debugcommands.py b/mercurial/debugcommands.py
--- a/mercurial/debugcommands.py
+++ b/mercurial/debugcommands.py
@@ -2474,15 +2474,15 @@ 
         ui.write(('+++ optimized\n'), label='diff.file_b')
         sm = difflib.SequenceMatcher(None, arevs, brevs)
         for tag, alo, ahi, blo, bhi in sm.get_opcodes():
-            if tag in ('delete', 'replace'):
+            if tag in (r'delete', r'replace'):
                 for c in arevs[alo:ahi]:
-                    ui.write('-%s\n' % c, label='diff.deleted')
-            if tag in ('insert', 'replace'):
+                    ui.write('-%d\n' % c, label='diff.deleted')
+            if tag in (r'insert', r'replace'):
                 for c in brevs[blo:bhi]:
-                    ui.write('+%s\n' % c, label='diff.inserted')
-            if tag == 'equal':
+                    ui.write('+%d\n' % c, label='diff.inserted')
+            if tag == r'equal':
                 for c in arevs[alo:ahi]:
-                    ui.write(' %s\n' % c)
+                    ui.write(' %d\n' % c)
         return 1
 
     func = revset.makematcher(tree)