changeset 35943:bdb6ec909878

py3: use pycompat.bytechr instead of chr Differential Revision: https://phab.mercurial-scm.org/D2071
author Pulkit Goyal <7895pulkit@gmail.com>
date Wed, 07 Feb 2018 13:11:38 +0530
parents f81df691efe7
children 01b4d88ccb24
files mercurial/mdiff.py
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- 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):