How to make deleting .svn directories work using a

2019-05-04 14:58发布

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. :(

标签: svn ant
2条回答
\"骚年 ilove
2楼-- · 2019-05-04 15:28

Try with the following lines:

<delete includeemptydirs="true">
   <dirset dir="./" defaultexcludes="false">
      <include name="**/.svn/**" />
   </dirset>
</delete>
查看更多
贪生不怕死
3楼-- · 2019-05-04 15:32

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>
查看更多
登录 后发表回答