[SEH] A versioning virtual filesystem. Similar to historical versioning filesystems, each edited version of a file is saved separately; each version file is tagged with a timestamp. A tag is a semi-colon and tag info appended to the file name. A deleted file is represented by a new zero-length file with timestamp and a tag reading "deleted". By default only the latest versions of files are visible. If the latest version is marked deleted, it is invisible. Based on [A template virtual filesystem] ---- [SEH] 19 Jul 2004 - I added three optional mount flags: -keep , -project , and -time Usage: Mount -keep -project -time -keep: sets the maximum number of versions per file to retain. If the -project tag is used, other projects' versions are ignored. -project: specify a named project and all new edits get tagged with this name string. As long as you're mounted with this option, versions with the corresponding tag will be preferred, and edits tagged by other projects will be invisible. Multiple -project tags can be used; new versions will tagged with all specified project tags - thus you can share edits among several projects. -time: specify a time in the past and the vfs will appear just as it did at that time. You can make new edits, but they will be invisible until you remount without a time specified. Can be used in conjunction with -project. ---- [SEH] 4 Nov 2004 - Cleaned up and tested. 1/7/2005 -- Directories are now time-stamped and project-tagged just like files, so a whole directory can be marked as deleted for one project but still in existence for another. I also increased the sophistication of how versions with multiple tags and multiple matches with the -project list are chosen. It used to be that the first version found with any matches was chosen, now the version with the most matches is. That is if you mount with the -project flag set as "Ford Mercury Cougar 72" and there are two versions of manual.pdf, one with tags "Ford Mercury" and one with "Ford Cougar" , previously you couldn't sure which version would be visible. Now you will always get the one you expect (i.e., the one tagged "Ford Cougar"). ---- ====== # versionvfs.tcl -- # # A versioning virtual filesystem. # # Similar to historical versioning filesystems, each edited version of a file is saved separately; # each version file is tagged with a timestamp, and optional project tags. # A deleted file is represented by a new zero-length file with timestamp and a tag reading "deleted". # By default only the latest version is visible. If the latest version is marked deleted, it is invisible. # Directories are versioned and tagged in the same way as files. # # # Written by Stephen Huntley (stephen.huntley@alum.mit.edu) # # Install: This code requires that the template vfs (http://wiki.tcl.tk/11938) procedures have already # been sourced into the interpreter. # # Usage: Mount ?-keep ? ?-project ? ?-time