changeset 1322:f3e0686a63a1

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.
author Laurent Charignon <lcharignon@fb.com>
date Tue, 05 May 2015 17:15:06 -0700
parents 8fa74845eb1f
children 603104c880f7
files hgext/evolve.py
diffstat 1 files changed, 5 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- 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