changeset 5349:c3d87d106fbe

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.
author Anton Shestakov <av6@dwimlabs.net>
date Sat, 06 Jun 2020 20:37:10 +0800
parents 78c94cc74c52
children 73cd416a1653
files hgext3rd/evolve/obsdiscovery.py
diffstat 1 files changed, 10 insertions(+), 10 deletions(-) [+]
line wrap: on
line diff
--- 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