[PATCH 0 of 2] help: RST formatting

Olav Reinert seroton10 at gmail.com
Thu May 17 10:14:04 CDT 2012


These patches implement formatting of all help text using RST.  Both console
and web help use RST to format all output. Web help remains as preformatted
text, instead of proper HTML, for now. No functionality is changed, but some
help text appears differently:


1) The first column of Field lists are now always 14 characters wide. Because
they are used prominently for listing commands, extensions, etc., this is the
most visible change (or maybe not - it's only two extra spaces). For example:

$ ./hg help shortlist
Mercurial Distributed SCM

basic commands:

 add           add the specified files on the next commit
 annotate      show changeset information by line for each file
 clone         make a copy of an existing repository
 commit        commit the specified files or all outstanding changes
 diff          diff repository (or selected files)
 ...           ...
 remove        remove the specified files on the next commit
 serve         start stand-alone webserver
 status        show changed files in the working directory
 summary       summarize working directory state
 update        update working directory (or switch revisions)

use "hg help" for the full list of commands or "hg -v" for details


2) Verbose help is now also formatted as a field list, with extra line breaks
where needed following the list of aliases. For example:

$ ./hg help -v shortlist
Mercurial Distributed SCM

basic commands:

 add           add the specified files on the next commit
 annotate, blame
               show changeset information by line for each file
 clone         make a copy of an existing repository
 commit, ci    commit the specified files or all outstanding changes
 diff          diff repository (or selected files)
 export        dump the header and diffs for one or more changesets
 forget        forget the specified files on the next commit
 init          create a new repository in the given directory
 log, history  show revision history of entire repository or files
 merge         merge working directory with another revision
 ....          ....
 serve         start stand-alone webserver
 status, st    show changed files in the working directory
 summary, sum  summarize working directory state
 update, up, checkout, co
               update working directory (or switch revisions)

global options:

 -R --repository REPO   repository root directory or name of overlay bundle
                        file
    --cwd DIR           change working directory
    ....                ....
    --color TYPE        when to colorize (boolean, always, auto, or never)
                        (default: auto)
    --pager TYPE        when to paginate (boolean, always, auto, or never)
                        (default: auto)

[+] marked option can be specified multiple times

use "hg help" for the full list of commands




More information about the Mercurial-devel mailing list