views:

70

answers:

1

Hello, I created a new branch to do some (breaking) work while the other developer kept chugging along working on trunk. Well, now that I got this branch done and ready to merge, I'm having trouble.

I am using TortoiseSVN. I did the "merge two separate trees" and what is appears to do is just copy all my changes from the branch into trunk without doing any merging or any respect to what changes were made in trunk.

How can I force it to keep the old trunk changes and merge in the branch rather than just completely overwriting trunk?

In case you don't understand, I have a file named Grid.cs and a lot of work was done to it in the trunk so the branch's copy is really out of date. Well, when I go to merge it will replace the trunk's copy with the branch's copy without trying to merge them or anything as if the branch's copy is newer, though it is not.

A: 

Oops, didn't read enough documentation.. at http://tortoisesvn.net/docs/release/TortoiseSVN_en/tsvn-dug-merge.html

Feature Branch Maintenance

When you develop a new feature on a separate branch it is a good idea to work out a policy for re-integration when the feature is complete. If other work is going on in trunk at the same time you may find that the differences become significant over time, and merging back becomes a nightmare.

If the feature is relatively simple and development will not take long then you can adopt a simple approach, which is to keep the branch entirely separate until the feature is complete, then merge the branch changes back into trunk. In the merge wizard this would be a simple Merge a range of revisions, with the revision range being the revision span of the branch.

If the feature is going to take longer and you need to account for changes in trunk, then you need to keep the branch synchronised. This simply means that periodically you merge trunk changes into the branch, so that the branch contains all the trunk changes plus the new feature. The synchronisation process uses Merge a range of revisions. When the feature is complete then you can merge it back to trunk using either Reintegrate a branch or Merge two different trees.

Earlz