Copy a Project in SVN

svn

I am new to SVN, and I am trying to copy an existing project(just the trunk) and create a new project in the same repository. We are creating the same application for a different audience, so I would like to copy the existing code base and create this new code base. I didn't want to branch/tag as these are going to be completely different projects from now onwards – and I am not interested in preserving the history etc.,

This is what I was planning to do, but this looks like lot of Checkout/Commit, so wondering is there any other simple way.

  1. Export the trunk of existing project (lets say 'Project1') from SVN to my new project(lets say Project2) folder at C:\inetpub\wwwroot\Project2
  2. Create a new project in SVN called 'Project2' and import all the files from my C:\inetpub\wwwroot\Project2 to its trunk
  3. Again Checkout from SVN's Project2 to my local machine(C:\inetpub\wwwroot\Project2 folder)

The Project1 folder is huge(~400 mb), so this would take a long time. Is there any other alternate?

I am able to right click on the trunk folder of Project1 in Tortoise SVN's repo browser and choose 'Copy to' and specify Project2's trunk folder, and it copied all the files. This way I just have to checkout once to my machine and everything is ready.

But I am not sure about whether it is right or the consequences behind it. Any help would be appreciated.

Best Answer

A branch or a tag in subversion is basically a copy operation anyways, it just goes into a different folder by convention.

You can simply use svn copy

It's a quick and simple way, especially if you have a large repo. You will preserve history, but this is a good thing.