Changeset dcaba02adcea…
Parent bb188d92ce39…
by
Changes to 2 files · Browse files at dcaba02adcea Showing diff from parent bb188d92ce39 Diff from another changeset...
@@ -109,6 +109,21 @@ """
return iter(MissingObjectFinder(self, haves, wants, progress).next, None)
+ def find_common_revisions(self, graphwalker):
+ """Find which revisions this store has in common using graphwalker.
+
+ :param graphwalker: A graphwalker object.
+ :return: List of SHAs that are in common
+ """
+ haves = []
+ sha = graphwalker.next()
+ while sha:
+ if sha in self:
+ haves.append(sha)
+ graphwalker.ack(sha)
+ sha = graphwalker.next()
+ return haves
+
def get_graph_walker(self, heads):
"""Obtain a graph walker for this object store.
|
@@ -228,7 +228,7 @@ :return: tuple with number of objects, iterator over objects
"""
wants = determine_wants(self.get_refs())
- haves = self.object_store.find_missing_revisions(graphwalker)
+ haves = self.object_store.find_common_revisions(graphwalker)
return self.object_store.iter_shas(
self.object_store.find_missing_objects(haves, wants, progress))
|
Loading...