py3: use bytes() to cast to immutable bytes in pure.bdiff.bdiff()
authorYuya Nishihara <yuya@tcha.org>
Sun, 26 Mar 2017 16:16:45 +0900
changeset 31641 f2b334e6c7e0
parent 31640 6d30699729dd
child 31642 addc392cc3d3
py3: use bytes() to cast to immutable bytes in pure.bdiff.bdiff()
mercurial/pure/bdiff.py
--- 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)