Rev 2306: Use a set for specific ids for Inventory.iter_entries_by_dir in http://bzr.arbash-meinel.com/branches/bzr/jam-integration

John Arbash Meinel john at arbash-meinel.com
Fri Mar 2 15:23:31 GMT 2007


At http://bzr.arbash-meinel.com/branches/bzr/jam-integration

------------------------------------------------------------
revno: 2306
revision-id: john at arbash-meinel.com-20070302152321-hgsk2328bwgi1e6g
parent: john at arbash-meinel.com-20070228151923-1s7oa2i2kk9u9ufo
committer: John Arbash Meinel <john at arbash-meinel.com>
branch nick: jam-integration
timestamp: Fri 2007-03-02 09:23:21 -0600
message:
  Use a set for specific ids for Inventory.iter_entries_by_dir
modified:
  bzrlib/inventory.py            inventory.py-20050309040759-6648b84ca2005b37
-------------- next part --------------
=== modified file 'bzrlib/inventory.py'
--- a/bzrlib/inventory.py	2007-02-18 00:22:24 +0000
+++ b/bzrlib/inventory.py	2007-03-02 15:23:21 +0000
@@ -960,8 +960,8 @@
         :return: This yields (path, entry) pairs
         """
         if specific_file_ids:
-            specific_file_ids = [osutils.safe_file_id(fid)
-                                 for fid in specific_file_ids]
+            safe = osutils.safe_file_id
+            specific_file_ids = set(safe(fid) for fid in specific_file_ids)
         # TODO? Perhaps this should return the from_dir so that the root is
         # yielded? or maybe an option?
         if from_dir is None:



More information about the bazaar-commits mailing list