Add edges to shown_edges at the first oportunity.
authorZac Medico <zmedico@gentoo.org>
Sat, 19 May 2007 08:25:12 +0000 (08:25 -0000)
committerZac Medico <zmedico@gentoo.org>
Sat, 19 May 2007 08:25:12 +0000 (08:25 -0000)
svn path=/main/trunk/; revision=6557

pym/emerge/__init__.py

index d09aa5615824c25a915f9f3ed1e258cffd27d081..a18fbf83362db3e61ce14c447928fc3dc15bb906 100644 (file)
@@ -2414,14 +2414,11 @@ class depgraph:
                                                                                selected_parent = node
                                                                                break
                                                        if selected_parent:
-                                                               edge = (current_node, selected_parent)
-                                                               if edge not in shown_edges:
-                                                                       traversed_nodes.add(selected_parent)
-                                                                       add_parents(selected_parent, False)
+                                                               shown_edges.add((current_node, selected_parent))
+                                                               traversed_nodes.add(selected_parent)
+                                                               add_parents(selected_parent, False)
                                                display_list.append((list(current_node),
                                                        len(tree_nodes), ordered))
-                                               if tree_nodes:
-                                                       shown_edges.add((current_node, tree_nodes[-1]))
                                                tree_nodes.append(current_node)
                                        tree_nodes = []
                                        add_parents(graph_key, True)