Rev 2948: (robertc) Fix pack-repository to support get_parents calls as the first call on a repository, and fix full-branch push/pull performance to not suck terribly. (Robert Collins) in file:///home/pqm/archives/thelove/bzr/%2Btrunk/
Canonical.com Patch Queue Manager
pqm at pqm.ubuntu.com
Mon Oct 29 05:04:03 GMT 2007
At file:///home/pqm/archives/thelove/bzr/%2Btrunk/
------------------------------------------------------------
revno: 2948
revision-id: pqm at pqm.ubuntu.com-20071029050400-j2jmz8smj2yecfrr
parent: pqm at pqm.ubuntu.com-20071028093324-h4ymz42l31vwfbu1
parent: robertc at robertcollins.net-20071029040019-3x9as04a7s29motr
committer: Canonical.com Patch Queue Manager <pqm at pqm.ubuntu.com>
branch nick: +trunk
timestamp: Mon 2007-10-29 05:04:00 +0000
message:
(robertc) Fix pack-repository to support get_parents calls as the first call on a repository, and fix full-branch push/pull performance to not suck terribly. (Robert Collins)
modified:
bzrlib/repofmt/pack_repo.py pack_repo.py-20070813041115-gjv5ma7ktfqwsjgn-1
bzrlib/repository.py rev_storage.py-20051111201905-119e9401e46257e3
------------------------------------------------------------
revno: 2947.1.3
merged: robertc at robertcollins.net-20071029040019-3x9as04a7s29motr
parent: robertc at robertcollins.net-20071028234731-17kxx1yqlzuw1rof
committer: Robert Collins <robertc at robertcollins.net>
branch nick: pack
timestamp: Mon 2007-10-29 15:00:19 +1100
message:
Unbreak autopack. Doh.
------------------------------------------------------------
revno: 2947.1.2
merged: robertc at robertcollins.net-20071028234731-17kxx1yqlzuw1rof
parent: robertc at robertcollins.net-20071028190205-j7669ntq0jj7s5fl
committer: Robert Collins <robertc at robertcollins.net>
branch nick: pack
timestamp: Mon 2007-10-29 10:47:31 +1100
message:
Make the docstring for _find_file_ids_from_xml_inventory_lines explicit about the use filter_ids is put to.
------------------------------------------------------------
revno: 2947.1.1
merged: robertc at robertcollins.net-20071028190205-j7669ntq0jj7s5fl
parent: pqm at pqm.ubuntu.com-20071028093324-h4ymz42l31vwfbu1
committer: Robert Collins <robertc at robertcollins.net>
branch nick: pack
timestamp: Mon 2007-10-29 06:02:05 +1100
message:
(robertc) Fix pack-repository to support get_parents calls as the first call on a repository, and fix full-branch push/pull performance to not suck terribly. (Robert Collins)
=== modified file 'bzrlib/repofmt/pack_repo.py'
--- a/bzrlib/repofmt/pack_repo.py 2007-10-26 08:56:09 +0000
+++ b/bzrlib/repofmt/pack_repo.py 2007-10-29 04:00:19 +0000
@@ -617,9 +617,12 @@
if self._new_pack is not None:
raise errors.BzrError('call to create_pack_from_packs while '
'another pack is being written.')
- if revision_ids is not None and len(revision_ids) == 0:
- # silly fetch request.
- return None
+ if revision_ids is not None:
+ if len(revision_ids) == 0:
+ # silly fetch request.
+ return None
+ else:
+ revision_ids = frozenset(revision_ids)
new_pack = NewPack(self._upload_transport, self._index_transport,
self._pack_transport, upload_suffix=suffix)
# buffer data - we won't be reading-back during the pack creation and
@@ -1440,6 +1443,7 @@
This implementation accesses the combined revision index to provide
answers.
"""
+ self._pack_collection.ensure_loaded()
index = self._pack_collection.revision_index.combined_index
search_keys = set()
for revision_id in revision_ids:
=== modified file 'bzrlib/repository.py'
--- a/bzrlib/repository.py 2007-10-26 08:56:09 +0000
+++ b/bzrlib/repository.py 2007-10-28 23:47:31 +0000
@@ -1058,7 +1058,10 @@
This performs the translation of xml lines to revision ids.
:param line_iterator: An iterator of lines
- :param revision_ids: The revision ids to filter for.
+ :param revision_ids: The revision ids to filter for. This should be a
+ set or other type which supports efficient __contains__ lookups, as
+ the revision id from each parsed line will be looked up in the
+ revision_ids filter.
:return: a dictionary mapping altered file-ids to an iterable of
revision_ids. Each altered file-ids has the exact revision_ids that
altered it listed explicitly.
More information about the bazaar-commits
mailing list