From patchwork Tue May 4 14:20:23 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: D10649: revlog: use an intermediate variable for `data` in `_chunk` From: phabricator X-Patchwork-Id: 48967 Message-Id: To: Phabricator Cc: mercurial-devel@mercurial-scm.org Date: Tue, 4 May 2021 14:20:23 +0000 marmoute created this revision. Herald added a reviewer: indygreg. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY This will help us to dispatch this to the right decompressor. REPOSITORY rHG Mercurial BRANCH default REVISION DETAIL https://phab.mercurial-scm.org/D10649 AFFECTED FILES mercurial/revlog.py CHANGE DETAILS To: marmoute, indygreg, #hg-reviewers Cc: mercurial-patches, mercurial-devel diff --git a/mercurial/revlog.py b/mercurial/revlog.py --- a/mercurial/revlog.py +++ b/mercurial/revlog.py @@ -1808,7 +1808,8 @@ if inline: chunkstart += (rev + 1) * iosize chunklength = length(rev) - ladd(decomp(buffer(data, chunkstart - offset, chunklength))) + c = buffer(data, chunkstart - offset, chunklength) + ladd(decomp(c)) return l