comparison hgext/evolve.py @ 520:a426301ab306 stable

Conditionnaly add the `hidden` revset symbol Mercurial Core#default now have it (but 2.3 don't)
author Pierre-Yves David <pierre-yves.david@ens-lyon.org>
date Sun, 26 Aug 2012 12:04:16 +0200
parents 9825c7da5b54
children c9983eb6969c
comparison
equal deleted inserted replaced
519:9825c7da5b54 520:a426301ab306
785 ##################################################################### 785 #####################################################################
786 786
787 # this section add several useful revset symbol not yet in core. 787 # this section add several useful revset symbol not yet in core.
788 # they are subject to changes 788 # they are subject to changes
789 789
790 ### hidden revset is not in core yet 790
791 791 if 'hidden' not in revset.symbols:
792 @eh.revset('hidden') 792 # in 2.3+
793 def revsethidden(repo, subset, x): 793 @eh.revset('hidden')
794 """``hidden()`` 794 def revsethidden(repo, subset, x):
795 Changeset is hidden. 795 """``hidden()``
796 """ 796 Changeset is hidden.
797 args = revset.getargs(x, 0, 0, 'hidden takes no argument') 797 """
798 return [r for r in subset if r in repo.hiddenrevs] 798 args = revset.getargs(x, 0, 0, 'hidden takes no argument')
799 return [r for r in subset if r in repo.hiddenrevs]
799 800
800 ### XXX I'm not sure this revset is useful 801 ### XXX I'm not sure this revset is useful
801 @eh.revset('suspended') 802 @eh.revset('suspended')
802 def revsetsuspended(repo, subset, x): 803 def revsetsuspended(repo, subset, x):
803 """``suspended()`` 804 """``suspended()``