diff hgext/evolve.py @ 1384:64c8b8c27811 stable

evolve: move 'allprecursors()' to smarted usage The "new" smarted can be significantly more efficient than the old was. We convert our revset to take advantage of that.
author Pierre-Yves David <pierre-yves.david@fb.com>
date Thu, 18 Jun 2015 16:15:13 -0700
parents cf62abb62941
children c2584407afbf
line wrap: on
line diff
--- a/hgext/evolve.py	Thu Jun 18 16:15:00 2015 -0700
+++ b/hgext/evolve.py	Thu Jun 18 16:15:13 2015 -0700
@@ -443,6 +443,7 @@
         pr = nm.get(p)
         if pr is not None:
             cs.add(pr)
+    cs -= repo.changelog.filteredrevs # nodemap has no filtering
     return cs
 
 def _successors(repo, s):
@@ -527,8 +528,9 @@
     Transitive precursors of changesets in set.
     """
     s = revset.getset(repo, revset.fullreposet(repo), x)
-    cs = _allprecursors(repo, s)
-    return [r for r in subset if r in cs]
+    s = revset.baseset(_allprecursors(repo, s))
+    s.sort()
+    return subset & s
 
 
 @eh.revset('successors')