changeset 1383:cf62abb62941 stable

evolve: move 'precursors()' 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:00 -0700
parents c431f827f366
children 64c8b8c27811
files hgext/evolve.py
diffstat 1 files changed, 4 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/hgext/evolve.py	Thu Jun 18 17:08:38 2015 -0700
+++ b/hgext/evolve.py	Thu Jun 18 16:15:00 2015 -0700
@@ -421,6 +421,7 @@
             pr = nm.get(p[0])
             if pr is not None:
                 cs.add(pr)
+    cs -= repo.changelog.filteredrevs # nodemap has no filtering
     return cs
 
 def _allprecursors(repo, s):  # XXX we need a better naming
@@ -515,8 +516,9 @@
     Immediate precursors of changesets in set.
     """
     s = revset.getset(repo, revset.fullreposet(repo), x)
-    cs = _precursors(repo, s)
-    return [r for r in subset if r in cs]
+    s = revset.baseset(_precursors(repo, s))
+    s.sort()
+    return subset & s
 
 
 @eh.revset('allprecursors')