Rev 5786: Transform.conflict_pass can avoid accessing tree.inventory. in http://bazaar.launchpad.net/~jameinel/bzr/2.4-merge-faster-759091

John Arbash Meinel john at arbash-meinel.com
Thu Apr 14 17:29:21 UTC 2011


At http://bazaar.launchpad.net/~jameinel/bzr/2.4-merge-faster-759091

------------------------------------------------------------
revno: 5786
revision-id: john at arbash-meinel.com-20110414172913-gjqy6upjx4az2grq
parent: john at arbash-meinel.com-20110413144711-n1t3eygituvn0blv
committer: John Arbash Meinel <john at arbash-meinel.com>
branch nick: 2.4-merge-faster-759091
timestamp: Thu 2011-04-14 19:29:13 +0200
message:
  Transform.conflict_pass can avoid accessing tree.inventory.
  
  It used to pass because all parent dirs were already noted to the Transform,
  however now only changed files are noted (and that dir wasn't changed, just
  the child). However, we want to avoid tree.inventory anyway, since
  PreviewTree doesn't implement it.
-------------- next part --------------
=== modified file 'bzrlib/transform.py'
--- a/bzrlib/transform.py	2011-04-09 20:17:43 +0000
+++ b/bzrlib/transform.py	2011-04-14 17:29:13 +0000
@@ -3039,7 +3039,7 @@
                         file_id = tt.final_file_id(trans_id)
                         if file_id is None:
                             file_id = tt.inactive_file_id(trans_id)
-                        entry = path_tree.inventory[file_id]
+                        entry = path_tree.iter_entries_by_dir([file_id]).next()
                         # special-case the other tree root (move its
                         # children to current root)
                         if entry.parent_id is None:



More information about the bazaar-commits mailing list