D1906: revlog: correct type in check to verify rawtext is immutable
durin42 (Augie Fackler)
phabricator at mercurial-scm.org
Thu Jan 18 16:13:28 UTC 2018
durin42 created this revision.
Herald added a reviewer: indygreg.
Herald added a subscriber: mercurial-devel.
Herald added a reviewer: hg-reviewers.
REVISION SUMMARY
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. :(
REPOSITORY
rHG Mercurial
REVISION DETAIL
https://phab.mercurial-scm.org/D1906
AFFECTED FILES
mercurial/revlog.py
CHANGE DETAILS
diff --git a/mercurial/revlog.py b/mercurial/revlog.py
--- a/mercurial/revlog.py
+++ b/mercurial/revlog.py
@@ -2060,7 +2060,7 @@
if alwayscache and rawtext is None:
rawtext = self._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
To: durin42, indygreg, #hg-reviewers
Cc: mercurial-devel
More information about the Mercurial-devel
mailing list