# HG changeset patch # User Pierre-Yves David # Date 1696953740 -7200 # Node ID 127656e0b97bfd542281d6bc93508cc0f83312d1 # Parent e2941c398f10fc124c8d00a936c6ac047161265a 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. diff -r e2941c398f10 -r 127656e0b97b mercurial/revlogutils/deltas.py --- 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