ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Liz Burke-Scovill" <>
Subject Re: Bringing up an old issue that was never addressed: includeemptydirs on delete
Date Mon, 08 May 2006 18:21:17 GMT
On 5/8/06, Dominique Devienne <> wrote:
> In your first example, your empty dirs are implicitly included, and
> and later not excluded, so <delete> will get rid of them.
> In your second example, your include pattern prevent the empty dirs
> from being selected, because they don't match your pattern, so they
> can't be deleted (the exclude patterns don't matter).

*nod* Which I'd thought about - however, then, it would appear that the
*only* point to "includeemptydirs" is that it's used as a flag to indicate a
false condition and only usable in the event that an exclude patternset is
present. In that case, it should be documented as such...and it probably
should have been named "excludeemptydirs" ;)

The fact that some directories might become empty once all the files
> you wanted deleted are gone is of no concern to <delete>, as currently
> implemented.

*grin* _as currently implemented_ being the point. My question more revolves
around the necessity of it being implemented this way - which doesn't seem
to make much sense from a usage standpoint, even if it makes sense logically
from an implementation standpoint.

<delete> only concerns itself with the files (files or dirs) selected
> by the filesets it operates upon, so if the "empty" dirs you want
> deleted are not listed by these filesets (use debug mode to see the
> files selected), they won't be deleted.

*nod* debug does list the files selected, but it doesn't open up the logic
behind it. I can't get subversion to access the latest code at the moment
due to firewall policies, so I'll try and look at it this evening to get a
clearer understanding of the hows and whys.

Why is this important? (At least to me - and at least one other person ;) )
In the situation where you are trying to clean up a tree, and an inclusion
patternset is the most reasonable way to go, you still want to be able to
clean up empty directories rather than letting them stand. I'm sure there
are other reasons, but this one is the most relevant to my current
situation. Using an exclusion pattern set would probably work, but it would
be somewhat hacky considering that simply based on naming conventions, using
an includeemptydirs would just make sense.

Thank you!

Imagination is intelligence having fun...

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message