sha_done = set()
ref = graph_walker.next()
while ref:
- sha_done.add(ref)
if ref in self.object_store:
graph_walker.ack(ref)
ref = graph_walker.next()
def parse_tree(tree, sha_done):
for mode, name, sha in tree.entries():
- if sha in sha_done:
+ if (sha, name) in sha_done:
continue
if mode & stat.S_IFDIR:
parse_tree(self.tree(sha), sha_done)
that a revision is present.
:param progress: Simple progress function that will be called with
updated progress strings.
+ :return: tuple with number of objects, iterator over objects
"""
shas = self.find_missing_objects(determine_wants, graph_walker, progress)
- for sha, path in shas:
- yield self.get_object(sha), path
+ return (len(shas), ((self.get_object(sha), path) for sha, path in shas))
def object_dir(self):
return os.path.join(self.controldir(), OBJECTDIR)