Commit 92ac2bb3 authored by Anton Shestakov's avatar Anton Shestakov
Browse files

obsdiscovery: assign successors and predecessors to variables

Since we're optimizing this loop by removing dots, why not remove all dots.
parent 0648b93c4760
......@@ -296,7 +296,8 @@ def _affectedby(repo, markers):
node_to_proceed = set()
marker_to_proceed = set(known_markers)
obsstore = repo.obsstore
successors = repo.obsstore.successors
predecessors = repo.obsstore.predecessors
while node_to_proceed or marker_to_proceed:
while marker_to_proceed:
......@@ -317,8 +318,8 @@ def _affectedby(repo, markers):
if node_to_proceed:
node = node_to_proceed.pop()
markers = set()
markers.update(obsstore.successors.get(node, ()))
markers.update(obsstore.predecessors.get(node, ()))
markers.update(successors.get(node, ()))
markers.update(predecessors.get(node, ()))
markers -= known_markers
marker_to_proceed.update(markers)
known_markers.update(markers)
......
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