changeset 9158:d6eecafaf12f

doc: use reStructuredText for man and HTML pages The Makefile now requires the rst2html and rst2man programs. Both can be found in Debian testing or downloaded from the Docutils homepage: http://docutils.sf.net/ http://docutils.sf.net/sandbox/manpage-writer/ The new HTML and man pages no longer contain huge amounts of un-wrapping literal blocks, thanks to how snippets of reStructuredText can easily be included inside other reStructuredText documents. The HTML pages now have anchors for all sections, including the help topics in hgrc.1 which were missing from the old HTML pages.
author Martin Geisler <mg@lazybytes.net>
date Thu, 16 Jul 2009 23:25:26 +0200
parents 9261667e9b82
children 62b3df842de9
files doc/Makefile doc/gendoc.py doc/hg.1.txt doc/hgignore.5.txt doc/hgrc.5.txt mercurial/help.py
diffstat 6 files changed, 363 insertions(+), 340 deletions(-) [+]
line wrap: on
line diff
--- a/doc/Makefile	Thu Jul 16 23:25:26 2009 +0200
+++ b/doc/Makefile	Thu Jul 16 23:25:26 2009 +0200
@@ -5,7 +5,8 @@
 MANDIR=$(PREFIX)/share/man
 INSTALL=install -c -m 644
 PYTHON=python
-ASCIIDOC=asciidoc
+RST2HTML=rst2html
+RST2MAN=rst2man
 
 all: man html
 
@@ -19,16 +20,11 @@
 hg.1.gendoc.txt: gendoc.py ../mercurial/commands.py ../mercurial/help.py
 	${PYTHON} gendoc.py > $@
 
-%: %.xml
-	xmlto man $*.xml && \
-	sed -e 's/^\.hg/\\\&.hg/' $* > $*~ && \
-	mv $*~ $*
-
-%.xml: %.txt
-	$(ASCIIDOC) -d manpage -b docbook $*.txt
+%: %.txt
+	$(RST2MAN) $*.txt > $*
 
 %.html: %.txt
-	$(ASCIIDOC) -b html4 $*.txt || $(ASCIIDOC) -b html $*.txt
+	$(RST2HTML) $*.txt > $*.html
 
 MANIFEST: man html
 	# tracked files are already in the main MANIFEST
@@ -45,4 +41,4 @@
 	done
 
 clean:
-	$(RM) $(MAN) $(MAN:%=%.xml) $(MAN:%=%.html) *.[0-9].gendoc.txt MANIFEST
+	$(RM) $(MAN) $(MAN:%=%.html) *.[0-9].gendoc.txt MANIFEST
--- a/doc/gendoc.py	Thu Jul 16 23:25:26 2009 +0200
+++ b/doc/gendoc.py	Thu Jul 16 23:25:26 2009 +0200
@@ -62,7 +62,7 @@
     # print options
     underlined(_("OPTIONS"))
     for optstr, desc in get_opts(globalopts):
-        ui.write("%s::\n    %s\n\n" % (optstr, desc))
+        ui.write("%s\n    %s\n\n" % (optstr, desc))
 
     # print cmds
     underlined(_("COMMANDS"))
@@ -78,15 +78,15 @@
         if f.startswith("debug"): continue
         d = get_cmd(h[f])
         # synopsis
-        ui.write("[[%s]]\n" % d['cmd'])
-        ui.write("%s::\n" % d['synopsis'].replace("hg ","", 1))
+        ui.write(".. _%s:\n\n" % d['cmd'])
+        ui.write("``%s``\n" % d['synopsis'].replace("hg ","", 1))
         # description
         ui.write("%s\n\n" % d['desc'][1])
         # options
         opt_output = list(d['opts'])
         if opt_output:
             opts_len = max([len(line[0]) for line in opt_output])
-            ui.write(_("    options:\n"))
+            ui.write(_("    options:\n\n"))
             for optstr, desc in opt_output:
                 if desc:
                     s = "%-*s  %s" % (opts_len, optstr, desc)
--- a/doc/hg.1.txt	Thu Jul 16 23:25:26 2009 +0200
+++ b/doc/hg.1.txt	Thu Jul 16 23:25:26 2009 +0200
@@ -1,16 +1,20 @@
-HG(1)
-=====
-Matt Mackall <mpm@selenic.com>
-:man source: Mercurial
-:man manual: Mercurial Manual
+====
+ hg
+====
 
-NAME
-----
-hg - Mercurial source code management system
+---------------------------------------
+Mercurial source code management system
+---------------------------------------
+
+:Author:         Matt Mackall <mpm@selenic.com>
+:Organization:   Mercurial
+:Manual section: 1
+:Manual group:   Mercurial Manual
+
 
 SYNOPSIS
 --------
-*hg* 'command' ['option']... ['argument']...
+**hg** *command* [*option*]... [*argument*]...
 
 DESCRIPTION
 -----------
@@ -20,37 +24,38 @@
 COMMAND ELEMENTS
 ----------------
 
-files ...::
+files...
     indicates one or more filename or relative path filenames; see
     "FILE NAME PATTERNS" for information on pattern matching
 
-path::
+path
     indicates a path on the local machine
 
-revision::
+revision
     indicates a changeset which can be specified as a changeset
     revision number, a tag, or a unique substring of the changeset
     hash value
 
-repository path::
+repository path
     either the pathname of a local repository or the URI of a remote
     repository.
 
-include::hg.1.gendoc.txt[]
+.. include:: hg.1.gendoc.txt
 
 FILES
 -----
- `.hgignore`::
+
+`.hgignore`
     This file contains regular expressions (one per line) that
     describe file names that should be ignored by *hg*. For details,
     see *hgignore(5)*.
 
- `.hgtags`::
+`.hgtags`
     This file contains changeset hash values and text tag names (one
     of each separated by spaces) that correspond to tagged versions of
     the repository contents.
 
- `/etc/mercurial/hgrc`, `$HOME/.hgrc`, `.hg/hgrc`::
+`/etc/mercurial/hgrc`, `$HOME/.hgrc`, `.hg/hgrc`
     This file contains defaults and configuration. Values in `.hg/hgrc`
     override those in `$HOME/.hgrc`, and these override settings made in
     the global `/etc/mercurial/hgrc` configuration. See *hgrc(5)* for
@@ -75,11 +80,11 @@
 
 RESOURCES
 ---------
-http://mercurial.selenic.com/[Main Web Site]
+Main Web Site: http://mercurial.selenic.com/
 
-http://selenic.com/hg[Source code repository]
+Source code repository: http://selenic.com/hg
 
-http://selenic.com/mailman/listinfo/mercurial[Mailing list]
+Mailing list: http://selenic.com/mailman/listinfo/mercurial
 
 COPYING
 -------
--- a/doc/hgignore.5.txt	Thu Jul 16 23:25:26 2009 +0200
+++ b/doc/hgignore.5.txt	Thu Jul 16 23:25:26 2009 +0200
@@ -1,17 +1,20 @@
-HGIGNORE(5)
-===========
-Vadim Gelfer <vadim.gelfer@gmail.com>
-:man source: Mercurial
-:man manual: Mercurial Manual
+==========
+ hgignore
+==========
 
-NAME
-----
-hgignore - syntax for Mercurial ignore files
+---------------------------------
+syntax for Mercurial ignore files
+---------------------------------
+
+:Author:         Vadim Gelfer <vadim.gelfer@gmail.com>
+:Organization:   Mercurial
+:Manual section: 5
+:Manual group:   Mercurial Manual
 
 SYNOPSIS
 --------
 
-The Mercurial system uses a file called `.hgignore` in the root
+The Mercurial system uses a file called ``.hgignore`` in the root
 directory of a repository to control its behavior when it searches
 for files that it is not currently tracking.
 
@@ -38,36 +41,36 @@
 ------
 
 An ignore file is a plain text file consisting of a list of patterns,
-with one pattern per line. Empty lines are skipped. The "`#`"
-character is treated as a comment character, and the "`\`" character
+with one pattern per line. Empty lines are skipped. The "``#``"
+character is treated as a comment character, and the "``\``" character
 is treated as an escape character.
 
 Mercurial supports several pattern syntaxes. The default syntax used
 is Python/Perl-style regular expressions.
 
-To change the syntax used, use a line of the following form:
+To change the syntax used, use a line of the following form::
 
-syntax: NAME
+  syntax: NAME
 
-where NAME is one of the following:
+where ``NAME`` is one of the following:
 
-regexp::
+``regexp``
   Regular expression, Python/Perl syntax.
-glob::
+``glob``
   Shell-style glob.
 
 The chosen syntax stays in effect when parsing all patterns that
 follow, until another syntax is selected.
 
 Neither glob nor regexp patterns are rooted. A glob-syntax pattern of
-the form "`*.c`" will match a file ending in "`.c`" in any directory,
-and a regexp pattern of the form "`\.c$`" will do the same. To root a
-regexp pattern, start it with "`^`".
+the form "``*.c``" will match a file ending in "``.c``" in any directory,
+and a regexp pattern of the form "``\.c$``" will do the same. To root a
+regexp pattern, start it with "``^``".
 
 EXAMPLE
 -------
 
-Here is an example ignore file.
+Here is an example ignore file. ::
 
   # use glob syntax.
   syntax: glob
--- a/doc/hgrc.5.txt	Thu Jul 16 23:25:26 2009 +0200
+++ b/doc/hgrc.5.txt	Thu Jul 16 23:25:26 2009 +0200
@@ -1,12 +1,16 @@
-HGRC(5)
-=======
-Bryan O'Sullivan <bos@serpentine.com>
-:man source: Mercurial
-:man manual: Mercurial Manual
+======
+ hgrc
+======
 
-NAME
-----
-hgrc - configuration files for Mercurial
+---------------------------------
+configuration files for Mercurial
+---------------------------------
+
+:Author:         Bryan O'Sullivan <bos@serpentine.com>
+:Organization:   Mercurial
+:Manual section: 5
+:Manual group:   Mercurial Manual
+
 
 SYNOPSIS
 --------
@@ -24,8 +28,9 @@
 paths are given below, settings from later paths override earlier
 ones.
 
-(Unix) `<install-root>/etc/mercurial/hgrc.d/*.rc`::
-(Unix) `<install-root>/etc/mercurial/hgrc`::
+| (Unix) ``<install-root>/etc/mercurial/hgrc.d/*.rc``
+| (Unix) ``<install-root>/etc/mercurial/hgrc``
+
     Per-installation configuration files, searched for in the
     directory where Mercurial is installed. `<install-root>` is the
     parent directory of the hg executable (or symlink) being run. For
@@ -33,18 +38,18 @@
     in `/shared/tools/etc/mercurial/hgrc`. Options in these files apply
     to all Mercurial commands executed by any user in any directory.
 
-(Unix) `/etc/mercurial/hgrc.d/*.rc`::
-(Unix) `/etc/mercurial/hgrc`::
+| (Unix) ``/etc/mercurial/hgrc.d/*.rc``
+| (Unix) ``/etc/mercurial/hgrc``
+
     Per-system configuration files, for the system on which Mercurial
     is running. Options in these files apply to all Mercurial commands
     executed by any user in any directory. Options in these files
     override per-installation options.
 
-(Windows) `<install-dir>\Mercurial.ini`::
-  or else::
-(Windows) `HKEY_LOCAL_MACHINE\SOFTWARE\Mercurial`::
-  or else::
-(Windows) `C:\Mercurial\Mercurial.ini`::
+| (Windows) ``<install-dir>\Mercurial.ini`` or else
+| (Windows) ``HKEY_LOCAL_MACHINE\SOFTWARE\Mercurial`` or else
+| (Windows) ``C:\Mercurial\Mercurial.ini``
+
     Per-installation/system configuration files, for the system on
     which Mercurial is running. Options in these files apply to all
     Mercurial commands executed by any user in any directory. Registry
@@ -52,18 +57,20 @@
     a `Mercurial.ini` file or be a directory where `*.rc` files will
     be read.
 
-(Unix) `$HOME/.hgrc`::
-(Windows) `%HOME%\Mercurial.ini`::
-(Windows) `%HOME%\.hgrc`::
-(Windows) `%USERPROFILE%\Mercurial.ini`::
-(Windows) `%USERPROFILE%\.hgrc`::
+| (Unix) ``$HOME/.hgrc``
+| (Windows) ``%HOME%\Mercurial.ini``
+| (Windows) ``%HOME%\.hgrc``
+| (Windows) ``%USERPROFILE%\Mercurial.ini``
+| (Windows) ``%USERPROFILE%\.hgrc``
+
     Per-user configuration file(s), for the user running Mercurial. On
     Windows 9x, `%HOME%` is replaced by `%APPDATA%`. Options in these
     files apply to all Mercurial commands executed by this user in any
     directory. Options in these files override per-installation and
     per-system options.
 
-(Unix, Windows) `<repo>/.hg/hgrc`::
+| (Unix, Windows) ``<repo>/.hg/hgrc``
+
     Per-repository configuration options that only apply in a
     particular repository. This file is not version-controlled, and
     will not get transferred during a "clone" operation. Options in
@@ -78,6 +85,8 @@
 A configuration file consists of sections, led by a "`[section]`" header
 and followed by "`name: value`" entries; "`name=value`" is also accepted.
 
+::
+
     [spam]
     eggs=ham
     green=
@@ -88,7 +97,7 @@
 
 Leading whitespace is removed from values. Empty lines are skipped.
 
-Lines beginning with "`#`" or "`;`" are ignored and may be used to provide
+Lines beginning with "``#``" or "``;``" are ignored and may be used to provide
 comments.
 
 SECTIONS
@@ -98,41 +107,39 @@
 Mercurial "hgrc" file, the purpose of each section, its possible keys,
 and their possible values.
 
-[[alias]]
-alias::
- Defines command aliases.
-  Aliases allow you to define your own commands in terms of other
-  commands (or aliases), optionally including arguments.
-+
---
-Alias definitions consist of lines of the form:
+``alias``
+"""""""""
+Defines command aliases.
+Aliases allow you to define your own commands in terms of other
+commands (or aliases), optionally including arguments.
+
+Alias definitions consist of lines of the form::
 
     <alias> = <command> [<argument]...
 
-For example, this definition:
+For example, this definition::
 
     latest = log --limit 5
 
 creates a new command `latest` that shows only the five most recent
-changesets. You can define subsequent aliases using earlier ones:
+changesets. You can define subsequent aliases using earlier ones::
 
     stable5 = latest -b stable
 
 NOTE: It is possible to create aliases with the same names as existing
 commands, which will then override the original definitions. This is
 almost always a bad idea!
---
+
 
-[[auth]]
-auth::
+``auth``
+""""""""
 Authentication credentials for HTTP authentication. Each line has
-the following format:
+the following format::
 
     <name>.<argument> = <value>
-+
---
+
 where <name> is used to group arguments into authentication entries.
-Example:
+Example::
 
     foo.prefix = hg.intevation.org/mercurial
     foo.username = foo
@@ -146,26 +153,26 @@
 
 Supported arguments:
 
-  prefix;;
+``prefix``
     Either "\*" or a URI prefix with or without the scheme part.
     The authentication entry with the longest matching prefix is used
     (where "*" matches everything and counts as a match of length
     1). If the prefix doesn't include a scheme, the match is performed
     against the URI with its scheme stripped as well, and the schemes
     argument, q.v., is then subsequently consulted.
-  username;;
+``username``
     Optional. Username to authenticate with. If not given, and the
     remote site requires basic or digest authentication, the user
     will be prompted for it.
-  password;;
+``password``
     Optional. Password to authenticate with. If not given, and the
     remote site requires basic or digest authentication, the user
     will be prompted for it.
-  key;;
+``key``
     Optional. PEM encoded client certificate key file.
-  cert;;
+``cert``
     Optional. PEM encoded client certificate chain file.
-  schemes;;
+``schemes``
     Optional. Space separated list of URI schemes to use this
     authentication entry with. Only used if the prefix doesn't include
     a scheme. Supported schemes are http and https. They will match
@@ -174,20 +181,19 @@
 
 If no suitable authentication entry is found, the user is prompted
 for credentials as usual if required by the remote.
---
+
 
-[[decode]]
-decode/encode::
-  Filters for transforming files on checkout/checkin. This would
-  typically be used for newline processing or other
-  localization/canonicalization of files.
-+
---
+``decode/encode``
+"""""""""""""""""
+Filters for transforming files on checkout/checkin. This would
+typically be used for newline processing or other
+localization/canonicalization of files.
+
 Filters consist of a filter pattern followed by a filter command.
 Filter patterns are globs by default, rooted at the repository root.
 For example, to match any file ending in "`.txt`" in the root
-directory only, use the pattern "\*.txt". To match any file ending
-in "`.c`" anywhere in the repository, use the pattern "**`.c`".
+directory only, use the pattern "`*.txt`". To match any file ending
+in "`.c`" anywhere in the repository, use the pattern "`**.c`".
 
 The filter command can start with a specifier, either "pipe:" or
 "tempfile:". If no specifier is given, "pipe:" is used by default.
@@ -195,7 +201,7 @@
 A "pipe:" command must accept data on stdin and return the transformed
 data on stdout.
 
-Pipe example:
+Pipe example::
 
   [encode]
   # uncompress gzip files on checkin to improve delta compression
@@ -218,7 +224,7 @@
 effects and may corrupt the contents of your files.
 
 The most common usage is for LF <-> CRLF translation on Windows. For
-this, use the "smart" converters which check for binary files:
+this, use the "smart" converters which check for binary files::
 
   [extensions]
   hgext.win32text =
@@ -227,7 +233,7 @@
   [decode]
   ** = cleverdecode:
 
-or if you only want to translate certain files:
+or if you only want to translate certain files::
 
   [extensions]
   hgext.win32text =
@@ -235,16 +241,16 @@
   **.txt = dumbencode:
   [decode]
   **.txt = dumbdecode:
---
+
+
+``defaults``
+""""""""""""
 
-[[defaults]]
-defaults::
-  Use the [defaults] section to define command defaults, i.e. the
-  default options/arguments to pass to the specified commands.
-+
---
+Use the [defaults] section to define command defaults, i.e. the
+default options/arguments to pass to the specified commands.
+
 The following example makes 'hg log' run in verbose mode, and 'hg
-status' show only the modified files, by default.
+status' show only the modified files, by default::
 
   [defaults]
   log = -v
@@ -253,47 +259,50 @@
 The actual commands, instead of their aliases, must be used when
 defining command defaults. The command defaults will also be applied
 to the aliases of the commands defined.
---
+
+
+``diff``
+""""""""
 
-[[diff]]
-diff::
-  Settings used when displaying diffs. They are all Boolean and
-  defaults to False.
-  git;;
+Settings used when displaying diffs. They are all Boolean and
+defaults to False.
+
+``git``
     Use git extended diff format.
-  nodates;;
+``nodates``
     Don't include dates in diff headers.
-  showfunc;;
+``showfunc``
     Show which function each change is in.
-  ignorews;;
+``ignorews``
     Ignore white space when comparing lines.
-  ignorewsamount;;
+``ignorewsamount``
     Ignore changes in the amount of white space.
-  ignoreblanklines;;
+``ignoreblanklines``
     Ignore changes whose lines are all blank.
 
-[[email]]
-email::
-  Settings for extensions that send email messages.
-  from;;
+``email``
+"""""""""
+Settings for extensions that send email messages.
+
+``from``
     Optional. Email address to use in "From" header and SMTP envelope
     of outgoing messages.
-  to;;
+``to``
     Optional. Comma-separated list of recipients' email addresses.
-  cc;;
+``cc``
     Optional. Comma-separated list of carbon copy recipients'
     email addresses.
-  bcc;;
+``bcc``
     Optional. Comma-separated list of blind carbon copy recipients'
     email addresses. Cannot be set interactively.
-  method;;
+``method``
     Optional. Method to use to send email messages. If value is "smtp"
     (default), use SMTP (see section "[smtp]" for configuration).
     Otherwise, use as name of program to run that acts like sendmail
     (takes "-f" option for sender, list of recipients on command line,
     message on stdin). Normally, setting this to "sendmail" or
     "/usr/sbin/sendmail" is enough to use sendmail to send messages.
-  charsets;;
+``charsets``
     Optional. Comma-separated list of character sets considered
     convenient for recipients. Addresses, headers, and parts not
     containing patches of outgoing messages will be encoded in the
@@ -301,9 +310,8 @@
     (`$HGENCODING`, `ui.fallbackencoding`) succeeds. If correct
     conversion fails, the text in question is sent as is. Defaults to
     empty (explicit) list.
-+
---
-Order of outgoing email character sets:
+
+Order of outgoing email character sets::
 
   us-ascii             always first, regardless of settings
   email.charsets       in order given by user
@@ -311,7 +319,7 @@
   $HGENCODING          if not in email.charsets
   utf-8                always last, regardless of settings
 
-Email example:
+Email example::
 
   [email]
   from = Joseph User <joe.user@example.com>
@@ -319,14 +327,14 @@
   # charsets for western Europeans
   # us-ascii, utf-8 omitted, as they are tried first and last
   charsets = iso-8859-1, iso-8859-15, windows-1252
---
+
 
-[[extensions]]
-extensions::
-  Mercurial has an extension mechanism for adding new features. To
-  enable an extension, create an entry for it in this section.
-+
---
+``extensions``
+""""""""""""""
+
+Mercurial has an extension mechanism for adding new features. To
+enable an extension, create an entry for it in this section.
+
 If you know that the extension is already in Python's search path,
 you can give the name of the module, followed by "`=`", with nothing
 after the "`=`".
@@ -340,19 +348,19 @@
 "`hgext.foo = !/ext/path`" or "`hgext.foo = !`"  when path is not
 supplied.
 
-Example for `~/.hgrc`:
+Example for `~/.hgrc`::
 
   [extensions]
   # (the mq extension will get loaded from Mercurial's path)
   hgext.mq =
   # (this extension will get loaded from the file specified)
   myfeature = ~/.hgext/myfeature.py
---
+
 
-[[format]]
-format::
+``format``
+""""""""""
 
-  usestore;;
+``usestore``
     Enable or disable the "store" repository format which improves
     compatibility with systems that fold case or otherwise mangle
     filenames. Enabled by default. Disabling this option will allow
@@ -360,7 +368,7 @@
     compatibility and ensures that the on-disk format of newly created
     repositories will be compatible with Mercurial before version 0.9.4.
 
-  usefncache;;
+``usefncache``
     Enable or disable the "fncache" repository format which enhances
     the "store" repository format (which has to be enabled to use
     fncache) to allow longer filenames and avoids using Windows
@@ -368,26 +376,27 @@
     option ensures that the on-disk format of newly created
     repositories will be compatible with Mercurial before version 1.1.
 
-[[merge-patterns]]
-merge-patterns::
-  This section specifies merge tools to associate with particular file
-  patterns. Tools matched here will take precedence over the default
-  merge tool. Patterns are globs by default, rooted at the repository
-  root.
-+
-Example:
-+
+``merge-patterns``
+""""""""""""""""""
+
+This section specifies merge tools to associate with particular file
+patterns. Tools matched here will take precedence over the default
+merge tool. Patterns are globs by default, rooted at the repository
+root.
+
+Example::
+
   [merge-patterns]
   **.c = kdiff3
   **.jpg = myimgmerge
 
-[[merge-tools]]
-merge-tools::
-  This section configures external merge tools to use for file-level
-  merges.
-+
---
-Example `~/.hgrc`:
+``merge-tools``
+"""""""""""""""
+
+This section configures external merge tools to use for file-level
+merges.
+
+Example `~/.hgrc`::
 
   [merge-tools]
   # Override stock tool location
@@ -404,64 +413,63 @@
 
 Supported arguments:
 
-priority;;
+``priority``
   The priority in which to evaluate this tool.
   Default: 0.
-executable;;
+``executable``
   Either just the name of the executable or its pathname.
   Default: the tool name.
-args;;
+``args``
   The arguments to pass to the tool executable. You can refer to the
   files being merged as well as the output file through these
   variables: `$base`, `$local`, `$other`, `$output`.
   Default: `$local $base $other`
-premerge;;
+``premerge``
   Attempt to run internal non-interactive 3-way merge tool before
   launching external tool.
   Default: True
-binary;;
+``binary``
   This tool can merge binary files. Defaults to False, unless tool
   was selected by file pattern match.
-symlink;;
+``symlink``
   This tool can merge symlinks. Defaults to False, even if tool was
   selected by file pattern match.
-checkconflicts;;
+``checkconflicts``
   Check whether there are conflicts even though the tool reported
   success.
   Default: False
-checkchanged;;
+``checkchanged``
   Check whether outputs were written even though the tool reported
   success.
   Default: False
-fixeol;;
+``fixeol``
   Attempt to fix up EOL changes caused by the merge tool.
   Default: False
-gui;;
+``gui``
   This tool requires a graphical interface to run. Default: False
-regkey;;
+``regkey``
   Windows registry key which describes install location of this
   tool. Mercurial will search for this key first under
   `HKEY_CURRENT_USER` and then under `HKEY_LOCAL_MACHINE`.
   Default: None
-regname;;
+``regname``
   Name of value to read from specified registry key. Defaults to the
   unnamed (default) value.
-regappend;;
+``regappend``
   String to append to the value read from the registry, typically
   the executable name of the tool.
   Default: None
---
+
 
-[[hooks]]
-hooks::
-  Commands or Python functions that get automatically executed by
-  various actions such as starting or finishing a commit. Multiple
-  hooks can be run for the same action by appending a suffix to the
-  action. Overriding a site-wide hook can be done by changing its
-  value or setting it to an empty string.
-+
---
-Example `.hg/hgrc`:
+``hooks``
+"""""""""
+Commands or Python functions that get automatically executed by
+various actions such as starting or finishing a commit. Multiple
+hooks can be run for the same action by appending a suffix to the
+action. Overriding a site-wide hook can be done by changing its
+value or setting it to an empty string.
+
+Example `.hg/hgrc`::
 
   [hooks]
   # do not use the site-wide hook
@@ -473,41 +481,41 @@
 additional information. For each hook below, the environment
 variables it is passed are listed with names of the form "$HG_foo".
 
-changegroup;;
+``changegroup``
   Run after a changegroup has been added via push, pull or unbundle.
   ID of the first new changeset is in `$HG_NODE`. URL from which
   changes came is in `$HG_URL`.
-commit;;
+``commit``
   Run after a changeset has been created in the local repository. ID
   of the newly created changeset is in `$HG_NODE`. Parent changeset
   IDs are in `$HG_PARENT1` and `$HG_PARENT2`.
-incoming;;
+``incoming``
   Run after a changeset has been pulled, pushed, or unbundled into
   the local repository. The ID of the newly arrived changeset is in
   `$HG_NODE`. URL that was source of changes came is in `$HG_URL`.
-outgoing;;
+``outgoing``
   Run after sending changes from local repository to another. ID of
   first changeset sent is in `$HG_NODE`. Source of operation is in
   `$HG_SOURCE`; see "preoutgoing" hook for description.
-post-<command>;;
+``post-<command>``
   Run after successful invocations of the associated command. The
   contents of the command line are passed as `$HG_ARGS` and the result
   code in `$HG_RESULT`. Hook failure is ignored.
-pre-<command>;;
+``pre-<command>``
   Run before executing the associated command. The contents of the
   command line are passed as `$HG_ARGS`. If the hook returns failure,
   the command doesn't execute and Mercurial returns the failure
   code.
-prechangegroup;;
+``prechangegroup``
   Run before a changegroup is added via push, pull or unbundle. Exit
   status 0 allows the changegroup to proceed. Non-zero status will
   cause the push, pull or unbundle to fail. URL from which changes
   will come is in `$HG_URL`.
-precommit;;
+``precommit``
   Run before starting a local commit. Exit status 0 allows the
   commit to proceed. Non-zero status will cause the commit to fail.
   Parent changeset IDs are in `$HG_PARENT1` and `$HG_PARENT2`.
-preoutgoing;;
+``preoutgoing``
   Run before collecting changes to send from the local repository to
   another. Non-zero status will cause failure. This lets you prevent
   pull over HTTP or SSH. Also prevents against local pull, push
@@ -516,12 +524,12 @@
   `$HG_SOURCE`. If "serve", operation is happening on behalf of remote
   SSH or HTTP repository. If "push", "pull" or "bundle", operation
   is happening on behalf of repository on same system.
-pretag;;
+``pretag``
   Run before creating a tag. Exit status 0 allows the tag to be
   created. Non-zero status will cause the tag to fail. ID of
   changeset to tag is in `$HG_NODE`. Name of tag is in `$HG_TAG`. Tag is
   local if `$HG_LOCAL=1`, in repository if `$HG_LOCAL=0`.
-pretxnchangegroup;;
+``pretxnchangegroup``
   Run after a changegroup has been added via push, pull or unbundle,
   but before the transaction has been committed. Changegroup is
   visible to hook program. This lets you validate incoming changes
@@ -530,23 +538,23 @@
   status will cause the transaction to be rolled back and the push,
   pull or unbundle will fail. URL that was source of changes is in
   `$HG_URL`.
-pretxncommit;;
+``pretxncommit``
   Run after a changeset has been created but the transaction not yet
   committed. Changeset is visible to hook program. This lets you
   validate commit message and changes. Exit status 0 allows the
   commit to proceed. Non-zero status will cause the transaction to
   be rolled back. ID of changeset is in `$HG_NODE`. Parent changeset
   IDs are in `$HG_PARENT1` and `$HG_PARENT2`.
-preupdate;;
+``preupdate``
   Run before updating the working directory. Exit status 0 allows
   the update to proceed. Non-zero status will prevent the update.
   Changeset ID of first new parent is in `$HG_PARENT1`. If merge, ID
   of second new parent is in `$HG_PARENT2`.
-tag;;
+``tag``
   Run after a tag is created. ID of tagged changeset is in `$HG_NODE`.
   Name of tag is in `$HG_TAG`. Tag is local if `$HG_LOCAL=1`, in
   repository if `$HG_LOCAL=0`.
-update;;
+``update``
   Run after updating the working directory. Changeset ID of first
   new parent is in `$HG_PARENT1`. If merge, ID of second new parent is
   in `$HG_PARENT2`. If the update succeeded, `$HG_ERROR=0`. If the
@@ -563,7 +571,7 @@
 have an empty value under Unix-like platforms for non-merge
 changesets, while it will not be available at all under Windows.
 
-The syntax for Python hooks is as follows:
+The syntax for Python hooks is as follows::
 
   hookname = python:modulename.submodule.callable
   hookname = python:/path/to/python/module.py:callable
@@ -573,101 +581,111 @@
 "ui"), a repository object (keyword "repo"), and a "hooktype"
 keyword that tells what kind of hook is used. Arguments listed as
 environment variables above are passed as keyword arguments, with no
-"HG_" prefix, and names in lower case.
+"`HG_`" prefix, and names in lower case.
 
 If a Python hook returns a "true" value or raises an exception, this
 is treated as a failure.
---
+
 
-[[http_proxy]]
-http_proxy::
-  Used to access web-based Mercurial repositories through a HTTP
-  proxy.
-  host;;
+``http_proxy``
+""""""""""""""
+Used to access web-based Mercurial repositories through a HTTP
+proxy.
+
+``host``
     Host name and (optional) port of the proxy server, for example
     "myproxy:8000".
-  no;;
+``no``
     Optional. Comma-separated list of host names that should bypass
     the proxy.
-  passwd;;
+``passwd``
     Optional. Password to authenticate with at the proxy server.
-  user;;
+``user``
     Optional. User name to authenticate with at the proxy server.
 
-[[smtp]]
-smtp::
-  Configuration for extensions that need to send email messages.
-  host;;
+``smtp``
+""""""""
+Configuration for extensions that need to send email messages.
+
+``host``
     Host name of mail server, e.g. "mail.example.com".
-  port;;
+``port``
     Optional. Port to connect to on mail server. Default: 25.
-  tls;;
+``tls``
     Optional. Whether to connect to mail server using TLS. True or
     False. Default: False.
-  username;;
+``username``
     Optional. User name to authenticate to SMTP server with. If
     username is specified, password must also be specified.
     Default: none.
-  password;;
+``password``
     Optional. Password to authenticate to SMTP server with. If
     username is specified, password must also be specified.
     Default: none.
-  local_hostname;;
+``local_hostname``
     Optional. It's the hostname that the sender can use to identify
     itself to the MTA.
 
-[[patch]]
-patch::
-  Settings used when applying patches, for instance through the 'import'
-  command or with Mercurial Queues extension.
-  eol;;
+
+``patch``
+"""""""""
+Settings used when applying patches, for instance through the 'import'
+command or with Mercurial Queues extension.
+
+``eol``
     When set to 'strict' patch content and patched files end of lines
     are preserved. When set to 'lf' or 'crlf', both files end of lines
     are ignored when patching and the result line endings are
     normalized to either LF (Unix) or CRLF (Windows).
     Default: strict.
 
-[[paths]]
-paths::
-  Assigns symbolic names to repositories. The left side is the
-  symbolic name, and the right gives the directory or URL that is the
-  location of the repository. Default paths can be declared by setting
-  the following entries.
-  default;;
+
+``paths``
+"""""""""
+Assigns symbolic names to repositories. The left side is the
+symbolic name, and the right gives the directory or URL that is the
+location of the repository. Default paths can be declared by setting
+the following entries.
+
+``default``
     Directory or URL to use when pulling if no source is specified.
     Default is set to repository from which the current repository was
     cloned.
-  default-push;;
+``default-push``
     Optional. Directory or URL to use when pushing if no destination
     is specified.
 
-[[profiling]]
-profiling::
-  Specifies profiling format and file output. In this section
-  description, 'profiling data' stands for the raw data collected
-  during profiling, while 'profiling report' stands for a statistical
-  text report generated from the profiling data. The profiling is done
-  using lsprof.
-  format;;
+
+``profiling``
+"""""""""""""
+Specifies profiling format and file output. In this section
+description, 'profiling data' stands for the raw data collected
+during profiling, while 'profiling report' stands for a statistical
+text report generated from the profiling data. The profiling is done
+using lsprof.
+
+``format``
     Profiling format.
     Default: text.
-    text;;
+
+    ``text``
       Generate a profiling report. When saving to a file, it should be
       noted that only the report is saved, and the profiling data is
       not kept.
-    kcachegrind;;
+    ``kcachegrind``
       Format profiling data for kcachegrind use: when saving to a
       file, the generated file can directly be loaded into
       kcachegrind.
-  output;;
+``output``
     File path where profiling data or report should be saved. If the
     file exists, it is replaced. Default: None, data is printed on
     stderr
 
-[[server]]
-server::
-  Controls generic server settings.
-  uncompressed;;
+``server``
+""""""""""
+Controls generic server settings.
+
+``uncompressed``
     Whether to allow clients to clone a repository using the
     uncompressed streaming protocol. This transfers about 40% more
     data than a regular clone, but uses less memory and CPU on both
@@ -677,133 +695,134 @@
     about 6 Mbps), uncompressed streaming is slower, because of the
     extra data transfer overhead. Default is False.
 
-[[trusted]]
-trusted::
-  For security reasons, Mercurial will not use the settings in the
-  `.hg/hgrc` file from a repository if it doesn't belong to a trusted
-  user or to a trusted group. The main exception is the web interface,
-  which automatically uses some safe settings, since it's common to
-  serve repositories from different users.
-+
---
+
+``trusted``
+"""""""""""
+For security reasons, Mercurial will not use the settings in the
+`.hg/hgrc` file from a repository if it doesn't belong to a trusted
+user or to a trusted group. The main exception is the web interface,
+which automatically uses some safe settings, since it's common to
+serve repositories from different users.
+
 This section specifies what users and groups are trusted. The
 current user is always trusted. To trust everybody, list a user or a
 group with name "`*`".
 
-users;;
+``users``
   Comma-separated list of trusted users.
-groups;;
+``groups``
   Comma-separated list of trusted groups.
---
+
 
-[[ui]]
-ui::
-  User interface controls.
-+
---
-  archivemeta;;
+``ui``
+""""""
+
+User interface controls.
+
+``archivemeta``
     Whether to include the .hg_archival.txt file containing meta data
     (hashes for the repository base and for tip) in archives created
     by the hg archive command or downloaded via hgweb.
     Default is true.
-  askusername;;
+``askusername``
     Whether to prompt for a username when committing. If True, and
     neither `$HGUSER` nor `$EMAIL` has been specified, then the user will
     be prompted to enter a username. If no username is entered, the
     default USER@HOST is used instead.
     Default is False.
-  debug;;
+``debug``
     Print debugging information. True or False. Default is False.
-  editor;;
+``editor``
     The editor to use during a commit. Default is `$EDITOR` or "vi".
-  fallbackencoding;;
+``fallbackencoding``
     Encoding to try if it's not possible to decode the changelog using
     UTF-8. Default is ISO-8859-1.
-  ignore;;
+``ignore``
     A file to read per-user ignore patterns from. This file should be
     in the same format as a repository-wide .hgignore file. This
     option supports hook syntax, so if you want to specify multiple
     ignore files, you can do so by setting something like
     "ignore.other = ~/.hgignore2". For details of the ignore file
     format, see the hgignore(5) man page.
-  interactive;;
+``interactive``
     Allow to prompt the user. True or False. Default is True.
-  logtemplate;;
+``logtemplate``
     Template string for commands that print changesets.
-  merge;;
+``merge``
     The conflict resolution program to use during a manual merge.
     There are some internal tools available:
-+
-      internal:local;;
+
+    ``internal:local``
         keep the local version
-      internal:other;;
+    ``internal:other``
         use the other version
-      internal:merge;;
+    ``internal:merge``
         use the internal non-interactive merge tool
-      internal:fail;;
+    ``internal:fail``
         fail to merge
-+
+
 For more information on configuring merge tools see the
 merge-tools section.
 
-  patch;;
+``patch``
     command to use to apply patches. Look for 'gpatch' or 'patch' in
     PATH if unset.
-  quiet;;
+``quiet``
     Reduce the amount of output printed. True or False. Default is False.
-  remotecmd;;
+``remotecmd``
     remote command to use for clone/push/pull operations. Default is 'hg'.
-  report_untrusted;;
+``report_untrusted``
     Warn if a `.hg/hgrc` file is ignored due to not being owned by a
     trusted user or group. True or False. Default is True.
-  slash;;
+``slash``
     Display paths using a slash ("`/`") as the path separator. This
     only makes a difference on systems where the default path
     separator is not the slash character (e.g. Windows uses the
-    backslash character ("`\`")).
+    backslash character ("`\\`")).
     Default is False.
-  ssh;;
+``ssh``
     command to use for SSH connections. Default is 'ssh'.
-  strict;;
+``strict``
     Require exact command names, instead of allowing unambiguous
     abbreviations. True or False. Default is False.
-  style;;
+``style``
     Name of style to use for command output.
-  timeout;;
+``timeout``
     The timeout used when a lock is held (in seconds), a negative value
     means no timeout. Default is 600.
-  username;;
+``username``
     The committer of a changeset created when running "commit".
     Typically a person's name and email address, e.g. "Fred Widget
     <fred@example.com>". Default is `$EMAIL` or username@hostname. If
     the username in hgrc is empty, it has to be specified manually or
     in a different hgrc file (e.g. `$HOME/.hgrc`, if the admin set
     "username =" in the system hgrc).
-  verbose;;
+``verbose``
     Increase the amount of output printed. True or False. Default is False.
---
+
 
-[[web]]
-web::
-  Web interface configuration.
-  accesslog;;
+``web``
+"""""""
+Web interface configuration.
+
+``accesslog``
     Where to output the access log. Default is stdout.
-  address;;
+``address``
     Interface address to bind to. Default is all.
-  allow_archive;;
+``allow_archive``
     List of archive format (bz2, gz, zip) allowed for downloading.
     Default is empty.
-  allowbz2;;
+``allowbz2``
     (DEPRECATED) Whether to allow .tar.bz2 downloading of repository
     revisions.
     Default is false.
-  allowgz;;
+``allowgz``
     (DEPRECATED) Whether to allow .tar.gz downloading of repository
     revisions.
     Default is false.
-  allowpull;;
+``allowpull``
     Whether to allow pulling from the repository. Default is true.
-  allow_push;;
+``allow_push``
     Whether to allow pushing to the repository. If empty or not set,
     push is not allowed. If the special value "`*`", any remote user can
     push, including unauthenticated users. Otherwise, the remote user
@@ -811,7 +830,7 @@
     be present in this list (separated by whitespace or ","). The
     contents of the allow_push list are examined after the deny_push
     list.
-  allow_read;;
+``allow_read``
     If the user has not already been denied repository access due to
     the contents of deny_read, this list determines whether to grant
     repository access to the user. If this list is not empty, and the
@@ -822,24 +841,24 @@
     to it not being set (i.e. access is permitted to all users). The
     contents of the allow_read list are examined after the deny_read
     list.
-  allowzip;;
+``allowzip``
     (DEPRECATED) Whether to allow .zip downloading of repository
     revisions. Default is false. This feature creates temporary files.
-  baseurl;;
+``baseurl``
     Base URL to use when publishing URLs in other locations, so
     third-party tools like email notification hooks can construct
     URLs. Example: "http://hgserver/repos/"
-  contact;;
+``contact``
     Name or email address of the person in charge of the repository.
     Defaults to ui.username or `$EMAIL` or "unknown" if unset or empty.
-  deny_push;;
+``deny_push``
     Whether to deny pushing to the repository. If empty or not set,
     push is not denied. If the special value "`*`", all remote users are
     denied push. Otherwise, unauthenticated users are all denied, and
     any authenticated user name present in this list (separated by
     whitespace or ",") is also denied. The contents of the deny_push
     list are examined before the allow_push list.
-  deny_read;;
+``deny_read``
     Whether to deny reading/viewing of the repository. If this list is
     not empty, unauthenticated users are all denied, and any
     authenticated user name present in this list (separated by
@@ -854,44 +873,44 @@
     the list of repositories. The contents of the deny_read list have
     priority over (are examined before) the contents of the allow_read
     list.
-  description;;
+``description``
     Textual description of the repository's purpose or contents.
     Default is "unknown".
-  encoding;;
+``encoding``
     Character encoding name.
     Example: "UTF-8"
-  errorlog;;
+``errorlog``
     Where to output the error log. Default is stderr.
-  hidden;;
+``hidden``
     Whether to hide the repository in the hgwebdir index.
     Default is false.
-  ipv6;;
+``ipv6``
     Whether to use IPv6. Default is false.
-  name;;
+``name``
     Repository name to use in the web interface. Default is current
     working directory.
-  maxchanges;;
+``maxchanges``
     Maximum number of changes to list on the changelog. Default is 10.
-  maxfiles;;
+``maxfiles``
     Maximum number of files to list per changeset. Default is 10.
-  port;;
+``port``
     Port to listen on. Default is 8000.
-  prefix;;
+``prefix``
     Prefix path to serve from. Default is '' (server root).
-  push_ssl;;
+``push_ssl``
     Whether to require that inbound pushes be transported over SSL to
     prevent password sniffing. Default is true.
-  staticurl;;
+``staticurl``
     Base URL to use for static files. If unset, static files (e.g. the
     hgicon.png favicon) will be served by the CGI script itself. Use
     this setting to serve them directly with the HTTP server.
     Example: "http://hgserver/static/"
-  stripes;;
+``stripes``
     How many lines a "zebra stripe" should span in multiline output.
     Default is 1; set to 0 to disable.
-  style;;
+``style``
     Which template map style to use.
-  templates;;
+``templates``
     Where to find the HTML templates. Default is install path.
 
 
--- a/mercurial/help.py	Thu Jul 16 23:25:26 2009 +0200
+++ b/mercurial/help.py	Thu Jul 16 23:25:26 2009 +0200
@@ -148,10 +148,10 @@
     repository root.
 
     To use an extended glob, start a name with "glob:". Globs are rooted at
-    the current directory; a glob such as "*.c" will only match files in the
+    the current directory; a glob such as "``*.c``" will only match files in the
     current directory ending with ".c".
 
-    The supported glob syntax extensions are "**" to match any string across
+    The supported glob syntax extensions are "``**``" to match any string across
     path separators and "{a,b}" to mean "a or b".
 
     To use a Perl/Python regular expression, start a name with "re:". Regexp