Mercurial > hg
diff mercurial/revlog.py @ 33168:664d6f6c2a48 stable
revlog: backed out changeset e9d325cfe071
We'll move this to the default branch.
author | Augie Fackler <augie@google.com> |
---|---|
date | Tue, 04 Jul 2017 10:17:14 -0400 |
parents | e9d325cfe071 |
children | 85d1ac011582 |
line wrap: on
line diff
--- a/mercurial/revlog.py Fri Jun 23 13:49:34 2017 +0200 +++ b/mercurial/revlog.py Tue Jul 04 10:17:14 2017 -0400 @@ -282,7 +282,6 @@ self._nodecache = {nullid: nullrev} self._nodepos = None self._compengine = 'zlib' - self._maxdeltachainspan = -1 v = REVLOG_DEFAULT_VERSION opts = getattr(opener, 'options', None) @@ -301,8 +300,6 @@ self._lazydeltabase = bool(opts.get('lazydeltabase', False)) if 'compengine' in opts: self._compengine = opts['compengine'] - if 'maxdeltachainspan' in opts: - self._maxdeltachainspan = opts['maxdeltachainspan'] if self._chunkcachesize <= 0: raise RevlogError(_('revlog chunk cache size %r is not greater ' @@ -1599,13 +1596,7 @@ # - 'compresseddeltalen' is the sum of the total size of deltas we need # to apply -- bounding it limits the amount of CPU we consume. dist, l, data, base, chainbase, chainlen, compresseddeltalen = d - - defaultmax = textlen * 4 - maxdist = self._maxdeltachainspan - if not maxdist: - maxdist = dist # ensure the conditional pass - maxdist = max(maxdist, defaultmax) - if (dist > maxdist or l > textlen or + if (dist > textlen * 4 or l > textlen or compresseddeltalen > textlen * 2 or (self._maxchainlen and chainlen > self._maxchainlen)): return False