[PATCH] Correct example concerning "hg purge" alias in "hgrc.5"

Yuya Nishihara yuya at tcha.org
Fri Feb 19 22:52:45 EST 2016


On Mon, 15 Feb 2016 12:58:34 +0100, Dr Rainer Woitok wrote:
> # HG changeset patch
> # User Rainer Woitok <Rainer.Woitok at Gmail.Com>
> # Date 1455527026 -3600
> #      Mon Feb 15 10:03:46 2016 +0100
> # Branch stable
> # Node ID 6c708c0ac5820c467c1485122b24a2707b059863
> # Parent  4c6053a6b17d682b34fb88bbeb5e94ed9085d900
> doc: correct example concerning "hg purge" alias in man page "hgrc.5"
> 
> The "hg purge" alias as currently described in "hgrc.5" only works, if
> the caller's current working directory is identical to the repository's
> root directory.
> 
> This patch changes the example by advising the reader to temporarily
> "cd" into the repository's root directory before calling "xargs".
> 
> diff --git a/mercurial/help/config.txt b/mercurial/help/config.txt
> --- a/mercurial/help/config.txt
> +++ b/mercurial/help/config.txt
> @@ -276,7 +276,8 @@
>  will let you do ``hg echo foo`` to have ``foo`` printed in your
>  terminal. A better example might be::
>  
> -   purge = !$HG status --no-status --unknown -0 | xargs -0 rm
> +   purge = !$HG status --no-status --unknown -0 |
> +           ( cd `$HG root` ; xargs -0 rm )

You could make status output relative.

    status --no-status --unknown -0 re:

https://selenic.com/repo/hg/help/status


More information about the Mercurial-devel mailing list