[PATCH] remove: add --keep-dirs option to disable removing empty directories

Matt Mackall mpm at selenic.com
Mon Aug 31 18:24:09 CDT 2009

On Sat, 2009-08-29 at 02:31 +0200, jonny.dee at gmx.net wrote:
> # HG changeset patch
> # User Jonny Dee <jonny.dee at gmx.net>
> # Date 1251504955 -7200
> # Node ID 34a07e4df72be5cd59bd3acddcf193f9ebab16ca
> # Parent  3a78bbc5766064b0338859b25e183ea9514f4ec3
> remove: add --keep-dirs option to disable removing empty directories.
> Mercurial normally deletes empty directories when removing files
> would leave them empty. This patch will add a new option --keep-dirs
> to the 'remove' command which, when specified on command line, will
> make Mercurial keep local empty directories.

Not sure how I feel about this option. There are about five other places
we'd need to add this option for consistency (update/revert/import..). I
think that puts it over the edge of too complex/too obscure to be a
command line option.

Also, this command either requires the user have foresight (in which
case they don't really need it) or use [defaults]/[aliases] to be
useful. Which makes it look like it wants to be a config option.

http://selenic.com : development and support for Mercurial and Linux

More information about the Mercurial-devel mailing list