Rev 2668: Delegate repository.get_revision_graph to the revisions knit if possible. in http://people.ubuntu.com/~robertc/baz2.0/repository

Robert Collins robertc at robertcollins.net
Wed Jul 18 07:24:23 BST 2007


At http://people.ubuntu.com/~robertc/baz2.0/repository

------------------------------------------------------------
revno: 2668
revision-id: robertc at robertcollins.net-20070718062421-z67w9x2nak16qt7h
parent: robertc at robertcollins.net-20070718061621-xz2w9x9zj5cwwnnk
committer: Robert Collins <robertc at robertcollins.net>
branch nick: repository
timestamp: Wed 2007-07-18 16:24:21 +1000
message:
  Delegate repository.get_revision_graph to the revisions knit if possible.
modified:
  bzrlib/repofmt/knitrepo.py     knitrepo.py-20070206081537-pyy4a00xdas0j4pf-1
=== modified file 'bzrlib/repofmt/knitrepo.py'
--- a/bzrlib/repofmt/knitrepo.py	2007-07-18 04:31:29 +0000
+++ b/bzrlib/repofmt/knitrepo.py	2007-07-18 06:24:21 +0000
@@ -162,16 +162,7 @@
         elif revision_id not in a_weave:
             raise errors.NoSuchRevision(self, revision_id)
         else:
-            # add what can be reached from revision_id
-            result = {}
-            pending = set([revision_id])
-            while len(pending) > 0:
-                node = pending.pop()
-                result[node] = a_weave.get_parents(node)
-                for revision_id in result[node]:
-                    if revision_id not in result:
-                        pending.add(revision_id)
-            return result
+            return a_weave.get_graph([revision_id])
 
     @needs_read_lock
     def get_revision_graph_with_ghosts(self, revision_ids=None):



More information about the bazaar-commits mailing list