Mercurial > evolve
comparison hgext/evolve.py @ 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 | b5cd96395867 |
children | 603104c880f7 |
comparison
equal
deleted
inserted
replaced
1321:8fa74845eb1f | 1322:f3e0686a63a1 |
---|---|
437 def revsettroubled(repo, subset, x): | 437 def revsettroubled(repo, subset, x): |
438 """``troubled()`` | 438 """``troubled()`` |
439 Changesets with troubles. | 439 Changesets with troubles. |
440 """ | 440 """ |
441 revset.getargs(x, 0, 0, 'troubled takes no arguments') | 441 revset.getargs(x, 0, 0, 'troubled takes no arguments') |
442 return repo.revs('%ld and (unstable() + bumped() + divergent())', | 442 troubled = set() |
443 subset) | 443 troubled.update(getrevs(repo, 'unstable')) |
444 | 444 troubled.update(getrevs(repo, 'bumped')) |
445 troubled.update(getrevs(repo, 'divergent')) | |
446 return subset & revset.baseset(troubled) | |
445 | 447 |
446 ### Obsolescence graph | 448 ### Obsolescence graph |
447 | 449 |
448 # XXX SOME MAJOR CLEAN UP TO DO HERE XXX | 450 # XXX SOME MAJOR CLEAN UP TO DO HERE XXX |
449 | 451 |