Problems with the "purge" command

John W jwdevel at gmail.com
Fri Jun 16 15:54:26 UTC 2023


I find that putting "hgext.purge =" in my [extensions] makes the difference.

Though I don't know why that is; is purge built-in, or an extension?
Or an extension that was later moved to be built-in? Seems like maybe
a bug.

Anyway, might be a workaround for you.
So the full line could be:

    $ HGPLAINEXCEPT= HGRCPATH= $h --config 'extensions.hgext.purge=' purge

-John

On 6/16/23, Dr Rainer Woitok <rainer.woitok at gmail.com> wrote:
> Greetings,
>
> is there a way to have  "hg purge"  just remove  untracked files without
> asking?  I mean apart from the ancient
>
>    purge = !$HG status -nu0 | xargs -0 rm -f
>
> in the "[alias]" section of one's "~/.hgrc" file?
>
> $ hg version
> Mercurial Distributed SCM (version 6.4.3+hg3.660cf5c34820)
> (see https://mercurial-scm.org for more information)
>
> Copyright (C) 2005-2023 Olivia Mackall and others
> This is free software; see the source for copying conditions. There is NO
> warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
> $ hg st
> $ touch xxx
> $ hg st
> ? xxx
> $ HGPLAINEXCEPT= HGRCPATH= hg purge
> permanently delete 1 unknown files? (yN) n
> abort: removal cancelled
> $ HGPLAINEXCEPT= HGRCPATH= hg purge --noninteractive
> permanently delete 1 unknown files? (yN) n
> abort: removal cancelled
> $ HGPLAINEXCEPT= HGRCPATH= hg purge --confirm
> permanently delete 1 unknown files? (yN) n
> abort: removal cancelled
> $
>
> Since there is a "--confirm" option,  I expected not specifying it would
> do the trick,  but apparently  this option  is totally irrelevant.   And
> "--noninteractive",  which just prints its choice after the question and
> then continues, is said to "pick the FIRST choice" (capitalzation by me)
> which would be "y" rather than "N",  but apparently it prefers the CAPI-
> TALIZED choice instead (or even the last).
>
> What else could I try?
>
> Sincerely,
>   Rainer
> _______________________________________________
> Mercurial mailing list
> Mercurial at lists.mercurial-scm.org
> https://lists.mercurial-scm.org/mailman/listinfo/mercurial
>


More information about the Mercurial mailing list