mercurial/pycompat.py
changeset 36265 b44fac3a49fb
parent 36178 646002338365
child 36334 4cd2d1cc2a31
--- a/mercurial/pycompat.py	Thu Feb 15 17:14:45 2018 +0530
+++ b/mercurial/pycompat.py	Sat Feb 17 18:09:56 2018 +0900
@@ -85,6 +85,7 @@
         sysargv = list(map(os.fsencode, sys.argv))
 
     bytechr = struct.Struct('>B').pack
+    byterepr = b'%r'.__mod__
 
     class bytestr(bytes):
         """A bytes which mostly acts as a Python 2 str
@@ -277,6 +278,7 @@
     import cStringIO
 
     bytechr = chr
+    byterepr = repr
     bytestr = str
     iterbytestr = iter
     maybebytestr = identity