Show More
@@ -215,12 +215,12 b' class filelog(object):' | |||||
215 | self._revlog._lazydeltabase = value |
|
215 | self._revlog._lazydeltabase = value | |
216 |
|
216 | |||
217 | @property |
|
217 | @property | |
218 |
def _ |
|
218 | def _deltabothparents(self): | |
219 |
return self._revlog._ |
|
219 | return self._revlog._deltabothparents | |
220 |
|
220 | |||
221 |
@_ |
|
221 | @_deltabothparents.setter | |
222 |
def _ |
|
222 | def _deltabothparents(self, value): | |
223 |
self._revlog._ |
|
223 | self._revlog._deltabothparents = value | |
224 |
|
224 | |||
225 | @property |
|
225 | @property | |
226 | def _inline(self): |
|
226 | def _inline(self): |
@@ -669,9 +669,9 b' class localrepository(object):' | |||||
669 | if manifestcachesize is not None: |
|
669 | if manifestcachesize is not None: | |
670 | self.svfs.options['manifestcachesize'] = manifestcachesize |
|
670 | self.svfs.options['manifestcachesize'] = manifestcachesize | |
671 | # experimental config: format.aggressivemergedeltas |
|
671 | # experimental config: format.aggressivemergedeltas | |
672 |
|
|
672 | deltabothparents = self.ui.configbool('format', | |
673 |
|
|
673 | 'aggressivemergedeltas') | |
674 |
self.svfs.options[' |
|
674 | self.svfs.options['deltabothparents'] = deltabothparents | |
675 | self.svfs.options['lazydeltabase'] = not scmutil.gddeltaconfig(self.ui) |
|
675 | self.svfs.options['lazydeltabase'] = not scmutil.gddeltaconfig(self.ui) | |
676 | chainspan = self.ui.configbytes('experimental', 'maxdeltachainspan') |
|
676 | chainspan = self.ui.configbytes('experimental', 'maxdeltachainspan') | |
677 | if 0 <= chainspan: |
|
677 | if 0 <= chainspan: |
@@ -628,7 +628,7 b' class _deltacomputer(object):' | |||||
628 | parents = [p for p in (p1r, p2r) |
|
628 | parents = [p for p in (p1r, p2r) | |
629 | if p != nullrev and p not in tested] |
|
629 | if p != nullrev and p not in tested] | |
630 |
|
630 | |||
631 |
if not revlog._ |
|
631 | if not revlog._deltabothparents and len(parents) == 2: | |
632 | parents.sort() |
|
632 | parents.sort() | |
633 | # To minimize the chance of having to build a fulltext, |
|
633 | # To minimize the chance of having to build a fulltext, | |
634 | # pick first whichever parent is closest to us (max rev) |
|
634 | # pick first whichever parent is closest to us (max rev) | |
@@ -915,7 +915,7 b' class revlog(object):' | |||||
915 | # How much data to read and cache into the raw revlog data cache. |
|
915 | # How much data to read and cache into the raw revlog data cache. | |
916 | self._chunkcachesize = 65536 |
|
916 | self._chunkcachesize = 65536 | |
917 | self._maxchainlen = None |
|
917 | self._maxchainlen = None | |
918 |
self._ |
|
918 | self._deltabothparents = True | |
919 | self.index = [] |
|
919 | self.index = [] | |
920 | # Mapping of partial identifiers to full nodes. |
|
920 | # Mapping of partial identifiers to full nodes. | |
921 | self._pcache = {} |
|
921 | self._pcache = {} | |
@@ -945,8 +945,8 b' class revlog(object):' | |||||
945 | self._chunkcachesize = opts['chunkcachesize'] |
|
945 | self._chunkcachesize = opts['chunkcachesize'] | |
946 | if 'maxchainlen' in opts: |
|
946 | if 'maxchainlen' in opts: | |
947 | self._maxchainlen = opts['maxchainlen'] |
|
947 | self._maxchainlen = opts['maxchainlen'] | |
948 |
if ' |
|
948 | if 'deltabothparents' in opts: | |
949 |
self._ |
|
949 | self._deltabothparents = opts['deltabothparents'] | |
950 | self._lazydeltabase = bool(opts.get('lazydeltabase', False)) |
|
950 | self._lazydeltabase = bool(opts.get('lazydeltabase', False)) | |
951 | if 'compengine' in opts: |
|
951 | if 'compengine' in opts: | |
952 | self._compengine = opts['compengine'] |
|
952 | self._compengine = opts['compengine'] | |
@@ -2843,7 +2843,7 b' class revlog(object):' | |||||
2843 | DELTAREUSEALL = {'always', 'samerevs', 'never', 'fulladd'} |
|
2843 | DELTAREUSEALL = {'always', 'samerevs', 'never', 'fulladd'} | |
2844 |
|
2844 | |||
2845 | def clone(self, tr, destrevlog, addrevisioncb=None, |
|
2845 | def clone(self, tr, destrevlog, addrevisioncb=None, | |
2846 |
deltareuse=DELTAREUSESAMEREVS, |
|
2846 | deltareuse=DELTAREUSESAMEREVS, deltabothparents=None): | |
2847 | """Copy this revlog to another, possibly with format changes. |
|
2847 | """Copy this revlog to another, possibly with format changes. | |
2848 |
|
2848 | |||
2849 | The destination revlog will contain the same revisions and nodes. |
|
2849 | The destination revlog will contain the same revisions and nodes. | |
@@ -2877,7 +2877,7 b' class revlog(object):' | |||||
2877 | deltas will be recomputed if the delta's parent isn't a parent of the |
|
2877 | deltas will be recomputed if the delta's parent isn't a parent of the | |
2878 | revision. |
|
2878 | revision. | |
2879 |
|
2879 | |||
2880 |
In addition to the delta policy, the `` |
|
2880 | In addition to the delta policy, the ``deltabothparents`` argument | |
2881 | controls whether to compute deltas against both parents for merges. |
|
2881 | controls whether to compute deltas against both parents for merges. | |
2882 | By default, the current default is used. |
|
2882 | By default, the current default is used. | |
2883 | """ |
|
2883 | """ | |
@@ -2894,7 +2894,7 b' class revlog(object):' | |||||
2894 |
|
2894 | |||
2895 | # lazydeltabase controls whether to reuse a cached delta, if possible. |
|
2895 | # lazydeltabase controls whether to reuse a cached delta, if possible. | |
2896 | oldlazydeltabase = destrevlog._lazydeltabase |
|
2896 | oldlazydeltabase = destrevlog._lazydeltabase | |
2897 |
oldamd = destrevlog._ |
|
2897 | oldamd = destrevlog._deltabothparents | |
2898 |
|
2898 | |||
2899 | try: |
|
2899 | try: | |
2900 | if deltareuse == self.DELTAREUSEALWAYS: |
|
2900 | if deltareuse == self.DELTAREUSEALWAYS: | |
@@ -2902,7 +2902,7 b' class revlog(object):' | |||||
2902 | elif deltareuse == self.DELTAREUSESAMEREVS: |
|
2902 | elif deltareuse == self.DELTAREUSESAMEREVS: | |
2903 | destrevlog._lazydeltabase = False |
|
2903 | destrevlog._lazydeltabase = False | |
2904 |
|
2904 | |||
2905 |
destrevlog._ |
|
2905 | destrevlog._deltabothparents = deltabothparents or oldamd | |
2906 |
|
2906 | |||
2907 | populatecachedelta = deltareuse in (self.DELTAREUSEALWAYS, |
|
2907 | populatecachedelta = deltareuse in (self.DELTAREUSEALWAYS, | |
2908 | self.DELTAREUSESAMEREVS) |
|
2908 | self.DELTAREUSESAMEREVS) | |
@@ -2957,4 +2957,4 b' class revlog(object):' | |||||
2957 | addrevisioncb(self, rev, node) |
|
2957 | addrevisioncb(self, rev, node) | |
2958 | finally: |
|
2958 | finally: | |
2959 | destrevlog._lazydeltabase = oldlazydeltabase |
|
2959 | destrevlog._lazydeltabase = oldlazydeltabase | |
2960 |
destrevlog._ |
|
2960 | destrevlog._deltabothparents = oldamd |
@@ -455,7 +455,7 b' def _revlogfrompath(repo, path):' | |||||
455 | #reverse of "/".join(("data", path + ".i")) |
|
455 | #reverse of "/".join(("data", path + ".i")) | |
456 | return filelog.filelog(repo.svfs, path[5:-2]) |
|
456 | return filelog.filelog(repo.svfs, path[5:-2]) | |
457 |
|
457 | |||
458 |
def _copyrevlogs(ui, srcrepo, dstrepo, tr, deltareuse, |
|
458 | def _copyrevlogs(ui, srcrepo, dstrepo, tr, deltareuse, deltabothparents): | |
459 | """Copy revlogs between 2 repos.""" |
|
459 | """Copy revlogs between 2 repos.""" | |
460 | revcount = 0 |
|
460 | revcount = 0 | |
461 | srcsize = 0 |
|
461 | srcsize = 0 | |
@@ -579,7 +579,7 b' def _copyrevlogs(ui, srcrepo, dstrepo, t' | |||||
579 | ui.note(_('cloning %d revisions from %s\n') % (len(oldrl), unencoded)) |
|
579 | ui.note(_('cloning %d revisions from %s\n') % (len(oldrl), unencoded)) | |
580 | oldrl.clone(tr, newrl, addrevisioncb=oncopiedrevision, |
|
580 | oldrl.clone(tr, newrl, addrevisioncb=oncopiedrevision, | |
581 | deltareuse=deltareuse, |
|
581 | deltareuse=deltareuse, | |
582 | aggressivemergedeltas=aggressivemergedeltas) |
|
582 | deltabothparents=deltabothparents) | |
583 |
|
583 | |||
584 | datasize = 0 |
|
584 | datasize = 0 | |
585 | idx = newrl.index |
|
585 | idx = newrl.index |
General Comments 0
You need to be logged in to leave comments.
Login now