[PATCH 09 of 10 py3] revlog: use bytes() to ensure text from _chunks is a reasonable type

Augie Fackler raf at durin42.com
Sun Mar 12 14:57:49 EDT 2017


# HG changeset patch
# User Augie Fackler <augie at google.com>
# Date 1489303958 14400
#      Sun Mar 12 03:32:38 2017 -0400
# Node ID e8cceea7006f5b63cc17444d2552b54c1b97f33a
# Parent  4eab3adcc0793f60b863da542fe8e152e33efa9c
revlog: use bytes() to ensure text from _chunks is a reasonable type

diff --git a/mercurial/revlog.py b/mercurial/revlog.py
--- a/mercurial/revlog.py
+++ b/mercurial/revlog.py
@@ -1277,7 +1277,7 @@ class revlog(object):
 
         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)


More information about the Mercurial-devel mailing list