# HG changeset patch # User Anton Shestakov # Date 1591447030 -28800 # Node ID c3d87d106fbe0accc535c435995f1c5b84ac16fc # Parent 78c94cc74c52d974594d32831a76993bbedf18a2 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. diff -r 78c94cc74c52 -r c3d87d106fbe hgext3rd/evolve/obsdiscovery.py --- a/hgext3rd/evolve/obsdiscovery.py Sat Jun 06 20:32:38 2020 +0800 +++ b/hgext3rd/evolve/obsdiscovery.py Sat Jun 06 20:37:10 2020 +0800 @@ -293,15 +293,15 @@ """ 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 @@ continue for node in relnodes: if node not in affected_nodes: - node_to_proceed.add(node) + nodes_to_proceed.add(node) affected_nodes.add(node) - # 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 - marker_to_proceed.update(markers) + markers_to_proceed.update(markers) known_markers.update(markers) return affected_nodes