Tip for a SVN project

Ok, this is the scenario:

There is a huge project hosted on a SVN repo. I’m to start a new project based on that one… No, I’m not allowed to create a new branch. And I must upload this project to a new SVN repo.

So checking out the project is easy. Now that I have the project in my Mac I want to be able to check it into the new SVN repo, the only thing is that when I checked out the project it downloaded to mi machine with a whole bunch of “.svn” folders.

Now, there are 2 different ways to get a clean copy of a project from a repo.

1. Do an export instead of a checkout, this will give you a project copy without the annoying “.svn” folders.

2. Do a regular checkout and then delete all the “.svn” folders.

On my humble opinion it’s better to do an export. If you do a checkout you can delete the “.svn” folders manually but be aware if you have lots of folders because an “.svn” folder will be created within each of your project’s folder so if you have a project with 10 folders and each one with two subfolders you’ll have to go into each f them to delete the “.svn” folders manually… it’s easy but it might take a lot of time and resources you might not have.

To speed up things it’s better to do the following:

Go to your project’s folder and run the following command:

find . -name ".svn" -type d -exec rm -rf {} \;

It will search for all directories called “.svn” and delete them as well as it’s contents.
I found this to be very useful and I really use it frequently but I keep forgetting it so I’m posting it here 😀

Tags:

Comments are closed.