##// END OF EJS Templates
revlog: use a symbolic constant for the deltas/text ration...
Boris Feld -
r39121:64ddad2f default
parent child Browse files
Show More
@@ -809,6 +809,9 b' class revlogoldindex(list):'
809 return (0, 0, 0, -1, -1, -1, -1, nullid)
809 return (0, 0, 0, -1, -1, -1, -1, nullid)
810 return list.__getitem__(self, i)
810 return list.__getitem__(self, i)
811
811
812 # maximum <delta-chain-data>/<revision-text-length> ratio
813 LIMIT_DELTA2TEXT = 2
814
812 class revlogoldio(object):
815 class revlogoldio(object):
813 def __init__(self):
816 def __init__(self):
814 self.size = indexformatv0.size
817 self.size = indexformatv0.size
@@ -2493,7 +2496,7 b' class revlog(object):'
2493 # Bad delta from cumulated payload size:
2496 # Bad delta from cumulated payload size:
2494 #
2497 #
2495 # If the sum of delta get larger than K * target text length.
2498 # If the sum of delta get larger than K * target text length.
2496 if textlen * 2 < deltainfo.compresseddeltalen:
2499 if textlen * LIMIT_DELTA2TEXT < deltainfo.compresseddeltalen:
2497 return False
2500 return False
2498
2501
2499 # Bad delta from chain length:
2502 # Bad delta from chain length:
General Comments 0
You need to be logged in to leave comments. Login now