Hi all, Since people have been asking how to use Tonel, I've took a look at it and have written down two class comments for both the reader and the writer. I'll push them to Tonel and schedule soon a patch release with it. Here are the class comments so people can see them/discusses them. Please, report any enhancements as pull requests in
g...@github.com:pharo-vcs/tonel.git ! TonelReader I'm a monticello reader for tonel format repositories. I read - a package per directory - a class per file - a set of extensions to a single class per file (for example, all extensions of a package to String will be in a single file) I'm created on a file reference to a directory where the package will be read and the name of the package to read. [[[ TonelReader on: 'someDirectoryWithTonelPackages' asFileReference filename: 'MyPackageName' ]]] My main method is - ==#definitions== reads and parses the tonel file, returns a list of monticello definitions. - ==#snapshot== returns a monticello snapshot with the read definitions. - ==#version== returns a monticello version with the read snapshot. !! Implementation details The monticello versions I return do have artificial information. Since I'm just meant to read versions from a directory, this directory has no information such as commit message, commit time, author, or ancestors. Check the method ==#loadVersionInfo== for more information. ! TonelWriter I'm a monticello writer for tonel format, writing - a package per directory - a class per file - a set of extensions to a single class per file (for example, all extensions of a package to String will be in a single file) I'm created on a file reference to a directory where the package will be written. [[[ TonelWriter on: ('someDirectory' asFileReference ensureCreateDirectory) ]]] My main methods are - ==#writeVersion:== that receives as argument a monticello version to write, from where I'll extract the corresponding monticello snapshot. - ==#writeSnapshot:== that receives as argument a monticello snapshot to write, from where I'll write all the contained definitions. !! Implementation details Notice that while writing, if the written package/snapshot already exists in the directory I'll overwrite it (i.e., remove it and recreate it). -- Guille Polito Research Engineer Centre de Recherche en Informatique, Signal et Automatique de Lille CRIStAL - UMR 9189 French National Center for Scientific Research - *http://www.cnrs.fr <http://www.cnrs.fr>* *Web:* *http://guillep.github.io* <http://guillep.github.io> *Phone: *+33 06 52 70 66 13