# HG changeset patch # User Pierre-Yves David # Date 1434669256 25200 # Node ID 693cdcd809f2e3aeb4fb8b329b17eedb15aff8e1 # Parent a127f0f3bf5f6424c889cdec4112d0e919adac0e evolve: avoid creating changectx object in _successors The repo lookups and object creations have a significant performance overhead. diff -r a127f0f3bf5f -r 693cdcd809f2 hgext/evolve.py --- a/hgext/evolve.py Thu Jun 18 16:13:35 2015 -0700 +++ b/hgext/evolve.py Thu Jun 18 16:14:16 2015 -0700 @@ -443,10 +443,11 @@ def _successors(repo, s): """Successors of a changeset""" cs = set() + node = repo.changelog.node nm = repo.changelog.nodemap markerbyobj = repo.obsstore.successors for r in s: - for p in markerbyobj.get(repo[r].node(), ()): + for p in markerbyobj.get(node(r), ()): for sub in p[1]: sr = nm.get(sub) if sr is not None: