Show More
@@ -983,6 +983,9 b" coreconfigitem('storage', 'revlog.optimi" | |||
|
983 | 983 | default=True, |
|
984 | 984 | alias=[('format', 'aggressivemergedeltas')], |
|
985 | 985 | ) |
|
986 | coreconfigitem('storage', 'revlog.reuse-external-delta', | |
|
987 | default=True, | |
|
988 | ) | |
|
986 | 989 | coreconfigitem('storage', 'revlog.reuse-external-delta-parent', |
|
987 | 990 | default=None, |
|
988 | 991 | ) |
@@ -1865,6 +1865,22 b' category impact performance and reposito' | |||
|
1865 | 1865 | considered. Even when disabled, the existing delta from the source will be |
|
1866 | 1866 | reused if the same delta parent is selected. |
|
1867 | 1867 | |
|
1868 | ``revlog.reuse-external-delta`` | |
|
1869 | Control the reuse of delta from external source. | |
|
1870 | (typically: apply bundle from `hg pull` or `hg push`). | |
|
1871 | ||
|
1872 | New revisions are usually provided as a delta against another revision. By | |
|
1873 | default, Mercurial will not recompute the same delta again, trusting | |
|
1874 | externally provided deltas. There have been rare cases of small adjustment | |
|
1875 | to the diffing algorithm in the past. So in some rare case, recomputing | |
|
1876 | delta provided by ancient clients can provides better results. Disabling | |
|
1877 | this option means going through a full delta recomputation for all incoming | |
|
1878 | revisions. It means a large increase in CPU usage and will slow operations | |
|
1879 | down. | |
|
1880 | ||
|
1881 | This option is enabled by default. When disabled, it also disables the | |
|
1882 | related ``storage.revlog.reuse-external-delta-parent`` option. | |
|
1883 | ||
|
1868 | 1884 | ``server`` |
|
1869 | 1885 | ---------- |
|
1870 | 1886 |
@@ -752,10 +752,14 b' def resolverevlogstorevfsoptions(ui, req' | |||
|
752 | 752 | b'revlog.optimize-delta-parent-choice') |
|
753 | 753 | options[b'deltabothparents'] = deltabothparents |
|
754 | 754 | |
|
755 |
lazydelta |
|
|
756 | b'revlog.reuse-external-delta-parent') | |
|
755 | lazydelta = ui.configbool(b'storage', b'revlog.reuse-external-delta') | |
|
756 | lazydeltabase = False | |
|
757 | if lazydelta: | |
|
758 | lazydeltabase = ui.configbool(b'storage', | |
|
759 | b'revlog.reuse-external-delta-parent') | |
|
757 | 760 | if lazydeltabase is None: |
|
758 | 761 | lazydeltabase = not scmutil.gddeltaconfig(ui) |
|
762 | options[b'lazydelta'] = lazydelta | |
|
759 | 763 | options[b'lazydeltabase'] = lazydeltabase |
|
760 | 764 | |
|
761 | 765 | chainspan = ui.configbytes(b'experimental', b'maxdeltachainspan') |
@@ -410,7 +410,10 b' class revlog(object):' | |||
|
410 | 410 | self._maxchainlen = opts['maxchainlen'] |
|
411 | 411 | if 'deltabothparents' in opts: |
|
412 | 412 | self._deltabothparents = opts['deltabothparents'] |
|
413 |
self._lazydelta |
|
|
413 | self._lazydelta = bool(opts.get('lazydelta', True)) | |
|
414 | self._lazydeltabase = False | |
|
415 | if self._lazydelta: | |
|
416 | self._lazydeltabase = bool(opts.get('lazydeltabase', False)) | |
|
414 | 417 | if 'compengine' in opts: |
|
415 | 418 | self._compengine = opts['compengine'] |
|
416 | 419 | if 'maxdeltachainspan' in opts: |
@@ -916,7 +916,7 b' class deltacomputer(object):' | |||
|
916 | 916 | and currentbase != base |
|
917 | 917 | and self.revlog.length(currentbase) == 0): |
|
918 | 918 | currentbase = self.revlog.deltaparent(currentbase) |
|
919 | if currentbase == base: | |
|
919 | if self.revlog._lazydelta and currentbase == base: | |
|
920 | 920 | delta = revinfo.cachedelta[1] |
|
921 | 921 | if delta is None: |
|
922 | 922 | delta = self._builddeltadiff(base, revinfo, fh) |
General Comments 0
You need to be logged in to leave comments.
Login now