[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: cvs add <directory>

From: Kaz Kylheku
Subject: Re: cvs add <directory>
Date: Thu, 22 May 2003 16:42:47 -0700 (PDT)

On Thu, 22 May 2003, Greg A. Woods wrote:
> [ On Thursday, May 22, 2003 at 16:08:27 (-0400), Ross Patterson wrote: ]
> > One could say that about directories in general.  Perhaps we ought to 
> > return 
> > to the glorious days of flat file systems?  It seems to me that directories 
> > is CVS serve exactly the same purpose as directories in any file system - 
> > they help organize your files and prevent conflicts over naming.
> Yes, unfortunately though people seem to think for some bizarre reason
> that directories contain something interesting other than just files and
> thus they seem to want to version them, but fortunately they are
> completely mistaken, or have been mislead by stupid unnecessary features
> in other similar tools.  It all stems from the fact that far too many
> people are using _very_ wrong tools for the jobs they think they're
> trying to do.

I Meta-CVS, I took the approach that directories are simply just an
implementation choice in a filesystem to support hierarchically
organized path names. Two files that share the same path prefix are put
into the same directory, but in principle, all the same
abstractions---save for property modifications of the directory objects
themselves---could work just as well if directories did not exist.

For example, listing the contents of /usr/bin could just be an
associative query which retrieves information about all the files which
have that prefix.

Even directory properties could be represented in such a flat scheme;
you would have some table which maps prefixes to properties such as
the directory owner, search and read permissions and so on.

If *no* files have some given prefix, then there is no need for a
directory to actually exist which has that prefix. Empty directories
are an unnecessary phenomenon. Even if they have security properties
like ownership or permissions, or other properties like access or
modification time stamps, these serve no useful purpose.

Directories are just a backbone to hold objects together, like CONS
cells in a Lisp list. If the list is empty, it has no backbone cells.

This view on directories allows a number of elegant simplifications in
the software, as well as its use.

When Meta-CVS restructures a sandbox, it automatically deletes a
directory when it becomes empty. If you for instance rename, via 
``mcvs mv'', all of the files out of a directory, and it contains no
local files, that directory just disappears. 

Likewise, there is no ``mkdir'' command. You simply rename a file or
files to some path, and the directory materializes in your sandbox as
necessary to make to make that happen.

Directories are treated like inconvenient, second-class cruft that
is imposed by the platform, and that the user would like to deal with
as little as possible. Bookkeeping annoyances like mkdir and rmdir
at various levels of the tree should be done by the machine, in order
to smoothly support the user's wishes to rearrange the path namespace.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]