monotone-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Monotone-devel] Re: 3-way merge considered harmful


From: Nathaniel Smith
Subject: Re: [Monotone-devel] Re: 3-way merge considered harmful
Date: Mon, 2 May 2005 23:28:23 -0700
User-agent: Mutt/1.5.9i

On Tue, May 03, 2005 at 08:11:09AM +0200, Richard Levitte - VMS Whacker wrote:
> For me, it became clear what happens the first time you told us.  What
> you're basically telling us is that in a merge, where the common
> ancestor is farther away than the nearest fork, monotone loses track
> of file rearrangement (rename and delete) information.  If a merge is
> only based on file content changes between each merge source and the
> common ancestor, this is not really surprising, as there's no way to
> encode file rearrangement (except for added files) information in a
> diff (as far as I understand you, the A->C and A->D changesets are
> basically viewed as diffs), as far as I know.
> 
> Is what I'm saying so far correct?  If not, what would be the
> explanation for 'suddenly, it looks like "foo" was _added_, not
> deleted'?  It looks very much like file rearrangement history was lost
> on the way.

You're making a leap that's a little unjustified.  Monotone does
represent, store, and make use of file rearrangement information
between arbitrarily distant revisions.  The A->C and A->D changesets
are not "basically viewed as diffs" at all; they use the same powerful
changeset representation as the rest of monotone.

OTOH, it's not actually wrong to say that history was lost; the
problem is that looking at only 3 points in history turns out to just
not work.

> So, the way I see it, we need to figure out a way for monotone to keep
> track of file rearrangements that happen along the way (i.e. the
> delete that happens on the B->C edge).  It's possible cdv-merge is the
> way to go, but as far as I understand, it isn't quite finished yet...

cdv-merge is finished as far as single-line files go :-).  The part
that may need working out is how to figure out which files in the left
and right manifest are actually "the same file".

> And I'm not yet convinced codifying rearrangement in a virtual file is
> such a bad thing.

Well, depends on what you want to do with it.  I mean, change_set's
are exactly this, in some sense.  If you want it to be a solution to
the merging problem, though, I think you're, well, doomed :-)

-- Nathaniel

-- 
"But in Middle-earth, the distinct accusative case disappeared from
the speech of the Noldor (such things happen when you are busy
fighting Orcs, Balrogs, and Dragons)."




reply via email to

[Prev in Thread] Current Thread [Next in Thread]