Squeak
  links to this page:    
View this PageEdit this PageUploads to this PageHistory of this PageTop of the SwikiRecent ChangesSearch the SwikiHelp Guide
Summary: Monticello 2
Last updated at 2:03 pm UTC on 4 July 2007
Wiki pages maintained by Damien Cassou


Introduction

What problem is being addressed


Monticello 2 addresses the problems we encountered with Monticello 1. They mostly stem from a common cause: its unit of versioning, the package, is too coarse for many situations that arise in normal development.

How it solves the problem


In Monticello 2, the unit of versioning is individual program elements - classes, methods, instance variables, etc. This means that Monticello 2 can be used to version arbitrary snippets of code. These might correspond to packages, change sets, or any other method a programmer chooses to separate "interesting" code from the rest of the image.

What's cool about it


MC2 is much simpler than most versioning systems, but still quite powerful.

Documentation

Static Design

Dynamic Design

Thoughts

Active Blog

Installation

The currently active repository is http://www.squeaksource.com/Monticello2/. Please first load Monticello2 then MC2-Squeak.

Pieces of code

Committing a PackageInfo to a file-based repository

"Commit a PackageInfo in a file-based repository"
packageSlice := MDPackageInfoSlice named: 'Test'.
packageSlice saveFrom: MDWorkingCopy default toFileNamed: 'myRepos'.


Committing a slice

packageSlice := MDExplicitSlice named: 'mySlice'.
packageSlice addElement: (MDMethodElement className: #MDExplicitSlice  selector: #truc).
packageSlice saveFrom: MDWorkingCopy default toFileNamed: 'myRepos'.



Loading a slice

repository := MDFileRepository
                named: 'myRepos'
                do: [:repos | |memo snapshot versions|
                         memo := repos memos detect: [:each | each sliceName = 'mySlice'].
                         snapshot := memo getSnapshotFrom: repos.
                         versions := snapshot getVersionsFrom: repos.
                         versions do: [:version | MDWorkingCopy default loadVersion: version]
].



Back to New Modules