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

Re: Confusion over the 3 merge forms

From: Stefan Haller <haller_at_ableton.com>
Date: 2004-11-19 19:30:58 CET

Ben Collins-Sussman <sussman@collab.net> wrote:

> For example, I'm working on a 'locking' branch right now. In order to
> keep it sync'd with ongoing trunk changes, every week or so I run 'svn
> merge -rX:Y trunkURL' into my branch working-copy, then commit.
> Eventually I'm going to want to merge my branch changes back into the
> trunk. At that moment, my branch already be a combination of all trunk
> changes and all branch changes, so my final merge command will be
> $ svn checkout trunkURL trunk; cd trunk
> $ svn merge trunkURL branchURL
> By comparing trunk directly with the branch, I'll get a patch that
> describes just the branch changes.

Uhm. I am confident that you probably know what you are doing, but I'd
like to warn people that this exact recipe is dangerous: if someone
manages to commit things to the trunk between your last merge of the
trunk into your branch and the final merge back, then you are going to
revert those changes.

To avoid that, the last command should be

  $ svn merge trunkURL@Y branchURL

where Y comes from the last 'svn merge -rX:Y trunkURL' into your branch.

Stefan Haller
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Fri Nov 19 19:31:41 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.