tags:

views:

1763

answers:

3

We have been experimenting with a new technique to manage our release branches.

Generally, we maintain our current release on the trunk, and create release branches for each release. The release branch is where active development usually occurs, and the trunk is used for bug fixes on the current release.

We have been periodically merging the bug fixes from the trunk into the release branch (weekly).

Now that we are ready for another release, we would like to merge the release branch into the trunk. Unfortunately, this leads to many conflicts (> 50). At first I was surprised, but now I understand that Subversion cannot easily rectify the changes in the branch with what exists in the trunk.

Is there a way to tell Subversion to use all of the versions of the files in the branch when integrating back into the trunk? We know that the branch versions of files are 'correct'.

As an alternative, we could theoretically abandon the trunk and just work off of the branch(es) - branching from the branch for releases.

We use TortoiseSVN and Subclipse.

A: 

Maybe I'm missing something here, but it sounds like the easiest option would be to delete trunk and re-create it by branching from your newer release branch.

pix0r
This will lead to unexpected results when going back to an earlier revision of trunk, e.g. with "svn update -r 123". If you pass the trunk recreation point you'll end up with the old state of the branch instead of the trunk.
Wim Coenen
A: 

In theory you could do a "merge two different trees" from the head of trunk to the head of the branch. This should avoid any odd conflicts due to reintegrate.

Tom Hubbard
+3  A: 

From the output of svn help merge:

--accept ARG

specify automatic conflict resolution action ('postpone', 'base', 'mine-conflict', 'theirs-conflict', 'mine-full', 'theirs-full', 'edit', 'launch')

To accept the branch changes when merging to the trunk, you need the "--accept theirs-full" option.

I don't think TortoiseSVN 1.6.2 has an equivalent option in the GUI. You can still interactively resolve conflicts by selecting "use repository" as each conflict is encountered during the merge.

Wim Coenen