[OK, the root cause of this is that the -t/-f wrapper code is scattered throughout the CVS source, but there seem to be few people who are interested in helping to maintain the wrapper code as CVS evolves. There are no test cases for -t/-f wrappers, so the testsuite can't help. Furthermore, there are plenty of known bugs and quirks in the -t/-f wrapper feature, enough to make me have serious doubts about whether it should persist in anything which strongly resembles its current form. For the short term (e.g. CVS 1.9.28), we disabled -t/-f wrappers until we can sort out at least this immediate bug. I'm not really sure that we should apply the enclosed patch without a test case. -kingdon] To: info-cvs@gnu.org Subject: Wrappers don't work in local mode anymore since ccvs-1.9.26 Date: Wed, 20 May 98 07:59:54 -0700 From: Michael Brouwer It seems that some code in commit.c has changed breaking -t and -m wrapper even when using cvs in local mode (I know it currently doesn't work in client-server mode without a patch). The problem is that commit now tries to rename() the files it is commiting from a place in /tmp to the working directory. When the working directory is on the same filesystem as /tmp (which is the case when running sanity.sh) everthing works fine. When the working dir is not on the same filesystem as /tmp this still works well for files, but not for directories (which -t and -m wrappers may be). With MainWindow.nib being a wrapper directory. Attempting to commit it with: cvs ci -m "nib changed." cvs exits with an error like: Checking in English.lproj/MainWindow.nib; cvs [commit aborted]: cannot rename file /tmp/cvs002363 to MainWindow.nib: Cross-device link The directory MainWindow.nib is now gone and the file has not been commited to the repository. Even the file in /tmp is gone! This is a serious case of cvs destroying data in my sandbox... This bug did not occour on earlier version of cvs. I haven't tracked down the exact version where this broke bug it seems that running sanity.sh in a directory other than /tmp (on a seperate filesystem) might catch some of these problems. (Asuming there is a test case for wrappers). Michael Subject: [PATCH] Wrapper hosage in 1.9.26 Date: Thu, 18 Jun 98 18:08:06 -0700 From: Wilfredo Sanchez To: , , "Michael Brouwer" , "Jeff Glasson" The following fixes the problem introduced in 1.9.26 which breaks t/f wrappers in the local case (which is the only case that works anyway unless you apply patches for client/server mode). copy_file got changed to rename_file which causes cvs to exit if your working copy is on a device other than the one /tmp lives on; the source file in /tmp/cvsXXXX, and the destination in the working copy. The fix is to change rename_file to copy_file. I had added unlink_file to get similar behaviour out of this code, but then cvs would print an error about the file not existing because it tries to clean it up later, so rename_file is probably the wrong thing even in the case where the working copy is on the same device as /tmp. -Fred Index: cvs/src/ChangeLog =================================================================== RCS file: /CVSRoot/CoreOS/Versioning/cvs/cvs/src/ChangeLog,v retrieving revision 1.7 diff -u -b -d -r1.7 ChangeLog --- ChangeLog 1998/04/07 07:13:38 1.7 +++ ChangeLog 1998/06/19 00:58:41 @@ -1,3 +1,11 @@ +1998-06-18 Wilfredon Sanchez + + * checkin.c: change rename_file if wrapper to copy_file. rename + fails when the source file (/tmp/cvsXXX) is on a different device + than the destination (typically your home dir), which is often the + case. The source file gets cleaned up later, so unlinking it causes + a not found error message anyway. + 1998-03-04 Jim Kingdon * entries.c, cvs.h (Entries_Open): New argument update_dir; use it Index: cvs/src/checkin.c =================================================================== RCS file: /CVSRoot/CoreOS/Versioning/cvs/cvs/src/checkin.c,v retrieving revision 1.1.1.4 diff -u -b -d -r1.1.1.4 checkin.c --- checkin.c 1998/04/07 05:03:47 1.1.1.4 +++ checkin.c 1998/06/19 00:58:41 @@ -49,7 +49,7 @@ if (unlink_file_dir (finfo->file) < 0) if (! existence_error (errno)) error (1, errno, "cannot remove %s", finfo->fullname); - rename_file (tocvsPath, finfo->file); + copy_file (tocvsPath, finfo->file); } } --- Wilfredo Sanchez - wsanchez@apple.com - 408.974-5174 Apple Computer, Inc. - Rhapsody Core Operating Systems Group 2 Infinite Loop, Mail Stop 302-4K, Cupertino, CA 95014