Kiln » Dependencies » Dulwich Read More
Clone URL:  
Pushed to one repository · View In Graph Contained in master

object_store: Don't send a pack with duplicates of the same object.

Change-Id: I60cff6453dcd40fefcda8c7048befd545451d712

Changeset 222e45c9e739

Parent 8c4061d717be

committed by Jelmer Vernooij

authored by Dave Borowitz

Changes to 2 files · Browse files at 222e45c9e739 Showing diff from parent 8c4061d717be Diff from another changeset...

Change 1 of 1 Show Entire File NEWS Stacked
 
45
46
47
 
 
48
49
50
 
45
46
47
48
49
50
51
52
@@ -45,6 +45,8 @@
    * Teach ReceivePackHandler how to read empty packs. (Dave Borowitz)   + * Don't send a pack with duplicates of the same object. (Dave Borowitz) +   API CHANGES     * write_pack no longer takes the num_objects argument and requires an object
 
731
732
733
734
735
736
 
 
 
 
 
 
737
738
739
 
731
732
733
 
 
 
734
735
736
737
738
739
740
741
742
@@ -731,9 +731,12 @@
  self.add_todo([(tag.object[1], None, False)])     def next(self): - if not self.objects_to_send: - return None - (sha, name, leaf) = self.objects_to_send.pop() + while True: + if not self.objects_to_send: + return None + (sha, name, leaf) = self.objects_to_send.pop() + if sha not in self.sha_done: + break   if not leaf:   o = self.object_store[sha]   if isinstance(o, Commit):