evolve: optimize the computation of the troubled() revset
We take the implementation from _counttroubles() and rely on the more
efficient & operation for revset instead of laying down the entire set with %ld.
--- a/hgext/evolve.py Tue May 05 13:32:01 2015 -0700
+++ b/hgext/evolve.py Tue May 05 17:15:06 2015 -0700
@@ -439,9 +439,11 @@
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'))
+ return subset & revset.baseset(troubled)
### Obsolescence graph