Versioning with Monticello
Last updated at 9:28 am UTC on 28 February 2017
Create a package:
- Bring up the Monticello Browser (either through the open menu, or with "MCWorkingCopyBrowser open").
- Click the "+Package" button.
- Enter the package name (this should conform to the PackageInfo conventions - roughly, it should be the name of a system category).
Save a package:
- Select your package from the Monticello Browser lefthand column.
- Select a repository in the righthand column. If there isn't one, click the "+Repository" button and choose the kind of repository you want. You probably want to choose "directory", then pick a location in your filesystem. You can also choose "cache", which just saves versions locally in your image, or "HTTP", which saves to a PUT-capable URL (like a WebDAV server).
- Click the Save button.
- You will be prompted to name the version, and then for a message for the version log.
- A version file (.mcz) will be saved into the repository directory.
- Go through the save a package steps above.
- When the commit log dialoge window opens (the window where you enter your comments for this change) edit the version number to reflect the branch.
- As an example if your package name and current version is this-package.23 and you are looking to create a branch here then edit the name to be this-package.23.1. Descendants of that version will be called 23.2, 23.3, etc, by default.
Load a package:
- Use a FileList to find the .mcz file for the package you wish to load and press the Load button. Alternatively, press Open to examine the package version before you load it.
- If you and another developer have both loaded the same package and made changes to it, you can merge your changes.
- In a FileList, find the other developer's version file.
- Press the Merge button.
- A window will come up listing the other developer's changes that will be merged in.
- If there are any conflicts, they will be in bold at the top of the list. You must resolve these before merging.
- A conflict occurs when both developers have made changes to the same class or method definition concurrently. To resolve the conflict, you must decide whether to keep the other developer's change, or to reject it in favor of the code currently in your image. For each conflict, select it and press the Keep button to keep the change, or the Reject button to use your version instead.
- Once all conflicts have been resolved, press the Merge button to go ahead with the merge.
Load a .mcz version file without Monticello:
- Use the MCInstaller package from SqueakMap; this provides simple installation support for .mcz files, or:
- Use a zip utility to open the (zip format) .mcz file; inside the archive is a snapshot/source.st file which you can file in normally.