# HG changeset patch # User Anton Shestakov # Date 1591446758 -28800 # Node ID 6af94b3be29e74cb871d1d9e558443515ad6b3d4 # Parent 54bf9ec2f81d852929ddd75e02d55b2bf1cba4e5 obsdiscovery: assign successors and predecessors to variables Since we're optimizing this loop by removing dots, why not remove all dots. diff -r 54bf9ec2f81d -r 6af94b3be29e 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)