break
ignore_priority_soft_range = [None]
ignore_priority_soft_range.extend(
- xrange(DepPriority.MIN, DepPriority.SOFT + 1))
+ xrange(DepPriority.MIN, DepPriority.MEDIUM_SOFT + 1))
tree_mode = "--tree" in self.myopts
# Tracks whether or not the current iteration should prefer asap_nodes
# if available. This is set to False when the previous iteration
(accept_root_node or ignore_priority is None):
# settle for a root node
selected_nodes = [nodes[0]]
+
+ if selected_nodes and ignore_priority > DepPriority.SOFT:
+ # Try to merge ignored medium deps as soon as possible.
+ for node in selected_nodes:
+ children = set(mygraph.child_nodes(node))
+ soft = children.difference(
+ mygraph.child_nodes(node,
+ ignore_priority=DepPriority.SOFT))
+ medium_soft = children.difference(
+ mygraph.child_nodes(node,
+ ignore_priority=DepPriority.MEDIUM_SOFT))
+ medium_soft.difference_update(soft)
+ for child in medium_soft:
+ if child in selected_nodes:
+ continue
+ if child in asap_nodes:
+ continue
+ asap_nodes.append(child)
+
if not selected_nodes:
nodes = get_nodes(ignore_priority=DepPriority.MEDIUM)
if nodes: