comparison mercurial/revset.py @ 16007:f06c53ca59a9 stable

revset: fix documentation for 'remote()' predicate current documentation for 'remote()' predicate is wrong about specification of parameters. there are 3 patterns: # of param: id: remote: - 0 current branch "defult" remote - 1 specified "defult" remote - 2 specified specified
author FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
date Fri, 27 Jan 2012 22:29:58 +0900
parents 39e60576ac98
children b8be450638f6 f3df7d34791e
comparison
equal deleted inserted replaced
16006:39e60576ac98 16007:f06c53ca59a9
743 Changeset in public phase.""" 743 Changeset in public phase."""
744 getargs(x, 0, 0, _("public takes no arguments")) 744 getargs(x, 0, 0, _("public takes no arguments"))
745 return [r for r in subset if repo._phaserev[r] == phases.public] 745 return [r for r in subset if repo._phaserev[r] == phases.public]
746 746
747 def remote(repo, subset, x): 747 def remote(repo, subset, x):
748 """``remote([id], [path])`` 748 """``remote([id [,path]])``
749 Local revision that corresponds to the given identifier in a 749 Local revision that corresponds to the given identifier in a
750 remote repository, if present. Here, the '.' identifier is a 750 remote repository, if present. Here, the '.' identifier is a
751 synonym for the current local branch. 751 synonym for the current local branch.
752 """ 752 """
753 753
754 import hg # avoid start-up nasties 754 import hg # avoid start-up nasties
755 # i18n: "remote" is a keyword 755 # i18n: "remote" is a keyword
756 l = getargs(x, 0, 2, _("remote takes one or two arguments")) 756 l = getargs(x, 0, 2, _("remote takes one, two or no arguments"))
757 757
758 q = '.' 758 q = '.'
759 if len(l) > 0: 759 if len(l) > 0:
760 # i18n: "remote" is a keyword 760 # i18n: "remote" is a keyword
761 q = getstring(l[0], _("remote requires a string id")) 761 q = getstring(l[0], _("remote requires a string id"))