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

Re: Effects of merge on added files

From: Ben Collins-Sussman <sussman_at_collab.net>
Date: 2003-10-11 20:08:51 CEST

Eric Sammer <eric@ineoconcepts.com> writes:

> C. Michael Pilato wrote:
> > You want:
> > svn merge ./@HEAD ../dev_0_01@HEAD
>
> I can honestly say that I would have NEVER guessed this was it. To be
> honest, I find the merge syntax quite a bit convoluted. I'm sure this
> is merely a product of alpha status, but maybe something that requires
> a second glance.

No, this syntax is not a product of alpha status. And I'm ready to
debate anyone who thinks it's not perfectly precise and useful. :-)

Even Mike's suggestion up there is the wrong answer.

To merge a branch back into the trunk, you compare the *root* of the
branch with the *tip* of the branch, and merge the resulting diff into
a trunk working copy. By comparing the root and tip of the branch,
you're describing *only* those changes that took place on the branch.
That's what it means to "merge branch changes" into trunk.

If you compare the tips of branch and trunk, you're going to get a
diff that you don't want: you'll be specifying "all branch changes,
plus removal of all trunk changes that took place since the branch was
made."

There's even a whole section in chapter 4 that specifically addresses
this scenario:

  http://svnbook.red-bean.com/html-chunk/ch04s03.html#svn-ch4-sect-3.3

This is not a matter of confusing syntax; it's a matter of
understanding which trees to compare. The only way things can (and
will someday) get better, is the day Subversion automatically
remembers the revision in which a branch was created. At that point,
we can invent a new 'automerge' syntax (or something) that literally
looks something like "svn automerge branchURL wc", and means "merge
this branch into my working copy, you figure out what to do". But
until we develop such intelligent merging technology, you're stuck
having to understand exactly which trees to compare, and why. It's
not rocket science, honest. :-)

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Sat Oct 11 20:11:16 2003

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.