views:

2879

answers:

10

Hi,

I'm using subversion (TortoiseSVN) and I want to remove the .svn folders from my project for deployment, is there an automated way of doing this using subversion or do I have to create a custom script for this?

+26  A: 

use

svn export <url-to-repo> <dest-path>

Gets just the source, nothing else.

Look here for more info

Doug T.
A: 

Do svn export <url> to export a clean copy without .svn folders.

Andrew Medico
A: 

Use the export feature.

Geoff
+20  A: 

ToritiseSVN has an export function. This will create the entire SVN else where without the .svn folders.

Also, a lot of FTP clients have filtering, which you can add .svn to just in you forget one day.

Darryl Hein
thanks, I was looking for a tortoise solution preferrably. I'm using filezilla, does that have filtering?
public static
Check out FireFTP if Filezilla doesn't have what you want.
Bill James
Tortoise can do an export. Right-click in windows explorer, TortoiseSVN > Export.
glenc
@glenc Isn't that exactly what my answer is?
Darryl Hein
@public static - Yes, Filezilla has filters. Click View > Filters, and you can choose to ignore SVN directories, "useless Explorer files", etc.
Nathan Long
+9  A: 

No need for a script. As suggested, use the Export command:

  • Right click on the top level of your working copy.
  • Open the TortoiseSVN sub-menu
  • Select Export
  • Follow on screen dialogs.
antik
Voted up for the hokie logo (and the better answer) . Go Hokies :)
Doug T.
+3  A: 

But if you don't want to use svn export (for whatever reason)...

find /path/to/project/root -name '.svn' -type d -exec rm -rf '{}' \;
Sean Bright
+1  A: 

On a computer:

rsync -avz --exclude=".svn" /yourprojectwithsvninside/ /yourprojectwithoutsvninside/

From the repo:

svn export http://yourserver/svn/yourproject/ ./yourproject/

+1  A: 

public static: yes FileZilla has filename filtering. Look under View -> Filename Filters. I checked in v3.1.1

I think most FTP clients have it now.

Darryl Hein
A: 

Thanks Timgrin... the rsync approch was perfect!

Shai
A: 

Switch to git :D

Sry, couldn't resist ;)

John Grey