[ANN] Monticello Versioning

Colin Putney cputney at wiresong.ca
Wed Jul 23 20:09:25 UTC 2003


On Wednesday, July 23, 2003, at 12:36  PM, Avi Bryant wrote:

> The way Monticello currently does a three-way merge is by combining
> two patches - so, for example, if you have
>
>   B
>  /
> A
>  \
>   B'
>
> and you want to produce C by merging B and B', you take the patches 
> (B-A)
> and (B'-A) and combine them (possibly resolving conflicts in the 
> process)
> into the patch (C-A).  You then apply (C-A) to A and get C.
>
> Now, your 4-way case probably isn't as simple as combining the patches
> (E'-D') and (D-A), and then applying the resulting patch to A - or is 
> it?
> What are the cases where that wouldn't work?  (As you can see, I'm
> still being lazy).

Yup, I think it is that simple. The one caveat is that it's possible to 
produce an inconsistent snapshot (ie, one with unfulfilled 
dependencies), which you can't do with a three way merge.

Let's say that (C'-B') added a class, and (E'-D') added a method on 
that class. If you apply (D-A) and (E'-D') to A, you end up with the 
method, but not the class. That's semantically correct, in that it is 
what you asked for, but you can't actually load it into the image.

Colin



More information about the Squeak-dev mailing list