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

Re: [PROPOSAL] Merging Improved

From: Branko Čibej <brane_at_xbc.nu>
Date: 2003-04-13 04:08:21 CEST

Tom Lord wrote:

> > From: =?UTF-8?B?QnJhbmtvIMSMaWJlag==?= <brane@xbc.nu>
>
> > Ah, I think I see the difficulty. The merge source *would* be
> > recorded in the second case, because accepting or rejecting
> > changes isn't part of the automated merge algorithm, it's part
> > of merge auditing/conflict resolution, something which cannot be
> > automated.
>
>
>So, I'm looking at some file, and I want to know "Has B:x-y" been
>merged into this file?"
>
>And, the properties on this file won't tell me?
>
>To really get the answer, I need some command that crawls over
>revisions x-y, finds out if the file changed in B, _then_ looks at the
>properties of my copy?
>
>Yuck.
>

:-)

There are two issues here: a) what the merge algorithm needs to work
correctly, and b) what the *user* wants to know about merge history. And
probably c) what's optimal.

If a file did not change during a merge, then we don't have to record
the merge source to satisfy a). We *might* want to record the merge
source to satisfy b). And c) is a tricky issue, given how Subversion's
storage model works.

Imagine the following: I have branches A and B, where B was created from
A. Now I change some files on A, and some on B. Every change on B causes
a lazy copy of the changed files and their parent directories. Then I
merge A to B, changing some files, but leaving most unchanged. Now, if I
record the merge source on the unchanged files to satisfy b), then I
have to lazily copy *all* the files to the branch; this makes the cost
of the merge (or rather, the cost of the commit after the merge)
proportional to the size of the tree, not the size of the changes. And
that's not good at all.

In fact, that's true even without taking the specifics of Subversion's
storage model into account. On the other hand, *not* recording the merge
data doesn't make later merges much more expensive; all the data
required to perform the merge can still be gathered in a single tree
delta report. From the performance viewpoint, it would only make sense
to record the merge point for unchanged files (by default) if the file
changed in the same way on both branches.

-- 
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 Sun Apr 13 04:09:04 2003

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.