Browse Source

Factor out MissingObjectFinder.

Jelmer Vernooij 2 years ago
parent
commit
ccff9b0235
3 changed files with 1 additions and 40 deletions
  1. 0 4
      dulwich/contrib/swift.py
  2. 0 36
      dulwich/object_store.py
  3. 1 0
      dulwich/repo.py

+ 0 - 4
dulwich/contrib/swift.py

@@ -690,10 +690,6 @@ class SwiftObjectStore(PackBasedObjectStore):
         shas = iter(finder.next, None)
         return PackInfoObjectStoreIterator(self, shas, finder, self.scon.concurrency)
 
-    def find_missing_objects(self, *args, **kwargs):
-        kwargs["concurrency"] = self.scon.concurrency
-        return PackInfoMissingObjectFinder(self, *args, **kwargs)
-
     def pack_info_get(self, sha):
         for pack in self.packs:
             if sha in pack:

+ 0 - 36
dulwich/object_store.py

@@ -253,42 +253,6 @@ class BaseObjectStore:
             DeprecationWarning, stacklevel=2)
         return iter_tree_contents(self, tree_id, include_trees=include_trees)
 
-    def find_missing_objects(
-        self,
-        haves,
-        wants,
-        shallow=None,
-        progress=None,
-        get_tagged=None,
-        get_parents=lambda commit: commit.parents,
-    ):
-        """Find the missing objects required for a set of revisions.
-
-        Args:
-          haves: Iterable over SHAs already in common.
-          wants: Iterable over SHAs of objects to fetch.
-          shallow: Set of shallow commit SHA1s to skip
-          progress: Simple progress function that will be called with
-            updated progress strings.
-          get_tagged: Function that returns a dict of pointed-to sha ->
-            tag sha for including tags.
-          get_parents: Optional function for getting the parents of a
-            commit.
-        Returns: Iterator over (sha, path) pairs.
-        """
-        warnings.warn(
-            'Please use MissingObjectFinder(store)', DeprecationWarning)
-        finder = MissingObjectFinder(
-            self,
-            haves=haves,
-            wants=wants,
-            shallow=shallow,
-            progress=progress,
-            get_tagged=get_tagged,
-            get_parents=get_parents,
-        )
-        return iter(finder)
-
     def find_common_revisions(self, graphwalker):
         """Find which revisions this store has in common using graphwalker.
 

+ 1 - 0
dulwich/repo.py

@@ -70,6 +70,7 @@ from dulwich.file import (
 from dulwich.object_store import (
     DiskObjectStore,
     MemoryObjectStore,
+    MissingObjectFinder,
     BaseObjectStore,
     ObjectStoreGraphWalker,
     peel_sha,