[If you try to add a directory with a CVS 1.9.24 (or so) client and a
CVS 1.9 server, you'll get a "cvs server:
already exists, with
version number" error.
I've enclosed an attempted patch. I'm not really sure whether it is
close or whether a fairly different approach is called for. The patch
solves this particular problem but causes a testsuite failure in
modules2-10 (other relevant tests: errmsg2, basicb).
-kingdon]
Index: ChangeLog
===================================================================
RCS file: /home2/cvsroot/ccvs/src/ChangeLog,v
retrieving revision 1.1495
diff -c -r1.1495 ChangeLog
*** ChangeLog 1998/04/21 14:07:08 1.1495
--- ChangeLog 1998/04/22 01:18:58
***************
*** 1,3 ****
--- 1,9 ----
+ 1998-04-21 Jim Kingdon
+
+ * add.c (add): Only call send_a_repository for the parents of the
+ directories we are adding if we need to. Should fix problem with
+ adding a directory with this version of the client and 1.9 server.
+
1998-04-20 Jim Kingdon
(This diff was run by devel-cvs and everyone seemed to like it).
Index: add.c
===================================================================
RCS file: /home2/cvsroot/ccvs/src/add.c,v
retrieving revision 1.67
diff -c -r1.67 add.c
*** add.c 1998/03/05 00:53:57 1.67
--- add.c 1998/04/22 01:01:18
***************
*** 143,151 ****
--- 143,155 ----
if (options) send_arg(options);
option_with_arg ("-m", message);
+ #if 0
+ /* This is causing problems with adding directories for
+ CVS 1.9 servers. Let's see what happens if we disable it. */
repository = Name_Repository (NULL, NULL);
send_a_repository ("", repository, "");
free (repository);
+ #endif
for (i = 0; i < argc; ++i)
/* FIXME: Does this erroneously call Create_Admin in error
***************
*** 194,200 ****
Create_Admin (p, argv[i], rcsdir, tag, date,
nonbranch, 0);
! send_a_repository ("", repository, update_dir);
if (restore_cwd (&cwd, NULL))
error_exit ();
--- 198,213 ----
Create_Admin (p, argv[i], rcsdir, tag, date,
nonbranch, 0);
! /* OK, here is the deal. In order to create a simple
! directory (no '/') with CVS 1.9, we need to refrain
! from sending a "Directory" request (don't ask me why;
! CVS 1.9.26 or so doesn't have this restriction and I
! haven't looked at 1.9 carefully). If the directory
! we are creating contains '/', then we need to send
! Directory (and we don't worry about 1.9, because it
! can't do it anyway). */
! if (update_dir[0] != '\0')
! send_a_repository ("", repository, update_dir);
if (restore_cwd (&cwd, NULL))
error_exit ();