Rev 3784: Merge bb-core. in http://people.ubuntu.com/~robertc/baz2.0/repository
Robert Collins
robertc at robertcollins.net
Fri Nov 14 05:15:37 GMT 2008
At http://people.ubuntu.com/~robertc/baz2.0/repository
------------------------------------------------------------
revno: 3784
revision-id: robertc at robertcollins.net-20081114051533-8paslkqeb0vzxyld
parent: robertc at robertcollins.net-20081114043840-64gm1m0d9b2m7336
parent: vila at scythe-20081114034629-lm5t44wupzn8g9xv
committer: Robert Collins <robertc at robertcollins.net>
branch nick: repository
timestamp: Fri 2008-11-14 16:15:33 +1100
message:
Merge bb-core.
modified:
bzrlib/inventory.py inventory.py-20050309040759-6648b84ca2005b37
bzrlib/tree.py tree.py-20050309040759-9d5f2496be663e77
------------------------------------------------------------
revno: 3768.1.11
revision-id: vila at scythe-20081114034629-lm5t44wupzn8g9xv
parent: vila at scythe-20081114030636-9v3p1wvoh5miospj
committer: Vincent Ladeuil <vila at scythe>
branch nick: work
timestamp: Fri 2008-11-14 13:46:29 +1000
message:
Handle specific files iter_changes.
* inventory.py:
(CHKInventory.iter_changes): Add specific_file_ids
parameter. Filter out the irrevelant changes as soon as possible,
but no sooner (leave CHKMap do its optimal job without interfering).
* tree.py:
(InterTree.iter_changes): Pass the specific file ids down.
modified:
bzrlib/inventory.py inventory.py-20050309040759-6648b84ca2005b37
bzrlib/tree.py tree.py-20050309040759-9d5f2496be663e77
------------------------------------------------------------
revno: 3768.1.10
revision-id: vila at scythe-20081114030636-9v3p1wvoh5miospj
parent: vila at scythe-20081114025149-pjkkn2s5ik6t1eyw
parent: robertc at robertcollins.net-20081114040641-3vfc7y1veq9qtblq
committer: Vincent Ladeuil <vila at scythe>
branch nick: work
timestamp: Fri 2008-11-14 13:06:36 +1000
message:
merge bbc
modified:
bzrlib/chk_map.py chk_map.py-20081001014447-ue6kkuhofvdecvxa-1
bzrlib/inventory.py inventory.py-20050309040759-6648b84ca2005b37
bzrlib/tests/test_chk_map.py test_chk_map.py-20081001014447-ue6kkuhofvdecvxa-2
=== modified file 'bzrlib/inventory.py'
--- a/bzrlib/inventory.py 2008-11-14 04:38:40 +0000
+++ b/bzrlib/inventory.py 2008-11-14 05:15:33 +0000
@@ -1560,7 +1560,8 @@
for key, _ in self.id_to_entry.iteritems():
yield key[-1]
- def iter_changes(self, basis):
+ def iter_changes(self, basis,
+ specific_file_ids=None):
"""Generate a Tree.iter_changes change list between this and basis.
:param basis: Another CHKInventory.
@@ -1573,6 +1574,11 @@
for key, basis_value, self_value in \
self.id_to_entry.iter_changes(basis.id_to_entry):
file_id = key[0]
+ if (specific_file_ids is not None
+ and not file_id in specific_file_ids):
+ # CHKMap.iter_changes is clean and fast. Better filter out
+ # the specific files *after* it did its job.
+ continue
if basis_value is not None:
basis_entry = basis._bytes_to_entry(basis_value)
path_in_source = basis.id2path(file_id)
=== modified file 'bzrlib/tree.py'
--- a/bzrlib/tree.py 2008-11-14 00:11:23 +0000
+++ b/bzrlib/tree.py 2008-11-14 03:46:29 +0000
@@ -869,7 +869,8 @@
except:
pass
else:
- for result in self.target.inventory.iter_changes(self.source.inventory):
+ for result in self.target.inventory.iter_changes(
+ self.source.inventory, specific_file_ids=specific_file_ids):
yield result
return
to_paths = {}
More information about the bazaar-commits
mailing list