revlog: use the `entry` function in bundlerepo
authorPierre-Yves David <pierre-yves.david@octobus.net>
Sun, 30 May 2021 17:11:49 +0200
changeset 47398 53289d02037a
parent 47397 8f87dcb46f53
child 47399 34cc102c73f5
revlog: use the `entry` function in bundlerepo We can use some of the default value again! Differential Revision: https://phab.mercurial-scm.org/D10796
mercurial/bundlerepo.py
--- a/mercurial/bundlerepo.py	Sun May 30 17:11:21 2021 +0200
+++ b/mercurial/bundlerepo.py	Sun May 30 17:11:49 2021 +0200
@@ -95,19 +95,15 @@
 
             baserev = self.rev(deltabase)
             # start, size, full unc. size, base (unused), link, p1, p2, node, sidedata_offset (unused), sidedata_size (unused)
-            e = (
-                revlogutils.offset_type(start, flags),
-                size,
-                -1,
-                baserev,
-                linkrev,
-                self.rev(p1),
-                self.rev(p2),
-                node,
-                0,
-                0,
-                revlog_constants.COMP_MODE_INLINE,
-                revlog_constants.COMP_MODE_INLINE,
+            e = revlogutils.entry(
+                flags=flags,
+                data_offset=start,
+                data_compressed_length=size,
+                data_delta_base=baserev,
+                link_rev=linkrev,
+                parent_rev_1=self.rev(p1),
+                parent_rev_2=self.rev(p2),
+                node_id=node,
             )
             self.index.append(e)
             self.bundlerevs.add(n)