comparison mercurial/revlogutils/deltas.py @ 51058:8bdb2478c4bc

revlog: remove legacy usage of `_maxdeltachainspan` All core code is now getting the setting from the DeltaConfig object.
author Pierre-Yves David <pierre-yves.david@octobus.net>
date Tue, 10 Oct 2023 11:16:07 +0200
parents fa7d307e2150
children f71f07a679b4
comparison
equal deleted inserted replaced
51057:101c30938c0d 51058:8bdb2478c4bc
606 # deltas we need to apply -- bounding it limits the amount of CPU 606 # deltas we need to apply -- bounding it limits the amount of CPU
607 # we consume. 607 # we consume.
608 608
609 textlen = revinfo.textlen 609 textlen = revinfo.textlen
610 defaultmax = textlen * 4 610 defaultmax = textlen * 4
611 maxdist = revlog._maxdeltachainspan 611 maxdist = revlog.delta_config.max_deltachain_span
612 if not maxdist: 612 if not maxdist:
613 maxdist = deltainfo.distance # ensure the conditional pass 613 maxdist = deltainfo.distance # ensure the conditional pass
614 maxdist = max(maxdist, defaultmax) 614 maxdist = max(maxdist, defaultmax)
615 615
616 # Bad delta from read span: 616 # Bad delta from read span: