revlog: remove legacy usage of `_maxchainlen`
All core code is now getting the setting from the DeltaConfig object.
--- a/mercurial/revlogutils/deltas.py Tue Oct 10 11:04:40 2023 +0200
+++ b/mercurial/revlogutils/deltas.py Tue Oct 10 11:05:54 2023 +0200
@@ -641,7 +641,10 @@
# Bad delta from chain length:
#
# If the number of delta in the chain gets too high.
- if revlog._maxchainlen and revlog._maxchainlen < deltainfo.chainlen:
+ if (
+ revlog.delta_config.max_chain_len
+ and revlog.delta_config.max_chain_len < deltainfo.chainlen
+ ):
return False
# bad delta from intermediate snapshot size limit
@@ -771,7 +774,10 @@
# here too.
chainlen, chainsize = revlog._chaininfo(rev)
# if chain will be too long, skip base
- if revlog._maxchainlen and chainlen >= revlog._maxchainlen:
+ if (
+ revlog.delta_config.max_chain_len
+ and chainlen >= revlog.delta_config.max_chain_len
+ ):
tested.add(rev)
continue
# if chain already have too much data, skip base