comparison mercurial/revset.py @ 16748:0a730d3c5aae stable

doc: add detail explanation for 'present()' predicate of revsets
author FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
date Wed, 16 May 2012 17:02:30 +0900
parents 47b8ec0eb7fb
children d0b9ebba41e9 2f3317d53d51
comparison
equal deleted inserted replaced
16747:6476a21337a6 16748:0a730d3c5aae
843 843
844 def present(repo, subset, x): 844 def present(repo, subset, x):
845 """``present(set)`` 845 """``present(set)``
846 An empty set, if any revision in set isn't found; otherwise, 846 An empty set, if any revision in set isn't found; otherwise,
847 all revisions in set. 847 all revisions in set.
848
849 If any of specified revisions is not present in the local repository,
850 the query is normally aborted. But this predicate allows the query
851 to continue even in such cases.
848 """ 852 """
849 try: 853 try:
850 return getset(repo, subset, x) 854 return getset(repo, subset, x)
851 except error.RepoLookupError: 855 except error.RepoLookupError:
852 return [] 856 return []