You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by "Paul J. Lucas" <pa...@lucasmail.org> on 2009/05/20 23:34:39 UTC

Deleting .svn directories example doesn't work

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: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Re: Deleting .svn directories example doesn't work

Posted by "Paul J. Lucas" <pa...@lucasmail.org>.
On May 20, 2009, at 5:43 PM, Martin Gainty wrote:

> you need to flip the read-only attrib off of .svn and flip the read- 
> only attrib off the folder

This is not relevant.

- Paul

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


RE: Deleting .svn directories example doesn't work

Posted by Martin Gainty <mg...@hotmail.com>.
Paul-

you need to flip the read-only attrib off of .svn and flip the read-only attrib off the folder

Martin 
______________________________________________ 
Verzicht und Vertraulichkeitanmerkung/Note de déni et de confidentialité
 
Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene Empfaenger sein, so bitten wir hoeflich um eine Mitteilung. Jede unbefugte Weiterleitung oder Fertigung einer Kopie ist unzulaessig. Diese Nachricht dient lediglich dem Austausch von Informationen und entfaltet keine rechtliche Bindungswirkung. Aufgrund der leichten Manipulierbarkeit von E-Mails koennen wir keine Haftung fuer den Inhalt uebernehmen.
Ce message est confidentiel et peut être privilégié. Si vous n'êtes pas le destinataire prévu, nous te demandons avec bonté que pour satisfaire informez l'expéditeur. N'importe quelle diffusion non autorisée ou la copie de ceci est interdite. Ce message sert à l'information seulement et n'aura pas n'importe quel effet légalement obligatoire. Étant donné que les email peuvent facilement être sujets à la manipulation, nous ne pouvons accepter aucune responsabilité pour le contenu fourni.




> From: paul@lucasmail.org
> To: user@ant.apache.org
> Subject: Deleting .svn directories example doesn't work
> Date: Wed, 20 May 2009 14:34:39 -0700
> 
> 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: user-unsubscribe@ant.apache.org
> For additional commands, e-mail: user-help@ant.apache.org
> 

_________________________________________________________________
Hotmail® has a new way to see what's up with your friends.
http://windowslive.com/Tutorial/Hotmail/WhatsNew?ocid=TXT_TAGLM_WL_HM_Tutorial_WhatsNew1_052009

Re: Deleting .svn directories example doesn't work

Posted by "Paul J. Lucas" <pa...@lucasmail.org>.
On May 21, 2009, at 10:08 AM, David Weintraub wrote:

> 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.
>
>    <delete>
>        <dirset dir="${DIR}"
>           defaultexcludes="false">
>           <include name="**/.svn"/>
>       </dirset>
>   </delete>

This does not work either.  As I stated previous in a follow-up to  
myself, what's needed is the trailing slash, e.g. "**/.svn/".

> By the way, why do you want to remove .svn directories?

Because I don't want them (why else?).

> If this is a working directory, you'll destroy its usability.

I'm aware of how svn works.

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

There are built products in the set of files I'm copying.  svn export  
does not copy files that are not under source control.

- Paul

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Re: Deleting .svn directories example doesn't work

Posted by David Weintraub <qa...@gmail.com>.
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.

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

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 <pa...@lucasmail.org> 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: user-unsubscribe@ant.apache.org
> For additional commands, e-mail: user-help@ant.apache.org
>
>



-- 
David Weintraub
qazwart@gmail.com

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Re: Deleting .svn directories example doesn't work

Posted by "Paul J. Lucas" <pa...@lucasmail.org>.
On May 20, 2009, at 2: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?

It turns out the ant manual is wrong.  The includes needs to be:

	includes="**/.svn/"

Note the trailing slash.

- Paul

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org