# HG changeset patch # User Anton Shestakov # Date 1591446758 -28800 # Node ID 78c94cc74c52d974594d32831a76993bbedf18a2 # Parent 0648b93c4760851f57bd6c7bec60947e27c76645 obsdiscovery: assign successors and predecessors to variables Since we're optimizing this loop by removing dots, why not remove all dots. diff -r 0648b93c4760 -r 78c94cc74c52 hgext3rd/evolve/obsdiscovery.py --- a/hgext3rd/evolve/obsdiscovery.py Sat Jun 06 19:43:58 2020 +0800 +++ b/hgext3rd/evolve/obsdiscovery.py Sat Jun 06 20:32:38 2020 +0800 @@ -296,7 +296,8 @@ 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 @@ 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)