At http://bzr.arbash-meinel.com/branches/bzr/brisbane/hack

------------------------------------------------------------
revno: 3820
revision-id: [email protected]
parent: [email protected]
committer: John Arbash Meinel <[email protected]>
branch nick: hack
timestamp: Tue 2008-12-23 16:16:09 -0600
message:
  Handle the fact that _copy_nodes is not much like _copy_nodes_graph.
=== modified file 'bzrlib/repofmt/pack_repo.py'
--- a/bzrlib/repofmt/pack_repo.py       2008-12-23 21:59:08 +0000
+++ b/bzrlib/repofmt/pack_repo.py       2008-12-23 22:16:09 +0000
@@ -885,10 +885,23 @@
             'chk_index')
         chk_nodes = self._index_contents(chk_indices, refs)
         new_refs = set()
-        for line in self._copy_nodes_graph(chk_nodes, chk_index_map,
-            self.new_pack._writer, self.new_pack.chk_index, output_lines=True):
+        total_items, readv_group_iter = self._least_readv_node_readv(chk_nodes)
+        lines = []
+        last_key = None
+        for line, key in self._copy_nodes_graph(chk_index_map,
+            self.new_pack._writer, self.new_pack.chk_index,
+            readv_group_iter, total_items, output_lines=True):
+            if last_key is None:
+                last_key = key
+            if last_key != key:
+                last_key = key
+                bytes = ''.join(lines)
+                node = chk_map._deserialise(bytes, last_key)
+                new_refs.update(node.refs())
+                lines = []
+        if lines:
             bytes = ''.join(lines)
-            node = chk_map._deserialise(bytes, ("unknown",))
+            node = chk_map._deserialise(bytes, last_key)
             new_refs.update(node.refs())
         return new_refs
 

-- 
bazaar-commits mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/bazaar-commits

Reply via email to