changeset 1379:693cdcd809f2 stable

evolve: avoid creating changectx object in _successors The repo lookups and object creations have a significant performance overhead.
author Pierre-Yves David <pierre-yves.david@fb.com>
date Thu, 18 Jun 2015 16:14:16 -0700
parents a127f0f3bf5f
children 43dcf62237be
files hgext/evolve.py
diffstat 1 files changed, 2 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- 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: