comparison mercurial/revlogutils/deltas.py @ 51050:96f521df2508

revlog: remove legacy usage of `_deltabothparents` 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:07:15 +0200
parents e80e2d614c9d
children fa7d307e2150
comparison
equal deleted inserted replaced
51049:e80e2d614c9d 51050:96f521df2508
922 deltachain = lambda rev: revlog._deltachain(rev)[0] 922 deltachain = lambda rev: revlog._deltachain(rev)[0]
923 923
924 # exclude already lazy tested base if any 924 # exclude already lazy tested base if any
925 parents = [p for p in (p1, p2) if p != nullrev] 925 parents = [p for p in (p1, p2) if p != nullrev]
926 926
927 if not revlog._deltabothparents and len(parents) == 2: 927 if not revlog.delta_config.delta_both_parents and len(parents) == 2:
928 parents.sort() 928 parents.sort()
929 # To minimize the chance of having to build a fulltext, 929 # To minimize the chance of having to build a fulltext,
930 # pick first whichever parent is closest to us (max rev) 930 # pick first whichever parent is closest to us (max rev)
931 yield (parents[1],) 931 yield (parents[1],)
932 # then the other one (min rev) if the first did not fit 932 # then the other one (min rev) if the first did not fit