开发者

How to check in a second version of a project in a Subversion repo?

开发者 https://www.devze.com 2023-01-04 20:42 出处:网络
I have a project that I\'ve checked into my SVN repo. Now I\'ve created a second version of the project located in a different folder. I want to check this folder in as well, without interfering with

I have a project that I've checked into my SVN repo. Now I've created a second version of the project located in a different folder. I want to check this folder in as well, without interfering with the original project. Looking at my repo, it doesn't look as though I have the typical trunk/branches/tags folders, for whatever reason. So,

  1. How do I move the original project into a subfolder, like trunk?
  2. How 开发者_如何学编程can I create a folder for, and check all the v2 files into a new folder like branches/v2
  3. When I want v2 to replace the trunk completely, how can I do that?

SVN has caused me all sorts of nightmares in the past, so I want to make sure I do this correctly.


You have to make the trunk/branches/tags folders yourself.

  1. svn mv original trunk (where original is your original code folder, you might have multiple files).
  2. Just create this new folder in your original checkout, and move the v2 files into it. Add them using svn add.
  3. Read about joining branches in the SVN book (or somewhere else) and join the v2 branch into trunk.


How do I move the original project into a subfolder, like trunk?

  1. Check out the first repository to my_rep
  2. Create trunk, branches, tags sub folders in my_rep
  3. Copy files from my_rep to my_rep/trunk manually
  4. Delete files in my_rep (using svn delete!)
  5. Commit changes in my_rep - Now you have trunk

How can I create a folder for, and check all the v2 files into a new folder like branches/v2?

  1. Checkout the second repository to my_rep2
  2. Create folder my_rep/branches/v2 and copy manually files from my_rep2 there
  3. Commit my_rep - Now you have one branch in my_rep

When I want v2 to replace the trunk completely, how can I do that?

You need to merge my_rep/branches/v2 to my_rep/trunk using any diff tool.

0

精彩评论

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

关注公众号