Date: Fri, 12 Jun 1998 12:15:37 +1000 From: mbishop@acnielsen.com.au (Murray Bishop) To: bug-cvs@gnu.org Subject: EMX port passes sanity.sh Content-Type: multipart/mixed; boundary="------------D8142D729" This is a multi-part message in MIME format. --------------D8142D729 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Dear CVS developers, I've been testing the EMX port of cvs in local mode on a local disk with HPFS using sanity.sh. I've now got things to here : [D:\cvs\emx\3\ccvs\emx]sh ../src/sanity.sh cvs 2>&1 | tee doall2.log This test should produce no other output than this line, and a final "OK". Bending sanity.sh for EMX 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 OK, all tests completed. You can try the modes, perms, symlinks and hardlinks tests by naming them on the command line. Most of the effort was in setting up an EMX environment that would run sanity.sh, and in bending sanity.sh so that it would work for EMX as well as for the usual places sanity.sh runs. (although I did find some bugs in cvs too) The build environment was from : http://www.leo.org/pub/comp/os/os2/leo/gnu/ emx+gcc v0.9c fix 04 systools http://www.leo.org/pub/comp/os/os2/leo/shells ksh527rt.zip (PD korn shell for OS/2) provided a sh.exe that worked well for sanity.sh autoconf & make from GNU source sh-utils-1.16 for a working expr.exe. (the one from leo kept blowing up in gnuregex.dll when handling .*) I started with the cvs-1.9.27 sources, then applied Andreas Hubers patches http://www.cyclic.com/cvs/dev-emx27.txt, then some more patches of my own. My patches are shown as diffs relative to (cvs-1.9.27 with Andreas Hubers patches). If you'd like them in another form, I'm happy to supply. I added 2 little programs (only needed for EMX) that need to be compiled and put on the PATH : edhack.c works around invoking editme (a shell script). crlf2lf.c works around creating rcs files with cat and echo (which tend to make lines end with crlf rather than lf under emx). (These programs are effective for Windows-NT use of sanity.sh too). I have built the modified sources on a linux machine. sanity.sh was passed there (I only ran local tests). Some of the modifications to sanity.sh are to help run this on cvs built with Microsoft Visual C++ 4.2 (using cygwin32 to run sanity.sh on windows-nt). I intend continuing with getting sanity.sh to work (as far as I can) in this configuration as well as emx and linux. Regards, Murray Bishop --------------D8142D729 Content-Type: text/plain; charset=us-ascii; name="diffs.txt" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="diffs.txt" Index: diff/ChangeLog =================================================================== RCS file: /cvs/safe/ccvs/diff/ChangeLog,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -c -r1.1.1.1 -r1.2 *** ChangeLog 1998/05/29 00:21:27 1.1.1.1 --- ChangeLog 1998/06/01 04:40:23 1.2 *************** *** 1,3 **** --- 1,8 ---- + 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: diff/diff.c =================================================================== RCS file: /cvs/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: emx/ChangeLog =================================================================== RCS file: /cvs/safe/ccvs/emx/ChangeLog,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -c -r1.1.1.1 -r1.2 *** ChangeLog 1998/05/29 00:21:37 1.1.1.1 --- ChangeLog 1998/06/01 04:40:40 1.2 *************** *** 1,3 **** --- 1,12 ---- + 1998-05-19 Murray Bishop + + * filesubr.c (unlink_file_dir): unlink (f) fails under OS/2 + when f is readonly. unlink_file (f) makes f not readonly before + deleting f. + * options.h (EDITOR_DFLT): change to TEDIT (Comes with OS/2 3.0) + from vi (which doesn't). + + 1998-04-09 Jim Kingdon * filesubr.c (link_file): Remove; no longer used. Index: emx/filesubr.c =================================================================== RCS file: /cvs/safe/ccvs/emx/filesubr.c,v retrieving revision 1.2 retrieving revision 1.3 diff -c -r1.2 -r1.3 *** filesubr.c 1998/05/29 01:55:13 1.2 --- filesubr.c 1998/06/01 04:40:44 1.3 *************** *** 484,490 **** else if (S_ISDIR (sb.st_mode)) return deep_remove_dir (f); ! return unlink (f); } /* Remove a directory and everything it contains. Returns 0 for --- 484,490 ---- else if (S_ISDIR (sb.st_mode)) return deep_remove_dir (f); ! return unlink_file (f); } /* Remove a directory and everything it contains. Returns 0 for Index: emx/options.h =================================================================== RCS file: /cvs/safe/ccvs/emx/options.h,v retrieving revision 1.2 retrieving revision 1.3 diff -c -r1.2 -r1.3 *** options.h 1998/05/29 01:55:14 1.2 --- options.h 1998/06/01 04:40:45 1.3 *************** *** 48,56 **** * this to just "vi", and use the shell to find where "vi" actually * is. This allows sites with /usr/bin/vi or /usr/ucb/vi to work * equally well (assuming that your PATH is reasonable). */ #ifndef EDITOR_DFLT ! #define EDITOR_DFLT "vi" #endif /* --- 48,59 ---- * this to just "vi", and use the shell to find where "vi" actually * is. This allows sites with /usr/bin/vi or /usr/ucb/vi to work * equally well (assuming that your PATH is reasonable). + * EMX CVS seems to have trouble starting PM editors such as E and EPM + * TEDIT is on Warp Connect 3.0 (but not OS/2 2.11) */ #ifndef EDITOR_DFLT ! /* #define EDITOR_DFLT "vi" */ ! #define EDITOR_DFLT "TEDIT" #endif /* Index: lib/ChangeLog =================================================================== RCS file: /cvs/safe/ccvs/lib/ChangeLog,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -c -r1.1.1.1 -r1.2 *** ChangeLog 1998/05/29 00:21:38 1.1.1.1 --- ChangeLog 1998/06/01 04:40:57 1.2 *************** *** 1,3 **** --- 1,10 ---- + 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. Index: lib/getdate.c =================================================================== RCS file: /cvs/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: lib/getdate.y =================================================================== RCS file: /cvs/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: src/ChangeLog =================================================================== RCS file: /cvs/safe/ccvs/src/ChangeLog,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -c -r1.1.1.1 -r1.2 *** ChangeLog 1998/05/29 00:21:50 1.1.1.1 --- ChangeLog 1998/06/01 04:41:07 1.2 *************** *** 1,3 **** --- 1,11 ---- + 1998-05-19 Murray Bishop + + * sanity.sh: Modify to run for OS/2 EMX testing. + * commit.c (commit): Open the -F logfile in text rather than + binary mode to pass log-11 and keywordlog-7 under OS/2 EMX. + * parseinfo.c (parse_config): have fp_info closed before + returning, even if goto error_return happened. Pass config-5. + 1998-04-22 Jim Kingdon * Version 1.9.27. Index: src/commit.c =================================================================== RCS file: /cvs/safe/ccvs/src/commit.c,v retrieving revision 1.2 retrieving revision 1.3 diff -c -r1.2 -r1.3 *** commit.c 1998/05/29 01:56:23 1.2 --- commit.c 1998/06/01 04:41:08 1.3 *************** *** 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) Index: src/parseinfo.c =================================================================== RCS file: /cvs/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: src/sanity.sh =================================================================== RCS file: /cvs/safe/ccvs/src/sanity.sh,v retrieving revision 1.1.1.1 retrieving revision 1.3 diff -c -r1.1.1.1 -r1.3 *** sanity.sh 1998/05/29 00:22:01 1.1.1.1 --- sanity.sh 1998/06/09 21:16:10 1.3 *************** *** 129,134 **** --- 129,209 ---- fi fi + + # Here are a bunch of things that let sanity.sh run better on EMX + # and on windows-NT + + if true; then + + echo "Bending sanity.sh for EMX" + + # 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 + CANT_RUN_SCRIPTS=1 + + # On OS/2 with EMX, invoke edhack.exe instead of a shell script editme + # You'll need exhack.exe on your path for this one + 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 + + # 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) + CRLF_ENDLINES=1 + else + DEVNULL=/dev/null + fi + + if false; then + + # Some RCS outputs have \ rather than / on windows-NT when + # compiled by MS Visual C++ + SLASH="[/\\]" + else + SLASH="/" + fi + + # 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 + } + + + # FIXME: try things (what things? checkins?) without -m. # # Some of these tests are written to expect -Q. But testing with *************** *** 529,535 **** # 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 --- 604,626 ---- # ln -s realdir testdir # TESTDIR=/tmp/cvs-sanity/testdir # TMPPWD=/tmp/cvs-sanity/realdir ! ! 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 ! # Avoid picking up any stray .cvsrc, etc., from the user running the tests mkdir home *************** *** 566,574 **** 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" --- 657,675 ---- 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 --- 694,706 ---- 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 *************** *** 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 == --- 2095,2102 ---- 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 == *************** *** 2104,2111 **** ! \$''Name: local-v0 \$ ! something Index: trdiff/new ! diff -c /dev/null trdiff/new:1\.1 ! \*\*\* /dev/null .* --- trdiff/new .* \*\*\*\*\*\*\*\*\*\*\*\*\*\*\* \*\*\* 0 \*\*\*\* --- 2206,2213 ---- ! \$''Name: local-v0 \$ ! something Index: trdiff/new ! diff -c '"${DEVNULL}"' trdiff/new:1\.1 ! \*\*\* '"${DEVNULL}"' .* --- trdiff/new .* \*\*\*\*\*\*\*\*\*\*\*\*\*\*\* \*\*\* 0 \*\*\*\* *************** *** 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 \*\*\*\* --- 2394,2401 ---- 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 \*\*\*\* *************** *** 2561,2567 **** RCS file: file1 diff -N file1 \*\*\* ${tempname}[ ][ ]*[a-zA-Z0-9: ]* ! --- /dev/null[ ][ ]*[a-zA-Z0-9: ]* \*\*\*\*\*\*\*\*\*\*\*\*\*\*\* \*\*\* 1 \*\*\*\* - first revision --- 2663,2669 ---- RCS file: file1 diff -N file1 \*\*\* ${tempname}[ ][ ]*[a-zA-Z0-9: ]* ! --- ${DEVNULL}[ ][ ]*[a-zA-Z0-9: ]* \*\*\*\*\*\*\*\*\*\*\*\*\*\*\* \*\*\* 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 --- 2687,2693 ---- RCS file: file1 diff -N file1 \*\*\* ${tempname}[ ][ ]*[a-zA-Z0-9: ]* ! --- ${DEVNULL}[ ][ ]*[a-zA-Z0-9: ]* \*\*\*\*\*\*\*\*\*\*\*\*\*\*\* \*\*\* 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 --- 2702,2708 ---- RCS file: file1 diff -N file1 \*\*\* ${tempname}[ ][ ]*[a-zA-Z0-9: ]* ! --- ${DEVNULL}[ ][ ]*[a-zA-Z0-9: ]* \*\*\*\*\*\*\*\*\*\*\*\*\*\*\* \*\*\* 1 \*\*\*\* - first revision *************** *** 2635,2641 **** =================================================================== RCS file: file1 diff -N file1 ! \*\*\* /dev/null[ ][ ]*[a-zA-Z0-9: ]* --- ${tempname}[ ][ ]*[a-zA-Z0-9: ]* \*\*\*\*\*\*\*\*\*\*\*\*\*\*\* \*\*\* 0 \*\*\*\* --- 2737,2743 ---- =================================================================== RCS file: file1 diff -N file1 ! \*\*\* ${DEVNULL}[ ][ ]*[a-zA-Z0-9: ]* --- ${tempname}[ ][ ]*[a-zA-Z0-9: ]* \*\*\*\*\*\*\*\*\*\*\*\*\*\*\* \*\*\* 0 \*\*\*\* *************** *** 2726,2732 **** =================================================================== RCS file: file3 diff -N file3 ! \*\*\* /dev/null[ ][ ]*[a-zA-Z0-9: ]* --- ${tempname}[ ][ ]*[a-zA-Z0-9: ]* \*\*\*\*\*\*\*\*\*\*\*\*\*\*\* \*\*\* 0 \*\*\*\* --- 2828,2834 ---- =================================================================== RCS file: file3 diff -N file3 ! \*\*\* ${DEVNULL}[ ][ ]*[a-zA-Z0-9: ]* --- ${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 \*\*\*\* --- 2871,2877 ---- =================================================================== RCS file: file2 diff -N file2 ! \*\*\* ${DEVNULL}[ ][ ]*[a-zA-Z0-9: ]* --- ${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 \*\*\*\* --- 2881,2887 ---- =================================================================== RCS file: file3 diff -N file3 ! \*\*\* ${DEVNULL}[ ][ ]*[a-zA-Z0-9: ]* --- ${tempname}[ ][ ]*[a-zA-Z0-9: ]* \*\*\*\*\*\*\*\*\*\*\*\*\*\*\* \*\*\* 0 \*\*\*\* *************** *** 2790,2796 **** RCS file: file4 diff -N file4 \*\*\* ${tempname}[ ][ ]*[a-zA-Z0-9: ]* ! --- /dev/null[ ][ ]*[a-zA-Z0-9: ]* \*\*\*\*\*\*\*\*\*\*\*\*\*\*\* \*\*\* 1 \*\*\*\* - file4 first revision --- 2892,2898 ---- RCS file: file4 diff -N file4 \*\*\* ${tempname}[ ][ ]*[a-zA-Z0-9: ]* ! --- ${DEVNULL}[ ][ ]*[a-zA-Z0-9: ]* \*\*\*\*\*\*\*\*\*\*\*\*\*\*\* \*\*\* 1 \*\*\*\* - file4 first revision *************** *** 2814,2820 **** =================================================================== RCS file: file1 diff -N file1 ! \*\*\* /dev/null[ ][ ]*[a-zA-Z0-9: ]* --- ${tempname}[ ][ ]*[a-zA-Z0-9: ]* \*\*\*\*\*\*\*\*\*\*\*\*\*\*\* \*\*\* 0 \*\*\*\* --- 2916,2922 ---- =================================================================== RCS file: file1 diff -N file1 ! \*\*\* ${DEVNULL}[ ][ ]*[a-zA-Z0-9: ]* --- ${tempname}[ ][ ]*[a-zA-Z0-9: ]* \*\*\*\*\*\*\*\*\*\*\*\*\*\*\* \*\*\* 0 \*\*\*\* *************** *** 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 --- 4904,4910 ---- "${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 *************** *** 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" --- 4941,4947 ---- "${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" *************** *** 7782,7787 **** --- 7884,7890 ---- 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 **** --- 7893,7901 ---- 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 **** --- 8048,8054 ---- 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 **** --- 8061,8069 ---- "${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 *************** *** 8031,8036 **** --- 8141,8153 ---- EOF 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; --- 8159,8165 ---- "${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; *************** *** 8059,8065 **** 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 --- 8176,8182 ---- T file2" dotest editor-6 "${testcvs} -q update -r br" '' 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 *************** *** 8071,8077 **** # 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 --- 8188,8194 ---- # 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 ${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 **** --- 8355,8361 ---- 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 **** --- 8370,8378 ---- else fail 168 fi + else + echo "didn't run 168 (errmsg1) - CANT_PROTECT_DIRS" + fi cd .. chmod u+w 1dir *************** *** 8495,8501 **** fi if test -w abb; then ! fail 185 else pass 185 fi --- 8616,8628 ---- fi if test -w abb; then ! # fail 185 ! if test x${OSTYPE} = xcygwin32; then ! echo 'Expect readonly flag set (cygwin32 b19.1 broken)' ! attrib abb ! else ! fail 185 ! fi else pass 185 fi *************** *** 9124,9129 **** --- 9251,9257 ---- cd 2/first-dir 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 *************** *** 10018,10029 **** 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 --- 10146,10166 ---- 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 ! 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 *************** *** 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 --- 10232,10242 ---- 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 *************** *** 11035,11040 **** --- 11176,11182 ---- @d2 12 @ EOF + lf_endlines ${CVSROOT_DIRNAME}/first-dir/file1,v dotest rcs-1 "${testcvs} -q co first-dir" 'U first-dir/file1' cd first-dir dotest rcs-2 "${testcvs} -q log" " *************** *** 11176,11181 **** --- 11318,11324 ---- 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" *************** *** 11451,11456 **** --- 11594,11600 ---- 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 **** --- 11659,11665 ---- 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 *************** *** 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 --- 13923,13933 ---- fail reserved-11 fi cd CVSROOT ! 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 **** --- 14822,14828 ---- 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: --------------D8142D729 Content-Type: text/plain; charset=us-ascii; name="crlf2lf.c" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="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 ); } --------------D8142D729 Content-Type: text/plain; charset=us-ascii; name="edhack.c" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="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; } --------------D8142D729--