changeset 1378:a127f0f3bf5f stable

evolve: avoid creating changectx object in _allprecursors 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:13:35 -0700
parents 01bdeb847f81
children 693cdcd809f2
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:15 2015 -0700
+++ b/hgext/evolve.py	Thu Jun 18 16:13:35 2015 -0700
@@ -421,7 +421,8 @@
 
 def _allprecursors(repo, s):  # XXX we need a better naming
     """transitive precursors of a subset"""
-    toproceed = [repo[r].node() for r in s]
+    node = repo.changelog.node
+    toproceed = [node(r) for r in s]
     seen = set()
     allsubjects = repo.obsstore.precursors
     while toproceed: