Rev 3370: Knit => knit fetching also has some very bad 'for x in revision_ids: has_revision_id()' calls in http://bzr.arbash-meinel.com/branches/bzr/1.4-dev/knit_fetch_regression

John Arbash Meinel john at arbash-meinel.com
Wed Apr 16 15:59:20 BST 2008


At http://bzr.arbash-meinel.com/branches/bzr/1.4-dev/knit_fetch_regression

------------------------------------------------------------
revno: 3370
revision-id: john at arbash-meinel.com-20080416145419-n2o7pkchnet77smi
parent: pqm at pqm.ubuntu.com-20080416060444-1mgq4chv82tgm2sc
committer: John Arbash Meinel <john at arbash-meinel.com>
branch nick: knit_fetch_regression
timestamp: Wed 2008-04-16 09:54:19 -0500
message:
  Knit => knit fetching also has some very bad 'for x in revision_ids: has_revision_id()' calls
modified:
  bzrlib/repository.py           rev_storage.py-20051111201905-119e9401e46257e3
-------------- next part --------------
=== modified file 'bzrlib/repository.py'
--- a/bzrlib/repository.py	2008-04-14 22:39:51 +0000
+++ b/bzrlib/repository.py	2008-04-16 14:54:19 +0000
@@ -592,10 +592,10 @@
         Returns a set of the present revisions.
         """
         result = []
-        for id in revision_ids:
-            if self.has_revision(id):
-               result.append(id)
-        return result
+        graph = self.get_graph()
+        parent_map = graph.get_parent_map(revision_ids)
+        # The old API returned a list, should this actually be a set?
+        return parent_map.keys()
 
     @staticmethod
     def create(a_bzrdir):



More information about the bazaar-commits mailing list