Support progress argument to generate_pack_contents.
authorJelmer Vernooij <jelmer@samba.org>
Fri, 2 Apr 2010 02:15:07 +0000 (04:15 +0200)
committerJelmer Vernooij <jelmer@samba.org>
Fri, 2 Apr 2010 02:15:07 +0000 (04:15 +0200)
dulwich/object_store.py

index ec4fd04aa81ca7fcfc4c505ceb413c02c9ace9a8..cad7bd671b1df254cb22ce05cfcbd935b687a298 100644 (file)
@@ -225,13 +225,14 @@ class BaseObjectStore(object):
         """
         return ObjectStoreGraphWalker(heads, lambda sha: self[sha].parents)
 
-    def generate_pack_contents(self, have, want):
+    def generate_pack_contents(self, have, want, progress=None):
         """Iterate over the contents of a pack file.
 
         :param have: List of SHA1s of objects that should not be sent
         :param want: List of SHA1s of objects that should be sent
+        :param progress: Optional progress reporting method
         """
-        return self.iter_shas(self.find_missing_objects(have, want))
+        return self.iter_shas(self.find_missing_objects(have, want, progress))
 
 
 class PackBasedObjectStore(BaseObjectStore):