PackageDescription: File Repository


File Repository

Last published: September 15, 2005 by 'michael'

Defines 7 Classes
Extends 7 Classes


This package allows you to place text files under VW's source control.
Create a subclass of FileRepository and add methods containing a pragma.

Refactoring Browser buttons are provided for comparing the internal and external version of files, updating the internal or external file and launching the Differator. Browsing a file method will automatically compare the internal and external file.
You must close and re-open Refactoring Browser's in order for the extensions be activated.

Internal files are not stored in the image, but are stored in the change file.
Adding a post load action to a StORE package of the form:
[:package | MyFileRepository updateAllInternalToExternal ] will cause external files to be created or updated if necessary when a package is loaded.

Enjoy,
David Pennell
Quallaby Corporation
---
Extensions by Cees de Groot @ Soops:
- pragma stores files in a gzipped string-encoded format;
- VersionedDirectory will suck in whole directories at a time (to be done - whole subdirectory trees ;-)).

To version a directory, create a subclass of VersionedDirectory and implement #directoryName on the class side. Optionally, override #externalFileListMatchBlock which allows you to filter out unwanted entries. The most useful methods on YourVersionedDirectory:

YourVersionedDirectory updateAllExternalToInternal - this synchronizes the class with what is on disk. If files have been deleted, their corresponding selectors are removed; if files have been added, they their corresponding selectors are created. You want to run this as the first thing after creating a VersionedDirectory subclass.

YourVersionedDirectory updateAllInternalToExternal - this writes out all files represented by the class to disk (at this moment, nothing on disk is removed although this should be trivial