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

Re: merging back branch from trunk

From: Patrick Dean Rusk <PRusk_at_foliage.com>
Date: 2004-06-24 20:19:35 CEST

I shudder to contradict Ben, but I don't think his response is correct.

I recently did a lot of work in a Subversion branch that affected about 500
files of a 2500 file project that was actually stored in PVCS. Over the
three weeks I did branch work, I was careful to merge changes daily from the
PVCS trunk into my Subversion trunk and then into my Subversion branch. At
the end, all trunk changes were represented in the branch, as well as my own
changes.

Having done that, the final merge was a simple command to merge the HEAD of
my branch into the HEAD of trunk. In other words, leave off all revision
information entirely. That essentially replaces trunk with the contents from
the branch, which is what you want to do if you've been careful to
continually keep the branch up-to-date with trunk changes.

Chapter 4 of the Subversion book doesn't describe this scenario, but it
should consider doing so, because I think it likely that people will usually
follow the pattern of applying trunk changes to their branches before
bringing their branch back into trunk.

Patrick Rusk

"Ben Collins-Sussman" <sussman@collab.net> wrote in message
news:1088081394.12572.13.camel@localhost.localdomain...
> On Thu, 2004-06-24 at 04:58, Aymeric Alibert wrote:
> > In our environment, we currently work with a trunk and 2 branches.
> > As development in the trunk is getting more stable, we synchronize the
> > 2 branches with the latest changes from the trunk. We did that many
> > times.
> > Now, we want to merge all the changes from branch1 back to the trunk.
> >
> > Can we do a 'regular' merge between branch1 and the trunk?
> > Or do we have to be worried about the 'synchronization merges' we did
> > previously and need to exclude them from the merge?
>
> Yes, you need to be worried about repeating the merges. Look at this
> part of chapter 4:
>
> http://svnbook.red-bean.com/svnbook/ch04s03.html#svn-ch-4-sect-3.2
>
> When merging the branch back to the trunk, you need to make sure to
> exclude revisions that trunk already has. (Hopefully you've been
> writing good commit messages in your branch that describe exactly which
> revisions have been ported from trunk to branch, as the book describes.)

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Thu Jun 24 20:21:14 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.