SOReader
SOReader

Reputation: 51

SVN different trees merging

Let's say I have A: /A_Project/trunk/A and B: /B_Project/trunk/B in my SVN. I want to merge A with B and store it in B. I've used the 'merge two different trees' options in my TortoiseSVN GUI. Everything is fine except the final revision does not have change-log of the A tree!

The question is: how to merge two different trees and retain logs from both of them in the final revision?

Thanks for your help!

Upvotes: 5

Views: 4985

Answers (3)

Eddie
Eddie

Reputation: 10148

Honestly, my guess is that Tortoise is just creating a working copy of branch B, inserting the code from tree A, and merging as if that was just one massive coding excercise.

I don't believe SVN natively supports merging between projects because revision numbers (and hence the attached commit logs) would obvious conflict as both projects have revisions 1..n.

So I don't know if what your looking to do is possible.

For details on using the command line interface for merge I reccommend the Subversion bible:

http://svnbook.red-bean.com/en/1.5/svn.branchmerge.html

Upvotes: 5

Avi
Avi

Reputation: 20152

Subversion doesn't support merging two trees into a revision that preserves the history of both sides of the merge.

This is a pretty basic difference between the Subversion model and some other version control systems, such as Mercurial or Git.

Modern versions of Subversion can simulate this, with the mergeinfo property, but it isn't natively built in.

Upvotes: 0

jgifford25
jgifford25

Reputation: 2154

Because you did a merge (tree or file, doesn't matter), the history from A is not readily available for viewing. However, if you did this merge with a Subversion client supporting 1.5.x or newer and checked in the svn:merge-info properties, the history for A can be viewed. From the command line using the svn log command and the -g option you can see the history of a file or tree including paths that were merged in multiple times.

This can be done with TortoiseSVN as well. See this release note from the TortoiseSVN 1.5.x release on how to view the merge history with the regular history.

Upvotes: 0

Related Questions