diff options
Diffstat (limited to 'contrib/cvs/src/sanity.sh')
-rwxr-xr-x | contrib/cvs/src/sanity.sh | 3701 |
1 files changed, 2146 insertions, 1555 deletions
diff --git a/contrib/cvs/src/sanity.sh b/contrib/cvs/src/sanity.sh index e407cbd..1d877fe 100755 --- a/contrib/cvs/src/sanity.sh +++ b/contrib/cvs/src/sanity.sh @@ -548,20 +548,29 @@ RCSINIT=; export RCSINIT # tests. if test x"$*" = x; then + # Basic/miscellaneous functionality tests="basica basicb basicc basic1 deep basic2" - tests="${tests} rdiff death death2 branches" + # Branching, tagging, removing, adding, multiple directories + tests="${tests} rdiff death death2 branches branches2" tests="${tests} rcslib multibranch import importb join join2 join3" tests="${tests} new newb conflicts conflicts2 conflicts3" + # Checking out various places (modules, checkout -d, &c) tests="${tests} modules modules2 modules3 modules4" + tests="${tests} cvsadm abspath toplevel" + # Log messages, error messages. tests="${tests} mflag editor errmsg1 errmsg2" + # Watches, binary files, history browsing, &c. tests="${tests} devcom devcom2 devcom3 watch4" tests="${tests} ignore binfiles binfiles2 mcopy binwrap binwrap2" tests="${tests} binwrap3 mwrap info config" tests="${tests} serverpatch log log2 ann crerepos rcs big modes stamps" + # More tag and branch tests, keywords. tests="${tests} sticky keyword keywordlog" - tests="${tests} toplevel head tagdate multibranch2" + tests="${tests} head tagdate multibranch2" + # "cvs admin", reserved checkouts. tests="${tests} admin reserved" - tests="${tests} cvsadm diffmerge1 diffmerge2" + # Nuts and bolts of diffing/merging (diff library, &c) + tests="${tests} diffmerge1 diffmerge2" else tests="$*" fi @@ -1903,20 +1912,21 @@ done" # interrupt, while we've got a clean 1.1 here, let's import it # into a couple of other modules. cd export-dir - dotest 56 "${testcvs} import -m first-import second-dir first-immigration immigration1 immigration1_0" \ -"N second-dir/file14 -N second-dir/file6 -N second-dir/file7 -${PROG} [a-z]*: Importing ${TESTDIR}/cvsroot/second-dir/dir1 -N second-dir/dir1/file14 -N second-dir/dir1/file6 -N second-dir/dir1/file7 -${PROG} [a-z]*: Importing ${TESTDIR}/cvsroot/second-dir/dir1/dir2 + dotest_sort 56 "${testcvs} import -m first-import second-dir first-immigration immigration1 immigration1_0" \ +" + N second-dir/dir1/dir2/file14 N second-dir/dir1/dir2/file6 N second-dir/dir1/dir2/file7 - -No conflicts created by this import" +N second-dir/dir1/file14 +N second-dir/dir1/file6 +N second-dir/dir1/file7 +N second-dir/file14 +N second-dir/file6 +N second-dir/file7 +No conflicts created by this import +${PROG} [a-z]*: Importing ${TESTDIR}/cvsroot/second-dir/dir1 +${PROG} [a-z]*: Importing ${TESTDIR}/cvsroot/second-dir/dir1/dir2" cd .. if ${CVS} export -r HEAD second-dir ; then @@ -2532,11 +2542,13 @@ U first-dir/file3' cd first-dir - # Add a file on the trunk. + # Add two files on the trunk. echo "first revision" > file1 - dotest death2-2 "${testcvs} add file1" \ + echo "file4 first revision" > file4 + dotest death2-2 "${testcvs} add file1 file4" \ "${PROG}"' [a-z]*: scheduling file `file1'\'' for addition -'"${PROG}"' [a-z]*: use .'"${PROG}"' commit. to add this file permanently' +'"${PROG}"' [a-z]*: scheduling file `file4'\'' for addition +'"${PROG}"' [a-z]*: use .'"${PROG}"' commit. to add these files permanently' dotest death2-3 "${testcvs} -q commit -m add" \ "RCS file: ${TESTDIR}/cvsroot/first-dir/file1,v @@ -2544,11 +2556,21 @@ done Checking in file1; ${TESTDIR}/cvsroot/first-dir/file1,v <-- file1 initial revision: 1\.1 +done +RCS file: ${TESTDIR}/cvsroot/first-dir/file4,v +done +Checking in file4; +${TESTDIR}/cvsroot/first-dir/file4,v <-- file4 +initial revision: 1\.1 done" # Make a branch and a non-branch tag. - dotest death2-4 "${testcvs} -q tag -b branch" 'T file1' - dotest death2-5 "${testcvs} -q tag tag" 'T file1' + dotest death2-4 "${testcvs} -q tag -b branch" \ +'T file1 +T file4' + dotest death2-5 "${testcvs} -q tag tag" \ +'T file1 +T file4' # Switch over to the branch. dotest death2-6 "${testcvs} -q update -r branch" '' @@ -2659,8 +2681,20 @@ ${TESTDIR}/cvsroot/first-dir/file1,v <-- file1 new revision: 1\.1\.2\.2; previous revision: 1\.1\.2\.1 done" + # Delete file4 from the branch + dotest death2-10a "${testcvs} rm -f file4" \ +"${PROG} [a-z]*: scheduling .file4. for removal +${PROG} [a-z]*: use .${PROG} commit. to remove this file permanently" + dotest death2-10b "${testcvs} -q ci -m removed" \ +"Removing file4; +${TESTDIR}/cvsroot/first-dir/file4,v <-- file4 +new revision: delete; previous revision: 1\.1\.2 +done" + # Back to the trunk. - dotest death2-11 "${testcvs} -q update -A" 'U file1' 'P file1' + dotest death2-11 "${testcvs} -q update -A" \ +"[UP] file1 +U file4" # Add another file on the trunk. echo "first revision" > file2 @@ -2675,15 +2709,22 @@ ${TESTDIR}/cvsroot/first-dir/file2,v <-- file2 initial revision: 1\.1 done" + # Modify file4 on the trunk. + echo "new file4 revision" > file4 + dotest death2-13a "${testcvs} -q commit -m mod" \ +"Checking in file4; +${TESTDIR}/cvsroot/first-dir/file4,v <-- file4 +new revision: 1\.2; previous revision: 1\.1 +done" + # Back to the branch. # The ``no longer in the repository'' message doesn't really # look right to me, but that's what CVS currently prints for # this case. dotest death2-14 "${testcvs} -q update -r branch" \ -"U file1 -${PROG} [a-z]*: file2 is no longer in the repository" \ -"P file1 -${PROG} [a-z]*: file2 is no longer in the repository" +"[UP] file1 +${PROG} [a-z]*: file2 is no longer in the repository +${PROG} [a-z]*: warning: file4 is not (any longer) pertinent" # Add a file on the branch with the same name. echo "branch revision" > file2 @@ -2740,7 +2781,8 @@ diff -c -r1\.1 -r1\.1\.2\.2 --- 1 ---- ! second revision ${PROG} [a-z]*: tag tag is not in file file2 -${PROG} [a-z]*: tag tag is not in file file3" +${PROG} [a-z]*: tag tag is not in file file3 +${PROG} [a-z]*: file4 no longer exists, no comparison available" dotest_fail death2-diff-12 "${testcvs} -q diff -rtag -c -N ." \ "Index: file1 @@ -2775,16 +2817,24 @@ diff -N file3 \*\*\*\*\*\*\*\*\*\*\*\*\*\*\* \*\*\* 0 \*\*\*\* --- 1 ---- -${PLUS} first revision" +${PLUS} first revision +Index: file4 +=================================================================== +RCS file: file4 +diff -N file4 +\*\*\* ${tempname}[ ][ ]*[a-zA-Z0-9: ]* +--- /dev/null[ ][ ]*[a-zA-Z0-9: ]* +\*\*\*\*\*\*\*\*\*\*\*\*\*\*\* +\*\*\* 1 \*\*\*\* +- file4 first revision +--- 0 ----" # Switch to the nonbranch tag. dotest death2-19 "${testcvs} -q update -r tag" \ -"U file1 -${PROG} [a-z]*: file2 is no longer in the repository -${PROG} [a-z]*: file3 is no longer in the repository" \ -"P file1 +"[UP] file1 ${PROG} [a-z]*: file2 is no longer in the repository -${PROG} [a-z]*: file3 is no longer in the repository" +${PROG} [a-z]*: file3 is no longer in the repository +U file4" dotest_fail death2-20 "test -f file2" @@ -3036,6 +3086,272 @@ done" rm -r first-dir ;; + branches2) + # More branch tests. + # Test that when updating a new subdirectory in a directory + # which was checked out on a branch, the new subdirectory is + # created on the appropriate branch. Test this when joining + # as well. + + mkdir ${CVSROOT_DIRNAME}/first-dir + mkdir trunk; cd trunk + + # Create a file. + dotest branches2-1 "${testcvs} -q co first-dir" + cd first-dir + echo "file1 first revision" > file1 + dotest branches2-2 "${testcvs} add file1" \ +"${PROG} [a-z]*: scheduling file .file1. for addition +${PROG} [a-z]*: use .${PROG} commit. to add this file permanently" + dotest branches2-3 "${testcvs} commit -m add file1" \ +"RCS file: ${TESTDIR}/cvsroot/first-dir/file1,v +done +Checking in file1; +${TESTDIR}/cvsroot/first-dir/file1,v <-- file1 +initial revision: 1\.1 +done" + + # Tag the file. + dotest branches2-4 "${testcvs} -q tag tag1" 'T file1' + + # Make two branches. + dotest branches2-5 "${testcvs} -q rtag -b -r tag1 b1 first-dir" '' + dotest branches2-6 "${testcvs} -q rtag -b -r tag1 b2 first-dir" '' + + # Create some files and a subdirectory on branch b1. + cd ../.. + mkdir b1; cd b1 + dotest branches2-7 "${testcvs} -q co -r b1 first-dir" \ +"U first-dir/file1" + cd first-dir + echo "file2 first revision" > file2 + dotest branches2-8 "${testcvs} add file2" \ +"${PROG}"' [a-z]*: scheduling file `file2'\'' for addition on branch `b1'\'' +'"${PROG}"' [a-z]*: use .'"${PROG}"' commit. to add this file permanently' + mkdir dir1 + dotest branches2-9 "${testcvs} add dir1" \ +"Directory ${TESTDIR}/cvsroot/first-dir/dir1 added to the repository +--> Using per-directory sticky tag "'`'"b1'" + echo "file3 first revision" > dir1/file3 + dotest branches2-10 "${testcvs} add dir1/file3" \ +"${PROG}"' [a-z]*: scheduling file `dir1/file3'\'' for addition on branch `b1'\'' +'"${PROG}"' [a-z]*: use .'"${PROG}"' commit. to add this file permanently' + dotest branches2-11 "${testcvs} -q ci -madd ." \ +"RCS file: ${TESTDIR}/cvsroot/first-dir/Attic/file2,v +done +Checking in file2; +${TESTDIR}/cvsroot/first-dir/Attic/file2,v <-- file2 +new revision: 1\.1\.2\.1; previous revision: 1\.1 +done +RCS file: ${TESTDIR}/cvsroot/first-dir/dir1/Attic/file3,v +done +Checking in dir1/file3; +${TESTDIR}/cvsroot/first-dir/dir1/Attic/file3,v <-- file3 +new revision: 1\.1\.2\.1; previous revision: 1\.1 +done" + + # Check out the second branch, and update the working + # directory to the first branch, to make sure the right + # happens with dir1. + cd ../.. + mkdir b2; cd b2 + dotest branches2-12 "${testcvs} -q co -r b2 first-dir" \ +'U first-dir/file1' + cd first-dir + dotest branches2-13 "${testcvs} update -d -r b1 dir1" \ +"${PROG} [a-z]*: Updating dir1 +U dir1/file3" + dotest branches2-14 "${testcvs} -q status" \ +"=================================================================== +File: file1 Status: Up-to-date + + Working revision: 1\.1.* + Repository revision: 1\.1 ${TESTDIR}/cvsroot/first-dir/file1,v + Sticky Tag: b2 (branch: 1\.1\.4) + Sticky Date: (none) + Sticky Options: (none) + +=================================================================== +File: file3 Status: Up-to-date + + Working revision: 1\.1\.2\.1.* + Repository revision: 1\.1\.2\.1 ${TESTDIR}/cvsroot/first-dir/dir1/Attic/file3,v + Sticky Tag: b1 (branch: 1\.1\.2) + Sticky Date: (none) + Sticky Options: (none)" + + # FIXME: Just clobbering the directory like this is a bit + # tacky, although people generally expect it to work. Maybe + # we should release it instead. We do it a few other places + # below as well. + rm -r dir1 + dotest branches2-15 "${testcvs} update -d -j b1 dir1" \ +"${PROG} [a-z]*: Updating dir1 +U dir1/file3" + # FIXCVS: The `No revision control file' stuff seems to be + # CVS's way of telling us that we're adding the file on a + # branch, and the file is not on that branch yet. This + # should be nicer. + dotest branches2-16 "${testcvs} -q status" \ +"=================================================================== +File: file1 Status: Up-to-date + + Working revision: 1\.1.* + Repository revision: 1\.1 ${TESTDIR}/cvsroot/first-dir/file1,v + Sticky Tag: b2 (branch: 1\.1\.4) + Sticky Date: (none) + Sticky Options: (none) + +=================================================================== +File: file3 Status: Locally Added + + Working revision: New file! + Repository revision: No revision control file + Sticky Tag: b2 - MISSING from RCS file! + Sticky Date: (none) + Sticky Options: (none)" + + cd ../../trunk/first-dir + dotest branches2-17 "${testcvs} update -d -P dir1" \ +"${PROG} [a-z]*: Updating dir1" + dotest_fail branches2-18 "test -d dir1" + dotest branches2-19 "${testcvs} update -d -P -r b1 dir1" \ +"${PROG} [a-z]*: Updating dir1 +U dir1/file3" + dotest branches2-20 "${testcvs} -q status" \ +"=================================================================== +File: file1 Status: Up-to-date + + Working revision: 1\.1.* + Repository revision: 1\.1 ${TESTDIR}/cvsroot/first-dir/file1,v + Sticky Tag: (none) + Sticky Date: (none) + Sticky Options: (none) + +=================================================================== +File: file3 Status: Up-to-date + + Working revision: 1\.1\.2\.1.* + Repository revision: 1\.1\.2\.1 ${TESTDIR}/cvsroot/first-dir/dir1/Attic/file3,v + Sticky Tag: b1 (branch: 1\.1\.2) + Sticky Date: (none) + Sticky Options: (none)" + + rm -r dir1 + dotest branches2-21 "${testcvs} update -d -P -j b1 dir1" \ +"${PROG} [a-z]*: Updating dir1 +U dir1/file3" + dotest branches2-22 "${testcvs} -q status" \ +"=================================================================== +File: file1 Status: Up-to-date + + Working revision: 1\.1.* + Repository revision: 1\.1 ${TESTDIR}/cvsroot/first-dir/file1,v + Sticky Tag: (none) + Sticky Date: (none) + Sticky Options: (none) + +=================================================================== +File: file3 Status: Locally Added + + Working revision: New file! + Repository revision: 1\.1 ${TESTDIR}/cvsroot/first-dir/dir1/Attic/file3,v + Sticky Tag: (none) + Sticky Date: (none) + Sticky Options: (none)" + + cd ../.. + rm -r b1 b2 + + # Check out branch b1 twice. Crate a new directory in one + # working directory, then do a cvs update in the other + # working directory and see if the tags are right. + mkdir b1a + mkdir b1b + cd b1b + dotest branches2-23 "${testcvs} -q co -r b1 first-dir" \ +'U first-dir/file1 +U first-dir/file2 +U first-dir/dir1/file3' + cd ../b1a + dotest branches2-24 "${testcvs} -q co -r b1 first-dir" \ +'U first-dir/file1 +U first-dir/file2 +U first-dir/dir1/file3' + cd first-dir + mkdir dir2 + dotest branches2-25 "${testcvs} add dir2" \ +"Directory ${TESTDIR}/cvsroot/first-dir/dir2 added to the repository +--> Using per-directory sticky tag "'`'"b1'" + echo "file4 first revision" > dir2/file4 + dotest branches2-26 "${testcvs} add dir2/file4" \ +"${PROG}"' [a-z]*: scheduling file `dir2/file4'\'' for addition on branch `b1'\'' +'"${PROG}"' [a-z]*: use .'"${PROG}"' commit. to add this file permanently' + dotest branches2-27 "${testcvs} -q commit -madd" \ +"RCS file: ${TESTDIR}/cvsroot/first-dir/dir2/Attic/file4,v +done +Checking in dir2/file4; +${TESTDIR}/cvsroot/first-dir/dir2/Attic/file4,v <-- file4 +new revision: 1\.1\.2\.1; previous revision: 1\.1 +done" + + cd ../../b1b/first-dir + dotest branches2-28 "${testcvs} update -d dir2" \ +"${PROG} [a-z]*: Updating dir2 +U dir2/file4" + cd dir2 + dotest branches2-29 "${testcvs} -q status" \ +"=================================================================== +File: file4 Status: Up-to-date + + Working revision: 1\.1\.2\.1.* + Repository revision: 1\.1\.2\.1 ${TESTDIR}/cvsroot/first-dir/dir2/Attic/file4,v + Sticky Tag: b1 (branch: 1\.1\.2) + Sticky Date: (none) + Sticky Options: (none)" + dotest branches2-30 "cat CVS/Tag" 'Tb1' + + # Test update -A on a subdirectory + cd .. + rm -r dir2 + dotest branches2-31 "${testcvs} update -A -d dir2" \ +"${PROG} [a-z]*: Updating dir2" + cd dir2 + dotest branches2-32 "${testcvs} -q status" '' + dotest_fail branches2-33 "test -f CVS/Tag" + + # Add a file on the trunk. + echo "file5 first revision" > file5 + dotest branches2-34 "${testcvs} add file5" \ +"${PROG}"' [a-z]*: scheduling file `file5'\'' for addition +'"${PROG}"' [a-z]*: use .'"${PROG}"' commit. to add this file permanently' + dotest branches2-35 "${testcvs} -q commit -madd" \ +"RCS file: ${TESTDIR}/cvsroot/first-dir/dir2/file5,v +done +Checking in file5; +${TESTDIR}/cvsroot/first-dir/dir2/file5,v <-- file5 +initial revision: 1\.1 +done" + + cd ../../../trunk/first-dir + dotest branches2-36 "${testcvs} -q update -d dir2" 'U dir2/file5' + cd dir2 + dotest branches2-37 "${testcvs} -q status" \ +"=================================================================== +File: file5 Status: Up-to-date + + Working revision: 1\.1.* + Repository revision: 1\.1 ${TESTDIR}/cvsroot/first-dir/dir2/file5,v + Sticky Tag: (none) + Sticky Date: (none) + Sticky Options: (none)" + dotest_fail branches2-38 "test -f CVS/status" + + cd ../../.. + rm -rf ${CVSROOT_DIRNAME}/first-dir + rm -r trunk b1a b1b + ;; + rcslib) # Test librarification of RCS. # First: test whether `cvs diff' handles $Name expansion @@ -3567,11 +3883,12 @@ rev 2 of file 2 cd imp-dir echo 'OpenMunger sources' >file1 echo 'OpenMunger sources' >file2 - dotest importb-1 \ + dotest_sort importb-1 \ "${testcvs} import -m add first-dir openmunger openmunger-1_0" \ -"N first-dir/file1 -N first-dir/file2 +" +N first-dir/file1 +N first-dir/file2 No conflicts created by this import" cd .. rm -r imp-dir @@ -3583,15 +3900,16 @@ No conflicts created by this import" echo 'FreeMunger sources' >file2 # Not completely sure how the conflict detection is supposed to # be working here (haven't really thought about it). - dotest importb-2 \ + dotest_sort importb-2 \ "${testcvs} import -m add -b 1.1.3 first-dir freemunger freemunger-1_0" \ -"C first-dir/file1 -C first-dir/file2 +" -2 conflicts created by this import. -Use the following command to help the merge: - ${PROG} checkout -jfreemunger:yesterday -jfreemunger first-dir" + ${PROG} checkout -jfreemunger:yesterday -jfreemunger first-dir +2 conflicts created by this import. +C first-dir/file1 +C first-dir/file2 +Use the following command to help the merge:" cd .. rm -r imp-dir @@ -4920,8 +5238,20 @@ ${PROG} [a-z]*: warning: file2 is not (any longer) pertinent" # OK, now add a directory to both working directories # and see that CVS doesn't lose its mind. mkdir sdir - dotest conficts3-14 "${testcvs} add 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" + dotest conflicts3-14b "${testcvs} -q ci -m add" \ +"RCS file: ${TESTDIR}/cvsroot/first-dir/sdir/sfile,v +done +Checking in sdir/sfile; +${TESTDIR}/cvsroot/first-dir/sdir/sfile,v <-- sfile +initial revision: 1\.1 +done" + cd ../../2/first-dir # Create a CVS directory without the proper administrative @@ -4946,6 +5276,11 @@ ${PROG} [a-z]*: ignoring sdir (CVS/Repository missing)" dotest conflicts3-16 "${testcvs} -q update" \ "${QUESTION} sdir ${PROG} [a-z]*: ignoring sdir (CVS/Entries missing)" + cd .. + dotest conflicts3-16a "${testcvs} -q update first-dir" \ +"${QUESTION} first-dir/sdir +${PROG} [a-z]*: ignoring first-dir/sdir (CVS/Entries missing)" + cd first-dir fi rm -r sdir @@ -4960,8 +5295,40 @@ ${PROG} [a-z]*: ignoring sdir (CVS/Entries missing)" touch newdir/CVS/Repository dotest conflicts3-19 "${testcvs} -q update" \ "${PROG} [a-z]*: ignoring newdir (CVS/Entries missing)" + cd .. + dotest conflicts3-20 "${testcvs} -q update first-dir" \ +"${PROG} [a-z]*: ignoring first-dir/newdir (CVS/Entries missing)" + cd first-dir rm -r newdir + # The previous tests have left CVS/Entries in something of a mess. + # While we "should" be able to deal with that (maybe), for now + # we just start over. + cd .. + rm -r first-dir + dotest conflicts3-20a "${testcvs} -q co -l first-dir" '' + cd first-dir + + dotest conflicts3-21 "${testcvs} -q update -d sdir" "U sdir/sfile" + rm -r sdir/CVS + dotest conflicts3-22 "${testcvs} -q update" "? sdir" + if test "x$remote" = xyes; then + # It isn't particularly swift that CVS prints this + # "cannot open CVS/Entries" where it has already printed + # "? sdir". At least I don't think so. But do note: (1) + # non-fatal error, and (2) tells us which directory has + # the problem. + dotest_fail conflicts3-23 "${testcvs} -q update -PdA" \ +"${QUESTION} sdir +${PROG} update: in directory sdir: +${PROG} update: cannot open CVS/Entries for reading: No such file or directory +${PROG} update: move away sdir/sfile; it is in the way +C sdir/sfile" + else + dotest conflicts3-23 "${testcvs} -q update -PdA" \ +"${QUESTION} sdir" + fi + cd ../.. rm -r 1 2 @@ -4970,6 +5337,17 @@ ${PROG} [a-z]*: ignoring sdir (CVS/Entries missing)" modules) # Tests of various ways to define and use modules. + # Roadmap to various modules tests: + # -a: + # error on incorrect placement: modules + # error combining with other options: modules2-a* + # use to specify a file more than once: modules3 + # use with ! feature: modules4 + # regular modules: modules, modules2, cvsadm + # ampersand modules: modules2 + # -s: modules. + # -d: modules, modules3, cvsadm + # slashes in module names: modules3 ############################################################ # These tests are to make sure that administrative files get @@ -5805,6 +6183,1652 @@ add-it rm -rf ${CVSROOT_DIRNAME}/first-dir ;; + cvsadm) + # These test check the content of CVS' administrative + # files as they are checked out in various configurations. + # (As a side note, I'm not using the "-q" flag in any of + # this code, which should provide some extra checking for + # those messages which don't seem to be checked thoroughly + # anywhere else.) To do a thorough test, we need to make + # a bunch of modules in various configurations. + # + # <1mod> is a directory at the top level of cvsroot + # ``foo bar'' + # <2mod> is a directory at the second level of cvsroot + # ``foo bar/baz'' + # <1d1mod> is a directory at the top level which is + # checked out into another directory + # ``foo -d bar baz'' + # <1d2mod> is a directory at the second level which is + # checked out into another directory + # ``foo -d bar baz/quux'' + # <2d1mod> is a directory at the top level which is + # checked out into a directory that is two deep + # ``foo -d bar/baz quux'' + # <2d2mod> is a directory at the second level which is + # checked out into a directory that is two deep + # ``foo -d bar/baz quux'' + # + # The tests do each of these types separately and in twos. + # We also repeat each test -d flag for 1-deep and 2-deep + # directories. + # + # Each test should check the output for the Repository + # file, since that is the one which varies depending on + # the directory and how it was checked out. + # + # Yes, this is verbose, but at least it's very thorough. + + # convenience variables + REP=${CVSROOT} + + # First, check out the modules file and edit it. + mkdir 1; cd 1 + dotest cvsadm-1 "${testcvs} co CVSROOT/modules" \ +"U CVSROOT/modules" + + # Try to determine whether RELATIVE_REPOS is defined + # so that we can make the following a lot less + # verbose. + + echo "${CVSROOT_DIRNAME}/." > ${TESTDIR}/dotest.abs + echo "." > ${TESTDIR}/dotest.rel + if cmp ${TESTDIR}/dotest.abs CVS/Repository >/dev/null 2>&1; then + AREP="${CVSROOT_DIRNAME}/" + elif cmp ${TESTDIR}/dotest.rel CVS/Repository >/dev/null 2>&1; then + AREP="" + else + fail "Cannot figure out if RELATIVE_REPOS is defined." + fi + + # Test CVS/Root once. Since there is only one part of + # the code which writes CVS/Root files (Create_Admin), + # there is no point in testing this every time. + dotest cvsadm-1a "cat CVS/Root" ${REP} + dotest cvsadm-1b "cat CVS/Repository" \ +"${AREP}\." + dotest cvsadm-1c "cat CVSROOT/CVS/Root" ${REP} + dotest cvsadm-1d "cat CVSROOT/CVS/Repository" \ +"${AREP}CVSROOT" + # All of the defined module names begin with a number. + # All of the top-level directory names begin with "dir". + # All of the subdirectory names begin with "sub". + # All of the top-level modules begin with "mod". + echo "# Module defs for cvsadm tests" > CVSROOT/modules + echo "1mod mod1" >> CVSROOT/modules + echo "1mod-2 mod1-2" >> CVSROOT/modules + echo "2mod mod2/sub2" >> CVSROOT/modules + echo "2mod-2 mod2-2/sub2-2" >> CVSROOT/modules + echo "1d1mod -d dir1d1 mod1" >> CVSROOT/modules + echo "1d1mod-2 -d dir1d1-2 mod1-2" >> CVSROOT/modules + echo "1d2mod -d dir1d2 mod2/sub2" >> CVSROOT/modules + echo "1d2mod-2 -d dir1d2-2 mod2-2/sub2-2" >> CVSROOT/modules + echo "2d1mod -d dir2d1/sub2d1 mod1" >> CVSROOT/modules + echo "2d1mod-2 -d dir2d1-2/sub2d1-2 mod1-2" >> CVSROOT/modules + echo "2d2mod -d dir2d2/sub2d2 mod2/sub2" >> CVSROOT/modules + echo "2d2mod-2 -d dir2d2-2/sub2d2-2 mod2-2/sub2-2" >> CVSROOT/modules + dotest cvsadm-1e "${testcvs} ci -m add-modules" \ +"${PROG} [a-z]*: Examining . +${PROG} [a-z]*: Examining CVSROOT +Checking in CVSROOT/modules; +${CVSROOT_DIRNAME}/CVSROOT/modules,v <-- modules +new revision: 1\.[0-9]*; previous revision: 1\.[0-9]* +done +${PROG} [a-z]*: Rebuilding administrative file database" + rm -rf CVS CVSROOT; + + # Create the various modules + mkdir ${CVSROOT_DIRNAME}/mod1 + mkdir ${CVSROOT_DIRNAME}/mod1-2 + mkdir ${CVSROOT_DIRNAME}/mod2 + mkdir ${CVSROOT_DIRNAME}/mod2/sub2 + mkdir ${CVSROOT_DIRNAME}/mod2-2 + mkdir ${CVSROOT_DIRNAME}/mod2-2/sub2-2 + dotest cvsadm-2 "${testcvs} co mod1 mod1-2 mod2 mod2-2" \ +"${PROG} [a-z]*: Updating mod1 +${PROG} [a-z]*: Updating mod1-2 +${PROG} [a-z]*: Updating mod2 +${PROG} [a-z]*: Updating mod2/sub2 +${PROG} [a-z]*: Updating mod2-2 +${PROG} [a-z]*: Updating mod2-2/sub2-2" + + # Populate the directories for the halibut + echo "file1" > mod1/file1 + echo "file1-2" > mod1-2/file1-2 + echo "file2" > mod2/sub2/file2 + echo "file2-2" > mod2-2/sub2-2/file2-2 + dotest cvsadm-2a "${testcvs} add mod1/file1 mod1-2/file1-2 mod2/sub2/file2 mod2-2/sub2-2/file2-2" \ +"${PROG} [a-z]*: scheduling file .mod1/file1. for addition +${PROG} [a-z]*: scheduling file .mod1-2/file1-2. for addition +${PROG} [a-z]*: scheduling file .mod2/sub2/file2. for addition +${PROG} [a-z]*: scheduling file .mod2-2/sub2-2/file2-2. for addition +${PROG} [a-z]*: use '${PROG} commit' to add these files permanently" + + dotest cvsadm-2b "${testcvs} ci -m yup mod1 mod1-2 mod2 mod2-2" \ +"${PROG} [a-z]*: Examining mod1 +${PROG} [a-z]*: Examining mod1-2 +${PROG} [a-z]*: Examining mod2 +${PROG} [a-z]*: Examining mod2/sub2 +${PROG} [a-z]*: Examining mod2-2 +${PROG} [a-z]*: Examining mod2-2/sub2-2 +RCS file: ${CVSROOT_DIRNAME}/mod1/file1,v +done +Checking in mod1/file1; +${CVSROOT_DIRNAME}/mod1/file1,v <-- file1 +initial revision: 1.1 +done +RCS file: ${CVSROOT_DIRNAME}/mod1-2/file1-2,v +done +Checking in mod1-2/file1-2; +${CVSROOT_DIRNAME}/mod1-2/file1-2,v <-- file1-2 +initial revision: 1.1 +done +RCS file: ${CVSROOT_DIRNAME}/mod2/sub2/file2,v +done +Checking in mod2/sub2/file2; +${CVSROOT_DIRNAME}/mod2/sub2/file2,v <-- file2 +initial revision: 1.1 +done +RCS file: ${CVSROOT_DIRNAME}/mod2-2/sub2-2/file2-2,v +done +Checking in mod2-2/sub2-2/file2-2; +${CVSROOT_DIRNAME}/mod2-2/sub2-2/file2-2,v <-- file2-2 +initial revision: 1.1 +done" + # Finished creating the modules -- clean up. + rm -rf CVS mod1 mod1-2 mod2 mod2-2 + # Done. + + ################################################## + ## Start the dizzying array of possibilities. + ## Begin with each module type separately. + ################################################## + + # Pattern -- after each checkout, first check the top-level + # CVS directory. Then, check the directories in numerical + # order. + + dotest cvsadm-3 "${testcvs} co 1mod" \ +"${PROG} [a-z]*: Updating 1mod +U 1mod/file1" + dotest cvsadm-3b "cat CVS/Repository" \ +"${AREP}\." + dotest cvsadm-3d "cat 1mod/CVS/Repository" \ +"${AREP}mod1" + rm -rf CVS 1mod + + dotest cvsadm-4 "${testcvs} co 2mod" \ +"${PROG} [a-z]*: Updating 2mod +U 2mod/file2" + dotest cvsadm-4b "cat CVS/Repository" \ +"${AREP}\." + dotest cvsadm-4d "cat 2mod/CVS/Repository" \ +"${AREP}mod2/sub2" + rm -rf CVS 2mod + + dotest cvsadm-5 "${testcvs} co 1d1mod" \ +"${PROG} [a-z]*: Updating dir1d1 +U dir1d1/file1" + dotest cvsadm-5b "cat CVS/Repository" \ +"${AREP}\." + dotest cvsadm-5d "cat dir1d1/CVS/Repository" \ +"${AREP}mod1" + rm -rf CVS dir1d1 + + dotest cvsadm-6 "${testcvs} co 1d2mod" \ +"${PROG} [a-z]*: Updating dir1d2 +U dir1d2/file2" + dotest cvsadm-6b "cat CVS/Repository" \ +"${AREP}\." + dotest cvsadm-6d "cat dir1d2/CVS/Repository" \ +"${AREP}mod2/sub2" + rm -rf CVS dir1d2 + + dotest cvsadm-7 "${testcvs} co 2d1mod" \ +"${PROG} [a-z]*: Updating dir2d1/sub2d1 +U dir2d1/sub2d1/file1" + dotest cvsadm-7b "cat CVS/Repository" \ +"${AREP}\." + dotest cvsadm-7d "cat dir2d1/CVS/Repository" \ +"${AREP}CVSROOT/Emptydir" + dotest cvsadm-7f "cat dir2d1/sub2d1/CVS/Repository" \ +"${AREP}mod1" + rm -rf CVS dir2d1 + + dotest cvsadm-8 "${testcvs} co 2d2mod" \ +"${PROG} [a-z]*: Updating dir2d2/sub2d2 +U dir2d2/sub2d2/file2" + dotest cvsadm-8b "cat CVS/Repository" \ +"${AREP}\." + dotest cvsadm-8d "cat dir2d2/CVS/Repository" \ +"${AREP}CVSROOT/Emptydir" + dotest cvsadm-8f "cat dir2d2/sub2d2/CVS/Repository" \ +"${AREP}mod2/sub2" + rm -rf CVS dir2d2 + + ################################################## + ## You are in a shell script of twisted little + ## module combination statements, all alike. + ################################################## + + ### 1mod + + dotest cvsadm-9 "${testcvs} co 1mod 1mod-2" \ +"${PROG} [a-z]*: Updating 1mod +U 1mod/file1 +${PROG} [a-z]*: Updating 1mod-2 +U 1mod-2/file1-2" + # the usual for the top level + dotest cvsadm-9b "cat CVS/Repository" \ +"${AREP}\." + # the usual for 1mod + dotest cvsadm-9d "cat 1mod/CVS/Repository" \ +"${AREP}mod1" + # the usual for 1mod copy + dotest cvsadm-9f "cat 1mod-2/CVS/Repository" \ +"${AREP}mod1-2" + rm -rf CVS 1mod 1mod-2 + + # 1mod 2mod redmod bluemod + dotest cvsadm-10 "${testcvs} co 1mod 2mod" \ +"${PROG} [a-z]*: Updating 1mod +U 1mod/file1 +${PROG} [a-z]*: Updating 2mod +U 2mod/file2" + # the usual for the top level + dotest cvsadm-10b "cat CVS/Repository" \ +"${AREP}\." + # the usual for 1mod + dotest cvsadm-10d "cat 1mod/CVS/Repository" \ +"${AREP}mod1" + # the usual for 2dmod + dotest cvsadm-10f "cat 2mod/CVS/Repository" \ +"${AREP}mod2/sub2" + rm -rf CVS 1mod 2mod + + dotest cvsadm-11 "${testcvs} co 1mod 1d1mod" \ +"${PROG} [a-z]*: Updating 1mod +U 1mod/file1 +${PROG} [a-z]*: Updating dir1d1 +U dir1d1/file1" + # the usual for the top level + dotest cvsadm-11b "cat CVS/Repository" \ +"${AREP}\." + # the usual for 1mod + dotest cvsadm-11d "cat 1mod/CVS/Repository" \ +"${AREP}mod1" + # the usual for 1d1mod + dotest cvsadm-11f "cat dir1d1/CVS/Repository" \ +"${AREP}mod1" + rm -rf CVS 1mod dir1d1 + + dotest cvsadm-12 "${testcvs} co 1mod 1d2mod" \ +"${PROG} [a-z]*: Updating 1mod +U 1mod/file1 +${PROG} [a-z]*: Updating dir1d2 +U dir1d2/file2" + # the usual for the top level + dotest cvsadm-12b "cat CVS/Repository" \ +"${AREP}\." + # the usual for 1mod + dotest cvsadm-12d "cat 1mod/CVS/Repository" \ +"${AREP}mod1" + # the usual for 1d2mod + dotest cvsadm-12f "cat dir1d2/CVS/Repository" \ +"${AREP}mod2/sub2" + rm -rf CVS 1mod dir1d2 + + dotest cvsadm-13 "${testcvs} co 1mod 2d1mod" \ +"${PROG} [a-z]*: Updating 1mod +U 1mod/file1 +${PROG} [a-z]*: Updating dir2d1/sub2d1 +U dir2d1/sub2d1/file1" + # the usual for the top level + dotest cvsadm-13b "cat CVS/Repository" \ +"${AREP}\." + # the usual for 1mod + dotest cvsadm-13d "cat 1mod/CVS/Repository" \ +"${AREP}mod1" + # the usual for 2d1mod + dotest cvsadm-13f "cat dir2d1/CVS/Repository" \ +"${AREP}CVSROOT/Emptydir" + dotest cvsadm-13h "cat dir2d1/sub2d1/CVS/Repository" \ +"${AREP}mod1" + rm -rf CVS 1mod dir2d1 + + dotest cvsadm-14 "${testcvs} co 1mod 2d2mod" \ +"${PROG} [a-z]*: Updating 1mod +U 1mod/file1 +${PROG} [a-z]*: Updating dir2d2/sub2d2 +U dir2d2/sub2d2/file2" + # the usual for the top level + dotest cvsadm-14b "cat CVS/Repository" \ +"${AREP}\." + # the usual for 1mod + dotest cvsadm-14d "cat 1mod/CVS/Repository" \ +"${AREP}mod1" + # the usual for 2d2mod + dotest cvsadm-14f "cat dir2d2/CVS/Repository" \ +"${AREP}CVSROOT/Emptydir" + dotest cvsadm-14h "cat dir2d2/sub2d2/CVS/Repository" \ +"${AREP}mod2/sub2" + rm -rf CVS 1mod dir2d2 + + + ### 2mod + + dotest cvsadm-15 "${testcvs} co 2mod 2mod-2" \ +"${PROG} [a-z]*: Updating 2mod +U 2mod/file2 +${PROG} [a-z]*: Updating 2mod-2 +U 2mod-2/file2-2" + # the usual for the top level + dotest cvsadm-15b "cat CVS/Repository" \ +"${AREP}\." + # the usual for 2mod + dotest cvsadm-15d "cat 2mod/CVS/Repository" \ +"${AREP}mod2/sub2" + # the usual for 2mod copy + dotest cvsadm-15f "cat 2mod-2/CVS/Repository" \ +"${AREP}mod2-2/sub2-2" + rm -rf CVS 2mod 2mod-2 + + + dotest cvsadm-16 "${testcvs} co 2mod 1d1mod" \ +"${PROG} [a-z]*: Updating 2mod +U 2mod/file2 +${PROG} [a-z]*: Updating dir1d1 +U dir1d1/file1" + # the usual for the top level + dotest cvsadm-16b "cat CVS/Repository" \ +"${AREP}\." + # the usual for 2mod + dotest cvsadm-16d "cat 2mod/CVS/Repository" \ +"${AREP}mod2/sub2" + # the usual for 1d1mod + dotest cvsadm-16f "cat dir1d1/CVS/Repository" \ +"${AREP}mod1" + rm -rf CVS 2mod dir1d1 + + dotest cvsadm-17 "${testcvs} co 2mod 1d2mod" \ +"${PROG} [a-z]*: Updating 2mod +U 2mod/file2 +${PROG} [a-z]*: Updating dir1d2 +U dir1d2/file2" + # the usual for the top level + dotest cvsadm-17b "cat CVS/Repository" \ +"${AREP}\." + # the usual for 2mod + dotest cvsadm-17d "cat 2mod/CVS/Repository" \ +"${AREP}mod2/sub2" + # the usual for 1d2mod + dotest cvsadm-17f "cat dir1d2/CVS/Repository" \ +"${AREP}mod2/sub2" + rm -rf CVS 2mod dir1d2 + + dotest cvsadm-18 "${testcvs} co 2mod 2d1mod" \ +"${PROG} [a-z]*: Updating 2mod +U 2mod/file2 +${PROG} [a-z]*: Updating dir2d1/sub2d1 +U dir2d1/sub2d1/file1" + # the usual for the top level + dotest cvsadm-18b "cat CVS/Repository" \ +"${AREP}\." + # the usual for 2mod + dotest cvsadm-18d "cat 2mod/CVS/Repository" \ +"${AREP}mod2/sub2" + # the usual for 2d1mod + dotest cvsadm-18f "cat dir2d1/CVS/Repository" \ +"${AREP}CVSROOT/Emptydir" + dotest cvsadm-18h "cat dir2d1/sub2d1/CVS/Repository" \ +"${AREP}mod1" + rm -rf CVS 2mod dir2d1 + + dotest cvsadm-19 "${testcvs} co 2mod 2d2mod" \ +"${PROG} [a-z]*: Updating 2mod +U 2mod/file2 +${PROG} [a-z]*: Updating dir2d2/sub2d2 +U dir2d2/sub2d2/file2" + # the usual for the top level + dotest cvsadm-19b "cat CVS/Repository" \ +"${AREP}\." + # the usual for 2mod + dotest cvsadm-19d "cat 2mod/CVS/Repository" \ +"${AREP}mod2/sub2" + # the usual for 2d2mod + dotest cvsadm-19f "cat dir2d2/CVS/Repository" \ +"${AREP}CVSROOT/Emptydir" + dotest cvsadm-19h "cat dir2d2/sub2d2/CVS/Repository" \ +"${AREP}mod2/sub2" + rm -rf CVS 2mod dir2d2 + + + ### 1d1mod + + dotest cvsadm-20 "${testcvs} co 1d1mod 1d1mod-2" \ +"${PROG} [a-z]*: Updating dir1d1 +U dir1d1/file1 +${PROG} [a-z]*: Updating dir1d1-2 +U dir1d1-2/file1-2" + # the usual for the top level + dotest cvsadm-20b "cat CVS/Repository" \ +"${AREP}\." + # the usual for 1d1mod + dotest cvsadm-20d "cat dir1d1/CVS/Repository" \ +"${AREP}mod1" + # the usual for 1d1mod copy + dotest cvsadm-20f "cat dir1d1-2/CVS/Repository" \ +"${AREP}mod1-2" + rm -rf CVS dir1d1 dir1d1-2 + + dotest cvsadm-21 "${testcvs} co 1d1mod 1d2mod" \ +"${PROG} [a-z]*: Updating dir1d1 +U dir1d1/file1 +${PROG} [a-z]*: Updating dir1d2 +U dir1d2/file2" + # the usual for the top level + dotest cvsadm-21b "cat CVS/Repository" \ +"${AREP}\." + # the usual for 1d1mod + dotest cvsadm-21d "cat dir1d1/CVS/Repository" \ +"${AREP}mod1" + # the usual for 1d2mod + dotest cvsadm-21f "cat dir1d2/CVS/Repository" \ +"${AREP}mod2/sub2" + rm -rf CVS dir1d1 dir1d2 + + dotest cvsadm-22 "${testcvs} co 1d1mod 2d1mod" \ +"${PROG} [a-z]*: Updating dir1d1 +U dir1d1/file1 +${PROG} [a-z]*: Updating dir2d1/sub2d1 +U dir2d1/sub2d1/file1" + # the usual for the top level + dotest cvsadm-22b "cat CVS/Repository" \ +"${AREP}\." + # the usual for 1d1mod + dotest cvsadm-22d "cat dir1d1/CVS/Repository" \ +"${AREP}mod1" + # the usual for 2d1mod + dotest cvsadm-22f "cat dir2d1/CVS/Repository" \ +"${AREP}CVSROOT/Emptydir" + dotest cvsadm-22h "cat dir2d1/sub2d1/CVS/Repository" \ +"${AREP}mod1" + rm -rf CVS dir1d1 dir2d1 + + dotest cvsadm-23 "${testcvs} co 1d1mod 2d2mod" \ +"${PROG} [a-z]*: Updating dir1d1 +U dir1d1/file1 +${PROG} [a-z]*: Updating dir2d2/sub2d2 +U dir2d2/sub2d2/file2" + # the usual for the top level + dotest cvsadm-23b "cat CVS/Repository" \ +"${AREP}\." + # the usual for 1d1mod + dotest cvsadm-23d "cat dir1d1/CVS/Repository" \ +"${AREP}mod1" + # the usual for 2d2mod + dotest cvsadm-23f "cat dir2d2/CVS/Repository" \ +"${AREP}CVSROOT/Emptydir" + dotest cvsadm-23h "cat dir2d2/sub2d2/CVS/Repository" \ +"${AREP}mod2/sub2" + rm -rf CVS dir1d1 dir2d2 + + + ### 1d2mod + + dotest cvsadm-24 "${testcvs} co 1d2mod 1d2mod-2" \ +"${PROG} [a-z]*: Updating dir1d2 +U dir1d2/file2 +${PROG} [a-z]*: Updating dir1d2-2 +U dir1d2-2/file2-2" + # the usual for the top level + dotest cvsadm-24b "cat CVS/Repository" \ +"${AREP}\." + # the usual for 1d2mod + dotest cvsadm-24d "cat dir1d2/CVS/Repository" \ +"${AREP}mod2/sub2" + # the usual for 1d2mod copy + dotest cvsadm-24f "cat dir1d2-2/CVS/Repository" \ +"${AREP}mod2-2/sub2-2" + rm -rf CVS dir1d2 dir1d2-2 + + dotest cvsadm-25 "${testcvs} co 1d2mod 2d1mod" \ +"${PROG} [a-z]*: Updating dir1d2 +U dir1d2/file2 +${PROG} [a-z]*: Updating dir2d1/sub2d1 +U dir2d1/sub2d1/file1" + # the usual for the top level + dotest cvsadm-25b "cat CVS/Repository" \ +"${AREP}\." + # the usual for 1d2mod + dotest cvsadm-25d "cat dir1d2/CVS/Repository" \ +"${AREP}mod2/sub2" + # the usual for 2d1mod + dotest cvsadm-25f "cat dir2d1/CVS/Repository" \ +"${AREP}CVSROOT/Emptydir" + dotest cvsadm-25h "cat dir2d1/sub2d1/CVS/Repository" \ +"${AREP}mod1" + rm -rf CVS dir1d2 dir2d1 + + dotest cvsadm-26 "${testcvs} co 1d2mod 2d2mod" \ +"${PROG} [a-z]*: Updating dir1d2 +U dir1d2/file2 +${PROG} [a-z]*: Updating dir2d2/sub2d2 +U dir2d2/sub2d2/file2" + # the usual for the top level + dotest cvsadm-26b "cat CVS/Repository" \ +"${AREP}\." + # the usual for 1d2mod + dotest cvsadm-26d "cat dir1d2/CVS/Repository" \ +"${AREP}mod2/sub2" + # the usual for 2d2mod + dotest cvsadm-26f "cat dir2d2/CVS/Repository" \ +"${AREP}CVSROOT/Emptydir" + dotest cvsadm-26h "cat dir2d2/sub2d2/CVS/Repository" \ +"${AREP}mod2/sub2" + rm -rf CVS dir1d2 dir2d2 + + + # 2d1mod + + dotest cvsadm-27 "${testcvs} co 2d1mod 2d1mod-2" \ +"${PROG} [a-z]*: Updating dir2d1/sub2d1 +U dir2d1/sub2d1/file1 +${PROG} [a-z]*: Updating dir2d1-2/sub2d1-2 +U dir2d1-2/sub2d1-2/file1-2" + # the usual for the top level + dotest cvsadm-27b "cat CVS/Repository" \ +"${AREP}\." + # the usual for 2d1mod + dotest cvsadm-27d "cat dir2d1/CVS/Repository" \ +"${AREP}CVSROOT/Emptydir" + dotest cvsadm-27f "cat dir2d1/sub2d1/CVS/Repository" \ +"${AREP}mod1" + # the usual for 2d1mod + dotest cvsadm-27h "cat dir2d1-2/CVS/Repository" \ +"${AREP}CVSROOT/Emptydir" + dotest cvsadm-27j "cat dir2d1-2/sub2d1-2/CVS/Repository" \ +"${AREP}mod1-2" + rm -rf CVS dir2d1 dir2d1-2 + + dotest cvsadm-28 "${testcvs} co 2d1mod 2d2mod" \ +"${PROG} [a-z]*: Updating dir2d1/sub2d1 +U dir2d1/sub2d1/file1 +${PROG} [a-z]*: Updating dir2d2/sub2d2 +U dir2d2/sub2d2/file2" + # the usual for the top level + dotest cvsadm-28b "cat CVS/Repository" \ +"${AREP}\." + # the usual for 2d1mod + dotest cvsadm-28d "cat dir2d1/CVS/Repository" \ +"${AREP}CVSROOT/Emptydir" + dotest cvsadm-28f "cat dir2d1/sub2d1/CVS/Repository" \ +"${AREP}mod1" + # the usual for 2d2mod + dotest cvsadm-28h "cat dir2d2/CVS/Repository" \ +"${AREP}CVSROOT/Emptydir" + dotest cvsadm-28j "cat dir2d2/sub2d2/CVS/Repository" \ +"${AREP}mod2/sub2" + rm -rf CVS dir2d1 dir2d2 + + + # 2d2mod + + dotest cvsadm-29 "${testcvs} co 2d2mod 2d2mod-2" \ +"${PROG} [a-z]*: Updating dir2d2/sub2d2 +U dir2d2/sub2d2/file2 +${PROG} [a-z]*: Updating dir2d2-2/sub2d2-2 +U dir2d2-2/sub2d2-2/file2-2" + # the usual for the top level + dotest cvsadm-29b "cat CVS/Repository" \ +"${AREP}\." + # the usual for 2d2mod + dotest cvsadm-29d "cat dir2d2/CVS/Repository" \ +"${AREP}CVSROOT/Emptydir" + dotest cvsadm-29f "cat dir2d2/sub2d2/CVS/Repository" \ +"${AREP}mod2/sub2" + # the usual for 2d2mod + dotest cvsadm-29h "cat dir2d2-2/CVS/Repository" \ +"${AREP}CVSROOT/Emptydir" + dotest cvsadm-29j "cat dir2d2-2/sub2d2-2/CVS/Repository" \ +"${AREP}mod2-2/sub2-2" + rm -rf CVS dir2d2 dir2d2-2 + + ################################################## + ## And now, all of that again using the "-d" flag + ## on the command line. + ################################################## + + dotest cvsadm-1d3 "${testcvs} co -d dir 1mod" \ +"${PROG} [a-z]*: Updating dir +U dir/file1" + dotest cvsadm-1d3b "cat CVS/Repository" \ +"${AREP}\." + dotest cvsadm-1d3d "cat dir/CVS/Repository" \ +"${AREP}mod1" + rm -rf CVS dir + + dotest cvsadm-1d4 "${testcvs} co -d dir 2mod" \ +"${PROG} [a-z]*: Updating dir +U dir/file2" + dotest cvsadm-1d4b "cat CVS/Repository" \ +"${AREP}\." + dotest cvsadm-1d4d "cat dir/CVS/Repository" \ +"${AREP}mod2/sub2" + rm -rf CVS dir + + dotest cvsadm-1d5 "${testcvs} co -d dir 1d1mod" \ +"${PROG} [a-z]*: Updating dir +U dir/file1" + dotest cvsadm-1d5b "cat CVS/Repository" \ +"${AREP}\." + dotest cvsadm-1d5d "cat dir/CVS/Repository" \ +"${AREP}mod1" + rm -rf CVS dir + + dotest cvsadm-1d6 "${testcvs} co -d dir 1d2mod" \ +"${PROG} [a-z]*: Updating dir +U dir/file2" + dotest cvsadm-1d6b "cat CVS/Repository" \ +"${AREP}\." + dotest cvsadm-1d6d "cat dir/CVS/Repository" \ +"${AREP}mod2/sub2" + rm -rf CVS dir + + dotest cvsadm-1d7 "${testcvs} co -d dir 2d1mod" \ +"${PROG} [a-z]*: Updating dir +U dir/file1" + dotest cvsadm-1d7b "cat CVS/Repository" \ +"${AREP}\." + dotest cvsadm-1d7d "cat dir/CVS/Repository" \ +"${AREP}mod1" + rm -rf CVS dir + + dotest cvsadm-1d8 "${testcvs} co -d dir 2d2mod" \ +"${PROG} [a-z]*: Updating dir +U dir/file2" + dotest cvsadm-1d8b "cat CVS/Repository" \ +"${AREP}\." + dotest cvsadm-1d8d "cat dir/CVS/Repository" \ +"${AREP}mod2/sub2" + rm -rf CVS dir + + ################################################## + ## Los Combonaciones + ################################################## + + ### 1mod + + dotest cvsadm-1d9 "${testcvs} co -d dir 1mod 1mod-2" \ +"${PROG} [a-z]*: Updating dir/1mod +U dir/1mod/file1 +${PROG} [a-z]*: Updating dir/1mod-2 +U dir/1mod-2/file1-2" + # the usual for the top level + dotest cvsadm-1d9b "cat CVS/Repository" \ +"${AREP}\." + # the usual for the dir level + dotest cvsadm-1d9d "cat dir/CVS/Repository" \ +"${AREP}\." + # the usual for 1mod + dotest cvsadm-1d9f "cat dir/1mod/CVS/Repository" \ +"${AREP}mod1" + # the usual for 1mod copy + dotest cvsadm-1d9h "cat dir/1mod-2/CVS/Repository" \ +"${AREP}mod1-2" + rm -rf CVS dir + + # 1mod 2mod redmod bluemod + dotest cvsadm-1d10 "${testcvs} co -d dir 1mod 2mod" \ +"${PROG} [a-z]*: Updating dir/1mod +U dir/1mod/file1 +${PROG} [a-z]*: Updating dir/2mod +U dir/2mod/file2" + dotest cvsadm-1d10b "cat CVS/Repository" \ +"${AREP}\." + # the usual for the dir level + dotest cvsadm-1d10d "cat dir/CVS/Repository" \ +"${AREP}\." + # the usual for 1mod + dotest cvsadm-1d10f "cat dir/1mod/CVS/Repository" \ +"${AREP}mod1" + # the usual for 2dmod + dotest cvsadm-1d10h "cat dir/2mod/CVS/Repository" \ +"${AREP}mod2/sub2" + rm -rf CVS dir + + dotest cvsadm-1d11 "${testcvs} co -d dir 1mod 1d1mod" \ +"${PROG} [a-z]*: Updating dir/1mod +U dir/1mod/file1 +${PROG} [a-z]*: Updating dir/dir1d1 +U dir/dir1d1/file1" + dotest cvsadm-1d11b "cat CVS/Repository" \ +"${AREP}\." + # the usual for the dir level + dotest cvsadm-1d11d "cat dir/CVS/Repository" \ +"${AREP}\." + # the usual for 1mod + dotest cvsadm-1d11f "cat dir/1mod/CVS/Repository" \ +"${AREP}mod1" + # the usual for 1d1mod + dotest cvsadm-1d11h "cat dir/dir1d1/CVS/Repository" \ +"${AREP}mod1" + rm -rf CVS dir + + dotest cvsadm-1d12 "${testcvs} co -d dir 1mod 1d2mod" \ +"${PROG} [a-z]*: Updating dir/1mod +U dir/1mod/file1 +${PROG} [a-z]*: Updating dir/dir1d2 +U dir/dir1d2/file2" + dotest cvsadm-1d12b "cat CVS/Repository" \ +"${AREP}\." + # the usual for the dir level + dotest cvsadm-1d12d "cat dir/CVS/Repository" \ +"${AREP}\." + # the usual for 1mod + dotest cvsadm-1d12f "cat dir/1mod/CVS/Repository" \ +"${AREP}mod1" + # the usual for 1d2mod + dotest cvsadm-1d12h "cat dir/dir1d2/CVS/Repository" \ +"${AREP}mod2/sub2" + rm -rf CVS dir + + dotest cvsadm-1d13 "${testcvs} co -d dir 1mod 2d1mod" \ +"${PROG} [a-z]*: Updating dir/1mod +U dir/1mod/file1 +${PROG} [a-z]*: Updating dir/dir2d1/sub2d1 +U dir/dir2d1/sub2d1/file1" + dotest cvsadm-1d13b "cat CVS/Repository" \ +"${AREP}\." + # the usual for the dir level + dotest cvsadm-1d13d "cat dir/CVS/Repository" \ +"${AREP}\." + # the usual for 1mod + dotest cvsadm-1d13f "cat dir/1mod/CVS/Repository" \ +"${AREP}mod1" + # the usual for 2d1mod + dotest cvsadm-1d13h "cat dir/dir2d1/CVS/Repository" \ +"${AREP}CVSROOT/Emptydir" + dotest cvsadm-1d13j "cat dir/dir2d1/sub2d1/CVS/Repository" \ +"${AREP}mod1" + rm -rf CVS dir + + dotest cvsadm-1d14 "${testcvs} co -d dir 1mod 2d2mod" \ +"${PROG} [a-z]*: Updating dir/1mod +U dir/1mod/file1 +${PROG} [a-z]*: Updating dir/dir2d2/sub2d2 +U dir/dir2d2/sub2d2/file2" + dotest cvsadm-1d14b "cat CVS/Repository" \ +"${AREP}\." + # the usual for the dir level + dotest cvsadm-1d14d "cat dir/CVS/Repository" \ +"${AREP}\." + # the usual for 1mod + dotest cvsadm-1d14f "cat dir/1mod/CVS/Repository" \ +"${AREP}mod1" + # the usual for 2d2mod + dotest cvsadm-1d14h "cat dir/dir2d2/CVS/Repository" \ +"${AREP}CVSROOT/Emptydir" + dotest cvsadm-1d14j "cat dir/dir2d2/sub2d2/CVS/Repository" \ +"${AREP}mod2/sub2" + rm -rf CVS dir + + + ### 2mod + + dotest cvsadm-1d15 "${testcvs} co -d dir 2mod 2mod-2" \ +"${PROG} [a-z]*: Updating dir/2mod +U dir/2mod/file2 +${PROG} [a-z]*: Updating dir/2mod-2 +U dir/2mod-2/file2-2" + dotest cvsadm-1d15b "cat CVS/Repository" \ +"${AREP}\." + # the usual for the dir level + dotest cvsadm-1d15d "cat dir/CVS/Repository" \ +"${AREP}\." + # the usual for 2mod + dotest cvsadm-1d15f "cat dir/2mod/CVS/Repository" \ +"${AREP}mod2/sub2" + # the usual for 2mod copy + dotest cvsadm-1d15h "cat dir/2mod-2/CVS/Repository" \ +"${AREP}mod2-2/sub2-2" + rm -rf CVS dir + + dotest cvsadm-1d16 "${testcvs} co -d dir 2mod 1d1mod" \ +"${PROG} [a-z]*: Updating dir/2mod +U dir/2mod/file2 +${PROG} [a-z]*: Updating dir/dir1d1 +U dir/dir1d1/file1" + dotest cvsadm-1d16b "cat CVS/Repository" \ +"${AREP}\." + # the usual for the dir level + dotest cvsadm-1d16d "cat dir/CVS/Repository" \ +"${AREP}\." + # the usual for 2mod + dotest cvsadm-1d16f "cat dir/2mod/CVS/Repository" \ +"${AREP}mod2/sub2" + # the usual for 1d1mod + dotest cvsadm-1d16h "cat dir/dir1d1/CVS/Repository" \ +"${AREP}mod1" + rm -rf CVS dir + + dotest cvsadm-1d17 "${testcvs} co -d dir 2mod 1d2mod" \ +"${PROG} [a-z]*: Updating dir/2mod +U dir/2mod/file2 +${PROG} [a-z]*: Updating dir/dir1d2 +U dir/dir1d2/file2" + dotest cvsadm-1d17b "cat CVS/Repository" \ +"${AREP}\." + # the usual for the dir level + dotest cvsadm-1d17d "cat dir/CVS/Repository" \ +"${AREP}\." + # the usual for 2mod + dotest cvsadm-1d17f "cat dir/2mod/CVS/Repository" \ +"${AREP}mod2/sub2" + # the usual for 1d2mod + dotest cvsadm-1d17h "cat dir/dir1d2/CVS/Repository" \ +"${AREP}mod2/sub2" + rm -rf CVS dir + + dotest cvsadm-1d18 "${testcvs} co -d dir 2mod 2d1mod" \ +"${PROG} [a-z]*: Updating dir/2mod +U dir/2mod/file2 +${PROG} [a-z]*: Updating dir/dir2d1/sub2d1 +U dir/dir2d1/sub2d1/file1" + dotest cvsadm-1d18b "cat CVS/Repository" \ +"${AREP}\." + # the usual for the dir level + dotest cvsadm-1d18d "cat dir/CVS/Repository" \ +"${AREP}\." + # the usual for 2mod + dotest cvsadm-1d18f "cat dir/2mod/CVS/Repository" \ +"${AREP}mod2/sub2" + # the usual for 2d1mod + dotest cvsadm-1d18h "cat dir/dir2d1/CVS/Repository" \ +"${AREP}CVSROOT/Emptydir" + dotest cvsadm-1d18j "cat dir/dir2d1/sub2d1/CVS/Repository" \ +"${AREP}mod1" + rm -rf CVS dir + + dotest cvsadm-1d19 "${testcvs} co -d dir 2mod 2d2mod" \ +"${PROG} [a-z]*: Updating dir/2mod +U dir/2mod/file2 +${PROG} [a-z]*: Updating dir/dir2d2/sub2d2 +U dir/dir2d2/sub2d2/file2" + dotest cvsadm-1d19b "cat CVS/Repository" \ +"${AREP}\." + # the usual for the dir level + dotest cvsadm-1d19d "cat dir/CVS/Repository" \ +"${AREP}\." + # the usual for 2mod + dotest cvsadm-1d19f "cat dir/2mod/CVS/Repository" \ +"${AREP}mod2/sub2" + # the usual for 2d2mod + dotest cvsadm-1d19h "cat dir/dir2d2/CVS/Repository" \ +"${AREP}CVSROOT/Emptydir" + dotest cvsadm-1d19j "cat dir/dir2d2/sub2d2/CVS/Repository" \ +"${AREP}mod2/sub2" + rm -rf CVS dir + + + ### 1d1mod + + dotest cvsadm-1d20 "${testcvs} co -d dir 1d1mod 1d1mod-2" \ +"${PROG} [a-z]*: Updating dir/dir1d1 +U dir/dir1d1/file1 +${PROG} [a-z]*: Updating dir/dir1d1-2 +U dir/dir1d1-2/file1-2" + dotest cvsadm-1d20b "cat CVS/Repository" \ +"${AREP}\." + # the usual for the dir level + dotest cvsadm-1d20d "cat dir/CVS/Repository" \ +"${AREP}\." + # the usual for 1d1mod + dotest cvsadm-1d20f "cat dir/dir1d1/CVS/Repository" \ +"${AREP}mod1" + # the usual for 1d1mod copy + dotest cvsadm-1d20h "cat dir/dir1d1-2/CVS/Repository" \ +"${AREP}mod1-2" + rm -rf CVS dir + + dotest cvsadm-1d21 "${testcvs} co -d dir 1d1mod 1d2mod" \ +"${PROG} [a-z]*: Updating dir/dir1d1 +U dir/dir1d1/file1 +${PROG} [a-z]*: Updating dir/dir1d2 +U dir/dir1d2/file2" + dotest cvsadm-1d21b "cat CVS/Repository" \ +"${AREP}\." + # the usual for the dir level + dotest cvsadm-1d21d "cat dir/CVS/Repository" \ +"${AREP}\." + # the usual for 1d1mod + dotest cvsadm-1d21f "cat dir/dir1d1/CVS/Repository" \ +"${AREP}mod1" + # the usual for 1d2mod + dotest cvsadm-1d21h "cat dir/dir1d2/CVS/Repository" \ +"${AREP}mod2/sub2" + rm -rf CVS dir + + dotest cvsadm-1d22 "${testcvs} co -d dir 1d1mod 2d1mod" \ +"${PROG} [a-z]*: Updating dir/dir1d1 +U dir/dir1d1/file1 +${PROG} [a-z]*: Updating dir/dir2d1/sub2d1 +U dir/dir2d1/sub2d1/file1" + dotest cvsadm-1d22b "cat CVS/Repository" \ +"${AREP}\." + # the usual for the dir level + dotest cvsadm-1d22d "cat dir/CVS/Repository" \ +"${AREP}\." + # the usual for 1d1mod + dotest cvsadm-1d22f "cat dir/dir1d1/CVS/Repository" \ +"${AREP}mod1" + # the usual for 2d1mod + dotest cvsadm-1d22h "cat dir/dir2d1/CVS/Repository" \ +"${AREP}CVSROOT/Emptydir" + dotest cvsadm-1d22j "cat dir/dir2d1/sub2d1/CVS/Repository" \ +"${AREP}mod1" + rm -rf CVS dir + + dotest cvsadm-1d23 "${testcvs} co -d dir 1d1mod 2d2mod" \ +"${PROG} [a-z]*: Updating dir/dir1d1 +U dir/dir1d1/file1 +${PROG} [a-z]*: Updating dir/dir2d2/sub2d2 +U dir/dir2d2/sub2d2/file2" + dotest cvsadm-1d23b "cat CVS/Repository" \ +"${AREP}\." + # the usual for the dir level + dotest cvsadm-1d23d "cat dir/CVS/Repository" \ +"${AREP}\." + # the usual for 1d1mod + dotest cvsadm-1d23f "cat dir/dir1d1/CVS/Repository" \ +"${AREP}mod1" + # the usual for 2d2mod + dotest cvsadm-1d23h "cat dir/dir2d2/CVS/Repository" \ +"${AREP}CVSROOT/Emptydir" + dotest cvsadm-1d23j "cat dir/dir2d2/sub2d2/CVS/Repository" \ +"${AREP}mod2/sub2" + rm -rf CVS dir + + + ### 1d2mod + + dotest cvsadm-1d24 "${testcvs} co -d dir 1d2mod 1d2mod-2" \ +"${PROG} [a-z]*: Updating dir/dir1d2 +U dir/dir1d2/file2 +${PROG} [a-z]*: Updating dir/dir1d2-2 +U dir/dir1d2-2/file2-2" + dotest cvsadm-1d24b "cat CVS/Repository" \ +"${AREP}\." + # the usual for the dir level + dotest cvsadm-1d24d "cat dir/CVS/Repository" \ +"${AREP}\." + # the usual for 1d2mod + dotest cvsadm-1d24f "cat dir/dir1d2/CVS/Repository" \ +"${AREP}mod2/sub2" + # the usual for 1d2mod copy + dotest cvsadm-1d24h "cat dir/dir1d2-2/CVS/Repository" \ +"${AREP}mod2-2/sub2-2" + rm -rf CVS dir + + dotest cvsadm-1d25 "${testcvs} co -d dir 1d2mod 2d1mod" \ +"${PROG} [a-z]*: Updating dir/dir1d2 +U dir/dir1d2/file2 +${PROG} [a-z]*: Updating dir/dir2d1/sub2d1 +U dir/dir2d1/sub2d1/file1" + dotest cvsadm-1d25b "cat CVS/Repository" \ +"${AREP}\." + # the usual for the dir level + dotest cvsadm-1d25d "cat dir/CVS/Repository" \ +"${AREP}\." + # the usual for 1d2mod + dotest cvsadm-1d25f "cat dir/dir1d2/CVS/Repository" \ +"${AREP}mod2/sub2" + # the usual for 2d1mod + dotest cvsadm-1d25h "cat dir/dir2d1/CVS/Repository" \ +"${AREP}CVSROOT/Emptydir" + dotest cvsadm-1d25j "cat dir/dir2d1/sub2d1/CVS/Repository" \ +"${AREP}mod1" + rm -rf CVS dir + + dotest cvsadm-1d26 "${testcvs} co -d dir 1d2mod 2d2mod" \ +"${PROG} [a-z]*: Updating dir/dir1d2 +U dir/dir1d2/file2 +${PROG} [a-z]*: Updating dir/dir2d2/sub2d2 +U dir/dir2d2/sub2d2/file2" + dotest cvsadm-1d26b "cat CVS/Repository" \ +"${AREP}\." + # the usual for the dir level + dotest cvsadm-1d26d "cat dir/CVS/Repository" \ +"${AREP}\." + # the usual for 1d2mod + dotest cvsadm-1d26f "cat dir/dir1d2/CVS/Repository" \ +"${AREP}mod2/sub2" + # the usual for 2d2mod + dotest cvsadm-1d26h "cat dir/dir2d2/CVS/Repository" \ +"${AREP}CVSROOT/Emptydir" + dotest cvsadm-1d26j "cat dir/dir2d2/sub2d2/CVS/Repository" \ +"${AREP}mod2/sub2" + rm -rf CVS dir + + + # 2d1mod + + dotest cvsadm-1d27 "${testcvs} co -d dir 2d1mod 2d1mod-2" \ +"${PROG} [a-z]*: Updating dir/dir2d1/sub2d1 +U dir/dir2d1/sub2d1/file1 +${PROG} [a-z]*: Updating dir/dir2d1-2/sub2d1-2 +U dir/dir2d1-2/sub2d1-2/file1-2" + dotest cvsadm-1d27b "cat CVS/Repository" \ +"${AREP}\." + # the usual for the dir level + dotest cvsadm-1d27d "cat dir/CVS/Repository" \ +"${AREP}\." + # the usual for 2d1mod + dotest cvsadm-1d27f "cat dir/dir2d1/CVS/Repository" \ +"${AREP}CVSROOT/Emptydir" + dotest cvsadm-1d27h "cat dir/dir2d1/sub2d1/CVS/Repository" \ +"${AREP}mod1" + # the usual for 2d1mod + dotest cvsadm-1d27j "cat dir/dir2d1-2/CVS/Repository" \ +"${AREP}CVSROOT/Emptydir" + dotest cvsadm-1d27l "cat dir/dir2d1-2/sub2d1-2/CVS/Repository" \ +"${AREP}mod1-2" + rm -rf CVS dir + + dotest cvsadm-1d28 "${testcvs} co -d dir 2d1mod 2d2mod" \ +"${PROG} [a-z]*: Updating dir/dir2d1/sub2d1 +U dir/dir2d1/sub2d1/file1 +${PROG} [a-z]*: Updating dir/dir2d2/sub2d2 +U dir/dir2d2/sub2d2/file2" + dotest cvsadm-1d28b "cat CVS/Repository" \ +"${AREP}\." + # the usual for the dir level + dotest cvsadm-1d28d "cat dir/CVS/Repository" \ +"${AREP}\." + # the usual for 2d1mod + dotest cvsadm-1d28f "cat dir/dir2d1/CVS/Repository" \ +"${AREP}CVSROOT/Emptydir" + dotest cvsadm-1d28h "cat dir/dir2d1/sub2d1/CVS/Repository" \ +"${AREP}mod1" + # the usual for 2d2mod + dotest cvsadm-1d28j "cat dir/dir2d2/CVS/Repository" \ +"${AREP}CVSROOT/Emptydir" + dotest cvsadm-1d28l "cat dir/dir2d2/sub2d2/CVS/Repository" \ +"${AREP}mod2/sub2" + rm -rf CVS dir + + + # 2d2mod + + dotest cvsadm-1d29 "${testcvs} co -d dir 2d2mod 2d2mod-2" \ +"${PROG} [a-z]*: Updating dir/dir2d2/sub2d2 +U dir/dir2d2/sub2d2/file2 +${PROG} [a-z]*: Updating dir/dir2d2-2/sub2d2-2 +U dir/dir2d2-2/sub2d2-2/file2-2" + dotest cvsadm-1d29b "cat CVS/Repository" \ +"${AREP}\." + # the usual for the dir level + dotest cvsadm-1d29d "cat dir/CVS/Repository" \ +"${AREP}\." + # the usual for 2d2mod + dotest cvsadm-1d29f "cat dir/dir2d2/CVS/Repository" \ +"${AREP}CVSROOT/Emptydir" + dotest cvsadm-1d29h "cat dir/dir2d2/sub2d2/CVS/Repository" \ +"${AREP}mod2/sub2" + # the usual for 2d2mod + dotest cvsadm-1d29j "cat dir/dir2d2-2/CVS/Repository" \ +"${AREP}CVSROOT/Emptydir" + dotest cvsadm-1d29l "cat dir/dir2d2-2/sub2d2-2/CVS/Repository" \ +"${AREP}mod2-2/sub2-2" + rm -rf CVS dir + + ################################################## + ## And now, some of that again using the "-d" flag + ## on the command line, but use a longer path. + ################################################## + + dotest cvsadm-2d3 "${testcvs} co -d dir/dir2 1mod" \ +"${PROG} [a-z]*: Updating dir/dir2 +U dir/dir2/file1" + dotest cvsadm-2d3b "cat CVS/Repository" \ +"${AREP}\." + dotest cvsadm-2d3d "cat dir/CVS/Repository" \ +"${AREP}CVSROOT/Emptydir" + dotest cvsadm-2d3f "cat dir/dir2/CVS/Repository" \ +"${AREP}mod1" + rm -rf CVS dir + + dotest cvsadm-2d4 "${testcvs} co -d dir/dir2 2mod" \ +"${PROG} [a-z]*: Updating dir/dir2 +U dir/dir2/file2" + dotest cvsadm-2d4b "cat CVS/Repository" \ +"${AREP}\." + dotest cvsadm-2d4d "cat dir/CVS/Repository" \ +"${AREP}CVSROOT/Emptydir" + dotest cvsadm-2d4f "cat dir/dir2/CVS/Repository" \ +"${AREP}mod2/sub2" + rm -rf CVS dir + + dotest cvsadm-2d5 "${testcvs} co -d dir/dir2 1d1mod" \ +"${PROG} [a-z]*: Updating dir/dir2 +U dir/dir2/file1" + dotest cvsadm-2d5b "cat CVS/Repository" \ +"${AREP}\." + dotest cvsadm-2d5d "cat dir/CVS/Repository" \ +"${AREP}CVSROOT/Emptydir" + dotest cvsadm-2d5f "cat dir/dir2/CVS/Repository" \ +"${AREP}mod1" + rm -rf CVS dir + + dotest cvsadm-2d6 "${testcvs} co -d dir/dir2 1d2mod" \ +"${PROG} [a-z]*: Updating dir/dir2 +U dir/dir2/file2" + dotest cvsadm-2d6b "cat CVS/Repository" \ +"${AREP}\." + dotest cvsadm-2d6d "cat dir/CVS/Repository" \ +"${AREP}CVSROOT/Emptydir" + dotest cvsadm-2d6f "cat dir/dir2/CVS/Repository" \ +"${AREP}mod2/sub2" + rm -rf CVS dir + + dotest cvsadm-2d7 "${testcvs} co -d dir/dir2 2d1mod" \ +"${PROG} [a-z]*: Updating dir/dir2 +U dir/dir2/file1" + dotest cvsadm-2d7b "cat CVS/Repository" \ +"${AREP}\." + dotest cvsadm-2d7d "cat dir/CVS/Repository" \ +"${AREP}CVSROOT/Emptydir" + dotest cvsadm-2d7f "cat dir/dir2/CVS/Repository" \ +"${AREP}mod1" + rm -rf CVS dir + + dotest cvsadm-2d8 "${testcvs} co -d dir/dir2 2d2mod" \ +"${PROG} [a-z]*: Updating dir/dir2 +U dir/dir2/file2" + dotest cvsadm-2d8b "cat CVS/Repository" \ +"${AREP}\." + dotest cvsadm-2d8d "cat dir/CVS/Repository" \ +"${AREP}CVSROOT/Emptydir" + dotest cvsadm-2d8f "cat dir/dir2/CVS/Repository" \ +"${AREP}mod2/sub2" + rm -rf CVS dir + + ################################################## + ## And now, a few of those tests revisited to + ## test the behavior of the -N flag. + ################################################## + + dotest cvsadm-N3 "${testcvs} co -N 1mod" \ +"${PROG} [a-z]*: Updating 1mod +U 1mod/file1" + dotest cvsadm-N3b "cat CVS/Repository" \ +"${AREP}\." + dotest cvsadm-N3d "cat 1mod/CVS/Repository" \ +"${AREP}mod1" + rm -rf CVS 1mod + + dotest cvsadm-N4 "${testcvs} co -N 2mod" \ +"${PROG} [a-z]*: Updating 2mod +U 2mod/file2" + dotest cvsadm-N4b "cat CVS/Repository" \ +"${AREP}\." + dotest cvsadm-N4d "cat 2mod/CVS/Repository" \ +"${AREP}mod2/sub2" + rm -rf CVS 2mod + + dotest cvsadm-N5 "${testcvs} co -N 1d1mod" \ +"${PROG} [a-z]*: Updating dir1d1 +U dir1d1/file1" + dotest cvsadm-N5b "cat CVS/Repository" \ +"${AREP}\." + dotest cvsadm-N5d "cat dir1d1/CVS/Repository" \ +"${AREP}mod1" + rm -rf CVS dir1d1 + + dotest cvsadm-N6 "${testcvs} co -N 1d2mod" \ +"${PROG} [a-z]*: Updating dir1d2 +U dir1d2/file2" + dotest cvsadm-N6b "cat CVS/Repository" \ +"${AREP}\." + dotest cvsadm-N6d "cat dir1d2/CVS/Repository" \ +"${AREP}mod2/sub2" + rm -rf CVS dir1d2 + + dotest cvsadm-N7 "${testcvs} co -N 2d1mod" \ +"${PROG} [a-z]*: Updating dir2d1/sub2d1 +U dir2d1/sub2d1/file1" + dotest cvsadm-N7b "cat CVS/Repository" \ +"${AREP}\." + dotest cvsadm-N7d "cat dir2d1/CVS/Repository" \ +"${AREP}CVSROOT/Emptydir" + dotest cvsadm-N7f "cat dir2d1/sub2d1/CVS/Repository" \ +"${AREP}mod1" + rm -rf CVS dir2d1 + + dotest cvsadm-N8 "${testcvs} co -N 2d2mod" \ +"${PROG} [a-z]*: Updating dir2d2/sub2d2 +U dir2d2/sub2d2/file2" + dotest cvsadm-N8b "cat CVS/Repository" \ +"${AREP}\." + dotest cvsadm-N8d "cat dir2d2/CVS/Repository" \ +"${AREP}CVSROOT/Emptydir" + dotest cvsadm-N8f "cat dir2d2/sub2d2/CVS/Repository" \ +"${AREP}mod2/sub2" + rm -rf CVS dir2d2 + + ## the ones in one-deep directories + + dotest cvsadm-N1d3 "${testcvs} co -N -d dir 1mod" \ +"${PROG} [a-z]*: Updating dir/1mod +U dir/1mod/file1" + dotest cvsadm-N1d3b "cat CVS/Repository" \ +"${AREP}\." + dotest cvsadm-N1d3d "cat dir/CVS/Repository" \ +"${AREP}\." + dotest cvsadm-N1d3f "cat dir/1mod/CVS/Repository" \ +"${AREP}mod1" + rm -rf CVS dir + + dotest cvsadm-N1d4 "${testcvs} co -N -d dir 2mod" \ +"${PROG} [a-z]*: Updating dir/2mod +U dir/2mod/file2" + dotest cvsadm-N1d4b "cat CVS/Repository" \ +"${AREP}\." + dotest cvsadm-N1d4d "cat dir/CVS/Repository" \ +"${AREP}\." + dotest cvsadm-N1d4f "cat dir/2mod/CVS/Repository" \ +"${AREP}mod2/sub2" + rm -rf CVS dir + + dotest cvsadm-N1d5 "${testcvs} co -N -d dir 1d1mod" \ +"${PROG} [a-z]*: Updating dir/dir1d1 +U dir/dir1d1/file1" + dotest cvsadm-N1d5b "cat CVS/Repository" \ +"${AREP}\." + dotest cvsadm-N1d5d "cat dir/CVS/Repository" \ +"${AREP}\." + dotest cvsadm-N1d5d "cat dir/dir1d1/CVS/Repository" \ +"${AREP}mod1" + rm -rf CVS dir + + dotest cvsadm-N1d6 "${testcvs} co -N -d dir 1d2mod" \ +"${PROG} [a-z]*: Updating dir/dir1d2 +U dir/dir1d2/file2" + dotest cvsadm-N1d6b "cat CVS/Repository" \ +"${AREP}\." + dotest cvsadm-N1d6d "cat dir/CVS/Repository" \ +"${AREP}\." + dotest cvsadm-N1d6f "cat dir/dir1d2/CVS/Repository" \ +"${AREP}mod2/sub2" + rm -rf CVS dir + + dotest cvsadm-N1d7 "${testcvs} co -N -d dir 2d1mod" \ +"${PROG} [a-z]*: Updating dir/dir2d1/sub2d1 +U dir/dir2d1/sub2d1/file1" + dotest cvsadm-N1d7b "cat CVS/Repository" \ +"${AREP}\." + dotest cvsadm-N1d7d "cat dir/CVS/Repository" \ +"${AREP}\." + dotest cvsadm-N1d7f "cat dir/dir2d1/CVS/Repository" \ +"${AREP}CVSROOT/Emptydir" + dotest cvsadm-N1d7h "cat dir/dir2d1/sub2d1/CVS/Repository" \ +"${AREP}mod1" + rm -rf CVS dir + + dotest cvsadm-N1d8 "${testcvs} co -N -d dir 2d2mod" \ +"${PROG} [a-z]*: Updating dir/dir2d2/sub2d2 +U dir/dir2d2/sub2d2/file2" + dotest cvsadm-N1d8b "cat CVS/Repository" \ +"${AREP}\." + dotest cvsadm-N1d8d "cat dir/CVS/Repository" \ +"${AREP}\." + dotest cvsadm-N1d8d "cat dir/dir2d2/CVS/Repository" \ +"${AREP}CVSROOT/Emptydir" + dotest cvsadm-N1d8d "cat dir/dir2d2/sub2d2/CVS/Repository" \ +"${AREP}mod2/sub2" + rm -rf CVS dir + + ## the ones in two-deep directories + + dotest cvsadm-N2d3 "${testcvs} co -N -d dir/dir2 1mod" \ +"${PROG} [a-z]*: Updating dir/dir2/1mod +U dir/dir2/1mod/file1" + dotest cvsadm-N2d3b "cat CVS/Repository" \ +"${AREP}\." + dotest cvsadm-N2d3d "cat dir/CVS/Repository" \ +"${AREP}CVSROOT/Emptydir" + dotest cvsadm-N2d3f "cat dir/dir2/CVS/Repository" \ +"${AREP}\." + dotest cvsadm-N2d3h "cat dir/dir2/1mod/CVS/Repository" \ +"${AREP}mod1" + rm -rf CVS dir + + dotest cvsadm-N2d4 "${testcvs} co -N -d dir/dir2 2mod" \ +"${PROG} [a-z]*: Updating dir/dir2/2mod +U dir/dir2/2mod/file2" + dotest cvsadm-N2d4b "cat CVS/Repository" \ +"${AREP}\." + dotest cvsadm-N2d4d "cat dir/CVS/Repository" \ +"${AREP}CVSROOT/Emptydir" + dotest cvsadm-N2d4f "cat dir/dir2/CVS/Repository" \ +"${AREP}\." + dotest cvsadm-N2d4h "cat dir/dir2/2mod/CVS/Repository" \ +"${AREP}mod2/sub2" + rm -rf CVS dir + + dotest cvsadm-N2d5 "${testcvs} co -N -d dir/dir2 1d1mod" \ +"${PROG} [a-z]*: Updating dir/dir2/dir1d1 +U dir/dir2/dir1d1/file1" + dotest cvsadm-N2d5b "cat CVS/Repository" \ +"${AREP}\." + dotest cvsadm-N2d5d "cat dir/CVS/Repository" \ +"${AREP}CVSROOT/Emptydir" + dotest cvsadm-N2d5f "cat dir/dir2/CVS/Repository" \ +"${AREP}\." + dotest cvsadm-N2d5h "cat dir/dir2/dir1d1/CVS/Repository" \ +"${AREP}mod1" + rm -rf CVS dir + + dotest cvsadm-N2d6 "${testcvs} co -N -d dir/dir2 1d2mod" \ +"${PROG} [a-z]*: Updating dir/dir2/dir1d2 +U dir/dir2/dir1d2/file2" + dotest cvsadm-N2d6b "cat CVS/Repository" \ +"${AREP}\." + dotest cvsadm-N2d6d "cat dir/CVS/Repository" \ +"${AREP}CVSROOT/Emptydir" + dotest cvsadm-N2d6f "cat dir/dir2/CVS/Repository" \ +"${AREP}\." + dotest cvsadm-N2d6h "cat dir/dir2/dir1d2/CVS/Repository" \ +"${AREP}mod2/sub2" + rm -rf CVS dir + + dotest cvsadm-N2d7 "${testcvs} co -N -d dir/dir2 2d1mod" \ +"${PROG} [a-z]*: Updating dir/dir2/dir2d1/sub2d1 +U dir/dir2/dir2d1/sub2d1/file1" + dotest cvsadm-N2d7b "cat CVS/Repository" \ +"${AREP}\." + dotest cvsadm-N2d7d "cat dir/CVS/Repository" \ +"${AREP}CVSROOT/Emptydir" + dotest cvsadm-N2d7f "cat dir/dir2/CVS/Repository" \ +"${AREP}\." + dotest cvsadm-N2d7f "cat dir/dir2/dir2d1/CVS/Repository" \ +"${AREP}CVSROOT/Emptydir" + dotest cvsadm-N2d7h "cat dir/dir2/dir2d1/sub2d1/CVS/Repository" \ +"${AREP}mod1" + rm -rf CVS dir + + dotest cvsadm-N2d8 "${testcvs} co -N -d dir/dir2 2d2mod" \ +"${PROG} [a-z]*: Updating dir/dir2/dir2d2/sub2d2 +U dir/dir2/dir2d2/sub2d2/file2" + dotest cvsadm-N2d8b "cat CVS/Repository" \ +"${AREP}\." + dotest cvsadm-N2d8d "cat dir/CVS/Repository" \ +"${AREP}CVSROOT/Emptydir" + dotest cvsadm-N2d8f "cat dir/dir2/CVS/Repository" \ +"${AREP}\." + dotest cvsadm-N2d8h "cat dir/dir2/dir2d2/CVS/Repository" \ +"${AREP}CVSROOT/Emptydir" + dotest cvsadm-N2d8j "cat dir/dir2/dir2d2/sub2d2/CVS/Repository" \ +"${AREP}mod2/sub2" + rm -rf CVS dir + + ################################################## + ## That's enough of that, thank you very much. + ################################################## + + # remove our junk + cd .. + rm -rf 1 + rm -rf ${CVSROOT_DIRNAME}/1mod + rm -rf ${CVSROOT_DIRNAME}/1mod-2 + rm -rf ${CVSROOT_DIRNAME}/2mod + rm -rf ${CVSROOT_DIRNAME}/2mod-2 + rm -rf ${CVSROOT_DIRNAME}/mod1 + rm -rf ${CVSROOT_DIRNAME}/mod1-2 + rm -rf ${CVSROOT_DIRNAME}/mod2 + rm -rf ${CVSROOT_DIRNAME}/mod2-2 + ;; + + abspath) + + # These tests test the thituations thin thwitch thoo theck + # things thout twith thabsolute thaths. Threally. + + # + # CHECKOUTS + # + + # Create a few modules to use + mkdir ${CVSROOT_DIRNAME}/mod1 ${CVSROOT_DIRNAME}/mod2 + dotest abspath-1a "${testcvs} co mod1 mod2" \ +"${PROG} [a-z]*: Updating mod1 +${PROG} [a-z]*: Updating mod2" + + # Populate the module + echo "file1" > mod1/file1 + echo "file2" > mod2/file2 + dotest abspath-1b "${testcvs} add mod1/file1 mod2/file2" \ +"${PROG} [a-z]*: scheduling file .mod1/file1. for addition +${PROG} [a-z]*: scheduling file .mod2/file2. for addition +${PROG} [a-z]*: use '${PROG} commit' to add these files permanently" + + dotest abspath-1c "${testcvs} ci -m yup mod1 mod2" \ +"${PROG} [a-z]*: Examining mod1 +${PROG} [a-z]*: Examining mod2 +RCS file: ${CVSROOT_DIRNAME}/mod1/file1,v +done +Checking in mod1/file1; +${CVSROOT_DIRNAME}/mod1/file1,v <-- file1 +initial revision: 1.1 +done +RCS file: ${CVSROOT_DIRNAME}/mod2/file2,v +done +Checking in mod2/file2; +${CVSROOT_DIRNAME}/mod2/file2,v <-- file2 +initial revision: 1.1 +done" + # Finished creating the module -- clean up. + rm -rf CVS mod1 mod2 + # Done. + + # Try checking out the module in a local directory + dotest abspath-2a "${testcvs} co -d ${TESTDIR}/1 mod1" \ +"${PROG} [a-z]*: Updating ${TESTDIR}/1 +U ${TESTDIR}/1/file1" + + # Are we relative or absolute in our Repository file? + echo "${CVSROOT_DIRNAME}/mod1" > ${TESTDIR}/dotest.abs + echo "mod1" > ${TESTDIR}/dotest.rel + if cmp ${TESTDIR}/dotest.abs ${TESTDIR}/1/CVS/Repository >/dev/null 2>&1; then + AREP="${CVSROOT_DIRNAME}/" + elif cmp ${TESTDIR}/dotest.rel ${TESTDIR}/1/CVS/Repository >/dev/null 2>&1; then + AREP="" + else + fail "Cannot figure out if RELATIVE_REPOS is defined." + fi + rm -f ${TESTDIR}/dotest.rel ${TESTDIR}/dotest.abs + + dotest abspath-2b "cat ${TESTDIR}/1/CVS/Repository" \ +"${AREP}mod1" + + # Done. Clean up. + rm -rf ${TESTDIR}/1 + + + # Now try in a subdirectory. We're not covering any more + # code here, but we might catch a future error if someone + # changes the checkout code. + dotest abspath-3a "${testcvs} co -d ${TESTDIR}/1/2 mod1" \ +"${PROG} [a-z]*: Updating ${TESTDIR}/1/2 +U ${TESTDIR}/1/2/file1" + dotest abspath-3b "cat ${TESTDIR}/1/2/CVS/Repository" \ +"${AREP}mod1" + # Done. Clean up. + rm -rf ${TESTDIR}/1 + + + # Now try someplace where we don't have permission. + mkdir ${TESTDIR}/barf + chmod -w ${TESTDIR}/barf + dotest_fail abspath-4 "${testcvs} co -d ${TESTDIR}/barf/sub mod1" \ +"${PROG} \[[a-z]* aborted\]: cannot make directory sub: No such file or directory" + chmod +w ${TESTDIR}/barf + rmdir ${TESTDIR}/barf + # Done. Nothing to clean up. + + + # Try checking out two modules into the same directory. + dotest abspath-5a "${testcvs} co -d ${TESTDIR}/1 mod1 mod2" \ +"${PROG} [a-z]*: Updating ${TESTDIR}/1/mod1 +U ${TESTDIR}/1/mod1/file1 +${PROG} [a-z]*: Updating ${TESTDIR}/1/mod2 +U ${TESTDIR}/1/mod2/file2" + dotest abspath-5b "cat ${TESTDIR}/1/CVS/Repository" \ +"${AREP}." + dotest abspath-5c "cat ${TESTDIR}/1/mod1/CVS/Repository" \ +"${AREP}mod1" + dotest abspath-5d "cat ${TESTDIR}/1/mod2/CVS/Repository" \ +"${AREP}mod2" + # Done. Clean up. + rm -rf ${TESTDIR}/1 + + + # Try checking out the top-level module. + dotest abspath-6a "${testcvs} co -d ${TESTDIR}/1 ." \ +"${PROG} [a-z]*: Updating ${TESTDIR}/1 +${PROG} [a-z]*: Updating ${TESTDIR}/1/CVSROOT +${DOTSTAR} +${PROG} [a-z]*: Updating ${TESTDIR}/1/mod1 +U ${TESTDIR}/1/mod1/file1 +${PROG} [a-z]*: Updating ${TESTDIR}/1/mod2 +U ${TESTDIR}/1/mod2/file2" + dotest abspath-6b "cat ${TESTDIR}/1/CVS/Repository" \ +"${AREP}." + dotest abspath-6c "cat ${TESTDIR}/1/CVSROOT/CVS/Repository" \ +"${AREP}CVSROOT" + dotest abspath-6c "cat ${TESTDIR}/1/mod1/CVS/Repository" \ +"${AREP}mod1" + dotest abspath-6d "cat ${TESTDIR}/1/mod2/CVS/Repository" \ +"${AREP}mod2" + # Done. Clean up. + rm -rf ${TESTDIR}/1 + + # + # FIXME: do other functions here (e.g. update /tmp/foo) + # + + # Finished with all tests. Remove the module. + rm -rf ${CVSROOT_DIRNAME}/mod1 ${CVSROOT_DIRNAME}/mod1 + + # FIXME: the absolute pathname fixes create CVS directories + # wherever they can. That means for the standard TESTDIR, a + # /tmp/CVS directory will be created as well. It's not safe + # to remove it, however. + + ;; + + toplevel) + # test the feature that cvs creates a CVS subdir also for + # the toplevel directory + + # Some test, somewhere, is creating Emptydir. That test + # should, perhaps, clean up for itself, but I don't know which + # one it is. + rm -rf ${CVSROOT_DIRNAME}/CVSROOT/Emptydir + + mkdir 1; cd 1 + dotest toplevel-1 "${testcvs} -q co -l ." '' + mkdir top-dir second-dir + dotest toplevel-2 "${testcvs} add top-dir second-dir" \ +"Directory ${TESTDIR}/cvsroot/top-dir added to the repository +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" + dotest toplevel-4 "${testcvs} -q ci -m add" \ +"RCS file: ${TESTDIR}/cvsroot/top-dir/file1,v +done +Checking in file1; +${TESTDIR}/cvsroot/top-dir/file1,v <-- file1 +initial revision: 1\.1 +done" + 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" + dotest toplevel-4s "${testcvs} -q ci -m add" \ +"RCS file: ${TESTDIR}/cvsroot/second-dir/file2,v +done +Checking in file2; +${TESTDIR}/cvsroot/second-dir/file2,v <-- file2 +initial revision: 1\.1 +done" + + cd ../.. + rm -r 1; mkdir 1; cd 1 + dotest toplevel-5 "${testcvs} co top-dir" \ +"${PROG} [a-z]*: Updating top-dir +U top-dir/file1" + + dotest toplevel-6 "${testcvs} update top-dir" \ +"${PROG} [a-z]*: Updating top-dir" + dotest toplevel-7 "${testcvs} update" \ +"${PROG} [a-z]*: Updating \. +${PROG} [a-z]*: Updating top-dir" + + dotest toplevel-8 "${testcvs} update -d top-dir" \ +"${PROG} [a-z]*: Updating top-dir" + # There is some sentiment that + # "${PROG} [a-z]*: Updating \. + # ${PROG} [a-z]*: Updating top-dir" + # is correct but it isn't clear why that would be correct instead + # of the remote CVS behavior (which also updates CVSROOT). + # + # The DOTSTAR matches of a bunch of lines like + # "U CVSROOT/checkoutlist". Trying to match them more precisely + # seemed to cause trouble. For example CVSROOT/cvsignore will + # be present or absent depending on whether we ran the "ignore" + # test or not. + dotest toplevel-9 "${testcvs} update -d" \ +"${PROG} [a-z]*: Updating \. +${PROG} [a-z]*: Updating CVSROOT +${DOTSTAR} +${PROG} [a-z]*: Updating top-dir" + + cd .. + rm -r 1; mkdir 1; cd 1 + dotest toplevel-10 "${testcvs} co top-dir" \ +"${PROG} [a-z]*: Updating top-dir +U top-dir/file1" + # This tests more or less the same thing, in a particularly + # "real life" example. + dotest toplevel-11 "${testcvs} -q update -d second-dir" \ +"U second-dir/file2" + + # 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 + # directory itself was created with 1.9 or older). + rm -r CVS + # Now set the permissions so we can't recreate it. + chmod -w ../1 + # Now see whether CVS has trouble because it can't create CVS. + dotest toplevel-12 "${testcvs} co top-dir" \ +"${PROG} [a-z]*: warning: cannot make directory CVS in \.: Permission denied +${PROG} [a-z]*: Updating top-dir" + chmod +w ../1 + + cd .. + rm -r 1 + rm -rf ${CVSROOT_DIRNAME}/top-dir ${CVSROOT_DIRNAME}/second-dir + ;; + mflag) for message in '' ' ' ' ' ' test' ; do @@ -7867,7 +9891,8 @@ ${PROG} [a-z]*: Rebuilding administrative file database" 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 "ALL echo %sux >>$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 @@ -8965,7 +10990,7 @@ add file1 head 1.5 ; branch 1.2.6; access ; -symbols; +symbols branch:1.2.6; locks; testofanewphrase @without newphrase we'd have trouble extending @@ all@ ; 1.5 date 71.01.01.01.00.00; author joe; state bogus; branches; next 1.4; @@ -8997,6 +11022,16 @@ EOF dotest rcs-5 "${testcvs} -q update file2" "U file2" dotest rcs-6 "cat file2" "branch revision" + # Check in a revision on the branch to force CVS to + # interpret every revision in the file. + dotest rcs-6a "${testcvs} -q update -r branch file2" "" + echo "next branch revision" > file2 + dotest rcs-6b "${testcvs} -q ci -m mod file2" \ +"Checking in file2; +${TESTDIR}/cvsroot/first-dir/file2,v <-- file2 +new revision: 1\.2\.6\.2; previous revision: 1\.2\.6\.1 +done" + # Now get rid of the default branch, it will get in the way. dotest rcs-7 "${testcvs} admin -b file2" \ "RCS file: ${TESTDIR}/cvsroot/first-dir/file2,v @@ -9013,7 +11048,8 @@ done" dotest rcs-8a "cat ${CVSROOT_DIRNAME}/first-dir/file2,v" \ "head 1\.5; access; -symbols; +symbols + branch:1.2.6; locks; testofanewphrase @without newphrase we'd have trouble extending @@ all@; @@ -9048,6 +11084,11 @@ newph ; 1\.2\.6\.1 date 71\.01\.01\.08\.00\.05; author joe; state Exp; branches; +next 1\.2\.6\.2; + +1\.2\.6\.2 +date [0-9.]*; author ${username}; state Exp; +branches; next ; @@ -9106,7 +11147,18 @@ log text @d1 1 a1 1 -branch revision@" +branch revision@ + + +1\.2\.6\.2 +log +@mod +@ +text +@d1 1 +a1 1 +next branch revision +@" # For remote, the "update -p -D" usage seems not to work. # I'm not sure what is going on. @@ -9166,8 +11218,9 @@ branch: locks: access list: symbolic names: + branch: 1\.2\.6 keyword substitution: kv -total revisions: 6; selected revisions: 6 +total revisions: 7; selected revisions: 7 description: ---------------------------- revision 1\.5 @@ -9191,6 +11244,10 @@ revision 1\.1 date: 1970/12/31 11:00:05; author: joe; state: bogus; \*\*\* empty log message \*\*\* ---------------------------- +revision 1\.2\.6\.2 +date: [0-9/]* [0-9:]*; author: ${username}; state: Exp; lines: ${PLUS}1 -1 +mod +---------------------------- revision 1\.2\.6\.1 date: 1971/01/01 08:00:05; author: joe; state: Exp; lines: ${PLUS}1 -1 \*\*\* empty log message \*\*\* @@ -9972,108 +12029,6 @@ xx" rm -rf ${CVSROOT_DIRNAME}/first-dir ;; - toplevel) - # test the feature that cvs creates a CVS subdir also for - # the toplevel directory - - # Some test, somewhere, is creating Emptydir. That test - # should, perhaps, clean up for itself, but I don't know which - # one it is. - rm -rf ${CVSROOT_DIRNAME}/CVSROOT/Emptydir - - mkdir 1; cd 1 - dotest toplevel-1 "${testcvs} -q co -l ." '' - mkdir top-dir second-dir - dotest toplevel-2 "${testcvs} add top-dir second-dir" \ -"Directory ${TESTDIR}/cvsroot/top-dir added to the repository -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" - dotest toplevel-4 "${testcvs} -q ci -m add" \ -"RCS file: ${TESTDIR}/cvsroot/top-dir/file1,v -done -Checking in file1; -${TESTDIR}/cvsroot/top-dir/file1,v <-- file1 -initial revision: 1\.1 -done" - 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" - dotest toplevel-4s "${testcvs} -q ci -m add" \ -"RCS file: ${TESTDIR}/cvsroot/second-dir/file2,v -done -Checking in file2; -${TESTDIR}/cvsroot/second-dir/file2,v <-- file2 -initial revision: 1\.1 -done" - - cd ../.. - rm -r 1; mkdir 1; cd 1 - dotest toplevel-5 "${testcvs} co top-dir" \ -"${PROG} [a-z]*: Updating top-dir -U top-dir/file1" - - dotest toplevel-6 "${testcvs} update top-dir" \ -"${PROG} [a-z]*: Updating top-dir" - dotest toplevel-7 "${testcvs} update" \ -"${PROG} [a-z]*: Updating \. -${PROG} [a-z]*: Updating top-dir" - - dotest toplevel-8 "${testcvs} update -d top-dir" \ -"${PROG} [a-z]*: Updating top-dir" - # There is some sentiment that - # "${PROG} [a-z]*: Updating \. - # ${PROG} [a-z]*: Updating top-dir" - # is correct but it isn't clear why that would be correct instead - # of the remote CVS behavior (which also updates CVSROOT). - # - # The DOTSTAR matches of a bunch of lines like - # "U CVSROOT/checkoutlist". Trying to match them more precisely - # seemed to cause trouble. For example CVSROOT/cvsignore will - # be present or absent depending on whether we ran the "ignore" - # test or not. - dotest toplevel-9 "${testcvs} update -d" \ -"${PROG} [a-z]*: Updating \. -${PROG} [a-z]*: Updating CVSROOT -${DOTSTAR} -${PROG} [a-z]*: Updating top-dir" - - cd .. - rm -r 1; mkdir 1; cd 1 - dotest toplevel-10 "${testcvs} co top-dir" \ -"${PROG} [a-z]*: Updating top-dir -U top-dir/file1" - # This tests more or less the same thing, in a particularly - # "real life" example. - dotest toplevel-11 "${testcvs} -q update -d second-dir" \ -"U second-dir/file2" - - # 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 - # directory itself was created with 1.9 or older). - rm -r CVS - # Now set the permissions so we can't recreate it. - chmod -w ../1 - # Now see whether CVS has trouble because it can't create CVS. - dotest toplevel-12 "${testcvs} co top-dir" \ -"${PROG} [a-z]*: warning: cannot make directory ./CVS: Permission denied -${PROG} [a-z]*: Updating top-dir" - chmod +w ../1 - - cd .. - rm -r 1 - rm -rf ${CVSROOT_DIRNAME}/top-dir - ;; - head) # Testing handling of the HEAD special tag. # There are many cases involving added and removed files @@ -10088,10 +12043,11 @@ ${PROG} [a-z]*: Updating top-dir" # It may seem like we don't do much with file2, but do note that # the "cvs diff" invocations do also diff file2 (and come up empty). echo 'imported contents' >file2 - dotest head-1 "${testcvs} import -m add first-dir tag1 tag2" \ -"N first-dir/file1 -N first-dir/file2 + dotest_sort head-1 "${testcvs} import -m add first-dir tag1 tag2" \ +" +N first-dir/file1 +N first-dir/file2 No conflicts created by this import" cd .. rm -r imp-dir @@ -10511,6 +12467,15 @@ ${PROG} \[[a-z]* aborted\]: attempt to specify a numeric revision" "${PROG} [a-z]*: while processing more than one file: ${PROG} \[[a-z]* aborted\]: attempt to specify a numeric revision" + # try a bad symbolic revision + dotest_fail admin-10c "${testcvs} -q admin -bBOGUS" \ +"RCS file: ${TESTDIR}/cvsroot/first-dir/file1,v +${PROG} [a-z]*: ${TESTDIR}/cvsroot/first-dir/file1,v: Symbolic name BOGUS is undefined. +${PROG} [a-z]*: cannot modify RCS file for .file1. +RCS file: ${TESTDIR}/cvsroot/first-dir/file2,v +${PROG} [a-z]*: ${TESTDIR}/cvsroot/first-dir/file2,v: Symbolic name BOGUS is undefined. +${PROG} [a-z]*: cannot modify RCS file for .file2." + # Note that -s option applies to the new default branch, not # the old one. # Also note that the implementation of -a via "rcs" requires @@ -10520,8 +12485,33 @@ ${PROG} \[[a-z]* aborted\]: attempt to specify a numeric revision" -b1.1.2 -cxx -U -sfoo file1" \ "RCS file: ${TESTDIR}/cvsroot/first-dir/file1,v done" - - dotest admin-12 "${testcvs} log -N file1" " + dotest admin-11a "${testcvs} log -N file1" " +RCS file: ${TESTDIR}/cvsroot/first-dir/file1,v +Working file: file1 +head: 1\.1 +branch: 1\.1\.2 +locks: +access list: + foo + bar + baz +keyword substitution: kv +total revisions: 2; selected revisions: 2 +description: +---------------------------- +revision 1\.1 +date: [0-9/]* [0-9:]*; author: ${username}; state: Exp; +branches: 1\.1\.2; +add +---------------------------- +revision 1\.1\.2\.1 +date: [0-9/]* [0-9:]*; author: ${username}; state: foo; lines: ${PLUS}1 -0 +modify-on-branch +=============================================================================" + dotest admin-12 "${testcvs} -q admin -bbr file1" \ +"RCS file: ${TESTDIR}/cvsroot/first-dir/file1,v +done" + dotest admin-12a "${testcvs} log -N file1" " RCS file: ${TESTDIR}/cvsroot/first-dir/file1,v Working file: file1 head: 1\.1 @@ -11179,1408 +13169,6 @@ ${PROG} [a-z]*: Rebuilding administrative file database" rm -rf ${CVSROOT_DIRNAME}/first-dir ;; - cvsadm) - # These test check the content of CVS' administrative - # files as they are checked out in various configurations. - # (As a side note, I'm not using the "-q" flag in any of - # this code, which should provide some extra checking for - # those messages which don't seem to be checked thoroughly - # anywhere else.) To do a thorough test, we need to make - # a bunch of modules in various configurations. - # - # <1mod> is a directory at the top level of cvsroot - # ``foo bar'' - # <2mod> is a directory at the second level of cvsroot - # ``foo bar/baz'' - # <1d1mod> is a directory at the top level which is - # checked out into another directory - # ``foo -d bar baz'' - # <1d2mod> is a directory at the second level which is - # checked out into another directory - # ``foo -d bar baz/quux'' - # <2d1mod> is a directory at the top level which is - # checked out into a directory that is two deep - # ``foo -d bar/baz quux'' - # <2d2mod> is a directory at the second level which is - # checked out into a directory that is two deep - # ``foo -d bar/baz quux'' - # - # The tests do each of these types separately and in twos. - # We also repeat each test -d flag for 1-deep and 2-deep - # directories. - # - # Each test should check the output for the Repository - # file, since that is the one which varies depending on - # the directory and how it was checked out. - # - # Yes, this is verbose, but at least it's very thorough. - - # convenience variables - REP=${CVSROOT} - - # First, check out the modules file and edit it. - mkdir 1; cd 1 - dotest cvsadm-1 "${testcvs} co CVSROOT/modules" \ -"U CVSROOT/modules" - - # Try to determine whether RELATIVE_REPOS is defined - # so that we can make the following a lot less - # verbose. - - echo "${CVSROOT_DIRNAME}/." > ${TESTDIR}/dotest.abs - echo "." > ${TESTDIR}/dotest.rel - if cmp ${TESTDIR}/dotest.abs CVS/Repository >/dev/null 2>&1; then - AREP="${CVSROOT_DIRNAME}/" - elif cmp ${TESTDIR}/dotest.rel CVS/Repository >/dev/null 2>&1; then - AREP="" - else - fail "Cannot figure out if RELATIVE_REPOS is defined." - fi - - # Test CVS/Root once. Since there is only one part of - # the code which writes CVS/Root files (Create_Admin), - # there is no point in testing this every time. - dotest cvsadm-1a "cat CVS/Root" ${REP} - dotest cvsadm-1b "cat CVS/Repository" \ -"${AREP}\." - dotest cvsadm-1c "cat CVSROOT/CVS/Root" ${REP} - dotest cvsadm-1d "cat CVSROOT/CVS/Repository" \ -"${AREP}CVSROOT" - # All of the defined module names begin with a number. - # All of the top-level directory names begin with "dir". - # All of the subdirectory names begin with "sub". - # All of the top-level modules begin with "mod". - echo "# Module defs for cvsadm tests" > CVSROOT/modules - echo "1mod mod1" >> CVSROOT/modules - echo "1mod-2 mod1-2" >> CVSROOT/modules - echo "2mod mod2/sub2" >> CVSROOT/modules - echo "2mod-2 mod2-2/sub2-2" >> CVSROOT/modules - echo "1d1mod -d dir1d1 mod1" >> CVSROOT/modules - echo "1d1mod-2 -d dir1d1-2 mod1-2" >> CVSROOT/modules - echo "1d2mod -d dir1d2 mod2/sub2" >> CVSROOT/modules - echo "1d2mod-2 -d dir1d2-2 mod2-2/sub2-2" >> CVSROOT/modules - echo "2d1mod -d dir2d1/sub2d1 mod1" >> CVSROOT/modules - echo "2d1mod-2 -d dir2d1-2/sub2d1-2 mod1-2" >> CVSROOT/modules - echo "2d2mod -d dir2d2/sub2d2 mod2/sub2" >> CVSROOT/modules - echo "2d2mod-2 -d dir2d2-2/sub2d2-2 mod2-2/sub2-2" >> CVSROOT/modules - dotest cvsadm-1e "${testcvs} ci -m add-modules" \ -"${PROG} [a-z]*: Examining . -${PROG} [a-z]*: Examining CVSROOT -Checking in CVSROOT/modules; -${CVSROOT_DIRNAME}/CVSROOT/modules,v <-- modules -new revision: 1\.[0-9]*; previous revision: 1\.[0-9]* -done -${PROG} [a-z]*: Rebuilding administrative file database" - rm -rf CVS CVSROOT; - - # Create the various modules - mkdir ${CVSROOT_DIRNAME}/mod1 - mkdir ${CVSROOT_DIRNAME}/mod1-2 - mkdir ${CVSROOT_DIRNAME}/mod2 - mkdir ${CVSROOT_DIRNAME}/mod2/sub2 - mkdir ${CVSROOT_DIRNAME}/mod2-2 - mkdir ${CVSROOT_DIRNAME}/mod2-2/sub2-2 - dotest cvsadm-2 "${testcvs} co mod1 mod1-2 mod2 mod2-2" \ -"${PROG} [a-z]*: Updating mod1 -${PROG} [a-z]*: Updating mod1-2 -${PROG} [a-z]*: Updating mod2 -${PROG} [a-z]*: Updating mod2/sub2 -${PROG} [a-z]*: Updating mod2-2 -${PROG} [a-z]*: Updating mod2-2/sub2-2" - - # Populate the directories for the halibut - echo "file1" > mod1/file1 - echo "file1-2" > mod1-2/file1-2 - echo "file2" > mod2/sub2/file2 - echo "file2-2" > mod2-2/sub2-2/file2-2 - dotest cvsadm-2a "${testcvs} add mod1/file1 mod1-2/file1-2 mod2/sub2/file2 mod2-2/sub2-2/file2-2" \ -"${PROG} [a-z]*: scheduling file .mod1/file1. for addition -${PROG} [a-z]*: scheduling file .mod1-2/file1-2. for addition -${PROG} [a-z]*: scheduling file .mod2/sub2/file2. for addition -${PROG} [a-z]*: scheduling file .mod2-2/sub2-2/file2-2. for addition -${PROG} [a-z]*: use '${PROG} commit' to add these files permanently" - - dotest cvsadm-2b "${testcvs} ci -m yup mod1 mod1-2 mod2 mod2-2" \ -"${PROG} [a-z]*: Examining mod1 -${PROG} [a-z]*: Examining mod1-2 -${PROG} [a-z]*: Examining mod2 -${PROG} [a-z]*: Examining mod2/sub2 -${PROG} [a-z]*: Examining mod2-2 -${PROG} [a-z]*: Examining mod2-2/sub2-2 -RCS file: ${CVSROOT_DIRNAME}/mod1/file1,v -done -Checking in mod1/file1; -${CVSROOT_DIRNAME}/mod1/file1,v <-- file1 -initial revision: 1.1 -done -RCS file: ${CVSROOT_DIRNAME}/mod1-2/file1-2,v -done -Checking in mod1-2/file1-2; -${CVSROOT_DIRNAME}/mod1-2/file1-2,v <-- file1-2 -initial revision: 1.1 -done -RCS file: ${CVSROOT_DIRNAME}/mod2/sub2/file2,v -done -Checking in mod2/sub2/file2; -${CVSROOT_DIRNAME}/mod2/sub2/file2,v <-- file2 -initial revision: 1.1 -done -RCS file: ${CVSROOT_DIRNAME}/mod2-2/sub2-2/file2-2,v -done -Checking in mod2-2/sub2-2/file2-2; -${CVSROOT_DIRNAME}/mod2-2/sub2-2/file2-2,v <-- file2-2 -initial revision: 1.1 -done" - # Finished creating the modules -- clean up. - rm -rf CVS mod1 mod1-2 mod2 mod2-2 - # Done. - - ################################################## - ## Start the dizzying array of possibilities. - ## Begin with each module type separately. - ################################################## - - # Pattern -- after each checkout, first check the top-level - # CVS directory. Then, check the directories in numerical - # order. - - dotest cvsadm-3 "${testcvs} co 1mod" \ -"${PROG} [a-z]*: Updating 1mod -U 1mod/file1" - dotest cvsadm-3b "cat CVS/Repository" \ -"${AREP}\." - dotest cvsadm-3d "cat 1mod/CVS/Repository" \ -"${AREP}mod1" - rm -rf CVS 1mod - - dotest cvsadm-4 "${testcvs} co 2mod" \ -"${PROG} [a-z]*: Updating 2mod -U 2mod/file2" - dotest cvsadm-4b "cat CVS/Repository" \ -"${AREP}\." - dotest cvsadm-4d "cat 2mod/CVS/Repository" \ -"${AREP}mod2/sub2" - rm -rf CVS 2mod - - dotest cvsadm-5 "${testcvs} co 1d1mod" \ -"${PROG} [a-z]*: Updating dir1d1 -U dir1d1/file1" - dotest cvsadm-5b "cat CVS/Repository" \ -"${AREP}\." - dotest cvsadm-5d "cat dir1d1/CVS/Repository" \ -"${AREP}mod1" - rm -rf CVS dir1d1 - - dotest cvsadm-6 "${testcvs} co 1d2mod" \ -"${PROG} [a-z]*: Updating dir1d2 -U dir1d2/file2" - dotest cvsadm-6b "cat CVS/Repository" \ -"${AREP}\." - dotest cvsadm-6d "cat dir1d2/CVS/Repository" \ -"${AREP}mod2/sub2" - rm -rf CVS dir1d2 - - dotest cvsadm-7 "${testcvs} co 2d1mod" \ -"${PROG} [a-z]*: Updating dir2d1/sub2d1 -U dir2d1/sub2d1/file1" - dotest cvsadm-7b "cat CVS/Repository" \ -"${AREP}\." - dotest cvsadm-7d "cat dir2d1/CVS/Repository" \ -"${AREP}CVSROOT/Emptydir" - dotest cvsadm-7f "cat dir2d1/sub2d1/CVS/Repository" \ -"${AREP}mod1" - rm -rf CVS dir2d1 - - dotest cvsadm-8 "${testcvs} co 2d2mod" \ -"${PROG} [a-z]*: Updating dir2d2/sub2d2 -U dir2d2/sub2d2/file2" - dotest cvsadm-8b "cat CVS/Repository" \ -"${AREP}\." - dotest cvsadm-8d "cat dir2d2/CVS/Repository" \ -"${AREP}CVSROOT/Emptydir" - dotest cvsadm-8f "cat dir2d2/sub2d2/CVS/Repository" \ -"${AREP}mod2/sub2" - rm -rf CVS dir2d2 - - ################################################## - ## You are in a shell script of twisted little - ## module combination statements, all alike. - ################################################## - - ### 1mod - - dotest cvsadm-9 "${testcvs} co 1mod 1mod-2" \ -"${PROG} [a-z]*: Updating 1mod -U 1mod/file1 -${PROG} [a-z]*: Updating 1mod-2 -U 1mod-2/file1-2" - # the usual for the top level - dotest cvsadm-9b "cat CVS/Repository" \ -"${AREP}\." - # the usual for 1mod - dotest cvsadm-9d "cat 1mod/CVS/Repository" \ -"${AREP}mod1" - # the usual for 1mod copy - dotest cvsadm-9f "cat 1mod-2/CVS/Repository" \ -"${AREP}mod1-2" - rm -rf CVS 1mod 1mod-2 - - # 1mod 2mod redmod bluemod - dotest cvsadm-10 "${testcvs} co 1mod 2mod" \ -"${PROG} [a-z]*: Updating 1mod -U 1mod/file1 -${PROG} [a-z]*: Updating 2mod -U 2mod/file2" - # the usual for the top level - dotest cvsadm-10b "cat CVS/Repository" \ -"${AREP}\." - # the usual for 1mod - dotest cvsadm-10d "cat 1mod/CVS/Repository" \ -"${AREP}mod1" - # the usual for 2dmod - dotest cvsadm-10f "cat 2mod/CVS/Repository" \ -"${AREP}mod2/sub2" - rm -rf CVS 1mod 2mod - - dotest cvsadm-11 "${testcvs} co 1mod 1d1mod" \ -"${PROG} [a-z]*: Updating 1mod -U 1mod/file1 -${PROG} [a-z]*: Updating dir1d1 -U dir1d1/file1" - # the usual for the top level - dotest cvsadm-11b "cat CVS/Repository" \ -"${AREP}\." - # the usual for 1mod - dotest cvsadm-11d "cat 1mod/CVS/Repository" \ -"${AREP}mod1" - # the usual for 1d1mod - dotest cvsadm-11f "cat dir1d1/CVS/Repository" \ -"${AREP}mod1" - rm -rf CVS 1mod dir1d1 - - dotest cvsadm-12 "${testcvs} co 1mod 1d2mod" \ -"${PROG} [a-z]*: Updating 1mod -U 1mod/file1 -${PROG} [a-z]*: Updating dir1d2 -U dir1d2/file2" - # the usual for the top level - dotest cvsadm-12b "cat CVS/Repository" \ -"${AREP}\." - # the usual for 1mod - dotest cvsadm-12d "cat 1mod/CVS/Repository" \ -"${AREP}mod1" - # the usual for 1d2mod - dotest cvsadm-12f "cat dir1d2/CVS/Repository" \ -"${AREP}mod2/sub2" - rm -rf CVS 1mod dir1d2 - - dotest cvsadm-13 "${testcvs} co 1mod 2d1mod" \ -"${PROG} [a-z]*: Updating 1mod -U 1mod/file1 -${PROG} [a-z]*: Updating dir2d1/sub2d1 -U dir2d1/sub2d1/file1" - # the usual for the top level - dotest cvsadm-13b "cat CVS/Repository" \ -"${AREP}\." - # the usual for 1mod - dotest cvsadm-13d "cat 1mod/CVS/Repository" \ -"${AREP}mod1" - # the usual for 2d1mod - dotest cvsadm-13f "cat dir2d1/CVS/Repository" \ -"${AREP}CVSROOT/Emptydir" - dotest cvsadm-13h "cat dir2d1/sub2d1/CVS/Repository" \ -"${AREP}mod1" - rm -rf CVS 1mod dir2d1 - - dotest cvsadm-14 "${testcvs} co 1mod 2d2mod" \ -"${PROG} [a-z]*: Updating 1mod -U 1mod/file1 -${PROG} [a-z]*: Updating dir2d2/sub2d2 -U dir2d2/sub2d2/file2" - # the usual for the top level - dotest cvsadm-14b "cat CVS/Repository" \ -"${AREP}\." - # the usual for 1mod - dotest cvsadm-14d "cat 1mod/CVS/Repository" \ -"${AREP}mod1" - # the usual for 2d2mod - dotest cvsadm-14f "cat dir2d2/CVS/Repository" \ -"${AREP}CVSROOT/Emptydir" - dotest cvsadm-14h "cat dir2d2/sub2d2/CVS/Repository" \ -"${AREP}mod2/sub2" - rm -rf CVS 1mod dir2d2 - - - ### 2mod - - dotest cvsadm-15 "${testcvs} co 2mod 2mod-2" \ -"${PROG} [a-z]*: Updating 2mod -U 2mod/file2 -${PROG} [a-z]*: Updating 2mod-2 -U 2mod-2/file2-2" - # the usual for the top level - dotest cvsadm-15b "cat CVS/Repository" \ -"${AREP}\." - # the usual for 2mod - dotest cvsadm-15d "cat 2mod/CVS/Repository" \ -"${AREP}mod2/sub2" - # the usual for 2mod copy - dotest cvsadm-15f "cat 2mod-2/CVS/Repository" \ -"${AREP}mod2-2/sub2-2" - rm -rf CVS 2mod 2mod-2 - - - dotest cvsadm-16 "${testcvs} co 2mod 1d1mod" \ -"${PROG} [a-z]*: Updating 2mod -U 2mod/file2 -${PROG} [a-z]*: Updating dir1d1 -U dir1d1/file1" - # the usual for the top level - dotest cvsadm-16b "cat CVS/Repository" \ -"${AREP}\." - # the usual for 2mod - dotest cvsadm-16d "cat 2mod/CVS/Repository" \ -"${AREP}mod2/sub2" - # the usual for 1d1mod - dotest cvsadm-16f "cat dir1d1/CVS/Repository" \ -"${AREP}mod1" - rm -rf CVS 2mod dir1d1 - - dotest cvsadm-17 "${testcvs} co 2mod 1d2mod" \ -"${PROG} [a-z]*: Updating 2mod -U 2mod/file2 -${PROG} [a-z]*: Updating dir1d2 -U dir1d2/file2" - # the usual for the top level - dotest cvsadm-17b "cat CVS/Repository" \ -"${AREP}\." - # the usual for 2mod - dotest cvsadm-17d "cat 2mod/CVS/Repository" \ -"${AREP}mod2/sub2" - # the usual for 1d2mod - dotest cvsadm-17f "cat dir1d2/CVS/Repository" \ -"${AREP}mod2/sub2" - rm -rf CVS 2mod dir1d2 - - dotest cvsadm-18 "${testcvs} co 2mod 2d1mod" \ -"${PROG} [a-z]*: Updating 2mod -U 2mod/file2 -${PROG} [a-z]*: Updating dir2d1/sub2d1 -U dir2d1/sub2d1/file1" - # the usual for the top level - dotest cvsadm-18b "cat CVS/Repository" \ -"${AREP}\." - # the usual for 2mod - dotest cvsadm-18d "cat 2mod/CVS/Repository" \ -"${AREP}mod2/sub2" - # the usual for 2d1mod - dotest cvsadm-18f "cat dir2d1/CVS/Repository" \ -"${AREP}CVSROOT/Emptydir" - dotest cvsadm-18h "cat dir2d1/sub2d1/CVS/Repository" \ -"${AREP}mod1" - rm -rf CVS 2mod dir2d1 - - dotest cvsadm-19 "${testcvs} co 2mod 2d2mod" \ -"${PROG} [a-z]*: Updating 2mod -U 2mod/file2 -${PROG} [a-z]*: Updating dir2d2/sub2d2 -U dir2d2/sub2d2/file2" - # the usual for the top level - dotest cvsadm-19b "cat CVS/Repository" \ -"${AREP}\." - # the usual for 2mod - dotest cvsadm-19d "cat 2mod/CVS/Repository" \ -"${AREP}mod2/sub2" - # the usual for 2d2mod - dotest cvsadm-19f "cat dir2d2/CVS/Repository" \ -"${AREP}CVSROOT/Emptydir" - dotest cvsadm-19h "cat dir2d2/sub2d2/CVS/Repository" \ -"${AREP}mod2/sub2" - rm -rf CVS 2mod dir2d2 - - - ### 1d1mod - - dotest cvsadm-20 "${testcvs} co 1d1mod 1d1mod-2" \ -"${PROG} [a-z]*: Updating dir1d1 -U dir1d1/file1 -${PROG} [a-z]*: Updating dir1d1-2 -U dir1d1-2/file1-2" - # the usual for the top level - dotest cvsadm-20b "cat CVS/Repository" \ -"${AREP}\." - # the usual for 1d1mod - dotest cvsadm-20d "cat dir1d1/CVS/Repository" \ -"${AREP}mod1" - # the usual for 1d1mod copy - dotest cvsadm-20f "cat dir1d1-2/CVS/Repository" \ -"${AREP}mod1-2" - rm -rf CVS dir1d1 dir1d1-2 - - dotest cvsadm-21 "${testcvs} co 1d1mod 1d2mod" \ -"${PROG} [a-z]*: Updating dir1d1 -U dir1d1/file1 -${PROG} [a-z]*: Updating dir1d2 -U dir1d2/file2" - # the usual for the top level - dotest cvsadm-21b "cat CVS/Repository" \ -"${AREP}\." - # the usual for 1d1mod - dotest cvsadm-21d "cat dir1d1/CVS/Repository" \ -"${AREP}mod1" - # the usual for 1d2mod - dotest cvsadm-21f "cat dir1d2/CVS/Repository" \ -"${AREP}mod2/sub2" - rm -rf CVS dir1d1 dir1d2 - - dotest cvsadm-22 "${testcvs} co 1d1mod 2d1mod" \ -"${PROG} [a-z]*: Updating dir1d1 -U dir1d1/file1 -${PROG} [a-z]*: Updating dir2d1/sub2d1 -U dir2d1/sub2d1/file1" - # the usual for the top level - dotest cvsadm-22b "cat CVS/Repository" \ -"${AREP}\." - # the usual for 1d1mod - dotest cvsadm-22d "cat dir1d1/CVS/Repository" \ -"${AREP}mod1" - # the usual for 2d1mod - dotest cvsadm-22f "cat dir2d1/CVS/Repository" \ -"${AREP}CVSROOT/Emptydir" - dotest cvsadm-22h "cat dir2d1/sub2d1/CVS/Repository" \ -"${AREP}mod1" - rm -rf CVS dir1d1 dir2d1 - - dotest cvsadm-23 "${testcvs} co 1d1mod 2d2mod" \ -"${PROG} [a-z]*: Updating dir1d1 -U dir1d1/file1 -${PROG} [a-z]*: Updating dir2d2/sub2d2 -U dir2d2/sub2d2/file2" - # the usual for the top level - dotest cvsadm-23b "cat CVS/Repository" \ -"${AREP}\." - # the usual for 1d1mod - dotest cvsadm-23d "cat dir1d1/CVS/Repository" \ -"${AREP}mod1" - # the usual for 2d2mod - dotest cvsadm-23f "cat dir2d2/CVS/Repository" \ -"${AREP}CVSROOT/Emptydir" - dotest cvsadm-23h "cat dir2d2/sub2d2/CVS/Repository" \ -"${AREP}mod2/sub2" - rm -rf CVS dir1d1 dir2d2 - - - ### 1d2mod - - dotest cvsadm-24 "${testcvs} co 1d2mod 1d2mod-2" \ -"${PROG} [a-z]*: Updating dir1d2 -U dir1d2/file2 -${PROG} [a-z]*: Updating dir1d2-2 -U dir1d2-2/file2-2" - # the usual for the top level - dotest cvsadm-24b "cat CVS/Repository" \ -"${AREP}\." - # the usual for 1d2mod - dotest cvsadm-24d "cat dir1d2/CVS/Repository" \ -"${AREP}mod2/sub2" - # the usual for 1d2mod copy - dotest cvsadm-24f "cat dir1d2-2/CVS/Repository" \ -"${AREP}mod2-2/sub2-2" - rm -rf CVS dir1d2 dir1d2-2 - - dotest cvsadm-25 "${testcvs} co 1d2mod 2d1mod" \ -"${PROG} [a-z]*: Updating dir1d2 -U dir1d2/file2 -${PROG} [a-z]*: Updating dir2d1/sub2d1 -U dir2d1/sub2d1/file1" - # the usual for the top level - dotest cvsadm-25b "cat CVS/Repository" \ -"${AREP}\." - # the usual for 1d2mod - dotest cvsadm-25d "cat dir1d2/CVS/Repository" \ -"${AREP}mod2/sub2" - # the usual for 2d1mod - dotest cvsadm-25f "cat dir2d1/CVS/Repository" \ -"${AREP}CVSROOT/Emptydir" - dotest cvsadm-25h "cat dir2d1/sub2d1/CVS/Repository" \ -"${AREP}mod1" - rm -rf CVS dir1d2 dir2d1 - - dotest cvsadm-26 "${testcvs} co 1d2mod 2d2mod" \ -"${PROG} [a-z]*: Updating dir1d2 -U dir1d2/file2 -${PROG} [a-z]*: Updating dir2d2/sub2d2 -U dir2d2/sub2d2/file2" - # the usual for the top level - dotest cvsadm-26b "cat CVS/Repository" \ -"${AREP}\." - # the usual for 1d2mod - dotest cvsadm-26d "cat dir1d2/CVS/Repository" \ -"${AREP}mod2/sub2" - # the usual for 2d2mod - dotest cvsadm-26f "cat dir2d2/CVS/Repository" \ -"${AREP}CVSROOT/Emptydir" - dotest cvsadm-26h "cat dir2d2/sub2d2/CVS/Repository" \ -"${AREP}mod2/sub2" - rm -rf CVS dir1d2 dir2d2 - - - # 2d1mod - - dotest cvsadm-27 "${testcvs} co 2d1mod 2d1mod-2" \ -"${PROG} [a-z]*: Updating dir2d1/sub2d1 -U dir2d1/sub2d1/file1 -${PROG} [a-z]*: Updating dir2d1-2/sub2d1-2 -U dir2d1-2/sub2d1-2/file1-2" - # the usual for the top level - dotest cvsadm-27b "cat CVS/Repository" \ -"${AREP}\." - # the usual for 2d1mod - dotest cvsadm-27d "cat dir2d1/CVS/Repository" \ -"${AREP}CVSROOT/Emptydir" - dotest cvsadm-27f "cat dir2d1/sub2d1/CVS/Repository" \ -"${AREP}mod1" - # the usual for 2d1mod - dotest cvsadm-27h "cat dir2d1-2/CVS/Repository" \ -"${AREP}CVSROOT/Emptydir" - dotest cvsadm-27j "cat dir2d1-2/sub2d1-2/CVS/Repository" \ -"${AREP}mod1-2" - rm -rf CVS dir2d1 dir2d1-2 - - dotest cvsadm-28 "${testcvs} co 2d1mod 2d2mod" \ -"${PROG} [a-z]*: Updating dir2d1/sub2d1 -U dir2d1/sub2d1/file1 -${PROG} [a-z]*: Updating dir2d2/sub2d2 -U dir2d2/sub2d2/file2" - # the usual for the top level - dotest cvsadm-28b "cat CVS/Repository" \ -"${AREP}\." - # the usual for 2d1mod - dotest cvsadm-28d "cat dir2d1/CVS/Repository" \ -"${AREP}CVSROOT/Emptydir" - dotest cvsadm-28f "cat dir2d1/sub2d1/CVS/Repository" \ -"${AREP}mod1" - # the usual for 2d2mod - dotest cvsadm-28h "cat dir2d2/CVS/Repository" \ -"${AREP}CVSROOT/Emptydir" - dotest cvsadm-28j "cat dir2d2/sub2d2/CVS/Repository" \ -"${AREP}mod2/sub2" - rm -rf CVS dir2d1 dir2d2 - - - # 2d2mod - - dotest cvsadm-29 "${testcvs} co 2d2mod 2d2mod-2" \ -"${PROG} [a-z]*: Updating dir2d2/sub2d2 -U dir2d2/sub2d2/file2 -${PROG} [a-z]*: Updating dir2d2-2/sub2d2-2 -U dir2d2-2/sub2d2-2/file2-2" - # the usual for the top level - dotest cvsadm-29b "cat CVS/Repository" \ -"${AREP}\." - # the usual for 2d2mod - dotest cvsadm-29d "cat dir2d2/CVS/Repository" \ -"${AREP}CVSROOT/Emptydir" - dotest cvsadm-29f "cat dir2d2/sub2d2/CVS/Repository" \ -"${AREP}mod2/sub2" - # the usual for 2d2mod - dotest cvsadm-29h "cat dir2d2-2/CVS/Repository" \ -"${AREP}CVSROOT/Emptydir" - dotest cvsadm-29j "cat dir2d2-2/sub2d2-2/CVS/Repository" \ -"${AREP}mod2-2/sub2-2" - rm -rf CVS dir2d2 dir2d2-2 - - ################################################## - ## And now, all of that again using the "-d" flag - ## on the command line. - ################################################## - - dotest cvsadm-1d3 "${testcvs} co -d dir 1mod" \ -"${PROG} [a-z]*: Updating dir -U dir/file1" - dotest cvsadm-1d3b "cat CVS/Repository" \ -"${AREP}\." - dotest cvsadm-1d3d "cat dir/CVS/Repository" \ -"${AREP}mod1" - rm -rf CVS dir - - dotest cvsadm-1d4 "${testcvs} co -d dir 2mod" \ -"${PROG} [a-z]*: Updating dir -U dir/file2" - dotest cvsadm-1d4b "cat CVS/Repository" \ -"${AREP}\." - dotest cvsadm-1d4d "cat dir/CVS/Repository" \ -"${AREP}mod2/sub2" - rm -rf CVS dir - - dotest cvsadm-1d5 "${testcvs} co -d dir 1d1mod" \ -"${PROG} [a-z]*: Updating dir -U dir/file1" - dotest cvsadm-1d5b "cat CVS/Repository" \ -"${AREP}\." - dotest cvsadm-1d5d "cat dir/CVS/Repository" \ -"${AREP}mod1" - rm -rf CVS dir - - dotest cvsadm-1d6 "${testcvs} co -d dir 1d2mod" \ -"${PROG} [a-z]*: Updating dir -U dir/file2" - dotest cvsadm-1d6b "cat CVS/Repository" \ -"${AREP}\." - dotest cvsadm-1d6d "cat dir/CVS/Repository" \ -"${AREP}mod2/sub2" - rm -rf CVS dir - - dotest cvsadm-1d7 "${testcvs} co -d dir 2d1mod" \ -"${PROG} [a-z]*: Updating dir -U dir/file1" - dotest cvsadm-1d7b "cat CVS/Repository" \ -"${AREP}\." - dotest cvsadm-1d7d "cat dir/CVS/Repository" \ -"${AREP}mod1" - rm -rf CVS dir - - dotest cvsadm-1d8 "${testcvs} co -d dir 2d2mod" \ -"${PROG} [a-z]*: Updating dir -U dir/file2" - dotest cvsadm-1d8b "cat CVS/Repository" \ -"${AREP}\." - dotest cvsadm-1d8d "cat dir/CVS/Repository" \ -"${AREP}mod2/sub2" - rm -rf CVS dir - - ################################################## - ## Los Combonaciones - ################################################## - - ### 1mod - - dotest cvsadm-1d9 "${testcvs} co -d dir 1mod 1mod-2" \ -"${PROG} [a-z]*: Updating dir/1mod -U dir/1mod/file1 -${PROG} [a-z]*: Updating dir/1mod-2 -U dir/1mod-2/file1-2" - # the usual for the top level - dotest cvsadm-1d9b "cat CVS/Repository" \ -"${AREP}\." - # the usual for the dir level - dotest cvsadm-1d9d "cat dir/CVS/Repository" \ -"${AREP}\." - # the usual for 1mod - dotest cvsadm-1d9f "cat dir/1mod/CVS/Repository" \ -"${AREP}mod1" - # the usual for 1mod copy - dotest cvsadm-1d9h "cat dir/1mod-2/CVS/Repository" \ -"${AREP}mod1-2" - rm -rf CVS dir - - # 1mod 2mod redmod bluemod - dotest cvsadm-1d10 "${testcvs} co -d dir 1mod 2mod" \ -"${PROG} [a-z]*: Updating dir/1mod -U dir/1mod/file1 -${PROG} [a-z]*: Updating dir/2mod -U dir/2mod/file2" - dotest cvsadm-1d10b "cat CVS/Repository" \ -"${AREP}\." - # the usual for the dir level - dotest cvsadm-1d10d "cat dir/CVS/Repository" \ -"${AREP}\." - # the usual for 1mod - dotest cvsadm-1d10f "cat dir/1mod/CVS/Repository" \ -"${AREP}mod1" - # the usual for 2dmod - dotest cvsadm-1d10h "cat dir/2mod/CVS/Repository" \ -"${AREP}mod2/sub2" - rm -rf CVS dir - - dotest cvsadm-1d11 "${testcvs} co -d dir 1mod 1d1mod" \ -"${PROG} [a-z]*: Updating dir/1mod -U dir/1mod/file1 -${PROG} [a-z]*: Updating dir/dir1d1 -U dir/dir1d1/file1" - dotest cvsadm-1d11b "cat CVS/Repository" \ -"${AREP}\." - # the usual for the dir level - dotest cvsadm-1d11d "cat dir/CVS/Repository" \ -"${AREP}\." - # the usual for 1mod - dotest cvsadm-1d11f "cat dir/1mod/CVS/Repository" \ -"${AREP}mod1" - # the usual for 1d1mod - dotest cvsadm-1d11h "cat dir/dir1d1/CVS/Repository" \ -"${AREP}mod1" - rm -rf CVS dir - - dotest cvsadm-1d12 "${testcvs} co -d dir 1mod 1d2mod" \ -"${PROG} [a-z]*: Updating dir/1mod -U dir/1mod/file1 -${PROG} [a-z]*: Updating dir/dir1d2 -U dir/dir1d2/file2" - dotest cvsadm-1d12b "cat CVS/Repository" \ -"${AREP}\." - # the usual for the dir level - dotest cvsadm-1d12d "cat dir/CVS/Repository" \ -"${AREP}\." - # the usual for 1mod - dotest cvsadm-1d12f "cat dir/1mod/CVS/Repository" \ -"${AREP}mod1" - # the usual for 1d2mod - dotest cvsadm-1d12h "cat dir/dir1d2/CVS/Repository" \ -"${AREP}mod2/sub2" - rm -rf CVS dir - - dotest cvsadm-1d13 "${testcvs} co -d dir 1mod 2d1mod" \ -"${PROG} [a-z]*: Updating dir/1mod -U dir/1mod/file1 -${PROG} [a-z]*: Updating dir/dir2d1/sub2d1 -U dir/dir2d1/sub2d1/file1" - dotest cvsadm-1d13b "cat CVS/Repository" \ -"${AREP}\." - # the usual for the dir level - dotest cvsadm-1d13d "cat dir/CVS/Repository" \ -"${AREP}\." - # the usual for 1mod - dotest cvsadm-1d13f "cat dir/1mod/CVS/Repository" \ -"${AREP}mod1" - # the usual for 2d1mod - dotest cvsadm-1d13h "cat dir/dir2d1/CVS/Repository" \ -"${AREP}CVSROOT/Emptydir" - dotest cvsadm-1d13j "cat dir/dir2d1/sub2d1/CVS/Repository" \ -"${AREP}mod1" - rm -rf CVS dir - - dotest cvsadm-1d14 "${testcvs} co -d dir 1mod 2d2mod" \ -"${PROG} [a-z]*: Updating dir/1mod -U dir/1mod/file1 -${PROG} [a-z]*: Updating dir/dir2d2/sub2d2 -U dir/dir2d2/sub2d2/file2" - dotest cvsadm-1d14b "cat CVS/Repository" \ -"${AREP}\." - # the usual for the dir level - dotest cvsadm-1d14d "cat dir/CVS/Repository" \ -"${AREP}\." - # the usual for 1mod - dotest cvsadm-1d14f "cat dir/1mod/CVS/Repository" \ -"${AREP}mod1" - # the usual for 2d2mod - dotest cvsadm-1d14h "cat dir/dir2d2/CVS/Repository" \ -"${AREP}CVSROOT/Emptydir" - dotest cvsadm-1d14j "cat dir/dir2d2/sub2d2/CVS/Repository" \ -"${AREP}mod2/sub2" - rm -rf CVS dir - - - ### 2mod - - dotest cvsadm-1d15 "${testcvs} co -d dir 2mod 2mod-2" \ -"${PROG} [a-z]*: Updating dir/2mod -U dir/2mod/file2 -${PROG} [a-z]*: Updating dir/2mod-2 -U dir/2mod-2/file2-2" - dotest cvsadm-1d15b "cat CVS/Repository" \ -"${AREP}\." - # the usual for the dir level - dotest cvsadm-1d15d "cat dir/CVS/Repository" \ -"${AREP}\." - # the usual for 2mod - dotest cvsadm-1d15f "cat dir/2mod/CVS/Repository" \ -"${AREP}mod2/sub2" - # the usual for 2mod copy - dotest cvsadm-1d15h "cat dir/2mod-2/CVS/Repository" \ -"${AREP}mod2-2/sub2-2" - rm -rf CVS dir - - dotest cvsadm-1d16 "${testcvs} co -d dir 2mod 1d1mod" \ -"${PROG} [a-z]*: Updating dir/2mod -U dir/2mod/file2 -${PROG} [a-z]*: Updating dir/dir1d1 -U dir/dir1d1/file1" - dotest cvsadm-1d16b "cat CVS/Repository" \ -"${AREP}\." - # the usual for the dir level - dotest cvsadm-1d16d "cat dir/CVS/Repository" \ -"${AREP}\." - # the usual for 2mod - dotest cvsadm-1d16f "cat dir/2mod/CVS/Repository" \ -"${AREP}mod2/sub2" - # the usual for 1d1mod - dotest cvsadm-1d16h "cat dir/dir1d1/CVS/Repository" \ -"${AREP}mod1" - rm -rf CVS dir - - dotest cvsadm-1d17 "${testcvs} co -d dir 2mod 1d2mod" \ -"${PROG} [a-z]*: Updating dir/2mod -U dir/2mod/file2 -${PROG} [a-z]*: Updating dir/dir1d2 -U dir/dir1d2/file2" - dotest cvsadm-1d17b "cat CVS/Repository" \ -"${AREP}\." - # the usual for the dir level - dotest cvsadm-1d17d "cat dir/CVS/Repository" \ -"${AREP}\." - # the usual for 2mod - dotest cvsadm-1d17f "cat dir/2mod/CVS/Repository" \ -"${AREP}mod2/sub2" - # the usual for 1d2mod - dotest cvsadm-1d17h "cat dir/dir1d2/CVS/Repository" \ -"${AREP}mod2/sub2" - rm -rf CVS dir - - dotest cvsadm-1d18 "${testcvs} co -d dir 2mod 2d1mod" \ -"${PROG} [a-z]*: Updating dir/2mod -U dir/2mod/file2 -${PROG} [a-z]*: Updating dir/dir2d1/sub2d1 -U dir/dir2d1/sub2d1/file1" - dotest cvsadm-1d18b "cat CVS/Repository" \ -"${AREP}\." - # the usual for the dir level - dotest cvsadm-1d18d "cat dir/CVS/Repository" \ -"${AREP}\." - # the usual for 2mod - dotest cvsadm-1d18f "cat dir/2mod/CVS/Repository" \ -"${AREP}mod2/sub2" - # the usual for 2d1mod - dotest cvsadm-1d18h "cat dir/dir2d1/CVS/Repository" \ -"${AREP}CVSROOT/Emptydir" - dotest cvsadm-1d18j "cat dir/dir2d1/sub2d1/CVS/Repository" \ -"${AREP}mod1" - rm -rf CVS dir - - dotest cvsadm-1d19 "${testcvs} co -d dir 2mod 2d2mod" \ -"${PROG} [a-z]*: Updating dir/2mod -U dir/2mod/file2 -${PROG} [a-z]*: Updating dir/dir2d2/sub2d2 -U dir/dir2d2/sub2d2/file2" - dotest cvsadm-1d19b "cat CVS/Repository" \ -"${AREP}\." - # the usual for the dir level - dotest cvsadm-1d19d "cat dir/CVS/Repository" \ -"${AREP}\." - # the usual for 2mod - dotest cvsadm-1d19f "cat dir/2mod/CVS/Repository" \ -"${AREP}mod2/sub2" - # the usual for 2d2mod - dotest cvsadm-1d19h "cat dir/dir2d2/CVS/Repository" \ -"${AREP}CVSROOT/Emptydir" - dotest cvsadm-1d19j "cat dir/dir2d2/sub2d2/CVS/Repository" \ -"${AREP}mod2/sub2" - rm -rf CVS dir - - - ### 1d1mod - - dotest cvsadm-1d20 "${testcvs} co -d dir 1d1mod 1d1mod-2" \ -"${PROG} [a-z]*: Updating dir/dir1d1 -U dir/dir1d1/file1 -${PROG} [a-z]*: Updating dir/dir1d1-2 -U dir/dir1d1-2/file1-2" - dotest cvsadm-1d20b "cat CVS/Repository" \ -"${AREP}\." - # the usual for the dir level - dotest cvsadm-1d20d "cat dir/CVS/Repository" \ -"${AREP}\." - # the usual for 1d1mod - dotest cvsadm-1d20f "cat dir/dir1d1/CVS/Repository" \ -"${AREP}mod1" - # the usual for 1d1mod copy - dotest cvsadm-1d20h "cat dir/dir1d1-2/CVS/Repository" \ -"${AREP}mod1-2" - rm -rf CVS dir - - dotest cvsadm-1d21 "${testcvs} co -d dir 1d1mod 1d2mod" \ -"${PROG} [a-z]*: Updating dir/dir1d1 -U dir/dir1d1/file1 -${PROG} [a-z]*: Updating dir/dir1d2 -U dir/dir1d2/file2" - dotest cvsadm-1d21b "cat CVS/Repository" \ -"${AREP}\." - # the usual for the dir level - dotest cvsadm-1d21d "cat dir/CVS/Repository" \ -"${AREP}\." - # the usual for 1d1mod - dotest cvsadm-1d21f "cat dir/dir1d1/CVS/Repository" \ -"${AREP}mod1" - # the usual for 1d2mod - dotest cvsadm-1d21h "cat dir/dir1d2/CVS/Repository" \ -"${AREP}mod2/sub2" - rm -rf CVS dir - - dotest cvsadm-1d22 "${testcvs} co -d dir 1d1mod 2d1mod" \ -"${PROG} [a-z]*: Updating dir/dir1d1 -U dir/dir1d1/file1 -${PROG} [a-z]*: Updating dir/dir2d1/sub2d1 -U dir/dir2d1/sub2d1/file1" - dotest cvsadm-1d22b "cat CVS/Repository" \ -"${AREP}\." - # the usual for the dir level - dotest cvsadm-1d22d "cat dir/CVS/Repository" \ -"${AREP}\." - # the usual for 1d1mod - dotest cvsadm-1d22f "cat dir/dir1d1/CVS/Repository" \ -"${AREP}mod1" - # the usual for 2d1mod - dotest cvsadm-1d22h "cat dir/dir2d1/CVS/Repository" \ -"${AREP}CVSROOT/Emptydir" - dotest cvsadm-1d22j "cat dir/dir2d1/sub2d1/CVS/Repository" \ -"${AREP}mod1" - rm -rf CVS dir - - dotest cvsadm-1d23 "${testcvs} co -d dir 1d1mod 2d2mod" \ -"${PROG} [a-z]*: Updating dir/dir1d1 -U dir/dir1d1/file1 -${PROG} [a-z]*: Updating dir/dir2d2/sub2d2 -U dir/dir2d2/sub2d2/file2" - dotest cvsadm-1d23b "cat CVS/Repository" \ -"${AREP}\." - # the usual for the dir level - dotest cvsadm-1d23d "cat dir/CVS/Repository" \ -"${AREP}\." - # the usual for 1d1mod - dotest cvsadm-1d23f "cat dir/dir1d1/CVS/Repository" \ -"${AREP}mod1" - # the usual for 2d2mod - dotest cvsadm-1d23h "cat dir/dir2d2/CVS/Repository" \ -"${AREP}CVSROOT/Emptydir" - dotest cvsadm-1d23j "cat dir/dir2d2/sub2d2/CVS/Repository" \ -"${AREP}mod2/sub2" - rm -rf CVS dir - - - ### 1d2mod - - dotest cvsadm-1d24 "${testcvs} co -d dir 1d2mod 1d2mod-2" \ -"${PROG} [a-z]*: Updating dir/dir1d2 -U dir/dir1d2/file2 -${PROG} [a-z]*: Updating dir/dir1d2-2 -U dir/dir1d2-2/file2-2" - dotest cvsadm-1d24b "cat CVS/Repository" \ -"${AREP}\." - # the usual for the dir level - dotest cvsadm-1d24d "cat dir/CVS/Repository" \ -"${AREP}\." - # the usual for 1d2mod - dotest cvsadm-1d24f "cat dir/dir1d2/CVS/Repository" \ -"${AREP}mod2/sub2" - # the usual for 1d2mod copy - dotest cvsadm-1d24h "cat dir/dir1d2-2/CVS/Repository" \ -"${AREP}mod2-2/sub2-2" - rm -rf CVS dir - - dotest cvsadm-1d25 "${testcvs} co -d dir 1d2mod 2d1mod" \ -"${PROG} [a-z]*: Updating dir/dir1d2 -U dir/dir1d2/file2 -${PROG} [a-z]*: Updating dir/dir2d1/sub2d1 -U dir/dir2d1/sub2d1/file1" - dotest cvsadm-1d25b "cat CVS/Repository" \ -"${AREP}\." - # the usual for the dir level - dotest cvsadm-1d25d "cat dir/CVS/Repository" \ -"${AREP}\." - # the usual for 1d2mod - dotest cvsadm-1d25f "cat dir/dir1d2/CVS/Repository" \ -"${AREP}mod2/sub2" - # the usual for 2d1mod - dotest cvsadm-1d25h "cat dir/dir2d1/CVS/Repository" \ -"${AREP}CVSROOT/Emptydir" - dotest cvsadm-1d25j "cat dir/dir2d1/sub2d1/CVS/Repository" \ -"${AREP}mod1" - rm -rf CVS dir - - dotest cvsadm-1d26 "${testcvs} co -d dir 1d2mod 2d2mod" \ -"${PROG} [a-z]*: Updating dir/dir1d2 -U dir/dir1d2/file2 -${PROG} [a-z]*: Updating dir/dir2d2/sub2d2 -U dir/dir2d2/sub2d2/file2" - dotest cvsadm-1d26b "cat CVS/Repository" \ -"${AREP}\." - # the usual for the dir level - dotest cvsadm-1d26d "cat dir/CVS/Repository" \ -"${AREP}\." - # the usual for 1d2mod - dotest cvsadm-1d26f "cat dir/dir1d2/CVS/Repository" \ -"${AREP}mod2/sub2" - # the usual for 2d2mod - dotest cvsadm-1d26h "cat dir/dir2d2/CVS/Repository" \ -"${AREP}CVSROOT/Emptydir" - dotest cvsadm-1d26j "cat dir/dir2d2/sub2d2/CVS/Repository" \ -"${AREP}mod2/sub2" - rm -rf CVS dir - - - # 2d1mod - - dotest cvsadm-1d27 "${testcvs} co -d dir 2d1mod 2d1mod-2" \ -"${PROG} [a-z]*: Updating dir/dir2d1/sub2d1 -U dir/dir2d1/sub2d1/file1 -${PROG} [a-z]*: Updating dir/dir2d1-2/sub2d1-2 -U dir/dir2d1-2/sub2d1-2/file1-2" - dotest cvsadm-1d27b "cat CVS/Repository" \ -"${AREP}\." - # the usual for the dir level - dotest cvsadm-1d27d "cat dir/CVS/Repository" \ -"${AREP}\." - # the usual for 2d1mod - dotest cvsadm-1d27f "cat dir/dir2d1/CVS/Repository" \ -"${AREP}CVSROOT/Emptydir" - dotest cvsadm-1d27h "cat dir/dir2d1/sub2d1/CVS/Repository" \ -"${AREP}mod1" - # the usual for 2d1mod - dotest cvsadm-1d27j "cat dir/dir2d1-2/CVS/Repository" \ -"${AREP}CVSROOT/Emptydir" - dotest cvsadm-1d27l "cat dir/dir2d1-2/sub2d1-2/CVS/Repository" \ -"${AREP}mod1-2" - rm -rf CVS dir - - dotest cvsadm-1d28 "${testcvs} co -d dir 2d1mod 2d2mod" \ -"${PROG} [a-z]*: Updating dir/dir2d1/sub2d1 -U dir/dir2d1/sub2d1/file1 -${PROG} [a-z]*: Updating dir/dir2d2/sub2d2 -U dir/dir2d2/sub2d2/file2" - dotest cvsadm-1d28b "cat CVS/Repository" \ -"${AREP}\." - # the usual for the dir level - dotest cvsadm-1d28d "cat dir/CVS/Repository" \ -"${AREP}\." - # the usual for 2d1mod - dotest cvsadm-1d28f "cat dir/dir2d1/CVS/Repository" \ -"${AREP}CVSROOT/Emptydir" - dotest cvsadm-1d28h "cat dir/dir2d1/sub2d1/CVS/Repository" \ -"${AREP}mod1" - # the usual for 2d2mod - dotest cvsadm-1d28j "cat dir/dir2d2/CVS/Repository" \ -"${AREP}CVSROOT/Emptydir" - dotest cvsadm-1d28l "cat dir/dir2d2/sub2d2/CVS/Repository" \ -"${AREP}mod2/sub2" - rm -rf CVS dir - - - # 2d2mod - - dotest cvsadm-1d29 "${testcvs} co -d dir 2d2mod 2d2mod-2" \ -"${PROG} [a-z]*: Updating dir/dir2d2/sub2d2 -U dir/dir2d2/sub2d2/file2 -${PROG} [a-z]*: Updating dir/dir2d2-2/sub2d2-2 -U dir/dir2d2-2/sub2d2-2/file2-2" - dotest cvsadm-1d29b "cat CVS/Repository" \ -"${AREP}\." - # the usual for the dir level - dotest cvsadm-1d29d "cat dir/CVS/Repository" \ -"${AREP}\." - # the usual for 2d2mod - dotest cvsadm-1d29f "cat dir/dir2d2/CVS/Repository" \ -"${AREP}CVSROOT/Emptydir" - dotest cvsadm-1d29h "cat dir/dir2d2/sub2d2/CVS/Repository" \ -"${AREP}mod2/sub2" - # the usual for 2d2mod - dotest cvsadm-1d29j "cat dir/dir2d2-2/CVS/Repository" \ -"${AREP}CVSROOT/Emptydir" - dotest cvsadm-1d29l "cat dir/dir2d2-2/sub2d2-2/CVS/Repository" \ -"${AREP}mod2-2/sub2-2" - rm -rf CVS dir - - ################################################## - ## And now, some of that again using the "-d" flag - ## on the command line, but use a longer path. - ################################################## - - dotest cvsadm-2d3 "${testcvs} co -d dir/dir2 1mod" \ -"${PROG} [a-z]*: Updating dir/dir2 -U dir/dir2/file1" - dotest cvsadm-2d3b "cat CVS/Repository" \ -"${AREP}\." - dotest cvsadm-2d3d "cat dir/CVS/Repository" \ -"${AREP}CVSROOT/Emptydir" - dotest cvsadm-2d3f "cat dir/dir2/CVS/Repository" \ -"${AREP}mod1" - rm -rf CVS dir - - dotest cvsadm-2d4 "${testcvs} co -d dir/dir2 2mod" \ -"${PROG} [a-z]*: Updating dir/dir2 -U dir/dir2/file2" - dotest cvsadm-2d4b "cat CVS/Repository" \ -"${AREP}\." - dotest cvsadm-2d4d "cat dir/CVS/Repository" \ -"${AREP}CVSROOT/Emptydir" - dotest cvsadm-2d4f "cat dir/dir2/CVS/Repository" \ -"${AREP}mod2/sub2" - rm -rf CVS dir - - dotest cvsadm-2d5 "${testcvs} co -d dir/dir2 1d1mod" \ -"${PROG} [a-z]*: Updating dir/dir2 -U dir/dir2/file1" - dotest cvsadm-2d5b "cat CVS/Repository" \ -"${AREP}\." - dotest cvsadm-2d5d "cat dir/CVS/Repository" \ -"${AREP}CVSROOT/Emptydir" - dotest cvsadm-2d5f "cat dir/dir2/CVS/Repository" \ -"${AREP}mod1" - rm -rf CVS dir - - dotest cvsadm-2d6 "${testcvs} co -d dir/dir2 1d2mod" \ -"${PROG} [a-z]*: Updating dir/dir2 -U dir/dir2/file2" - dotest cvsadm-2d6b "cat CVS/Repository" \ -"${AREP}\." - dotest cvsadm-2d6d "cat dir/CVS/Repository" \ -"${AREP}CVSROOT/Emptydir" - dotest cvsadm-2d6f "cat dir/dir2/CVS/Repository" \ -"${AREP}mod2/sub2" - rm -rf CVS dir - - dotest cvsadm-2d7 "${testcvs} co -d dir/dir2 2d1mod" \ -"${PROG} [a-z]*: Updating dir/dir2 -U dir/dir2/file1" - dotest cvsadm-2d7b "cat CVS/Repository" \ -"${AREP}\." - dotest cvsadm-2d7d "cat dir/CVS/Repository" \ -"${AREP}CVSROOT/Emptydir" - dotest cvsadm-2d7f "cat dir/dir2/CVS/Repository" \ -"${AREP}mod1" - rm -rf CVS dir - - dotest cvsadm-2d8 "${testcvs} co -d dir/dir2 2d2mod" \ -"${PROG} [a-z]*: Updating dir/dir2 -U dir/dir2/file2" - dotest cvsadm-2d8b "cat CVS/Repository" \ -"${AREP}\." - dotest cvsadm-2d8d "cat dir/CVS/Repository" \ -"${AREP}CVSROOT/Emptydir" - dotest cvsadm-2d8f "cat dir/dir2/CVS/Repository" \ -"${AREP}mod2/sub2" - rm -rf CVS dir - - ################################################## - ## And now, a few of those tests revisited to - ## test the behavior of the -N flag. - ################################################## - - dotest cvsadm-N3 "${testcvs} co -N 1mod" \ -"${PROG} [a-z]*: Updating 1mod -U 1mod/file1" - dotest cvsadm-N3b "cat CVS/Repository" \ -"${AREP}\." - dotest cvsadm-N3d "cat 1mod/CVS/Repository" \ -"${AREP}mod1" - rm -rf CVS 1mod - - dotest cvsadm-N4 "${testcvs} co -N 2mod" \ -"${PROG} [a-z]*: Updating 2mod -U 2mod/file2" - dotest cvsadm-N4b "cat CVS/Repository" \ -"${AREP}\." - dotest cvsadm-N4d "cat 2mod/CVS/Repository" \ -"${AREP}mod2/sub2" - rm -rf CVS 2mod - - dotest cvsadm-N5 "${testcvs} co -N 1d1mod" \ -"${PROG} [a-z]*: Updating dir1d1 -U dir1d1/file1" - dotest cvsadm-N5b "cat CVS/Repository" \ -"${AREP}\." - dotest cvsadm-N5d "cat dir1d1/CVS/Repository" \ -"${AREP}mod1" - rm -rf CVS dir1d1 - - dotest cvsadm-N6 "${testcvs} co -N 1d2mod" \ -"${PROG} [a-z]*: Updating dir1d2 -U dir1d2/file2" - dotest cvsadm-N6b "cat CVS/Repository" \ -"${AREP}\." - dotest cvsadm-N6d "cat dir1d2/CVS/Repository" \ -"${AREP}mod2/sub2" - rm -rf CVS dir1d2 - - dotest cvsadm-N7 "${testcvs} co -N 2d1mod" \ -"${PROG} [a-z]*: Updating dir2d1/sub2d1 -U dir2d1/sub2d1/file1" - dotest cvsadm-N7b "cat CVS/Repository" \ -"${AREP}\." - dotest cvsadm-N7d "cat dir2d1/CVS/Repository" \ -"${AREP}CVSROOT/Emptydir" - dotest cvsadm-N7f "cat dir2d1/sub2d1/CVS/Repository" \ -"${AREP}mod1" - rm -rf CVS dir2d1 - - dotest cvsadm-N8 "${testcvs} co -N 2d2mod" \ -"${PROG} [a-z]*: Updating dir2d2/sub2d2 -U dir2d2/sub2d2/file2" - dotest cvsadm-N8b "cat CVS/Repository" \ -"${AREP}\." - dotest cvsadm-N8d "cat dir2d2/CVS/Repository" \ -"${AREP}CVSROOT/Emptydir" - dotest cvsadm-N8f "cat dir2d2/sub2d2/CVS/Repository" \ -"${AREP}mod2/sub2" - rm -rf CVS dir2d2 - - ## the ones in one-deep directories - - dotest cvsadm-N1d3 "${testcvs} co -N -d dir 1mod" \ -"${PROG} [a-z]*: Updating dir/1mod -U dir/1mod/file1" - dotest cvsadm-N1d3b "cat CVS/Repository" \ -"${AREP}\." - dotest cvsadm-N1d3d "cat dir/CVS/Repository" \ -"${AREP}\." - dotest cvsadm-N1d3f "cat dir/1mod/CVS/Repository" \ -"${AREP}mod1" - rm -rf CVS dir - - dotest cvsadm-N1d4 "${testcvs} co -N -d dir 2mod" \ -"${PROG} [a-z]*: Updating dir/2mod -U dir/2mod/file2" - dotest cvsadm-N1d4b "cat CVS/Repository" \ -"${AREP}\." - dotest cvsadm-N1d4d "cat dir/CVS/Repository" \ -"${AREP}\." - dotest cvsadm-N1d4f "cat dir/2mod/CVS/Repository" \ -"${AREP}mod2/sub2" - rm -rf CVS dir - - dotest cvsadm-N1d5 "${testcvs} co -N -d dir 1d1mod" \ -"${PROG} [a-z]*: Updating dir/dir1d1 -U dir/dir1d1/file1" - dotest cvsadm-N1d5b "cat CVS/Repository" \ -"${AREP}\." - dotest cvsadm-N1d5d "cat dir/CVS/Repository" \ -"${AREP}\." - dotest cvsadm-N1d5d "cat dir/dir1d1/CVS/Repository" \ -"${AREP}mod1" - rm -rf CVS dir - - dotest cvsadm-N1d6 "${testcvs} co -N -d dir 1d2mod" \ -"${PROG} [a-z]*: Updating dir/dir1d2 -U dir/dir1d2/file2" - dotest cvsadm-N1d6b "cat CVS/Repository" \ -"${AREP}\." - dotest cvsadm-N1d6d "cat dir/CVS/Repository" \ -"${AREP}\." - dotest cvsadm-N1d6f "cat dir/dir1d2/CVS/Repository" \ -"${AREP}mod2/sub2" - rm -rf CVS dir - - dotest cvsadm-N1d7 "${testcvs} co -N -d dir 2d1mod" \ -"${PROG} [a-z]*: Updating dir/dir2d1/sub2d1 -U dir/dir2d1/sub2d1/file1" - dotest cvsadm-N1d7b "cat CVS/Repository" \ -"${AREP}\." - dotest cvsadm-N1d7d "cat dir/CVS/Repository" \ -"${AREP}\." - dotest cvsadm-N1d7f "cat dir/dir2d1/CVS/Repository" \ -"${AREP}CVSROOT/Emptydir" - dotest cvsadm-N1d7h "cat dir/dir2d1/sub2d1/CVS/Repository" \ -"${AREP}mod1" - rm -rf CVS dir - - dotest cvsadm-N1d8 "${testcvs} co -N -d dir 2d2mod" \ -"${PROG} [a-z]*: Updating dir/dir2d2/sub2d2 -U dir/dir2d2/sub2d2/file2" - dotest cvsadm-N1d8b "cat CVS/Repository" \ -"${AREP}\." - dotest cvsadm-N1d8d "cat dir/CVS/Repository" \ -"${AREP}\." - dotest cvsadm-N1d8d "cat dir/dir2d2/CVS/Repository" \ -"${AREP}CVSROOT/Emptydir" - dotest cvsadm-N1d8d "cat dir/dir2d2/sub2d2/CVS/Repository" \ -"${AREP}mod2/sub2" - rm -rf CVS dir - - ## the ones in two-deep directories - - dotest cvsadm-N2d3 "${testcvs} co -N -d dir/dir2 1mod" \ -"${PROG} [a-z]*: Updating dir/dir2/1mod -U dir/dir2/1mod/file1" - dotest cvsadm-N2d3b "cat CVS/Repository" \ -"${AREP}\." - dotest cvsadm-N2d3d "cat dir/CVS/Repository" \ -"${AREP}CVSROOT/Emptydir" - dotest cvsadm-N2d3f "cat dir/dir2/CVS/Repository" \ -"${AREP}\." - dotest cvsadm-N2d3h "cat dir/dir2/1mod/CVS/Repository" \ -"${AREP}mod1" - rm -rf CVS dir - - dotest cvsadm-N2d4 "${testcvs} co -N -d dir/dir2 2mod" \ -"${PROG} [a-z]*: Updating dir/dir2/2mod -U dir/dir2/2mod/file2" - dotest cvsadm-N2d4b "cat CVS/Repository" \ -"${AREP}\." - dotest cvsadm-N2d4d "cat dir/CVS/Repository" \ -"${AREP}CVSROOT/Emptydir" - dotest cvsadm-N2d4f "cat dir/dir2/CVS/Repository" \ -"${AREP}\." - dotest cvsadm-N2d4h "cat dir/dir2/2mod/CVS/Repository" \ -"${AREP}mod2/sub2" - rm -rf CVS dir - - dotest cvsadm-N2d5 "${testcvs} co -N -d dir/dir2 1d1mod" \ -"${PROG} [a-z]*: Updating dir/dir2/dir1d1 -U dir/dir2/dir1d1/file1" - dotest cvsadm-N2d5b "cat CVS/Repository" \ -"${AREP}\." - dotest cvsadm-N2d5d "cat dir/CVS/Repository" \ -"${AREP}CVSROOT/Emptydir" - dotest cvsadm-N2d5f "cat dir/dir2/CVS/Repository" \ -"${AREP}\." - dotest cvsadm-N2d5h "cat dir/dir2/dir1d1/CVS/Repository" \ -"${AREP}mod1" - rm -rf CVS dir - - dotest cvsadm-N2d6 "${testcvs} co -N -d dir/dir2 1d2mod" \ -"${PROG} [a-z]*: Updating dir/dir2/dir1d2 -U dir/dir2/dir1d2/file2" - dotest cvsadm-N2d6b "cat CVS/Repository" \ -"${AREP}\." - dotest cvsadm-N2d6d "cat dir/CVS/Repository" \ -"${AREP}CVSROOT/Emptydir" - dotest cvsadm-N2d6f "cat dir/dir2/CVS/Repository" \ -"${AREP}\." - dotest cvsadm-N2d6h "cat dir/dir2/dir1d2/CVS/Repository" \ -"${AREP}mod2/sub2" - rm -rf CVS dir - - dotest cvsadm-N2d7 "${testcvs} co -N -d dir/dir2 2d1mod" \ -"${PROG} [a-z]*: Updating dir/dir2/dir2d1/sub2d1 -U dir/dir2/dir2d1/sub2d1/file1" - dotest cvsadm-N2d7b "cat CVS/Repository" \ -"${AREP}\." - dotest cvsadm-N2d7d "cat dir/CVS/Repository" \ -"${AREP}CVSROOT/Emptydir" - dotest cvsadm-N2d7f "cat dir/dir2/CVS/Repository" \ -"${AREP}\." - dotest cvsadm-N2d7f "cat dir/dir2/dir2d1/CVS/Repository" \ -"${AREP}CVSROOT/Emptydir" - dotest cvsadm-N2d7h "cat dir/dir2/dir2d1/sub2d1/CVS/Repository" \ -"${AREP}mod1" - rm -rf CVS dir - - dotest cvsadm-N2d8 "${testcvs} co -N -d dir/dir2 2d2mod" \ -"${PROG} [a-z]*: Updating dir/dir2/dir2d2/sub2d2 -U dir/dir2/dir2d2/sub2d2/file2" - dotest cvsadm-N2d8b "cat CVS/Repository" \ -"${AREP}\." - dotest cvsadm-N2d8d "cat dir/CVS/Repository" \ -"${AREP}CVSROOT/Emptydir" - dotest cvsadm-N2d8f "cat dir/dir2/CVS/Repository" \ -"${AREP}\." - dotest cvsadm-N2d8h "cat dir/dir2/dir2d2/CVS/Repository" \ -"${AREP}CVSROOT/Emptydir" - dotest cvsadm-N2d8j "cat dir/dir2/dir2d2/sub2d2/CVS/Repository" \ -"${AREP}mod2/sub2" - rm -rf CVS dir - - ################################################## - ## That's enough of that, thank you very much. - ################################################## - - # remove our junk - cd .. - rm -rf 1 - rm -rf ${CVSROOT_DIRNAME}/1mod - rm -rf ${CVSROOT_DIRNAME}/1mod-2 - rm -rf ${CVSROOT_DIRNAME}/2mod - rm -rf ${CVSROOT_DIRNAME}/2mod-2 - ;; - diffmerge1) # Make sure CVS can merge correctly in circumstances where it # used to mess up (due to a bug which existed in diffutils 2.7 @@ -13439,6 +14027,9 @@ d472 12 dotest diffmerge2_diff \ "${testcvs} diff -r Review_V1p3 sgrid.h" '' + cd .. + rm -rf diffmerge2 + rm -rf ${CVSROOT_DIRNAME}/diffmerge2 ;; *) |