Changeset 8ee2fc9ffaf6…
Parent 655734ad359d…
by
Changes to 3 files · Browse files at 8ee2fc9ffaf6 Showing diff from parent 655734ad359d Diff from another changeset...
@@ -61,6 +61,7 @@ """Iterate over the objects for the specified shas.
:param shas: Iterable object with SHAs
+ :return: Object iterator
"""
return ObjectStoreIterator(self, shas)
|
@@ -225,7 +225,7 @@ 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
+ :return: iterator over objects, with __len__ implemented
"""
wants = determine_wants(self.get_refs())
haves = self.object_store.find_common_revisions(graph_walker)
|
@@ -161,15 +161,16 @@ self.proto.write_pkt_line("NAK\n")
graph_walker = ProtocolGraphWalker(self.proto)
- num_objects, objects_iter = self.backend.fetch_objects(determine_wants, graph_walker, progress)
+ objects_iter = self.backend.fetch_objects(determine_wants, graph_walker, progress)
# Do they want any objects?
- if num_objects == 0:
+ if len(objects_iter) == 0:
return
progress("dul-daemon says what\n")
- progress("counting objects: %d, done.\n" % num_objects)
- write_pack_data(ProtocolFile(None, write), objects_iter, num_objects)
+ progress("counting objects: %d, done.\n" % len(objects_iter))
+ write_pack_data(ProtocolFile(None, write), objects_iter,
+ len(objects_iter))
progress("how was that, then?\n")
# we are done
self.proto.write("0000")
|
Loading...