py3: use pycompat.bytechr instead of chr
authorPulkit Goyal <7895pulkit@gmail.com>
Wed, 07 Feb 2018 13:11:38 +0530
changeset 35943 bdb6ec909878
parent 35942 f81df691efe7
child 35944 01b4d88ccb24
py3: use pycompat.bytechr instead of chr Differential Revision: https://phab.mercurial-scm.org/D2071
mercurial/mdiff.py
--- a/mercurial/mdiff.py	Wed Feb 07 13:10:24 2018 +0530
+++ b/mercurial/mdiff.py	Wed Feb 07 13:11:38 2018 +0530
@@ -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):