revlog: use bytes() to ensure text from _chunks is a reasonable type
authorAugie Fackler <augie@google.com>
Sun, 12 Mar 2017 03:32:38 -0400
changeset 31357 c233cbda5b1e
parent 31356 ef6888172437
child 31358 4015dfc899bb
revlog: use bytes() to ensure text from _chunks is a reasonable type
mercurial/revlog.py
--- a/mercurial/revlog.py	Sun Mar 12 00:49:49 2017 -0500
+++ b/mercurial/revlog.py	Sun Mar 12 03:32:38 2017 -0400
@@ -1277,7 +1277,7 @@
 
         bins = self._chunks(chain, df=_df)
         if text is None:
-            text = str(bins[0])
+            text = bytes(bins[0])
             bins = bins[1:]
 
         text = mdiff.patches(text, bins)