[EMAIL PROTECTED] on 03/01/2000 09:45:14 PM
>[ On Wednesday, March 1, 2000 at 10:25:26 (-0500), Noel L Yap wrote: ]
>> Subject: Re: removing the need for "cvs add file" to contact the server....
>>
>>
>> The "cvs add empty-hier" must create CVS admin subdirectories.  The following
>> "cvs ci" should create the directories within the repo (just as the current
"cvs
>> ci" should do today).
>
>NO, it must *NOT*!  There is a very very essential optimisation in CVS
>which depends critically on this!

Optimisations are NOT *necessary*.  "cvs add empty-hier" must act the same as
"touch empty-hier/file; cvs add empty-hier; cvs rm empty-hier".  What don't you
understand about this?

>> *Your* arguments are unfounded.  CVS does manage (however limited)
directories.
>
>You obviously do *NOT* understand CVS.

You don't understand English.  Please look up the definitions of "optimise" and
"necessary".

If you don't want "cvs ci" to create empty hierarchies within the repo, that's
fine -- it's consistent with what you think CVS is/should be (although you are
plainly wrong with this assessment as I've shown with "cvs watch dir").

You cannot, however, say that "cvs add", which affects only the local directory,
should have an "optimisation" that makes it behave differently from an
equivalent set of commands.  Furthermore, the "optimisitation" causes more disk
processing than if it didn't exist.  Here's the (improved) pseudo-code:

Without creating CVS admin subdirectories within empty hierarchies:
find ancestor CVS admin directory
save ancestor CVS admin directory info (eg Root and Repository)
pushd .
recurse down subdirectories
  if file is found
    while no parent CVS admin directory
      cd to parent directory
      create CVS admin directory with correct info (eg Root, Repository, and
Entries)
    add pwd to parent directory's CVS/Entries
popd

With creating CVS admin subdirectories within empty hierarchies:
find ancestor CVS admin directory
save ancestor CVS admin directory info (eg Root and Repository)
pushd .
while no parent CVS admin directory
  cd to parent directory
  create CVS admin directory with correct info (eg Root, Repository, and
Entries)
add pwd to parent directory's CVS/Entries
popd
recurse down subdirectories
  create CVS admin directory with correct info (eg Root, Repository, and
Entries)

Not only does your "optimisation" (or at least my implementation of it) traverse
the directory structure more often, but it also entails many more file opens and
closes each time you write to CVS/Entries.

Now, this is the second time I've posted these algorithms.  Can you please show
me how your "optimisation" really does optimise specially since, as you've
pointed out, users should be using the ignore facilities to prevent recursing
down directories that should be ignored?

Noel


Reply via email to