Skip to main content
Engineering LibreTexts

6.7: The .mcz File Format

  • Page ID
    43825
  • \( \newcommand{\vecs}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} } \) \( \newcommand{\vecd}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash {#1}}} \)\(\newcommand{\id}{\mathrm{id}}\) \( \newcommand{\Span}{\mathrm{span}}\) \( \newcommand{\kernel}{\mathrm{null}\,}\) \( \newcommand{\range}{\mathrm{range}\,}\) \( \newcommand{\RealPart}{\mathrm{Re}}\) \( \newcommand{\ImaginaryPart}{\mathrm{Im}}\) \( \newcommand{\Argument}{\mathrm{Arg}}\) \( \newcommand{\norm}[1]{\| #1 \|}\) \( \newcommand{\inner}[2]{\langle #1, #2 \rangle}\) \( \newcommand{\Span}{\mathrm{span}}\) \(\newcommand{\id}{\mathrm{id}}\) \( \newcommand{\Span}{\mathrm{span}}\) \( \newcommand{\kernel}{\mathrm{null}\,}\) \( \newcommand{\range}{\mathrm{range}\,}\) \( \newcommand{\RealPart}{\mathrm{Re}}\) \( \newcommand{\ImaginaryPart}{\mathrm{Im}}\) \( \newcommand{\Argument}{\mathrm{Arg}}\) \( \newcommand{\norm}[1]{\| #1 \|}\) \( \newcommand{\inner}[2]{\langle #1, #2 \rangle}\) \( \newcommand{\Span}{\mathrm{span}}\)\(\newcommand{\AA}{\unicode[.8,0]{x212B}}\)

    Versions are stored in repositories as binary files. These files are commonly call “mcz files” as they carry the extension .mcz. This stands for “Monticello zip” since an mcz file is simply a zipped file containing the source code and other meta-data.

    An mcz file can be dragged and dropped onto an open image file, just like a change set. Pharo will then prompt you to ask if you want to load the package it contains. Monticello will not know which repository the package came from, however, so do not use this technique for development.

    You may try to unzip such a file, for example to view the source code directly, but normally, end users should not need to unzip these files themselves. If you unzip it, you will find the following members of the mcz file.

    File contents. Mcz files are actually ZIP archives that follow certain conventions. Conceptually a version contains four things:

    • Package. A version is related to a particular package. Each mcz file contains a file called “package” that contains information about the package’s name.
    • VersionInfo. This is the meta-data about the snapshot. It contains the author initials, date and time the snapshot was taken, and the ancestry of the snapshot. Each mcz file contains a member called “version” which contains this information.
      A version doesn’t contain a full history of the source code. It’s a snapshot of the code at a single point in time, with a UUID identifying that snapshot, and a record of the UUIDs of all the previous snapshots it’s descended from.
    • Snapshot. A Snapshot is a record of the state of the package at a particular time. Each mcz file contains a directory named “snapshot/”. All the members in this directory contain definitions of program elements, which when combined, form the Snapshot. Current versions of Monticello only create one member in this directory, called “source.st”.
    • Dependencies. A version may depend on specific version of other packages. An mcz file may contain a “dependencies/” directory with a member for each dependency. These members will be named after each package the Monticello package depends upon. For example, a Pier-All mcz file will contain files named Pier-Blog and Pier-Caching in its dependencies directory.

    Source code encoding. The member named “snapshot/source.st” contains a standard fileout of the code that belongs to the package.

    Metadata encoding. The other members of the zip archive are encoded using S-expressions. Conceptually, the expressions represent nestable dictionaries. Each pair of elements in a list represent a key and value. For example, the following is an excerpt of a “version” file of a package named AA:

    (name 'AA-ab.3' message 'empty log message' date '10 January 2008' time '10
        :31:06 am' author 'ab' ancestors ((name 'AA-ab.2' message...)))
    

    It basically says that the version AA-ab.3 has an empty log message, was created on January 10, 2008, by ab, and has an ancestor named AA-ab.2, ...


    This page titled 6.7: The .mcz File Format is shared under a CC BY-SA 3.0 license and was authored, remixed, and/or curated by Alexandre Bergel, Damien Cassou, Stéphane Ducasse, Jannik Laval (Square Bracket Associates) via source content that was edited to the style and standards of the LibreTexts platform; a detailed edit history is available upon request.