Changeset ef2e550018b8…
Parent e14328a9801b…
by
Changes to 2 files · Browse files at ef2e550018b8 Showing diff from parent e14328a9801b Diff from another changeset...
@@ -135,6 +135,7 @@ if not wants:
self.proto.write_pkt_line(None)
return refs
+ assert isinstance(wants, list) and type(wants[0]) == str
self.proto.write_pkt_line("want %s %s\n" % (wants[0], self.capabilities()))
for want in wants[1:]:
self.proto.write_pkt_line("want %s\n" % want)
|
@@ -442,13 +442,14 @@
:param object_store: Object store containing at least all objects to be
sent
+ :param haves: SHA1s of commits not to send (already present in target)
:param wants: SHA1s of commits to send
:param progress: Optional function to report progress to.
"""
def __init__(self, object_store, haves, wants, progress=None):
self.sha_done = set(haves)
- self.objects_to_send = set([(w, None, False) for w in wants])
+ 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
@@ -515,6 +516,3 @@ self.heads.update(ps)
return ret
return None
-
-
-
|
Loading...