comparison mercurial/revset.py @ 14356:02a5bebd0dc4 stable

revset: the name is optional for the tag predicate
author Martin Geisler <mg@aragost.com>
date Wed, 18 May 2011 09:31:19 +0200
parents 8fdc9dd8264b
children cb4ff8ef466b ffcb7e4d719f
comparison
equal deleted inserted replaced
14355:8fdc9dd8264b 14356:02a5bebd0dc4
647 cl = repo.changelog 647 cl = repo.changelog
648 o = set([cl.rev(r) for r in repo.changelog.nodesbetween(o, revs)[0]]) 648 o = set([cl.rev(r) for r in repo.changelog.nodesbetween(o, revs)[0]])
649 return [r for r in subset if r in o] 649 return [r for r in subset if r in o]
650 650
651 def tag(repo, subset, x): 651 def tag(repo, subset, x):
652 """``tag(name)`` 652 """``tag([name])``
653 The specified tag by name, or all tagged revisions if no name is given. 653 The specified tag by name, or all tagged revisions if no name is given.
654 """ 654 """
655 # i18n: "tag" is a keyword 655 # i18n: "tag" is a keyword
656 args = getargs(x, 0, 1, _("tag takes one or no arguments")) 656 args = getargs(x, 0, 1, _("tag takes one or no arguments"))
657 cl = repo.changelog 657 cl = repo.changelog