evolve: avoid creating changectx object in _allsuccessors stable
authorPierre-Yves David <pierre-yves.david@fb.com>
Thu, 18 Jun 2015 16:14:32 -0700
branchstable
changeset 1380 43dcf62237be
parent 1379 693cdcd809f2
child 1381 61849d45d47e
evolve: avoid creating changectx object in _allsuccessors The repo lookups and object creations have a significant performance overhead.
hgext/evolve.py
--- a/hgext/evolve.py	Thu Jun 18 16:14:16 2015 -0700
+++ b/hgext/evolve.py	Thu Jun 18 16:14:32 2015 -0700
@@ -459,7 +459,8 @@
 
     haltonflags allows to provide flags which prevent the evaluation of a
     marker.  """
-    toproceed = [repo[r].node() for r in s]
+    node = repo.changelog.node
+    toproceed = [node(r) for r in s]
     seen = set()
     allobjects = repo.obsstore.successors
     while toproceed: