monotone-devel
[Top][All Lists]
Advanced

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

Re: ambiguous clean (was Re: [Monotone-devel] Re: [cdv-devel] more mergi


From: Bram Cohen
Subject: Re: ambiguous clean (was Re: [Monotone-devel] Re: [cdv-devel] more merging stuff (bit long...))
Date: Thu, 11 Aug 2005 13:44:10 -0700 (PDT)

Nathaniel Smith wrote:

>
>     a
>    / \
>   b   c
>   |\ /|
>   | X |
>   |/ \|
>   b   c
>   |\ /
>   | c   <-- ambiguous clean merge
>   | |
>   b |
>   \ /
>    ?    <-- another ambiguous clean merge!

In that case, c should win, because although b beat c, c beat b's beating
of c, therefore c wins.

The problem with ambiguous clean isn't that both sides should lose, it's
that both sides should win. In a normal conflict b and c have never seen
each other. In an 'ambiguous' conflict both sides have seen each other and
beaten the other one. So it really is affirmative on both sides.

Here's another fun one, based on implicit undo:

    a
   / \
  a   b
  |\ /|
  | X |
  |/ \|
  a   b
  |\ /|
  | X |
  |/ \|
  a   b
  |\ /|
  | X |
  |/ \|
  a   b

In this case, which side wins depends on whether the number of layers is
even or odd. That answer is actually obvious if you phrase it as 'the
winner is the side which wasn't manually altered'. In the above diagram,
alternating sides at each layer were altered, but that information isn't
included in the diagram, so the confusing thing is the diagram, not the
algorithm.

> On the other hand, it was partly an exercise in seeing if it was
> possible to make something that rigorous at _all_, and has the
> simplest possible user model I could think of.  So I definitely agree
> there's room for improvement!

Yes, it's a step in the right direction, but we want (well, I want) to
pass all of these cases:

   a
  / \
 d   b
  \ / \
   b   c

c wins

   a
  / \
 |   b
 |   |
 b   a

b wins (implicit undo)

   a
  / \
 |   b
 |   |
 b   c

c wins (convergence)

I've become convinced that convergence is a great idea, because if you
support it properly you magically get cherry-picking support for free,
with no special support for it in the history.

-Bram

>
> -- Nathaniel
>
> --
> Details are all that matters; God dwells there, and you never get to
> see Him if you don't struggle to get them right. -- Stephen Jay Gould
> _______________________________________________
> Codeville-devel mailing list
> address@hidden
> http://mail.off.net/mailman/listinfo/codeville-devel
>





reply via email to

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