changeset 31641:f2b334e6c7e0

py3: use bytes() to cast to immutable bytes in pure.bdiff.bdiff()
author Yuya Nishihara <yuya@tcha.org>
date Sun, 26 Mar 2017 16:16:45 +0900
parents 6d30699729dd
children addc392cc3d3
files mercurial/pure/bdiff.py
diffstat 1 files changed, 2 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/pure/bdiff.py	Sun Mar 26 16:14:04 2017 +0900
+++ b/mercurial/pure/bdiff.py	Sun Mar 26 16:16:45 2017 +0900
@@ -54,12 +54,9 @@
     r.append(prev)
     return r
 
-def _tostring(c):
-    return str(c)
-
 def bdiff(a, b):
-    a = _tostring(a).splitlines(True)
-    b = _tostring(b).splitlines(True)
+    a = bytes(a).splitlines(True)
+    b = bytes(b).splitlines(True)
 
     if not a:
         s = "".join(b)