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.
--- 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