[PATCH] purge: add options for deleting only files or only directories

Ben Kehoe benk at berkeley.edu
Sat Nov 16 15:03:06 CST 2013


On Sat, Nov 16, 2013 at 12:54 PM, Kevin Bullock <
kbullock+mercurial at ringworld.org> wrote:

> On 16 Nov 2013, at 3:15 PM, Ben Kehoe <benk at berkeley.edu> wrote:
>
> > On Sat, Nov 16, 2013 at 11:51 AM, Matt Mackall <mpm at selenic.com> wrote:
> >
> >> Perhaps we can do this with filesets.
> >
> > The primary motivation was that when mercurial is being used to version
> the state of another program, that program may only do directory creation
> at an initial point, and then afterwards assume the directory structure is
> intact (poor design, but what can you do?), although some directories may
> be empty (e.g., bin before a build is run). Restoring a previous state
> would then be:
> > hg revert -aC && hg purge --files
> > The code for purge makes a clear distinction between files and
> directories, which is why it seemed natural to add those simple options.
>
> I agree with Matt, I think for the user-facing portion of this it doesn't
> make much sense to add options when we have a mechanism for specifying
> arbitrary groups of files. I'm not sure how useful it will be outside purge
> to specify just regular files or just directories, but I _can_ see a use
> case for e.g. specifying all executable files.
>

Maybe I don't understand filesets well enough, but what are the filesets
that would indicate "all directories" and "all files (but not directories)"?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://selenic.com/pipermail/mercurial-devel/attachments/20131116/27c61139/attachment.html>


More information about the Mercurial-devel mailing list