[PATCH 2 of 3 STABLE] revset: fix documentation for 'remote()' predicate

FUJIWARA Katsunori foozy at lares.dti.ne.jp
Fri Jan 27 07:45:31 CST 2012


# HG changeset patch
# User FUJIWARA Katsunori <foozy at lares.dti.ne.jp>
# Date 1327670998 -32400
# Branch stable
# Node ID 113f370afad0a85b55c682ccacb8daa89850879f
# Parent  41a6e4fb52043c52be1ad6b238fd122d3197cca0
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

diff -r 41a6e4fb5204 -r 113f370afad0 mercurial/revset.py
--- a/mercurial/revset.py	Fri Jan 27 22:29:58 2012 +0900
+++ b/mercurial/revset.py	Fri Jan 27 22:29:58 2012 +0900
@@ -745,7 +745,7 @@
     return [r for r in subset if repo._phaserev[r] == phases.public]
 
 def remote(repo, subset, x):
-    """``remote([id], [path])``
+    """``remote([id [,path]])``
     Local revision that corresponds to the given identifier in a
     remote repository, if present. Here, the '.' identifier is a
     synonym for the current local branch.
@@ -753,7 +753,7 @@
 
     import hg # avoid start-up nasties
     # i18n: "remote" is a keyword
-    l = getargs(x, 0, 2, _("remote takes one or two arguments"))
+    l = getargs(x, 0, 2, _("remote takes one, two or no arguments"))
 
     q = '.'
     if len(l) > 0:


More information about the Mercurial-devel mailing list