Skip to content
Snippets Groups Projects
Commit 176d530f59af authored by Pierre-Yves David's avatar Pierre-Yves David :octopus:
Browse files

delta-find: move delta size check earlier in is_good_delta_info

This will clarify future patches by regrouping related logic before larger
movement.
parent 1ea56b10dd4a
No related branches found
No related tags found
1 merge request!752introduce subclass for delta-search
......@@ -1057,6 +1057,13 @@
or not self.revlog.delta_config.general_delta
)
# Bad delta from new delta size:
#
# If the delta size is larger than the target text, storing the delta
# will be inefficient.
if self.revinfo.textlen < deltainfo.deltalen:
return False
# - '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
......@@ -1085,13 +1092,6 @@
):
return False
# Bad delta from new delta size:
#
# If the delta size is larger than the target text, storing the delta
# will be inefficient.
if textlen < deltainfo.deltalen:
return False
# Bad delta from cumulated payload size:
#
# If the sum of delta get larger than K * target text length.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment