Commit 6a55fd04 authored by Anton Shestakov's avatar Anton Shestakov
Browse files

obsdiscovery: use plural forms of nodes and markers for variables

Since we're storing multiple markers and nodes in them, makes sense to rename
them to be plural.
parent 78c94cc74c52
Pipeline #6618 failed with stage
in 5 minutes and 16 seconds
......@@ -293,15 +293,15 @@ def _affectedby(repo, markers):
affected_nodes = set()
known_markers = set(markers)
node_to_proceed = set()
marker_to_proceed = set(known_markers)
nodes_to_proceed = set()
markers_to_proceed = set(known_markers)
successors = repo.obsstore.successors
predecessors = repo.obsstore.predecessors
while node_to_proceed or marker_to_proceed:
while marker_to_proceed:
marker = marker_to_proceed.pop()
while nodes_to_proceed or markers_to_proceed:
while markers_to_proceed:
marker = markers_to_proceed.pop()
# check successors and parent
if marker[1]:
relevant = (marker[1], )
......@@ -312,16 +312,16 @@ def _affectedby(repo, markers):
for node in relnodes:
if node not in affected_nodes:
# marker_to_proceed is now empty:
if node_to_proceed:
node = node_to_proceed.pop()
# markers_to_proceed is now empty:
if nodes_to_proceed:
node = nodes_to_proceed.pop()
markers = set()
markers.update(successors.get(node, ()))
markers.update(predecessors.get(node, ()))
markers -= known_markers
return affected_nodes
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment