Replacing main line with a branch line

Hello I am trying to figure out how to replace my main line with one of the branches in my project, I took someone’s suggestion and used Tortoise SVN to switch the contents of the branch folder and the trunk folder and this seems to work on a small test project I created. I also made a couple of changes to both lines and was able to commit those changes without any problems. My concern is with conflicts I may have and if anyone with changes in a working copy of the original trunk will have a conflict? Is there anything else I should take into consideration, and is there any way I can use the modeler or a simpler approach to accomplishing this?
2 answers

After you have created a branch and made changes there, you can merge the entire branch back to the main line, essentially replacing the main line contents by the branch contents if the branch line is up to date with the main line. This can be accomplished using the menu item 'Team > Merge changes here...', choosing 'Merge feature branch' and the selecting the branch. This results in merging all changes made on the branch back into the main line.

If this is for some reason not possible and you still want to "overwrite" the main line with your branch, you can just check out both the main line and the branch locally, then overwrite all the files in the main line project directory by those of the branch (except for the .svn directory) and then commit using the Modeler. Be sure to reopen the main line project in the Modeler after overwriting the files.

In both cases, you will be doing a normal commit on the main line (although there might be lots of changes), so there is no difference in that respect.


Does this work when reverting versions? E.g. The main line is 9.24.3, the branch is 9.24.2. The first option does merge the content but the project stays in 9.24.3. I tried the second option but opening the model in 9.24.2 after copy/pasting still tells me that the version was committed in a higher version and this action isn't allowed. Moreover, I'm working with git so there isn't a .svn folder. Therefore, I've overwritten everything except for git.