[EMAIL PROTECTED] wrote :
|| Thanks for your detailed reply! I guess the short answer is "write
|| some personal scripts that do the right thing"...
||
|| I wasn't aware of the proscription on "cvs add foo/bar". As far as I
|| can tell, it works fine in the basic case, as long as directory "foo"
|| is already registered. (I believe it's looking in foo/CVS and not
|| ./CVS, though I may be mistaken.)
The proscription is quite explicit in the Cederqvist manual, but it
that proscription seems not to be enforced by cvs (at present). That
is strange. Near the beginning of the section "Adding files to a
directory" it says:
Unlike most other commands, the add command is not recursive.
You cannot even type 'cvs add foo/bar'! Instead you have to
$ cd foo
$ cvs add bar
It seems that the add command has been changed without updating the
doc.
|| That's why I figured "cvs add `find foo`" should add all
|| subdirectories and contents (and it actually *almost* does, assuming
|| none of them have been registered yet).
||
|| The problem comes after the premature abort (since some directories
|| are registered), which leaves some directories registered and some
|| not. Under controlled circumstances, I can't reproduce that Entries
|| problem (though I promise, I had lines saying "D/CVS///" inside my
|| Entries files!).
||
|| > || Are there any special reasons why "cvs add" aborts for extant
|| > || directories, but not for extant files?
|| >
|| > "cvs add" is not unique here. "cvs commit", for example, is an all
|| > or nothing command where being unable to process one argument aborts
|| > the whole command. For commit, this is clearly the right choice.
|| > For the current implementation of add it is also the right choice
|| > (because add currently is modifying the repository), but as part of
|| > excising the repository changing that could certainly be
|| > reconsidered.
||
|| Not exactly. "cvs add foo/ bar/ baz/" failing doesn't do a proper
|| rollback if some succeed and some fail. In this case (foo succeeds,
|| bar fails) "foo" gets left with a CVS directory, but no "foo"
|| directory was created in the repository, so a subsequent "cvs add foo"
|| fails ("there is a version in foo already"), but so does "cvs add
|| foo/baf.txt" ("failed to create lock directory in repository
|| `/cvsroot-test/.../foo': No such file or directory") That's a pretty
|| significant transaction gaffe, I think!
I'm sorry, it sounded to me (in a paragraph no longer being quoted)
that you were claiming that no other command aborted if a part of the
command could not be carried out.
I agree that abort without rollback and without being able to
re-issue the parts that already happen to complete is a nuisance and
that combination is probably unique to "cvs add".
|| Here's a transcript (with different directory names, sorry!)
||
|| [alex@milk foo]$ mkdir noo
|| [alex@milk foo]$ cvs add noo/ bar/
|| cvs [add aborted]: there is a version in bar already
|| [alex@milk foo]$ cvs add noo/
|| cvs [add aborted]: there is a version in noo already
|| [alex@milk foo]$ cvs commit
|| cvs commit: Examining .
|| cvs commit: Examining bar
|| cvs commit: Examining bar/baz
|| cvs commit: Examining noo
|| [alex@milk foo]$ touch noo/nar
|| [alex@milk foo]$ cvs add noo/nar
|| cvs server: scheduling file `noo/nar' for addition
|| cvs server: use 'cvs commit' to add this file permanently
|| [alex@milk foo]$ cvs commit
|| cvs commit: Examining .
|| cvs commit: Examining bar
|| cvs commit: Examining bar/baz
|| cvs commit: Examining noo
|| cvs server: failed to create lock directory in repository `/cvsroot-test/foo/noo':
|No such file or directory
|| cvs server: lock failed - giving up
|| cvs [server aborted]: lock failed - giving up
|| cvs commit: saving log message in /tmp/cvspBWo4z
||
|| - Alex
||
|| P.S. Feel free to repost this back to the list if you think others
|| should be made aware of this bug. Should I report it to
|| [EMAIL PROTECTED] (I presume that's the right address)?
I've done this, it looks like there is an error involved.
--
Anyone who can't laugh at himself is not | John Macdonald
taking life seriously enough -- Larry Wall | [EMAIL PROTECTED]