Mercurial > hg
comparison mercurial/bundlerepo.py @ 47398: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 | ac60a1366a49 |
children | 7d1e60244561 |
comparison
equal
deleted
inserted
replaced
47397:8f87dcb46f53 | 47398:53289d02037a |
---|---|
93 deltabase, self.display_id, _(b'unknown delta base') | 93 deltabase, self.display_id, _(b'unknown delta base') |
94 ) | 94 ) |
95 | 95 |
96 baserev = self.rev(deltabase) | 96 baserev = self.rev(deltabase) |
97 # start, size, full unc. size, base (unused), link, p1, p2, node, sidedata_offset (unused), sidedata_size (unused) | 97 # start, size, full unc. size, base (unused), link, p1, p2, node, sidedata_offset (unused), sidedata_size (unused) |
98 e = ( | 98 e = revlogutils.entry( |
99 revlogutils.offset_type(start, flags), | 99 flags=flags, |
100 size, | 100 data_offset=start, |
101 -1, | 101 data_compressed_length=size, |
102 baserev, | 102 data_delta_base=baserev, |
103 linkrev, | 103 link_rev=linkrev, |
104 self.rev(p1), | 104 parent_rev_1=self.rev(p1), |
105 self.rev(p2), | 105 parent_rev_2=self.rev(p2), |
106 node, | 106 node_id=node, |
107 0, | |
108 0, | |
109 revlog_constants.COMP_MODE_INLINE, | |
110 revlog_constants.COMP_MODE_INLINE, | |
111 ) | 107 ) |
112 self.index.append(e) | 108 self.index.append(e) |
113 self.bundlerevs.add(n) | 109 self.bundlerevs.add(n) |
114 n += 1 | 110 n += 1 |
115 | 111 |