Rev 2807: Generate the text_index_map for packing during the core operation, from the pack objects. in http://people.ubuntu.com/~robertc/baz2.0/repository
Robert Collins
robertc at robertcollins.net
Wed Oct 10 09:24:57 BST 2007
At http://people.ubuntu.com/~robertc/baz2.0/repository
------------------------------------------------------------
revno: 2807
revision-id: robertc at robertcollins.net-20071010082447-qcfzqs11hk9l32tz
parent: robertc at robertcollins.net-20071010081102-6agu3iikmkyl2zd2
committer: Robert Collins <robertc at robertcollins.net>
branch nick: repository
timestamp: Wed 2007-10-10 18:24:47 +1000
message:
Generate the text_index_map for packing during the core operation, from the pack objects.
modified:
bzrlib/repofmt/pack_repo.py pack_repo.py-20070813041115-gjv5ma7ktfqwsjgn-1
bzrlib/repository.py rev_storage.py-20051111201905-119e9401e46257e3
=== modified file 'bzrlib/repofmt/pack_repo.py'
--- a/bzrlib/repofmt/pack_repo.py 2007-10-10 08:11:02 +0000
+++ b/bzrlib/repofmt/pack_repo.py 2007-10-10 08:24:47 +0000
@@ -268,7 +268,7 @@
return True
def create_pack_from_packs(self, packs,
- text_index_map, signature_index_map, suffix,
+ signature_index_map, suffix,
revision_ids=None):
"""Create a new pack by reading data from other packs.
@@ -378,6 +378,8 @@
inv_index.key_count(),
time.time() - start_time)
# select text keys
+ text_index_map = self._packs_list_to_pack_map_and_index_list(
+ packs, 'text_index')[0]
text_nodes = self._index_contents(text_index_map, text_filter)
if text_filter is not None:
# We could return the keys copied as part of the return value from
@@ -593,12 +595,10 @@
in use.
:return: None
"""
- # select text keys
- text_index_map = self._text_index_map(pack_details)
# select signature keys
signature_index_map = self._signature_index_map(pack_details)
self.create_pack_from_packs(packs,
- text_index_map, signature_index_map, '.autopack')
+ signature_index_map, '.autopack')
def _copy_nodes(self, nodes, index_map, writer, write_index):
# plan a readv on each source pack:
@@ -864,18 +864,10 @@
pack_map[index] = (pack.transport, pack.file_name())
return pack_map, indices
- def _inv_index_map(self, pack_details):
- """Get a map of inv index -> packs for pack_details."""
- return self._make_index_to_pack_map(pack_details, '.iix')[0]
-
def _signature_index_map(self, pack_details):
"""Get a map of signature index -> packs for pack_details."""
return self._make_index_to_pack_map(pack_details, '.six')[0]
- def _text_index_map(self, pack_details):
- """Get a map of text index -> packs for pack_details."""
- return self._make_index_to_pack_map(pack_details, '.tix')[0]
-
def _index_contents(self, pack_map, key_filter=None):
"""Get an iterable of the index contents from a pack_map.
=== modified file 'bzrlib/repository.py'
--- a/bzrlib/repository.py 2007-10-10 08:11:02 +0000
+++ b/bzrlib/repository.py 2007-10-10 08:24:47 +0000
@@ -2344,11 +2344,9 @@
raise errors.InstallFailed([revision_id])
packs = self.source._packs.all_pack_details()
_packs = self.source._packs.all_packs()
- text_index_map = self.source._packs._text_index_map(packs)
signature_index_map = self.source._packs._signature_index_map(packs)
pack = self.target._packs.create_pack_from_packs(
_packs,
- text_index_map,
signature_index_map,
'.fetch',
revision_ids,
More information about the bazaar-commits
mailing list