[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Merging Branches

From: Russ Brown <subversion_at_dot4dot.plus.com>
Date: 2004-09-03 16:11:05 CEST


My company is considering switching from CVS to Subversion, so I'm
currently evaluating Subversion by using it at home for personal projects.

In particular we're interested in the branching capabilities, so although
there's only me involved at the moment I've been using branches for the
larger bits of work I'm doing so I can get a feel for how it works.

So far I've successfully done things like this:

1. Create branch at revision 12.
2. Work on branch.
3. Merge branch into trunk.

I'm also happy with the situation where I do more work on the branch and
merge the branch into the trunk again: no problems there.

The problem I have right now is a situation where I've been doing a rather
larger bit of work on a branch, and along the way I've made some smaller
fixes on the trunk. Because these have been important fixes I've merged
the trunk into the branch after committing these changes to trunk so my
branch can be developed with these fixes already in place.

That's all been fine, and I've done this about 3 times (on one occasion
the additional work was done on another branch, merged into trunk and then
merged into my 'big branch'). The problem is that I'm now in a situation
where the work on the branch is finished and I want to merge it into the
trunk .The thing that confuses me is that he branch now contains changes
that are already in the trunk, which for me could confuse Subversion and
cause a horrible mess.

The way I see it, there are two possible ways in which this should work:

1. Merge the revisions between the revisions that were merged from trunk
to branch, so I've have to do a sequence of merges to get it to work. For
example, if I merged trunk to branch at revisions 10, 15 and 20 (with the
branch created at 5), I'd have to merge something like 6:9, 11:14, 16:19,
2. Merge all revisions of the branch from the time the branch was created
(or the last time it was merged to trunk if that is the case) right
through to head. (i.e. 6:HEAD).

1. seems like a lot of work to me, and 2 'feels' like it will break. So is
there another method I'm missing or is one of these the Right Way?

Thanks for your time.

Russell Brown
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Fri Sep 3 16:13:33 2004

This is an archived mail posted to the Subversion Users mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.