Mercurial > hg
changeset 38736:93777d16a25d
aggressivemergedeltas: rename variable internally
The "aggressivemergedeltas" name is not great. First, it is quite long,
second, we would rather have less "Aggressive" names within the project. We
are about to rename the config option, so it seems the appropriate time to
rename the internal variable.
author | Boris Feld <boris.feld@octobus.net> |
---|---|
date | Thu, 19 Jul 2018 10:06:58 +0200 |
parents | 8891dc15b327 |
children | 913ca175c4ae |
files | mercurial/filelog.py mercurial/localrepo.py mercurial/revlog.py mercurial/upgrade.py |
diffstat | 4 files changed, 19 insertions(+), 19 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/filelog.py Thu Jul 19 09:57:42 2018 +0200 +++ b/mercurial/filelog.py Thu Jul 19 10:06:58 2018 +0200 @@ -215,12 +215,12 @@ self._revlog._lazydeltabase = value @property - def _aggressivemergedeltas(self): - return self._revlog._aggressivemergedeltas + def _deltabothparents(self): + return self._revlog._deltabothparents - @_aggressivemergedeltas.setter - def _aggressivemergedeltas(self, value): - self._revlog._aggressivemergedeltas = value + @_deltabothparents.setter + def _deltabothparents(self, value): + self._revlog._deltabothparents = value @property def _inline(self):
--- a/mercurial/localrepo.py Thu Jul 19 09:57:42 2018 +0200 +++ b/mercurial/localrepo.py Thu Jul 19 10:06:58 2018 +0200 @@ -669,9 +669,9 @@ if manifestcachesize is not None: self.svfs.options['manifestcachesize'] = manifestcachesize # experimental config: format.aggressivemergedeltas - aggressivemergedeltas = self.ui.configbool('format', - 'aggressivemergedeltas') - self.svfs.options['aggressivemergedeltas'] = aggressivemergedeltas + deltabothparents = self.ui.configbool('format', + 'aggressivemergedeltas') + self.svfs.options['deltabothparents'] = deltabothparents self.svfs.options['lazydeltabase'] = not scmutil.gddeltaconfig(self.ui) chainspan = self.ui.configbytes('experimental', 'maxdeltachainspan') if 0 <= chainspan:
--- a/mercurial/revlog.py Thu Jul 19 09:57:42 2018 +0200 +++ b/mercurial/revlog.py Thu Jul 19 10:06:58 2018 +0200 @@ -628,7 +628,7 @@ parents = [p for p in (p1r, p2r) if p != nullrev and p not in tested] - if not revlog._aggressivemergedeltas and len(parents) == 2: + if not revlog._deltabothparents and len(parents) == 2: parents.sort() # To minimize the chance of having to build a fulltext, # pick first whichever parent is closest to us (max rev) @@ -915,7 +915,7 @@ # How much data to read and cache into the raw revlog data cache. self._chunkcachesize = 65536 self._maxchainlen = None - self._aggressivemergedeltas = True + self._deltabothparents = True self.index = [] # Mapping of partial identifiers to full nodes. self._pcache = {} @@ -945,8 +945,8 @@ self._chunkcachesize = opts['chunkcachesize'] if 'maxchainlen' in opts: self._maxchainlen = opts['maxchainlen'] - if 'aggressivemergedeltas' in opts: - self._aggressivemergedeltas = opts['aggressivemergedeltas'] + if 'deltabothparents' in opts: + self._deltabothparents = opts['deltabothparents'] self._lazydeltabase = bool(opts.get('lazydeltabase', False)) if 'compengine' in opts: self._compengine = opts['compengine'] @@ -2843,7 +2843,7 @@ DELTAREUSEALL = {'always', 'samerevs', 'never', 'fulladd'} def clone(self, tr, destrevlog, addrevisioncb=None, - deltareuse=DELTAREUSESAMEREVS, aggressivemergedeltas=None): + deltareuse=DELTAREUSESAMEREVS, deltabothparents=None): """Copy this revlog to another, possibly with format changes. The destination revlog will contain the same revisions and nodes. @@ -2877,7 +2877,7 @@ deltas will be recomputed if the delta's parent isn't a parent of the revision. - In addition to the delta policy, the ``aggressivemergedeltas`` argument + In addition to the delta policy, the ``deltabothparents`` argument controls whether to compute deltas against both parents for merges. By default, the current default is used. """ @@ -2894,7 +2894,7 @@ # lazydeltabase controls whether to reuse a cached delta, if possible. oldlazydeltabase = destrevlog._lazydeltabase - oldamd = destrevlog._aggressivemergedeltas + oldamd = destrevlog._deltabothparents try: if deltareuse == self.DELTAREUSEALWAYS: @@ -2902,7 +2902,7 @@ elif deltareuse == self.DELTAREUSESAMEREVS: destrevlog._lazydeltabase = False - destrevlog._aggressivemergedeltas = aggressivemergedeltas or oldamd + destrevlog._deltabothparents = deltabothparents or oldamd populatecachedelta = deltareuse in (self.DELTAREUSEALWAYS, self.DELTAREUSESAMEREVS) @@ -2957,4 +2957,4 @@ addrevisioncb(self, rev, node) finally: destrevlog._lazydeltabase = oldlazydeltabase - destrevlog._aggressivemergedeltas = oldamd + destrevlog._deltabothparents = oldamd
--- a/mercurial/upgrade.py Thu Jul 19 09:57:42 2018 +0200 +++ b/mercurial/upgrade.py Thu Jul 19 10:06:58 2018 +0200 @@ -455,7 +455,7 @@ #reverse of "/".join(("data", path + ".i")) return filelog.filelog(repo.svfs, path[5:-2]) -def _copyrevlogs(ui, srcrepo, dstrepo, tr, deltareuse, aggressivemergedeltas): +def _copyrevlogs(ui, srcrepo, dstrepo, tr, deltareuse, deltabothparents): """Copy revlogs between 2 repos.""" revcount = 0 srcsize = 0 @@ -579,7 +579,7 @@ ui.note(_('cloning %d revisions from %s\n') % (len(oldrl), unencoded)) oldrl.clone(tr, newrl, addrevisioncb=oncopiedrevision, deltareuse=deltareuse, - aggressivemergedeltas=aggressivemergedeltas) + deltabothparents=deltabothparents) datasize = 0 idx = newrl.index