# HG changeset patch
# User Augie Fackler <r...@durin42.com>
# Date 1490567279 14400
#      Sun Mar 26 18:27:59 2017 -0400
# Node ID 48144fe2d912b7d9fc300955d0c881aceead6930
# Parent  d5dcfa6b2e20183ba2d6e439a23f5f2f4bf7981e
bdiff: coerce to bytes() not str() in pure code

diff --git a/mercurial/pure/bdiff.py b/mercurial/pure/bdiff.py
--- a/mercurial/pure/bdiff.py
+++ b/mercurial/pure/bdiff.py
@@ -59,7 +59,7 @@ def _tostring(c):
     if type(c) is array.array:
         # this copy overhead isn't ideal
         return c.tostring()
-    return str(c)
+    return bytes(c)
 
 def bdiff(a, b):
     a = _tostring(a).splitlines(True)
_______________________________________________
Mercurial-devel mailing list
Mercurial-devel@mercurial-scm.org
https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel

Reply via email to