[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-08 22:44:55 CEST

William Uther wrote:
[snip]

> svn log myFile # in my random format
>
> ----------
> Rev 4: * merged from branch blah
> ----------
> Rev 1: * original stuff
> ----------
>
> svn log myOtherFile # in my random format
>
> ----------
> Rev 4: * merged from branch blah
> ----------
> Rev 3: * changes on branch
> ----------
>
> Note that the log for myOtherFile includes the logs messages from the
> branch, whereas the log for myFile does not.
>
> I think the reason is that copy-with-history is NOT what you want here
> (although it is a good approximation). What you really want are those
> post-1.0 merge properties telling that help diff figure out repeated
> merges. They give merge history (solving the diff problem that
> prompted this discussion) without log history (which merges shouldn't
> touch - or at least should be consistent about).

No, this is _exactly_ what should be happening. Consider how the two
nodes' lifelines look:

       TRUNK BRANCH

(1) -->(X) -- add myFile (X)
        |
        |
(2) --> +-----\ -- copy to branch
        | \---->+
        | |
(3) --> | | (Y) -- add myOtherFlle (Y) on branch
        | | |
        | ......+ |
(4) --> +<..... /-----+ -- merge to trunk
        | +<----/ | |
        | | | |
        . . . .
        . . . .
        . . . .

(Dashed lines represent a node's history, dotted lines represent merge
direction)

 From revision 2 onward, X's history has two forks, one on the trunk and
one on the branch. Y did not exist until revision 3, but was added on
the branch, not the trunk. When you merge X and Y to the trunk, you
don't want to create a new fork on X's history (because it already has
one on the trunk); you do want to fork Y's history, though.

"svn log" just follows the history line backwards in time, That's why
"svn log trunk" shows changes to Y on the branch. Conversely, "svn log
branch" would show changes to X on the trunk.

Once we start recording merge sources (the dotted line), "svn log" could
be taught to optinally show all versions on all branches that
contributed to a file's contents.

-- 
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 Thu Aug 8 22:45:57 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.