[ANN] Monticello Versioning

Julian Fitzell julian at beta4.com
Wed Jul 23 17:39:38 UTC 2003


Colin Putney wrote:
> 
> On Wednesday, July 23, 2003, at 08:54  AM, Julian Fitzell wrote:
> 
>> Yes, I was just thinking the other day that we needed to add the 
>> ability to create a change set as a diff between two versions... 
>> unless it's already there.  Can't be too hard to do, I don't think.
> 
> 
> Yeah, not too hard. We already diff two snapshots to produce a patch. 
> Given a patch, it's a Small Matter of Programming to turn it into a 
> ChangeSet.
> 
> More useful though, would be to create a file format for Monticello 
> patches, one which includes its ancestry in the same way that a Version 
> records a snapshot's ancestry. That way we can safely apply the patch to 
> arbitrary versions of a package.

Colin and I just talked about this.  I'm not sure if we were in complete 
agreement but we nearly were so I'll express my opinion in public here :)

I don't think MC needs a custom patch format.  Changesets are perfect 
non-declarative patch files already.  It would be nice to include the 
version they were made against (or between) in a comment at the 
beginning or something, just so you can go back and look at it if you 
like.  But I don't think it's actually of much use to MC because the 
file format is non-declaritive, so it won't be able to look for 
conflicts, etc. anyway.

I think MC needs to be able to generate a fileout from any version 
(already possible) and a changeset between any two versions.  This 
allows a complete escape route for someone who wants to stop using MC as 
well as some ability to work with someone else who isn't using MC. 
Generating changesets would also be useful if you were using, for 
example, a custom update stream to update a server image.  I would call 
this an advanced feature and it would definitely not be part of the 
normal use cases of developing with Monticello.

Now, the only real case where you would want to use changesets while 
working *within* Monticello (as opposed to sending them outside of the 
system) is a branch picture like the following:

   B-----C-----D
  /
A
  \
   B'----C'----D'----E'----F'

Now say that we want to get rid of the lower branch because we didn't 
like the direction it went in.  But we actually still want the changes 
made in E'.  In CVS, you would make a diff between D' and E' and apply 
it to D.  But we can actually do this internally (SVN does this) by 
using a 4-way merge algorithm which specifies that we merge the 
differences between D' and E' into D using A as the common ancestor.  So 
I think if we implement a 4-way merge in MC, then there really should be 
no need for changesets when working within the system.

That said, I still think we should be able to make changesets between 
versions for the use cases where you need to go outside of the system.

Julian



More information about the Squeak-dev mailing list