evolve: move 'suspended()' to smarted usage stable
authorPierre-Yves David <pierre-yves.david@fb.com>
Thu, 18 Jun 2015 17:08:38 -0700
branchstable
changeset 1382 c431f827f366
parent 1381 61849d45d47e
child 1383 cf62abb62941
evolve: move 'suspended()' to smarted usage The "new" smarted can be significantly more efficient than the old was. We convert our revset to take advantage of that.
hgext/evolve.py
--- a/hgext/evolve.py	Thu Jun 18 17:08:11 2015 -0700
+++ b/hgext/evolve.py	Thu Jun 18 17:08:38 2015 -0700
@@ -504,8 +504,9 @@
     Obsolete changesets with non-obsolete descendants.
     """
     revset.getargs(x, 0, 0, 'suspended takes no arguments')
-    suspended = getrevs(repo, 'suspended')
-    return [r for r in subset if r in suspended]
+    suspended = revset.baseset(getrevs(repo, 'suspended'))
+    suspended.sort()
+    return subset & suspended
 
 
 @eh.revset('precursors')