[geeks] Versioning FIlesystem

Jonathan C. Patschke jp at celestrion.net
Sat May 24 12:03:01 CDT 2003


On Sat, 24 May 2003, Mike Meredith wrote:

> *Every* one ? Most just try and open a file and read/write to it. They rely on
> the kernel/system library to prevent them doing something dumb with something
> that isn't a file.

Okay, not -every- one.  But the overwhelming majority of them cut paths
into components at the /.  Take, for example, this path:

   /usr/people/jp/letters/b-day/2

Now, is that the second (or third) revision of b-day, or is it a file in
a directory named b-day?  If I navigate there in a Motif file-open
dialog, open it, and try to save it as 'other b-day', where does it get
saved?  In the former case, it'd get saved as
'/usr/people/jp/letters/other bday' (or maybe the fs would throw an
error), and in the latter, it'd get saved as
'/usr/people/jp/letters/b-day/other b-day'.  Confused yet?

Any program that chdir()s to the parent directory of the document that
it's opening (possibly because it needs to reference other related
datafiles) will break if versioning treats each file as a directory of
its versions.

If you were to implement this, some character would need to get the axe.
It could be : or ; or ,.  Those all make a good deal of sense.  Treating
them as multiple separate files where only the latest revision is
visible to the opendir() family of commands is an elegant solution,
IMO.

-- 
Jonathan Patschke   )  "Lawsuit...why doesn't it surprise me that more
Thorndale, TX      (    than half of that word is Suit?"
                    )                                  --George Adkins



More information about the geeks mailing list