Mercurial > public > mercurial-scm > hg
comparison mercurial/revlogutils/deltas.py @ 41819:688fc33e105d
storage: introduce a `revlog.reuse-external-delta` config
This option goes a bit further and provides a way to get the same behavior as the
`re-delta-all` optimisation from `hg debugupgraderepo`.
The effect of the option is a bit hard to test as we do not have multiple diff
algorithm at hand. However, we at least make sure the code path run.
author | Pierre-Yves David <pierre-yves.david@octobus.net> |
---|---|
date | Wed, 27 Feb 2019 12:40:18 +0100 |
parents | 189e06b2d719 |
children | 566daffc607d |
comparison
equal
deleted
inserted
replaced
41818:f6eff9e4de80 | 41819:688fc33e105d |
---|---|
914 currentbase = cachebase | 914 currentbase = cachebase |
915 while (currentbase != nullrev | 915 while (currentbase != nullrev |
916 and currentbase != base | 916 and currentbase != base |
917 and self.revlog.length(currentbase) == 0): | 917 and self.revlog.length(currentbase) == 0): |
918 currentbase = self.revlog.deltaparent(currentbase) | 918 currentbase = self.revlog.deltaparent(currentbase) |
919 if currentbase == base: | 919 if self.revlog._lazydelta and currentbase == base: |
920 delta = revinfo.cachedelta[1] | 920 delta = revinfo.cachedelta[1] |
921 if delta is None: | 921 if delta is None: |
922 delta = self._builddeltadiff(base, revinfo, fh) | 922 delta = self._builddeltadiff(base, revinfo, fh) |
923 revlog = self.revlog | 923 revlog = self.revlog |
924 header, data = revlog.compress(delta) | 924 header, data = revlog.compress(delta) |