tags:

views:

96

answers:

3

What's the best way to merge the branch back into the trunk? I assume do an SVN merge to your working copy, merge the changes and check back in? So I'd merge FROM the mainline TO my branch?

A: 

Get an up-to-date working copy of trunk and merge your branch into it, make sure it isn't broken, then commit.

GraemeF
A: 

I usually do the following:

  1. merge: trunk -> branch; commit
  2. merge: branch -> trunk; commit

This ensures that your branch contains all the most up-to-date changes in trunk and that when you merge your branch back into the trunk, you don't accidentally clobber changes made in the trunk since the last merge.

Since Subversion does not track merges very well, I usually enforce the following commenting scheme:

"$PROJECT_NAME - merge: $BRANCHNAME -> trunk"

or

"$PROJECT_NAME - merge: trunk -> $BRANCHNAME"

jkndrkn
what if the trunk has not had any recent changes since you branched. THen all you have to do is remerge your branch into mainline trunk right? So would I do a switch for this or just a merge?
CoffeeAddict
A: 

I usually check out the head revision of the trunk, merge it with the head revision of the branch and then commit

zeocrash
fing worked like a charm!!!! http://weblogs.asp.net/bsimser/archive/2008/05/06/day-to-day-with-subversion.aspx
CoffeeAddict