views:

30

answers:

2

Hi,

I am using SVN as repository. We have the structure of

Trunk
   Branch 1
   Branch 2
   .....

We used to merge the branches into Trunk only after the features are implemented and tested quite well. So it will be a stable working implementation. Branch 1 has its own features and implementation so do Branch 2..

Now Branch 1 has certain features which will be required by Branch 2 and vice versa.. So, what we will do is, merge those branches. Say for e.g merge Branch 2 -> Branch 1..

After resolving the conflicts, now the Branch 1 will be loaded with all the features from Branch 2. But to make the Branch 2 to be updated, now I copy all the Merged files from Branch 1 and replace the existing files.. Because a merge will result in conflicts that I already resolved for Branch 2 -> Branch 1 merging..

Is copying the only way or is there other any other standard approach available in SVN itself??

Also am used to Tortoise SVN client..

A: 

Create a new branch IL from trunk than merge branch-1 into IL and after that merge branch-2 to IL and finally merge IL into trunk...The conflicts have to solved and you shouldn't copy files, cause conflicts in steps are indication that there are some parts which have to be harmonized.

khmarbaise
+1  A: 

Ok so branch1 and branch2 are children of trunk (branched but hopefuly not residing INSIDE the trunk directory like your diagram shows?)

The two branches are unique and different from each other because not only they have different names but also different (new) code/changes.

Now you want branch1 to get all changes that branch2 received? And branch1 should get all changes from branch2?

You have to decide: Do you want continued separate development of your branches or do you want to reintegrate the work that has been done? You can not have both without cherrypicking.

If you succeed with what you tried and also what khmarbaise suggested in the end you would have multiple branches that have all the same content. Is that what you really want? Then merge down into the trunk and burry your branches.

If you want only certain features from branch1 and branch2 you should cherrypick merge them (select revisions you want manually).

See http://stackoverflow.com/questions/126320/subversion-cherry-picking for example

Christoph Strasen