Example of "purge" alias in "man/man5/hgrc.5"
Dr Rainer Woitok
rainer.woitok at gmail.com
Fri Feb 12 11:33:41 UTC 2016
Greetings,
in "man/man5/hgrc.5" you find an example how to define a "purge" alias:
purge = !$HG status --no-status --unknown -0 | xargs -0 rm
which will make hg purge delete all unknown files in the repository in
the same manner as the purge extension.
I'm not sure whether or not the "purge" extension has the same problem,
but the alias defined above only works when your current working direct-
ory is the repository's root directory. If you are somewhere deep in-
side your repository, the alias definition should instead be:
purge = !$HG status -nu0 | ( cd `$HG root` ; xargs -0 rm )
Perhaps someone who cares could update the documentation accordingly.
Sincerely,
Rainer
More information about the Mercurial
mailing list