Mercurial > evolve
diff hgext/evolve.py @ 1381:61849d45d47e stable
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.
author | Pierre-Yves David <pierre-yves.david@fb.com> |
---|---|
date | Thu, 18 Jun 2015 17:08:11 -0700 |
parents | 43dcf62237be |
children | c431f827f366 |
line wrap: on
line diff
--- 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