evolve: move 'troubled()' to smarted usage
The "new" smarted can be significantly more efficient than the old was. We
convert our revset to take advantage of that.
--- a/hgext/evolve.py Thu Jun 18 16:14:32 2015 -0700
+++ b/hgext/evolve.py Thu Jun 18 17:08:11 2015 -0700
@@ -398,9 +398,13 @@
Changesets with troubles.
"""
revset.getargs(x, 0, 0, 'troubled takes no arguments')
- return repo.revs('%ld and (unstable() + bumped() + divergent())',
- subset)
-
+ troubled = set()
+ troubled.update(getrevs(repo, 'unstable'))
+ troubled.update(getrevs(repo, 'bumped'))
+ troubled.update(getrevs(repo, 'divergent'))
+ troubled = revset.baseset(troubled)
+ troubled.sort() # set is non-ordered, enforce order
+ return subset & troubled
### Obsolescence graph