Index: sanity.sh =================================================================== RCS file: /home2/cvsroot/ccvs/src/sanity.sh,v retrieving revision 1.621 diff -c -r1.621 sanity.sh *** sanity.sh 2000/08/23 20:02:22 1.621 --- sanity.sh 2000/11/03 18:52:03 *************** *** 156,161 **** --- 156,163 ---- : ${EXPR=expr} : ${ID=id} : ${TR=tr} + : ${TOUCH=touch} + : ${SED=sed} find_tool () { *************** *** 184,189 **** --- 186,209 ---- echo "$TOOL" } + # sanity.sh seems to expect a gnu touch as well. Therefore we + # need to test for it as well. + TOUCH=`find_tool touch` + if test -z "$TOUCH" ; then + echo 'Running these tests requires a gnu "touch" program.' >&2 + echo 'Make sure that such a "touch" program is in your path.' >&2 + exit 1 + fi + + # sanity.sh seems to expect a gnu sed as well. Therefore we + # need to test for it as well. + SED=`find_tool sed` + if test -z "$SED" ; then + echo 'Running these tests requires a gnu "sed" program.' >&2 + echo 'Make sure that such a "sed" program is in your path.' >&2 + exit 1 + fi + # You can't run CVS as root; print a nice error message here instead # of somewhere later, after making a mess. case "`$ID -u`" in *************** *** 429,443 **** { line=1 while [ $line -le `wc -l <${TESTDIR}/dotest.tmp` ] ; do ! if $EXPR "`sed -n ${line}p ${TESTDIR}/dotest.tmp`" : \ ! "`sed -n ${line}p ${TESTDIR}/dotest.exp`" >/dev/null; then : else echo "Line $line:" >> ${LOGFILE} echo "**** expected: " >>${LOGFILE} ! sed -n ${line}p ${TESTDIR}/dotest.exp >>${LOGFILE} echo "**** got: " >>${LOGFILE} ! sed -n ${line}p ${TESTDIR}/dotest.tmp >>${LOGFILE} unset line return 1 fi --- 449,463 ---- { line=1 while [ $line -le `wc -l <${TESTDIR}/dotest.tmp` ] ; do ! if $EXPR "`${SED} -n ${line}p ${TESTDIR}/dotest.tmp`" : \ ! "`${SED} -n ${line}p ${TESTDIR}/dotest.exp`" >/dev/null; then : else echo "Line $line:" >> ${LOGFILE} echo "**** expected: " >>${LOGFILE} ! ${SED} -n ${line}p ${TESTDIR}/dotest.exp >>${LOGFILE} echo "**** got: " >>${LOGFILE} ! ${SED} -n ${line}p ${TESTDIR}/dotest.tmp >>${LOGFILE} unset line return 1 fi *************** *** 991,997 **** # More basic tests, including non-branch tags and co -d. mkdir 1; cd 1 dotest basicb-0a "${testcvs} -q co -l ." '' ! touch topfile dotest basicb-0b "${testcvs} add topfile" \ "${PROG} [a-z]*: scheduling file .topfile. for addition ${PROG} [a-z]*: use .${PROG} commit. to add this file permanently" --- 1011,1017 ---- # More basic tests, including non-branch tags and co -d. mkdir 1; cd 1 dotest basicb-0a "${testcvs} -q co -l ." '' ! ${TOUCH} topfile dotest basicb-0b "${testcvs} add topfile" \ "${PROG} [a-z]*: scheduling file .topfile. for addition ${PROG} [a-z]*: use .${PROG} commit. to add this file permanently" *************** *** 1115,1121 **** # Test that we recurse into the correct directory when checking # for existing files, even if co -d is in use. ! touch first-dir/extra dotest basicb-cod-1 "${testcvs} -q co -d first-dir1 first-dir" \ 'U first-dir1/Emptydir/sfile1 U first-dir1/sdir2/sfile2' --- 1135,1141 ---- # Test that we recurse into the correct directory when checking # for existing files, even if co -d is in use. ! ${TOUCH} first-dir/extra dotest basicb-cod-1 "${testcvs} -q co -d first-dir1 first-dir" \ 'U first-dir1/Emptydir/sfile1 U first-dir1/sdir2/sfile2' *************** *** 1175,1181 **** U sub1/sub2/sdir2/sfile2" cd sub1 dotest basicb-12 "${testcvs} -q update" '' ! touch xx dotest basicb-13 "${testcvs} add xx" fixme cd .. rm -r sub1 --- 1195,1201 ---- U sub1/sub2/sdir2/sfile2" cd sub1 dotest basicb-12 "${testcvs} -q update" '' ! ${TOUCH} xx dotest basicb-13 "${testcvs} add xx" fixme cd .. rm -r sub1 *************** *** 1190,1196 **** dotest basicb-15 "${testcvs} add second-dir" \ "Directory ${TESTDIR}/cvsroot/second-dir added to the repository" cd second-dir ! touch aa dotest basicb-16 "${testcvs} add aa" \ "${PROG} [a-z]*: scheduling file .aa. for addition ${PROG} [a-z]*: use .${PROG} commit. to add this file permanently" --- 1210,1216 ---- dotest basicb-15 "${testcvs} add second-dir" \ "Directory ${TESTDIR}/cvsroot/second-dir added to the repository" cd second-dir ! ${TOUCH} aa dotest basicb-16 "${testcvs} add aa" \ "${PROG} [a-z]*: scheduling file .aa. for addition ${PROG} [a-z]*: use .${PROG} commit. to add this file permanently" *************** *** 1835,1841 **** # First empty the history file rm ${CVSROOT_DIRNAME}/CVSROOT/history ! touch ${CVSROOT_DIRNAME}/CVSROOT/history ### XXX maybe should use 'cvs imprt -b1 -m new-module first-dir F F1' in an ### empty directory to do this instead of hacking directly into $CVSROOT --- 1855,1861 ---- # First empty the history file rm ${CVSROOT_DIRNAME}/CVSROOT/history ! ${TOUCH} ${CVSROOT_DIRNAME}/CVSROOT/history ### XXX maybe should use 'cvs imprt -b1 -m new-module first-dir F F1' in an ### empty directory to do this instead of hacking directly into $CVSROOT *************** *** 2221,2227 **** dotest files-2 "${testcvs} add first-dir" \ "Directory ${TESTDIR}/cvsroot/first-dir added to the repository" cd first-dir ! touch tfile dotest files-3 "${testcvs} add tfile" \ "${PROG} [a-z]*: scheduling file .tfile. for addition ${PROG} [a-z]*: use .${PROG} commit. to add this file permanently" --- 2241,2247 ---- dotest files-2 "${testcvs} add first-dir" \ "Directory ${TESTDIR}/cvsroot/first-dir added to the repository" cd first-dir ! ${TOUCH} tfile dotest files-3 "${testcvs} add tfile" \ "${PROG} [a-z]*: scheduling file .tfile. for addition ${PROG} [a-z]*: use .${PROG} commit. to add this file permanently" *************** *** 2239,2245 **** "Directory ${TESTDIR}/cvsroot/first-dir/dir added to the repository --> Using per-directory sticky tag .C'" cd dir ! touch .file dotest files-6 "${testcvs} add .file" \ "${PROG} [a-z]*: scheduling file .\.file' for addition on branch .C. ${PROG} [a-z]*: use .${PROG} commit. to add this file permanently" --- 2259,2265 ---- "Directory ${TESTDIR}/cvsroot/first-dir/dir added to the repository --> Using per-directory sticky tag .C'" cd dir ! ${TOUCH} .file dotest files-6 "${testcvs} add .file" \ "${PROG} [a-z]*: scheduling file .\.file' for addition on branch .C. ${PROG} [a-z]*: use .${PROG} commit. to add this file permanently" *************** *** 2253,2259 **** "Directory ${TESTDIR}/cvsroot/first-dir/dir/sdir/ssdir added to the repository --> Using per-directory sticky tag .C'" cd ssdir ! touch .file dotest files-9 "${testcvs} add .file" \ "${PROG} [a-z]*: scheduling file .\.file' for addition on branch .C. ${PROG} [a-z]*: use .${PROG} commit. to add this file permanently" --- 2273,2279 ---- "Directory ${TESTDIR}/cvsroot/first-dir/dir/sdir/ssdir added to the repository --> Using per-directory sticky tag .C'" cd ssdir ! ${TOUCH} .file dotest files-9 "${testcvs} add .file" \ "${PROG} [a-z]*: scheduling file .\.file' for addition on branch .C. ${PROG} [a-z]*: use .${PROG} commit. to add this file permanently" *************** *** 2360,2366 **** mkdir 1; cd 1 dotest spacefiles-1 "${testcvs} -q co -l ." "" ! touch ./${dashc} top dotest spacefiles-2 "${testcvs} add -- ${dashc} top" \ "${PROG} [a-z]*: scheduling file .${dashc}. for addition ${PROG} [a-z]*: scheduling file .top. for addition --- 2380,2386 ---- mkdir 1; cd 1 dotest spacefiles-1 "${testcvs} -q co -l ." "" ! ${TOUCH} ./${dashc} top dotest spacefiles-2 "${testcvs} add -- ${dashc} top" \ "${PROG} [a-z]*: scheduling file .${dashc}. for addition ${PROG} [a-z]*: scheduling file .top. for addition *************** *** 2385,2391 **** dotest spacefiles-5 "${testcvs} add -- ${dashb}" \ "Directory ${TESTDIR}/cvsroot/${dashb} added to the repository" cd 'first dir' ! touch 'a file' dotest spacefiles-6 "${testcvs} add 'a file'" \ "${PROG} [a-z]*: scheduling file .a file. for addition ${PROG} [a-z]*: use .${PROG} commit. to add this file permanently" --- 2405,2411 ---- dotest spacefiles-5 "${testcvs} add -- ${dashb}" \ "Directory ${TESTDIR}/cvsroot/${dashb} added to the repository" cd 'first dir' ! ${TOUCH} 'a file' dotest spacefiles-6 "${testcvs} add 'a file'" \ "${PROG} [a-z]*: scheduling file .a file. for addition ${PROG} [a-z]*: use .${PROG} commit. to add this file permanently" *************** *** 2591,2597 **** # diff says "I know nothing". Shrug. dotest_fail diff-3 "${testcvs} diff xyzpdq" \ "${PROG} [a-z]*: I know nothing about xyzpdq" ! touch abc dotest diff-4 "${testcvs} add abc" \ "${PROG} [a-z]*: scheduling file .abc. for addition ${PROG} [a-z]*: use .${PROG} commit. to add this file permanently" --- 2611,2617 ---- # diff says "I know nothing". Shrug. dotest_fail diff-3 "${testcvs} diff xyzpdq" \ "${PROG} [a-z]*: I know nothing about xyzpdq" ! ${TOUCH} abc dotest diff-4 "${testcvs} add abc" \ "${PROG} [a-z]*: scheduling file .abc. for addition ${PROG} [a-z]*: use .${PROG} commit. to add this file permanently" *************** *** 2680,2686 **** dotest_fail 65a6 "test -d subdir" '' # add a file. ! touch file1 if ${CVS} add file1 2>> ${LOGFILE}; then pass 66 else --- 2700,2706 ---- dotest_fail 65a6 "test -d subdir" '' # add a file. ! ${TOUCH} file1 if ${CVS} add file1 2>> ${LOGFILE}; then pass 66 else *************** *** 2719,2725 **** dotest 69a2 "cat file1" '' # create second file ! touch file2 if ${CVS} add file1 file2 2>> ${LOGFILE}; then pass 70 else --- 2739,2745 ---- dotest 69a2 "cat file1" '' # create second file ! ${TOUCH} file2 if ${CVS} add file1 file2 2>> ${LOGFILE}; then pass 70 else *************** *** 3384,3390 **** dotest rmadd-8 "${testcvs} -q tag -b mybranch" "T file1" dotest rmadd-9 "${testcvs} -q tag mynonbranch" "T file1" ! touch file2 # The previous "cvs ci -r" set a sticky tag of '7'. Seems a # bit odd, and I guess commit.c (findmaxrev) makes '7' sticky # tags unnecessary (?). I kind of suspect that it should be --- 3404,3410 ---- dotest rmadd-8 "${testcvs} -q tag -b mybranch" "T file1" dotest rmadd-9 "${testcvs} -q tag mynonbranch" "T file1" ! ${TOUCH} file2 # The previous "cvs ci -r" set a sticky tag of '7'. Seems a # bit odd, and I guess commit.c (findmaxrev) makes '7' sticky # tags unnecessary (?). I kind of suspect that it should be *************** *** 3403,3409 **** done" dotest rmadd-12 "${testcvs} -q update -A" "" ! touch file3 dotest rmadd-13 "${testcvs} add file3" \ "${PROG} [a-z]*: scheduling file .file3. for addition ${PROG} [a-z]*: use .${PROG} commit. to add this file permanently" --- 3423,3429 ---- done" dotest rmadd-12 "${testcvs} -q update -A" "" ! ${TOUCH} file3 dotest rmadd-13 "${testcvs} add file3" \ "${PROG} [a-z]*: scheduling file .file3. for addition ${PROG} [a-z]*: use .${PROG} commit. to add this file permanently" *************** *** 3420,3426 **** new revision: 1\.1\.2\.1; previous revision: 1\.1 done" ! touch file4 dotest rmadd-16 "${testcvs} add file4" \ "${PROG} [a-z]*: scheduling file .file4. for addition ${PROG} [a-z]*: use .${PROG} commit. to add this file permanently" --- 3440,3446 ---- new revision: 1\.1\.2\.1; previous revision: 1\.1 done" ! ${TOUCH} file4 dotest rmadd-16 "${testcvs} add file4" \ "${PROG} [a-z]*: scheduling file .file4. for addition ${PROG} [a-z]*: use .${PROG} commit. to add this file permanently" *************** *** 3693,3699 **** mkdir sdir dotest dirs2-3 "${testcvs} add sdir" \ "Directory ${TESTDIR}/cvsroot/first-dir/sdir added to the repository" ! touch sdir/file1 dotest dirs2-4 "${testcvs} add sdir/file1" \ "${PROG} [a-z]*: scheduling file .sdir/file1. for addition ${PROG} [a-z]*: use .${PROG} commit. to add this file permanently" --- 3713,3719 ---- mkdir sdir dotest dirs2-3 "${testcvs} add sdir" \ "Directory ${TESTDIR}/cvsroot/first-dir/sdir added to the repository" ! ${TOUCH} sdir/file1 dotest dirs2-4 "${testcvs} add sdir/file1" \ "${PROG} [a-z]*: scheduling file .sdir/file1. for addition ${PROG} [a-z]*: use .${PROG} commit. to add this file permanently" *************** *** 4322,4328 **** dotest tagc-2 "${testcvs} add first-dir" \ "Directory ${TESTDIR}/cvsroot/first-dir added to the repository" cd first-dir ! touch file1 dotest tagc-3 "${testcvs} add file1" \ "${PROG} [a-z]*: scheduling file .file1. for addition ${PROG} [a-z]*: use .${PROG} commit. to add this file permanently" --- 4342,4348 ---- dotest tagc-2 "${testcvs} add first-dir" \ "Directory ${TESTDIR}/cvsroot/first-dir added to the repository" cd first-dir ! ${TOUCH} file1 dotest tagc-3 "${testcvs} add file1" \ "${PROG} [a-z]*: scheduling file .file1. for addition ${PROG} [a-z]*: use .${PROG} commit. to add this file permanently" *************** *** 4334,4340 **** initial revision: 1\.1 done" dotest tagc-5 "${testcvs} -q tag -c tag1" "T file1" ! touch file1 dotest tagc-6 "${testcvs} -q tag -c tag2" "T file1" # Avoid timestamp granularity bugs (FIXME: CVS should be # doing the sleep, right?). --- 4354,4360 ---- initial revision: 1\.1 done" dotest tagc-5 "${testcvs} -q tag -c tag1" "T file1" ! ${TOUCH} file1 dotest tagc-6 "${testcvs} -q tag -c tag2" "T file1" # Avoid timestamp granularity bugs (FIXME: CVS should be # doing the sleep, right?). *************** *** 4377,4383 **** dotest tagf-2 "${testcvs} add first-dir" \ "Directory ${TESTDIR}/cvsroot/first-dir added to the repository" cd first-dir ! touch file1 file2 dotest tagf-3 "${testcvs} add file1 file2" \ "${PROG} [a-z]*: scheduling file .file1. for addition ${PROG} [a-z]*: scheduling file .file2. for addition --- 4397,4403 ---- dotest tagf-2 "${testcvs} add first-dir" \ "Directory ${TESTDIR}/cvsroot/first-dir added to the repository" cd first-dir ! ${TOUCH} file1 file2 dotest tagf-3 "${testcvs} add file1 file2" \ "${PROG} [a-z]*: scheduling file .file1. for addition ${PROG} [a-z]*: scheduling file .file2. for addition *************** *** 4640,4646 **** ${TESTDIR}/cvsroot/first-dir/file1,v <-- file1 initial revision: 1\.1 done" ! sed -e 's/2/two/' file1 > f; mv f file1 dotest rcslib-merge-6 "${testcvs} -q commit -m '' file1" \ "Checking in file1; ${TESTDIR}/cvsroot/first-dir/file1,v <-- file1 --- 4660,4666 ---- ${TESTDIR}/cvsroot/first-dir/file1,v <-- file1 initial revision: 1\.1 done" ! ${SED} -e 's/2/two/' file1 > f; mv f file1 dotest rcslib-merge-6 "${testcvs} -q commit -m '' file1" \ "Checking in file1; ${TESTDIR}/cvsroot/first-dir/file1,v <-- file1 *************** *** 4661,4667 **** '$''Revision: 1\.1 $ 2 3' ! sed -e 's/3/three/' file1 > f; mv f file1 dotest rcslib-merge-11 "${testcvs} -q commit -m '' file1" \ "Checking in file1; ${TESTDIR}/cvsroot/first-dir/file1,v <-- file1 --- 4681,4687 ---- '$''Revision: 1\.1 $ 2 3' ! ${SED} -e 's/3/three/' file1 > f; mv f file1 dotest rcslib-merge-11 "${testcvs} -q commit -m '' file1" \ "Checking in file1; ${TESTDIR}/cvsroot/first-dir/file1,v <-- file1 *************** *** 5156,5167 **** importc) # Test importing a bunch o' files in a bunch o' directories. # Also the -d option. mkdir 1; cd 1 mkdir adir bdir cdir mkdir adir/sub1 adir/sub2 mkdir adir/sub1/ssdir mkdir bdir/subdir ! touch adir/sub1/file1 adir/sub2/file2 adir/sub1/ssdir/ssfile # If I'm correctly reading the Single Unix Specification, # version 2, then "touch -t 197107040343" or "touch -t 203412251801" # should work. But GNU touch seems to have other ideas. --- 5176,5188 ---- importc) # Test importing a bunch o' files in a bunch o' directories. # Also the -d option. + rm -rf 1 mkdir 1; cd 1 mkdir adir bdir cdir mkdir adir/sub1 adir/sub2 mkdir adir/sub1/ssdir mkdir bdir/subdir ! ${TOUCH} adir/sub1/file1 adir/sub2/file2 adir/sub1/ssdir/ssfile # If I'm correctly reading the Single Unix Specification, # version 2, then "touch -t 197107040343" or "touch -t 203412251801" # should work. But GNU touch seems to have other ideas. *************** *** 5170,5177 **** # Note that some versions of touch when used without -t don't handle # y2k and/or set the seconds reliably. # We should probably find a different way of doing this. ! touch 0704034371 bdir/subdir/file1 ! touch 1225180134 cdir/cfile dotest_sort importc-1 \ "${testcvs} import -d -m import-it first-dir vendor release" \ " --- 5191,5198 ---- # Note that some versions of touch when used without -t don't handle # y2k and/or set the seconds reliably. # We should probably find a different way of doing this. ! ${TOUCH} 0704034371 bdir/subdir/file1 ! ${TOUCH} 1225180134 cdir/cfile dotest_sort importc-1 \ "${testcvs} import -d -m import-it first-dir vendor release" \ " *************** *** 5848,5854 **** dotest join2-5 "${testcvs} -q tag -b br1" "T file1" dotest join2-6 "${testcvs} -q update -r br1" "" echo 'modify on branch' >>file1 ! touch bradd dotest join2-6a "${testcvs} add bradd" \ "${PROG} [a-z]*: scheduling file .bradd. for addition on branch .br1. ${PROG} [a-z]*: use .${PROG} commit. to add this file permanently" --- 5869,5875 ---- dotest join2-5 "${testcvs} -q tag -b br1" "T file1" dotest join2-6 "${testcvs} -q update -r br1" "" echo 'modify on branch' >>file1 ! ${TOUCH} bradd dotest join2-6a "${testcvs} add bradd" \ "${PROG} [a-z]*: scheduling file .bradd. for addition on branch .br1. ${PROG} [a-z]*: use .${PROG} commit. to add this file permanently" *************** *** 6157,6163 **** fi cd first-dir ! touch a if ${CVS} add a 2>>${LOGFILE}; then pass 118 --- 6178,6184 ---- fi cd first-dir ! ${TOUCH} a if ${CVS} add a 2>>${LOGFILE}; then pass 118 *************** *** 6213,6219 **** mkdir ${CVSROOT_DIRNAME}/first-dir dotest newb-123a "${testcvs} -q co first-dir" '' cd first-dir ! touch a dotest newb-123b "${testcvs} add a" \ "${PROG} [a-z]*: scheduling file .a. for addition ${PROG} [a-z]*: use .${PROG} commit. to add this file permanently" --- 6234,6240 ---- mkdir ${CVSROOT_DIRNAME}/first-dir dotest newb-123a "${testcvs} -q co first-dir" '' cd first-dir ! ${TOUCH} a dotest newb-123b "${testcvs} add a" \ "${PROG} [a-z]*: scheduling file .a. for addition ${PROG} [a-z]*: use .${PROG} commit. to add this file permanently" *************** *** 6307,6313 **** dotest conflicts-124 "${testcvs} -q co first-dir" '' cd first-dir ! touch a dotest conflicts-125 "${testcvs} add a" \ "${PROG} [a-z]*: scheduling file .a. for addition --- 6328,6334 ---- dotest conflicts-124 "${testcvs} -q co first-dir" '' cd first-dir ! ${TOUCH} a dotest conflicts-125 "${testcvs} add a" \ "${PROG} [a-z]*: scheduling file .a. for addition *************** *** 6577,6583 **** dotest conflicts2-142a1 "${testcvs} -q co first-dir" '' cd first-dir ! touch a abc dotest conflicts2-142a2 "${testcvs} add a abc" \ "${PROG} [a-z]*: scheduling file .a. for addition --- 6598,6604 ---- dotest conflicts2-142a1 "${testcvs} -q co first-dir" '' cd first-dir ! ${TOUCH} a abc dotest conflicts2-142a2 "${testcvs} add a abc" \ "${PROG} [a-z]*: scheduling file .a. for addition *************** *** 6697,6703 **** # conflicts2-142d*: test that if one party adds a file, and another # party has a file of the same name, cvs notices cd 1/first-dir ! touch aa.c echo 'contents unchanged' >same.c dotest conflicts2-142d0 "${testcvs} add aa.c same.c" \ "${PROG} [a-z]*: scheduling file .aa\.c. for addition --- 6718,6724 ---- # conflicts2-142d*: test that if one party adds a file, and another # party has a file of the same name, cvs notices cd 1/first-dir ! ${TOUCH} aa.c echo 'contents unchanged' >same.c dotest conflicts2-142d0 "${testcvs} add aa.c same.c" \ "${PROG} [a-z]*: scheduling file .aa\.c. for addition *************** *** 6794,6800 **** mkdir 2; cd 2 dotest conflicts3-3 "${testcvs} -q co -l first-dir" '' cd ../1/first-dir ! touch file1 file2 dotest conflicts3-4 "${testcvs} add file1 file2" \ "${PROG} [a-z]*: scheduling file .file1. for addition ${PROG} [a-z]*: scheduling file .file2. for addition --- 6815,6821 ---- mkdir 2; cd 2 dotest conflicts3-3 "${testcvs} -q co -l first-dir" '' cd ../1/first-dir ! ${TOUCH} file1 file2 dotest conflicts3-4 "${testcvs} add file1 file2" \ "${PROG} [a-z]*: scheduling file .file1. for addition ${PROG} [a-z]*: scheduling file .file2. for addition *************** *** 6851,6857 **** mkdir sdir dotest conflicts3-14 "${testcvs} add sdir" \ "Directory ${TESTDIR}/cvsroot/first-dir/sdir added to the repository" ! touch sdir/sfile dotest conflicts3-14a "${testcvs} add sdir/sfile" \ "${PROG} [a-z]*: scheduling file .sdir/sfile. for addition ${PROG} [a-z]*: use .${PROG} commit. to add this file permanently" --- 6872,6878 ---- mkdir sdir dotest conflicts3-14 "${testcvs} add sdir" \ "Directory ${TESTDIR}/cvsroot/first-dir/sdir added to the repository" ! ${TOUCH} sdir/sfile dotest conflicts3-14a "${testcvs} add sdir/sfile" \ "${PROG} [a-z]*: scheduling file .sdir/sfile. for addition ${PROG} [a-z]*: use .${PROG} commit. to add this file permanently" *************** *** 6883,6889 **** dotest conflicts3-15 "${testcvs} -q update" \ "${QUESTION} sdir ${PROG} [a-z]*: ignoring sdir (CVS/Repository missing)" ! touch sdir/CVS/Repository dotest conflicts3-16 "${testcvs} -q update" \ "${QUESTION} sdir ${PROG} [a-z]*: ignoring sdir (CVS/Entries missing)" --- 6904,6910 ---- dotest conflicts3-15 "${testcvs} -q update" \ "${QUESTION} sdir ${PROG} [a-z]*: ignoring sdir (CVS/Repository missing)" ! ${TOUCH} sdir/CVS/Repository dotest conflicts3-16 "${testcvs} -q update" \ "${QUESTION} sdir ${PROG} [a-z]*: ignoring sdir (CVS/Entries missing)" *************** *** 6903,6909 **** echo "D/newdir////" >> CVS/Entries dotest conflicts3-18 "${testcvs} -q update" \ "${PROG} [a-z]*: ignoring newdir (CVS/Repository missing)" ! touch newdir/CVS/Repository dotest conflicts3-19 "${testcvs} -q update" \ "${PROG} [a-z]*: ignoring newdir (CVS/Entries missing)" cd .. --- 6924,6930 ---- echo "D/newdir////" >> CVS/Entries dotest conflicts3-18 "${testcvs} -q update" \ "${PROG} [a-z]*: ignoring newdir (CVS/Repository missing)" ! ${TOUCH} newdir/CVS/Repository dotest conflicts3-19 "${testcvs} -q update" \ "${PROG} [a-z]*: ignoring newdir (CVS/Entries missing)" cd .. *************** *** 7149,7155 **** dotest modules-143b "${testcvs} add ssdir" \ "Directory ${TESTDIR}/cvsroot/first-dir/subdir/ssdir added to the repository" ! touch a b dotest modules-144 "${testcvs} add a b" \ "${PROG} [a-z]*: scheduling file .a. for addition --- 7170,7176 ---- dotest modules-143b "${testcvs} add ssdir" \ "Directory ${TESTDIR}/cvsroot/first-dir/subdir/ssdir added to the repository" ! ${TOUCH} a b dotest modules-144 "${testcvs} add a b" \ "${PROG} [a-z]*: scheduling file .a. for addition *************** *** 7389,7395 **** Directory ${TESTDIR}/cvsroot/second-dir added to the repository Directory ${TESTDIR}/cvsroot/third-dir added to the repository" cd third-dir ! touch file3 dotest modules2-setup-3 "${testcvs} add file3" \ "${PROG} [a-z]*: scheduling file .file3. for addition ${PROG} [a-z]*: use .${PROG} commit. to add this file permanently" --- 7410,7416 ---- Directory ${TESTDIR}/cvsroot/second-dir added to the repository Directory ${TESTDIR}/cvsroot/third-dir added to the repository" cd third-dir ! ${TOUCH} file3 dotest modules2-setup-3 "${testcvs} add file3" \ "${PROG} [a-z]*: scheduling file .file3. for addition ${PROG} [a-z]*: use .${PROG} commit. to add this file permanently" *************** *** 7453,7459 **** dotest modules2-9 "${testcvs} co ampermodule" \ "${PROG} [a-z]*: Updating first-dir ${PROG} [a-z]*: Updating second-dir" ! touch ampermodule/first-dir/amper1 cd ampermodule dotest modules2-10 "${testcvs} add first-dir/amper1" \ "${PROG} [a-z]*: scheduling file .first-dir/amper1. for addition --- 7474,7480 ---- dotest modules2-9 "${testcvs} co ampermodule" \ "${PROG} [a-z]*: Updating first-dir ${PROG} [a-z]*: Updating second-dir" ! ${TOUCH} ampermodule/first-dir/amper1 cd ampermodule dotest modules2-10 "${testcvs} add first-dir/amper1" \ "${PROG} [a-z]*: scheduling file .first-dir/amper1. for addition *************** *** 7653,7659 **** fi cd second-dir/suba/subb ! touch fileb dotest modules3-7c "${testcvs} add fileb" \ "${PROG} [a-z]*: scheduling file .fileb. for addition ${PROG} [a-z]*: use .${PROG} commit. to add this file permanently" --- 7674,7680 ---- fi cd second-dir/suba/subb ! ${TOUCH} fileb dotest modules3-7c "${testcvs} add fileb" \ "${PROG} [a-z]*: scheduling file .fileb. for addition ${PROG} [a-z]*: use .${PROG} commit. to add this file permanently" *************** *** 7872,7878 **** mkdir ssdir dotest modules5-3 "${testcvs} add ssdir" \ "Directory ${TESTDIR}/cvsroot/first-dir/subdir/ssdir added to the repository" ! touch a b dotest modules5-4 "${testcvs} add a b" \ "${PROG} [a-z]*: scheduling file .a. for addition ${PROG} [a-z]*: scheduling file .b. for addition --- 7893,7899 ---- mkdir ssdir dotest modules5-3 "${testcvs} add ssdir" \ "Directory ${TESTDIR}/cvsroot/first-dir/subdir/ssdir added to the repository" ! ${TOUCH} a b dotest modules5-4 "${testcvs} add a b" \ "${PROG} [a-z]*: scheduling file .a. for addition ${PROG} [a-z]*: scheduling file .b. for addition *************** *** 9596,9602 **** "${PROG} [a-z]*: Updating dir2d1/sub2d1 U dir2d1/sub2d1/file1" cd dir2d1 ! touch emptyfile # It doesn't make any sense to add a file (or do much of anything # else) in Emptydir; Emptydir is a placeholder indicating that # the working directory doesn't correspond to anything in --- 9617,9623 ---- "${PROG} [a-z]*: Updating dir2d1/sub2d1 U dir2d1/sub2d1/file1" cd dir2d1 ! ${TOUCH} emptyfile # It doesn't make any sense to add a file (or do much of anything # else) in Emptydir; Emptydir is a placeholder indicating that # the working directory doesn't correspond to anything in *************** *** 9917,9923 **** Directory ${TESTDIR}/cvsroot/second-dir added to the repository" cd top-dir ! touch file1 dotest toplevel-3 "${testcvs} add file1" \ "${PROG} [a-z]*: scheduling file .file1. for addition ${PROG} [a-z]*: use .${PROG} commit. to add this file permanently" --- 9938,9944 ---- Directory ${TESTDIR}/cvsroot/second-dir added to the repository" cd top-dir ! ${TOUCH} file1 dotest toplevel-3 "${testcvs} add file1" \ "${PROG} [a-z]*: scheduling file .file1. for addition ${PROG} [a-z]*: use .${PROG} commit. to add this file permanently" *************** *** 9931,9937 **** cd .. cd second-dir ! touch file2 dotest toplevel-3s "${testcvs} add file2" \ "${PROG} [a-z]*: scheduling file .file2. for addition ${PROG} [a-z]*: use .${PROG} commit. to add this file permanently" --- 9952,9958 ---- cd .. cd second-dir ! ${TOUCH} file2 dotest toplevel-3s "${testcvs} add file2" \ "${PROG} [a-z]*: scheduling file .file2. for addition ${PROG} [a-z]*: use .${PROG} commit. to add this file permanently" *************** *** 10047,10053 **** Directory ${TESTDIR}/cvsroot/second-dir added to the repository" cd top-dir ! touch file1 dotest toplevel2-3 "${testcvs} add file1" \ "${PROG} [a-z]*: scheduling file .file1. for addition ${PROG} [a-z]*: use .${PROG} commit. to add this file permanently" --- 10068,10074 ---- Directory ${TESTDIR}/cvsroot/second-dir added to the repository" cd top-dir ! ${TOUCH} file1 dotest toplevel2-3 "${testcvs} add file1" \ "${PROG} [a-z]*: scheduling file .file1. for addition ${PROG} [a-z]*: use .${PROG} commit. to add this file permanently" *************** *** 10061,10067 **** cd .. cd second-dir ! touch file2 dotest toplevel2-3s "${testcvs} add file2" \ "${PROG} [a-z]*: scheduling file .file2. for addition ${PROG} [a-z]*: use .${PROG} commit. to add this file permanently" --- 10082,10088 ---- cd .. cd second-dir ! ${TOUCH} file2 dotest toplevel2-3s "${testcvs} add file2" \ "${PROG} [a-z]*: scheduling file .file2. for addition ${PROG} [a-z]*: use .${PROG} commit. to add this file permanently" *************** *** 10180,10186 **** cat >${TESTDIR}/editme <${TESTDIR}/edit.new mv ${TESTDIR}/edit.new \$1 exit 0 EOF --- 10201,10207 ---- cat >${TESTDIR}/editme <${TESTDIR}/edit.new mv ${TESTDIR}/edit.new \$1 exit 0 EOF *************** *** 10192,10198 **** dotest editor-2 "${testcvs} add first-dir" \ "Directory ${TESTDIR}/cvsroot/first-dir added to the repository" cd first-dir ! touch file1 file2 dotest editor-3 "${testcvs} add file1 file2" \ "${PROG} [a-z]*: scheduling file .file1. for addition ${PROG} [a-z]*: scheduling file .file2. for addition --- 10213,10219 ---- dotest editor-2 "${testcvs} add first-dir" \ "Directory ${TESTDIR}/cvsroot/first-dir added to the repository" cd first-dir ! ${TOUCH} file1 file2 dotest editor-3 "${testcvs} add file1 file2" \ "${PROG} [a-z]*: scheduling file .file1. for addition ${PROG} [a-z]*: scheduling file .file2. for addition *************** *** 10359,10365 **** fail 162 fi cd 1dir ! touch foo if ${testcvs} add foo 2>>${LOGFILE}; then pass 163 else --- 10380,10386 ---- fail 162 fi cd 1dir ! ${TOUCH} foo if ${testcvs} add foo 2>>${LOGFILE}; then pass 163 else *************** *** 10432,10438 **** cd first-dir dotest_fail errmsg2-3 "${testcvs} add CVS" \ "${PROG} [a-z]*: cannot add special file .CVS.; skipping" ! touch file1 # For the most part add returns a failure exitstatus if # there are any errors, even if the remaining files are # processed without incident. The "cannot add --- 10453,10459 ---- cd first-dir dotest_fail errmsg2-3 "${testcvs} add CVS" \ "${PROG} [a-z]*: cannot add special file .CVS.; skipping" ! ${TOUCH} file1 # For the most part add returns a failure exitstatus if # there are any errors, even if the remaining files are # processed without incident. The "cannot add *************** *** 10474,10480 **** cd first-dir ! touch file10 mkdir sdir10 dotest errmsg2-10 "${testcvs} add file10 sdir10" \ "${PROG} [a-z]*: scheduling file .file10. for addition --- 10495,10501 ---- cd first-dir ! ${TOUCH} file10 mkdir sdir10 dotest errmsg2-10 "${testcvs} add file10 sdir10" \ "${PROG} [a-z]*: scheduling file .file10. for addition *************** *** 10498,10509 **** dotest errmsg2-13 "${testcvs} add first-dir/sdir10/ssdir" \ "Directory ${TESTDIR}/cvsroot/first-dir/sdir10/ssdir added to the repository" ! touch first-dir/sdir10/ssdir/ssfile dotest errmsg2-14 \ "${testcvs} add first-dir/sdir10/ssdir/ssfile" \ "${PROG} [a-z]*: scheduling file .first-dir/sdir10/ssdir/ssfile. for addition ${PROG} [a-z]*: use .${PROG} commit. to add this file permanently" ! touch first-dir/file15 dotest errmsg2-15 "${testcvs} add first-dir/file15" \ "${PROG} [a-z]*: scheduling file .first-dir/file15. for addition ${PROG} [a-z]*: use .${PROG} commit. to add this file permanently" --- 10519,10530 ---- dotest errmsg2-13 "${testcvs} add first-dir/sdir10/ssdir" \ "Directory ${TESTDIR}/cvsroot/first-dir/sdir10/ssdir added to the repository" ! ${TOUCH} first-dir/sdir10/ssdir/ssfile dotest errmsg2-14 \ "${testcvs} add first-dir/sdir10/ssdir/ssfile" \ "${PROG} [a-z]*: scheduling file .first-dir/sdir10/ssdir/ssfile. for addition ${PROG} [a-z]*: use .${PROG} commit. to add this file permanently" ! ${TOUCH} first-dir/file15 dotest errmsg2-15 "${testcvs} add first-dir/file15" \ "${PROG} [a-z]*: scheduling file .first-dir/file15. for addition ${PROG} [a-z]*: use .${PROG} commit. to add this file permanently" *************** *** 10511,10517 **** # Now the case where we try to give it a directory which is not # under CVS control. mkdir bogus-dir ! touch bogus-dir/file16 # The first message, from local CVS, is nice. The second one # is not nice; would be good to fix remote CVS to give a clearer # message (e.g. the one from local CVS). But at least it is an --- 10532,10538 ---- # Now the case where we try to give it a directory which is not # under CVS control. mkdir bogus-dir ! ${TOUCH} bogus-dir/file16 # The first message, from local CVS, is nice. The second one # is not nice; would be good to fix remote CVS to give a clearer # message (e.g. the one from local CVS). But at least it is an *************** *** 10793,10799 **** # But that isn't the currently implemented behavior. dotest devcom2-2 "${testcvs} watch on w1" '' ! touch w1 w2 w3 nw1 dotest devcom2-3 "${testcvs} add w1 w2 w3 nw1" "${DOTSTAR}" # Letting the user set the watch here probably can be considered # a feature--although it leads to a few potentially strange --- 10814,10820 ---- # But that isn't the currently implemented behavior. dotest devcom2-2 "${testcvs} watch on w1" '' ! ${TOUCH} w1 w2 w3 nw1 dotest devcom2-3 "${testcvs} add w1 w2 w3 nw1" "${DOTSTAR}" # Letting the user set the watch here probably can be considered # a feature--although it leads to a few potentially strange *************** *** 10879,10885 **** dotest devcom3-1 "${testcvs} -q co first-dir" '' cd first-dir ! touch w1 w2 dotest devcom3-2 "${testcvs} add w1 w2" "${DOTSTAR}" dotest devcom3-3 "${testcvs} watch on w1 w2" '' dotest devcom3-4 "${testcvs} -q ci -m add-them" "${DOTSTAR}" --- 10900,10906 ---- dotest devcom3-1 "${testcvs} -q co first-dir" '' cd first-dir ! ${TOUCH} w1 w2 dotest devcom3-2 "${testcvs} add w1 w2" "${DOTSTAR}" dotest devcom3-3 "${testcvs} watch on w1 w2" '' dotest devcom3-4 "${testcvs} -q ci -m add-them" "${DOTSTAR}" *************** *** 10949,10955 **** # OK, now change the tab to a space, and see that CVS gives # a reasonable error (this is database corruption but CVS should # not lose its mind). ! sed -e 's/Fw2 /Fw2 /' <${CVSROOT_DIRNAME}/first-dir/CVS/fileattr \ >${CVSROOT_DIRNAME}/first-dir/CVS/fileattr.new mv ${CVSROOT_DIRNAME}/first-dir/CVS/fileattr.new \ ${CVSROOT_DIRNAME}/first-dir/CVS/fileattr --- 10970,10976 ---- # OK, now change the tab to a space, and see that CVS gives # a reasonable error (this is database corruption but CVS should # not lose its mind). ! ${SED} -e 's/Fw2 /Fw2 /' <${CVSROOT_DIRNAME}/first-dir/CVS/fileattr \ >${CVSROOT_DIRNAME}/first-dir/CVS/fileattr.new mv ${CVSROOT_DIRNAME}/first-dir/CVS/fileattr.new \ ${CVSROOT_DIRNAME}/first-dir/CVS/fileattr *************** *** 10974,10980 **** cd first-dir dotest watch4-1 "${testcvs} watch on" '' # This is just like the 173 test ! touch file1 dotest watch4-2 "${testcvs} add file1" \ "${PROG} [a-z]*: scheduling file .file1. for addition ${PROG} [a-z]*: use .${PROG} commit. to add this file permanently" --- 10995,11001 ---- cd first-dir dotest watch4-1 "${testcvs} watch on" '' # This is just like the 173 test ! ${TOUCH} file1 dotest watch4-2 "${testcvs} add file1" \ "${PROG} [a-z]*: scheduling file .file1. for addition ${PROG} [a-z]*: use .${PROG} commit. to add this file permanently" *************** *** 10990,10996 **** dotest watch4-4 "${testcvs} add subdir" \ "Directory ${TESTDIR}/cvsroot/first-dir/subdir added to the repository" cd subdir ! touch sfile dotest watch4-5 "${testcvs} add sfile" \ "${PROG} [a-z]*: scheduling file .sfile. for addition ${PROG} [a-z]*: use .${PROG} commit. to add this file permanently" --- 11011,11017 ---- dotest watch4-4 "${testcvs} add subdir" \ "Directory ${TESTDIR}/cvsroot/first-dir/subdir added to the repository" cd subdir ! ${TOUCH} sfile dotest watch4-5 "${testcvs} add sfile" \ "${PROG} [a-z]*: scheduling file .sfile. for addition ${PROG} [a-z]*: use .${PROG} commit. to add this file permanently" *************** *** 11080,11086 **** cd first-dir dotest watch5-1 "${testcvs} watch on" '' # This is just like the 173 test ! touch file1 dotest watch5-2 "${testcvs} add file1" \ "${PROG} [a-z]*: scheduling file .file1. for addition ${PROG} [a-z]*: use .${PROG} commit. to add this file permanently" --- 11101,11107 ---- cd first-dir dotest watch5-1 "${testcvs} watch on" '' # This is just like the 173 test ! ${TOUCH} file1 dotest watch5-2 "${testcvs} add file1" \ "${PROG} [a-z]*: scheduling file .file1. for addition ${PROG} [a-z]*: use .${PROG} commit. to add this file permanently" *************** *** 11101,11107 **** dotest watch5-7 "test -f CVS/Base/file1" '' # Here's where the file used to dissappear ! touch file1 if ${testcvs} status file1 >>${LOGFILE} 2>&1; then pass watch5-8 else --- 11122,11128 ---- dotest watch5-7 "test -f CVS/Base/file1" '' # Here's where the file used to dissappear ! ${TOUCH} file1 if ${testcvs} status file1 >>${LOGFILE} 2>&1; then pass watch5-8 else *************** *** 11110,11116 **** dotest watch5-10 "test -f CVS/Base/file1" '' # Make sure update won't remove the file either ! touch file1 dotest watch5-11 "${testcvs} -q up" '' dotest watch5-12 "test -f CVS/Base/file1" '' --- 11131,11137 ---- dotest watch5-10 "test -f CVS/Base/file1" '' # Make sure update won't remove the file either ! ${TOUCH} file1 dotest watch5-11 "${testcvs} -q up" '' dotest watch5-12 "test -f CVS/Base/file1" '' *************** *** 11247,11253 **** CVSIGNORE=envig.c; export CVSIGNORE mkdir dir-to-import cd dir-to-import ! touch foobar.c bar.c rootig.c defig.o envig.c optig.c # We use sort because we can't predict the order in which # the files will be listed. dotest_sort 188a "${testcvs} import -m m -I optig.c first-dir tag1 tag2" \ --- 11268,11274 ---- CVSIGNORE=envig.c; export CVSIGNORE mkdir dir-to-import cd dir-to-import ! ${TOUCH} foobar.c bar.c rootig.c defig.o envig.c optig.c # We use sort because we can't predict the order in which # the files will be listed. dotest_sort 188a "${testcvs} import -m m -I optig.c first-dir tag1 tag2" \ *************** *** 11285,11291 **** dotest 189b "${testcvs} -q co first-dir" 'U first-dir/bar.c U first-dir/foobar.c' cd first-dir ! touch rootig.c defig.o envig.c optig.c notig.c dotest 189c "${testcvs} -q update -I optig.c" "${QUESTION} notig.c" # The fact that CVS requires us to specify -I CVS here strikes me # as a bug. --- 11306,11312 ---- dotest 189b "${testcvs} -q co first-dir" 'U first-dir/bar.c U first-dir/foobar.c' cd first-dir ! ${TOUCH} rootig.c defig.o envig.c optig.c notig.c dotest 189c "${testcvs} -q update -I optig.c" "${QUESTION} notig.c" # The fact that CVS requires us to specify -I CVS here strikes me # as a bug. *************** *** 11310,11316 **** # necessary. Oh well, at least we test CVS's ablity to # handle a file with a modified timestamp but unmodified # contents. ! touch bar.c dotest 189f "${testcvs} -q ci -m commit-it" "${QUESTION} notig.c" fi --- 11331,11337 ---- # necessary. Oh well, at least we test CVS's ablity to # handle a file with a modified timestamp but unmodified # contents. ! ${TOUCH} bar.c dotest 189f "${testcvs} -q ci -m commit-it" "${QUESTION} notig.c" fi *************** *** 11319,11325 **** cd .. echo notig.c >first-dir/.cvsignore echo foobar.c >second-dir/.cvsignore ! touch first-dir/notig.c second-dir/notig.c second-dir/foobar.c dotest_sort 190 "${testcvs} -qn update" \ "${QUESTION} first-dir/.cvsignore ${QUESTION} second-dir/.cvsignore --- 11340,11346 ---- cd .. echo notig.c >first-dir/.cvsignore echo foobar.c >second-dir/.cvsignore ! ${TOUCH} first-dir/notig.c second-dir/notig.c second-dir/foobar.c dotest_sort 190 "${testcvs} -qn update" \ "${QUESTION} first-dir/.cvsignore ${QUESTION} second-dir/.cvsignore *************** *** 12041,12047 **** mkdir dir-to-import cd dir-to-import ! touch foo.c foo.exe # While we're here, test for rejection of duplicate tag names. dotest_fail binwrap-0 \ --- 12062,12068 ---- mkdir dir-to-import cd dir-to-import ! ${TOUCH} foo.c foo.exe # While we're here, test for rejection of duplicate tag names. dotest_fail binwrap-0 \ *************** *** 12086,12092 **** mkdir dir-to-import cd dir-to-import ! touch foo.c foo.exe # Specify that all files are binary except *.c. # The order seems to matter, with the earlier rules taking --- 12107,12113 ---- mkdir dir-to-import cd dir-to-import ! ${TOUCH} foo.c foo.exe # Specify that all files are binary except *.c. # The order seems to matter, with the earlier rules taking *************** *** 12259,12265 **** echo "*.newbin -k 'b'" > .cvswrappers echo .cvswrappers >.cvsignore echo .cvsignore >>.cvsignore ! touch file1.newbin file1.txt dotest binwrap3-2c "${testcvs} add file1.newbin file1.txt" \ "${PROG} [a-z]*: scheduling file .file1\.newbin. for addition ${PROG} [a-z]*: scheduling file .file1\.txt. for addition --- 12280,12286 ---- echo "*.newbin -k 'b'" > .cvswrappers echo .cvswrappers >.cvsignore echo .cvsignore >>.cvsignore ! ${TOUCH} file1.newbin file1.txt dotest binwrap3-2c "${testcvs} add file1.newbin file1.txt" \ "${PROG} [a-z]*: scheduling file .file1\.newbin. for addition ${PROG} [a-z]*: scheduling file .file1\.txt. for addition *************** *** 12401,12407 **** dotest mwrap-2 "${testcvs} add first-dir" \ "Directory ${TESTDIR}/cvsroot/first-dir added to the repository" cd first-dir ! touch aa dotest mwrap-3 "${testcvs} add aa" \ "${PROG} [a-z]*: scheduling file .aa. for addition ${PROG} [a-z]*: use .${PROG} commit. to add this file permanently" --- 12422,12428 ---- dotest mwrap-2 "${testcvs} add first-dir" \ "Directory ${TESTDIR}/cvsroot/first-dir added to the repository" cd first-dir ! ${TOUCH} aa dotest mwrap-3 "${testcvs} add aa" \ "${PROG} [a-z]*: scheduling file .aa. for addition ${PROG} [a-z]*: use .${PROG} commit. to add this file permanently" *************** *** 12514,12520 **** mkdir ${CVSROOT_DIRNAME}/first-dir dotest info-5 "${testcvs} -q co first-dir" '' cd first-dir ! touch file1 dotest info-6 "${testcvs} add file1" \ "${PROG}"' [a-z]*: scheduling file `file1'\'' for addition '"${PROG}"' [a-z]*: use .'"${PROG}"' commit. to add this file permanently' --- 12535,12541 ---- mkdir ${CVSROOT_DIRNAME}/first-dir dotest info-5 "${testcvs} -q co first-dir" '' cd first-dir ! ${TOUCH} file1 dotest info-6 "${testcvs} add file1" \ "${PROG}"' [a-z]*: scheduling file `file1'\'' for addition '"${PROG}"' [a-z]*: use .'"${PROG}"' commit. to add this file permanently' *************** *** 12605,12611 **** cd .. mkdir another-dir cd another-dir ! touch file2 dotest_fail info-v4 \ "${testcvs} import -m bogus first-dir/another x y" \ "No BugId found\. --- 12626,12632 ---- cd .. mkdir another-dir cd another-dir ! ${TOUCH} file2 dotest_fail info-v4 \ "${testcvs} import -m bogus first-dir/another x y" \ "No BugId found\. *************** *** 13664,13670 **** dotest crerepos-9 "${testcvs} add first-dir" \ "Directory ${TESTDIR}/cvsroot/first-dir added to the repository" cd first-dir ! touch file1 dotest crerepos-10 "${testcvs} add file1" \ "${PROG} [a-z]*: scheduling file .file1. for addition ${PROG} [a-z]*: use .${PROG} commit. to add this file permanently" --- 13685,13691 ---- dotest crerepos-9 "${testcvs} add first-dir" \ "Directory ${TESTDIR}/cvsroot/first-dir added to the repository" cd first-dir ! ${TOUCH} file1 dotest crerepos-10 "${testcvs} add file1" \ "${PROG} [a-z]*: scheduling file .file1. for addition ${PROG} [a-z]*: use .${PROG} commit. to add this file permanently" *************** *** 13684,13690 **** dotest crerepos-13 "${testcvs} add crerepos-dir" \ "Directory ${TESTDIR}/crerepos/crerepos-dir added to the repository" cd crerepos-dir ! touch cfile dotest crerepos-14 "${testcvs} add cfile" \ "${PROG} [a-z]*: scheduling file .cfile. for addition ${PROG} [a-z]*: use .${PROG} commit. to add this file permanently" --- 13705,13711 ---- dotest crerepos-13 "${testcvs} add crerepos-dir" \ "Directory ${TESTDIR}/crerepos/crerepos-dir added to the repository" cd crerepos-dir ! ${TOUCH} cfile dotest crerepos-14 "${testcvs} add cfile" \ "${PROG} [a-z]*: scheduling file .cfile. for addition ${PROG} [a-z]*: use .${PROG} commit. to add this file permanently" *************** *** 14455,14461 **** mkdir dir dotest backuprecover-3 "${testcvs} add dir" \ "Directory ${TESTDIR}/cvsroot/first-dir/dir added to the repository" ! touch file1 dir/file2 dotest backuprecover-4 "${testcvs} -q add file1 dir/file2" \ "${PROG} [a-z]*: use '${PROG} commit' to add these files permanently" dotest backuprecover-5 "${testcvs} -q ci -mtest" \ --- 14476,14482 ---- mkdir dir dotest backuprecover-3 "${testcvs} add dir" \ "Directory ${TESTDIR}/cvsroot/first-dir/dir added to the repository" ! ${TOUCH} file1 dir/file2 dotest backuprecover-4 "${testcvs} -q add file1 dir/file2" \ "${PROG} [a-z]*: use '${PROG} commit' to add these files permanently" dotest backuprecover-5 "${testcvs} -q ci -mtest" \ *************** *** 14499,14506 **** mkdir 2; cd 2 dotest backuprecover-7 "${testcvs} -Q co first-dir" '' cd first-dir ! sed -e"s/looks like/just looks like/" file1 >tmp; mv tmp file1 ! sed -e"s/don't use/don't just use/" dir/file2 >tmp; mv tmp dir/file2 # developer 1 is on a roll cd ../../1/first-dir --- 14520,14527 ---- mkdir 2; cd 2 dotest backuprecover-7 "${testcvs} -Q co first-dir" '' cd first-dir ! ${SED} -e"s/looks like/just looks like/" file1 >tmp; mv tmp file1 ! ${SED} -e"s/don't use/don't just use/" dir/file2 >tmp; mv tmp dir/file2 # developer 1 is on a roll cd ../../1/first-dir *************** *** 14549,14555 **** mkdir 4; cd 4 dotest backuprecover-10 "${testcvs} -Q co first-dir" '' cd first-dir ! sed -e"s/quit and/be fired so he can/" dir/file2 >tmp; mv tmp dir/file2 # And back to developer 1 cd ../../1/first-dir --- 14570,14576 ---- mkdir 4; cd 4 dotest backuprecover-10 "${testcvs} -Q co first-dir" '' cd first-dir ! ${SED} -e"s/quit and/be fired so he can/" dir/file2 >tmp; mv tmp dir/file2 # And back to developer 1 cd ../../1/first-dir *************** *** 14577,14583 **** # developer 3'll do a bit of work that never gets checked in cd ../../3/first-dir dotest backuprecover-13 "${testcvs} -Q update" '' ! sed -e"s/very/some extremely/" file1 >tmp; mv tmp file1 dotest backuprecover-14 "${testcvs} -q ci -mtest" \ "Checking in file1; ${TESTDIR}/cvsroot/first-dir/file1,v <-- file1 --- 14598,14604 ---- # developer 3'll do a bit of work that never gets checked in cd ../../3/first-dir dotest backuprecover-13 "${testcvs} -Q update" '' ! ${SED} -e"s/very/some extremely/" file1 >tmp; mv tmp file1 dotest backuprecover-14 "${testcvs} -q ci -mtest" \ "Checking in file1; ${TESTDIR}/cvsroot/first-dir/file1,v <-- file1 *************** *** 14672,14681 **** rcsmerge: warning: conflicts during merge ${PROG} [a-z]*: conflicts found in dir/file2 C dir/file2" ! sed -e \ "/^<<<<<<>>>>>>/d" file1 >tmp; mv tmp file1 ! sed -e \ "/^<<<<<<>>>>>>/d s/quit and/be fired so he can/" dir/file2 >tmp; mv tmp dir/file2 --- 14693,14702 ---- rcsmerge: warning: conflicts during merge ${PROG} [a-z]*: conflicts found in dir/file2 C dir/file2" ! ${SED} -e \ "/^<<<<<<>>>>>>/d" file1 >tmp; mv tmp file1 ! ${SED} -e \ "/^<<<<<<>>>>>>/d s/quit and/be fired so he can/" dir/file2 >tmp; mv tmp dir/file2 *************** *** 14881,14887 **** dotest modes-2 "${testcvs} add first-dir" \ "Directory ${TESTDIR}/cvsroot/first-dir added to the repository" cd first-dir ! touch aa dotest modes-3 "${testcvs} add aa" \ "${PROG} [a-z]*: scheduling file .aa. for addition ${PROG} [a-z]*: use .${PROG} commit. to add this file permanently" --- 14902,14908 ---- dotest modes-2 "${testcvs} add first-dir" \ "Directory ${TESTDIR}/cvsroot/first-dir added to the repository" cd first-dir ! ${TOUCH} aa dotest modes-3 "${testcvs} add aa" \ "${PROG} [a-z]*: scheduling file .aa. for addition ${PROG} [a-z]*: use .${PROG} commit. to add this file permanently" *************** *** 14922,14928 **** CVSUMASK=007 export CVSUMASK ! touch ab # Might as well test the execute bit too. chmod +x ab dotest modes-8 "${testcvs} add ab" \ --- 14943,14949 ---- CVSUMASK=007 export CVSUMASK ! ${TOUCH} ab # Might as well test the execute bit too. chmod +x ab dotest modes-8 "${testcvs} add ab" \ *************** *** 14951,14957 **** dotest modes-11 "${testcvs} -q tag -b br" 'T aa T ab' dotest modes-12 "${testcvs} -q update -r br" '' ! touch ac dotest modes-13 "${testcvs} add ac" \ "${PROG} [a-z]*: scheduling file .ac. for addition on branch .br. ${PROG} [a-z]*: use .${PROG} commit. to add this file permanently" --- 14972,14978 ---- dotest modes-11 "${testcvs} -q tag -b br" 'T aa T ab' dotest modes-12 "${testcvs} -q update -r br" '' ! ${TOUCH} ac dotest modes-13 "${testcvs} add ac" \ "${PROG} [a-z]*: scheduling file .ac. for addition on branch .br. ${PROG} [a-z]*: use .${PROG} commit. to add this file permanently" *************** *** 14999,15005 **** dotest modes2-2 "${testcvs} add first-dir" \ "Directory ${TESTDIR}/cvsroot/first-dir added to the repository" cd first-dir ! touch aa dotest modes2-3 "${testcvs} add aa" \ "${PROG} [a-z]*: scheduling file .aa. for addition ${PROG} [a-z]*: use .${PROG} commit. to add this file permanently" --- 15020,15026 ---- dotest modes2-2 "${testcvs} add first-dir" \ "Directory ${TESTDIR}/cvsroot/first-dir added to the repository" cd first-dir ! ${TOUCH} aa dotest modes2-3 "${testcvs} add aa" \ "${PROG} [a-z]*: scheduling file .aa. for addition ${PROG} [a-z]*: use .${PROG} commit. to add this file permanently" *************** *** 15022,15028 **** # If we don't change the st_mtime, CVS doesn't even try to read # the file. Note that some versions of "touch" require that we # do this while the file is still writable. ! touch aa chmod a= aa dotest_fail modes2-6 "${testcvs} -q update -r 1.1 aa" \ "${PROG} \[update aborted\]: cannot open file aa for comparing: Permission denied" \ --- 15043,15049 ---- # If we don't change the st_mtime, CVS doesn't even try to read # the file. Note that some versions of "touch" require that we # do this while the file is still writable. ! ${TOUCH} aa chmod a= aa dotest_fail modes2-6 "${testcvs} -q update -r 1.1 aa" \ "${PROG} \[update aborted\]: cannot open file aa for comparing: Permission denied" \ *************** *** 15046,15052 **** dotest modes3-2 "${testcvs} add first-dir second-dir" \ "Directory ${TESTDIR}/cvsroot/first-dir added to the repository Directory ${TESTDIR}/cvsroot/second-dir added to the repository" ! touch first-dir/aa second-dir/ab dotest modes3-3 "${testcvs} add first-dir/aa second-dir/ab" \ "${PROG} [a-z]*: scheduling file .first-dir/aa. for addition ${PROG} [a-z]*: scheduling file .second-dir/ab. for addition --- 15067,15073 ---- dotest modes3-2 "${testcvs} add first-dir second-dir" \ "Directory ${TESTDIR}/cvsroot/first-dir added to the repository Directory ${TESTDIR}/cvsroot/second-dir added to the repository" ! ${TOUCH} first-dir/aa second-dir/ab dotest modes3-3 "${testcvs} add first-dir/aa second-dir/ab" \ "${PROG} [a-z]*: scheduling file .first-dir/aa. for addition ${PROG} [a-z]*: scheduling file .second-dir/ab. for addition *************** *** 15100,15106 **** dotest stamps-2 "${testcvs} add first-dir" \ "Directory ${TESTDIR}/cvsroot/first-dir added to the repository" cd first-dir ! touch aa echo '$''Id$' >kw ls -l aa >${TESTDIR}/1/stamp.aa.touch ls -l kw >${TESTDIR}/1/stamp.kw.touch --- 15121,15127 ---- dotest stamps-2 "${testcvs} add first-dir" \ "Directory ${TESTDIR}/cvsroot/first-dir added to the repository" cd first-dir ! ${TOUCH} aa echo '$''Id$' >kw ls -l aa >${TESTDIR}/1/stamp.aa.touch ls -l kw >${TESTDIR}/1/stamp.kw.touch *************** *** 15245,15251 **** "Directory ${TESTDIR}/cvsroot/first-dir added to the repository" cd first-dir ! touch foo chmod 431 foo dotest perms-3 "${testcvs} add foo" \ "${PROG} [a-z]*: scheduling file .foo. for addition --- 15266,15272 ---- "Directory ${TESTDIR}/cvsroot/first-dir added to the repository" cd first-dir ! ${TOUCH} foo chmod 431 foo dotest perms-3 "${testcvs} add foo" \ "${PROG} [a-z]*: scheduling file .foo. for addition *************** *** 15273,15279 **** rm -rf ${CVSROOT_DIRNAME}/first-dir rm -f ${CVSROOT_DIRNAME}/CVSROOT/config ! touch ${CVSROOT_DIRNAME}/CVSROOT/config chmod 444 ${CVSROOT_DIRNAME}/CVSROOT/config ;; --- 15294,15300 ---- rm -rf ${CVSROOT_DIRNAME}/first-dir rm -f ${CVSROOT_DIRNAME}/CVSROOT/config ! ${TOUCH} ${CVSROOT_DIRNAME}/CVSROOT/config chmod 444 ${CVSROOT_DIRNAME}/CVSROOT/config ;; *************** *** 15322,15328 **** rm -rf ${CVSROOT_DIRNAME}/first-dir rm -f ${CVSROOT_DIRNAME}/CVSROOT/config ! touch ${CVSROOT_DIRNAME}/CVSROOT/config chmod 444 ${CVSROOT_DIRNAME}/CVSROOT/config ;; --- 15343,15349 ---- rm -rf ${CVSROOT_DIRNAME}/first-dir rm -f ${CVSROOT_DIRNAME}/CVSROOT/config ! ${TOUCH} ${CVSROOT_DIRNAME}/CVSROOT/config chmod 444 ${CVSROOT_DIRNAME}/CVSROOT/config ;; *************** *** 15381,15387 **** # Make up some ugly filenames, to test that they get # encoded properly in the delta nodes. Note that `dotest' screws # up if some arguments have embedded spaces. ! if touch aaaa then pass hardlinks-2.1 else --- 15402,15408 ---- # Make up some ugly filenames, to test that they get # encoded properly in the delta nodes. Note that `dotest' screws # up if some arguments have embedded spaces. ! if ${TOUCH} aaaa then pass hardlinks-2.1 else *************** *** 15463,15469 **** rm -rf ${CVSROOT_DIRNAME}/first-dir rm -f ${CVSROOT_DIRNAME}/CVSROOT/config ! touch ${CVSROOT_DIRNAME}/CVSROOT/config chmod 444 ${CVSROOT_DIRNAME}/CVSROOT/config ;; --- 15484,15490 ---- rm -rf ${CVSROOT_DIRNAME}/first-dir rm -f ${CVSROOT_DIRNAME}/CVSROOT/config ! ${TOUCH} ${CVSROOT_DIRNAME}/CVSROOT/config chmod 444 ${CVSROOT_DIRNAME}/CVSROOT/config ;; *************** *** 15479,15485 **** "Directory ${TESTDIR}/cvsroot/first-dir added to the repository" cd first-dir ! touch file1 dotest sticky-3 "${testcvs} add file1" \ "${PROG} [a-z]*: scheduling file .file1. for addition ${PROG} [a-z]*: use .${PROG} commit. to add this file permanently" --- 15500,15506 ---- "Directory ${TESTDIR}/cvsroot/first-dir added to the repository" cd first-dir ! ${TOUCH} file1 dotest sticky-3 "${testcvs} add file1" \ "${PROG} [a-z]*: scheduling file .file1. for addition ${PROG} [a-z]*: use .${PROG} commit. to add this file permanently" *************** *** 15501,15507 **** dotest sticky-8 "cat file1" '' dotest sticky-9 "${testcvs} -q update" '' dotest sticky-10 "cat file1" '' ! touch file2 dotest_fail sticky-11 "${testcvs} add file2" \ "${PROG} [a-z]*: cannot add file on non-branch tag tag1" dotest sticky-12 "${testcvs} -q update -A" "[UP] file1 --- 15522,15528 ---- dotest sticky-8 "cat file1" '' dotest sticky-9 "${testcvs} -q update" '' dotest sticky-10 "cat file1" '' ! ${TOUCH} file2 dotest_fail sticky-11 "${testcvs} add file2" \ "${PROG} [a-z]*: cannot add file on non-branch tag tag1" dotest sticky-12 "${testcvs} -q update -A" "[UP] file1 *************** *** 16056,16062 **** "T binfile\.dat T file1" ! sed -e 's/our/the best of and the worst of/' file1 >f; mv f file1 dotest keyword2-8 "${testcvs} -q ci -m change" \ "Checking in file1; ${TESTDIR}/cvsroot/first-dir/file1,v <-- file1 --- 16077,16083 ---- "T binfile\.dat T file1" ! ${SED} -e 's/our/the best of and the worst of/' file1 >f; mv f file1 dotest keyword2-8 "${testcvs} -q ci -m change" \ "Checking in file1; ${TESTDIR}/cvsroot/first-dir/file1,v <-- file1 *************** *** 16629,16640 **** dotest tag8k-16 "$testcvs -Q tag $t-a $file" '' # Extract the author value. ! name=`sed -n 's/.*; author \([^;]*\);.*/\1/p' ${TESTDIR}/cvsroot/$module/$file,v|head -1` # Form a suffix string of length (16 - length($name)). # CAREFUL: this will lose if $name is longer than 16. ! sed_pattern=`echo $name|sed s/././g` ! suffix=`echo 1234567890123456|sed s/$sed_pattern//` # Add a final tag with length chosen so that it will push the # offset of the `;' in the 2nd occurrence of `;\tauthor' in the --- 16650,16661 ---- dotest tag8k-16 "$testcvs -Q tag $t-a $file" '' # Extract the author value. ! name=`${SED} -n 's/.*; author \([^;]*\);.*/\1/p' ${TESTDIR}/cvsroot/$module/$file,v|head -1` # Form a suffix string of length (16 - length($name)). # CAREFUL: this will lose if $name is longer than 16. ! sed_pattern=`echo $name|${SED} s/././g` ! suffix=`echo 1234567890123456|${SED} s/$sed_pattern//` # Add a final tag with length chosen so that it will push the # offset of the `;' in the 2nd occurrence of `;\tauthor' in the *************** *** 16694,16700 **** # Set up some files, file2 a plain one and file1 with a revision # on a branch. ! touch file1 file2 dotest admin-5 "${testcvs} add file1 file2" \ "${PROG} [a-z]*: scheduling file .file1. for addition ${PROG} [a-z]*: scheduling file .file2. for addition --- 16715,16721 ---- # Set up some files, file2 a plain one and file1 with a revision # on a branch. ! ${TOUCH} file1 file2 dotest admin-5 "${testcvs} add file1 file2" \ "${PROG} [a-z]*: scheduling file .file1. for addition ${PROG} [a-z]*: scheduling file .file2. for addition *************** *** 17489,17495 **** dotest reserved-2 "${testcvs} add first-dir" \ "Directory ${TESTDIR}/cvsroot/first-dir added to the repository" cd first-dir ! touch file1 dotest reserved-3 "${testcvs} add file1" \ "${PROG} [a-z]*: scheduling file .file1. for addition ${PROG} [a-z]*: use .${PROG} commit. to add this file permanently" --- 17510,17516 ---- dotest reserved-2 "${testcvs} add first-dir" \ "Directory ${TESTDIR}/cvsroot/first-dir added to the repository" cd first-dir ! ${TOUCH} file1 dotest reserved-3 "${testcvs} add file1" \ "${PROG} [a-z]*: scheduling file .file1. for addition ${PROG} [a-z]*: use .${PROG} commit. to add this file permanently" *************** *** 17560,17567 **** # It isn't locked exit 0 else ! user=\`echo \$line | sed -e 's/locks \\(${author}\\):[0-9.]*;.*/\\1/'\` ! version=\`echo \$line | sed -e 's/locks ${author}:\\([0-9.]*\\);.*/\\1/'\` echo "\$user has file a-lock locked for version \$version" exit 1 fi --- 17581,17588 ---- # It isn't locked exit 0 else ! user=\`echo \$line | ${SED} -e 's/locks \\(${author}\\):[0-9.]*;.*/\\1/'\` ! version=\`echo \$line | ${SED} -e 's/locks ${author}:\\([0-9.]*\\);.*/\\1/'\` echo "\$user has file a-lock locked for version \$version" exit 1 fi *************** *** 17601,17607 **** # Simulate (approximately) what a-lock would look like # if someone else had locked revision 1.1. ! sed -e 's/locks; strict;/locks fred:1.1; strict;/' ${TESTDIR}/cvsroot/first-dir/a-lock,v > a-lock,v chmod 644 ${TESTDIR}/cvsroot/first-dir/a-lock,v dotest reserved-13 "mv a-lock,v ${TESTDIR}/cvsroot/first-dir/a-lock,v" chmod 444 ${TESTDIR}/cvsroot/first-dir/a-lock,v --- 17622,17628 ---- # Simulate (approximately) what a-lock would look like # if someone else had locked revision 1.1. ! ${SED} -e 's/locks; strict;/locks fred:1.1; strict;/' ${TESTDIR}/cvsroot/first-dir/a-lock,v > a-lock,v chmod 644 ${TESTDIR}/cvsroot/first-dir/a-lock,v dotest reserved-13 "mv a-lock,v ${TESTDIR}/cvsroot/first-dir/a-lock,v" chmod 444 ${TESTDIR}/cvsroot/first-dir/a-lock,v *************** *** 17627,17633 **** done" # Now test for a bug involving branches and locks ! sed -e 's/locks; strict;/locks fred:1.2; strict;/' ${TESTDIR}/cvsroot/first-dir/a-lock,v > a-lock,v chmod 644 ${TESTDIR}/cvsroot/first-dir/a-lock,v dotest reserved-16 \ "mv a-lock,v ${TESTDIR}/cvsroot/first-dir/a-lock,v" "" --- 17648,17654 ---- done" # Now test for a bug involving branches and locks ! ${SED} -e 's/locks; strict;/locks fred:1.2; strict;/' ${TESTDIR}/cvsroot/first-dir/a-lock,v > a-lock,v chmod 644 ${TESTDIR}/cvsroot/first-dir/a-lock,v dotest reserved-16 \ "mv a-lock,v ${TESTDIR}/cvsroot/first-dir/a-lock,v" "" *************** *** 19973,19979 **** dotest multiroot3-7 "${testcvs} add dir2" \ "Directory ${TESTDIR}/root2/dir2 added to the repository" ! touch dir1/file1 dir2/file2 if test "$remote" = yes; then # Trying to add them both in one command doesn't work, # because add.c doesn't do multiroot (it doesn't use recurse.c). --- 19994,20000 ---- dotest multiroot3-7 "${testcvs} add dir2" \ "Directory ${TESTDIR}/root2/dir2 added to the repository" ! ${TOUCH} dir1/file1 dir2/file2 if test "$remote" = yes; then # Trying to add them both in one command doesn't work, # because add.c doesn't do multiroot (it doesn't use recurse.c). *************** *** 20097,20103 **** dotest multiroot4-3 "${testcvs} add dircom" \ "Directory ${TESTDIR}/root1/dircom added to the repository" cd dircom ! touch file1 dotest multiroot4-4 "${testcvs} add file1" \ "${PROG} [a-z]*: scheduling file .file1. for addition ${PROG} [a-z]*: use .${PROG} commit. to add this file permanently" --- 20118,20124 ---- dotest multiroot4-3 "${testcvs} add dircom" \ "Directory ${TESTDIR}/root1/dircom added to the repository" cd dircom ! ${TOUCH} file1 dotest multiroot4-4 "${testcvs} add file1" \ "${PROG} [a-z]*: scheduling file .file1. for addition ${PROG} [a-z]*: use .${PROG} commit. to add this file permanently" *************** *** 20116,20122 **** dotest multiroot4-8 "${testcvs} add dircom" \ "Directory ${TESTDIR}/root2/dircom added to the repository" cd dircom ! touch file2 dotest multiroot4-9 "${testcvs} add file2" \ "${PROG} [a-z]*: scheduling file .file2. for addition ${PROG} [a-z]*: use .${PROG} commit. to add this file permanently" --- 20137,20143 ---- dotest multiroot4-8 "${testcvs} add dircom" \ "Directory ${TESTDIR}/root2/dircom added to the repository" cd dircom ! ${TOUCH} file2 dotest multiroot4-9 "${testcvs} add file2" \ "${PROG} [a-z]*: scheduling file .file2. for addition ${PROG} [a-z]*: use .${PROG} commit. to add this file permanently" *************** *** 20165,20171 **** dotest rmroot-setup-2 "${testcvs} add first-dir" \ "Directory ${TESTDIR}/cvsroot/first-dir added to the repository" cd first-dir ! touch file1 file2 dotest rmroot-setup-3 "${testcvs} add file1 file2" \ "${PROG} [a-z]*: scheduling file .file1. for addition ${PROG} [a-z]*: scheduling file .file2. for addition --- 20186,20192 ---- dotest rmroot-setup-2 "${testcvs} add first-dir" \ "Directory ${TESTDIR}/cvsroot/first-dir added to the repository" cd first-dir ! ${TOUCH} file1 file2 dotest rmroot-setup-3 "${testcvs} add file1 file2" \ "${PROG} [a-z]*: scheduling file .file1. for addition ${PROG} [a-z]*: scheduling file .file2. for addition