Rev 3820: Handle the fact that _copy_nodes is not much like _copy_nodes_graph. in http://bzr.arbash-meinel.com/branches/bzr/brisbane/hack
John Arbash Meinel
john at arbash-meinel.com
Tue Dec 23 22:16:24 GMT 2008
At http://bzr.arbash-meinel.com/branches/bzr/brisbane/hack
------------------------------------------------------------
revno: 3820
revision-id: john at arbash-meinel.com-20081223221609-62qykvgj154t892r
parent: john at arbash-meinel.com-20081223215908-hadmlw44raasi2b1
committer: John Arbash Meinel <john at arbash-meinel.com>
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.
-------------- next part --------------
=== 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
More information about the bazaar-commits
mailing list