views:

1212

answers:

2

Let us say I have a trunk and I create a branch (branch A) of it on Sunday making Revision 10.

On Monday I work on both branch A and the trunk (branch A is responsible for Revision 11,12,& 15 while trunk is responsible from 13, 14, & 16).

Tuesday I created a new branch (branch B) from the trunk (Revision 17).

Wednesday I work on both branch A and branch B (branch A is responsible for Revision 18-24, & 26 while branch B is responsible for Revisions 25 & 27).

On Thursday I delete the old trunk and replace it with branch B (not merge, just delete trunk, and copy branch B to trunk)(Revision 28).

If on Friday I want to merge the new trunk into branch A, how would I do that? I would want all changes that were made to the various trunks and branch B into branch A. What revision numbers would I use?

Any help would be greatly appreciated!

A: 

If you are using a new version of Subversion (1.5 or newer), you shouldn't need to worry about revision #s ... it should handle the merge for you.

Jess
I am using 1.6. I am presented with 3 merging options: Merge a range of revisions, Reintegrate a branch, and Merge 2 different trees. Which one should I pick?
Dan Appleyard
nearly always, use the top one - merge range of revisions. The other two are special case - read the Tortoise docs for details.
gbjbaanb
+2  A: 
  1. navigate to the working copy of branch A, i.e. your merge target
  2. Right-click the root folder of the working copy, click the TortoiseSVN merge menu item, select "merge a range of revisions"
  3. Enter the trunk URL as the URL to merge from; leave the "list of revisions" text box empty
  4. Hit "Next" and "Merge". Subversion will automatically determine which revisions are eligible for merging.
  5. Resolve any conflicts if necessary. Review the modifications made to your working copy by the merge. Test!
  6. Commit

Please note that a sane work-flow shouldn't involve deleting and recreating the trunk. I've never done that.

Wim Coenen
Tell me about it, not my decision though. I will try this Monday and see how it goes...
Dan Appleyard