changeset 47404:53289d02037a

revlog: use the `entry` function in bundlerepo We can use some of the default value again! Differential Revision: https://phab.mercurial-scm.org/D10796
author Pierre-Yves David <pierre-yves.david@octobus.net>
date Sun, 30 May 2021 17:11:49 +0200
parents 8f87dcb46f53
children 34cc102c73f5
files mercurial/bundlerepo.py
diffstat 1 files changed, 9 insertions(+), 13 deletions(-) [+]
line wrap: on
line diff
--- 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)