Greg A. Woods wrote :
|| [ On Friday, February 11, 2000 at 17:38:59 (-0500), Noel L Yap wrote: ]
|| > Subject: Re: removing the need for "cvs add file" to contact the server....
|| >
|| > This has absolutely nothing to do with the original question, "How has/will
|| > allowing the adding of empty directories hurt?"
||
|| OK, let's start over again then. First the reason why adding empty
|| directories "hurts" CVS:
||
|| CVS doesn't operate on directories, rather it operates within them on
|| the files they contain. There is no concept of an empty directory in
|| CVS. In the most generic sense if a directory doesn't contain any
|| CVS-managed files then it simply doesn't exist and that's all there is
|| to it. Having CVS somehow manage directories is beyond its design goals
|| and indeed well and far beyond the needs of anyone using CVS for the
|| purposes it was designed for. Having even 'cvs add' treat directories
|| specially makes it different from any other CVS workspace command and
|| makes it impossible for 'cvs add' to do some highly desirable tasks in
|| any way that is consistent with the rest of CVS and in a "natural" way.
CVS does operate on directories. It tracks which directory a file is
contained in. It duplicates the directory structure in the
repository when it creates a work area (retaining empty directories
that do not contain any files in the particular variant checked out
if the -P option was omitted). Update and checkin operations
duplicate any changes made to keep the work area and the repository
consistant in their use of directories (as well as the content of
files, of course).
When a user creates a new file on the file system he first does a
mkdir and then edits the file. How does it *hurt* CVS if the user
first does a "cvs add" of the directory and later does a "cvs add" of
the file? Why is it important that when the user is making changes
in directory structure, he must be forced to communicate those
changes in a different way to CVS compared to how he communicates
them to the file system?
|| Then the history again:
||
|| The bogosity of having to do "cvs add dir" in the first place was simply
|| a hack to cause CVS to create a directory inside the repository. In the
|| olden days before CVS was able to operate remotely from the repository
|| it woas sufficient to just do: "mkdir `cat CVS/Repository`/newdir" and
|| be done with it.
While creating a directory in the repository was one step taken by
the command, it also added the work area directory to the locally
managed working set of the work area, extending the depth of the
cvs-managed work area.
(You have noted one exception. The "cvs release" command combines a
cvs-recursive check that no files in the cvs-managed work are have
local changes that have not yet been checked in with a subsequent "rm
-rf" on the directory tree containing that work area, including any
files or directories below that work area. This command is anomolous
for another reason - it may not be used with an implicit or explicit
"." as its argument, or any parent directory either - that is also
tied into the association of a non-cvs command to the part of the
command that is really cvs related. Perhaps the cvs command should
only be a check, and the user should have to issue the "rm -rf"
themself; that would certainly improve the consistancy of the cvs
command set.)
|| No other command that works inside a CVS managed workspace treats a
|| directory name as a command to do somethign to the directory itself.
|| They *ALL* tell CVS to do its operations on the files within the named
|| directory (and all subdirectories therein unless the '-l' common option
|| is given too).
... and they all ignore all of the files and sub-directories of any
directory that doesn't contain a CVS sub-dir (i.e. any directory that
is not part of the cvs-managed work area is totally ignored). They
quietly return from such a directory without doing any other portion
of the cvs operation as soon as it has been determined that the
directory is not part of the cvs-managed work area.
--
Anyone who can't laugh at himself is not | John Macdonald
taking life seriously enough -- Larry Wall | [EMAIL PROTECTED]