subversion merge back to trunk
I set up a branch several weeks ago. When some changes were made to the trunk, SVN was committing to the branch, and not the trunk. The changes were minor and applicable to the branc开发者_如何学Pythonh anyway, so I assumed this is how the branch should work.
Now that the branch work is finished, I merged back the branch back to my working trunk, assuming SVN would replace the old trunk with the new branch in the repository as well. That is not the case though. My repository trunk is out of date.
I would like to make the repository trunk be same as the branch and then delete the branch.
How can I do this?
Cheers,
BerrylNote: I am using tortoise / visualvsn client.
I would like to make the repository trunk be same as the branch and then delete the branch.
By the description you gave it sounds like what you really want is to use the branch as your new trunk and get rid of trunk.
svn rm ^/trunk
svn mv ^/branches/your_branch ^/trunk
This is the most straight forward to do this. I don't know the gui menu controls for this in tortoise, but you can probably just get away with doing these things in your working copy instead of using URLs to go straight to the server (note: ^ is shorthand in SVN for the repository root).
In the future, what you should be doing is constantly merging changes to trunk in to your branch and then using svn merge --reintegrate
to complete the merge back in to trunk once you are done with your work - details are here http://svnbook.red-bean.com/en/1.5/svn-book.html#svn.branchemerge.basicmerging.stayinsync
As a quick soapbox aside, it would behoove you to learn how to do these things via the CLI, then use what you've learned in TortoiseSVN to do them faster and with more tooling.
After you merge the branch to your working copy of your trunk, you must commit the changes for them to show up in the trunk repository. This is intended. It gives you an opportunity to review your changes before you commit them.
精彩评论