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

Re: merge should copy-with-history

From: Branko ╚ibej <brane_at_xbc.nu>
Date: 2002-08-12 02:30:14 CEST

Nuutti Kotivuori wrote:

>William Uther wrote:
>>On Thursday, August 8, 2002, at 04:44 PM, Branko ╚ibej wrote:
>>>No, this is _exactly_ what should be happening.
>>I'm still not convinced.
>Well - I made an example of exactly what happens now - and why _I_
>think it's wrong. This is just to make it clear to everyone what is so
>wrong about this the behaviour brane is talking about, in my opinion.
>But either way, you are the guys who write CVS books and everything,
>not me - I'm quite sure you know better what's best for me than me :)
Sure I do. :-)

What both of you (Nuuti and William) are missing is the following
horrible scenario (which, to make things more interesting, happened to
me while merging and testing the delta combiner changes -- I had to
carefully check the WC and do some manual patching because of that).

How it worked before:

   1. Initial state of trunk:
      $ svn add trunk/foo; svn ci

   2. Make changes on a branch:
      $ svn cp trunk branch; svn ci branch
      ## more changes on branch...

   3. Add a file to trunk
      $ svn add trunk/bar; svn ci

   4. Merge changes from trunk to branch
      $svn merge trunk branch
      ## bar gets added (without history) to branch
      ## more changes on branch ...

   5. Merge changes from branch to trunk:
      $ svn merge branch trunk

Hear that loud *BANG*? What just happened is that "svn merge" found that
branch/bar is unrelated to trunk/bar, so trunk/bar gets _replaced_ by,
not merged with, branch/bar. So, instead of getting too many log
messages, you get too few -- tunk/bar's history starts at the merge
point, and you wonder why...

The same would happen at every merge between trunk and branch, in either
direction. You are in a twisty maze of short histories, all useless.
Just recording merge history won't help, because while that would tell
SVN that the files' contents are related, it says nothing about the
files (node revisions) themselves.

Also, remember that "svn merge branch trunk" is a _directory_ merge.
Directory merges are about node revisions, not entry names, so (again)
the current behaviour makes sense.

Brane ╚ibej   <brane_at_xbc.nu>   http://www.xbc.nu/brane/
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Mon Aug 12 02:30:46 2002

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

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