How to make deleting .svn directories work using ant?

心不动则不痛 提交于 2020-01-02 05:25:07

问题


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


回答1:


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>



回答2:


Try with the following lines:

<delete includeemptydirs="true">
   <dirset dir="./" defaultexcludes="false">
      <include name="**/.svn/**" />
   </dirset>
</delete>


来源:https://stackoverflow.com/questions/890772/how-to-make-deleting-svn-directories-work-using-ant

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!