##// END OF EJS Templates
storage: introduce a `revlog.reuse-external-delta-parent` config...
marmoute -
r41984:f6eff9e4 default
parent child Browse files
Show More
@@ -983,6 +983,9 b" coreconfigitem('storage', 'revlog.optimi"
983 default=True,
983 default=True,
984 alias=[('format', 'aggressivemergedeltas')],
984 alias=[('format', 'aggressivemergedeltas')],
985 )
985 )
986 coreconfigitem('storage', 'revlog.reuse-external-delta-parent',
987 default=None,
988 )
986 coreconfigitem('server', 'bookmarks-pushkey-compat',
989 coreconfigitem('server', 'bookmarks-pushkey-compat',
987 default=True,
990 default=True,
988 )
991 )
@@ -1843,6 +1843,28 b' category impact performance and reposito'
1843 Turning this option off can result in large increase of repository size for
1843 Turning this option off can result in large increase of repository size for
1844 repository with many merges.
1844 repository with many merges.
1845
1845
1846 ``revlog.reuse-external-delta-parent``
1847 Control the order in which delta parents are considered when adding new
1848 revisions from an external source.
1849 (typically: apply bundle from `hg pull` or `hg push`).
1850
1851 New revisions are usually provided as a delta against other revisions. By
1852 default, Mercurial will try to reuse this delta first, therefore using the
1853 same "delta parent" as the source. Directly using delta's from the source
1854 reduces CPU usage and usually speeds up operation. However, in some case,
1855 the source might have sub-optimal delta bases and forcing their reevaluation
1856 is useful. For example, pushes from an old client could have sub-optimal
1857 delta's parent that the server want to optimize. (lack of general delta, bad
1858 parents, choice, lack of sparse-revlog, etc).
1859
1860 This option is enabled by default. Turning it off will ensure bad delta
1861 parent choices from older client do not propagate to this repository, at
1862 the cost of a small increase in CPU consumption.
1863
1864 Note: this option only control the order in which delta parents are
1865 considered. Even when disabled, the existing delta from the source will be
1866 reused if the same delta parent is selected.
1867
1846 ``server``
1868 ``server``
1847 ----------
1869 ----------
1848
1870
@@ -752,7 +752,11 b' def resolverevlogstorevfsoptions(ui, req'
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 options[b'lazydeltabase'] = not scmutil.gddeltaconfig(ui)
755 lazydeltabase = ui.configbool(b'storage',
756 b'revlog.reuse-external-delta-parent')
757 if lazydeltabase is None:
758 lazydeltabase = not scmutil.gddeltaconfig(ui)
759 options[b'lazydeltabase'] = lazydeltabase
756
760
757 chainspan = ui.configbytes(b'experimental', b'maxdeltachainspan')
761 chainspan = ui.configbytes(b'experimental', b'maxdeltachainspan')
758 if 0 <= chainspan:
762 if 0 <= chainspan:
@@ -339,7 +339,7 b' test maxdeltachainspan'
339 52 5 1 -1 base 369 640 369 0.57656 369 0 0.00000
339 52 5 1 -1 base 369 640 369 0.57656 369 0 0.00000
340 53 6 1 -1 base 0 0 0 0.00000 0 0 0.00000
340 53 6 1 -1 base 0 0 0 0.00000 0 0 0.00000
341 54 7 1 -1 base 369 640 369 0.57656 369 0 0.00000
341 54 7 1 -1 base 369 640 369 0.57656 369 0 0.00000
342 $ hg clone --pull source-repo --config experimental.maxdeltachainspan=0 noconst-chain --config format.generaldelta=yes
342 $ hg clone --pull source-repo --config experimental.maxdeltachainspan=0 noconst-chain --config format.usegeneraldelta=yes --config storage.revlog.reuse-external-delta-parent=no
343 requesting all changes
343 requesting all changes
344 adding changesets
344 adding changesets
345 adding manifests
345 adding manifests
@@ -40,8 +40,7 b' repeatedly while some of it changes rare'
40 > maxchainlen = 15
40 > maxchainlen = 15
41 > [storage]
41 > [storage]
42 > revlog.optimize-delta-parent-choice = yes
42 > revlog.optimize-delta-parent-choice = yes
43 > [format]
43 > revlog.reuse-external-delta-parent = no
44 > generaldelta = yes
45 > EOF
44 > EOF
46 $ hg init sparse-repo
45 $ hg init sparse-repo
47 $ cd sparse-repo
46 $ cd sparse-repo
General Comments 0
You need to be logged in to leave comments. Login now