Submitter | Dr Rainer Woitok |
---|---|
Date | Feb. 15, 2016, 11:58 a.m. |
Message ID | <22209.48490.17000.985056@woitok.gmail.com> |
Download | mbox | patch |
Permalink | /patch/13257/ |
State | Accepted |
Delegated to: | Yuya Nishihara |
Headers | show |
Comments
On Mon, 15 Feb 2016 12:58:34 +0100, Dr Rainer Woitok wrote: > # HG changeset patch > # User Rainer Woitok <Rainer.Woitok@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
Patch
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 ) which will make ``hg purge`` delete all unknown files in the repository in the same manner as the purge extension.