[cvsnt] Re: Assert failure when importing new files with -k option

Chris Allen chrisa at matrixscience.com
Mon May 8 16:18:16 BST 2006


Hi Tony,

> Can you give the *exact* sequence to produce this.  Import does not use or 
> send entries lines...  Are you saying that in the subsequent update the 
> entries file is invalid?

All I did was, on the XP client using CVSNT:

1. Create a test folder.

2. In the new folder create a text file "hello.txt" with the contents 
"This is a test."

3. Run the cvs command:

cvs -d ":pserver:chrisa at localhost:/export/cvsroot" import -I! -ko -m 
"RM: Test import" scratch/import SCRATCH_VENDBRN SCRATCH_20060502


To show you the contents of the server side Entries file being used 
during the import I modified the cvs code as follows:


--- import.c.orig       2006-05-04 16:43:42.000000000 +0100
+++ import.c    2006-05-08 13:09:51.610356112 +0100
@@ -565,20 +565,24 @@
                we might as well believe the client.  */
             if (server_active)
             {
+               printf("DBG: server active\n");
                 Node *node;
                 List *entries;

                 /* Reading all the entries for each file is fairly 
silly, and
                    probably slow.  But I am too lazy at the moment to do
                    anything else.  */
+               system("/bin/cp -p CVS/Entries /tmp/zz_cvs");
                 entries = Entries_Open (0, NULL);
                 node = findnode_fn (entries, vfile);
                 if (node != NULL)
                 {
+                   printf("DBG: got node\n");
                     Entnode *entdata = node->data;

                     if (entdata->type == ENT_FILE)
                     {
+                       printf("DBG: opts = %s\n", entdata->options);
                         assert (entdata->options[0] == '-'
                                 && entdata->options[1] == 'k');
                         our_opt = xstrdup (entdata->options + 2);


And hence "/tmp/zz_cvs" contained:

   /hello.txt//D/o/

Using tcpdump I see that the difference between the CVSNT versions is 
that the new one (2.5.03) has the following additional argument sent to 
the server:

   Kopt o

The "o" is written into the Entries file as-is (server.c:1784) and so 
later on it throws a wobbly because it expects the string to begin with 
"-k".

Regards,
Chris



More information about the cvsnt mailing list