changeset 35885:be923ce44d6a

revlog: correct type in check to verify rawtext is immutable This fixes far more failures than I feel like it has any right to, so there's clearly some subtle interaction between self._cache and other parts of this code. :( Differential Revision: https://phab.mercurial-scm.org/D1906
author Augie Fackler <augie@google.com>
date Thu, 18 Jan 2018 09:14:30 -0500
parents 522f868680ca
children c4c1e3334bcb
files mercurial/revlog.py
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/revlog.py	Wed Jan 17 22:05:37 2018 -0500
+++ b/mercurial/revlog.py	Thu Jan 18 09:14:30 2018 -0500
@@ -2099,7 +2099,7 @@
         if alwayscache and rawtext is None:
             rawtext = deltacomputer._buildtext(revinfo, fh)
 
-        if type(rawtext) == str: # only accept immutable objects
+        if type(rawtext) == bytes: # only accept immutable objects
             self._cache = (node, curr, rawtext)
         self._chainbasecache[curr] = chainbase
         return node