Mercurial > hg
changeset 51045:127656e0b97b
revlog: use the new Config classes in _testrevlog
the mock object need to follow the new interface. We allow ourself a small
hacky import since this is testing code.
The legacy attribute are still here because some code still use them. We will
drop them when this code is updated.
author | Pierre-Yves David <pierre-yves.david@octobus.net> |
---|---|
date | Tue, 10 Oct 2023 18:02:20 +0200 |
parents | e2941c398f10 |
children | f636103c4d67 |
files | mercurial/revlogutils/deltas.py |
diffstat | 1 files changed, 7 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/revlogutils/deltas.py Tue Oct 10 10:04:06 2023 +0200 +++ b/mercurial/revlogutils/deltas.py Tue Oct 10 18:02:20 2023 +0200 @@ -47,9 +47,16 @@ def __init__(self, data, density=0.5, mingap=0, snapshot=()): """data is an list of revision payload boundaries""" + from .. import revlog + self._data = data self._srdensitythreshold = density self._srmingapsize = mingap + self.data_config = revlog.DataConfig() + self.data_config.sr_density_threshold = density + self.data_config.sr_min_gap_size = mingap + self.delta_config = revlog.DeltaConfig() + self.feature_config = revlog.FeatureConfig() self._snapshot = set(snapshot) self.index = None