Use hg role in help strings
authorMartin Geisler <mg@aragost.com>
Thu, 22 Apr 2010 10:24:49 +0200
changeset 10973 49a07f441496
parent 10972 0a2c6948f5f4
child 10974 854ac04d712c
Use hg role in help strings
hgext/bookmarks.py
hgext/fetch.py
hgext/keyword.py
hgext/mq.py
hgext/pager.py
hgext/patchbomb.py
hgext/purge.py
hgext/record.py
mercurial/commands.py
mercurial/help/diffs.txt
mercurial/help/urls.txt
tests/test-help.out
tests/test-qrecord.out
tests/test-record.out
--- a/hgext/bookmarks.py	Thu Apr 22 10:04:53 2010 +0200
+++ b/hgext/bookmarks.py	Thu Apr 22 10:24:49 2010 +0200
@@ -88,10 +88,10 @@
 
     Bookmarks are pointers to certain commits that move when
     committing. Bookmarks are local. They can be renamed, copied and
-    deleted. It is possible to use bookmark names in 'hg merge' and
-    'hg update' to merge and update respectively to a given bookmark.
+    deleted. It is possible to use bookmark names in :hg:`merge` and
+    :hg:`update` to merge and update respectively to a given bookmark.
 
-    You can use 'hg bookmark NAME' to set a bookmark on the working
+    You can use :hg:`bookmark NAME` to set a bookmark on the working
     directory's parent revision with the given name. If you specify
     a revision using -r REV (where REV may be an existing bookmark),
     the bookmark is assigned to that revision.
--- a/hgext/fetch.py	Thu Apr 22 10:04:53 2010 +0200
+++ b/hgext/fetch.py	Thu Apr 22 10:24:49 2010 +0200
@@ -28,7 +28,7 @@
     parent, with local changes as the second. To switch the merge
     order, use --switch-parent.
 
-    See 'hg help dates' for a list of formats valid for -d/--date.
+    See :hg:`help dates` for a list of formats valid for -d/--date.
     '''
 
     date = opts.get('date')
--- a/hgext/keyword.py	Thu Apr 22 10:04:53 2010 +0200
+++ b/hgext/keyword.py	Thu Apr 22 10:24:49 2010 +0200
@@ -49,25 +49,25 @@
 lose speed in huge repositories.
 
 For [keywordmaps] template mapping and expansion demonstration and
-control run "hg kwdemo". See "hg help templates" for a list of
+control run :hg:`kwdemo`. See :hg:`help templates` for a list of
 available templates and filters.
 
 An additional date template filter {date|utcdate} is provided. It
 returns a date like "2006/09/18 15:13:13".
 
-The default template mappings (view with "hg kwdemo -d") can be
-replaced with customized keywords and templates. Again, run "hg
-kwdemo" to control the results of your config changes.
+The default template mappings (view with :hg:`kwdemo -d`) can be
+replaced with customized keywords and templates. Again, run
+:hg:`kwdemo` to control the results of your config changes.
 
-Before changing/disabling active keywords, run "hg kwshrink" to avoid
+Before changing/disabling active keywords, run :hg:`kwshrink` to avoid
 the risk of inadvertently storing expanded keywords in the change
 history.
 
 To force expansion after enabling it, or a configuration change, run
-"hg kwexpand".
+:hg:`kwexpand`.
 
 Also, when committing with the record extension or using mq's qrecord,
-be aware that keywords cannot be updated. Again, run "hg kwexpand" on
+be aware that keywords cannot be updated. Again, run :hg:`kwexpand` on
 the files in question to update keyword expansions after all changes
 have been checked in.
 
@@ -361,7 +361,7 @@
     execution by including only files that are actual candidates for
     expansion.
 
-    See "hg help keyword" on how to construct patterns both for
+    See :hg:`help keyword` on how to construct patterns both for
     inclusion and exclusion of files.
 
     With -A/--all and -v/--verbose the codes used to show the status
@@ -398,7 +398,7 @@
     '''revert expanded keywords in the working directory
 
     Run before changing/disabling active keywords or if you experience
-    problems with "hg import" or "hg merge".
+    problems with :hg:`import` or :hg:`merge`.
 
     kwshrink refuses to run if given files contain local changes.
     '''
--- a/hgext/mq.py	Thu Apr 22 10:04:53 2010 +0200
+++ b/hgext/mq.py	Thu Apr 22 10:24:49 2010 +0200
@@ -14,7 +14,7 @@
 Known patches are represented as patch files in the .hg/patches
 directory. Applied patches are both patch files and changesets.
 
-Common tasks (use "hg help command" for more details)::
+Common tasks (use :hg:`help command` for more details)::
 
   create new patch                          qnew
   import existing patch                     qimport
@@ -2041,9 +2041,9 @@
     last refresh (thus showing what the current patch would become
     after a qrefresh).
 
-    Use 'hg diff' if you only want to see the changes made since the
-    last qrefresh, or 'hg export qtip' if you want to see changes made
-    by the current patch without including changes made since the
+    Use :hg:`diff` if you only want to see the changes made since the
+    last qrefresh, or :hg:`export qtip` if you want to see changes
+    made by the current patch without including changes made since the
     qrefresh.
     """
     repo.mq.diff(repo, pats, opts)
--- a/hgext/pager.py	Thu Apr 22 10:04:53 2010 +0200
+++ b/hgext/pager.py	Thu Apr 22 10:24:49 2010 +0200
@@ -45,8 +45,8 @@
 
 If pager.attend is present, pager.ignore will be ignored.
 
-To ignore global commands like "hg version" or "hg help", you have to
-specify them in the global .hgrc
+To ignore global commands like :hg:`version` or :hg:`help`, you have
+to specify them in the global .hgrc
 '''
 
 import sys, os, signal
--- a/hgext/patchbomb.py	Thu Apr 22 10:04:53 2010 +0200
+++ b/hgext/patchbomb.py	Thu Apr 22 10:24:49 2010 +0200
@@ -16,7 +16,7 @@
 
 - The changeset description.
 - [Optional] The result of running diffstat on the patch.
-- The patch itself, as generated by "hg export".
+- The patch itself, as generated by :hg:`export`.
 
 Each message refers to the first in the series using the In-Reply-To
 and References headers, so they will show up as a sequence in threaded
@@ -38,11 +38,11 @@
 Use ``[patchbomb]`` as configuration section name if you need to
 override global ``[email]`` address settings.
 
-Then you can use the "hg email" command to mail a series of changesets
-as a patchbomb.
+Then you can use the :hg:`email` command to mail a series of
+changesets as a patchbomb.
 
 To avoid sending patches prematurely, it is a good idea to first run
-the "email" command with the "-n" option (test only). You will be
+the :hg:`email` command with the "-n" option (test only). You will be
 prompted for an email recipient address, a subject and an introductory
 message describing the patches of your patchbomb. Then when all is
 done, patchbomb messages are displayed. If the PAGER environment
@@ -196,7 +196,7 @@
     description. Next, (optionally) if the diffstat program is
     installed and -d/--diffstat is used, the result of running
     diffstat on the patch. Finally, the patch itself, as generated by
-    "hg export".
+    :hg:`export`.
 
     By default the patch is included as text in the email body for
     easy reviewing. Using the -a/--attach option will instead create
--- a/hgext/purge.py	Thu Apr 22 10:04:53 2010 +0200
+++ b/hgext/purge.py	Thu Apr 22 10:24:49 2010 +0200
@@ -37,7 +37,7 @@
 
     This means that purge will delete:
 
-    - Unknown files: files marked with "?" by "hg status"
+    - Unknown files: files marked with "?" by :hg:`status`
     - Empty directories: in fact Mercurial ignores directories unless
       they contain files under source control management
 
@@ -45,7 +45,7 @@
 
     - Modified and unmodified tracked files
     - Ignored files (unless --all is specified)
-    - New files added to the repository (with "hg add")
+    - New files added to the repository (with :hg:`add`)
 
     If directories are given on the command line, only files in these
     directories are considered.
--- a/hgext/record.py	Thu Apr 22 10:04:53 2010 +0200
+++ b/hgext/record.py	Thu Apr 22 10:24:49 2010 +0200
@@ -360,10 +360,10 @@
 def record(ui, repo, *pats, **opts):
     '''interactively select changes to commit
 
-    If a list of files is omitted, all changes reported by "hg status"
+    If a list of files is omitted, all changes reported by :hg:`status`
     will be candidates for recording.
 
-    See 'hg help dates' for a list of formats valid for -d/--date.
+    See :hg:`help dates` for a list of formats valid for -d/--date.
 
     You will be prompted for whether to record changes to each
     modified file, and for files with multiple changes, for each
@@ -388,7 +388,7 @@
 def qrecord(ui, repo, patch, *pats, **opts):
     '''interactively record a new patch
 
-    See 'hg help qnew' & 'hg help record' for more information and
+    See :hg:`help qnew` & :hg:`help record` for more information and
     usage.
     '''
 
--- a/mercurial/commands.py	Thu Apr 22 10:04:53 2010 +0200
+++ b/mercurial/commands.py	Thu Apr 22 10:24:49 2010 +0200
@@ -32,7 +32,7 @@
     .. container:: verbose
 
        An example showing how new (unknown) files are added
-       automatically by ``hg add``::
+       automatically by :hg:`add`::
 
          $ ls
          foo.c
@@ -171,7 +171,7 @@
     :``zip``:   zip archive, compressed using deflate
 
     The exact name of the destination archive or directory is given
-    using a format string; see 'hg help export' for details.
+    using a format string; see :hg:`help export` for details.
 
     Each member added to an archive file has a directory prefix
     prepended. Use -p/--prefix to specify a format string for the
@@ -230,7 +230,7 @@
     changeset afterwards. This saves you from doing the merge by hand.
     The result of this merge is not committed, as with a normal merge.
 
-    See 'hg help dates' for a list of formats valid for -d/--date.
+    See :hg:`help dates` for a list of formats valid for -d/--date.
     '''
     if rev and node:
         raise util.Abort(_("please specify just one revision"))
@@ -456,8 +456,8 @@
     the parent of the working directory, negating a previous branch
     change.
 
-    Use the command 'hg update' to switch to an existing branch. Use
-    'hg commit --close-branch' to mark this branch as closed.
+    Use the command :hg:`update` to switch to an existing branch. Use
+    :hg:`commit --close-branch` to mark this branch as closed.
     """
 
     if opts.get('clean'):
@@ -485,7 +485,7 @@
     If -a/--active is specified, only show active branches. A branch
     is considered active if it contains repository heads.
 
-    Use the command 'hg update' to switch to an existing branch.
+    Use the command :hg:`update` to switch to an existing branch.
     """
 
     hexfunc = ui.debugflag and hex or short
@@ -637,11 +637,11 @@
     The location of the source is added to the new repository's
     .hg/hgrc file, as the default to be used for future pulls.
 
-    See 'hg help urls' for valid source format details.
+    See :hg:`help urls` for valid source format details.
 
     It is possible to specify an ``ssh://`` URL as the destination, but no
     .hg/hgrc and working directory will be created on the remote side.
-    Please see 'hg help urls' for important details about ``ssh://`` URLs.
+    Please see :hg:`help urls` for important details about ``ssh://`` URLs.
 
     A set of changesets (tags, or branch names) to pull may be specified
     by listing each changeset (tag, or branch name) with -r/--rev.
@@ -705,7 +705,7 @@
     centralized RCS, this operation is a local operation. See hg push
     for a way to actively distribute your changes.
 
-    If a list of files is omitted, all changes reported by "hg status"
+    If a list of files is omitted, all changes reported by :hg:`status`
     will be committed.
 
     If you are committing the result of a merge, do not provide any
@@ -714,7 +714,7 @@
     If no commit message is specified, the configured editor is
     started to prompt you for a message.
 
-    See 'hg help dates' for a list of formats valid for -d/--date.
+    See :hg:`help dates` for a list of formats valid for -d/--date.
     """
     extra = {}
     if opts.get('close_branch'):
@@ -1151,7 +1151,7 @@
     anyway, probably with undesirable results.
 
     Use the -g/--git option to generate diffs in the git extended diff
-    format. For more information, read 'hg help diffs'.
+    format. For more information, read :hg:`help diffs`.
     """
 
     revs = opts.get('rev')
@@ -1219,7 +1219,7 @@
     diff anyway, probably with undesirable results.
 
     Use the -g/--git option to generate diffs in the git extended diff
-    format. See 'hg help diffs' for more information.
+    format. See :hg:`help diffs` for more information.
 
     With the --switch-parent option, the diff will be against the
     second parent. It can be useful to review a merge.
@@ -1878,7 +1878,7 @@
 
     To read a patch from standard input, use "-" as the patch name. If
     a URL is specified, the patch will be downloaded from it.
-    See 'hg help dates' for a list of formats valid for -d/--date.
+    See :hg:`help dates` for a list of formats valid for -d/--date.
     """
     patches = (patch1,) + patches
 
@@ -2081,7 +2081,7 @@
     If no directory is given, the current directory is used.
 
     It is possible to specify an ``ssh://`` URL as the destination.
-    See 'hg help urls' for more information.
+    See :hg:`help urls` for more information.
     """
     hg.repository(cmdutil.remoteui(ui, opts), dest, create=1)
 
@@ -2136,7 +2136,7 @@
     --follow is set, in which case the working directory parent is
     used as the starting revision.
 
-    See 'hg help dates' for a list of formats valid for -d/--date.
+    See :hg:`help dates` for a list of formats valid for -d/--date.
 
     By default this command prints revision number and changeset id,
     tags, non-trivial parents, user, date and time, and a summary for
@@ -2387,7 +2387,7 @@
     unless a location is specified. When cloning a repository, the
     clone source is written as 'default' in .hg/hgrc.
 
-    See 'hg help urls' for more information.
+    See :hg:`help urls` for more information.
     """
     if search:
         for name, path in ui.configitems("paths"):
@@ -2429,7 +2429,7 @@
     where X is the last changeset listed by hg incoming.
 
     If SOURCE is omitted, the 'default' path will be used.
-    See 'hg help urls' for more information.
+    See :hg:`help urls` for more information.
     """
     source, branches = hg.parseurl(ui.expandpath(source), opts.get('branch'))
     other = hg.repository(cmdutil.remoteui(repo, opts), source)
@@ -2465,7 +2465,7 @@
     If -r/--rev is used, the named revision and all its ancestors will
     be pushed to the remote repository.
 
-    Please see 'hg help urls' for important details about ``ssh://``
+    Please see :hg:`help urls` for important details about ``ssh://``
     URLs. If DESTINATION is omitted, a default path will be used.
     """
     dest = ui.expandpath(dest or 'default-push', dest or 'default')
@@ -2663,8 +2663,8 @@
 
     Using the -r/--rev option, revert the given files or directories
     to their contents as of a specific revision. This can be helpful
-    to "roll back" some or all of an earlier change. See 'hg help
-    dates' for a list of formats valid for -d/--date.
+    to "roll back" some or all of an earlier change. See :hg:`help
+    dates` for a list of formats valid for -d/--date.
 
     Revert modifies the working directory. It does not commit any
     changes, or change the parent of the working directory. If you
@@ -3213,7 +3213,7 @@
     necessary. The file '.hg/localtags' is used for local tags (not
     shared among repositories).
 
-    See 'hg help dates' for a list of formats valid for -d/--date.
+    See :hg:`help dates` for a list of formats valid for -d/--date.
     """
 
     rev_ = "."
@@ -3355,12 +3355,12 @@
     3. With the -C/--clean option, uncommitted changes are discarded and
        the working directory is updated to the requested changeset.
 
-    Use null as the changeset to remove the working directory (like 'hg
-    clone -U').
-
-    If you want to update just one file to an older changeset, use 'hg revert'.
-
-    See 'hg help dates' for a list of formats valid for -d/--date.
+    Use null as the changeset to remove the working directory (like
+    :hg:`clone -U`).
+
+    If you want to update just one file to an older changeset, use :hg:`revert`.
+
+    See :hg:`help dates` for a list of formats valid for -d/--date.
     """
     if rev and node:
         raise util.Abort(_("please specify just one revision"))
--- a/mercurial/help/diffs.txt	Thu Apr 22 10:04:53 2010 +0200
+++ b/mercurial/help/diffs.txt	Thu Apr 22 10:24:49 2010 +0200
@@ -16,7 +16,7 @@
 format.
 
 This means that when generating diffs from a Mercurial repository
-(e.g. with "hg export"), you should be careful about things like file
+(e.g. with :hg:`export`), you should be careful about things like file
 copies and renames or other things mentioned above, because when
 applying a standard diff to a different repository, this extra
 information is lost. Mercurial's internal operations (like push and
--- a/mercurial/help/urls.txt	Thu Apr 22 10:04:53 2010 +0200
+++ b/mercurial/help/urls.txt	Thu Apr 22 10:24:49 2010 +0200
@@ -7,12 +7,12 @@
   ssh://[user[:pass]@]host[:port]/[path][#revision]
 
 Paths in the local filesystem can either point to Mercurial
-repositories or to bundle files (as created by 'hg bundle' or 'hg
-incoming --bundle').
+repositories or to bundle files (as created by :hg:`bundle` or :hg:`
+incoming --bundle`).
 
 An optional identifier after # indicates a particular branch, tag, or
-changeset to use from the remote repository. See also 'hg help
-revisions'.
+changeset to use from the remote repository. See also :hg:`help
+revisions`.
 
 Some features, such as pushing to http:// and https:// URLs are only
 possible if the feature is explicitly enabled on the remote Mercurial
@@ -47,7 +47,7 @@
   ...
 
 You can then use the alias for any command that uses a URL (for
-example 'hg pull alias1' will be treated as 'hg pull URL1').
+example :hg:`pull alias1` will be treated as :hg:`pull URL1`).
 
 Two path aliases are special because they are used as defaults when
 you do not provide the URL to a command:
--- a/tests/test-help.out	Thu Apr 22 10:04:53 2010 +0200
+++ b/tests/test-help.out	Thu Apr 22 10:24:49 2010 +0200
@@ -391,7 +391,7 @@
     with undesirable results.
 
     Use the -g/--git option to generate diffs in the git extended diff format.
-    For more information, read 'hg help diffs'.
+    For more information, read "hg help diffs".
 
 options:
 
--- a/tests/test-qrecord.out	Thu Apr 22 10:04:53 2010 +0200
+++ b/tests/test-qrecord.out	Thu Apr 22 10:24:49 2010 +0200
@@ -28,7 +28,7 @@
 
 interactively record a new patch
 
-    See 'hg help qnew' & 'hg help record' for more information and usage.
+    See "hg help qnew" & "hg help record" for more information and usage.
 
 options:
 
--- a/tests/test-record.out	Thu Apr 22 10:04:53 2010 +0200
+++ b/tests/test-record.out	Thu Apr 22 10:24:49 2010 +0200
@@ -6,7 +6,7 @@
     If a list of files is omitted, all changes reported by "hg status" will be
     candidates for recording.
 
-    See 'hg help dates' for a list of formats valid for -d/--date.
+    See "hg help dates" for a list of formats valid for -d/--date.
 
     You will be prompted for whether to record changes to each modified file,
     and for files with multiple changes, for each change to use. For each