mercurial/cmdutil.py
changeset 35903 1a31111e6239
parent 35900 72de5c504833
child 35904 fc44c2657dc5
--- a/mercurial/cmdutil.py	Sat Jan 27 17:13:51 2018 +0900
+++ b/mercurial/cmdutil.py	Sat Jan 27 17:31:25 2018 +0900
@@ -1563,17 +1563,9 @@
         if fo is not None:
             fo.close()
 
-class _regrettablereprbytes(bytes):
-    """Bytes subclass that makes the repr the same on Python 3 as Python 2.
-
-    This is a huge hack.
-    """
-    def __repr__(self):
-        return repr(pycompat.sysstr(self))
-
 def _maybebytestr(v):
-    if pycompat.ispy3 and isinstance(v, bytes):
-        return _regrettablereprbytes(v)
+    if isinstance(v, bytes):
+        return pycompat.bytestr(v)
     return v
 
 def showmarker(fm, marker, index=None):