Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to make deleting .svn directories work using ant?

Tags:

svn

ant

I tried the example in the manual:

<delete includeemptydirs="true">
  <fileset dir="${DIR}" includes="**/.svn" defaultexcludes="false"/>
</delete>

(where DIR is set to some directory) and it does nothing. How can this be made to work? I'm using ant 1.7.0.

FYI: I've tried lots of different combinations of nested elements, dirset instead of fileset and it still doesn't work. :(

like image 516
Paul J. Lucas Avatar asked Jan 23 '23 14:01

Paul J. Lucas


2 Answers

Why don't you just use svn export instead?

Anyway, looks like ( from here ) the following should work:

<echo level="info">Remove svn-files...</echo>
<delete includeemptydirs="true" >
    <fileset dir="${checkout.dir}" defaultexcludes="false" >
         <include name="**/.svn/" />
    </fileset>
</delete>
like image 129
Brian Gianforcaro Avatar answered Jan 29 '23 08:01

Brian Gianforcaro


Try with the following lines:

<delete includeemptydirs="true">
   <dirset dir="./" defaultexcludes="false">
      <include name="**/.svn/**" />
   </dirset>
</delete>
like image 40
S. Vincent Avatar answered Jan 29 '23 06:01

S. Vincent