D1906: revlog: correct type in check to verify rawtext is immutable

durin42 (Augie Fackler) phabricator at mercurial-scm.org
Fri Jan 19 15:12:51 EST 2018


durin42 updated this revision to Diff 4952.

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D1906?vs=4911&id=4952

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
@@ -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



To: durin42, indygreg, #hg-reviewers, pulkit
Cc: mercurial-devel


More information about the Mercurial-devel mailing list