开发者

Copy a Project in SVN

开发者 https://www.devze.com 2022-12-12 13:57 出处:网络
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

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 re开发者_JAVA技巧ady.

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


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.


svn cp http://yoursvnserver/svn/Project1 http://yoursvnserver/svn/Project2


Assuming both projects are in the same repository, copy will work fine - subversion doesn't really see files in a repository as anything beyond files/directories - "trunk" is really just a directory with a certain name, it's not a special item or anything.


Why not just copy it in svn? It will be almost instant and will save a lot of disk space on the server. It will give you the history but if that doesn't interest you then just don't read it.

0

精彩评论

暂无评论...
验证码 换一张
取 消