Mercurial > evolve
comparison hgext/evolve.py @ 1382:c431f827f366 stable
evolve: move 'suspended()' 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:38 -0700 |
parents | 61849d45d47e |
children | cf62abb62941 |
comparison
equal
deleted
inserted
replaced
1381:61849d45d47e | 1382:c431f827f366 |
---|---|
502 def revsetsuspended(repo, subset, x): | 502 def revsetsuspended(repo, subset, x): |
503 """``suspended()`` | 503 """``suspended()`` |
504 Obsolete changesets with non-obsolete descendants. | 504 Obsolete changesets with non-obsolete descendants. |
505 """ | 505 """ |
506 revset.getargs(x, 0, 0, 'suspended takes no arguments') | 506 revset.getargs(x, 0, 0, 'suspended takes no arguments') |
507 suspended = getrevs(repo, 'suspended') | 507 suspended = revset.baseset(getrevs(repo, 'suspended')) |
508 return [r for r in subset if r in suspended] | 508 suspended.sort() |
509 return subset & suspended | |
509 | 510 |
510 | 511 |
511 @eh.revset('precursors') | 512 @eh.revset('precursors') |
512 def revsetprecursors(repo, subset, x): | 513 def revsetprecursors(repo, subset, x): |
513 """``precursors(set)`` | 514 """``precursors(set)`` |