comparison mercurial/revset.py @ 30701:8b1d87243710

revset: document wdir() as an experimental function Let's resurrect the docstring since our help module can detect the EXPERIMENTAL tag and display it only if -v is specified. This patch updates the test added by 015c0d1087a3 since wdir() is now documented.
author Yuya Nishihara <yuya@tcha.org>
date Thu, 05 Jan 2017 22:53:42 +0900
parents 323f0c4b43f4
children 7e4f431206cd
comparison
equal deleted inserted replaced
30700:323f0c4b43f4 30701:8b1d87243710
2257 a regular expression. To match a user that actually contains `re:`, use 2257 a regular expression. To match a user that actually contains `re:`, use
2258 the prefix `literal:`. 2258 the prefix `literal:`.
2259 """ 2259 """
2260 return author(repo, subset, x) 2260 return author(repo, subset, x)
2261 2261
2262 # experimental
2263 @predicate('wdir', safe=True) 2262 @predicate('wdir', safe=True)
2264 def wdir(repo, subset, x): 2263 def wdir(repo, subset, x):
2264 """Working directory. (EXPERIMENTAL)"""
2265 # i18n: "wdir" is a keyword 2265 # i18n: "wdir" is a keyword
2266 getargs(x, 0, 0, _("wdir takes no arguments")) 2266 getargs(x, 0, 0, _("wdir takes no arguments"))
2267 if node.wdirrev in subset or isinstance(subset, fullreposet): 2267 if node.wdirrev in subset or isinstance(subset, fullreposet):
2268 return baseset([node.wdirrev]) 2268 return baseset([node.wdirrev])
2269 return baseset() 2269 return baseset()