# HG changeset patch # User Augie Fackler # Date 2018-01-18 14:14:30 # Node ID be923ce44d6a781a0c83ff7f3431269e78ccff21 # Parent 522f868680ca213a06e2255cb71c5c78dc1046c2 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 diff --git a/mercurial/revlog.py b/mercurial/revlog.py --- a/mercurial/revlog.py +++ b/mercurial/revlog.py @@ -2099,7 +2099,7 @@ class revlog(object): 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