Rev 3072: Cleanup OptimizingPacker code according to my review feedback in http://bzr.arbash-meinel.com/branches/bzr/0.93-dev/pack_optimizer
John Arbash Meinel
john at arbash-meinel.com
Mon Dec 10 17:55:19 GMT 2007
At http://bzr.arbash-meinel.com/branches/bzr/0.93-dev/pack_optimizer
------------------------------------------------------------
revno: 3072
revision-id:john at arbash-meinel.com-20071210175440-3ywpk5riruelw2sv
parent: robertc at robertcollins.net-20071204021939-883w43jh8fuy1mzf
committer: John Arbash Meinel <john at arbash-meinel.com>
branch nick: pack_optimizer
timestamp: Mon 2007-12-10 11:54:40 -0600
message:
Cleanup OptimizingPacker code according to my review feedback
modified:
bzrlib/repofmt/pack_repo.py pack_repo.py-20070813041115-gjv5ma7ktfqwsjgn-1
-------------- next part --------------
=== modified file 'bzrlib/repofmt/pack_repo.py'
--- a/bzrlib/repofmt/pack_repo.py 2007-12-04 02:19:39 +0000
+++ b/bzrlib/repofmt/pack_repo.py 2007-12-10 17:54:40 +0000
@@ -610,7 +610,7 @@
revision_nodes = self._pack_collection._index_contents(revision_index_map, revision_keys)
# copy revision keys and adjust values
self.pb.update("Copying revision texts", 1)
- total_items, readv_group_iter = self._sort_revisions(revision_nodes)
+ total_items, readv_group_iter = self._revision_node_readv(revision_nodes)
list(self._copy_nodes_graph(revision_index_map, self.new_pack._writer,
self.new_pack.revision_index, readv_group_iter, total_items))
if 'pack' in debug.debug_flags:
@@ -906,7 +906,7 @@
text_filter.extend([(fileid, file_revid) for file_revid in file_revids])
self._text_filter = text_filter
- def _sort_revisions(self, revision_nodes):
+ def _revision_node_readv(self, revision_nodes):
"""Return the total revisions and the readv's to issue.
:param revision_nodes: The revision index contents for the packs being
@@ -927,7 +927,7 @@
class OptimisingPacker(Packer):
"""A packer which spends more time to create better disk layouts."""
- def _sort_revisions(self, revision_nodes):
+ def _revision_node_readv(self, revision_nodes):
"""Return the total revisions and the readv's to issue.
This sort places revisions in topological order with the ancestors
@@ -1232,8 +1232,7 @@
"""Execute a series of pack operations.
:param pack_operations: A list of [revision_count, packs_to_combine].
- :param _packer_class: The class of packer to use. If not supplied
- Packer will be used.
+ :param _packer_class: The class of packer to use (default: Packer).
:return: None.
"""
for revision_count, packs in pack_operations:
More information about the bazaar-commits
mailing list