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

login
register
mail settings
Submitter phabricator
Date Feb. 1, 2018, 8:42 p.m.
Message ID <e7237bd4063746853eb9e4cc4eb3e9fd@localhost.localdomain>
Download mbox | patch
Permalink /patch/27140/
State Not Applicable
Headers show

Comments

phabricator - Feb. 1, 2018, 8:42 p.m.
This revision was automatically updated to reflect the committed changes.
Closed by commit rHG24dd168d712a: revlog: correct type in check to verify rawtext is immutable (authored by durin42, committed by ).

REPOSITORY
  rHG Mercurial

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

REVISION DETAIL
  https://phab.mercurial-scm.org/D1906

AFFECTED FILES
  mercurial/revlog.py

CHANGE DETAILS




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

Patch

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