Rev 4400: A couple quick cleanups in http://bazaar.launchpad.net/~jameinel/bzr/1.16-better_heads

John Arbash Meinel john at arbash-meinel.com
Thu Jun 11 21:02:59 BST 2009


At http://bazaar.launchpad.net/~jameinel/bzr/1.16-better_heads

------------------------------------------------------------
revno: 4400
revision-id: john at arbash-meinel.com-20090611200247-zvx587wf8qyr2rg1
parent: john at arbash-meinel.com-20090611192457-709bcvurmy02itd3
committer: John Arbash Meinel <john at arbash-meinel.com>
branch nick: 1.16-better_heads
timestamp: Thu 2009-06-11 15:02:47 -0500
message:
  A couple quick cleanups
-------------- next part --------------
=== modified file 'bzrlib/_known_graph_pyx.pyx'
--- a/bzrlib/_known_graph_pyx.pyx	2009-06-11 19:24:57 +0000
+++ b/bzrlib/_known_graph_pyx.pyx	2009-06-11 20:02:47 +0000
@@ -275,8 +275,6 @@
         return tails
 
     def _find_gdfo(self):
-        # TODO: Consider moving the tails search into the first-pass over the
-        #       data, inside _find_linear_dominators
         cdef PyObject *temp_node
         cdef Py_ssize_t pos, pos2
         cdef _KnownGraphNode node
@@ -291,7 +289,7 @@
             node.gdfo = 1
             heappush(todo, (1, node))
         max_gdfo = len(self._nodes) + 1
-        while todo:
+        while PyList_GET_SIZE(todo) > 0:
             temp_node = PyTuple_GET_ITEM(heappop(todo), 1)
             node = <_KnownGraphNode>temp_node
             next_gdfo = node.gdfo + 1



More information about the bazaar-commits mailing list