bug-cvs
[Top][All Lists]
Advanced

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

checkoutlist files in subdirectories


From: Stockinger, Frank
Subject: checkoutlist files in subdirectories
Date: Wed, 31 Oct 2001 08:47:46 +0100

Hello,

I have the following problem using a NT 'pserver' CVSNT 1.11.1.2 (Build
36) and having files in subdirectories in the checkoutlist, e.g.
CVSSupport/ACL.pm. The cvs server on NT cannot rename the new temporary
file e.g. .#314 to CVSSupport/ACL.pm. Therefore the administrative
database is not updated correctly.

I think, the problem is before this step, because the server tries to
rename the existing CVSSupport/ACL.pm to .#CVSSupport/ACL.pm, which is not
possible under Windows NT, though our Linux (1.11.1pl1) server seems to
handle this rename.

IMHO, this rename is not correct, neither for Linux nor for Windows. I
guess it should be a rename from CVSSupport/ACL.pm to CVSSupport/.#ACL.pm.
To achieve this I have patched the mkmodules.c. Using this patch (see
below) the above problem is solved and the .#-files appear in the
subdirectories as they can seen in the CVSROOT directory.

BTW, I am using this patch with a Windows and Linux cvs server.

Frank

*** mkmodules.c.#.1.1.1.1       Fri Oct 26 07:45:31 2001
--- mkmodules.c Wed Oct 24 13:55:08 2001
***************
*** 787,792 ****
--- 787,793 ----
      char *bak;
      struct stat statbuf;
      char *rcs;
+     char *dirsep;

      /* Set "x" bits if set in original. */
      rcs = xmalloc (strlen (real) + sizeof (RCSEXT) + 10);
***************
*** 800,806 ****
      if (chmod (temp, 0444 | (statbuf.st_mode & 0111)) < 0)
   error (0, errno, "warning: cannot chmod %s", temp);
      bak = xmalloc (strlen (real) + sizeof (BAKPREFIX) + 10);
!     (void) sprintf (bak, "%s%s", BAKPREFIX, real);

      /* rm .#loginfo */
      if (unlink_file (bak) < 0
--- 801,814 ----
      if (chmod (temp, 0444 | (statbuf.st_mode & 0111)) < 0)
   error (0, errno, "warning: cannot chmod %s", temp);
      bak = xmalloc (strlen (real) + sizeof (BAKPREFIX) + 10);
!     /* rename in the directory */
!     dirsep = strrchr (real, '/');
!     if (NULL == dirsep)
!         (void) sprintf (bak, "%s%s", BAKPREFIX, real);
!     else
!     {
!         (void) sprintf (bak, "%.*s%s%s", dirsep-real+1, real, BAKPREFIX,
!         dirsep+1);
!     }

      /* rm .#loginfo */
      if (unlink_file (bak) < 0

===========================================================
plettac electronic security GmbH
Videosensorik
Dr. Frank Stockinger
Würzburger Straße 150
90766 Fürth
Tel +49 (0)911 75884 334
fax +49 (0)911 75884 121
email: F.Stockinger@plettac-electronics.de
       Frank.Stockinger@gmx.de




reply via email to

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