Mercurial > evolve
comparison hgext/obsolete.py @ 467:869ddfb98c7e
obsolete: add a "troubled" revset
returns all changeset with troubles whatever the trouble is.
author | Pierre-Yves David <pierre-yves.david@logilab.fr> |
---|---|
date | Mon, 20 Aug 2012 15:43:57 +0200 |
parents | d38e02332c2c |
children | a2dfe82f27a0 |
comparison
equal
deleted
inserted
replaced
466:b98490b689a5 | 467:869ddfb98c7e |
---|---|
645 if ctx.latecomer(): | 645 if ctx.latecomer(): |
646 troubles.append('latecomer') | 646 troubles.append('latecomer') |
647 if ctx.conflicting(): | 647 if ctx.conflicting(): |
648 troubles.append('conflicting') | 648 troubles.append('conflicting') |
649 return tuple(troubles) | 649 return tuple(troubles) |
650 | |
651 ### Troubled revset symbol | |
652 | |
653 @eh.revset('troubled') | |
654 def revsetlatecomer(repo, subset, x): | |
655 """``troubled()`` | |
656 Changesets with troubles. | |
657 """ | |
658 _ = revset.getargs(x, 0, 0, 'troubled takes no arguments') | |
659 return list(repo.revs('%ld and (unstable() + latecomer() + conflicting())', | |
660 subset)) | |
650 | 661 |
651 | 662 |
652 ### Obsolescence graph | 663 ### Obsolescence graph |
653 | 664 |
654 # XXX SOME MAJOR CLEAN UP TO DO HERE XXX | 665 # XXX SOME MAJOR CLEAN UP TO DO HERE XXX |