Patchwork D2071: py3: use pycompat.bytechr instead of chr

login
register
mail settings
Submitter phabricator
Date Feb. 7, 2018, 11:22 a.m.
Message ID <5b19d36c17b26a4eb629df884a520443@localhost.localdomain>
Download mbox | patch
Permalink /patch/27413/
State Not Applicable
Headers show

Comments

phabricator - Feb. 7, 2018, 11:22 a.m.
This revision was automatically updated to reflect the committed changes.
Closed by commit rHGbdb6ec909878: py3: use pycompat.bytechr instead of chr (authored by pulkit, committed by ).

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D2071?vs=5277&id=5285

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

AFFECTED FILES
  mercurial/mdiff.py

CHANGE DETAILS




To: pulkit, #hg-reviewers, durin42
Cc: mercurial-devel

Patch

diff --git a/mercurial/mdiff.py b/mercurial/mdiff.py
--- a/mercurial/mdiff.py
+++ b/mercurial/mdiff.py
@@ -465,9 +465,9 @@ 
     def fmtline(line):
         l = len(line)
         if l <= 26:
-            l = chr(ord('A') + l - 1)
+            l = pycompat.bytechr(ord('A') + l - 1)
         else:
-            l = chr(l - 26 + ord('a') - 1)
+            l = pycompat.bytechr(l - 26 + ord('a') - 1)
         return '%c%s\n' % (l, util.b85encode(line, True))
 
     def chunk(text, csize=52):