##// END OF EJS Templates
revlog: extract `deltainfo.distance` for future conditional redefinition...
Paul Morelle -
r38738:c67093e8 default
parent child Browse files
Show More
@@ -2398,13 +2398,14 b' class revlog(object):'
2398 2398 # deltas we need to apply -- bounding it limits the amount of CPU
2399 2399 # we consume.
2400 2400
2401 distance = deltainfo.distance
2401 2402 textlen = revinfo.textlen
2402 2403 defaultmax = textlen * 4
2403 2404 maxdist = self._maxdeltachainspan
2404 2405 if not maxdist:
2405 maxdist = deltainfo.distance # ensure the conditional pass
2406 maxdist = distance # ensure the conditional pass
2406 2407 maxdist = max(maxdist, defaultmax)
2407 if (deltainfo.distance > maxdist or deltainfo.deltalen > textlen or
2408 if (distance > maxdist or deltainfo.deltalen > textlen or
2408 2409 deltainfo.compresseddeltalen > textlen * 2 or
2409 2410 (self._maxchainlen and deltainfo.chainlen > self._maxchainlen)):
2410 2411 return False
General Comments 0
You need to be logged in to leave comments. Login now