ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David Weintraub <>
Subject Re: Deleting .svn directories example doesn't work
Date Thu, 21 May 2009 17:08:50 GMT
The <fileset> resource collection is for files and not directories.
True, the <delete> task can also remove empty directories once all the
files are deleted, but the <fileset> resource collection really is
just for files.

What you want to do is remove directories. Therefore, you want the
<dirset> resource collection.

        <dirset dir="${DIR}"
           <include name="**/.svn"/>

You also need to include the defaultexcludes="false" parameter.

By the way, why do you want to remove .svn directories? If this is a
working directory, you'll destroy its usability. If you simply want
the files, you should use "svn export" which does the samething as an
"svn co", but doesn't put in all those .svn directories. That's a lot
quicker than checking out a working directory, and then you don't
waste time removing the .svn directories.

On Wed, May 20, 2009 at 5:34 PM, Paul J. Lucas <> wrote:
> I'm trying to use the "deleting subversion directories" example from the
> manual:
>        <delete includeemptydirs="true">
>          <fileset dir="${DIR}" includes="**/.svn" defaultexcludes="false"/>
>        </delete>
> and it does nothing.  How can this be made to work?  I'm using ant 1.7.0.
> - Paul
> ---------------------------------------------------------------------
> To unsubscribe, e-mail:
> For additional commands, e-mail:

David Weintraub

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message