[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: How to clean the working dir from .svn folders ?

From: Geoff Hoffman <ghoffman_at_cardinalpath.com>
Date: Tue, 26 Jul 2011 08:08:23 -0700

>> *From:* Geoff Hoffman <ghoffman_at_cardinalpath.com>
>> *Sent:* Tuesday, July 26, 2011 4:05 PM
>> *To:* users_at_subversion.apache.org
>> *Subject:* Re: How to clean the working dir from .svn folders ?
>>
>> I believe you can use a bash script similar to the following, but you may
>> need to set a flag from PHP so that cron running as root or admin has
>> permission to delete them. Hope it helps-
>>
>>
>> #!/bin/sh
>> echo "recursively removing .svn folders from"
>> pwd
>> rm -rf `find . -type d -name .svn`
>>
>>
>
> On Tue, Jul 26, 2011 at 7:32 AM, Damien Mistic <
> mistic100.forever_at_hotmail.fr> wrote:
>
>> ‘rm’ is a not a Windows function, as I said I must run on all
>> platforms, that’s why it’s better if subversion can do it itself [image:
>> Sourire]
>>
>> Damien.
>>
>
>
>
> Ah - I thought someone mentioned cygwin ... sorry. Could you create a PHP
> script specifically for this? There are lots of recursive directory walk
> scripts online. I'm sure you have a reason why svn export won't work but are
> you certain? That's what it's for. You can't export as 'original-dir-export'
> next to your original-dir, delete the original-dir, rename the exported back
> to same as original-dir?
>
>

On Tue, Jul 26, 2011 at 8:04 AM, Damien Mistic <mistic100.forever_at_hotmail.fr
> wrote:

> Dir you read my first mail ?
> I repost it here :
>
> > Hi all,
> > so my problem is clear : I've a working dir and I want to clean it up
> from
> > all .svn folders, how to ?
> > Knowing that I'm working un CLI within exec() function of PHP.
> Unfortunately
> > I can't delete manually files and folders :
> >
> > Warning: unlink(svn/.svn/all-wcprops) [function.unlink]: Permission
> denied
> > in C:\wamp\www\lang_editor\include\functions.inc.php on line 325
> >
> > And the 'export' function is not what I want because my aim is to delete
> the
> > folder, not really get a clean copy.
> >
> > If there is no way I think we must add a new function to SVN, such as
> 'svn
> > unlink' or 'svn dissociate'
> >
> > Regards, Damien.
>

Yes, I read it, but I don't understand *why* export-and-rename won't work as
the end result would be indistinguishable from what you're saying you want.
You may be able to run PHP script with admin user rights on the command line
but it's different across platforms how to do this. Sorry I'm not more help.

Received on 2011-07-26 17:09:00 CEST

This is an archived mail posted to the Subversion Users mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.