[I haven't looked at these in detail. The DECADE problem is probably better fixed by having CVS manipulate the dates itself rather than going via the system time routines. -kingdon] Date: Tue, 14 Jul 1998 16:55:23 +1000 From: mbishop@acnielsen.com.au (Murray Bishop) Organization: ACNielsen Australia To: bug-cvs@gnu.org Subject: sanity.sh for windows and os/2 Content-Type: multipart/mixed; boundary="------------461F66AE7C2A" This is a multi-part message in MIME format. --------------461F66AE7C2A Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Dear CVS developers, Since I last wrote, I've continued with my attempts to have CVS 1.9.27 (plus mods to make EMX port pass sanity.sh on local HPFS disk) pass sanity.sh in local mode on Windows-NT and Windows-95 using an executable made with Microsoft Visual C++ 4.2. I haven't done any testing of client-server mode. I've been using a sanity.sh that I think works as in the 1.9.27 distribution unless run on Windows-NT, Windows-95 or OS/2. In these cases, sanity.sh bends to cope with being run by cygwin, MKS Toolkit or ksh527rt.zip (PD korn shell for OS/2) respectively. When bent, my sanity.sh has code to slow things down based on the apparent resolution of filesystem timestamps (FAT, HPFS, Netware seem to have a 2 second rather than 1 second resolution). I found I was able to reduce intermittent failures from a Pentium-II 333MHz using Windows-95 and local FAT32 by doing sleeps before : 1. echo, cat, cp that precede cvs ci. 2. cvs update -r 3. cvs tag -b branch 4. before sed in ${TESTDIR}/editme I send diffs relative to cvs-1.9.27 distribution to show the sources I tested. Here are the results of tests : Red Hat Linux 4.1 local disk - does configure, make. make check reports success. (I do this as a bit of a sanity check for my changes outside the windows-NT directory) windows-NT port Using a Pentium-133 with Windows-NT 4.0 Fix Pack 3 and Novell IntranetWare client 4.11a I get a pass using local disk NTFS. Here's what it looks like: bash-2.01$ bash sanity.sh ../WinDebug/cvs This test should produce no other output than this line, and a final "OK". Bending sanity.sh for win32_msvc_cygwin32 Waiting 1 seconds between creating files gives different modified times. Won't run modes test - BROKEN_LS_L Won't run perms symlinks hardlinks tests - WONT_PRESERVE_PERMISSIONS didn't run abspath-4 - CANT_PROTECT_DIRS didn't run toplevel-12 - CANT_PROTECT_DIRS didn't run 168 (errmsg1) - CANT_PROTECT_DIRS devcom: (cygwin32 b19.1 test -w strange) - using attrib devcom: cygwin32 b19.1 test -w is very weird - using attrib instead devcom2: cygwin32 b19.1 test -w is very weird - using attrib instead OK, all tests completed. I also tested with a Netware Server directory (on a volume with OS/2 namespace active) mounted as /tmp, and the CVS under test in /tmp. (When I had it on my C: drive, I got some "cvs release: unable to release `first-dir'". release.c comments indicate a possible way to fix this) Intermittently, the netware server doesn't rename a readonly file. I find that waiting a second, then retrying the rename sequence seems to get over the problem. I've coded the retry with messages on stderr. This usually causes a sanity.sh failure when stdout+stderr is compared with the expected regular expression. To cope with this, I use another shell script (doit.sh) to iterate over each test in sanity.sh. Running doit.sh several times shows different tests failing each time. I see this on both a Netware 4.10 server and a Netware 4.11 server. Apart from this intermittent failure, CVS passes sanity.sh. On a Pentium-90 Windows-95 B Novell IntranetWare client version 2.2.0.0 I tested with a Netware 4.10 server directory as /tmp. I found the same intermittent failure as for Windows-NT. I also find failure in death2-diff-2 and ignore-193. Perhaps these are problems with MKS toolkit, or maybe more serious. check.log shows : PASS: death2-diff-1 ** expected: Index: file1 =================================================================== RCS file: file1 diff -N file1 \*\*\* [-a-zA-Z0-9/\.%_:]*[ ][ ]*[a-zA-Z0-9: ]* --- nul[ ][ ]*[a-zA-Z0-9: ]* \*\*\*\*\*\*\*\*\*\*\*\*\*\*\* \*\*\* 1 \*\*\*\* - first revision --- 0 ---- ** got: Index: file1 =================================================================== RCS file: file1 diff -N file1 diff: nul/O:\tmp\2: No such file or directory FAIL: death2-diff-2 PASS: ignore-192 ** expected: ? \.cvsignore You have \[0\] altered files in this repository. Are you sure you want to release (and delete) directory .first-dir': ** got: You have [0] altered files in this repository. Are you sure you want to release (and delete) directory `first-dir': FAIL: ignor e-193 The text "? .cvsignore" appears in the stdout/stderr of sanity.sh. On a Pentium-II 333 Windows-95 B I tested using the local FAT32 file system. This configuration exposes lots of timing problems with filesystem timestamps, but otherwise passes sanity.sh. After putting most of this mail together, I tried updating to 1.9.28 (8 conflicts, sanity.sh needed 2 edits) and taking a really recent update.c (with the fix of Ian Lance Taylor for multibranch2-15) and setting FILESYSTEM_TICK=0 in my sanity.sh. Things are much better than before, but still not perfect. Here are results from 2 runs of doit.sh : C:\u\95s>grep FAIL doit30.log FAIL: branches-12.2 t FAIL: multibranch-9 t FAIL: join3-15 t FAIL: 150h3(modules) ?? expected M nameddir/a got nothing FAIL: 182.5(devcom) ?? needed enter to continue FAIL: watch4-13 ?? expect conflict, got update FAIL: binfiles-con4 t FAIL: log-4 t FAIL: ann-9 t FAIL: rcs-6b t FAIL: modes-5 FAIL: modes2-6 FAIL: perms-1 FAIL: symlinks-1 FAIL: hardlinks-1 FAIL: keyword-18 t FAIL: keywordlog-15 t FAIL: tagdate-10 t FAIL: multibranch2-10 t FAIL: admin-22-o16 t C:\u\95s>grep FAIL doit32.log FAIL: basic2-64 ? FAIL: branches-12.2 t FAIL: multibranch-9 t FAIL: join3-9 t FAIL: watch4-13 ? FAIL: binfiles-con0 t FAIL: binfiles2-7a t FAIL: mcopy-7a t FAIL: log-4 t FAIL: ann-9 t FAIL: modes-5 FAIL: modes2-6 FAIL: perms-1 FAIL: symlinks-1 FAIL: hardlinks-1 FAIL: tagdate-10 t FAIL: multibranch2-10 t FAIL: admin-22-o3 ? The t marks are cases where check.log looks something like this : ** expected: Checking in file1; /tmp/cvs-sanity/cvsroot/first-dir/file1,v <-- file1 new revision: 1\.1\.2\.1; previous revision: 1\.1 done ** got: FAIL: multibranch2-10 By setting FILESYSTEM_TICK to 4 seconds in my sanity.sh, I get a pass. emx port Pentium OS/2 Version 3 local disk HPFS - Passes like this : [D:\cvs\emx\95s\ccvs\emx]sh ../src/sanity.sh cvs 2>&1 | tee sanity1.log This test should produce no other output than this line, and a final "OK". Bending sanity.sh for os2_gcc_emx Waiting 2 seconds between creating files gives different modified times. Won't run modes test - BROKEN_LS_L Won't run perms symlinks hardlinks tests - WONT_PRESERVE_PERMISSIONS didn't run abspath-4 - CANT_PROTECT_DIRS didn't run toplevel-12 - CANT_PROTECT_DIRS didn't run 168 (errmsg1) - CANT_PROTECT_DIRS I think you are using a Netware Fileserver OK, all tests completed. (The Netware Fileserver is wrong - actually HPFS is filesystem on local disk D: Is caused by GNU file utilities 3.13 touch not honouring -t...1979 - perhaps it's misled by EMX defining time_t unsigned?) OS/2 Version 3 IBM Netware Client to Netware 4.10 - Fails lots of tests to do with modules like this : [O:\tmp]grep FAIL doit1.txt FAIL: 148a0 (modules) m1 FAIL: modules2-3 m2 FAIL: modules3-6 m2 FAIL: modules4-9 m2 FAIL: cvsadm-3 m2 FAIL: emptydir-6 m2 FAIL: watch4-17 p1 FAIL: 188a (ignore) n1 FAIL: binwrap3-top2 kb1 FAIL: mwrap-8 nm1 FAIL: info-6a uv1 FAIL: config-4 NT2 FAIL: modes-5 NU FAIL: perms-1 P FAIL: symlinks-1 P FAIL: hardlinks-1 P FAIL: multibranch2-15 ? FAIL: reserved-13b FL m1: cvs.exe [checkout aborted]: failed to open the modules file m2: cvs.exe checkout: cannot find module `ampermodule' - ignored p1: cvs.exe [update aborted]: cannot rename file file1 to CVS/,,file1: Permission denied n1: N first-dir/rootig.c (expected I) kb1: expected -kb nm1: did a merge that shouldn't have been done uv1: didnt get cvs.exe [a-z]*: loginfo:1: no such user variable ${=ZEE} NT2: cvs.exe [a-z]*: syntax error in /tmp/cvs-sanity/cvsroot/CVSROOT/config: line 'bogus line' is missing '=' NU: not unix filesystem P: cvs.exe checkout: warning: this CVS does not support PreservePermissions FL: funny lock message Regards, Murray Bishop --------------461F66AE7C2A Content-Type: application/x-sh; name="doit.sh" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="doit.sh" #! /bin/sh tests="basica basicb basicc basic1 deep basic2" # Branching, tagging, removing, adding, multiple directories tests="${tests} rdiff death death2 branches branches2" tests="${tests} rcslib multibranch import importb importc" tests="${tests} join join2 join3" tests="${tests} new newb conflicts conflicts2 conflicts3" # Checking out various places (modules, checkout -d, &c) tests="${tests} modules modules2 modules3 modules4" tests="${tests} cvsadm emptydir abspath toplevel" # Log messages, error messages. tests="${tests} mflag editor errmsg1 errmsg2" # Watches, binary files, history browsing, &c. tests="${tests} devcom devcom2 devcom3 watch4" tests="${tests} ignore binfiles binfiles2 mcopy binwrap binwrap2" tests="${tests} binwrap3 mwrap info config" tests="${tests} serverpatch log log2 ann crerepos rcs rcs2" tests="${tests} history" tests="${tests} big modes stamps" # PreservePermissions stuff: permissions, symlinks et al. tests="${tests} perms symlinks hardlinks" # More tag and branch tests, keywords. tests="${tests} sticky keyword keywordlog" tests="${tests} head tagdate multibranch2" # "cvs admin", reserved checkouts. tests="${tests} admin reserved" # Nuts and bolts of diffing/merging (diff library, &c) tests="${tests} diffmerge1 diffmerge2" # for testing with repository on OS/2 peer TESTDIR=//mbishop_xl566/d/mont1/tmp/cvs-sanity export TESTDIR TMPPWD=[/\\][/\\]mbishop_xl566[/\\]d[/\\]mont1[/\\]tmp[/\\]cvs-sanity export TMPPWD # for testing with repository on Netware TESTDIR=//acna-cts2/vol1/sw/data/share/mbishop/tmp/cvs-sanity export TESTDIR TMPPWD=[/\\][/\\]acna-cts2[/\\]vol1[/\\]sw[/\\]data[/\\]share[/\\]mbishop[/\\]tmp[/\\]cvs-sanity export TMPPWD # for testing on local disk TESTDIR=/tmp/cvs-sanity export TESTDIR TMPPWD="[A-Za-z:]*[/\\]tmp[/\\]cvs-sanity" export TMPPWD TESTSHELL=sh if test "x`uname`" = "xCYGWIN32_NT"; then TESTSHELL="bash" fi echo "Test directory is ${TESTDIR}" echo "sanity.sh to use is $1" echo "Cvs to test is $2" echo "TESTSHELL is ${TESTSHELL}" echo "TMPPWD is ${TMPPWD}" for test in $tests ; do commie="${TESTSHELL} $1 $2 $test" echo " ${commie}" ${commie} cp -v check.log check.log-${test} done --------------461F66AE7C2A Content-Type: text/plain; charset=us-ascii; name="diff5a.txt" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="diff5a.txt" Index: ccvs/diff/ChangeLog =================================================================== RCS file: /u/safe/ccvs/diff/ChangeLog,v retrieving revision 1.1.1.1 retrieving revision 1.3 diff -c -r1.1.1.1 -r1.3 *** ChangeLog 1998/05/29 00:21:27 1.1.1.1 --- ChangeLog 1998/06/23 05:30:39 1.3 *************** *** 1,3 **** --- 1,13 ---- + 1998-06-22 Murray Bishop + + * diff3.c (diff3_run): disconnect stdin from infile after + output_diff3_merge. + + Fri May 29 13:30:00 1998 Murray Bishop + + * diff.c (compare_files) [__EMX__]: Cope with "nul" file under + OS/2 EMX using the hack from emx port of gnu diffutils. + Fri Jan 16 14:58:19 1998 Larry Jones * diff.c, diff3.c: Plug memory leaks. Index: ccvs/diff/diff.c =================================================================== RCS file: /u/safe/ccvs/diff/diff.c,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -c -r1.1.1.1 -r1.2 *** diff.c 1998/05/29 00:21:27 1.1.1.1 --- diff.c 1998/06/01 04:40:24 1.2 *************** *** 966,971 **** --- 966,987 ---- else stat_result = stat (inf[i].name, &inf[i].stat); + /* EMX bug - we can't stat("nul",&sb), + * (but can fd = open("nul",...), fstat(fd,&sb) + * - but that doesn't really help us pass death2-diff-2 in sanity.sh + * The kludge below is from the emx port of GNU diffutils + */ + #ifdef __EMX__ + /* HACK: Treat 'nul' as a nonexistent file. */ + if (stat_result != 0 && errno == EINVAL + && stricmp (inf[i].name, "nul") == 0) + { + stat_result = 0; + inf[i].desc = -1; + } + #endif /*__EMX__*/ + + if (stat_result != 0) { perror_with_name (inf[i].name); Index: ccvs/diff/diff3.c =================================================================== RCS file: /u/safe/ccvs/diff/diff3.c,v retrieving revision 1.1.1.1 retrieving revision 1.3 diff -c -r1.1.1.1 -r1.3 *** diff3.c 1998/05/29 00:21:27 1.1.1.1 --- diff3.c 1998/07/05 21:28:26 1.3 *************** *** 425,430 **** --- 425,441 ---- tag_strings[0], tag_strings[1], tag_strings[2]); else if (merge) { + /* On Windows-NT 4.0 Service Pack 3, Novell Intranetware Client 4.11a, + Microsoft Visual C++ 4.2, + not disconnecting stdin from the disk file causes failure to + open( , O_CREAT | O_TRUNC ...) windows-NT/filesubr.c(copy_file) + in sanity.sh test conflicts-130. + (there is no problem with tests on local NTFS disk) + + work around by using dup */ + + int stdin_save = dup(0); + if (! freopen (file[rev_mapping[FILE0]], "r", stdin)) diff3_perror_with_exit (file[rev_mapping[FILE0]]); conflicts_found *************** *** 432,437 **** --- 443,455 ---- tag_strings[0], tag_strings[1], tag_strings[2]); if (ferror (stdin)) diff3_fatal ("read error"); + + /* close file[rev_mapping[FILE0]], re-connect stdin to where it was + before freopen. */ + dup2( stdin_save, 0 ); + + /* give handle back to os */ + close( stdin_save ); } else { Index: ccvs/lib/ChangeLog =================================================================== RCS file: /u/safe/ccvs/lib/ChangeLog,v retrieving revision 1.1.1.1 retrieving revision 1.3 diff -c -r1.1.1.1 -r1.3 *** ChangeLog 1998/05/29 00:21:38 1.1.1.1 --- ChangeLog 1998/07/05 21:28:30 1.3 *************** *** 1,6 **** --- 1,20 ---- + 1998-05-27 Murray Bishop + + * getdate.y (get_date): Use (Start == -1) rather than (Start < 0) + so that Convert failures are detected when time_t is unsigned + (as it is on EMX gcc port). + + Tue Mar 24 16:08:00 1998 Ian Lance Taylor * Makefile.in (CFLAGS): Set to @CFLAGS@, not -g. + + 1998-05-19 Murray Bishop + + Murray Bishop applies the Andreas Huber + patches for cvs-1.9.27 + + * system.h (CVS_CHMOD): Define as chmod if undefined. 1998-02-20 Jim Kingdon Index: ccvs/lib/getdate.c =================================================================== RCS file: /u/safe/ccvs/lib/getdate.c,v retrieving revision 1.1.1.1 retrieving revision 1.3 diff -c -r1.1.1.1 -r1.3 *** getdate.c 1998/05/29 00:21:39 1.1.1.1 --- getdate.c 1998/06/11 03:46:46 1.3 *************** *** 991,997 **** if (yyHaveDate || yyHaveTime || yyHaveDay) { Start = Convert(yyMonth, yyDay, yyYear, yyHour, yyMinutes, yySeconds, yyMeridian, yyDSTmode); ! if (Start < 0) return -1; } else { --- 991,997 ---- if (yyHaveDate || yyHaveTime || yyHaveDay) { Start = Convert(yyMonth, yyDay, yyYear, yyHour, yyMinutes, yySeconds, yyMeridian, yyDSTmode); ! if (Start == -1) return -1; } else { Index: ccvs/lib/getdate.y =================================================================== RCS file: /u/safe/ccvs/lib/getdate.y,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -c -r1.1.1.1 -r1.2 *** getdate.y 1998/05/29 00:21:39 1.1.1.1 --- getdate.y 1998/06/01 04:41:00 1.2 *************** *** 977,983 **** if (yyHaveDate || yyHaveTime || yyHaveDay) { Start = Convert(yyMonth, yyDay, yyYear, yyHour, yyMinutes, yySeconds, yyMeridian, yyDSTmode); ! if (Start < 0) return -1; } else { --- 977,983 ---- if (yyHaveDate || yyHaveTime || yyHaveDay) { Start = Convert(yyMonth, yyDay, yyYear, yyHour, yyMinutes, yySeconds, yyMeridian, yyDSTmode); ! if (Start == -1) return -1; } else { Index: ccvs/lib/system.h =================================================================== RCS file: /u/safe/ccvs/lib/system.h,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -c -r1.1.1.1 -r1.2 *** system.h 1998/05/29 00:21:42 1.1.1.1 --- system.h 1998/05/29 01:55:53 1.2 *************** *** 469,474 **** --- 469,478 ---- #define CVS_FNMATCH fnmatch #endif + #ifndef CVS_CHMOD + #define CVS_CHMOD chmod + #endif + #if defined (__CYGWIN32__) || defined (WIN32) /* Under Windows NT, filenames are case-insensitive, and both / and \ Index: ccvs/src/ChangeLog =================================================================== RCS file: /u/safe/ccvs/src/ChangeLog,v retrieving revision 1.1.1.1 retrieving revision 1.5 diff -c -r1.1.1.1 -r1.5 *** ChangeLog 1998/05/29 00:21:50 1.1.1.1 --- ChangeLog 1998/07/07 04:23:55 1.5 *************** *** 1,3 **** --- 1,60 ---- + 1998-07-07 Murray Bishop + + * sanity.sh: Make local mode mostly runnable on various platforms : + - Windows-NT with cygwin32 b19.1 + - Windows-95 with MKS Toolkit + - OS/2 with EMX + (and test local mode on Linux too) + * cvs.h [FILESYSTEM_TICK]: Define as 1 (second) unless defined. + + 1998-07-06 Murray Bishop + + * client.c(get_responses_and_close): Wait FILESYSTEM_TICK + instead of 1 second to avoid time-stamp races. + * commit.c(commit): Wait FILESYSTEM_TICK + instead of 1 second to avoid time-stamp races. + * update.c(do_update): Wait FILESYSTEM_TICK + instead of 1 second to avoid time-stamp races. + + 1998-06-12 Murray Bishop + + * sanity.sh: Modify as was run for OS/2 EMX testing. + + 1998-05-27 Murray Bishop + + * parseinfo.c (parse_config): have fp_info closed before + returning, even if goto error_return happened. Pass config-5. + + 1998-05-25 Murray Bishop + + * commit.c (commit): Open the -F logfile in text rather than + binary mode to pass log-11 and keywordlog-7 under OS/2 EMX. + + 1998-05-19 Murray Bishop + + Murray Bishop applies the Andreas Huber + patches for cvs-1.9.27 + + * client.c (change_mode) [!CHMOD_BROKEN]: Call CVS_CHMOD + instead of chmod. + * client.c (start_rsh_server): Move -b flag after hostname. + * commit.c (fix_rcs_modes): Use CVS_CHMOD in place of chmod. + * filesubr.c (xchmod): Use CVS_CHMOD in place of chmod. + * filesubr.c (rename_file): Use CVS_RENAME in place of rename. + * import.c (add_rcs_file): Use CVS_CHMOD in place of chmod. + * rcs.c (RCS_checkout): Use CVS_CHMOD in place of chmod. + * rcs.c (RCS_get_cached): Add function. + * rcs.c (RCS_cache_close): Add function. + * rcs.h: add prototypes for RCS_get_cached and RCS_cache_close. + * server.c (server): Set stdin, stdout, stderr into binary mode. + * update.c (patch_file): Use CVS_CHMOD in place of chmod. + + + 1998-06-16 Murray Bishop + + * sanity.sh: Modify to run test for windows-NT using cygwin32 + with compiler MS Visual C++ 4.2. + 1998-04-22 Jim Kingdon * Version 1.9.27. Index: ccvs/src/client.c =================================================================== RCS file: /u/safe/ccvs/src/client.c,v retrieving revision 1.1.1.1 retrieving revision 1.3 diff -c -r1.1.1.1 -r1.3 *** client.c 1998/05/29 00:21:54 1.1.1.1 --- client.c 1998/07/07 04:23:56 1.3 *************** *** 290,296 **** mode &= ~oumask; } ! if (chmod (filename, mode) < 0) return errno; return 0; #endif /* ! CHMOD_BROKEN */ --- 290,296 ---- mode &= ~oumask; } ! if (CVS_CHMOD (filename, mode) < 0) return errno; return 0; #endif /* ! CHMOD_BROKEN */ *************** *** 3388,3394 **** (void) time (&now); if (now == last_register_time) ! sleep (1); /* to avoid time-stamp races */ } return errs; --- 3388,3394 ---- (void) time (&now); if (now == last_register_time) ! sleep (FILESYSTEM_TICK); /* to avoid time-stamp races */ } return errs; *************** *** 4420,4425 **** --- 4420,4426 ---- /* The command line starts out with rsh. */ rsh_argv[i++] = cvs_rsh; + rsh_argv[i++] = CVSroot_hostname; #ifdef RSH_NEEDS_BINARY_FLAG /* "-b" for binary, under OS/2. */ *************** *** 4433,4439 **** rsh_argv[i++] = CVSroot_username; } - rsh_argv[i++] = CVSroot_hostname; rsh_argv[i++] = cvs_server; rsh_argv[i++] = "server"; --- 4434,4439 ---- *************** *** 4495,4500 **** --- 4495,4505 ---- *p++ = cvs_rsh; *p++ = CVSroot_hostname; + + #ifdef RSH_NEEDS_BINARY_FLAG + /* "-b" for binary, under OS/2. */ + *p++ = "-b"; + #endif /* RSH_NEEDS_BINARY_FLAG */ /* If the login names differ between client and server * pass it on to rsh. Index: ccvs/src/commit.c =================================================================== RCS file: /u/safe/ccvs/src/commit.c,v retrieving revision 1.1.1.1 retrieving revision 1.4 diff -c -r1.1.1.1 -r1.4 *** commit.c 1998/05/29 00:21:55 1.1.1.1 --- commit.c 1998/07/07 04:23:58 1.4 *************** *** 422,429 **** if (message) error (1, 0, "cannot specify both a message and a log file"); ! /* FIXME: Why is this binary? Needs more investigation. */ ! if ((logfd = CVS_OPEN (logfile, O_RDONLY | OPEN_BINARY)) < 0) error (1, errno, "cannot open log file %s", logfile); if (fstat(logfd, &statbuf) < 0) --- 422,433 ---- if (message) error (1, 0, "cannot specify both a message and a log file"); ! /* What we have here is the name of file whose contents are ! * the log message. I guess it's better to open text mode for ! * those OS where it makes a difference. ! * (sanity.sh probably works better on EMX OS/2 with text mode) ! */ ! if ((logfd = CVS_OPEN (logfile, O_RDONLY)) < 0) error (1, errno, "cannot open log file %s", logfile); if (fstat(logfd, &statbuf) < 0) *************** *** 674,680 **** (void) time (&now); if (now == last_register_time) { ! sleep (1); /* to avoid time-stamp races */ } } --- 678,684 ---- (void) time (&now); if (now == last_register_time) { ! sleep (FILESYSTEM_TICK); /* to avoid time-stamp races */ } } *************** *** 2309,2315 **** if (sb.st_mode & S_IXUSR) rcs_mode |= S_IXUSR | S_IXGRP | S_IXOTH; rcs_mode &= ~cvsumask; ! if (chmod (rcs, rcs_mode) < 0) error (0, errno, "warning: cannot change mode of %s", rcs); } --- 2313,2319 ---- if (sb.st_mode & S_IXUSR) rcs_mode |= S_IXUSR | S_IXGRP | S_IXOTH; rcs_mode &= ~cvsumask; ! if (CVS_CHMOD (rcs, rcs_mode) < 0) error (0, errno, "warning: cannot change mode of %s", rcs); } Index: ccvs/src/cvs.h =================================================================== RCS file: /u/safe/ccvs/src/cvs.h,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -c -r1.1.1.1 -r1.2 *** cvs.h 1998/05/29 00:21:55 1.1.1.1 --- cvs.h 1998/07/07 04:23:59 1.2 *************** *** 864,866 **** --- 864,883 ---- #if defined(SERVER_SUPPORT) || defined(CLIENT_SUPPORT) #include "server.h" #endif + + + /* + * In various places, CVS waits a tick of the filesystem clock to make + * sure that files have different timestamps. This was coded as sleep (1). + * For some filesystems (eg FAT, FAT32) 2 seconds are needed. + * I've defined FILESYSTEM_TICK in windows-NT/options.h, + * and in src/cvs.h a default of 1 second is defined. + * + * I'm pretty sure that CVS doesn't do enough waiting, but it's too + * hard for me to figure out where to add more. + * See sanity.sh [FILESYSTEM_TICK] for more information. + */ + #ifndef FILESYSTEM_TICK + #define FILESYSTEM_TICK 1 + #endif + Index: ccvs/src/filesubr.c =================================================================== RCS file: /u/safe/ccvs/src/filesubr.c,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -c -r1.1.1.1 -r1.2 *** filesubr.c 1998/05/29 00:21:56 1.1.1.1 --- filesubr.c 1998/05/29 01:56:24 1.2 *************** *** 388,394 **** if (noexec) return; ! if (chmod (fname, mode) < 0) error (0, errno, "cannot change mode of file %s", fname); } --- 388,394 ---- if (noexec) return; ! if (CVS_CHMOD (fname, mode) < 0) error (0, errno, "cannot change mode of file %s", fname); } *************** *** 410,416 **** if (noexec) return; ! if (rename (from, to) < 0) error (1, errno, "cannot rename file %s to %s", from, to); } --- 410,416 ---- if (noexec) return; ! if (CVS_RENAME (from, to) < 0) error (1, errno, "cannot rename file %s to %s", from, to); } Index: ccvs/src/import.c =================================================================== RCS file: /u/safe/ccvs/src/import.c,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -c -r1.1.1.1 -r1.2 *** import.c 1998/05/29 00:21:57 1.1.1.1 --- import.c 1998/05/29 01:56:26 1.2 *************** *** 1315,1321 **** (sb.st_mode & S_IRWXU) >> 6) & ~cvsumask & ~(S_IWRITE | S_IWGRP | S_IWOTH); ! if (chmod (rcs, mode) < 0) { ierrno = errno; if (add_logfp != NULL) --- 1315,1321 ---- (sb.st_mode & S_IRWXU) >> 6) & ~cvsumask & ~(S_IWRITE | S_IWGRP | S_IWOTH); ! if (CVS_CHMOD (rcs, mode) < 0) { ierrno = errno; if (add_logfp != NULL) Index: ccvs/src/parseinfo.c =================================================================== RCS file: /u/safe/ccvs/src/parseinfo.c,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -c -r1.1.1.1 -r1.2 *** parseinfo.c 1998/05/29 00:21:58 1.1.1.1 --- parseinfo.c 1998/06/01 04:41:10 1.2 *************** *** 205,211 **** char *cvsroot; { char *infopath; ! FILE *fp_info; char *line = NULL; size_t line_allocated = 0; size_t len; --- 205,211 ---- char *cvsroot; { char *infopath; ! FILE *fp_info = NULL; /* look like fopen failed */ char *line = NULL; size_t line_allocated = 0; size_t len; *************** *** 380,385 **** --- 380,389 ---- return 0; error_return: + if (fp_info != NULL) + { + fclose( fp_info ); + } if (infopath != NULL) free (infopath); if (line != NULL) Index: ccvs/src/rcs.c =================================================================== RCS file: /u/safe/ccvs/src/rcs.c,v retrieving revision 1.1.1.1 retrieving revision 1.4 diff -c -r1.1.1.1 -r1.4 *** rcs.c 1998/05/29 00:21:59 1.1.1.1 --- rcs.c 1998/07/02 02:23:39 1.4 *************** *** 4591,4597 **** workfile); } ! ret = chmod (workfile, change_rcs_mode ? rcs_mode : sb.st_mode & ~(S_IWRITE | S_IWGRP | S_IWOTH)); --- 4591,4597 ---- workfile); } ! ret = CVS_CHMOD (workfile, change_rcs_mode ? rcs_mode : sb.st_mode & ~(S_IWRITE | S_IWGRP | S_IWOTH)); *************** *** 4599,4605 **** if (fclose (ofp) < 0) error (1, errno, "cannot close %s", workfile); ! ret = chmod (workfile, sb.st_mode & ~(S_IWRITE | S_IWGRP | S_IWOTH)); #endif if (ret < 0) --- 4599,4605 ---- if (fclose (ofp) < 0) error (1, errno, "cannot close %s", workfile); ! ret = CVS_CHMOD (workfile, sb.st_mode & ~(S_IWRITE | S_IWGRP | S_IWOTH)); #endif if (ret < 0) *************** *** 8575,8577 **** --- 8575,8589 ---- return label; } + FILE* RCS_get_cached (name) + const char* name; + { + return cached_rcs != NULL && + strcmp (cached_rcs->path, name) == 0 ? + cached_rcsbuf.fp : NULL; + } + + void RCS_cache_close () + { + rcsbuf_cache_close (); + } Index: ccvs/src/rcs.h =================================================================== RCS file: /u/safe/ccvs/src/rcs.h,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -c -r1.1.1.1 -r1.2 *** rcs.h 1998/05/29 00:22:00 1.1.1.1 --- rcs.h 1998/05/29 01:56:30 1.2 *************** *** 236,238 **** --- 236,241 ---- extern int add_rcs_file PROTO ((char *, char *, char *, char *, char *, char *, char *, int, char **, char *, size_t, FILE *)); + + FILE* RCS_get_cached PROTO ((const char *)); + void RCS_cache_close PROTO ((void)); Index: ccvs/src/sanity.sh =================================================================== RCS file: /u/safe/ccvs/src/sanity.sh,v retrieving revision 1.1.1.1 retrieving revision 1.9 diff -c -r1.1.1.1 -r1.9 *** sanity.sh 1998/05/29 00:22:01 1.1.1.1 --- sanity.sh 1998/07/07 19:43:36 1.9 *************** *** 129,134 **** --- 129,323 ---- fi fi + + + + # Here are a bunch of things that let sanity.sh run better on EMX + # and on windows-NT. + + # FIXME: The detection of OS_COMPILER_EMU only tests for OS. + # Is there some way to tell what compiled cvs? If so, then things + # like cygwin32 compiled cvs might be handled. + + OS_COMPILER_EMU="" + if test x"${OS2_SHELL}" != x; then + OS_COMPILER_EMU="os2_gcc_emx" + fi + if test x"${OS}" = x"Windows_NT"; then + OS_COMPILER_EMU="win32_msvc_cygwin32" + fi + if test "x`uname`" = "xWindows_95"; then + OS_COMPILER_EMU="win95_msvc_mks" + fi + + case $OS_COMPILER_EMU in + os2_gcc_emx) + echo "Bending sanity.sh for ${OS_COMPILER_EMU}" + + # Regexp to match the name of a temporary file (from cvs_temp_name). + # redefine to allow colon + tempname="[-a-zA-Z0-9/.%_:]*" + + # when asked `type -p sh`, pd korn shell for OS/2 5.27 says + # "sh is a tracked alias for d:\gnu\bin/sh.exe" + TESTSHELL=sh + + # On OS/2 and Windows-NT, we can't make directories readonly with + # chmod -w + # When the line below is uncommented, test needing that are not run + CANT_PROTECT_DIRS=1 + + # On OS/2 and Windows-NT, sometimes we can't run shell scripts by + # naming them. + # When the line below is uncommented, hack around such problems + # Andreas Huber says when he is finished his port of 1.9.28.1 + # scripts will run ok. + CANT_RUN_SCRIPTS=1 + + # On OS/2 with EMX, invoke edhack.exe instead of a shell script editme + # You'll need edhack.exe on your path for this one + # You can find a copy below in this file (look for edhack.c) + EDHACK_EDITOR=1 + + # On OS/2 and Win-NT do tests for PreservePermissions only if asked + # (that way, default sanity.sh run is easy) + WONT_PRESERVE_PERMISSIONS=1 + + # OS/2 (EMX) ls - GNU file utilities 3.13 shows things like drwxa-- + # rather than -r--r--r--. this breaks most of modes) test, so don't + # do it unless asked. + BROKEN_LS_L=1 + + # DEVNULL is used for expr comparison (like macro in src/cvs.h + # (/dev/null) and also in windows-NT/config.h (nul) for + # OS/2 emx gcc and Windows-NT MSVC++ want nul + DEVNULL=nul + DEVNULL_TIME="[a-zA-Z0-9: ]*" + + # OS/2 EMX and cygwin32 have cat and echo emit lines with crlf at end + # This is no good for For making RCS files, so the kludge crlf2lf.exe + # can be used instead (you'll need it on your path) + # You can find a copy below in this file (look for crlf2lf.c) + CRLF_ENDLINES=1 + + + SLASH="/" + ;; + win32_msvc_cygwin32) + echo "Bending sanity.sh for ${OS_COMPILER_EMU}" + tempname="[-a-zA-Z0-9/\\.%_:]*" + + # reserved-13b works like this + TESTSHELL=sh + + CANT_PROTECT_DIRS=1 + CANT_RUN_SCRIPTS=1 + EDHACK_EDITOR=1 + WONT_PRESERVE_PERMISSIONS=1 + + # FIXME: cygwyn32 is a lot less broken than emx, and may possibly + # be made to work. + # For instance, emx fails at modes-5, but nt fails at modes-7b + # when the BROKEN_LS_L isn't defined. + # On the other hand, maybe cygwin32 not passing modes) is a real bug. + BROKEN_LS_L=1 + DEVNULL=nul + CRLF_ENDLINES=1 + + # Some RCS outputs have \ rather than / on windows-NT when + # compiled by MS Visual C++ + SLASH="[/\\]" + + # death2-diff tests give ? as filetime of nul + DEVNULL_TIME="?" + ;; + win95_msvc_mks) + echo "Bending sanity.sh for ${OS_COMPILER_EMU}" + tempname="[-a-zA-Z0-9/\\.%_:]*" + + # MKS ksh seems to run DOS type rather than *nix type, so + # shell detection just doesn't work. + TESTSHELL=sh + + CANT_PROTECT_DIRS=1 + CANT_RUN_SCRIPTS=1 + EDHACK_EDITOR=1 + WONT_PRESERVE_PERMISSIONS=1 + + # FIXME: cygwyn32 is a lot less broken than emx, and may possibly + # be made to work. + # For instance, emx fails at modes-5, but nt fails at modes-7b + # when the BROKEN_LS_L isn't defined. + # On the other hand, maybe cygwin32 not passing modes) is a real bug. + BROKEN_LS_L=1 + DEVNULL=nul + CRLF_ENDLINES=1 + + # Some RCS outputs have \ rather than / on windows-NT when + # compiled by MS Visual C++ + SLASH="[/\\]" + + # death2-diff tests give ? as filetime of nul + DEVNULL_TIME="?" + DEVNULL_TIME="[a-zA-Z0-9: ]*" + ;; + *) + DEVNULL=/dev/null + SLASH="/" + DEVNULL_TIME="[a-zA-Z0-9: ]*" + FILESYSTEM_TICK=0 + ;; + esac + + + # here is a hack that converts files with cr lf end lines to lf endlines + lf_endlines () + { + if test x"${CRLF_ENDLINES}" = x; then + return 0 + fi + crlf2lf <$1 /tmp/lf$$ + cp /tmp/lf$$ $1 + rm -f /tmp/lf$$ + return 0 + } + # /* crlf2lf.c */ + # #include + # + # int Usage( const char * pszPgmname ) + # { + # fprintf( stdout, "Usage: %s OUTFILE\n", pszPgmname ); + # fprintf( stdout, + # "\n" + # "Copy stdin to OUTFILE replacing crlf by lf.\n"); + # return 1; + # } + # + # int main(int argc, const char * argv[]) + # { + # FILE * pOutFile; + # int i; + # + # if (argc != 2) + # { + # return Usage(argv[0]); + # } + # pOutFile = fopen( argv[1], "wb"); + # if (0 == pOutFile) + # { + # printf("Can't open %s for writing\n", argv[1]); + # return Usage(argv[0]); + # } + # + # while (EOF != (i= getc(stdin))) + # putc(i, pOutFile); + # return 0; + # + # fflush( pOutFile ); + # } + + + # FIXME: try things (what things? checkins?) without -m. # # Some of these tests are written to expect -Q. But testing with *************** *** 529,536 **** # ln -s realdir testdir # TESTDIR=/tmp/cvs-sanity/testdir # TMPPWD=/tmp/cvs-sanity/realdir - TMPPWD=`pwd` # Avoid picking up any stray .cvsrc, etc., from the user running the tests mkdir home HOME=${TESTDIR}/home; export HOME --- 718,819 ---- # ln -s realdir testdir # TESTDIR=/tmp/cvs-sanity/testdir # TMPPWD=/tmp/cvs-sanity/realdir + # allow overide of TMPPWD from outside sanity.sh + + if test x"${TMPPWD}" = x; then + if test x"${SLASH}" = x"/"; then + TMPPWD=`pwd` + else + if test x"${TESTDIR}" = x"/tmp/cvs-sanity"; then + + # but here's a hack that makes basic2-64 happier with winnt, MS Visual C++ 4.0 + # and cygwin32 beta19 bash by accepting optional drive letter and slosh + # instead of slash + TMPPWD=[A-Za-z:]*${SLASH}tmp${SLASH}cvs-sanity + + else + echo '${SLASH} != / and ${TESTDIR} != /tmp/cvs-sanity. TMPPWD will be wrongly set' + fi + fi + fi + + + # In various places, CVS waits a tick of the filesystem clock to make + # sure that files have different timestamps. This was coded as sleep (1). + # For some filesystems (eg FAT, FAT32) 2 seconds are needed. + # In my local cvs, I've defined FILESYSTEM_TICK in windows-NT/options.h, + # and in src/cvs.h a default of 1 second is defined. + # + # I found some timing problems using sanity.sh Windows-95 on Pentium 90 + # with MKS Toolkit and FAT. These are worse on Pentium-II 333. + # On the other hand, I didn't see these problems withPentium 133 NT and + # cygwin32 on a netware 4.10 server for which the script below reports + # 2 seconds per filesystem tick. + # Nor did I see these problems with OS/2 HPFS using EMX port. + # + # Perhaps part of the problem is not + # + # I suspect that CVS doesn't sleep in enough places for this to work + # properly. + # + # multibranch2 often fails, as does the second ci here : + # cvs add file1 + # cvs ci + # echo foo >file1 + # cvs ci + # + # Windows_95 on Pentium 90 using FAT I found that I had about 18 mostly + # consistent failures where sanity.sh expected a file just modified + # in the sandbox to be checked in and cvs didn't do that. + # When I ran on Pentium-II 333 (FAT32) I got about 30. + # Eventually, I tried putting sleep before the echo command modifying + # the file - problem gone. + # I'm told FAT doesn't keep the low order bit of time in seconds. + # + # The code below works out the number of seconds (>=0) to wait between + # creating files to be sure that they have different timestamps. + # I've put sleeps where they seem to be needed (before + # echo cat or cp before ci modified, + # before update -r, + # before tag -b branch) + # + # Having different timestamps on fileX and in CVS/Entries for fileX is + # how cvs decides file is modified since checkout. Detection would be + # more robust if bytesize was also compared. + # Would changing the Entries file be a bad thing? + # + # Murray Bishop, 1 July 98 + + if test "x${FILESYSTEM_TICK}" = "x"; then + seconds=0 + while test "x${FILESYSTEM_TICK}" = "x"; do + echo tock >tick1 + sleep ${seconds} + echo tock >tick2 + sleep ${seconds} + echo tock >tick3 + sleep ${seconds} + echo tock >tick4 + sleep ${seconds} + echo tock >tick5 + if test tick1 -ot tick2 \ + -a tick2 -ot tick3 \ + -a tick3 -ot tick4 \ + -a tick4 -ot tick5; then + FILESYSTEM_TICK=${seconds} + fi + seconds=`expr ${seconds} + 1` + done + rm tick1 tick2 tick3 tick4 tick5 + fi + if test "x${FILESYSTEM_TICK}" != "x0"; then + : When we depart from distribution behavior - say so. + echo "Waiting ${FILESYSTEM_TICK} seconds between creating files gives different modified times." + fi + + + # Avoid picking up any stray .cvsrc, etc., from the user running the tests mkdir home HOME=${TESTDIR}/home; export HOME *************** *** 564,574 **** tests="${tests} devcom devcom2 devcom3 watch4" tests="${tests} ignore binfiles binfiles2 mcopy binwrap binwrap2" tests="${tests} binwrap3 mwrap info config" tests="${tests} serverpatch log log2 ann crerepos rcs rcs2" tests="${tests} history" ! tests="${tests} big modes stamps" ! # PreservePermissions stuff: permissions, symlinks et al. ! tests="${tests} perms symlinks hardlinks" # More tag and branch tests, keywords. tests="${tests} sticky keyword keywordlog" tests="${tests} head tagdate multibranch2" --- 847,868 ---- tests="${tests} devcom devcom2 devcom3 watch4" tests="${tests} ignore binfiles binfiles2 mcopy binwrap binwrap2" tests="${tests} binwrap3 mwrap info config" + tests="${tests} serverpatch log log2 ann crerepos rcs rcs2" tests="${tests} history" ! tests="${tests} big" ! if test x"${BROKEN_LS_L}" = x; then ! tests="${tests} modes" ! else ! echo "Won't run modes test - BROKEN_LS_L" ! fi ! tests="${tests} stamps" ! if test x"${WONT_PRESERVE_PERMISSIONS}" = x; then ! # PreservePermissions stuff: permissions, symlinks et al. ! tests="${tests} perms symlinks hardlinks" ! else ! echo "Won't run perms symlinks hardlinks tests - WONT_PRESERVE_PERMISSIONS" ! fi # More tag and branch tests, keywords. tests="${tests} sticky keyword keywordlog" tests="${tests} head tagdate multibranch2" *************** *** 593,604 **** ISDIFF=false cd $DIR_1 ! find . -print | fgrep -v /CVS | sort > /tmp/dc$$d1 # go back where we were to avoid symlink hell... cd $OLDPWD cd $DIR_2 ! find . -print | fgrep -v /CVS | sort > /tmp/dc$$d2 if diff /tmp/dc$$d1 /tmp/dc$$d2 >/dev/null 2>&1 then --- 887,899 ---- ISDIFF=false cd $DIR_1 ! # EMX gnu find 4.1 emits CVS rather than ./CVS ! find . -print | fgrep -v CVS | sort > /tmp/dc$$d1 # go back where we were to avoid symlink hell... cd $OLDPWD cd $DIR_2 ! find . -print | fgrep -v CVS | sort > /tmp/dc$$d2 if diff /tmp/dc$$d1 /tmp/dc$$d2 >/dev/null 2>&1 then *************** *** 963,968 **** --- 1258,1264 ---- ${TESTDIR}/cvsroot/first-dir/sdir2/sfile2,v <-- sfile2 initial revision: 1\.1 done" + sleep ${FILESYSTEM_TICK} echo sfile1 develops >Emptydir/sfile1 dotest basicb-6 "${testcvs} -q ci -m modify" \ "Checking in Emptydir/sfile1; *************** *** 1726,1731 **** --- 2022,2028 ---- cd $i # modify a file + sleep ${FILESYSTEM_TICK} echo file6 >>file6 # delete a file *************** *** 1866,1872 **** fi # directory copies are done in an oblique way in order to avoid a bug in sun's tmp filesystem. ! mkdir first-dir.cpy ; (cd first-dir ; tar cf - . | (cd ../first-dir.cpy ; tar xf -)) directory_cmp first-dir export-dir --- 2163,2180 ---- fi # directory copies are done in an oblique way in order to avoid a bug in sun's tmp filesystem. ! if test "x${OS_COMPILER_EMU}" = "xwin95_msvc_mks"; then ! # MKS Toolkit on win95 sometimes chokes on the usual way ! mkdir first-dir.cpy ! cd first-dir ! tar cf ${TESTDIR}/ball.tar . ! cd ../first-dir.cpy ! tar xf ${TESTDIR}/ball.tar ! rm ${TESTDIR}/ball.tar ! cd .. ! else ! mkdir first-dir.cpy ; (cd first-dir ; tar cf - . | (cd ../first-dir.cpy ; tar xf -)) ! fi directory_cmp first-dir export-dir *************** *** 1914,1920 **** rm -r export-dir first-dir mkdir first-dir ! (cd first-dir.cpy ; tar cf - . | (cd ../first-dir ; tar xf -)) # update the top, cancelling sticky tags, retag, update other copy, compare. cd first-dir --- 2222,2238 ---- rm -r export-dir first-dir mkdir first-dir ! if test "x${OS_COMPILER_EMU}" = "xwin95_msvc_mks"; then ! # MKS Toolkit on win95 sometimes chokes on the usual way ! cd first-dir.cpy ! tar cf ${TESTDIR}/ball.tar . ! cd ../first-dir ! tar xf ${TESTDIR}/ball.tar ! rm ${TESTDIR}/ball.tar ! cd .. ! else ! (cd first-dir.cpy ; tar cf - . | (cd ../first-dir ; tar xf -)) ! fi # update the top, cancelling sticky tags, retag, update other copy, compare. cd first-dir *************** *** 1993,2000 **** T [0-9/]* [0-9:]* ${PLUS}0000 ${username} first-dir \[rtagged-by-tag:rtagged-by-head\] T [0-9/]* [0-9:]* ${PLUS}0000 ${username} first-dir \[rtagged-by-revision:1\.1\] O [0-9/]* [0-9:]* ${PLUS}0000 ${username} \[1\.1\] first-dir =first-dir= ${TMPPWD}/\* ! U [0-9/]* [0-9:]* ${PLUS}0000 ${username} 1\.2 file6 first-dir == ${TMPPWD}/first-dir ! U [0-9/]* [0-9:]* ${PLUS}0000 ${username} 1\.2 file7 first-dir == ${TMPPWD}/first-dir" \ "O [0-9/]* [0-9:]* ${PLUS}0000 ${username} first-dir =first-dir= /\* A [0-9/]* [0-9:]* ${PLUS}0000 ${username} 1\.1 file6 first-dir == A [0-9/]* [0-9:]* ${PLUS}0000 ${username} 1\.1 file7 first-dir == --- 2311,2318 ---- T [0-9/]* [0-9:]* ${PLUS}0000 ${username} first-dir \[rtagged-by-tag:rtagged-by-head\] T [0-9/]* [0-9:]* ${PLUS}0000 ${username} first-dir \[rtagged-by-revision:1\.1\] O [0-9/]* [0-9:]* ${PLUS}0000 ${username} \[1\.1\] first-dir =first-dir= ${TMPPWD}/\* ! U [0-9/]* [0-9:]* ${PLUS}0000 ${username} 1\.2 file6 first-dir == ${TMPPWD}${SLASH}first-dir ! U [0-9/]* [0-9:]* ${PLUS}0000 ${username} 1\.2 file7 first-dir == ${TMPPWD}${SLASH}first-dir" \ "O [0-9/]* [0-9:]* ${PLUS}0000 ${username} first-dir =first-dir= /\* A [0-9/]* [0-9:]* ${PLUS}0000 ${username} 1\.1 file6 first-dir == A [0-9/]* [0-9:]* ${PLUS}0000 ${username} 1\.1 file7 first-dir == *************** *** 2042,2047 **** --- 2360,2366 ---- U trdiff/bar U trdiff/foo" cd trdiff + sleep ${FILESYSTEM_TICK} echo something >> foo dotest rdiff-3 \ "${testcvs} ci -m added-something foo" \ *************** *** 2104,2111 **** ! \$''Name: local-v0 \$ ! something Index: trdiff/new ! diff -c /dev/null trdiff/new:1\.1 ! \*\*\* /dev/null .* --- trdiff/new .* \*\*\*\*\*\*\*\*\*\*\*\*\*\*\* \*\*\* 0 \*\*\*\* --- 2423,2430 ---- ! \$''Name: local-v0 \$ ! something Index: trdiff/new ! diff -c '"${DEVNULL}"' trdiff/new:1\.1 ! \*\*\* '"${DEVNULL}"' .* --- trdiff/new .* \*\*\*\*\*\*\*\*\*\*\*\*\*\*\* \*\*\* 0 \*\*\*\* *************** *** 2259,2264 **** --- 2578,2584 ---- T file2' # branch1 + sleep ${FILESYSTEM_TICK} if ${CVS} tag -b branch1 ; then pass 73 else *************** *** 2266,2271 **** --- 2586,2592 ---- fi # and move to the branch. + sleep ${FILESYSTEM_TICK} if ${CVS} update -r branch1 ; then pass 74 else *************** *** 2292,2299 **** dotest death-76a0 \ "${testcvs} -q rdiff -r bp_branch1 -r branch1 first-dir" \ "Index: first-dir/file3 ! diff -c /dev/null first-dir/file3:1\.1\.2\.1 ! \*\*\* /dev/null .* --- first-dir/file3 .* \*\*\*\*\*\*\*\*\*\*\*\*\*\*\* \*\*\* 0 \*\*\*\* --- 2613,2620 ---- dotest death-76a0 \ "${testcvs} -q rdiff -r bp_branch1 -r branch1 first-dir" \ "Index: first-dir/file3 ! diff -c ${DEVNULL} first-dir/file3:1\.1\.2\.1 ! \*\*\* ${DEVNULL} .* --- first-dir/file3 .* \*\*\*\*\*\*\*\*\*\*\*\*\*\*\* \*\*\* 0 \*\*\*\* *************** *** 2456,2461 **** --- 2777,2783 ---- fi # typo; try to get to the branch and fail + sleep ${FILESYSTEM_TICK} dotest_fail 92.1a "${testcvs} update -r brnach1" \ "${PROG}"' \[[a-z]* aborted\]: no such tag brnach1' # Make sure we are still on the trunk *************** *** 2471,2476 **** --- 2793,2799 ---- fi # back to branch1 + sleep ${FILESYSTEM_TICK} if ${CVS} update -r branch1 2>> ${LOGFILE}; then pass 93 else *************** *** 2532,2537 **** --- 2855,2861 ---- done" # Make a branch and a non-branch tag. + sleep ${FILESYSTEM_TICK} dotest death2-4 "${testcvs} -q tag -b branch" \ 'T file1 T file4' *************** *** 2540,2545 **** --- 2864,2870 ---- T file4' # Switch over to the branch. + sleep ${FILESYSTEM_TICK} dotest death2-6 "${testcvs} -q update -r branch" '' # Delete the file on the branch. *************** *** 2561,2567 **** RCS file: file1 diff -N file1 \*\*\* ${tempname}[ ][ ]*[a-zA-Z0-9: ]* ! --- /dev/null[ ][ ]*[a-zA-Z0-9: ]* \*\*\*\*\*\*\*\*\*\*\*\*\*\*\* \*\*\* 1 \*\*\*\* - first revision --- 2886,2892 ---- RCS file: file1 diff -N file1 \*\*\* ${tempname}[ ][ ]*[a-zA-Z0-9: ]* ! --- ${DEVNULL}[ ][ ]*${DEVNULL_TIME} \*\*\*\*\*\*\*\*\*\*\*\*\*\*\* \*\*\* 1 \*\*\*\* - first revision *************** *** 2585,2591 **** RCS file: file1 diff -N file1 \*\*\* ${tempname}[ ][ ]*[a-zA-Z0-9: ]* ! --- /dev/null[ ][ ]*[a-zA-Z0-9: ]* \*\*\*\*\*\*\*\*\*\*\*\*\*\*\* \*\*\* 1 \*\*\*\* - first revision --- 2910,2916 ---- RCS file: file1 diff -N file1 \*\*\* ${tempname}[ ][ ]*[a-zA-Z0-9: ]* ! --- ${DEVNULL}[ ][ ]*${DEVNULL_TIME} \*\*\*\*\*\*\*\*\*\*\*\*\*\*\* \*\*\* 1 \*\*\*\* - first revision *************** *** 2600,2606 **** RCS file: file1 diff -N file1 \*\*\* ${tempname}[ ][ ]*[a-zA-Z0-9: ]* ! --- /dev/null[ ][ ]*[a-zA-Z0-9: ]* \*\*\*\*\*\*\*\*\*\*\*\*\*\*\* \*\*\* 1 \*\*\*\* - first revision --- 2925,2931 ---- RCS file: file1 diff -N file1 \*\*\* ${tempname}[ ][ ]*[a-zA-Z0-9: ]* ! --- ${DEVNULL}[ ][ ]*${DEVNULL_TIME} \*\*\*\*\*\*\*\*\*\*\*\*\*\*\* \*\*\* 1 \*\*\*\* - first revision *************** *** 2635,2641 **** =================================================================== RCS file: file1 diff -N file1 ! \*\*\* /dev/null[ ][ ]*[a-zA-Z0-9: ]* --- ${tempname}[ ][ ]*[a-zA-Z0-9: ]* \*\*\*\*\*\*\*\*\*\*\*\*\*\*\* \*\*\* 0 \*\*\*\* --- 2960,2966 ---- =================================================================== RCS file: file1 diff -N file1 ! \*\*\* ${DEVNULL}[ ][ ]*${DEVNULL_TIME} --- ${tempname}[ ][ ]*[a-zA-Z0-9: ]* \*\*\*\*\*\*\*\*\*\*\*\*\*\*\* \*\*\* 0 \*\*\*\* *************** *** 2688,2693 **** --- 3013,3019 ---- # The ``no longer in the repository'' message doesn't really # look right to me, but that's what CVS currently prints for # this case. + sleep ${FILESYSTEM_TICK} dotest death2-14 "${testcvs} -q update -r branch" \ "[UP] file1 ${PROG} [a-z]*: file2 is no longer in the repository *************** *** 2726,2732 **** =================================================================== RCS file: file3 diff -N file3 ! \*\*\* /dev/null[ ][ ]*[a-zA-Z0-9: ]* --- ${tempname}[ ][ ]*[a-zA-Z0-9: ]* \*\*\*\*\*\*\*\*\*\*\*\*\*\*\* \*\*\* 0 \*\*\*\* --- 3052,3058 ---- =================================================================== RCS file: file3 diff -N file3 ! \*\*\* ${DEVNULL}[ ][ ]*${DEVNULL_TIME} --- ${tempname}[ ][ ]*[a-zA-Z0-9: ]* \*\*\*\*\*\*\*\*\*\*\*\*\*\*\* \*\*\* 0 \*\*\*\* *************** *** 2769,2775 **** =================================================================== RCS file: file2 diff -N file2 ! \*\*\* /dev/null[ ][ ]*[a-zA-Z0-9: ]* --- ${tempname}[ ][ ]*[a-zA-Z0-9: ]* \*\*\*\*\*\*\*\*\*\*\*\*\*\*\* \*\*\* 0 \*\*\*\* --- 3095,3101 ---- =================================================================== RCS file: file2 diff -N file2 ! \*\*\* ${DEVNULL}[ ][ ]*${DEVNULL_TIME} --- ${tempname}[ ][ ]*[a-zA-Z0-9: ]* \*\*\*\*\*\*\*\*\*\*\*\*\*\*\* \*\*\* 0 \*\*\*\* *************** *** 2779,2785 **** =================================================================== RCS file: file3 diff -N file3 ! \*\*\* /dev/null[ ][ ]*[a-zA-Z0-9: ]* --- ${tempname}[ ][ ]*[a-zA-Z0-9: ]* \*\*\*\*\*\*\*\*\*\*\*\*\*\*\* \*\*\* 0 \*\*\*\* --- 3105,3111 ---- =================================================================== RCS file: file3 diff -N file3 ! \*\*\* ${DEVNULL}[ ][ ]*${DEVNULL_TIME} --- ${tempname}[ ][ ]*[a-zA-Z0-9: ]* \*\*\*\*\*\*\*\*\*\*\*\*\*\*\* \*\*\* 0 \*\*\*\* *************** *** 2790,2802 **** RCS file: file4 diff -N file4 \*\*\* ${tempname}[ ][ ]*[a-zA-Z0-9: ]* ! --- /dev/null[ ][ ]*[a-zA-Z0-9: ]* \*\*\*\*\*\*\*\*\*\*\*\*\*\*\* \*\*\* 1 \*\*\*\* - file4 first revision --- 0 ----" # Switch to the nonbranch tag. dotest death2-19 "${testcvs} -q update -r tag" \ "[UP] file1 ${PROG} [a-z]*: file2 is no longer in the repository --- 3116,3129 ---- RCS file: file4 diff -N file4 \*\*\* ${tempname}[ ][ ]*[a-zA-Z0-9: ]* ! --- ${DEVNULL}[ ][ ]*${DEVNULL_TIME} \*\*\*\*\*\*\*\*\*\*\*\*\*\*\* \*\*\* 1 \*\*\*\* - file4 first revision --- 0 ----" # Switch to the nonbranch tag. + sleep ${FILESYSTEM_TICK} dotest death2-19 "${testcvs} -q update -r tag" \ "[UP] file1 ${PROG} [a-z]*: file2 is no longer in the repository *************** *** 2814,2820 **** =================================================================== RCS file: file1 diff -N file1 ! \*\*\* /dev/null[ ][ ]*[a-zA-Z0-9: ]* --- ${tempname}[ ][ ]*[a-zA-Z0-9: ]* \*\*\*\*\*\*\*\*\*\*\*\*\*\*\* \*\*\* 0 \*\*\*\* --- 3141,3147 ---- =================================================================== RCS file: file1 diff -N file1 ! \*\*\* ${DEVNULL}[ ][ ]*${DEVNULL_TIME} --- ${tempname}[ ][ ]*[a-zA-Z0-9: ]* \*\*\*\*\*\*\*\*\*\*\*\*\*\*\* \*\*\* 0 \*\*\*\* *************** *** 2866,2871 **** --- 3193,3199 ---- initial revision: 1.1 done HERE + sleep ${FILESYSTEM_TICK} echo 4:trunk-2 >file4 dotest branches-3.2 "${testcvs} -q ci -m trunk-before-branch" \ "Checking in file4; *************** *** 2879,2891 **** --- 3207,3222 ---- T file2 T file3 T file4" + sleep ${FILESYSTEM_TICK} dotest branches-4 "${testcvs} tag -b br1" "${PROG}"' [a-z]*: Tagging \. T file1 T file2 T file3 T file4' + sleep ${FILESYSTEM_TICK} dotest branches-5 "${testcvs} update -r br1" \ "${PROG}"' [a-z]*: Updating \.' + sleep ${FILESYSTEM_TICK} echo 1:br1 >file1 echo 2:br1 >file2 echo 4:br1 >file4 *************** *** 2902,2912 **** --- 3233,3246 ---- ${TESTDIR}/cvsroot/first-dir/file4,v <-- file4 new revision: 1\.2\.2\.1; previous revision: 1\.2 done" + sleep ${FILESYSTEM_TICK} dotest branches-7 "${testcvs} -q tag -b brbr" 'T file1 T file2 T file3 T file4' + sleep ${FILESYSTEM_TICK} dotest branches-8 "${testcvs} -q update -r brbr" '' + sleep ${FILESYSTEM_TICK} echo 1:brbr >file1 echo 4:brbr >file4 dotest branches-9 "${testcvs} -q ci -m modify" \ *************** *** 2922,2927 **** --- 3256,3262 ---- 2:br1 3:ancest 4:brbr' + sleep ${FILESYSTEM_TICK} dotest branches-11 "${testcvs} -q update -r br1" \ '[UP] file1 [UP] file4' *************** *** 2929,2934 **** --- 3264,3270 ---- 2:br1 3:ancest 4:br1' + sleep ${FILESYSTEM_TICK} echo 4:br1-2 >file4 dotest branches-12.2 "${testcvs} -q ci -m change-on-br1" \ "Checking in file4; *************** *** 2942,2947 **** --- 3278,3284 ---- 2:ancest 3:ancest 4:trunk-2' + sleep ${FILESYSTEM_TICK} echo 4:trunk-3 >file4 dotest branches-14.2 \ "${testcvs} -q ci -m trunk-change-after-branch" \ *************** *** 3082,3088 **** --- 3419,3427 ---- dotest branches2-4 "${testcvs} -q tag tag1" 'T file1' # Make two branches. + sleep ${FILESYSTEM_TICK} dotest branches2-5 "${testcvs} -q rtag -b -r tag1 b1 first-dir" '' + sleep ${FILESYSTEM_TICK} dotest branches2-6 "${testcvs} -q rtag -b -r tag1 b2 first-dir" '' # Create some files and a subdirectory on branch b1. *************** *** 3349,3354 **** --- 3688,3694 ---- \*\*\*\*\*\*\*\*\*\*\*\*\*\*\* I am the first foo, and my name is \$""Name: first \$\." + sleep ${FILESYSTEM_TICK} echo "I am the second foo, and my name is $""Name$." > foo.c dotest rcsdiff-6 "${testcvs} commit -m rev2 foo.c" \ "Checking in foo\.c; *************** *** 3377,3382 **** --- 3717,3723 ---- --- > I am the second foo, and my name is \$""Name: \$\." + sleep ${FILESYSTEM_TICK} echo "I am the once and future foo, and my name is $""Name$." > foo.c dotest_fail rcsdiff-10 "${testcvs} diff -r first" \ "${PROG} [a-z]*: Diffing \. *************** *** 3415,3420 **** --- 3756,3762 ---- ${TESTDIR}/cvsroot/first-dir/rgx\.c,v <-- rgx\.c initial revision: 1\.1 done" + sleep ${FILESYSTEM_TICK} cat >rgx.c < f; mv f file1 dotest rcslib-merge-6 "${testcvs} -q commit -m '' file1" \ "Checking in file1; ${TESTDIR}/cvsroot/first-dir/file1,v <-- file1 new revision: 1\.2; previous revision: 1\.1 done" + sleep ${FILESYSTEM_TICK} dotest rcslib-merge-7 "${testcvs} -q tag -b -r 1.1 patch1" "T file1" + sleep ${FILESYSTEM_TICK} dotest rcslib-merge-8 "${testcvs} -q update -r patch1" "[UP] file1" dotest rcslib-merge-9 "${testcvs} -q status" \ "=================================================================== *************** *** 3500,3505 **** --- 3845,3851 ---- '$''Revision: 1\.1 $ 2 3' + sleep ${FILESYSTEM_TICK} sed -e 's/3/three/' file1 > f; mv f file1 dotest rcslib-merge-11 "${testcvs} -q commit -m '' file1" \ "Checking in file1; *************** *** 3553,3580 **** --- 3899,3934 ---- initial revision: 1.1 done HERE + sleep ${FILESYSTEM_TICK} dotest multibranch-4 "${testcvs} tag -b br1" \ "${PROG} [a-z]*: Tagging \. T file1" + sleep ${FILESYSTEM_TICK} dotest multibranch-5 "${testcvs} tag -b br2" \ "${PROG} [a-z]*: Tagging \. T file1" + sleep ${FILESYSTEM_TICK} dotest multibranch-6 "${testcvs} -q update -r br1" '' + sleep ${FILESYSTEM_TICK} echo on-br1 >file1 dotest multibranch-7 "${testcvs} -q ci -m modify-on-br1" \ "Checking in file1; ${TESTDIR}/cvsroot/first-dir/file1,v <-- file1 new revision: 1\.1\.2\.1; previous revision: 1\.1 done" + sleep ${FILESYSTEM_TICK} dotest multibranch-8 "${testcvs} -q update -r br2" '[UP] file1' + sleep ${FILESYSTEM_TICK} echo br2 adds a line >>file1 dotest multibranch-9 "${testcvs} -q ci -m modify-on-br2" \ "Checking in file1; ${TESTDIR}/cvsroot/first-dir/file1,v <-- file1 new revision: 1\.1\.4\.1; previous revision: 1\.1 done" + sleep ${FILESYSTEM_TICK} dotest multibranch-10 "${testcvs} -q update -r br1" '[UP] file1' dotest multibranch-11 "cat file1" 'on-br1' + sleep ${FILESYSTEM_TICK} dotest multibranch-12 "${testcvs} -q update -r br2" '[UP] file1' dotest multibranch-13 "cat file1" '1:trunk-1 br2 adds a line' *************** *** 3691,3696 **** --- 4045,4051 ---- fi # change + sleep ${FILESYSTEM_TICK} echo local-change >> imported-f2 # commit *************** *** 3708,3713 **** --- 4063,4069 ---- fi # update into the vendor branch. + sleep ${FILESYSTEM_TICK} if ${CVS} update -rvendor-branch ; then pass 102 else *************** *** 3739,3744 **** --- 4095,4101 ---- # second import - file4 deliberately unchanged cd ../import-dir + sleep ${FILESYSTEM_TICK} for i in 1 2 3 ; do echo rev 2 of file $i >> imported-f"$i" done *************** *** 3780,3785 **** --- 4137,4143 ---- done # check vendor branch for file4 + sleep ${FILESYSTEM_TICK} if ${CVS} update -rvendor-branch ; then pass 110 else *************** *** 4105,4110 **** --- 4463,4469 ---- done" # Make a branch. + sleep ${FILESYSTEM_TICK} dotest join-4 "${testcvs} -q tag -b branch ." \ 'T file3 T file4 *************** *** 4113,4118 **** --- 4472,4478 ---- # Add file2 and file7, modify file4, and remove file6 and file8. echo 'first revision of file2' > file2 + sleep ${FILESYSTEM_TICK} echo 'second revision of file4' > file4 echo 'first revision of file7' > file7 rm file6 file8 *************** *** 4164,4169 **** --- 4524,4530 ---- # Modify the files on the branch, so that T1 is not an # ancestor of the main line, and add file5 + sleep ${FILESYSTEM_TICK} echo 'first branch revision of file3' > file3 echo 'first branch revision of file4' > file4 echo 'first branch revision of file6' > file6 *************** *** 4331,4336 **** --- 4692,4698 ---- # single revision. # The file2 handling is a bug; see above join-20. cd first-dir + sleep ${FILESYSTEM_TICK} echo 'third revision of file4' > file4 dotest join-23 "${testcvs} -q update -jbranch ." \ "U file1 *************** *** 4361,4371 **** --- 4723,4735 ---- U first-dir/file4 U first-dir/file7' cd first-dir + sleep ${FILESYSTEM_TICK} dotest join-26 "${testcvs} -q tag -b br2" \ "T file2 T file3 T file4 T file7" + sleep ${FILESYSTEM_TICK} dotest join-27 "${testcvs} -q update -r br2" "" # The handling of file8 here looks fishy to me. I don't see # why it should be different from the case where we merge to *************** *** 4414,4421 **** --- 4778,4788 ---- ${TESTDIR}/cvsroot/first-dir/file1,v <-- file1 initial revision: 1\.1 done" + sleep ${FILESYSTEM_TICK} dotest join2-5 "${testcvs} -q tag -b br1" "T file1" + sleep ${FILESYSTEM_TICK} dotest join2-6 "${testcvs} -q update -r br1" "" + sleep ${FILESYSTEM_TICK} echo 'modify on branch' >>file1 touch bradd dotest join2-6a "${testcvs} add bradd" \ *************** *** 4475,4480 **** --- 4842,4848 ---- # OK, the above is all well and good and has worked for some # time. Now try the case where the file had been added on # the branch. + sleep ${FILESYSTEM_TICK} dotest join2-16 "${testcvs} -q update -r br1" "[UP] file1" # The workaround is to update the whole directory. # The non-circumvented version won't work. The reason is that *************** *** 4532,4538 **** --- 4900,4908 ---- initial revision: 1\.1 done" dotest join3-5 "${testcvs} -q tag -b br1" "T file1" + sleep ${FILESYSTEM_TICK} dotest join3-6 "${testcvs} -q update -r br1" "" + sleep ${FILESYSTEM_TICK} echo 'br1:line1' >>file1 dotest join3-7 "${testcvs} -q ci -m modify" \ "Checking in file1; *************** *** 4543,4553 **** --- 4913,4926 ---- # Now back to the trunk for: # another revision and another branch for file1. # add file2, which will exist on trunk and br2 but not br1. + sleep ${FILESYSTEM_TICK} dotest join3-8 "${testcvs} -q update -A" "[UP] file1" + sleep ${FILESYSTEM_TICK} echo 'trunk:line1' > file2 dotest join3-8a "${testcvs} add file2" \ "${PROG} [a-z]*: scheduling file .file2. for addition ${PROG} [a-z]*: use .${PROG} commit. to add this file permanently" + sleep ${FILESYSTEM_TICK} echo 'trunk:line1' >>file1 dotest join3-9 "${testcvs} -q ci -m modify" \ "Checking in file1; *************** *** 4560,4569 **** --- 4933,4944 ---- ${TESTDIR}/cvsroot/first-dir/file2,v <-- file2 initial revision: 1\.1 done" + sleep ${FILESYSTEM_TICK} dotest join3-10 "${testcvs} -q tag -b br2" "T file1 T file2" # Before we actually have any revision on br2, let's try a join + sleep ${FILESYSTEM_TICK} dotest join3-11 "${testcvs} -q update -r br1" "[UP] file1 ${PROG} [a-z]*: file2 is no longer in the repository" dotest join3-12 "${testcvs} -q update -j br2" \ *************** *** 4583,4591 **** --- 4958,4968 ---- rm file1 # OK, we'll try the same thing with a revision on br2. + sleep ${FILESYSTEM_TICK} dotest join3-14 "${testcvs} -q update -r br2 file1" \ "${PROG} [a-z]*: warning: file1 was lost U file1" "U file1" + sleep ${FILESYSTEM_TICK} echo 'br2:line1' >>file1 dotest join3-15 "${testcvs} -q ci -m modify file1" \ "Checking in file1; *************** *** 4594,4599 **** --- 4971,4977 ---- done" # OK, now we can join br2 to br1 + sleep ${FILESYSTEM_TICK} dotest join3-16 "${testcvs} -q update -r br1 file1" "[UP] file1" # It may seem odd, to merge a higher branch into a lower # branch, but in fact CVS defines the ancestor as 1.1 *************** *** 4663,4668 **** --- 5041,5047 ---- pass 122 fi + sleep ${FILESYSTEM_TICK} if ${CVS} update -rHEAD 2>&1 | grep longer ; then fail 123 else *************** *** 4698,4703 **** --- 5077,5083 ---- done" # Make a branch. + sleep ${FILESYSTEM_TICK} dotest newb-123d "${testcvs} -q tag -b branch" "T a" # Check out the branch. *************** *** 4802,4808 **** "${PROG} [a-z]*: Updating first-dir =================================================================== Checking out first-dir/a ! RCS: ${TMPPWD}/cvsroot/first-dir/a,v VERS: 1\.1 \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*" if ${CVS} co first-dir ; then --- 5182,5188 ---- "${PROG} [a-z]*: Updating first-dir =================================================================== Checking out first-dir/a ! RCS: ${TMPPWD}${SLASH}cvsroot${SLASH}first-dir${SLASH}a,v VERS: 1\.1 \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*" if ${CVS} co first-dir ; then *************** *** 4818,4823 **** --- 5198,5204 ---- fi cd ../../1/first-dir + sleep ${FILESYSTEM_TICK} echo add a line >>a mkdir dir1 dotest conflicts-127b "${testcvs} add dir1" \ *************** *** 4839,4845 **** "${PROG} [a-z]*: Updating first-dir =================================================================== Checking out first-dir/a ! RCS: ${TMPPWD}/cvsroot/first-dir/a,v VERS: 1\.2 \*\*\*\*\*\*\*\*\*\*\*\*\*\*\* add a line" --- 5220,5226 ---- "${PROG} [a-z]*: Updating first-dir =================================================================== Checking out first-dir/a ! RCS: ${TMPPWD}${SLASH}cvsroot${SLASH}first-dir${SLASH}a,v VERS: 1\.2 \*\*\*\*\*\*\*\*\*\*\*\*\*\*\* add a line" *************** *** 4849,4854 **** --- 5230,5236 ---- # Now go over the to the other working directory and # start testing conflicts cd 2/first-dir + sleep ${FILESYSTEM_TICK} echo add a conflicting line >>a dotest_fail conflicts-129 "${testcvs} -q ci -m changed" \ "${PROG}"' [a-z]*: Up-to-date check failed for `a'\'' *************** *** 4898,4903 **** --- 5280,5286 ---- "${PROG} [a-z]*: file .a. had a conflict and has not been modified ${PROG} \[[a-z]* aborted\]: correct above errors first!" + sleep ${FILESYSTEM_TICK} echo lame attempt at resolving it >>a # Try to check in the file with the conflict markers in it. dotest conflicts-status-2 "${testcvs} status a" \ *************** *** 4918,4923 **** --- 5301,5307 ---- # OK, the user saw the warning (good user), and now # resolves it for real. + sleep ${FILESYSTEM_TICK} echo resolve conflict >a dotest conflicts-status-3 "${testcvs} status a" \ "=================================================================== *************** *** 5385,5390 **** --- 5769,5775 ---- U CVSROOT/rcsinfo U CVSROOT/taginfo U CVSROOT/verifymsg' + sleep ${FILESYSTEM_TICK} echo "# made a change" >>CVSROOT/modules dotest modules-1d "${testcvs} -q ci -m add-modules" \ "Checking in CVSROOT/modules; *************** *** 5409,5414 **** --- 5794,5800 ---- U CVSROOT/rcsinfo U CVSROOT/taginfo U CVSROOT/verifymsg' + sleep ${FILESYSTEM_TICK} echo "# made a change" >>CVSROOT/modules dotest modules-2d "${testcvs} -q ci -m add-modules" \ "Checking in CVSROOT/modules; *************** *** 5436,5441 **** --- 5822,5828 ---- U CVSROOT/rcsinfo U CVSROOT/taginfo U CVSROOT/verifymsg' + sleep ${FILESYSTEM_TICK} echo "# made a change" >>CVSROOT/modules dotest modules-3g "${testcvs} -q ci -m add-modules" \ "Checking in CVSROOT/modules; *************** *** 5501,5506 **** --- 5888,5894 ---- fail 147 fi + sleep ${FILESYSTEM_TICK} echo realmodule first-dir/subdir a >CVSROOT/modules echo dirmodule first-dir/subdir >>CVSROOT/modules echo namedmodule -d nameddir first-dir/subdir >>CVSROOT/modules *************** *** 5627,5632 **** --- 6015,6021 ---- else fail 150h2 fi + sleep ${FILESYSTEM_TICK} echo add line >>nameddir/a dotest 150h3 "${testcvs} -q co namedmodule" 'M nameddir/a' rm nameddir/a *************** *** 5649,5654 **** --- 6038,6044 ---- else pass 152 fi + sleep ${FILESYSTEM_TICK} echo abc >>first-dir/subdir/a if (${testcvs} -q co aliasmodule | tee test153.tmp) \ >>${LOGFILE}; then *************** *** 5779,5784 **** --- 6169,6175 ---- dotest modules2-1 "${testcvs} -q co CVSROOT/modules" \ 'U CVSROOT/modules' cd CVSROOT + sleep ${FILESYSTEM_TICK} echo 'ampermodule &first-dir &second-dir' > modules echo 'combmodule third-dir file3 &first-dir' >> modules # Depending on whether the user also ran the modules test *************** *** 5905,5910 **** --- 6296,6302 ---- dotest modules2-a0.5 "${testcvs} -q co CVSROOT/modules" \ 'U CVSROOT/modules' cd CVSROOT + sleep ${FILESYSTEM_TICK} echo 'aliasopt -a -d onedir first-dir' >modules dotest modules2-a0 "${testcvs} -q ci -m add-modules" \ "Checking in modules; *************** *** 5956,5961 **** --- 6348,6354 ---- dotest modules3-4 "${testcvs} -q update -d CVSROOT" \ "U CVSROOT${DOTSTAR}" cd CVSROOT + sleep ${FILESYSTEM_TICK} cat >modules <modules < CVSROOT/modules echo "2d1mod -d dir2d1/sub2d1 mod1" >> CVSROOT/modules *************** *** 7782,7787 **** --- 8177,8183 ---- rm -rf ${TESTDIR}/1 + if test x"${CANT_PROTECT_DIRS}" = x; then # Now try someplace where we don't have permission. mkdir ${TESTDIR}/barf chmod -w ${TESTDIR}/barf *************** *** 7790,7795 **** --- 8186,8194 ---- chmod +w ${TESTDIR}/barf rmdir ${TESTDIR}/barf # Done. Nothing to clean up. + else + echo "didn't run abspath-4 - CANT_PROTECT_DIRS" + fi # Try checking out two modules into the same directory. *************** *** 7942,7947 **** --- 8341,8347 ---- dotest toplevel-11 "${testcvs} -q update -d second-dir" \ "U second-dir/file2" + if test x"${CANT_PROTECT_DIRS}" = x; then # Now remove the CVS directory (people may do this manually, # especially if they formed their habits with CVS # 1.9 and older, which didn't create it. Or perhaps the working *************** *** 7954,7959 **** --- 8354,8362 ---- "${PROG} [a-z]*: warning: cannot make directory CVS in \.: Permission denied ${PROG} [a-z]*: Updating top-dir" chmod +w ../1 + else + echo "didn't run toplevel-12 - CANT_PROTECT_DIRS" + fi cd .. rm -r 1 *************** *** 8024,8036 **** # can see the "CVS:" lines. cat >${TESTDIR}/editme <${TESTDIR}/edit.new ! mv ${TESTDIR}/edit.new \$1 exit 0 EOF chmod +x ${TESTDIR}/editme mkdir 1; cd 1 dotest editor-1 "${testcvs} -q co -l ." '' mkdir first-dir --- 8427,8498 ---- # can see the "CVS:" lines. cat >${TESTDIR}/editme <${TESTDIR}/edit.new ! rm \$1 ! sleep 2 ! cp ${TESTDIR}/edit.new \$1 ! rm ${TESTDIR}/edit.new exit 0 EOF + + # /* edhack.c */ + # #include + # #include + # + # int main( int argc, const char * argv[] ) + # { + # static char editor[1024]; + # const char * testdir; + # const char * testshell; + # int argi; + # + # int iRc = system( NULL ); + # if (0 == iRc) + # { + # printf("Can't find a command processor to run system()\n"); + # return 1; + # } + # + # testshell = getenv( "TESTSHELL" ); + # if (testshell) + # { + # strcpy( editor, testshell ); + # } + # else + # { + # strcpy( editor, "sh" ); + # } + # strcat( editor, " "); + # + # testdir = getenv( "TESTDIR" ); + # if (testdir) + # { + # strcat( editor, testdir ); + # strcat( editor, "/" ); + # } + # strcat( editor, "editme" ); + # + # for (argi = 1; argi < argc; ++argi) + # { + # strcat(editor," "); + # strcat(editor, argv[argi] ); + # } + # + # /* printf("about to run:\"%s\"\n", editor); */ + # iRc = system( editor ); + # return iRc; + # } + chmod +x ${TESTDIR}/editme + if test x"${EDHACK_EDITOR}" = x; then + EDITME_DO=${TESTDIR}/editme + else + EDITME_DO=edhack + export TESTDIR + fi + mkdir 1; cd 1 dotest editor-1 "${testcvs} -q co -l ." '' mkdir first-dir *************** *** 8042,8048 **** "${PROG} [a-z]*: scheduling file .file1. for addition ${PROG} [a-z]*: scheduling file .file2. for addition ${PROG} [a-z]*: use .${PROG} commit. to add these files permanently" ! dotest editor-4 "${testcvs} -e ${TESTDIR}/editme -q ci" \ "RCS file: ${TESTDIR}/cvsroot/first-dir/file1,v done Checking in file1; --- 8504,8510 ---- "${PROG} [a-z]*: scheduling file .file1. for addition ${PROG} [a-z]*: scheduling file .file2. for addition ${PROG} [a-z]*: use .${PROG} commit. to add these files permanently" ! dotest editor-4 "${testcvs} -e ${EDITME_DO} -q ci" \ "RCS file: ${TESTDIR}/cvsroot/first-dir/file1,v done Checking in file1; *************** *** 8055,8065 **** ${TESTDIR}/cvsroot/first-dir/file2,v <-- file2 initial revision: 1\.1 done" dotest editor-5 "${testcvs} -q tag -b br" "T file1 T file2" dotest editor-6 "${testcvs} -q update -r br" '' echo modify >>file1 ! dotest editor-7 "${testcvs} -e ${TESTDIR}/editme -q ci" \ "Checking in file1; ${TESTDIR}/cvsroot/first-dir/file1,v <-- file1 new revision: 1\.1\.2\.1; previous revision: 1\.1 --- 8517,8530 ---- ${TESTDIR}/cvsroot/first-dir/file2,v <-- file2 initial revision: 1\.1 done" + sleep ${FILESYSTEM_TICK} dotest editor-5 "${testcvs} -q tag -b br" "T file1 T file2" + sleep ${FILESYSTEM_TICK} dotest editor-6 "${testcvs} -q update -r br" '' + sleep ${FILESYSTEM_TICK} echo modify >>file1 ! dotest editor-7 "${testcvs} -e ${EDITME_DO} -q ci" \ "Checking in file1; ${TESTDIR}/cvsroot/first-dir/file1,v <-- file1 new revision: 1\.1\.2\.1; previous revision: 1\.1 *************** *** 8070,8077 **** # already on the branch. If there were a revision on the branch, # CVS would correctly give an up-to-date check failed. dotest editor-8 "${testcvs} -q update -A" "U file1" echo add a line >>file2 ! dotest editor-9 "${testcvs} -q -e ${TESTDIR}/editme ci -rbr file2" \ "Checking in file2; ${TESTDIR}/cvsroot/first-dir/file2,v <-- file2 new revision: 1\.1\.2\.1; previous revision: 1\.1 --- 8535,8543 ---- # already on the branch. If there were a revision on the branch, # CVS would correctly give an up-to-date check failed. dotest editor-8 "${testcvs} -q update -A" "U file1" + sleep ${FILESYSTEM_TICK} echo add a line >>file2 ! dotest editor-9 "${testcvs} -q -e ${EDITME_DO} ci -rbr file2" \ "Checking in file2; ${TESTDIR}/cvsroot/first-dir/file2,v <-- file2 new revision: 1\.1\.2\.1; previous revision: 1\.1 *************** *** 8238,8243 **** --- 8704,8710 ---- fi cd ../../2/1dir + if test x"${CANT_PROTECT_DIRS}" = x; then # FIXME: should be using dotest. ${testcvs} -q update 2>../tst167.err cat ../tst167.err >>${LOGFILE} *************** *** 8252,8257 **** --- 8719,8727 ---- else fail 168 fi + else + echo "didn't run 168 (errmsg1) - CANT_PROTECT_DIRS" + fi cd .. chmod u+w 1dir *************** *** 8455,8460 **** --- 8925,8931 ---- pass 178a fi + sleep ${FILESYSTEM_TICK} if ${testcvs} edit abb; then pass 179 else *************** *** 8473,8478 **** --- 8944,8950 ---- fail 181 fi + sleep ${FILESYSTEM_TICK} echo aaaa >>abb if ${testcvs} ci -m modify abb >>${LOGFILE} 2>&1; then pass 182 *************** *** 8494,8505 **** pass 184 fi ! if test -w abb; then ! fail 185 else ! pass 185 fi if ${testcvs} edit abc; then pass 186a1 else --- 8966,8980 ---- pass 184 fi ! ! if test "x${OS_COMPILER_EMU}" = xwin32_msvc_cygwin32; then ! echo 'devcom: (cygwin32 b19.1 test -w strange) - using attrib' ! dotest 185 "attrib abb" "A R ${DOTSTAR}" else ! dotest_fail 185 "test -w abb" '' fi + if ${testcvs} edit abc; then pass 186a1 else *************** *** 8516,8521 **** --- 8991,8997 ---- else fail 186a3 fi + sleep ${FILESYSTEM_TICK} echo changedabc >abc # Try to unedit a modified file; cvs should ask for confirmation if (echo no | ${testcvs} unedit abc) >>${LOGFILE}; then *************** *** 8612,8619 **** cd 3 dotest devcom-some1 "${testcvs} -q co first-dir" 'U first-dir/abb U first-dir/abc' ! dotest devcom-some2 "test -w first-dir/abb" '' ! dotest_fail devcom-some3 "test -w first-dir/abc" '' cd .. if test "$keep" = yes; then --- 9088,9101 ---- cd 3 dotest devcom-some1 "${testcvs} -q co first-dir" 'U first-dir/abb U first-dir/abc' ! if test "x${OS_COMPILER_EMU}" = xwin32_msvc_cygwin32; then ! echo 'devcom: cygwin32 b19.1 test -w is very weird - using attrib instead' ! dotest devcom-some2 "attrib first-dir\\abb" "A ${DOTSTAR}" ! dotest devcom-some2 "attrib first-dir\\abc" "A R ${DOTSTAR}" ! else ! dotest devcom-some2 "test -w first-dir/abb" '' ! dotest_fail devcom-some3 "test -w first-dir/abc" '' ! fi cd .. if test "$keep" = yes; then *************** *** 8668,8677 **** U first-dir/w1 U first-dir/w2 U first-dir/w3' ! dotest devcom2-8 "test -w first-dir/nw1" '' ! dotest_fail devcom2-9 "test -w first-dir/w1" '' ! dotest_fail devcom2-10 "test -w first-dir/w2" '' ! dotest_fail devcom2-11 "test -w first-dir/w3" '' cd first-dir # OK, now we want to try files in various states with cvs edit. --- 9150,9167 ---- U first-dir/w1 U first-dir/w2 U first-dir/w3' ! if test "x${OS_COMPILER_EMU}" = xwin32_msvc_cygwin32; then ! echo 'devcom2: cygwin32 b19.1 test -w is very weird - using attrib instead' ! dotest devcom2-8 "attrib first-dir\\nw1" "A ${DOTSTAR}" ! dotest devcom2-9 "attrib first-dir\\w1" "A R ${DOTSTAR}" ! dotest devcom2-10 "attrib first-dir\\w2" "A R ${DOTSTAR}" ! dotest devcom2-11 "attrib first-dir\\w3" "A R ${DOTSTAR}" ! else ! dotest devcom2-8 "test -w first-dir/nw1" '' ! dotest_fail devcom2-9 "test -w first-dir/w1" '' ! dotest_fail devcom2-10 "test -w first-dir/w2" '' ! dotest_fail devcom2-11 "test -w first-dir/w3" '' ! fi cd first-dir # OK, now we want to try files in various states with cvs edit. *************** *** 8801,8812 **** --- 9291,9306 ---- dotest_fail watch4-8 "test -w first-dir/file1" '' dotest_fail watch4-9 "test -w first-dir/subdir/sfile" '' cd first-dir + sleep ${FILESYSTEM_TICK} dotest watch4-10 "${testcvs} edit file1" '' + sleep ${FILESYSTEM_TICK} echo 'edited in 2' >file1 cd ../.. cd 1/first-dir + sleep ${FILESYSTEM_TICK} dotest watch4-11 "${testcvs} edit file1" '' + sleep ${FILESYSTEM_TICK} echo 'edited in 1' >file1 dotest watch4-12 "${testcvs} -q ci -m edit-in-1" \ "Checking in file1; *************** *** 9009,9014 **** --- 9503,9509 ---- binfile.dat cat binfile.dat binfile.dat >binfile2.dat cd first-dir + sleep ${FILESYSTEM_TICK} cp ../binfile.dat binfile dotest binfiles-2 "${testcvs} add -kb binfile" \ "${PROG}"' [a-z]*: scheduling file `binfile'\'' for addition *************** *** 9059,9064 **** --- 9554,9560 ---- rm -r 3 cd 2/first-dir + sleep ${FILESYSTEM_TICK} cp ../../1/binfile2.dat binfile dotest binfiles-6 "${testcvs} -q ci -m modify-it" \ "Checking in binfile; *************** *** 9070,9075 **** --- 9566,9572 ---- dotest binfiles-8 "cmp ../binfile2.dat binfile" '' # Now test handling of conflicts with binary files. + sleep ${FILESYSTEM_TICK} cp ../binfile.dat binfile dotest binfiles-con0 "${testcvs} -q ci -m modify-it" \ "Checking in binfile; *************** *** 9077,9082 **** --- 9574,9580 ---- new revision: 1\.3; previous revision: 1\.2 done" cd ../../2/first-dir + sleep ${FILESYSTEM_TICK} echo 'edits in dir 2' >binfile dotest binfiles-con1 "${testcvs} -q update" \ "U binfile *************** *** 9087,9092 **** --- 9585,9591 ---- dotest binfiles-con2 "cmp binfile ../../1/binfile.dat" '' dotest binfiles-con3 "cat .#binfile.1.2" 'edits in dir 2' + sleep ${FILESYSTEM_TICK} cp ../../1/binfile2.dat binfile dotest binfiles-con4 "${testcvs} -q ci -m resolve-it" \ "Checking in binfile; *************** *** 9123,9129 **** --- 9622,9630 ---- rm -r 3 cd 2/first-dir + sleep ${FILESYSTEM_TICK} echo 'this file is $''RCSfile$' >binfile + lf_endlines binfile dotest binfiles-14a "${testcvs} -q ci -m modify-it" \ "Checking in binfile; ${TESTDIR}/cvsroot/first-dir/binfile,v <-- binfile *************** *** 9308,9321 **** --- 9809,9825 ---- ${TESTDIR}/cvsroot/first-dir/brmod-wdmod,v <-- brmod-wdmod initial revision: 1\.1 done" + sleep ${FILESYSTEM_TICK} dotest binfiles2-2 "${testcvs} -q tag -b br" 'T brmod T brmod-trmod T brmod-wdmod' + sleep ${FILESYSTEM_TICK} dotest binfiles2-3 "${testcvs} -q update -r br" '' cp ../binfile binfile.dat dotest binfiles2-4 "${testcvs} add -kb binfile.dat" \ "${PROG} [a-z]*: scheduling file .binfile\.dat. for addition on branch .br. ${PROG} [a-z]*: use .${PROG} commit. to add this file permanently" + sleep ${FILESYSTEM_TICK} cp ../binfile2 brmod cp ../binfile2 brmod-trmod cp ../binfile2 brmod-wdmod *************** *** 9345,9356 **** --- 9849,9862 ---- [UP] brmod-wdmod" dotest_fail binfiles2-7 "test -f binfile.dat" '' dotest binfiles2-7-brmod "cmp ../binfile brmod" + sleep ${FILESYSTEM_TICK} cp ../binfile3 brmod-trmod dotest binfiles2-7a "${testcvs} -q ci -m tr-modify" \ "Checking in brmod-trmod; ${TESTDIR}/cvsroot/first-dir/brmod-trmod,v <-- brmod-trmod new revision: 1\.2; previous revision: 1\.1 done" + sleep ${FILESYSTEM_TICK} cp ../binfile3 brmod-wdmod dotest binfiles2-8 "${testcvs} -q update -j br" \ *************** *** 9500,9510 **** --- 10006,10019 ---- # both. CVSWRAPPERS="* -m 'COPY'" export CVSWRAPPERS + sleep ${FILESYSTEM_TICK} dotest mcopy-2 "${testcvs} -q tag -b br" 'T \.cvswrappers T brmod T brmod-trmod T brmod-wdmod' + sleep ${FILESYSTEM_TICK} dotest mcopy-3 "${testcvs} -q update -r br" '' + sleep ${FILESYSTEM_TICK} echo 'modify brmod on br' >brmod echo 'modify brmod-trmod on br' >brmod-trmod echo 'modify brmod-wdmod on br' >brmod-wdmod *************** *** 9521,9526 **** --- 10030,10036 ---- ${TESTDIR}/cvsroot/first-dir/brmod-wdmod,v <-- brmod-wdmod new revision: 1\.1\.2\.1; previous revision: 1\.1 done" + sleep ${FILESYSTEM_TICK} dotest mcopy-6 "${testcvs} -q update -A" \ "[UP] brmod [UP] brmod-trmod *************** *** 9530,9541 **** --- 10040,10053 ---- brmod-trmod initial contents brmod-wdmod initial contents" + sleep ${FILESYSTEM_TICK} echo 'modify brmod-trmod again on trunk' >brmod-trmod dotest mcopy-7a "${testcvs} -q ci -m tr-modify" \ "Checking in brmod-trmod; ${TESTDIR}/cvsroot/first-dir/brmod-trmod,v <-- brmod-trmod new revision: 1\.2; previous revision: 1\.1 done" + sleep ${FILESYSTEM_TICK} echo 'modify brmod-wdmod in working dir' >brmod-wdmod dotest mcopy-8 "${testcvs} -q update -j br" \ *************** *** 9776,9781 **** --- 10288,10294 ---- # This destroys anything currently in cvswrappers, but # presumably other tests will take care of it themselves if # they use cvswrappers: + sleep ${FILESYSTEM_TICK} echo "foo*.sb -k 'b'" > cvswrappers dotest binwrap3-2 "${testcvs} -q ci -m cvswrappers-mod" \ "Checking in cvswrappers; *************** *** 9935,9940 **** --- 10448,10454 ---- dotest mwrap-c1 "${testcvs} -q co CVSROOT" "[UP] CVSROOT${DOTSTAR}" cd CVSROOT + sleep ${FILESYSTEM_TICK} echo "* -m 'COPY'" >>cvswrappers dotest mwrap-c2 "${testcvs} -q ci -m wrapper-mod" \ "Checking in cvswrappers; *************** *** 9964,9969 **** --- 10478,10484 ---- mkdir m2; cd m2 dotest mwrap-5 "${testcvs} -q co first-dir" "U first-dir/aa" cd first-dir + sleep ${FILESYSTEM_TICK} echo "changed in m2" >aa dotest mwrap-6 "${testcvs} -q ci -m m2-mod" \ "Checking in aa; *************** *** 10016,10029 **** dotest info-1 "${testcvs} -q co CVSROOT" "[UP] CVSROOT${DOTSTAR}" cd CVSROOT echo "ALL sh -c \"echo x\${=MYENV}\${=OTHER}y\${=ZEE}=\$USER=\$CVSROOT= >>$TESTDIR/testlog; cat >/dev/null\"" > loginfo # The following cases test the format string substitution ! echo "ALL echo %{sVv} >>$TESTDIR/testlog2; cat >/dev/null" >> loginfo ! echo "ALL echo %{v} >>$TESTDIR/testlog2; cat >/dev/null" >> loginfo ! echo "ALL echo %s >>$TESTDIR/testlog2; cat >/dev/null" >> loginfo ! echo "ALL echo %{V}AX >>$TESTDIR/testlog2; cat >/dev/null" >> loginfo ! echo "first-dir echo %sux >>$TESTDIR/testlog2; cat >/dev/null" \ ! >> loginfo # Might be nice to move this to crerepos tests; it should # work to create a loginfo file if you didn't create one --- 10531,10554 ---- dotest info-1 "${testcvs} -q co CVSROOT" "[UP] CVSROOT${DOTSTAR}" cd CVSROOT + sleep ${FILESYSTEM_TICK} echo "ALL sh -c \"echo x\${=MYENV}\${=OTHER}y\${=ZEE}=\$USER=\$CVSROOT= >>$TESTDIR/testlog; cat >/dev/null\"" > loginfo # The following cases test the format string substitution ! if test x"${CANT_RUN_SCRIPTS}" = x; then ! echo "ALL echo %{sVv} >>$TESTDIR/testlog2; cat >/dev/null" >> loginfo ! echo "ALL echo %{v} >>$TESTDIR/testlog2; cat >/dev/null" >> loginfo ! echo "ALL echo %s >>$TESTDIR/testlog2; cat >/dev/null" >> loginfo ! echo "ALL echo %{V}AX >>$TESTDIR/testlog2; cat >/dev/null" >> loginfo ! echo "first-dir echo %sux >>$TESTDIR/testlog2; cat >/dev/null" \ ! >> loginfo ! else ! echo "ALL ${TESTSHELL} -c \"echo %{sVv} >>$TESTDIR/testlog2; cat >/dev/null\"" >> loginfo ! echo "ALL ${TESTSHELL} -c \"echo %{v} >>$TESTDIR/testlog2; cat >/dev/null\"" >> loginfo ! echo "ALL ${TESTSHELL} -c \"echo %s >>$TESTDIR/testlog2; cat >/dev/null\"" >> loginfo ! echo "ALL ${TESTSHELL} -c \"echo %{V}AX >>$TESTDIR/testlog2; cat >/dev/null\"" >> loginfo ! echo "first-dir ${TESTSHELL} -c \"echo %sux >>$TESTDIR/testlog2; cat >/dev/null\"" \ ! >> loginfo ! fi # Might be nice to move this to crerepos tests; it should # work to create a loginfo file if you didn't create one *************** *** 10056,10062 **** --- 10581,10589 ---- initial revision: 1\.1 done ${PROG} [a-z]*: loginfo:1: no such user variable \${=ZEE}" + sleep ${FILESYSTEM_TICK} echo line1 >>file1 + # dotest info-7 "${testcvs} -t -s OTHER=value -s ZEE=z ci -m mod-it" \ dotest info-7 "${testcvs} -q -s OTHER=value -s ZEE=z ci -m mod-it" \ "Checking in file1; ${TESTDIR}/cvsroot/first-dir/file1,v <-- file1 *************** *** 10064,10069 **** --- 10591,10603 ---- done" cd .. dotest info-9 "cat $TESTDIR/testlog" "xenv-valueyz=${username}=${TESTDIR}/cvsroot=" + + # Windows-NT, Microsoft Visual C++ 4.2 does badly on info-10 + # for files that have %{sVv} substitutions. + # src/logmsg.c(logfile_write) puts apostrophe around strings, + # windows-NT/run.c(requote) changes these to quote. + # windows-NT/run.c(run_popen) passes these to CMD.EXE. + # dotest info-10 "cat $TESTDIR/testlog2" 'first-dir file1,NONE,1.1 first-dir 1.1 first-dir file1 *************** *** 10076,10081 **** --- 10610,10616 ---- first-dir file1ux' cd CVSROOT + sleep ${FILESYSTEM_TICK} echo '# do nothing' >loginfo dotest info-11 "${testcvs} -q -s ZEE=garbage ci -m nuke-loginfo" \ "Checking in loginfo; *************** *** 10095,10101 **** fi EOF chmod +x ${TESTDIR}/vscript ! echo "^first-dir ${TESTDIR}/vscript" >>verifymsg dotest info-v1 "${testcvs} -q ci -m add-verification" \ "Checking in verifymsg; ${TESTDIR}/cvsroot/CVSROOT/verifymsg,v <-- verifymsg --- 10630,10640 ---- fi EOF chmod +x ${TESTDIR}/vscript ! if test x"${CANT_RUN_SCRIPTS}" = x; then ! echo "^first-dir ${TESTDIR}/vscript" >>verifymsg ! else ! echo "^first-dir ${TESTSHELL} ${TESTDIR}/vscript" >>verifymsg ! fi dotest info-v1 "${testcvs} -q ci -m add-verification" \ "Checking in verifymsg; ${TESTDIR}/cvsroot/CVSROOT/verifymsg,v <-- verifymsg *************** *** 10131,10136 **** --- 10670,10676 ---- rmdir another-dir cd CVSROOT + sleep ${FILESYSTEM_TICK} echo '# do nothing' >verifymsg dotest info-cleanup-verifymsg "${testcvs} -q ci -m nuke-verifymsg" \ "Checking in verifymsg; *************** *** 10166,10171 **** --- 10706,10712 ---- dotest config-1 "${testcvs} -q co CVSROOT" "U CVSROOT/${DOTSTAR}" cd CVSROOT + sleep ${FILESYSTEM_TICK} echo 'bogus line' >config dotest config-3 "${testcvs} -q ci -m change-to-bogus-line" \ "Checking in config; *************** *** 10173,10178 **** --- 10714,10720 ---- new revision: 1\.2; previous revision: 1\.1 done ${PROG} [a-z]*: Rebuilding administrative file database" + sleep ${FILESYSTEM_TICK} echo 'BogusOption=yes' >config dotest config-4 "${testcvs} -q ci -m change-to-bogus-opt" \ "${PROG} [a-z]*: syntax error in ${TESTDIR}/cvsroot/CVSROOT/config: line 'bogus line' is missing '=' *************** *** 10181,10186 **** --- 10723,10729 ---- new revision: 1\.3; previous revision: 1\.2 done ${PROG} [a-z]*: Rebuilding administrative file database" + sleep ${FILESYSTEM_TICK} echo '# No config is a good config' > config dotest config-5 "${testcvs} -q ci -m change-to-comment" \ "${PROG} [a-z]*: ${TESTDIR}/cvsroot/CVSROOT/config: unrecognized keyword 'BogusOption' *************** *** 10299,10304 **** --- 10842,10848 ---- done" rm -f ${TESTDIR}/comment.tmp + sleep ${FILESYSTEM_TICK} echo 'second revision' > file1 dotest log-4 "${testcvs} -q ci -m2 file1" \ "Checking in file1; *************** *** 10306,10313 **** --- 10850,10859 ---- new revision: 1\.2; previous revision: 1\.1 done" + sleep ${FILESYSTEM_TICK} dotest log-5 "${testcvs} -q tag -b branch file1" 'T file1' + sleep ${FILESYSTEM_TICK} echo 'third revision' > file1 dotest log-6 "${testcvs} -q ci -m3 file1" \ "Checking in file1; *************** *** 10315,10322 **** --- 10861,10870 ---- new revision: 1\.3; previous revision: 1\.2 done" + sleep ${FILESYSTEM_TICK} dotest log-7 "${testcvs} -q update -r branch" '[UP] file1' + sleep ${FILESYSTEM_TICK} echo 'first branch revision' > file1 dotest log-8 "${testcvs} -q ci -m1b file1" \ "Checking in file1; *************** *** 10326,10331 **** --- 10874,10880 ---- dotest log-9 "${testcvs} -q tag tag file1" 'T file1' + sleep ${FILESYSTEM_TICK} echo 'second branch revision' > file1 dotest log-10 "${testcvs} -q ci -m2b file1" \ "Checking in file1; *************** *** 10677,10682 **** --- 11226,11232 ---- ${TESTDIR}/cvsroot/first-dir/file1,v <-- file1 initial revision: 1\.1 done" + sleep ${FILESYSTEM_TICK} cat >file1 <file1 <file1 <file, &t) with + # t.actime = t.modtime = 31564805 which causes modified time + # of file2 to be set to 1 jan 2099 (rather than 1 jan 1971). + # Looks to me like Netware counts file times from 1 jan 1980 0:0:0. + # Here is some mush to use dates in 1980 rather than 1971 when + # it looks like we have Netware + + DECADE="7" + if touch -t123123591979.59 netware; then + if $EXPR "`ls -l netware`" : \ + "${DOTSTAR}1979${DOTSTAR}" >/dev/null; then + : base date probably before 1980 + else + echo "I think you are using a Netware Fileserver" + DECADE="8" + fi + fi + rm netware + cat <${CVSROOT_DIRNAME}/first-dir/file2,v head 1.5 ; branch 1.2.6; *************** *** 11151,11162 **** symbols branch:1.2.6; locks; testofanewphrase @without newphrase we'd have trouble extending @@ all@ ; ! 1.5 date 71.01.01.01.00.00; author joe; state bogus; branches; next 1.4; ! 1.4 date 71.01.01.00.00.05; author joe; state bogus; branches; next 1.3; ! 1.3 date 70.12.31.15.00.05; author joe; state bogus; branches; next 1.2; ! 1.2 date 70.12.31.12.15.05; author me; state bogus; branches 1.2.6.1; next 1.1; ! 1.1 date 70.12.31.11.00.05; author joe; state bogus; branches; next; newph; ! 1.2.6.1 date 71.01.01.08.00.05; author joe; state Exp; branches; next; desc @@ 1.5 log @@ newphrase1; newphrase2 42; text @head revision@ 1.4 log @@ text @d1 1 --- 11729,11740 ---- symbols branch:1.2.6; locks; testofanewphrase @without newphrase we'd have trouble extending @@ all@ ; ! 1.5 date ${DECADE}1.01.01.01.00.00; author joe; state bogus; branches; next 1.4; ! 1.4 date ${DECADE}1.01.01.00.00.05; author joe; state bogus; branches; next 1.3; ! 1.3 date ${DECADE}0.12.31.15.00.05; author joe; state bogus; branches; next 1.2; ! 1.2 date ${DECADE}0.12.31.12.15.05; author me; state bogus; branches 1.2.6.1; next 1.1; ! 1.1 date ${DECADE}0.12.31.11.00.05; author joe; state bogus; branches; next; newph; ! 1.2.6.1 date ${DECADE}1.01.01.08.00.05; author joe; state Exp; branches; next; desc @@ 1.5 log @@ newphrase1; newphrase2 42; text @head revision@ 1.4 log @@ text @d1 1 *************** *** 11176,11188 **** --- 11754,11770 ---- a1 1 branch revision@ EOF + lf_endlines ${CVSROOT_DIRNAME}/first-dir/file2,v + # First test the default branch. dotest rcs-5 "${testcvs} -q update file2" "U file2" dotest rcs-6 "cat file2" "branch revision" # Check in a revision on the branch to force CVS to # interpret every revision in the file. + sleep ${FILESYSTEM_TICK} dotest rcs-6a "${testcvs} -q update -r branch file2" "" + sleep ${FILESYSTEM_TICK} echo "next branch revision" > file2 dotest rcs-6b "${testcvs} -q ci -m mod file2" \ "Checking in file2; *************** *** 11213,11246 **** testofanewphrase @without newphrase we'd have trouble extending @@ all@; 1\.5 ! date 71\.01\.01\.01\.00\.00; author joe; state bogus; branches; next 1\.4; 1\.4 ! date 71\.01\.01\.00\.00\.05; author joe; state bogus; branches; next 1\.3; 1\.3 ! date 70\.12\.31\.15\.00\.05; author joe; state bogus; branches; next 1\.2; 1\.2 ! date 70\.12\.31\.12\.15\.05; author me; state bogus; branches 1\.2\.6\.1; next 1\.1; 1\.1 ! date 70\.12\.31\.11\.00\.05; author joe; state bogus; branches; next ; newph ; 1\.2\.6\.1 ! date 71\.01\.01\.08\.00\.05; author joe; state Exp; branches; next 1\.2\.6\.2; --- 11795,11828 ---- testofanewphrase @without newphrase we'd have trouble extending @@ all@; 1\.5 ! date ${DECADE}1\.01\.01\.01\.00\.00; author joe; state bogus; branches; next 1\.4; 1\.4 ! date ${DECADE}1\.01\.01\.00\.00\.05; author joe; state bogus; branches; next 1\.3; 1\.3 ! date ${DECADE}0\.12\.31\.15\.00\.05; author joe; state bogus; branches; next 1\.2; 1\.2 ! date ${DECADE}0\.12\.31\.12\.15\.05; author me; state bogus; branches 1\.2\.6\.1; next 1\.1; 1\.1 ! date ${DECADE}0\.12\.31\.11\.00\.05; author joe; state bogus; branches; next ; newph ; 1\.2\.6\.1 ! date ${DECADE}1\.01\.01\.08\.00\.05; author joe; state Exp; branches; next 1\.2\.6\.2; *************** *** 11318,11324 **** next branch revision @" ! if ${testcvs} -q update -p -D '1970-12-31 11:30 UT' file2 \ >${TESTDIR}/rcs4.tmp then dotest rcs-9 "cat ${TESTDIR}/rcs4.tmp" "start revision" --- 11900,11906 ---- next branch revision @" ! if ${testcvs} -q update -p -D "19${DECADE}0-12-31 11:30 UT" file2 \ >${TESTDIR}/rcs4.tmp then dotest rcs-9 "cat ${TESTDIR}/rcs4.tmp" "start revision" *************** *** 11326,11332 **** fail rcs-9 fi ! if ${testcvs} -q update -p -D '1970-12-31 12:30 UT' file2 \ >${TESTDIR}/rcs4.tmp then dotest rcs-10 "cat ${TESTDIR}/rcs4.tmp" "mid revision" --- 11908,11914 ---- fail rcs-9 fi ! if ${testcvs} -q update -p -D "19${DECADE}0-12-31 12:30 UT" file2 \ >${TESTDIR}/rcs4.tmp then dotest rcs-10 "cat ${TESTDIR}/rcs4.tmp" "mid revision" *************** *** 11334,11340 **** fail rcs-10 fi ! if ${testcvs} -q update -p -D '1971-01-01 00:30 UT' file2 \ >${TESTDIR}/rcs4.tmp then dotest rcs-11 "cat ${TESTDIR}/rcs4.tmp" "new year revision" --- 11916,11922 ---- fail rcs-10 fi ! if ${testcvs} -q update -p -D "19${DECADE}1-01-01 00:30 UT" file2 \ >${TESTDIR}/rcs4.tmp then dotest rcs-11 "cat ${TESTDIR}/rcs4.tmp" "new year revision" *************** *** 11343,11349 **** fi # Same test as rcs-10, but with am/pm. ! if ${testcvs} -q update -p -D 'December 31, 1970 12:30pm UT' file2 \ >${TESTDIR}/rcs4.tmp then dotest rcs-12 "cat ${TESTDIR}/rcs4.tmp" "mid revision" --- 11925,11931 ---- fi # Same test as rcs-10, but with am/pm. ! if ${testcvs} -q update -p -D "December 31, 19${DECADE}0 12:30pm UT" file2 \ >${TESTDIR}/rcs4.tmp then dotest rcs-12 "cat ${TESTDIR}/rcs4.tmp" "mid revision" *************** *** 11352,11358 **** fi # Same test as rcs-11, but with am/pm. ! if ${testcvs} -q update -p -D 'January 1, 1971 12:30am UT' file2 \ >${TESTDIR}/rcs4.tmp then dotest rcs-13 "cat ${TESTDIR}/rcs4.tmp" "new year revision" --- 11934,11940 ---- fi # Same test as rcs-11, but with am/pm. ! if ${testcvs} -q update -p -D "January 1, 19${DECADE}1 12:30am UT" file2 \ >${TESTDIR}/rcs4.tmp then dotest rcs-13 "cat ${TESTDIR}/rcs4.tmp" "new year revision" *************** *** 11376,11399 **** description: ---------------------------- revision 1\.5 ! date: 1971/01/01 01:00:00; author: joe; state: bogus; lines: ${PLUS}1 -1 \*\*\* empty log message \*\*\* ---------------------------- revision 1\.4 ! date: 1971/01/01 00:00:05; author: joe; state: bogus; lines: ${PLUS}1 -1 \*\*\* empty log message \*\*\* ---------------------------- revision 1\.3 ! date: 1970/12/31 15:00:05; author: joe; state: bogus; lines: ${PLUS}1 -1 \*\*\* empty log message \*\*\* ---------------------------- revision 1\.2 ! date: 1970/12/31 12:15:05; author: me; state: bogus; lines: ${PLUS}1 -1 branches: 1\.2\.6; \*\*\* empty log message \*\*\* ---------------------------- revision 1\.1 ! date: 1970/12/31 11:00:05; author: joe; state: bogus; \*\*\* empty log message \*\*\* ---------------------------- revision 1\.2\.6\.2 --- 11958,11981 ---- description: ---------------------------- revision 1\.5 ! date: 19${DECADE}1/01/01 01:00:00; author: joe; state: bogus; lines: ${PLUS}1 -1 \*\*\* empty log message \*\*\* ---------------------------- revision 1\.4 ! date: 19${DECADE}1/01/01 00:00:05; author: joe; state: bogus; lines: ${PLUS}1 -1 \*\*\* empty log message \*\*\* ---------------------------- revision 1\.3 ! date: 19${DECADE}0/12/31 15:00:05; author: joe; state: bogus; lines: ${PLUS}1 -1 \*\*\* empty log message \*\*\* ---------------------------- revision 1\.2 ! date: 19${DECADE}0/12/31 12:15:05; author: me; state: bogus; lines: ${PLUS}1 -1 branches: 1\.2\.6; \*\*\* empty log message \*\*\* ---------------------------- revision 1\.1 ! date: 19${DECADE}0/12/31 11:00:05; author: joe; state: bogus; \*\*\* empty log message \*\*\* ---------------------------- revision 1\.2\.6\.2 *************** *** 11401,11407 **** mod ---------------------------- revision 1\.2\.6\.1 ! date: 1971/01/01 08:00:05; author: joe; state: Exp; lines: ${PLUS}1 -1 \*\*\* empty log message \*\*\* =============================================================================" cd .. --- 11983,11989 ---- mod ---------------------------- revision 1\.2\.6\.1 ! date: 19${DECADE}1/01/01 08:00:05; author: joe; state: Exp; lines: ${PLUS}1 -1 \*\*\* empty log message \*\*\* =============================================================================" cd .. *************** *** 11451,11456 **** --- 12033,12039 ---- a1 1 Need to start somewhere@ EOF + lf_endlines ${CVSROOT_DIRNAME}/first-dir/file1,v dotest rcs2-1 "${testcvs} -q co first-dir" 'U first-dir/file1' cd first-dir *************** *** 11515,11520 **** --- 12098,12104 ---- C3b235f50|kingdon||ccvs/emx|1.3|README M3b23af50|kingdon|~/work/*0|ccvs/doc|1.281|cvs.texinfo EOF + lf_endlines ${CVSROOT_DIRNAME}/CVSROOT/history dotest history-1 "${testcvs} history -e -a" \ "O 06/04 19:48 ${PLUS}0000 anonymous ccvs =ccvs= /\* W 06/17 19:51 ${PLUS}0000 anonymous Makefile\.in ccvs/emx == /emx *************** *** 11693,11700 **** --- 12277,12286 ---- # OK, now add a file on a branch. Check that the mode gets # set the same way (it is a different code path in CVS). + sleep ${FILESYSTEM_TICK} dotest modes-11 "${testcvs} -q tag -b br" 'T aa T ab' + sleep ${FILESYSTEM_TICK} dotest modes-12 "${testcvs} -q update -r br" '' touch ac dotest modes-13 "${testcvs} add ac" \ *************** *** 12096,12101 **** --- 12682,12688 ---- ${TESTDIR}/cvsroot/first-dir/file1,v <-- file1 new revision: 1\.2; previous revision: 1\.1 done" + sleep ${FILESYSTEM_TICK} dotest sticky-7 "${testcvs} -q update -r tag1" "[UP] file1" dotest sticky-8 "cat file1" '' dotest sticky-9 "${testcvs} -q update" '' *************** *** 12118,12123 **** --- 12705,12711 ---- done" # Now back to tag1 + sleep ${FILESYSTEM_TICK} dotest sticky-15 "${testcvs} -q update -r tag1" "[UP] file1 ${PROG} [a-z]*: file2 is no longer in the repository" *************** *** 12131,12136 **** --- 12719,12725 ---- dotest sticky-17 "${testcvs} -q ci -m remove-it" "" dotest sticky-18 "${testcvs} -q update -A" "U file1 U file2" + sleep ${FILESYSTEM_TICK} dotest sticky-19 "${testcvs} -q update -r tag1" \ "${PROG} [a-z]*: file1 is no longer in the repository ${PROG} [a-z]*: file2 is no longer in the repository" *************** *** 12138,12143 **** --- 12727,12733 ---- U file2" # Now try with a numeric revision. + sleep ${FILESYSTEM_TICK} dotest sticky-21 "${testcvs} -q update -r 1.1 file1" "U file1" rm file1 dotest sticky-22 "${testcvs} rm file1" \ *************** *** 12333,12340 **** --- 12923,12932 ---- # Test the Name keyword. First go back to normal expansion. + sleep ${FILESYSTEM_TICK} dotest keyword-17 "${testcvs} update -A file1" "U file1" + sleep ${FILESYSTEM_TICK} echo '$''Name$' > file1 dotest keyword-18 "${testcvs} ci -m modify file1" \ "Checking in file1; *************** *** 12342,12353 **** --- 12934,12947 ---- new revision: 1\.2; previous revision: 1\.1 done" dotest keyword-19 "${testcvs} -q tag tag1" "T file1" + sleep ${FILESYSTEM_TICK} echo "change" >> file1 dotest keyword-20 "${testcvs} -q ci -m mod2 file1" \ "Checking in file1; ${TESTDIR}/cvsroot/first-dir/file1,v <-- file1 new revision: 1\.3; previous revision: 1\.2 done" + sleep ${FILESYSTEM_TICK} dotest keyword-21 "${testcvs} -q update -r tag1" "[UP] file1" # FIXME: This test fails when remote. The second expect *************** *** 12393,12398 **** --- 12987,12993 ---- dotest keywordlog-4a "${testcvs} -q co first-dir" "U first-dir/file1" cd ../1/first-dir + sleep ${FILESYSTEM_TICK} echo 'xx $''Log$' > file1 cat >${TESTDIR}/comment.tmp <> file1 dotest keywordlog-10 "${testcvs} ci -m modify file1" \ "Checking in file1; *************** *** 12453,12459 **** --- 13050,13058 ---- change" cd ../../1/first-dir + sleep ${FILESYSTEM_TICK} dotest keywordlog-14 "${testcvs} -q update -r br" "[UP] file1" + sleep ${FILESYSTEM_TICK} echo br-change >>file1 dotest keywordlog-15 "${testcvs} -q ci -m br-modify" \ "Checking in file1; *************** *** 12471,12476 **** --- 13070,13076 ---- xx br-change" cd ../../2/first-dir + sleep ${FILESYSTEM_TICK} dotest keywordlog-17 "${testcvs} -q update -r br" "[UP] file1" dotest keywordlog-18 "cat file1" \ "xx "'\$'"Log: file1,v "'\$'" *************** *** 12542,12547 **** --- 13142,13148 ---- "U first-dir/file1 U first-dir/file2" cd first-dir + sleep ${FILESYSTEM_TICK} echo 'add a line on trunk' >> file1 dotest head-3 "${testcvs} -q ci -m modify" \ "Checking in file1; *************** *** 12550,12564 **** --- 13151,13169 ---- done" dotest head-4 "${testcvs} -q tag trunktag" "T file1 T file2" + sleep ${FILESYSTEM_TICK} echo 'add a line on trunk after trunktag' >> file1 dotest head-5 "${testcvs} -q ci -m modify" \ "Checking in file1; ${TESTDIR}/cvsroot/first-dir/file1,v <-- file1 new revision: 1\.3; previous revision: 1\.2 done" + sleep ${FILESYSTEM_TICK} dotest head-6 "${testcvs} -q tag -b br1" "T file1 T file2" + sleep ${FILESYSTEM_TICK} dotest head-7 "${testcvs} -q update -r br1" "" + sleep ${FILESYSTEM_TICK} echo 'modify on branch' >>file1 dotest head-8 "${testcvs} -q ci -m modify" \ "Checking in file1; *************** *** 12567,12572 **** --- 13172,13178 ---- done" dotest head-9 "${testcvs} -q tag brtag" "T file1 T file2" + sleep ${FILESYSTEM_TICK} echo 'modify on branch after brtag' >>file1 dotest head-10 "${testcvs} -q ci -m modify" \ "Checking in file1; *************** *** 12575,12580 **** --- 13181,13187 ---- done" # With no sticky tags, HEAD is the head of the trunk. dotest head-trunk-setup "${testcvs} -q update -A" "[UP] file1" + sleep ${FILESYSTEM_TICK} dotest head-trunk-update "${testcvs} -q update -r HEAD -p file1" \ "imported contents add a line on trunk *************** *** 12600,12606 **** --- 13207,13215 ---- ${PLUS} modify on branch after brtag" # With a branch sticky tag, HEAD is the head of the trunk. + sleep ${FILESYSTEM_TICK} dotest head-br1-setup "${testcvs} -q update -r br1" "[UP] file1" + sleep ${FILESYSTEM_TICK} dotest head-br1-update "${testcvs} -q update -r HEAD -p file1" \ "imported contents add a line on trunk *************** *** 12611,12617 **** --- 13220,13228 ---- # With a nonbranch sticky tag on a branch, # HEAD is the head of the trunk + sleep ${FILESYSTEM_TICK} dotest head-brtag-setup "${testcvs} -q update -r brtag" "[UP] file1" + sleep ${FILESYSTEM_TICK} dotest head-brtag-update "${testcvs} -q update -r HEAD -p file1" \ "imported contents add a line on trunk *************** *** 12624,12633 **** --- 13235,13246 ---- # With a nonbranch sticky tag on the trunk, HEAD is the head # of the trunk, I think. + sleep ${FILESYSTEM_TICK} dotest head-trunktag-setup "${testcvs} -q update -r trunktag" \ "[UP] file1" dotest head-trunktag-check "cat file1" "imported contents add a line on trunk" + sleep ${FILESYSTEM_TICK} dotest head-trunktag-update "${testcvs} -q update -r HEAD -p file1" \ "imported contents add a line on trunk *************** *** 12702,12709 **** --- 13315,13325 ---- ${TESTDIR}/cvsroot/first-dir/file1,v <-- file1 initial revision: 1\.1 done" + sleep ${FILESYSTEM_TICK} dotest tagdate-5 "${testcvs} -q tag -b br1" "T file1" + sleep ${FILESYSTEM_TICK} dotest tagdate-6 "${testcvs} -q tag -b br2" "T file1" + sleep ${FILESYSTEM_TICK} echo trunk-2 >file1 dotest tagdate-7 "${testcvs} -q ci -m modify-on-trunk" \ "Checking in file1; *************** *** 12714,12720 **** --- 13330,13338 ---- # any revisions. First the case where br2 doesn't have any # revisions either: dotest tagdate-8 "${testcvs} -q update -p -r br1 -D now" "trunk-1" + sleep ${FILESYSTEM_TICK} dotest tagdate-9 "${testcvs} -q update -r br2" "[UP] file1" + sleep ${FILESYSTEM_TICK} echo br2-1 >file1 dotest tagdate-10 "${testcvs} -q ci -m modify-on-br2" \ "Checking in file1; *************** *** 12760,12771 **** --- 13378,13393 ---- ${TESTDIR}/cvsroot/first-dir/file2,v <-- file2 initial revision: 1\.1 done" + sleep ${FILESYSTEM_TICK} dotest multibranch2-5 "${testcvs} -q tag -b A" "T file1 T file2" + sleep ${FILESYSTEM_TICK} dotest multibranch2-6 "${testcvs} -q tag -b B" "T file1 T file2" + sleep ${FILESYSTEM_TICK} dotest multibranch2-7 "${testcvs} -q update -r B" '' + sleep ${FILESYSTEM_TICK} echo branch-B >file1 echo branch-B >file2 dotest multibranch2-8 "${testcvs} -q ci -m modify-on-B" \ *************** *** 12778,12785 **** --- 13400,13409 ---- new revision: 1\.1\.4\.1; previous revision: 1\.1 done" + sleep ${FILESYSTEM_TICK} dotest multibranch2-9 "${testcvs} -q update -r A" '[UP] file1 [UP] file2' + sleep ${FILESYSTEM_TICK} echo branch-A >file1 # When using cvs-1.9.20, this commit gets a failed assertion in rcs.c. dotest multibranch2-10 "${testcvs} -q ci -m modify-on-A" \ *************** *** 12843,12850 **** --- 13467,13476 ---- # bring the changes from B to A. Probably tests many of the # same code paths but might as well keep it separate, I guess. + sleep ${FILESYSTEM_TICK} dotest multibranch2-13 "${testcvs} -q update -r B" "[UP] file1 [UP] file2" + sleep ${FILESYSTEM_TICK} dotest multibranch2-14 "${testcvs} -q update -r A -j B file2" \ "[UP] file2 RCS file: ${TESTDIR}/cvsroot/first-dir/file2,v *************** *** 12917,12925 **** --- 13543,13554 ---- ${TESTDIR}/cvsroot/first-dir/file2,v <-- file2 initial revision: 1\.1 done" + sleep ${FILESYSTEM_TICK} dotest admin-7 "${testcvs} -q tag -b br" "T file1 T file2" + sleep ${FILESYSTEM_TICK} dotest admin-8 "${testcvs} -q update -r br" "" + sleep ${FILESYSTEM_TICK} echo 'add a line on the branch' >> file1 dotest admin-9 "${testcvs} -q ci -m modify-on-branch" \ "Checking in file1; *************** *** 13187,13192 **** --- 13816,13822 ---- fi # end of tests skipped for remote # Add another revision to file2, so we can delete one. + sleep ${FILESYSTEM_TICK} echo 'add a line' >> file2 dotest admin-21 "${testcvs} -q ci -m modify file2" \ "Checking in file2; *************** *** 13214,13243 **** --- 13844,13878 ---- ${TESTDIR}/cvsroot/first-dir/aaa,v <-- aaa initial revision: 1\.1 done" + sleep ${FILESYSTEM_TICK} echo second rev >> aaa dotest admin-22-o3 "${testcvs} -q ci -m second aaa" \ "Checking in aaa; ${TESTDIR}/cvsroot/first-dir/aaa,v <-- aaa new revision: 1\.2; previous revision: 1\.1 done" + sleep ${FILESYSTEM_TICK} echo third rev >> aaa dotest admin-22-o4 "${testcvs} -q ci -m third aaa" \ "Checking in aaa; ${TESTDIR}/cvsroot/first-dir/aaa,v <-- aaa new revision: 1\.3; previous revision: 1\.2 done" + sleep ${FILESYSTEM_TICK} echo fourth rev >> aaa dotest admin-22-o5 "${testcvs} -q ci -m fourth aaa" \ "Checking in aaa; ${TESTDIR}/cvsroot/first-dir/aaa,v <-- aaa new revision: 1\.4; previous revision: 1\.3 done" + sleep ${FILESYSTEM_TICK} echo fifth rev >>aaa dotest admin-22-o6 "${testcvs} -q ci -m fifth aaa" \ "Checking in aaa; ${TESTDIR}/cvsroot/first-dir/aaa,v <-- aaa new revision: 1\.5; previous revision: 1\.4 done" + sleep ${FILESYSTEM_TICK} echo sixth rev >> aaa dotest admin-22-o7 "${testcvs} -q ci -m sixth aaa" \ "Checking in aaa; *************** *** 13307,13314 **** --- 13942,13952 ---- first =============================================================================" + sleep ${FILESYSTEM_TICK} dotest admin-22-o14 "${testcvs} tag -b -r1.3 br1 aaa" "T aaa" + sleep ${FILESYSTEM_TICK} dotest admin-22-o15 "${testcvs} update -rbr1 aaa" "U aaa" + sleep ${FILESYSTEM_TICK} echo new branch rev >> aaa dotest admin-22-o16 "${testcvs} ci -m new-branch aaa" \ "Checking in aaa; *************** *** 13330,13347 **** --- 13968,13988 ---- second rev third rev fourth rev" + sleep ${FILESYSTEM_TICK} echo second branch rev >> aaa dotest admin-22-o19 "${testcvs} ci -m branch-two aaa" \ "Checking in aaa; ${TESTDIR}/cvsroot/first-dir/aaa,v <-- aaa new revision: 1\.3\.2\.2; previous revision: 1\.3\.2\.1 done" + sleep ${FILESYSTEM_TICK} echo third branch rev >> aaa dotest admin-22-o20 "${testcvs} ci -m branch-three aaa" \ "Checking in aaa; ${TESTDIR}/cvsroot/first-dir/aaa,v <-- aaa new revision: 1\.3\.2\.3; previous revision: 1\.3\.2\.2 done" + sleep ${FILESYSTEM_TICK} echo fourth branch rev >> aaa dotest admin-22-o21 "${testcvs} ci -m branch-four aaa" \ "Checking in aaa; *************** *** 13522,13527 **** --- 14163,14169 ---- # Add a couple more revisions # + sleep ${FILESYSTEM_TICK} echo "nuthr_line" >> file2 dotest admin-27-1 "${testcvs} commit -m nuthr_line file2" \ "Checking in file2; *************** *** 13529,13534 **** --- 14171,14177 ---- new revision: 1\.3; previous revision: 1\.2 done" + sleep ${FILESYSTEM_TICK} echo "yet_another" >> file2 dotest admin-27-2 "${testcvs} commit -m yet_another file2" \ "Checking in file2; *************** *** 13778,13784 **** fail reserved-11 fi cd CVSROOT ! echo "DEFAULT ${TESTDIR}/lockme" >>commitinfo dotest reserved-12 "${testcvs} -q ci -m rcslock commitinfo" \ "Checking in commitinfo; ${TESTDIR}/cvsroot/CVSROOT/commitinfo,v <-- commitinfo --- 14421,14432 ---- fail reserved-11 fi cd CVSROOT ! sleep ${FILESYSTEM_TICK} ! if test x"${CANT_RUN_SCRIPTS}" = x; then ! echo "DEFAULT ${TESTDIR}/lockme" >>commitinfo ! else ! echo "DEFAULT ${TESTSHELL} ${TESTDIR}/lockme" >>commitinfo ! fi dotest reserved-12 "${testcvs} -q ci -m rcslock commitinfo" \ "Checking in commitinfo; ${TESTDIR}/cvsroot/CVSROOT/commitinfo,v <-- commitinfo *************** *** 14673,14678 **** --- 15321,15327 ---- CPen *pMinorPen; // pen to use for drawing minor grid lines d472 12 @" > diffmerge2/sgrid.h,v + lf_endlines diffmerge2/sgrid.h,v # We have to put the RCS file in the repository by hand for # this test: Index: ccvs/src/server.c =================================================================== RCS file: /u/safe/ccvs/src/server.c,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -c -r1.1.1.1 -r1.2 *** server.c 1998/05/29 00:22:03 1.1.1.1 --- server.c 1998/05/29 01:56:31 1.2 *************** *** 4359,4364 **** --- 4359,4369 ---- int argc; char **argv; { + #ifdef RSHD_NOT_TRANSPARENT + setmode (STDIN_FILENO, O_BINARY); + setmode (STDOUT_FILENO, O_BINARY); + setmode (STDERR_FILENO, O_BINARY); + #endif if (argc == -1) { static const char *const msg[] = Index: ccvs/src/update.c =================================================================== RCS file: /u/safe/ccvs/src/update.c,v retrieving revision 1.1.1.1 retrieving revision 1.3 diff -c -r1.1.1.1 -r1.3 *** update.c 1998/05/29 00:22:05 1.1.1.1 --- update.c 1998/07/07 04:24:05 1.3 *************** *** 488,494 **** (void) time (&now); if (now == last_register_time) ! sleep (1); /* to avoid time-stamp races */ } return (err); --- 488,494 ---- (void) time (&now); if (now == last_register_time) ! sleep (FILESYSTEM_TICK); /* to avoid time-stamp races */ } return (err); *************** *** 1685,1691 **** violation. */ if (CVS_STAT (vers_ts->srcfile->path, file_info) < 0) error (1, errno, "could not stat %s", vers_ts->srcfile->path); ! if (chmod (finfo->file, file_info->st_mode & ~(S_IWRITE | S_IWGRP | S_IWOTH)) < 0) error (0, errno, "cannot change mode of file %s", finfo->file); --- 1685,1691 ---- violation. */ if (CVS_STAT (vers_ts->srcfile->path, file_info) < 0) error (1, errno, "could not stat %s", vers_ts->srcfile->path); ! if (CVS_CHMOD (finfo->file, file_info->st_mode & ~(S_IWRITE | S_IWGRP | S_IWOTH)) < 0) error (0, errno, "cannot change mode of file %s", finfo->file); Index: ccvs/windows-NT/ChangeLog =================================================================== RCS file: /u/safe/ccvs/windows-NT/ChangeLog,v retrieving revision 1.1.1.1 retrieving revision 1.4 diff -c -r1.1.1.1 -r1.4 *** ChangeLog 1998/05/29 00:22:12 1.1.1.1 --- ChangeLog 1998/07/07 04:24:06 1.4 *************** *** 1,3 **** --- 1,46 ---- + 1998-07-06 Murray Bishop + + * options.h [FILESYSTEM_TICK]: Define seconds per tick as 2 for FAT. + + 1998-07-02 Murray Bishop + + * run.c (run_popen): Don't change ' to " (breaks sanity.sh info-10). + * run.c (requote): Remove. Useless for Windows-NT CMD.EXE and also + for Windows-95 COMMAND.COM. + + Thu Jun 11 21:58:58 1998 by kingdon + + * config.h (CVS_STAT, CVS_LSTAT): Define. + * filesubr.c, config.h (wnt_stat, wnt_lstat, check_statbuf): + New functions. + + 1998-06-23 Murray Bishop + + * filesubr.c (rename_file): If either from or to is open in RCS + cache, close RCS cache before any other file operations. + + 1998-06-19 Murray Bishop + + * filesubr.c (rename_readonly_file): add function so renames + work when using Novell IntranetWare client. + * filesubr.c (rename_file): try rename_readonly_file before + calling error. + * filesubr.c (wnt_rename): try rename_readonly_file before + returning < 0. + + 1998-06-16 Murray Bishop + + * config.h (CVS_RENAME): Define. + * filesubr.c (wnt_rename): If the oldname is open in rcs cache, + close it before attempting rename(). - under windows and OS/2 + you can't rename an open file (nor pass binfiles2-10, join2-20, + (death-)71. + See also http://www.cyclic.com/cvs/dev-emx27.txt, which suggests + identical function (os2_rename) in emx/system.c. + * filesubr.c (expand_wild): When path whose last component is + "." is passed as argument, copy that rather than replacing by + last component of parent directory. + 1998-04-09 Jim Kingdon * filesubr.c (link_file): Remove; no longer used. Index: ccvs/windows-NT/config.h =================================================================== RCS file: /u/safe/ccvs/windows-NT/config.h,v retrieving revision 1.1.1.1 retrieving revision 1.3 diff -c -r1.1.1.1 -r1.3 *** config.h 1998/05/29 00:22:13 1.1.1.1 --- config.h 1998/06/24 00:55:59 1.3 *************** *** 235,240 **** --- 235,248 ---- /* Under Windows NT, mkdir only takes one argument. */ #define CVS_MKDIR wnt_mkdir extern int wnt_mkdir (const char *PATH, int MODE); + #define CVS_STAT wnt_stat + extern int wnt_stat (); + #define CVS_LSTAT wnt_lstat + extern int wnt_lstat (); + + /* Windows NT rename needs 'to' doesn't exist and 'from' isn't open */ + #define CVS_RENAME wnt_rename + extern int wnt_rename(const char * from, const char * to); /* This function doesn't exist under Windows NT; we provide a stub. */ Index: ccvs/windows-NT/filesubr.c =================================================================== RCS file: /u/safe/ccvs/windows-NT/filesubr.c,v retrieving revision 1.1.1.1 retrieving revision 1.6 diff -c -r1.1.1.1 -r1.6 *** filesubr.c 1998/05/29 00:22:13 1.1.1.1 --- filesubr.c 1998/07/05 21:28:33 1.6 *************** *** 23,28 **** --- 23,29 ---- #include "cvs.h" static int deep_remove_dir PROTO((const char *path)); + static int rename_readonly_file PROTO((const char *from, const char *to)); /* Copies "from" to "to". Note that the functionality here is similar to the win32 function CopyFile, but (1) we copy LastAccessTime and *************** *** 387,396 **** if (noexec) return; ! /* Win32 unlink is stupid --- it fails if the file is read-only */ ! chmod(to, S_IWRITE); ! unlink(to); ! if (rename (from, to) < 0) error (1, errno, "cannot rename file %s to %s", from, to); } --- 388,394 ---- if (noexec) return; ! if (wnt_rename (from, to) < 0) error (1, errno, "cannot rename file %s to %s", from, to); } *************** *** 413,418 **** --- 411,421 ---- /* Win32 unlink is stupid - it fails if the file is read-only */ chmod (f, _S_IWRITE); + + /* And also if the file is open */ + if (RCS_get_cached ( f ) != NULL) + RCS_cache_close (); + return (unlink (f)); } *************** *** 436,443 **** return (0); /* Win32 unlink is stupid - it fails if the file is read-only */ ! chmod (f, _S_IWRITE); ! if (unlink (f) != 0) { /* under Windows NT, unlink returns EACCES if the path is a directory. Under Windows 95, ENOENT. */ --- 439,445 ---- return (0); /* Win32 unlink is stupid - it fails if the file is read-only */ ! if (unlink_file (f) != 0) { /* under Windows NT, unlink returns EACCES if the path is a directory. Under Windows 95, ENOENT. */ *************** *** 484,491 **** sprintf (buf, "%s/%s", path, dp->d_name); /* Win32 unlink is stupid - it fails if the file is read-only */ ! chmod (buf, _S_IWRITE); ! if (unlink (buf) != 0 ) { /* Under Windows NT, unlink returns EACCES if the path is a directory. Under Windows 95, ENOENT. It --- 486,492 ---- sprintf (buf, "%s/%s", path, dp->d_name); /* Win32 unlink is stupid - it fails if the file is read-only */ ! if (unlink_file (buf) != 0 ) { /* Under Windows NT, unlink returns EACCES if the path is a directory. Under Windows 95, ENOENT. It *************** *** 755,760 **** --- 756,772 ---- As nearly as I can guess, this bug has existed since expand_wild was first created. At least, it is in CVS 1.9 (I just tried it). */ + /* I (Murray Bishop) got failures on sanity.sh death2-diff-5, + branches2-11 and join-4, using Windows NT 4.0 fixpack 3, + Microsoft Visual C++ 4.2. + After getting nowhere with the debugger, I found the note above + and did some experiments on 17 June 98. + FindFirstFile does these strange things when cvs (1.9.27) is + run in /tmp/cvs-sanity/1/first-dir : + + argv[i] fdata.cFileName + . first-dir + ../first-dir/. first-dir */ /* FindFirstFile doesn't return pathnames, so we have to do this ourselves. Luckily, it's no big deal, since globbing *************** *** 822,834 **** /* Copy the file name. */ ! if (fncmp (argv[i] + dirname_length, fdata.cFileName) == 0) /* We didn't expand a wildcard; we just matched a filename. Use the file name as specified rather than the filename which exists in the directory (they may differ in case). This is needed to make cvs add on a directory consistently use the name specified on the command line, but it is probably a good idea in other contexts too. */ strcpy (new_argv[new_argc], argv[i]); else strcat (new_argv[new_argc], fdata.cFileName); --- 834,850 ---- /* Copy the file name. */ ! if (fncmp (argv[i] + dirname_length, fdata.cFileName) == 0 ! || strcmp (argv[i] + dirname_length, ".") == 0) /* We didn't expand a wildcard; we just matched a filename. Use the file name as specified rather than the filename which exists in the directory (they may differ in case). This is needed to make cvs add on a directory consistently use the name specified on the command line, but it is probably a good idea in other contexts too. */ + /* comparison with "." copes with FindFirstFile returning + name of parent directory when given "." (Thats not a + feature, its a bug) */ strcpy (new_argv[new_argc], argv[i]); else strcat (new_argv[new_argc], fdata.cFileName); *************** *** 855,857 **** --- 871,1044 ---- *pargc = new_argc; *pargv = new_argv; } + + static void check_statbuf (const char *file, struct stat *sb) + { + /* Win32 processes file times in a 64 bit format + (see Win32 functions SetFileTime and GetFileTime). + If the file time on a file doesn't fit into the + 32 bit time_t format, then stat will set that time + to -1. This would be OK, except that functions + like ctime() don't check for validity. So what we + do here is to give a error on -1. A cleaner solution + might be to change CVS's interfaces to return a time + in RCS format (for example), and then implement it + on Win32 via GetFileTime, but that would be a lot of + hair and I'm not sure there is much payoff. */ + if (sb->st_mtime == (time_t) -1) + error (1, 0, "invalid modification time for %s", file); + if (sb->st_ctime == (time_t) -1) + /* I'm not sure what this means on windows. It + might be a creation time (unlike unix).... */ + error (1, 0, "invalid ctime for %s", file); + if (sb->st_atime == (time_t) -1) + error (1, 0, "invalid access time for %s", file); + } + + int + wnt_stat (const char *file, struct stat *sb) + { + int retval; + + retval = stat (file, sb); + if (retval < 0) + return retval; + check_statbuf (file, sb); + return retval; + } + + int + wnt_lstat (const char *file, struct stat *sb) + { + int retval; + + retval = lstat (file, sb); + if (retval < 0) + return retval; + check_statbuf (file, sb); + return retval; + } + + /* + With Windows-NT 4.0 Service Pack 3 and Novell IntranetWare Client 4.11a + and Microsoft Visual C++ 4.2, + attempts to rename readonly files fail with "Permission denied". + (This doesn't happen with Microsoft Netware Client, nor on NTFS local + file system) + + In addition, with a Netware server version 4.11 that was built by an + upgrade from 4.10 without doing the filesystem backup and restore + Novell recommended, I get flakey failures to rename readonly files + (about 4 per pass of sanity.sh). The retry code below works around + that. + On a different server where 4.11 was installed on a clean machine, + no such problem happened. + + Make from not readonly, try rename, restore modes on file. + Return what rename did. + */ + int + rename_readonly_file (from, to) + const char *from; + const char *to; + { + struct stat sb; + int rename_rc; + const char *final_name; + int rename_errno; + static int retrying_rename = 0; + + if (trace) + #ifdef SERVER_SUPPORT + (void) fprintf (stderr, "%c-> rename_readonly_file(%s,%s)\n", + (server_active) ? 'S' : ' ', from, to); + #else + (void) fprintf (stderr, "-> rename_readonly_file(%s,%s)\n", from, to); + #endif + if (noexec) + return 0; + + /* If we can't stat from, we probably won't be able to rename it */ + if (stat (from, &sb) < 0) + return -1; + + if (chmod (from, sb.st_mode | S_IWRITE | S_IWGRP | S_IWOTH) < 0) + error (0, errno, "cannot change mode of file %s", from); + + rename_rc = rename (from, to); + rename_errno = errno; + + final_name = (rename_rc < 0) ? from : to; + if (chmod (final_name, sb.st_mode) < 0) + error (0, errno, "cannot restore mode of file %s", final_name); + + /* + With Windows-NT 4.0 Service Pack 3 and Novell IntranetWare Client 4.11a + and Microsoft Visual C++ 4.2, in sanity.sh we get occasional + "cannot rename file .../,file3, to .../file3,v: File exists" + in various places (not always in same place). + (This doesn't happen or on NTFS local file system) + */ + if (rename_rc < 0) + { + ++retrying_rename; + if (retrying_rename <= 3) + { + error (0, rename_errno, + " rename_readonly_file(%s,%s) failed. " + "waiting %d seconds before retry\n", + from, to, retrying_rename); + sleep( retrying_rename /*seconds*/ ); + rename_rc = wnt_rename( from, to ); + } + --retrying_rename; + if (retrying_rename == 0 && rename_rc == 0) + { + #ifdef SERVER_SUPPORT + (void) fprintf (stderr, "%c retry succeeded.\n", + (server_active) ? 'S' : ' '); + #else + (void) fprintf (stderr, " retry succeeded.\n"); + #endif + } + } + + return rename_rc; + } + + int wnt_rename(const char * from, const char * to) + { + int rename_rc; + + if (trace) + #ifdef SERVER_SUPPORT + (void) fprintf (stderr, "%c-> wnt_rename(%s,%s)\n", + (server_active) ? 'S' : ' ', from, to); + #else + (void) fprintf (stderr, "-> wnt_rename(%s,%s)\n", from, to); + #endif + if (noexec) + return 0; + + /* Win32 unlink is stupid --- it fails if the file is read-only */ + /* Win32 unlink also fails when file is open via Novell IntranetWare */ + /* + Under windows and OS/2 you can't rename an open file, and + the target file must not exist before rename. + If you're Windows-NT on a Netware fileserver via IntranetWare, + the source file must not be readonly. + See also http://www.cyclic.com/cvs/dev-emx27.txt, which suggests + identical function (os2_rename) in emx/system.c + and provides the two RCS functions mentioned here. + */ + unlink_file ( to ); + if (RCS_get_cached ( from ) != NULL) + RCS_cache_close (); + rename_rc = rename ( from, to); + if (rename_rc < 0) + { + rename_rc = rename_readonly_file ( from, to); + } + return rename_rc; + } + Index: ccvs/windows-NT/options.h =================================================================== RCS file: /u/safe/ccvs/windows-NT/options.h,v retrieving revision 1.1.1.1 diff -c -r1.1.1.1 options.h *** options.h 1998/05/29 00:22:13 1.1.1.1 --- options.h 1998/07/07 04:44:59 *************** *** 165,167 **** --- 165,184 ---- #ifndef STDC_HEADERS extern void exit (); #endif + + /* + * In various places, CVS waits a tick of the filesystem clock to make + * sure that files have different timestamps. This was coded as sleep (1). + * For some filesystems (eg FAT, FAT32) 2 seconds are needed. + * I've defined FILESYSTEM_TICK in windows-NT/options.h, + * and in src/cvs.h a default of 1 second is defined. + * + * I'm pretty sure that CVS doesn't do enough waiting, but it's too + * hard for me to figure out where to add more. + * See sanity.sh [FILESYSTEM_TICK] for more information. + */ + #ifndef FILESYSTEM_TICK + #define FILESYSTEM_TICK 2 + /* #define FILESYSTEM_TICK 1 */ + #endif + Index: ccvs/windows-NT/run.c =================================================================== RCS file: /u/safe/ccvs/windows-NT/run.c,v retrieving revision 1.1.1.1 retrieving revision 1.3 diff -c -r1.1.1.1 -r1.3 *** run.c 1998/05/29 00:22:14 1.1.1.1 --- run.c 1998/07/05 21:28:35 1.3 *************** *** 296,316 **** } } - static char * - requote (const char *cmd) - { - char *requoted = xmalloc (strlen (cmd) + 1); - char *p = requoted; - - strcpy (requoted, cmd); - while ((p = strchr (p, '\'')) != NULL) - { - *p++ = '"'; - } - - return requoted; - } - FILE * run_popen (cmd, mode) const char *cmd; --- 296,301 ---- *************** *** 326,335 **** if (noexec) return (NULL); ! /* If the command string uses single quotes, turn them into ! double quotes. */ { - char *requoted = requote (cmd); /* Save and restore our file descriptors to work around apparent bugs in _popen. We are perhaps better off using the win32 functions instead of _popen. */ --- 311,321 ---- if (noexec) return (NULL); ! /* If the command string uses single quotes, don't turn them into ! double quotes like for OS/2 CMD.EXE. ! Windows-NT CMD.EXE and Windows-95 COMMAND.COM don't recognize ! " as a quoting mechanism. */ { /* Save and restore our file descriptors to work around apparent bugs in _popen. We are perhaps better off using the win32 functions instead of _popen. */ *************** *** 337,343 **** int old_stdout = dup (STDOUT_FILENO); int old_stderr = dup (STDERR_FILENO); ! FILE *result = popen (requoted, mode); dup2 (old_stdin, STDIN_FILENO); dup2 (old_stdout, STDOUT_FILENO); --- 323,329 ---- int old_stdout = dup (STDOUT_FILENO); int old_stderr = dup (STDERR_FILENO); ! FILE *result = popen (cmd, mode); dup2 (old_stdin, STDIN_FILENO); dup2 (old_stdout, STDOUT_FILENO); *************** *** 346,352 **** close (old_stdout); close (old_stderr); - free (requoted); return result; } } --- 332,337 ---- --------------461F66AE7C2A--