comparison mercurial/localrepo.py @ 41819:688fc33e105d

storage: introduce a `revlog.reuse-external-delta` config This option goes a bit further and provides a way to get the same behavior as the `re-delta-all` optimisation from `hg debugupgraderepo`. The effect of the option is a bit hard to test as we do not have multiple diff algorithm at hand. However, we at least make sure the code path run.
author Pierre-Yves David <pierre-yves.david@octobus.net>
date Wed, 27 Feb 2019 12:40:18 +0100
parents f6eff9e4de80
children 90eddb679521
comparison
equal deleted inserted replaced
41818:f6eff9e4de80 41819:688fc33e105d
750 750
751 deltabothparents = ui.configbool(b'storage', 751 deltabothparents = ui.configbool(b'storage',
752 b'revlog.optimize-delta-parent-choice') 752 b'revlog.optimize-delta-parent-choice')
753 options[b'deltabothparents'] = deltabothparents 753 options[b'deltabothparents'] = deltabothparents
754 754
755 lazydeltabase = ui.configbool(b'storage', 755 lazydelta = ui.configbool(b'storage', b'revlog.reuse-external-delta')
756 b'revlog.reuse-external-delta-parent') 756 lazydeltabase = False
757 if lazydelta:
758 lazydeltabase = ui.configbool(b'storage',
759 b'revlog.reuse-external-delta-parent')
757 if lazydeltabase is None: 760 if lazydeltabase is None:
758 lazydeltabase = not scmutil.gddeltaconfig(ui) 761 lazydeltabase = not scmutil.gddeltaconfig(ui)
762 options[b'lazydelta'] = lazydelta
759 options[b'lazydeltabase'] = lazydeltabase 763 options[b'lazydeltabase'] = lazydeltabase
760 764
761 chainspan = ui.configbytes(b'experimental', b'maxdeltachainspan') 765 chainspan = ui.configbytes(b'experimental', b'maxdeltachainspan')
762 if 0 <= chainspan: 766 if 0 <= chainspan:
763 options[b'maxdeltachainspan'] = chainspan 767 options[b'maxdeltachainspan'] = chainspan