revlog: use an intermediate variable for `data` in `_chunk`
authorPierre-Yves David <pierre-yves.david@octobus.net>
Mon, 03 May 2021 20:22:34 +0200
changeset 47252 e340b556a13e
parent 47251 6bfa6c2c5f15
child 47253 b876f0bf7366
revlog: use an intermediate variable for `data` in `_chunk` This will help us to dispatch this to the right decompressor. Differential Revision: https://phab.mercurial-scm.org/D10649
mercurial/revlog.py
--- a/mercurial/revlog.py	Mon May 03 18:41:51 2021 +0200
+++ b/mercurial/revlog.py	Mon May 03 20:22:34 2021 +0200
@@ -1810,7 +1810,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