public static
public static

Reputation: 12990

Removing .svn folders from project for deployment

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?

Upvotes: 15

Views: 9164

Answers (9)

Doug T.
Doug T.

Reputation: 65599

Use

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

It gets just the source, nothing else. Look in svn export (in Version Control with Subversion) for more information.

Upvotes: 29

Guillermo Ruffino
Guillermo Ruffino

Reputation: 3020

Windows Vista / 7: turn on view hidden folders and files. In the search box (top right in a Windows Explorer window), write .svn. All .svn folders will show at top, delete them all and turn hide files back on.

Upvotes: 0

Timgrin
Timgrin

Reputation:

On a computer:

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

From the repository:

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

Upvotes: 3

Darryl Hein
Darryl Hein

Reputation: 144967

TortoiseSVN has an export function. This will create the entire SVN tree elsewhere without the .svn folders.

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

Upvotes: 23

Darryl Hein
Darryl Hein

Reputation: 144967

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.

Upvotes: 0

Sean Bright
Sean Bright

Reputation: 120644

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 '{}' \;

Upvotes: 8

antik
antik

Reputation: 5330

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.

Upvotes: 10

Geoff
Geoff

Reputation: 3769

Use the export feature.

Upvotes: -1

nobody
nobody

Reputation: 20173

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

Upvotes: -1

Related Questions