[PATCH] purge: add --ignored-only/-i option to delete only ignored files
Kevin Bullock
kbullock+mercurial at ringworld.org
Thu Mar 22 13:46:18 CDT 2012
On Mar 21, 2012, at 8:49 PM, Greg Ward wrote:
> On 21 March 2012, Matt Mackall said:
>> On Tue, 2012-03-20 at 21:50 -0400, Greg Ward wrote:
>>> # HG changeset patch
>>> # User Greg Ward <greg at gerg.ca>
>>> # Date 1332294424 14400
>>> # Node ID bfde5bbbc3bb0d804a70cad737f0bf95086a448c
>>> # Parent 12e3f93b1cbc7c930e941f0adfe632c8ad70b73d
>>> purge: add --ignored-only/-i option to delete only ignored files
>>>
>>> This is handy when you trust .hgignore to specify all of your build
>>> products, but you do not trust yourself to always remember to "hg add"
>>> new files. This treats unknown files as valuable, since they might
>>> become added files soon.
>>
>> Does this work?
>>
>> hg purge "set:ignored()"
>
> No, but
>
> hg purge --all "set:ignored()"
>
> does. purge only considers ignored files with --all.
>
> Also, this does not remove empty directories.
>
> However, this totally fails the usability test. I can just see me
> trying to explain to one of my co-workers how to clean up a messy
> working dir.
FWIW, my recommended usage of the purge extension is always:
hg --config extensions.purge= purge [whatever]
I consider it my --yes-ive-thought-through-what-im-purging option. :) It also does not lend itself to finger-macro'ing, a nice safety feature.
Doesn't solve the "--all 'set:ignored()'" issue though.
pacem in terris / мир / शान्ति / سَلاَم / 平和
Kevin R. Bullock
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://selenic.com/pipermail/mercurial-devel/attachments/20120322/bd82010e/attachment.html>
More information about the Mercurial-devel
mailing list