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

delta-find: move tested in the _DeltaSearch.__init__

Now that we have an object we can initialize that attribute at initialization
time. This will make it available for more method in the future, allowing to
split the code.
parent c9ab452e5611
No related branches found
No related tags found
2 merge requests!752introduce subclass for delta-search,!747move code in a _DeltaSearch object
......@@ -715,6 +715,8 @@
snapshot_cache = SnapshotCache()
self.snapshot_cache = snapshot_cache
self.tested = {nullrev}
def candidate_groups(self):
"""Provides group of revision to be tested as delta base
......@@ -741,7 +743,7 @@
deltas_limit = self.textlen * LIMIT_DELTA2TEXT
group_chunk_size = self.revlog.delta_config.candidate_group_chunk_size
tested = {nullrev}
tested = self.tested # prefetch for speed and code compactness
candidates = self._refined_groups()
while True:
temptative = candidates.send(good)
......
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