Rev 2851: (robertc) Special case the zero-or-no-heads case for Graph.heads(). (Robert Collins) in http://people.ubuntu.com/~robertc/baz2.0/graphwalker
Robert Collins
robertc at robertcollins.net
Mon Sep 24 20:34:14 BST 2007
At http://people.ubuntu.com/~robertc/baz2.0/graphwalker
------------------------------------------------------------
revno: 2851
revision-id: robertc at robertcollins.net-20070924193404-oyg9f9fcfvyr5435
parent: pqm at pqm.ubuntu.com-20070923210826-t3ymvo1l68z96in1
committer: Robert Collins <robertc at robertcollins.net>
branch nick: graphwalker
timestamp: Tue 2007-09-25 05:34:04 +1000
message:
(robertc) Special case the zero-or-no-heads case for Graph.heads(). (Robert Collins)
modified:
bzrlib/graph.py graph_walker.py-20070525030359-y852guab65d4wtn0-1
=== modified file 'bzrlib/graph.py'
--- a/bzrlib/graph.py 2007-09-03 22:17:20 +0000
+++ b/bzrlib/graph.py 2007-09-24 19:34:04 +0000
@@ -231,6 +231,8 @@
order if they need it.
"""
candidate_heads = set(keys)
+ if len(candidate_heads) < 2:
+ return candidate_heads
searchers = dict((c, self._make_breadth_first_searcher([c]))
for c in candidate_heads)
active_searchers = dict(searchers)
More information about the bazaar-commits
mailing list