diff --git a/mercurial/revlog.py b/mercurial/revlog.py --- a/mercurial/revlog.py +++ b/mercurial/revlog.py @@ -2468,7 +2468,7 @@ if populatecachedelta: dp = self.deltaparent(rev) if dp != nullrev: - cachedelta = (dp, str(self._chunk(rev))) + cachedelta = (dp, bytes(self._chunk(rev))) if not cachedelta: rawtext = self.revision(rev, raw=True)