diff --git a/mercurial/revlogutils/deltas.py b/mercurial/revlogutils/deltas.py index 176d530f59afd05dcc1699ed70cfd0cb5bf7a950_bWVyY3VyaWFsL3JldmxvZ3V0aWxzL2RlbHRhcy5weQ==..410afe5b13fcd5060fee921b96e0c2331b41e582_bWVyY3VyaWFsL3JldmxvZ3V0aWxzL2RlbHRhcy5weQ== 100644 --- a/mercurial/revlogutils/deltas.py +++ b/mercurial/revlogutils/deltas.py @@ -1066,9 +1066,6 @@ # - 'deltainfo.distance' is the distance from the base revision -- # bounding it limits the amount of I/O we need to do. - # - 'deltainfo.compresseddeltalen' is the sum of the total size of - # deltas we need to apply -- bounding it limits the amount of CPU - # we consume. textlen = self.revinfo.textlen defaultmax = textlen * 4 @@ -1094,4 +1091,8 @@ # Bad delta from cumulated payload size: # + # - 'deltainfo.compresseddeltalen' is the sum of the total size of + # deltas we need to apply -- bounding it limits the amount of CPU + # we consume. + max_chain_data = self.revinfo.textlen * LIMIT_DELTA2TEXT # If the sum of delta get larger than K * target text length. @@ -1097,5 +1098,5 @@ # If the sum of delta get larger than K * target text length. - if textlen * LIMIT_DELTA2TEXT < deltainfo.compresseddeltalen: + if max_chain_data < deltainfo.compresseddeltalen: return False # Bad delta from chain length: