bug-cvs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

failure_exit not cleared in client.c


From: Vesa Suontama
Subject: failure_exit not cleared in client.c
Date: Tue, 11 Sep 2001 09:43:23 +0300

Hello,

I noticed that the variable failure_exit in src/client.c (version 1.1) is
never cleared, when doing cvs updates.

It sometimes happens that the failure_exit is set around the line 1790. (For
example the case that you have a local file that is "on the way").

This causes problems in certain conditions when there are files that could
not be patched at the first pass of cvs update: When the
get_server_responses () is called in the beginning of the second pass,
(supposed to "refetch the unpatchable files" ), it fails just because the
variable failure_exit is still set.

I suggest that you clear the variable failure_exit before you try to call
the start server in update.c. (See a diff below.)

Best regards,

Vesa

P.S We are using cvs with both Windows and Unix clients. It happened that
somebody at Unix side had added a file named aux.scm to the repository.
Windows is broken in such a way that it does not allow file names which
begins with aux! access("aux.foo",0) always returns success, so the cvs
update thought that the aux.scm file was on the way and set the
failure_exit.


The diff:

--- h:\temp\cvsgui\cvs-1.10\src\client.c        Sat Jun 09 15:56:16 2001
+++ .\client.c  Tue Sep 11 08:57:40 2001
@@ -1496,8 +1496,13 @@
 } importmergecmd;

 /* Nonzero if we should arrange to return with a failure exit status.  */
-static int failure_exit;
+static int failure_exit = 0;

+/* Clear failure exit flag, to make the second pass happier */
+void clear_failure_exit()
+{
+  failure_exit = 0;
+}

 /*
  * The time stamp of the last file we registered.
@@ -3614,9 +3619,9 @@
     }

     if (rs->type == response_type_error)
-       return 1;
+       return 1;
     if (failure_exit)
-       return 1;
+       return 1;
     return 0;
 }

diff --unified h:\temp\cvsgui\cvs-1.10\src\client.h .\client.h
--- h:\temp\cvsgui\cvs-1.10\src\client.h        Tue Sep 26 06:12:00 2000
+++ .\client.h  Mon Sep 10 11:29:07 2001
@@ -114,6 +114,9 @@
 #define SEND_NO_CONTENTS 4
 #define BACKUP_MODIFIED_FILES 8

+/* Clear failure exit flag, to make the second pass happier */
+void clear_failure_exit();
+
 /* Send an argument to the remote server.  */
 void
 send_arg PROTO((char *string));
diff --unified h:\temp\cvsgui\cvs-1.10\src\update.c .\update.c
--- h:\temp\cvsgui\cvs-1.10\src\update.c        Thu Apr 19 11:04:54 2001
+++ .\update.c  Tue Sep 11 08:58:27 2001
@@ -249,6 +249,7 @@
        {
            int status;

+           clear_failure_exit();
            start_server ();

            if (local)




reply via email to

[Prev in Thread] Current Thread [Next in Thread]