[PATCH] help: updated text in the config.txt file in reference to the [paths] section of hgrc, added example of alias for a local path

Kevin Bullock kbullock+mercurial at ringworld.org
Fri Sep 28 21:52:22 CDT 2012


On 28 Sep 2012, at 5:17 PM, Juan Pablo Carbajal wrote:

> # HG changeset patch
> # User Juan Pablo Carbajal (desktop) <carbajal at ifi.uzh.ch>
> # Date 1348870138 -7200
> # Node ID c94681d38ad1d8c4900b2046c427c4fceea6d12e
> # Parent  5c89e7fa5bc20597080494aea43a09903e9e7a6a
> help: updated text in the config.txt file in reference to the [paths] section of hgrc, added example of alias for a local path

Right format, but too long. Try something like:

help: add example of paths other than default in hgrc

> diff -r 5c89e7fa5bc2 -r c94681d38ad1 mercurial/help/config.txt
> --- a/mercurial/help/config.txt	Thu Sep 20 19:02:47 2012 +0200
> +++ b/mercurial/help/config.txt	Sat Sep 29 00:08:58 2012 +0200
> @@ -604,9 +604,9 @@
> ``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``. Parsed command line arguments are passed as 
> +  code in ``$HG_RESULT``. Parsed command line arguments are passed as
>   ``$HG_PATS`` and ``$HG_OPTS``. These contain string representations of
> -  the python data internally passed to <command>. ``$HG_OPTS`` is a 
> +  the python data internally passed to <command>. ``$HG_OPTS`` is a

As Matt mentioned, chomping the trailing spaces here isn't the purpose of your patch, so you should coax your editor into leaving them as-is (or use the record extension to leave them out of your commit). I don't think the trailing spaces are meaningful to rST, so you could send a separate patch removing them if you were so inclined.

>   dictionary of options (with unspecified options set to their defaults).
>   ``$HG_PATS`` is a list of arguments. Hook failure is ignored.
> 
> @@ -616,7 +616,7 @@
>   are passed as ``$HG_PATS`` and ``$HG_OPTS``. These contain string
>   representations of the data internally passed to <command>. ``$HG_OPTS``
>   is a  dictionary of options (with unspecified options set to their
> -  defaults). ``$HG_PATS`` is a list of arguments. If the hook returns 
> +  defaults). ``$HG_PATS`` is a list of arguments. If the hook returns
>   failure, the command doesn't execute and Mercurial returns the failure
>   code.
> 
> @@ -923,6 +923,17 @@
>     Optional. Directory or URL to use when pushing if no destination
>     is specified.
> 
> +Custom paths can be defined by assigning the path to a name that later can be
> +used from the command line. Example::
> +
> +    [paths]
> +    default = default_path

I think this example 'default' line is more confusing than helpful. You could just leave it out of the snippet.

> +    local = ssh://server.local//path/to/repo

An http: url would probably be the clearest.

> +
> +To push to the path defined in ``local`` use::

'use' can be struck here -- it's unclear whether it's a noun or a verb, and it's not needed.

pacem in terris / мир / शान्ति / ‎‫سَلاَم‬ / 平和
Kevin R. Bullock

> +
> +    hg push local
> +
> ``phases``
> ----------
> 
> _______________________________________________
> Mercurial-devel mailing list
> Mercurial-devel at selenic.com
> http://selenic.com/mailman/listinfo/mercurial-devel

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://selenic.com/pipermail/mercurial-devel/attachments/20120928/a7e0ebb0/attachment.html>


More information about the Mercurial-devel mailing list