How SVN merges two branches, where the same folder is added to both branches

I have two different branches. trunk and private compartment. The same folder was added to both branches at different times. Now I want to merge my changes back into the trunk, but the folder already exists. For example (Merge personalDevBranch => trunk)

ADDED rev 123 /trunk/foo/bar.cs ADDED rev 120 /branches/personalDevBranch/foo/baz.cs 

I use TortoiseSVN and it raises the conflict. But this will allow me to save the local directory. When I do this, it does not pick up the baz.cs file, which I would suggest should be shown as a new file to add.

+6
source share
2 answers

The SVN team recommends fixing the file manually - in this case you will have to choose your version of the folder that would merge your .cs bazaar, but this will effectively remove bar.cs as you rewrite the contents of the folder with a merge.

Tree conflicts are the biggest (possibly the only) problem with SVN merging. You think that your case (2 people adding the same folder) would be easy to merge, but this is not always the case, especially with renamed files.

+4
source

I ran into this problem a while ago. As far as I remember, I designated the conflict in TortoiseSVN as resolved and combined this part manually . The lesson I learned is to avoid situations as much as possible. Therefore, in your case, just copy baz.cs to your folder.

+2
source

Source: https://habr.com/ru/post/957479/


All Articles