Patchwork D10796: revlog: use the `entry` function in bundlerepo

login
register
mail settings
Submitter phabricator
Date May 30, 2021, 5:31 p.m.
Message ID <differential-rev-PHID-DREV-tj33cu4imrbewny5rnp5-req@mercurial-scm.org>
Download mbox | patch
Permalink /patch/49114/
State Superseded
Headers show

Comments

phabricator - May 30, 2021, 5:31 p.m.
marmoute created this revision.
Herald added a reviewer: hg-reviewers.
Herald added a subscriber: mercurial-patches.

REVISION SUMMARY
  We can use some of the default value again!

REPOSITORY
  rHG Mercurial

BRANCH
  default

REVISION DETAIL
  https://phab.mercurial-scm.org/D10796

AFFECTED FILES
  mercurial/bundlerepo.py

CHANGE DETAILS




To: marmoute, #hg-reviewers
Cc: mercurial-patches, mercurial-devel

Patch

diff --git a/mercurial/bundlerepo.py b/mercurial/bundlerepo.py
--- a/mercurial/bundlerepo.py
+++ b/mercurial/bundlerepo.py
@@ -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)