Changes to 2 files · Browse files at 85f17454c4c1 Showing diff from parent f72cac196a36 Diff from another changeset...
@@ -47,6 +47,8 @@
* Use real in-memory objects rather than stubs for server tests.
(Dave Borowitz)
+
+ * Clean up MissingObjectFinder. (Dave Borowitz)
API CHANGES
|
@@ -711,8 +711,10 @@
def __init__(self, object_store, haves, wants, progress=None,
get_tagged=None):
- self.sha_done = set(haves)
- self.objects_to_send = set([(w, None, False) for w in wants if w not in haves])
+ haves = set(haves)
+ self.sha_done = haves
+ self.objects_to_send = set([(w, None, False) for w in wants
+ if w not in haves])
self.object_store = object_store
if progress is None:
self.progress = lambda x: None
@@ -721,10 +723,13 @@ self._tagged = get_tagged and get_tagged() or {}
def add_todo(self, entries):
- self.objects_to_send.update([e for e in entries if not e[0] in self.sha_done])
+ self.objects_to_send.update([e for e in entries
+ if not e[0] in self.sha_done])
def parse_tree(self, tree):
- self.add_todo([(sha, name, not stat.S_ISDIR(mode)) for (mode, name, sha) in tree.entries() if not S_ISGITLINK(mode)])
+ self.add_todo([(sha, name, not stat.S_ISDIR(mode))
+ for mode, name, sha in tree.entries()
+ if not S_ISGITLINK(mode)])
def parse_commit(self, commit):
self.add_todo([(commit.tree, "", False)])
|
Loading...