[EMAIL PROTECTED] on 2000.02.20 21:38:59
>[ On Friday, February 18, 2000 at 16:52:48 (-0500), Noel L Yap wrote: ]
>> Subject: Re: removing the need for "cvs add file" to contact the server....
>>
>> What I'm getting at is that "cvs add dir" should create CVS admin
subdirectories
>> whether or not the hierarchy is empty. "cvs add dir" shouldn't differentiate
>> between empty (including those that contain only ignored files) and non-empty
>> hierarchies. You still haven't shown how it can be dangerous to do so.
After
>> all, this is only occurring within the local directories right?
>
>It's obviously not dangerous to always create the administrative files
>in every directory "cvs add" recurses into. However there are some
>potentially major (and long-term!) optimisations to be gained by only
>creating them when necessary. Since it is not necessary to create
>administrative files in a directory when no other files are added there
>they should not be created.
Beware of premature optimisation. We've already laid out a process that relies
on empty directories being created in the repo. IOW, it's *necessary* to allow
creation of empty directories for this process. It would be a kludge to create
a dummy file for this purpose.
So, "cvs co", "cvs export", and "cvs up" are still the places to handle empty
directories.
Also, your post is in sharp contrast to your opinion regarding the "cvs add"
check hook. This hook is meant to be an optimisation. You're correct that it
is not absolutely necessary, but I've also posted a Design Pattern that shows
that this solution is common enough that it has a name (ie Double-Checked Lock).
>> I also contend that "cvs ci" will create those newly added directories into
the
>> repository whether or not they are empty hierarchies. Again, you haven't
shown
>> how this is dangerous. OTOH, I've shown an example where this could be used
>> wisely by a site's processes (ie so that the newly added directories are
owned
>> by the cvs admin).
>
>There is definite danger in creating unnecessary empty directories in
>the repository. If this were not the case then there wouldn't have been
>a major discussion recently about why CVS should be more careful about
>letting people create arbitrary directories in the repository.
This is a danger in the process, not the tool. Otherwise, you should be in
favor of adding locks to CVS.
>There are also similar major performance headaches if garbage
>directories are created in the repository unnecessarily.
Again, this is something wrong with the process. I could also argue that there
are some performance headaches due to garbage files.
Garbage can be taken care of by the cvs admin (eg they can directly rm the
file/directory from the repo).
>Given the current design of CVS there can be *NO* reasonable argument
>for creating empty directories in the repository and leaving them there.
Yes there is. Let me lay it out again (and remember, you helped come up with
this even though now you want it null and void):
1. A cvs admin has the responsibility of being the only person to create
directories in the repo (ie add directories and import modules). Rationale: The
cvs admin must be able to have fine-grained control over permissions within the
repository. Since only the file/directory owner can change permissions on that
file/directory, the cvs admin must own all directories in the repo. Since
directories are owned by those that add the directories, only the cvs admin must
be allowed to create directories.
2. After the cvs admin has created the empty directory, other users will
checkout the empty directory, then add whatever files they wish.
>Your so-called argument was based on a false understanding of the way
>CVS controls access to the repository. (Perhaps this strange desire you
>have for some weird alternate access control mechanism is also skewing
>your other arguments too! :-)
No, I completely understand how CVS manages permissions (ie it doesn't). All
CVS does is use the permissions afforded by the file system. Since I need
finer-grained control over permissions than you do, you claim that this need is
false. Greg, the world is a lot larger than your weird.com world. Version
control (eg CVS) and access control (eg ACLs) are orthogonal issues. CVS
shouldn't force me to have a root script running that'll change ownerships of
directories in the repo.
>On the other hand I would support the automatic pruning of empty
>directories from the repository just as they must be pruned from the
>local working directories! ;-)
Pruning empty directories from the repo is the job of the cvs admin. Or perhaps
you would suggest a background root script for this purpose, too ;-) Why are
you so insistent to add process-type handling into CVS? And only those that
*you're* interested in?
Noel