diff --git a/mercurial/configitems.py b/mercurial/configitems.py --- a/mercurial/configitems.py +++ b/mercurial/configitems.py @@ -637,9 +637,6 @@ coreconfigitem('extdata', '.*', default=None, generic=True, ) -coreconfigitem('format', 'aggressivemergedeltas', - default=True, -) coreconfigitem('format', 'chunkcachesize', default=None, ) @@ -930,6 +927,10 @@ coreconfigitem('progress', 'width', coreconfigitem('push', 'pushvars.server', default=False, ) +coreconfigitem('revlog', 'optimize-delta-parent-choice', + default=True, + # formely an experimental option: format.aggressivemergedeltas +) coreconfigitem('server', 'bookmarks-pushkey-compat', default=True, ) diff --git a/mercurial/help/config.txt b/mercurial/help/config.txt --- a/mercurial/help/config.txt +++ b/mercurial/help/config.txt @@ -1773,6 +1773,20 @@ have a definite end point. Alias definitions for revsets. See :hg:`help revsets` for details. +``revlog`` +---------- + +Control the strategy Mercurial uses internally to store history. Options in this +category impact performance and repository size. + +``optimize-delta-parent-choice`` + When storing a merge revision, both parents will be equally considered as + a possible delta base. This results in better delta selection and improved + revlog compression. This option is enabled by default. + + Turning this option off can result in large increase of repository size for + repository with many merges. + ``server`` ---------- diff --git a/mercurial/localrepo.py b/mercurial/localrepo.py --- a/mercurial/localrepo.py +++ b/mercurial/localrepo.py @@ -668,9 +668,8 @@ class localrepository(object): manifestcachesize = self.ui.configint('format', 'manifestcachesize') if manifestcachesize is not None: self.svfs.options['manifestcachesize'] = manifestcachesize - # experimental config: format.aggressivemergedeltas - deltabothparents = self.ui.configbool('format', - 'aggressivemergedeltas') + deltabothparents = self.ui.configbool('revlog', + 'optimize-delta-parent-choice') self.svfs.options['deltabothparents'] = deltabothparents self.svfs.options['lazydeltabase'] = not scmutil.gddeltaconfig(self.ui) chainspan = self.ui.configbytes('experimental', 'maxdeltachainspan') diff --git a/tests/test-generaldelta.t b/tests/test-generaldelta.t --- a/tests/test-generaldelta.t +++ b/tests/test-generaldelta.t @@ -118,7 +118,7 @@ delta coming from the server base delta 2 1 2 0 p1 57 135 161 1.19259 218 57 0.35404 3 1 2 0 p1 57 135 161 1.19259 275 114 0.70807 -Test format.aggressivemergedeltas +Test revlog.optimize-delta-parent-choice $ hg init --config format.generaldelta=1 aggressive $ cd aggressive @@ -146,7 +146,7 @@ Test format.aggressivemergedeltas - Verify aggressive merge uses p2 (commit 0) as delta parent $ hg up -q -C 1 $ hg merge -q 0 - $ hg commit -q -m merge --config format.aggressivemergedeltas=True + $ hg commit -q -m merge --config revlog.optimize-delta-parent-choice=yes $ hg debugdeltachain -m rev chain# chainlen prev delta size rawsize chainsize ratio lindist extradist extraratio 0 1 1 -1 base 59 215 59 0.27442 59 0 0.00000