Mercurial > public > mercurial-scm > hg-stable
diff mercurial/pure/bdiff.py @ 31646: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 | 3b88a7fa97d8 |
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)