diff options
Diffstat (limited to 'contrib/cvs/src/sanity.sh')
-rwxr-xr-x | contrib/cvs/src/sanity.sh | 7176 |
1 files changed, 5338 insertions, 1838 deletions
diff --git a/contrib/cvs/src/sanity.sh b/contrib/cvs/src/sanity.sh index c6e504e..015d83e 100755 --- a/contrib/cvs/src/sanity.sh +++ b/contrib/cvs/src/sanity.sh @@ -19,17 +19,40 @@ # Original Author: K. Richard Pixley # usage: +usage () +{ + echo "Usage: `basename $0` --help" + echo "Usage: `basename $0` [-klr] [-f FROM-TEST] [-h HOSTNAME] CVS-TO-TEST [TESTS-TO-RUN...]" +} + exit_usage () { - echo "Usage: `basename $0` [-kr] [-f FROM-TEST] CVS-TO-TEST [TESTS-TO-RUN...]" 1>&2 + usage 1>&2 + exit 2 +} + +exit_help () +{ + usage + echo + echo "-H|--help display this text" + echo "-l|--link-root" + echo " test CVS using a symlink to a real CVSROOT" + echo "-r|--remote test remote instead of local cvs" + echo "-h HOSTNAME Use :ext:HOSTNAME to run remote tests rather than" + echo " :fork:. Implies --remote and assumes that \$TESTDIR" + echo " resolves to the same directory on both the client and" + echo " the server." + echo "-k|--keep try to keep directories created by individual tests" + echo " around, exiting after the first test which supports" + echo " --keep" + echo "-f FROM-TEST run TESTS-TO-RUN, skipping all tests in the list before" + echo " FROM-TEST" + echo + echo "CVS-TO-TEST the path to the CVS executable to be tested" + echo "TESTS-TO-RUN the names of the tests to run (defaults to all tests)" exit 2 } -# -r test remote instead of local cvs. -# -k try to keep directories created by individual tests around -# -f FROM-TEST run TESTS-TO-RUN, skipping all tests in the list before -# FROM-TEST -# -# TESTS-TO-RUN are the names of the tests to run; if omitted default to all tests. # See TODO list at end of file. @@ -53,20 +76,60 @@ export LC_ALL # read our options # unset fromtest +unset remotehost keep=false +linkroot=false remote=false -while getopts f:kr option ; do +while getopts f:h:Hklr-: option ; do + # convert the long opts to short opts + if test x$option = x-; then + case "$OPTARG" in + [hH]|[hH][eE]|[hH][eE][lL]|[hH][eE][lL][pP]) + option=H; + OPTARG= + ;; + [kK]|[kK][eE]|[kK][eE][eE]|[kK][eE][eE][pP]) + option=k; + OPTARG= + ;; + l|li|lin|link|link-|link-r]|link-ro|link-roo|link-root) + option=l; + OPTARG= + ;; + [rR]|[rR][eE]|[rR][eE][mM]|[rR][eE][mM][oO]|[rR][eE][mM][oO][tT]|[rR][eE][mM][oO][tT][eE]) + option=k; + OPTARG= + ;; + *) + option=\? + OPTARG= + esac + fi case "$option" in f) fromtest="$OPTARG" ;; + h) + # Set a remotehost to run the remote tests on via :ext: + # Implies `-r' and assumes that $TESTDIR resolves to the same + # directory on the client and the server. + remotehost="$OPTARG" + remote=: + ;; + H) + exit_help + ;; k) - # The -k (keep) option will eventually cause all the tests to leave around the - # contents of the /tmp directory; right now only some implement it. Not - # originally intended to be useful with more than one test, but this should work - # if each test uses a uniquely named dir (use the name of the test). + # The -k (keep) option will eventually cause all the tests to + # leave around the contents of the /tmp directory; right now only + # some implement it. Not originally intended to be useful with + # more than one test, but this should work if each test uses a + # uniquely named dir (use the name of the test). keep=: ;; + l) + linkroot=: + ;; r) remote=: ;; @@ -97,6 +160,16 @@ case $1 in esac shift +# If $remotehost is set, warn if $TESTDIR isn't since we are pretty sure +# that its default value of `/tmp/cvs-sanity' will not resolve to the same +# directory on two different machines. +if test -n "$remotehost" && test -z "$TESTDIR"; then + echo "WARNING: CVS server hostname is set and \$TESTDIR is not. If" >&2 + echo "$remotehost is not the local machine, then it is unlikely that" >&2 + echo "the default value assigned to \$TESTDIR will resolve to the same" >&2 + echo "directory on both this client and the CVS server." >&2 +fi + ### @@ -109,7 +182,8 @@ shift echo 'This test should produce no other output than this message, and a final "OK".' echo '(Note that the test can take an hour or more to run and periodically stops' echo 'for as long as one minute. Do not assume there is a problem just because' -echo 'nothing seems to happen for a long time.)' +echo 'nothing seems to happen for a long time. If you cannot live without' +echo "running status, try the command: \`tail -f check.log' from another window.)" # Regexp to match what CVS will call itself in output that it prints. # FIXME: we don't properly quote this--if the name contains . we'll @@ -132,6 +206,11 @@ tempname="[-a-zA-Z0-9/.%_]*" RFCDATE="[a-zA-Z0-9 ][a-zA-Z0-9 ]* [0-9:][0-9:]* -0000" RFCDATE_EPOCH="1 Jan 1970 00:00:00 -0000" +# Regexp to match a date in standard Unix format as used by rdiff +# FIXCVS: There's no reason for rdiff to use a different date format +# than diff does +DATE="[a-zA-Z]* [a-zA-Z]* [ 1-3][0-9] [0-9:]* [0-9]*" + # On cygwin32, we may not have /bin/sh. if test -r /bin/sh; then TESTSHELL="/bin/sh" @@ -160,6 +239,12 @@ if test -f check.log; then mv check.log check.plog fi +# Create the log file so check.log can be tailed almost immediately after +# this script is started. Otherwise it can take up to a minute or two before +# the log file gets created when $remotehost is specified on some systems, +# which makes for a lot of failed `tail -f' attempts. +touch check.log + # The default value of /tmp/cvs-sanity for TESTDIR is dubious, # because it loses if two people/scripts try to run the tests # at the same time. Some possible solutions: @@ -176,8 +261,18 @@ fi # So this would be lost if everything was `pwd`-based. I suppose # if we wanted to get baroque we could start making symlinks # to ensure the two are different. -tmp=`(cd /tmp; /bin/pwd || pwd) 2>/dev/null` -: ${TMPDIR=$tmp} +: ${CVS_RSH=rsh}; export CVS_RSH +if test -n "$remotehost"; then + # We need to set $tmp on the server since $TMPDIR is compared against + # messages generated by the server. + tmp=`$CVS_RSH $remotehost 'cd /tmp; /bin/pwd || pwd' 2>/dev/null` + if test $? != 0; then + echo "$CVS_RSH $remotehost failed." >&2 + exit 1 + fi +else + tmp=`(cd /tmp; /bin/pwd || pwd) 2>/dev/null` +fi # Now: # 1) Set TESTDIR if it's not set already @@ -197,14 +292,33 @@ fi # wouldn't appreciate that. mkdir ${TESTDIR} || exit 1 cd ${TESTDIR} || exit 1 -TESTDIR=`(/bin/pwd || pwd) 2>/dev/null` # Ensure $TESTDIR is absolute +if echo "${TESTDIR}" |grep '^[^/]'; then + # Don't resolve this unless we have to. This keeps symlinks intact. This + # is important at least when testing using -h $remotehost, because the same + # value for $TESTDIR must resolve to the same directory on the client and + # the server and we likely used Samba, and possibly symlinks, to do this. + TESTDIR=`(/bin/pwd || pwd) 2>/dev/null` +fi + if test -z "${TESTDIR}" || echo "${TESTDIR}" |grep '^[^/]'; then echo "Unable to resolve TESTDIR to an absolute directory." >&2 exit 1 fi cd ${TESTDIR} +# Now set $TMPDIR if the user hasn't overridden it. +# +# We use a $TMPDIR under $TESTDIR by default so that two tests may be run at +# the same time without bumping heads without requiring the user to specify +# more than $TESTDIR. See the test for leftover cvs-serv* directories near the +# end of this script at the end of "The big loop". +: ${TMPDIR=$TESTDIR/tmp} +export TMPDIR +if test -d $TMPDIR; then :; else + mkdir $TMPDIR +fi + # Make sure various tools work the way we expect, or try to find # versions that do. : ${AWK=awk} @@ -293,8 +407,8 @@ b' : 'a c' >/dev/null; then EXPR=`find_tool expr` if test -z "$EXPR" ; then - echo 'Warning: you are using a version of expr which does not correctly' - echo 'match multi-line patterns. Some tests may spuriously pass.' + echo 'Warning: you are using a version of expr that does not correctly' + echo 'match multi-line patterns. Some tests may spuriously pass or fail.' echo 'You may wish to make sure GNU expr is in your path.' EXPR=expr fi @@ -312,8 +426,8 @@ if $EXPR "`cat ${TESTDIR}/bar`" : "`cat ${TESTDIR}/bar`" >/dev/null; then else EXPR=`find_tool expr` if test -z "$EXPR" ; then - echo 'Warning: you are using a version of expr which does not correctly' - echo 'match large patterns. Some tests may spuriously fail.' + echo 'Warning: you are using a version of expr that does not correctly' + echo 'match large patterns. Some tests may spuriously pass or fail.' echo 'You may wish to make sure GNU expr is in your path.' EXPR=expr fi @@ -321,8 +435,8 @@ fi if $EXPR "`cat ${TESTDIR}/bar`x" : "`cat ${TESTDIR}/bar`y" >/dev/null; then EXPR=`find_tool expr` if test -z "$EXPR" ; then - echo 'Warning: you are using a version of expr which does not correctly' - echo 'match large patterns. Some tests may spuriously pass.' + echo 'Warning: you are using a version of expr that does not correctly' + echo 'match large patterns. Some tests may spuriously pass or fail.' echo 'You may wish to make sure GNU expr is in your path.' EXPR=expr fi @@ -364,8 +478,8 @@ if $EXPR "`cat ${TESTDIR}/bar`" : "${DOTSTAR}xyzABC${DOTSTAR}$" >/dev/null; then else EXPR=`find_tool expr` if test -z "$EXPR" ; then - echo 'Warning: you are using a version of expr which does not correctly' - echo 'match large patterns. Some tests may spuriously fail.' + echo 'Warning: you are using a version of expr that does not correctly' + echo 'match large patterns. Some tests may spuriously pass or fail.' echo 'You may wish to make sure GNU expr is in your path.' EXPR=expr fi @@ -426,6 +540,7 @@ pass () fail () { echo "FAIL: $1" | tee -a ${LOGFILE} + echo "*** Please see the \`TESTS' and \`check.log' files for more information." >&2 # This way the tester can go and see what remnants were left exit 1 } @@ -624,19 +739,6 @@ dotest_fail () dotest_internal "$@" } -# Like dotest except second argument is the required exitstatus. -dotest_status () -{ - eval "$3" >${TESTDIR}/dotest.tmp 2>&1 - status=$? - if test "$status" != "$2"; then - cat ${TESTDIR}/dotest.tmp >>${LOGFILE} - echo "exit status was $status; expected $2" >>${LOGFILE} - fail "$1" - fi - dotest_internal "$1" "$3" "$4" "$5" -} - # Like dotest except output is sorted. dotest_sort () { @@ -671,24 +773,28 @@ RCSINIT=; export RCSINIT if test x"$*" = x; then # Basic/miscellaneous functionality tests="version basica basicb basicc basic1 deep basic2" - tests="${tests} files spacefiles commit-readonly" + tests="${tests} parseroot files spacefiles commit-readonly" tests="${tests} commit-add-missing" + tests="${tests} status" # Branching, tagging, removing, adding, multiple directories - tests="${tests} rdiff diff death death2 rm-update-message rmadd rmadd2" + tests="${tests} rdiff rdiff-short" + tests="${tests} rdiff2 diff diffnl death death2" + tests="${tests} rm-update-message rmadd rmadd2 rmadd3 resurrection" tests="${tests} dirs dirs2 branches branches2 tagc tagf" - tests="${tests} rcslib multibranch import importb importc" - tests="${tests} update-p import-after-initial" - tests="${tests} join join2 join3 join-readonly-conflict" - tests="${tests} join-admin join-admin-2" + tests="${tests} rcslib multibranch import importb importc import-CVS" + tests="${tests} update-p import-after-initial branch-after-import" + tests="${tests} join join2 join3 join4 join5 join6" + tests="${tests} join-readonly-conflict join-admin join-admin-2" + tests="${tests} join-rm" tests="${tests} new newb conflicts conflicts2 conflicts3" tests="${tests} clean" # Checking out various places (modules, checkout -d, &c) tests="${tests} modules modules2 modules3 modules4 modules5 modules6" - tests="${tests} mkmodules-temp-file-removal" - tests="${tests} cvsadm emptydir abspath toplevel toplevel2" - tests="${tests} checkout_repository" + tests="${tests} mkmodules co-d" + tests="${tests} cvsadm emptydir abspath abspath2 toplevel toplevel2" + tests="${tests} top-level checkout_repository" # Log messages, error messages. - tests="${tests} mflag editor errmsg1 errmsg2 adderrmsg" + tests="${tests} mflag editor errmsg1 errmsg2 adderrmsg opterrmsg" # Watches, binary files, history browsing, &c. tests="${tests} devcom devcom2 devcom3 watch4 watch5" tests="${tests} unedit-without-baserev" @@ -705,7 +811,7 @@ if test x"$*" = x; then # PreservePermissions stuff: permissions, symlinks et al. # tests="${tests} perms symlinks symlinks2 hardlinks" # More tag and branch tests, keywords. - tests="${tests} sticky keyword keyword2 keywordlog" + tests="${tests} sticky keyword keywordlog keywordname keyword2" tests="${tests} head tagdate multibranch2 tag8k" # "cvs admin", reserved checkouts. tests="${tests} admin reserved" @@ -713,14 +819,39 @@ if test x"$*" = x; then tests="${tests} diffmerge1 diffmerge2" # Release of multiple directories tests="${tests} release" + tests="${tests} recase" # Multiple root directories and low-level protocol tests. tests="${tests} multiroot multiroot2 multiroot3 multiroot4" tests="${tests} rmroot reposmv pserver server server2 client" - tests="${tests} fork commit-d" + tests="${tests} dottedroot fork commit-d" else tests="$*" fi +# Now check the -f argument for validity. +if test -n "$fromtest"; then + # Don't allow spaces - they are our delimiters in tests + count=0 + for sub in $fromtest; do + count=`expr $count + 1` + done + if test $count != 1; then + echo "No such test \`$fromtest'." >&2 + exit 2 + fi + # make sure it is in $tests + case " $tests " in + *" $fromtest "*) + ;; + *) + echo "No such test \`$fromtest'." >&2 + exit 2 + ;; + esac +fi + + + # a simple function to compare directory contents # # Returns: 0 for same, 1 for different @@ -732,14 +863,14 @@ directory_cmp () DIR_2=$2 cd $DIR_1 - find . -print | fgrep -v /CVS | sort > /tmp/dc$$d1 + find . -print | fgrep -v /CVS | sort > $TESTDIR/dc$$d1 # go back where we were to avoid symlink hell... cd $OLDPWD cd $DIR_2 - find . -print | fgrep -v /CVS | sort > /tmp/dc$$d2 + find . -print | fgrep -v /CVS | sort > $TESTDIR/dc$$d2 - if diff /tmp/dc$$d1 /tmp/dc$$d2 >/dev/null 2>&1 + if diff $TESTDIR/dc$$d1 $TESTDIR/dc$$d2 >/dev/null 2>&1 then : else @@ -754,8 +885,8 @@ directory_cmp () return 1 fi fi - done < /tmp/dc$$d1 - rm -f /tmp/dc$$* + done < $TESTDIR/dc$$d1 + rm -f $TESTDIR/dc$$* return 0 } @@ -1563,21 +1694,57 @@ MTGTXM MtatRk = Zy; EOF } + + +# Echo a new CVSROOT based on $1, $remote, and $remotehost +newroot() { + if $remote; then + if test -n "$remotehost"; then + echo :ext:$remotehost$1 + else + echo :fork:$1 + fi + else + echo $1 + fi +} + + + # Set up CVSROOT (the crerepos tests will test operating without CVSROOT set). -CVSROOT_DIRNAME=${TESTDIR}/cvsroot -if $remote; then - # Currently we test :fork: and :ext: (see crerepos test). - # Testing :pserver: would be hard (inetd issues). - # Also :ext: and :fork support CVS_SERVER in a convenient way. - # If you want to edit this script to change the next line to - # :ext:, you can run the tests that way. There is a known - # difference in modes-15 (see comments there). - CVSROOT=:fork:${CVSROOT_DIRNAME} ; export CVSROOT - CVS_SERVER=${testcvs}; export CVS_SERVER -else - CVSROOT=${CVSROOT_DIRNAME} ; export CVSROOT +# +# Currently we test :fork: and :ext: (see crerepos test). There is a +# known difference between the two in modes-15 (see comments there). +# +# :ext: can be tested against a remote machine if: +# +# 1. $remotehost is set using the `-h' option to this script. +# 2. ${CVS_RSH=rsh} $remotehost works. +# 3. The path to $TESTDIR is the same on both machines (symlinks are okay) +# 4. The path to $testcvs is the same on both machines (symlinks are okay) +# or $CVS_SERVER is overridden in this script's environment to point to +# a working CVS exectuable on the remote machine. +# +# Testing :pserver: would be hard (inetd issues). (How about using tcpserver +# and some high port number? DRP) + +# Allow CVS_SERVER to be overridden. This facilitates constructs like +# testing a local case-insensitive client against a remote case +# sensitive server and visa versa. +: ${CVS_SERVER=$testcvs}; export CVS_SERVER + +if $linkroot; then + mkdir ${TESTDIR}/realcvsroot + ln -s realcvsroot ${TESTDIR}/cvsroot fi +CVSROOT_DIRNAME=${TESTDIR}/cvsroot +CVSROOT=`newroot $CVSROOT_DIRNAME`; export CVSROOT + + +### +### The tests +### dotest 1 "${testcvs} init" '' dotest 1a "${testcvs} init" '' @@ -1675,11 +1842,11 @@ ${PROG}"' \[[a-z]* aborted\]: correct above errors first!' \ '"${PROG}"' \[[a-z]* aborted\]: correct above errors first!' dotest basica-4 "${testcvs} add ssfile" \ -"${PROG}"' [a-z]*: scheduling file `ssfile'\'' for addition -'"${PROG}"' [a-z]*: use .'"${PROG}"' commit. to add this file permanently' +"${PROG}"' add: scheduling file `ssfile'\'' for addition +'"${PROG}"' add: use .'"${PROG}"' commit. to add this file permanently' dotest_fail basica-4a "${testcvs} tag tag0 ssfile" \ -"${PROG} [a-z]*: nothing known about ssfile -${PROG} "'\[[a-z]* aborted\]: correct the above errors first!' +"${PROG} tag: nothing known about ssfile +${PROG} "'\[tag aborted\]: correct the above errors first!' cd ../.. dotest basica-5 "${testcvs} -q ci -m add-it" \ "RCS file: ${CVSROOT_DIRNAME}/first-dir/sdir/ssdir/ssfile,v @@ -1690,14 +1857,14 @@ initial revision: 1\.1 done" dotest_fail basica-5a \ "${testcvs} -q tag BASE sdir/ssdir/ssfile" \ -"${PROG} [a-z]*: Attempt to add reserved tag name BASE -${PROG} \[[a-z]* aborted\]: failed to set tag BASE to revision 1\.1 in ${CVSROOT_DIRNAME}/first-dir/sdir/ssdir/ssfile,v" +"${PROG} tag: Attempt to add reserved tag name BASE +${PROG} \[tag aborted\]: failed to set tag BASE to revision 1\.1 in ${CVSROOT_DIRNAME}/first-dir/sdir/ssdir/ssfile,v" dotest basica-5b "${testcvs} -q tag NOT_RESERVED" \ 'T sdir/ssdir/ssfile' dotest basica-6 "${testcvs} -q update" '' echo "ssfile line 2" >>sdir/ssdir/ssfile - dotest_status basica-6.2 1 "${testcvs} -q diff -c" \ + dotest_fail basica-6.2 "${testcvs} -q diff -c" \ "Index: sdir/ssdir/ssfile =================================================================== RCS file: ${CVSROOT_DIRNAME}/first-dir/sdir/ssdir/ssfile,v @@ -1710,7 +1877,7 @@ diff -c -r1\.1 ssfile --- 1,2 ---- ssfile ${PLUS} ssfile line 2" - dotest_status basica-6.3 1 "${testcvs} -q diff -c -rBASE" \ + dotest_fail basica-6.3 "${testcvs} -q diff -c -rBASE" \ "Index: sdir/ssdir/ssfile =================================================================== RCS file: ${CVSROOT_DIRNAME}/first-dir/sdir/ssdir/ssfile,v @@ -1723,6 +1890,13 @@ diff -c -r1\.1 ssfile --- 1,2 ---- ssfile ${PLUS} ssfile line 2" + dotest_fail basica-6.4 "${testcvs} -q diff -c -rBASE -C3isacrowd" \ +"Index: sdir/ssdir/ssfile +=================================================================== +RCS file: ${CVSROOT_DIRNAME}/first-dir/sdir/ssdir/ssfile,v +retrieving revision 1\.1 +diff -c -C3isacrowd -r1\.1 ssfile +${PROG} diff: invalid context length argument" dotest basica-7 "${testcvs} -q ci -m modify-it" \ "Checking in sdir/ssdir/ssfile; ${CVSROOT_DIRNAME}/first-dir/sdir/ssdir/ssfile,v <-- ssfile @@ -1758,8 +1932,8 @@ done" dotest_fail basica-8a3 "${testcvs} -q ci -m bogus -r 3.0.0" \ "Checking in ssfile; ${CVSROOT_DIRNAME}/first-dir/sdir/ssdir/ssfile,v <-- ssfile -${PROG} [a-z]*: ${CVSROOT_DIRNAME}/first-dir/sdir/ssdir/ssfile,v: can't find branch point 3\.0 -${PROG} [a-z]*: could not check in ssfile" +${PROG} commit: ${CVSROOT_DIRNAME}/first-dir/sdir/ssdir/ssfile,v: can't find branch point 3\.0 +${PROG} commit: could not check in ssfile" dotest basica-8a4 "${testcvs} -q ci -m valid -r 3.1.2" \ "Checking in ssfile; ${CVSROOT_DIRNAME}/first-dir/sdir/ssdir/ssfile,v <-- ssfile @@ -1769,22 +1943,9 @@ done" dotest basica-8a5 "${testcvs} -q up -A ./" "[UP] ssfile" cd ../.. - dotest basica-8b "${testcvs} -q diff -r1.2 -r1.3" \ -"Index: sdir/ssdir/ssfile -=================================================================== -RCS file: ${CVSROOT_DIRNAME}/first-dir/sdir/ssdir/ssfile,v -retrieving revision 1\.2 -retrieving revision 1\.3 -diff -r1\.2 -r1\.3" - - dotest_fail basica-8b1 "${testcvs} -q diff -r1.2 -r1.3 -C 3isacrowd" \ -"Index: sdir/ssdir/ssfile -=================================================================== -RCS file: ${CVSROOT_DIRNAME}/first-dir/sdir/ssdir/ssfile,v -retrieving revision 1\.2 -retrieving revision 1\.3 -diff -C3isacrowd -r1\.2 -r1\.3 -${PROG} [a-z]*: invalid context length argument" + dotest basica-8b "${testcvs} -q diff -r1.2 -r1.3" '' + dotest basica-8b1 "${testcvs} -q diff -r1.2 -r1.3 -C 3isacrowd" \ +'' # The .* here will normally be "No such file or directory", # but if memory serves some systems (AIX?) have a different message. @@ -1805,8 +1966,8 @@ Annotations for sdir/ssdir/ssfile # Test resurrecting with strange revision numbers cd sdir/ssdir dotest basica-r1 "${testcvs} rm -f ssfile" \ -"${PROG} [a-z]*: scheduling .ssfile. for removal -${PROG} [a-z]*: use .${PROG} commit. to remove this file permanently" +"${PROG} remove: scheduling .ssfile. for removal +${PROG} remove: use .${PROG} commit. to remove this file permanently" dotest basica-r2 "${testcvs} -q ci -m remove" \ "Removing ssfile; ${CVSROOT_DIRNAME}/first-dir/sdir/ssdir/ssfile,v <-- ssfile @@ -1814,8 +1975,8 @@ new revision: delete; previous revision: 3\.1 done" dotest basica-r3 "${testcvs} -q up -p -r 3.1 ./ssfile >ssfile" "" dotest basica-r4 "${testcvs} add ssfile" \ -"${PROG} [a-z]*: re-adding file ssfile (in place of dead revision 3\.2) -${PROG} [a-z]*: use .${PROG} commit. to add this file permanently" +"${PROG} add: Re-adding file .ssfile. (in place of dead revision 3\.2)\. +${PROG} add: use .${PROG} commit. to add this file permanently" dotest basica-r5 "${testcvs} -q ci -m resurrect" \ "Checking in ssfile; ${CVSROOT_DIRNAME}/first-dir/sdir/ssdir/ssfile,v <-- ssfile @@ -1837,8 +1998,8 @@ done" done" dotest_fail basica-o2b "${testcvs} admin -o 1.1::NOT_EXIST ssfile" \ "RCS file: ${CVSROOT_DIRNAME}/first-dir/sdir/ssdir/ssfile,v -${PROG} [a-z]*: ${CVSROOT_DIRNAME}/first-dir/sdir/ssdir/ssfile,v: Revision NOT_EXIST doesn't exist. -${PROG} [a-z]*: RCS file for .ssfile. not modified\." +${PROG} admin: ${CVSROOT_DIRNAME}/first-dir/sdir/ssdir/ssfile,v: Revision NOT_EXIST doesn't exist. +${PROG} admin: RCS file for .ssfile. not modified\." dotest basica-o3 "${testcvs} admin -o 1.2::1.3 ssfile" \ "RCS file: ${CVSROOT_DIRNAME}/first-dir/sdir/ssdir/ssfile,v done" @@ -1902,8 +2063,8 @@ add-it dotest basicb-0a "${testcvs} -q co -l ." '' touch topfile dotest basicb-0b "${testcvs} add topfile" \ -"${PROG} [a-z]*: scheduling file .topfile. for addition -${PROG} [a-z]*: use .${PROG} commit. to add this file permanently" +"${PROG} add: scheduling file .topfile. for addition +${PROG} add: use .${PROG} commit. to add this file permanently" dotest basicb-0c "${testcvs} -q ci -m add-it topfile" \ "RCS file: ${CVSROOT_DIRNAME}/topfile,v done @@ -1949,18 +2110,18 @@ Directory ${CVSROOT_DIRNAME}/first-dir/sdir2 added to the repository" cd Emptydir echo sfile1 starts >sfile1 dotest basicb-2a10 "${testcvs} -n add sfile1" \ -"${PROG} [a-z]*: scheduling file .sfile1. for addition -${PROG} [a-z]*: use .${PROG} commit. to add this file permanently" +"${PROG} add: scheduling file .sfile1. for addition +${PROG} add: use .${PROG} commit. to add this file permanently" dotest basicb-2a11 "${testcvs} status sfile1" \ -"${PROG} [a-z]*: use .${PROG} add. to create an entry for sfile1 +"${PROG} status: use .${PROG} add. to create an entry for sfile1 =================================================================== File: sfile1 Status: Unknown Working revision: No entry for sfile1 Repository revision: No revision control file" dotest basicb-3 "${testcvs} add sfile1" \ -"${PROG} [a-z]*: scheduling file .sfile1. for addition -${PROG} [a-z]*: use .${PROG} commit. to add this file permanently" +"${PROG} add: scheduling file .sfile1. for addition +${PROG} add: use .${PROG} commit. to add this file permanently" dotest basicb-3a1 "${testcvs} status sfile1" \ "=================================================================== File: sfile1 Status: Locally Added @@ -1974,8 +2135,8 @@ File: sfile1 Status: Locally Added cd ../sdir2 echo sfile2 starts >sfile2 dotest basicb-4 "${testcvs} add sfile2" \ -"${PROG} [a-z]*: scheduling file .sfile2. for addition -${PROG} [a-z]*: use .${PROG} commit. to add this file permanently" +"${PROG} add: scheduling file .sfile2. for addition +${PROG} add: use .${PROG} commit. to add this file permanently" dotest basicb-4a "${testcvs} -q ci CVS" \ "${PROG} [a-z]*: warning: directory CVS specified in argument ${PROG} [a-z]*: but CVS uses CVS for its own purposes; skipping CVS directory" @@ -2083,8 +2244,8 @@ U sub1/sub2/sdir2/sfile2" cd second-dir touch aa dotest basicb-16 "${testcvs} add aa" \ -"${PROG} [a-z]*: scheduling file .aa. for addition -${PROG} [a-z]*: use .${PROG} commit. to add this file permanently" +"${PROG} add: scheduling file .aa. for addition +${PROG} add: use .${PROG} commit. to add this file permanently" dotest basicb-17 "${testcvs} -q ci -m add" \ "RCS file: ${CVSROOT_DIRNAME}/second-dir/aa,v done @@ -2098,7 +2259,7 @@ done" dotest_fail basicb-o1 "${testcvs} admin -o1.1 topfile" \ "RCS file: ${CVSROOT_DIRNAME}/topfile,v deleting revision 1\.1 -${PROG} \[[a-z]* aborted\]: attempt to delete all revisions" +${PROG} \[admin aborted\]: attempt to delete all revisions" dotest basicb-o2 "${testcvs} -q update -d first-dir" \ "U first-dir/Emptydir/sfile1 U first-dir/sdir2/sfile2" @@ -2107,7 +2268,7 @@ U first-dir/sdir2/sfile2" "RCS file: ${CVSROOT_DIRNAME}/first-dir/sdir2/sfile2,v deleting revision 1\.2 deleting revision 1\.1 -${PROG} \[[a-z]* aborted\]: attempt to delete all revisions" +${PROG} \[admin aborted\]: attempt to delete all revisions" cd .. rm -r 1 @@ -2157,11 +2318,11 @@ Directory ${CVSROOT_DIRNAME}/second-dir added to the repository" rm -rf CVS dotest basicc-4 "echo *" "first-dir second-dir" dotest basicc-5 "${testcvs} update" \ -"${PROG} [a-z]*: Updating first-dir -${PROG} [a-z]*: Updating second-dir" \ -"${PROG} [a-z]*: Updating \. -${PROG} [a-z]*: Updating first-dir -${PROG} [a-z]*: Updating second-dir" +"${PROG} update: Updating first-dir +${PROG} update: Updating second-dir" \ +"${PROG} update: Updating \. +${PROG} update: Updating first-dir +${PROG} update: Updating second-dir" cd first-dir dotest basicc-6 "${testcvs} release -d" "" @@ -2189,10 +2350,34 @@ ${PROG} [a-z]*: Updating second-dir" mkdir 2; cd 2 dotest basicc-12 "${testcvs} -Q co ." "" + # actual entries can be in either Entries or Entries.log, do + # an update to get them consolidated into Entries + dotest basicc-12a "${testcvs} -Q up" "" + dotest basicc-12b "cat CVS/Entries" \ +"D/CVSROOT//// +D/first-dir//// +D/second-dir////" dotest basicc-13 "echo *" "CVS CVSROOT first-dir second-dir" dotest basicc-14 "${testcvs} -Q release first-dir second-dir" "" + # a normal release shouldn't affect the Entries file + dotest basicc-14b "cat CVS/Entries" \ +"D/CVSROOT//// +D/first-dir//// +D/second-dir////" + # FIXCVS: but release -d probably should dotest basicc-15 "${testcvs} -Q release -d first-dir second-dir" "" dotest basicc-16 "echo *" "CVS CVSROOT" + dotest basicc-17 "cat CVS/Entries" \ +"D/CVSROOT//// +D/first-dir//// +D/second-dir////" + # FIXCVS: if not, update should notice the missing directories + # and update Entries accordingly + dotest basicc-18 "${testcvs} -Q up" "" + dotest basicc-19 "cat CVS/Entries" \ +"D/CVSROOT//// +D/first-dir//// +D/second-dir////" cd .. rm -r 1 2 @@ -2213,11 +2398,11 @@ ${PROG} [a-z]*: Updating second-dir" echo file5 >file5 dotest basic1-14-add-add "${testcvs} add file2 file3 file4 file5" \ -"${PROG} [a-z]*: scheduling file \`file2' for addition -${PROG} [a-z]*: scheduling file \`file3' for addition -${PROG} [a-z]*: scheduling file \`file4' for addition -${PROG} [a-z]*: scheduling file \`file5' for addition -${PROG} [a-z]*: use .${PROG} commit. to add these files permanently" +"${PROG} add: scheduling file \`file2' for addition +${PROG} add: scheduling file \`file3' for addition +${PROG} add: scheduling file \`file4' for addition +${PROG} add: scheduling file \`file5' for addition +${PROG} add: use .${PROG} commit. to add these files permanently" dotest basic1-15-add-add \ "${testcvs} -q update file2 file3 file4 file5" \ "A file2 @@ -2266,10 +2451,10 @@ File: file5 Status: Locally Added Sticky Date: (none) Sticky Options: (none)" dotest basic1-18-add-add "${testcvs} -q log" \ -"${PROG} [a-z]*: file2 has been added, but not committed -${PROG} [a-z]*: file3 has been added, but not committed -${PROG} [a-z]*: file4 has been added, but not committed -${PROG} [a-z]*: file5 has been added, but not committed" +"${PROG} log: file2 has been added, but not committed +${PROG} log: file3 has been added, but not committed +${PROG} log: file4 has been added, but not committed +${PROG} log: file5 has been added, but not committed" cd .. dotest basic1-21-add-add "${testcvs} -q update" \ "A first-dir/file2 @@ -2278,13 +2463,13 @@ A first-dir/file4 A first-dir/file5" # FIXCVS? Shouldn't this read first-dir/file2 instead of file2? dotest basic1-22-add-add "${testcvs} log first-dir" \ -"${PROG} [a-z]*: Logging first-dir -${PROG} [a-z]*: file2 has been added, but not committed -${PROG} [a-z]*: file3 has been added, but not committed -${PROG} [a-z]*: file4 has been added, but not committed -${PROG} [a-z]*: file5 has been added, but not committed" +"${PROG} log: Logging first-dir +${PROG} log: file2 has been added, but not committed +${PROG} log: file3 has been added, but not committed +${PROG} log: file4 has been added, but not committed +${PROG} log: file5 has been added, but not committed" dotest basic1-23-add-add "${testcvs} status first-dir" \ -"${PROG} [a-z]*: Examining first-dir +"${PROG} status: Examining first-dir =================================================================== File: file2 Status: Locally Added @@ -2321,13 +2506,13 @@ File: file5 Status: Locally Added Sticky Date: (none) Sticky Options: (none)" dotest basic1-24-add-add "${testcvs} update first-dir" \ -"${PROG} [a-z]*: Updating first-dir +"${PROG} update: Updating first-dir A first-dir/file2 A first-dir/file3 A first-dir/file4 A first-dir/file5" dotest basic1-27-add-add "${testcvs} co first-dir" \ -"${PROG} [a-z]*: Updating first-dir +"${PROG} checkout: Updating first-dir A first-dir/file2 A first-dir/file3 A first-dir/file4 @@ -2430,11 +2615,11 @@ File: file5 Status: Up-to-date cd first-dir rm file2 file3 file4 file5 dotest basic1-14-rm-rm "${testcvs} rm file2 file3 file4 file5" \ -"${PROG} [a-z]*: scheduling .file2. for removal -${PROG} [a-z]*: scheduling .file3. for removal -${PROG} [a-z]*: scheduling .file4. for removal -${PROG} [a-z]*: scheduling .file5. for removal -${PROG} [a-z]*: use .${PROG} commit. to remove these files permanently" +"${PROG} remove: scheduling .file2. for removal +${PROG} remove: scheduling .file3. for removal +${PROG} remove: scheduling .file4. for removal +${PROG} remove: scheduling .file5. for removal +${PROG} remove: use .${PROG} commit. to remove these files permanently" # 15-rm-rm was commented out. Why? dotest basic1-15-rm-rm \ "${testcvs} -q update file2 file3 file4 file5" \ @@ -2586,8 +2771,8 @@ done" cd $i echo file1 >file1 dotest deep-3-$i "${testcvs} add file1" \ -"${PROG}"' [a-z]*: scheduling file `file1'\'' for addition -'"${PROG}"' [a-z]*: use .'"${PROG}"' commit. to add this file permanently' +"${PROG}"' add: scheduling file `file1'\'' for addition +'"${PROG}"' add: use .'"${PROG}"' commit. to add this file permanently' done cd ../../../../../../../../.. dotest_lit deep-4 "${testcvs} -q ci -m add-them first-dir" <<HERE @@ -2644,8 +2829,8 @@ HERE cd first-dir/dir1/dir2/dir3/dir4/dir5/dir6/dir7/dir8 rm file1 dotest deep-4a0 "${testcvs} rm file1" \ -"${PROG} [a-z]*: scheduling .file1. for removal -${PROG} [a-z]*: use .${PROG} commit. to remove this file permanently" +"${PROG} remove: scheduling .file1. for removal +${PROG} remove: use .${PROG} commit. to remove this file permanently" dotest deep-4a1 "${testcvs} -q ci -m rm-it" "Removing file1; ${CVSROOT_DIRNAME}/first-dir/dir1/dir2/dir3/dir4/dir5/dir6/dir7/dir8/file1,v <-- file1 new revision: delete; previous revision: 1\.1 @@ -2674,8 +2859,8 @@ U dir6/dir7/file1' # but not committed. cd dir6/dir7 dotest deep-rm1 "${testcvs} rm -f file1" \ -"${PROG} [a-z]*: scheduling .file1. for removal -${PROG} [a-z]*: use .${PROG} commit. to remove this file permanently" +"${PROG} remove: scheduling .file1. for removal +${PROG} remove: use .${PROG} commit. to remove this file permanently" cd .. dotest deep-rm2 "${testcvs} -q update -d -P" 'R dir7/file1' dotest deep-rm3 "test -d dir7" '' @@ -2689,11 +2874,11 @@ done" # Test rm -f -R. cd ../.. dotest deep-rm7 "${testcvs} rm -f -R dir5" \ -"${PROG} [a-z]*: Removing dir5 -${PROG} [a-z]*: scheduling .dir5/file1. for removal -${PROG} [a-z]*: Removing dir5/dir6 -${PROG} [a-z]*: scheduling .dir5/dir6/file1. for removal -${PROG} [a-z]*: use .${PROG} commit. to remove these files permanently" +"${PROG} remove: Removing dir5 +${PROG} remove: scheduling .dir5/file1. for removal +${PROG} remove: Removing dir5/dir6 +${PROG} remove: scheduling .dir5/dir6/file1. for removal +${PROG} remove: use .${PROG} commit. to remove these files permanently" dotest deep-rm8 "${testcvs} -q ci -m rm-it" \ "Removing dir5/file1; ${CVSROOT_DIRNAME}/first-dir/dir1/dir2/dir3/dir4/dir5/file1,v <-- file1 @@ -2746,37 +2931,37 @@ done" done dotest basic2-3-$i "${testcvs} add file6 file7" \ -"${PROG} [a-z]*: scheduling file .file6. for addition -${PROG} [a-z]*: scheduling file .file7. for addition -${PROG} [a-z]*: use .${PROG} commit. to add these files permanently" +"${PROG} add: scheduling file .file6. for addition +${PROG} add: scheduling file .file7. for addition +${PROG} add: use .${PROG} commit. to add these files permanently" done cd ../../.. dotest basic2-4 "${testcvs} update first-dir" \ -"${PROG} [a-z]*: Updating first-dir +"${PROG} update: Updating first-dir A first-dir/file6 A first-dir/file7 -${PROG} [a-z]*: Updating first-dir/dir1 +${PROG} update: Updating first-dir/dir1 A first-dir/dir1/file6 A first-dir/dir1/file7 -${PROG} [a-z]*: Updating first-dir/dir1/dir2 +${PROG} update: Updating first-dir/dir1/dir2 A first-dir/dir1/dir2/file6 A first-dir/dir1/dir2/file7" # fixme: doesn't work right for added files. dotest basic2-5 "${testcvs} log first-dir" \ -"${PROG} [a-z]*: Logging first-dir -${PROG} [a-z]*: file6 has been added, but not committed -${PROG} [a-z]*: file7 has been added, but not committed -${PROG} [a-z]*: Logging first-dir/dir1 -${PROG} [a-z]*: file6 has been added, but not committed -${PROG} [a-z]*: file7 has been added, but not committed -${PROG} [a-z]*: Logging first-dir/dir1/dir2 -${PROG} [a-z]*: file6 has been added, but not committed -${PROG} [a-z]*: file7 has been added, but not committed" +"${PROG} log: Logging first-dir +${PROG} log: file6 has been added, but not committed +${PROG} log: file7 has been added, but not committed +${PROG} log: Logging first-dir/dir1 +${PROG} log: file6 has been added, but not committed +${PROG} log: file7 has been added, but not committed +${PROG} log: Logging first-dir/dir1/dir2 +${PROG} log: file6 has been added, but not committed +${PROG} log: file7 has been added, but not committed" dotest basic2-6 "${testcvs} status first-dir" \ -"${PROG} [a-z]*: Examining first-dir +"${PROG} status: Examining first-dir =================================================================== File: file6 Status: Locally Added @@ -2795,7 +2980,7 @@ File: file7 Status: Locally Added Sticky Date: (none) Sticky Options: (none) -${PROG} [a-z]*: Examining first-dir/dir1 +${PROG} status: Examining first-dir/dir1 =================================================================== File: file6 Status: Locally Added @@ -2814,7 +2999,7 @@ File: file7 Status: Locally Added Sticky Date: (none) Sticky Options: (none) -${PROG} [a-z]*: Examining first-dir/dir1/dir2 +${PROG} status: Examining first-dir/dir1/dir2 =================================================================== File: file6 Status: Locally Added @@ -2879,13 +3064,13 @@ initial revision: 1\.1 done" dotest basic2-9 "${testcvs} tag second-dive first-dir" \ -"${PROG} [a-z]*: Tagging first-dir +"${PROG} tag: Tagging first-dir T first-dir/file6 T first-dir/file7 -${PROG} [a-z]*: Tagging first-dir/dir1 +${PROG} tag: Tagging first-dir/dir1 T first-dir/dir1/file6 T first-dir/dir1/file7 -${PROG} [a-z]*: Tagging first-dir/dir1/dir2 +${PROG} tag: Tagging first-dir/dir1/dir2 T first-dir/dir1/dir2/file6 T first-dir/dir1/dir2/file7" @@ -2902,36 +3087,36 @@ T first-dir/dir1/dir2/file7" rm file7 dotest basic2-10-$i "${testcvs} rm file7" \ -"${PROG} [a-z]*: scheduling .file7. for removal -${PROG} [a-z]*: use .${PROG} commit. to remove this file permanently" +"${PROG} remove: scheduling .file7. for removal +${PROG} remove: use .${PROG} commit. to remove this file permanently" # and add a new file echo file14 >file14 dotest basic2-11-$i "${testcvs} add file14" \ -"${PROG} [a-z]*: scheduling file .file14. for addition -${PROG} [a-z]*: use .${PROG} commit. to add this file permanently" +"${PROG} add: scheduling file .file14. for addition +${PROG} add: use .${PROG} commit. to add this file permanently" done cd ../../.. dotest basic2-12 "${testcvs} update first-dir" \ -"${PROG} [a-z]*: Updating first-dir +"${PROG} update: Updating first-dir A first-dir/file14 M first-dir/file6 R first-dir/file7 -${PROG} [a-z]*: Updating first-dir/dir1 +${PROG} update: Updating first-dir/dir1 A first-dir/dir1/file14 M first-dir/dir1/file6 R first-dir/dir1/file7 -${PROG} [a-z]*: Updating first-dir/dir1/dir2 +${PROG} update: Updating first-dir/dir1/dir2 A first-dir/dir1/dir2/file14 M first-dir/dir1/dir2/file6 R first-dir/dir1/dir2/file7" # FIXME: doesn't work right for added files dotest basic2-13 "${testcvs} log first-dir" \ -"${PROG} [a-z]*: Logging first-dir -${PROG} [a-z]*: file14 has been added, but not committed +"${PROG} log: Logging first-dir +${PROG} log: file14 has been added, but not committed RCS file: ${CVSROOT_DIRNAME}/first-dir/file6,v Working file: first-dir/file6 @@ -2966,8 +3151,8 @@ revision 1\.1 date: [0-9/]* [0-9:]*; author: ${username}; state: Exp; second dive ============================================================================= -${PROG} [a-z]*: Logging first-dir/dir1 -${PROG} [a-z]*: file14 has been added, but not committed +${PROG} log: Logging first-dir/dir1 +${PROG} log: file14 has been added, but not committed RCS file: ${CVSROOT_DIRNAME}/first-dir/dir1/file6,v Working file: first-dir/dir1/file6 @@ -3002,8 +3187,8 @@ revision 1\.1 date: [0-9/]* [0-9:]*; author: ${username}; state: Exp; second dive ============================================================================= -${PROG} [a-z]*: Logging first-dir/dir1/dir2 -${PROG} [a-z]*: file14 has been added, but not committed +${PROG} log: Logging first-dir/dir1/dir2 +${PROG} log: file14 has been added, but not committed RCS file: ${CVSROOT_DIRNAME}/first-dir/dir1/dir2/file6,v Working file: first-dir/dir1/dir2/file6 @@ -3040,7 +3225,7 @@ second dive =============================================================================" dotest basic2-14 "${testcvs} status first-dir" \ -"${PROG} [a-z]*: Examining first-dir +"${PROG} status: Examining first-dir =================================================================== File: file14 Status: Locally Added @@ -3068,7 +3253,7 @@ File: no file file7 Status: Locally Removed Sticky Date: (none) Sticky Options: (none) -${PROG} [a-z]*: Examining first-dir/dir1 +${PROG} status: Examining first-dir/dir1 =================================================================== File: file14 Status: Locally Added @@ -3096,7 +3281,7 @@ File: no file file7 Status: Locally Removed Sticky Date: (none) Sticky Options: (none) -${PROG} [a-z]*: Examining first-dir/dir1/dir2 +${PROG} status: Examining first-dir/dir1/dir2 =================================================================== File: file14 Status: Locally Added @@ -3180,13 +3365,13 @@ done" dotest basic2-17 "${testcvs} -q update first-dir" '' dotest basic2-18 "${testcvs} tag third-dive first-dir" \ -"${PROG} [a-z]*: Tagging first-dir +"${PROG} tag: Tagging first-dir T first-dir/file14 T first-dir/file6 -${PROG} [a-z]*: Tagging first-dir/dir1 +${PROG} tag: Tagging first-dir/dir1 T first-dir/dir1/file14 T first-dir/dir1/file6 -${PROG} [a-z]*: Tagging first-dir/dir1/dir2 +${PROG} tag: Tagging first-dir/dir1/dir2 T first-dir/dir1/dir2/file14 T first-dir/dir1/dir2/file6" @@ -3201,29 +3386,29 @@ Are you sure you want to release (and delete) directory .first-dir.: " # rtag HEADS dotest basic2-21 "${testcvs} rtag rtagged-by-head first-dir" \ -"${PROG} [a-z]*: Tagging first-dir -${PROG} [a-z]*: Tagging first-dir/dir1 -${PROG} [a-z]*: Tagging first-dir/dir1/dir2" +"${PROG} rtag: Tagging first-dir +${PROG} rtag: Tagging first-dir/dir1 +${PROG} rtag: Tagging first-dir/dir1/dir2" # tag by tag dotest basic2-22 "${testcvs} rtag -r rtagged-by-head rtagged-by-tag first-dir" \ -"${PROG} [a-z]*: Tagging first-dir -${PROG} [a-z]*: Tagging first-dir/dir1 -${PROG} [a-z]*: Tagging first-dir/dir1/dir2" +"${PROG} rtag: Tagging first-dir +${PROG} rtag: Tagging first-dir/dir1 +${PROG} rtag: Tagging first-dir/dir1/dir2" # tag by revision dotest basic2-23 "${testcvs} rtag -r1.1 rtagged-by-revision first-dir" \ -"${PROG} [a-z]*: Tagging first-dir -${PROG} [a-z]*: Tagging first-dir/dir1 -${PROG} [a-z]*: Tagging first-dir/dir1/dir2" +"${PROG} rtag: Tagging first-dir +${PROG} rtag: Tagging first-dir/dir1 +${PROG} rtag: Tagging first-dir/dir1/dir2" # rdiff by revision dotest basic2-24 "${testcvs} rdiff -r1.1 -rrtagged-by-head first-dir" \ -"${PROG} [a-z]*: Diffing first-dir +"${PROG} rdiff: Diffing first-dir Index: first-dir/file6 diff -c first-dir/file6:1\.1 first-dir/file6:1\.2 -\*\*\* first-dir/file6:1\.1 .* ---- first-dir/file6 .* +\*\*\* first-dir/file6:1\.1 ${DATE} +--- first-dir/file6 ${DATE} \*\*\*\*\*\*\*\*\*\*\*\*\*\*\* \*\*\* 1 \*\*\*\* --- 1,2 ---- @@ -3231,17 +3416,17 @@ diff -c first-dir/file6:1\.1 first-dir/file6:1\.2 ${PLUS} file6 Index: first-dir/file7 diff -c first-dir/file7:1\.1 first-dir/file7:removed -\*\*\* first-dir/file7:1.1 .* ---- first-dir/file7 .* +\*\*\* first-dir/file7:1.1 ${DATE} +--- first-dir/file7 ${DATE} \*\*\*\*\*\*\*\*\*\*\*\*\*\*\* \*\*\* 1 \*\*\*\* - file7 --- 0 ---- -${PROG} [a-z]*: Diffing first-dir/dir1 +${PROG} rdiff: Diffing first-dir/dir1 Index: first-dir/dir1/file6 diff -c first-dir/dir1/file6:1\.1 first-dir/dir1/file6:1\.2 -\*\*\* first-dir/dir1/file6:1\.1 .* ---- first-dir/dir1/file6 .* +\*\*\* first-dir/dir1/file6:1\.1 ${DATE} +--- first-dir/dir1/file6 ${DATE} \*\*\*\*\*\*\*\*\*\*\*\*\*\*\* \*\*\* 1 \*\*\*\* --- 1,2 ---- @@ -3249,17 +3434,17 @@ diff -c first-dir/dir1/file6:1\.1 first-dir/dir1/file6:1\.2 ${PLUS} file6 Index: first-dir/dir1/file7 diff -c first-dir/dir1/file7:1\.1 first-dir/dir1/file7:removed -\*\*\* first-dir/dir1/file7:1\.1 .* ---- first-dir/dir1/file7 .* +\*\*\* first-dir/dir1/file7:1\.1 ${DATE} +--- first-dir/dir1/file7 ${DATE} \*\*\*\*\*\*\*\*\*\*\*\*\*\*\* \*\*\* 1 \*\*\*\* - file7 --- 0 ---- -${PROG} [a-z]*: Diffing first-dir/dir1/dir2 +${PROG} rdiff: Diffing first-dir/dir1/dir2 Index: first-dir/dir1/dir2/file6 diff -c first-dir/dir1/dir2/file6:1\.1 first-dir/dir1/dir2/file6:1\.2 -\*\*\* first-dir/dir1/dir2/file6:1\.1 .* ---- first-dir/dir1/dir2/file6 .* +\*\*\* first-dir/dir1/dir2/file6:1\.1 ${DATE} +--- first-dir/dir1/dir2/file6 ${DATE} \*\*\*\*\*\*\*\*\*\*\*\*\*\*\* \*\*\* 1 \*\*\*\* --- 1,2 ---- @@ -3267,21 +3452,40 @@ diff -c first-dir/dir1/dir2/file6:1\.1 first-dir/dir1/dir2/file6:1\.2 ${PLUS} file6 Index: first-dir/dir1/dir2/file7 diff -c first-dir/dir1/dir2/file7:1\.1 first-dir/dir1/dir2/file7:removed -\*\*\* first-dir/dir1/dir2/file7:1\.1 .* ---- first-dir/dir1/dir2/file7 .* +\*\*\* first-dir/dir1/dir2/file7:1\.1 ${DATE} +--- first-dir/dir1/dir2/file7 ${DATE} +\*\*\*\*\*\*\*\*\*\*\*\*\*\*\* +\*\*\* 1 \*\*\*\* +- file7 +--- 0 ----" + dotest basic2-24a "${testcvs} rdiff -l -r1.1 -rrtagged-by-head first-dir" \ +"${PROG} rdiff: Diffing first-dir +Index: first-dir/file6 +diff -c first-dir/file6:1\.1 first-dir/file6:1\.2 +\*\*\* first-dir/file6:1\.1 ${DATE} +--- first-dir/file6 ${DATE} +\*\*\*\*\*\*\*\*\*\*\*\*\*\*\* +\*\*\* 1 \*\*\*\* +--- 1,2 ---- + file6 +${PLUS} file6 +Index: first-dir/file7 +diff -c first-dir/file7:1\.1 first-dir/file7:removed +\*\*\* first-dir/file7:1.1 ${DATE} +--- first-dir/file7 ${DATE} \*\*\*\*\*\*\*\*\*\*\*\*\*\*\* \*\*\* 1 \*\*\*\* - file7 --- 0 ----" # now export by rtagged-by-head and rtagged-by-tag and compare. dotest basic2-25 "${testcvs} export -r rtagged-by-head -d 1dir first-dir" \ -"${PROG} [a-z]*: Updating 1dir +"${PROG} export: Updating 1dir U 1dir/file14 U 1dir/file6 -${PROG} [a-z]*: Updating 1dir/dir1 +${PROG} export: Updating 1dir/dir1 U 1dir/dir1/file14 U 1dir/dir1/file6 -${PROG} [a-z]*: Updating 1dir/dir1/dir2 +${PROG} export: Updating 1dir/dir1/dir2 U 1dir/dir1/dir2/file14 U 1dir/dir1/dir2/file6" dotest_fail basic2-25a "test -d 1dir/CVS" @@ -3289,13 +3493,13 @@ U 1dir/dir1/dir2/file6" dotest_fail basic2-25c "test -d 1dir/dir1/dir2/CVS" dotest basic2-26 "${testcvs} export -r rtagged-by-tag first-dir" \ -"${PROG} [a-z]*: Updating first-dir +"${PROG} export: Updating first-dir U first-dir/file14 U first-dir/file6 -${PROG} [a-z]*: Updating first-dir/dir1 +${PROG} export: Updating first-dir/dir1 U first-dir/dir1/file14 U first-dir/dir1/file6 -${PROG} [a-z]*: Updating first-dir/dir1/dir2 +${PROG} export: Updating first-dir/dir1/dir2 U first-dir/dir1/dir2/file14 U first-dir/dir1/dir2/file6" dotest_fail basic2-26a "test -d first-dir/CVS" @@ -3308,15 +3512,15 @@ U first-dir/dir1/dir2/file6" # checkout by revision vs export by rtagged-by-revision and compare. mkdir export-dir dotest basic2-28 "${testcvs} export -rrtagged-by-revision -d export-dir first-dir" \ -"${PROG} [a-z]*: Updating export-dir +"${PROG} export: Updating export-dir U export-dir/file14 U export-dir/file6 U export-dir/file7 -${PROG} [a-z]*: Updating export-dir/dir1 +${PROG} export: Updating export-dir/dir1 U export-dir/dir1/file14 U export-dir/dir1/file6 U export-dir/dir1/file7 -${PROG} [a-z]*: Updating export-dir/dir1/dir2 +${PROG} export: Updating export-dir/dir1/dir2 U export-dir/dir1/dir2/file14 U export-dir/dir1/dir2/file6 U export-dir/dir1/dir2/file7" @@ -3325,15 +3529,15 @@ U export-dir/dir1/dir2/file7" dotest_fail basic2-28c "test -d export-dir/dir1/dir2/CVS" dotest basic2-29 "${testcvs} co -r1.1 first-dir" \ -"${PROG} [a-z]*: Updating first-dir +"${PROG} checkout: Updating first-dir U first-dir/file14 U first-dir/file6 U first-dir/file7 -${PROG} [a-z]*: Updating first-dir/dir1 +${PROG} checkout: Updating first-dir/dir1 U first-dir/dir1/file14 U first-dir/dir1/file6 U first-dir/dir1/file7 -${PROG} [a-z]*: Updating first-dir/dir1/dir2 +${PROG} checkout: Updating first-dir/dir1/dir2 U first-dir/dir1/dir2/file14 U first-dir/dir1/dir2/file6 U first-dir/dir1/dir2/file7" @@ -3359,20 +3563,20 @@ N second-dir/file14 N second-dir/file6 N second-dir/file7 No conflicts created by this import -${PROG} [a-z]*: Importing ${CVSROOT_DIRNAME}/second-dir/dir1 -${PROG} [a-z]*: Importing ${CVSROOT_DIRNAME}/second-dir/dir1/dir2" +${PROG} import: Importing ${CVSROOT_DIRNAME}/second-dir/dir1 +${PROG} import: Importing ${CVSROOT_DIRNAME}/second-dir/dir1/dir2" cd .. dotest basic2-32 "${testcvs} export -r HEAD second-dir" \ -"${PROG} [a-z]*: Updating second-dir +"${PROG} export: Updating second-dir U second-dir/file14 U second-dir/file6 U second-dir/file7 -${PROG} [a-z]*: Updating second-dir/dir1 +${PROG} export: Updating second-dir/dir1 U second-dir/dir1/file14 U second-dir/dir1/file6 U second-dir/dir1/file7 -${PROG} [a-z]*: Updating second-dir/dir1/dir2 +${PROG} export: Updating second-dir/dir1/dir2 U second-dir/dir1/dir2/file14 U second-dir/dir1/dir2/file6 U second-dir/dir1/dir2/file7" @@ -3389,16 +3593,16 @@ U second-dir/dir1/dir2/file7" cd first-dir dotest basic2-34 "${testcvs} update -A -l *file*" \ "[UP] file6 -${PROG} [a-z]*: file7 is no longer in the repository" +${PROG} update: file7 is no longer in the repository" # If we don't delete the tag first, cvs won't retag it. # This would appear to be a feature. dotest basic2-35 "${testcvs} tag -l -d rtagged-by-revision" \ -"${PROG} [a-z]*: Untagging \. +"${PROG} tag: Untagging \. D file14 D file6" dotest basic2-36 "${testcvs} tag -l rtagged-by-revision" \ -"${PROG} [a-z]*: Tagging \. +"${PROG} tag: Tagging \. T file14 T file6" @@ -3410,9 +3614,9 @@ T file6" dotest basic2-37 "${testcvs} -q diff -u" '' dotest basic2-38 "${testcvs} update" \ -"${PROG} [a-z]*: Updating . -${PROG} [a-z]*: Updating dir1 -${PROG} [a-z]*: Updating dir1/dir2" +"${PROG} update: Updating . +${PROG} update: Updating dir1 +${PROG} update: Updating dir1/dir2" cd .. @@ -3433,7 +3637,7 @@ ${PROG} [a-z]*: Updating dir1/dir2" # why are there two lines at the end of the local output # which don't exist in the remote output? would seem to be # a CVS bug. - dotest basic2-64 "${testcvs} his -x TOFWUCGMAR -a" \ + dotest basic2-64 "${testcvs} his -x TOFWUPCGMAR -a" \ "O [0-9-]* [0-9:]* ${PLUS}0000 ${username} first-dir =first-dir= ${TESTDIR}/\* A [0-9-]* [0-9:]* ${PLUS}0000 ${username} 1\.1 file6 first-dir == ${TESTDIR} A [0-9-]* [0-9:]* ${PLUS}0000 ${username} 1\.1 file7 first-dir == ${TESTDIR} @@ -3478,12 +3682,52 @@ T [0-9-]* [0-9:]* ${PLUS}0000 ${username} first-dir \[rtagged-by-head:A\] T [0-9-]* [0-9:]* ${PLUS}0000 ${username} first-dir \[rtagged-by-tag:rtagged-by-head\] T [0-9-]* [0-9:]* ${PLUS}0000 ${username} first-dir \[rtagged-by-revision:1\.1\] O [0-9-]* [0-9:]* ${PLUS}0000 ${username} \[1\.1\] first-dir =first-dir= <remote>/\* -W [0-9-]* [0-9:]* ${PLUS}0000 ${username} file7 first-dir == <remote>" \ +P [0-9-]* [0-9:]* ${PLUS}0000 ${username} 1\.2 file6 first-dir == <remote> +W [0-9-]* [0-9:]* ${PLUS}0000 ${username} file7 first-dir == <remote>" rm -rf ${CVSROOT_DIRNAME}/first-dir rm -rf ${CVSROOT_DIRNAME}/second-dir ;; + parseroot) + mkdir 1; cd 1 + # Test odd cases involving CVSROOT. At the moment, that means we + # are testing roots with '/'s on the end, which CVS should parse off. + CVSROOT_save=${CVSROOT} + CVSROOT="${CVSROOT}/////" + dotest parseroot-1 "${testcvs} -q co CVSROOT/modules" \ +"U CVSROOT/modules" + dotest parseroot-2 "${testcvs} -q ci -fmnull-change CVSROOT/modules" \ +"Checking in CVSROOT/modules; +${CVSROOT_DIRNAME}/CVSROOT/modules,v <-- modules +new revision: 1\.2; previous revision: 1\.1 +done +${PROG} commit: Rebuilding administrative file database" + + if $remote; then + # I only test these when testing remote in case CVS was compiled + # without client support. + + # logout does not try to contact the server. + CVSROOT=":pserver;proxy=localhost;proxyport=8080:localhost/dev/null" + dotest parseroot-3r "$testcvs -d'$CVSROOT' logout" \ +"$PROG logout: WARNING: Ignoring method options found in CVSROOT: \`proxy=localhost;proxyport=8080'\. +$PROG logout: Use CVS version 1\.12\.7 or later to handle method options\. +Logging out of :pserver:$username@localhost:2401/dev/null +$PROG logout: warning: failed to open $HOME/\.cvspass for reading: No such file or directory +$PROG logout: Entry not found\." + fi + + if $keep; then + echo Keeping $TESTDIR and exiting due to --keep + exit 0 + fi + + CVSROOT=$CVSROOT_save + cd .. + rm -r 1 + ;; + files) # Test of how we specify files on the command line # (recurse.c and that sort of thing). Vaguely similar to @@ -3500,8 +3744,8 @@ W [0-9-]* [0-9:]* ${PLUS}0000 ${username} file7 first-dir == < cd first-dir touch tfile dotest files-3 "${testcvs} add tfile" \ -"${PROG} [a-z]*: scheduling file .tfile. for addition -${PROG} [a-z]*: use .${PROG} commit. to add this file permanently" +"${PROG} add: scheduling file .tfile. for addition +${PROG} add: use .${PROG} commit. to add this file permanently" dotest files-4 "${testcvs} -q ci -m add" \ "RCS file: ${CVSROOT_DIRNAME}/first-dir/tfile,v done @@ -3518,8 +3762,8 @@ done" cd dir touch .file dotest files-6 "${testcvs} add .file" \ -"${PROG} [a-z]*: scheduling file .\.file' for addition on branch .C. -${PROG} [a-z]*: use .${PROG} commit. to add this file permanently" +"${PROG} add: scheduling file .\.file' for addition on branch .C. +${PROG} add: use .${PROG} commit. to add this file permanently" mkdir sdir dotest files-7 "${testcvs} add sdir" \ "Directory ${CVSROOT_DIRNAME}/first-dir/dir/sdir added to the repository @@ -3532,8 +3776,8 @@ ${PROG} [a-z]*: use .${PROG} commit. to add this file permanently" cd ssdir touch .file dotest files-9 "${testcvs} add .file" \ -"${PROG} [a-z]*: scheduling file .\.file' for addition on branch .C. -${PROG} [a-z]*: use .${PROG} commit. to add this file permanently" +"${PROG} add: scheduling file .\.file' for addition on branch .C. +${PROG} add: use .${PROG} commit. to add this file permanently" cd ../.. dotest files-10 "${testcvs} -q ci -m test" \ "RCS file: ${CVSROOT_DIRNAME}/first-dir/dir/Attic/\.file,v @@ -3566,8 +3810,8 @@ done" # might be a mistake. dotest_fail files-12 \ "${testcvs} commit -f -m test ./sdir/ssdir/.file ./.file" \ -"${PROG} server: Up-to-date check failed for .\.file' -${PROG} \[server aborted\]: correct above errors first!" +"${PROG} commit: Up-to-date check failed for .\.file' +${PROG} \[commit aborted\]: correct above errors first!" # Sync up the version numbers so that the rest of the # tests don't need to expect different numbers based @@ -3601,9 +3845,12 @@ ${CVSROOT_DIRNAME}/first-dir/dir/sdir/ssdir/Attic/\.file,v <-- \.file new revision: 1\.1\.2\.4; previous revision: 1\.1\.2\.3 done" if $remote; then - dotest_fail files-14 \ + dotest files-14 \ "${testcvs} commit -fmtest ../../first-dir/dir/.file" \ -"protocol error: .\.\./\.\./first-dir/dir' has too many \.\." +"Checking in \.\./\.\./first-dir/dir/\.file; +${CVSROOT_DIRNAME}/first-dir/dir/Attic/\.file,v <-- .file +new revision: 1\.1\.2\.4; previous revision: 1\.1\.2\.3 +done" else dotest files-14 \ "${testcvs} commit -fmtest ../../first-dir/dir/.file" \ @@ -3624,48 +3871,30 @@ done" # basica or some other test instead, always good to keep the # testsuite concise). - # I wrote this test to worry about problems in do_module; - # but then I found that the CVS server has its own problems - # with filenames starting with "-". Work around it for now. - if $remote; then - dashb=dashb - dashc=dashc - else - dashb=-b - dashc=-c - fi - mkdir 1; cd 1 dotest spacefiles-1 "${testcvs} -q co -l ." "" - touch ./${dashc} top - dotest spacefiles-2 "${testcvs} add -- ${dashc} top" \ -"${PROG} [a-z]*: scheduling file .${dashc}. for addition -${PROG} [a-z]*: scheduling file .top. for addition -${PROG} [a-z]*: use .${PROG} commit. to add these files permanently" + touch ./-c + dotest spacefiles-2 "${testcvs} add -- -c" \ +"${PROG} add: scheduling file .-c. for addition +${PROG} add: use .${PROG} commit. to add this file permanently" dotest spacefiles-3 "${testcvs} -q ci -m add" \ -"RCS file: ${CVSROOT_DIRNAME}/${dashc},v +"RCS file: ${CVSROOT_DIRNAME}/-c,v done -Checking in ${dashc}; -${CVSROOT_DIRNAME}/${dashc},v <-- ${dashc} -initial revision: 1\.1 -done -RCS file: ${CVSROOT_DIRNAME}/top,v -done -Checking in top; -${CVSROOT_DIRNAME}/top,v <-- top +Checking in -c; +${CVSROOT_DIRNAME}/-c,v <-- -c initial revision: 1\.1 done" mkdir 'first dir' dotest spacefiles-4 "${testcvs} add 'first dir'" \ "Directory ${CVSROOT_DIRNAME}/first dir added to the repository" - mkdir ./${dashb} - dotest spacefiles-5 "${testcvs} add -- ${dashb}" \ -"Directory ${CVSROOT_DIRNAME}/${dashb} added to the repository" + mkdir ./-b + dotest spacefiles-5 "${testcvs} add -- -b" \ +"Directory ${CVSROOT_DIRNAME}/-b added to the repository" cd 'first dir' touch 'a file' dotest spacefiles-6 "${testcvs} add 'a file'" \ -"${PROG} [a-z]*: scheduling file .a file. for addition -${PROG} [a-z]*: use .${PROG} commit. to add this file permanently" +"${PROG} add: scheduling file .a file. for addition +${PROG} add: use .${PROG} commit. to add this file permanently" dotest spacefiles-7 "${testcvs} -q ci -m add" \ "RCS file: ${CVSROOT_DIRNAME}/first dir/a file,v done @@ -3677,16 +3906,10 @@ done" cd ../.. mkdir 2; cd 2 - # Leading slash strikes me as kind of oddball, but there is - # a special case for it in do_module. And (in the case of - # "top", rather than "-c") it has worked in CVS 1.10.6 and - # presumably back to CVS 1.3 or so. - dotest spacefiles-9 "${testcvs} -q co -- /top" "U \./top" - dotest spacefiles-10 "${testcvs} co -- ${dashb}" \ -"${PROG} [a-z]*: Updating ${dashb}" - dotest spacefiles-11 "${testcvs} -q co -- ${dashc}" "U \./${dashc}" - rm ./${dashc} - dotest spacefiles-12 "${testcvs} -q co -- /${dashc}" "U \./${dashc}" + dotest spacefiles-10 "${testcvs} co -- -b" \ +"${PROG} checkout: Updating -b" + dotest spacefiles-11 "${testcvs} -q co -- -c" "U \./-c" + rm ./-c dotest spacefiles-13 "${testcvs} -q co 'first dir'" \ "U first dir/a file" cd .. @@ -3698,8 +3921,8 @@ done" rm -r 1 2 3 rm -rf "${CVSROOT_DIRNAME}/first dir" - rm -r ${CVSROOT_DIRNAME}/${dashb} - rm -f ${CVSROOT_DIRNAME}/${dashc},v ${CVSROOT_DIRNAME}/top,v + rm -r ${CVSROOT_DIRNAME}/-b + rm -f ${CVSROOT_DIRNAME}/-c,v ;; commit-readonly) @@ -3717,8 +3940,8 @@ done" echo '$Id''$' > $file dotest commit-readonly-3 "$testcvs add $file" \ -"${PROG} [a-z]*: scheduling file .$file. for addition -${PROG} [a-z]*: use .${PROG} commit. to add this file permanently" +"${PROG} add: scheduling file .$file. for addition +${PROG} add: use .${PROG} commit. to add this file permanently" dotest commit-readonly-4 "$testcvs -Q ci -m . $file" \ "RCS file: ${CVSROOT_DIRNAME}/$module/$file,v done @@ -3742,6 +3965,149 @@ done" rm -rf ${CVSROOT_DIRNAME}/$module ;; + status) + # This tests for a bug in the status command which failed to + # notice resolved conflicts. + mkdir status; cd status + dotest status-init-1 "${testcvs} -q co -l ." "" + mkdir first-dir + dotest status-init-2 "${testcvs} add first-dir" \ +"Directory ${CVSROOT_DIRNAME}/first-dir added to the repository" + cd first-dir + echo a line >tfile + dotest status-init-3 "${testcvs} add tfile" \ +"${PROG} add: scheduling file .tfile. for addition +${PROG} add: use .${PROG} commit. to add this file permanently" + dotest status-init-4 "${testcvs} -q ci -m add" \ +"RCS file: ${CVSROOT_DIRNAME}/first-dir/tfile,v +done +Checking in tfile; +${CVSROOT_DIRNAME}/first-dir/tfile,v <-- tfile +initial revision: 1\.1 +done" + cd .. + dotest status-init-5 "${testcvs} -q co -dsecond-dir first-dir" \ +"U second-dir/tfile" + cd second-dir + echo some junk >>tfile + dotest status-init-6 "${testcvs} -q ci -maline" \ +"Checking in tfile; +${CVSROOT_DIRNAME}/first-dir/tfile,v <-- tfile +new revision: 1\.2; previous revision: 1\.1 +done" + cd ../first-dir + echo force a conflict >>tfile + dotest status-init-7 "${testcvs} -q up" \ +"RCS file: ${CVSROOT_DIRNAME}/first-dir/tfile,v +retrieving revision 1\.1 +retrieving revision 1\.2 +Merging differences between 1\.1 and 1\.2 into tfile +rcsmerge: warning: conflicts during merge +${PROG} update: conflicts found in tfile +C tfile" + + # Now note our status + dotest status-1 "${testcvs} status tfile" \ +"=================================================================== +File: tfile Status: File had conflicts on merge + + Working revision: 1\.2.* + Repository revision: 1\.2 ${CVSROOT_DIRNAME}/first-dir/tfile,v + Sticky Tag: (none) + Sticky Date: (none) + Sticky Options: (none)" + + # touch the file, leaving conflict markers in place + # and note our status + touch tfile + dotest status-2 "${testcvs} status tfile" \ +"=================================================================== +File: tfile Status: File had conflicts on merge + + Working revision: 1\.2.* + Repository revision: 1\.2 ${CVSROOT_DIRNAME}/first-dir/tfile,v + Sticky Tag: (none) + Sticky Date: (none) + Sticky Options: (none)" + + # resolve the conflict + echo resolution >tfile + dotest status-3 "${testcvs} status tfile" \ +"=================================================================== +File: tfile Status: Locally Modified + + Working revision: 1\.2.* + Repository revision: 1\.2 ${CVSROOT_DIRNAME}/first-dir/tfile,v + Sticky Tag: (none) + Sticky Date: (none) + Sticky Options: (none)" + + # FIXCVS: + # Update is supposed to re-Register() the file when it + # finds resolved conflicts: + dotest status-4 "grep 'Result of merge' CVS/Entries" \ +"/tfile/1\.2/Result of merge${PLUS}[a-zA-Z0-9 :]*//" + + cd .. + mkdir fourth-dir + dotest status-init-8 "$testcvs add fourth-dir" \ +"Directory $CVSROOT_DIRNAME/fourth-dir added to the repository" + cd fourth-dir + echo yet another line >t3file + dotest status-init-9 "$testcvs add t3file" \ +"$PROG add: scheduling file .t3file. for addition +$PROG add: use .$PROG commit. to add this file permanently" + dotest status-init-10 "$testcvs -q ci -m add" \ +"RCS file: $CVSROOT_DIRNAME/fourth-dir/t3file,v +done +Checking in t3file; +$CVSROOT_DIRNAME/fourth-dir/t3file,v <-- t3file +initial revision: 1\.1 +done" + cd ../first-dir + mkdir third-dir + dotest status-init-11 "$testcvs add third-dir" \ +"Directory $CVSROOT_DIRNAME/first-dir/third-dir added to the repository" + cd third-dir + echo another line >t2file + dotest status-init-12 "$testcvs add t2file" \ +"$PROG add: scheduling file .t2file. for addition +$PROG add: use .$PROG commit. to add this file permanently" + dotest status-init-13 "$testcvs -q ci -m add" \ +"RCS file: $CVSROOT_DIRNAME/first-dir/third-dir/t2file,v +done +Checking in t2file; +$CVSROOT_DIRNAME/first-dir/third-dir/t2file,v <-- t2file +initial revision: 1\.1 +done" + dotest status-5 "$testcvs status ../tfile" \ +"=================================================================== +File: tfile Status: Locally Modified + + Working revision: 1\.2.* + Repository revision: 1\.2 $CVSROOT_DIRNAME/first-dir/tfile,v + Sticky Tag: (none) + Sticky Date: (none) + Sticky Options: (none)" + dotest status-6 "$testcvs status ../../fourth-dir/t3file" \ +"=================================================================== +File: t3file Status: Up-to-date + + Working revision: 1\.1.* + Repository revision: 1\.1 $CVSROOT_DIRNAME/fourth-dir/t3file,v + Sticky Tag: (none) + Sticky Date: (none) + Sticky Options: (none)" + + if $keep; then + echo Keeping $TESTDIR and exiting due to --keep + exit 0 + fi + + cd ../../.. + rm -rf status + rm -rf $CVSROOT_DIRNAME/first-dir $CVSROOT_DIRNAME/fourth-dir + ;; rdiff) # Test rdiff @@ -3763,7 +4129,7 @@ N trdiff/foo No conflicts created by this import' dotest rdiff-2 \ "${testcvs} co -ko trdiff" \ -"${PROG} [a-z]*: Updating trdiff +"${PROG} checkout: Updating trdiff U trdiff/bar U trdiff/foo" cd trdiff @@ -3778,8 +4144,8 @@ done" echo "new file" >> new dotest rdiff-4 \ "${testcvs} add -m new-file-description new" \ -"${PROG} [a-z]*: scheduling file \`new' for addition -${PROG} [a-z]*: use .${PROG} commit. to add this file permanently" +"${PROG} add: scheduling file \`new' for addition +${PROG} add: use .${PROG} commit. to add this file permanently" dotest rdiff-5 \ "${testcvs} commit -m added-new-file new" \ "RCS file: ${CVSROOT_DIRNAME}/trdiff/new,v @@ -3790,7 +4156,7 @@ initial revision: 1\.1 done" dotest rdiff-6 \ "${testcvs} tag local-v0" \ -"${PROG} [a-z]*: Tagging . +"${PROG} tag: Tagging . T bar T foo T new" @@ -3815,11 +4181,11 @@ File: foo Status: Up-to-date dotest rdiff-8 \ "${testcvs} rdiff -r T1 -r local-v0 trdiff" \ -"${PROG}"' [a-z]*: Diffing trdiff +"${PROG}"' rdiff: Diffing trdiff Index: trdiff/foo diff -c trdiff/foo:1\.1\.1\.1 trdiff/foo:1\.2 -\*\*\* trdiff/foo:1\.1\.1\.1 .* ---- trdiff/foo .* +\*\*\* trdiff/foo:1\.1\.1\.1 '"${DATE}"' +--- trdiff/foo '"${DATE}"' \*\*\*\*\*\*\*\*\*\*\*\*\*\*\* \*\*\* 1,2 \*\*\*\* ! \$''Id: foo,v 1\.1\.1\.1 [0-9/]* [0-9:]* '"${username}"' Exp \$ @@ -3830,8 +4196,8 @@ diff -c trdiff/foo:1\.1\.1\.1 trdiff/foo:1\.2 ! something Index: trdiff/new diff -c /dev/null trdiff/new:1\.1 -\*\*\* /dev/null .* ---- trdiff/new .* +\*\*\* /dev/null '"${DATE}"' +--- trdiff/new '"${DATE}"' \*\*\*\*\*\*\*\*\*\*\*\*\*\*\* \*\*\* 0 \*\*\*\* --- 1,2 ---- @@ -3848,6 +4214,182 @@ diff -c /dev/null trdiff/new:1\.1 rm -rf ${CVSROOT_DIRNAME}/trdiff ;; + rdiff-short) + # Test that the short patch behaves as expected + # 1) Added file. + # 2) Removed file. + # 3) Different revision number with no difference. + # 4) Different revision number with changes. + # 5) Against trunk. + # 6) Same revision number (no difference). + mkdir rdiff-short; cd rdiff-short + mkdir abc + dotest rdiff-short-init-1 \ +"${testcvs} -q import -I ! -m initial-import abc vendor initial" \ +' +No conflicts created by this import' + + dotest rdiff-short-init-2 "${testcvs} -q get abc" '' + cd abc + echo "abc" >file1.txt + dotest rdiff-short-init-3 "${testcvs} add file1.txt" \ +"${PROG} add: scheduling file .file1\.txt' for addition +${PROG} add: use .${PROG} commit. to add this file permanently" + dotest rdiff-short-init-4 \ +"${testcvs} commit -madd-file1 file1.txt" \ +"RCS file: ${CVSROOT_DIRNAME}/abc/file1\.txt,v +done +Checking in file1\.txt; +${CVSROOT_DIRNAME}/abc/file1\.txt,v <-- file1\.txt +initial revision: 1\.1 +done" + echo def >>file1.txt + dotest rdiff-short-init-5 \ +"${testcvs} commit -mchange-file1 file1.txt" \ +"Checking in file1\.txt; +${CVSROOT_DIRNAME}/abc/file1\.txt,v <-- file1\.txt +new revision: 1\.2; previous revision: 1\.1 +done" + echo "abc" >file1.txt + dotest rdiff-short-init-6 \ +"${testcvs} commit -mrestore-file1-rev1 file1.txt" \ +"Checking in file1\.txt; +${CVSROOT_DIRNAME}/abc/file1\.txt,v <-- file1\.txt +new revision: 1\.3; previous revision: 1\.2 +done" + dotest rdiff-short-init-7 \ +"${testcvs} tag -r 1.1 tag1 file1.txt" \ +"T file1\.txt" + dotest rdiff-short-init-8 \ +"${testcvs} tag -r 1.2 tag2 file1.txt" \ +"T file1\.txt" + dotest rdiff-short-init-9 \ +"${testcvs} tag -r 1.3 tag3 file1.txt" \ +"T file1\.txt" + echo "abc" >file2.txt + dotest rdiff-short-init-10 \ +"${testcvs} add file2.txt" \ +"${PROG} add: scheduling file .file2\.txt' for addition +${PROG} add: use .${PROG} commit. to add this file permanently" + dotest rdiff-add-remove-nodiff-init-11 \ +"${testcvs} commit -madd-file2 file2.txt" \ +"RCS file: ${CVSROOT_DIRNAME}/abc/file2\.txt,v +done +Checking in file2\.txt; +${CVSROOT_DIRNAME}/abc/file2\.txt,v <-- file2\.txt +initial revision: 1\.1 +done" + dotest rdiff-short-init-12 \ +"${testcvs} tag -r 1.1 tag4 file2.txt" \ +"T file2\.txt" + dotest rdiff-short-init-13 \ +"${testcvs} tag -r 1.1 tag5 file2.txt" \ +"T file2\.txt" + cd ../.. + rm -fr rdiff-short + + # 3) Different revision number with no difference. + dotest rdiff-short-no-real-change \ +"${testcvs} -q rdiff -s -r tag1 -r tag3 abc" + + # 4) Different revision number with changes. + dotest rdiff-short-real-change \ +"${testcvs} -q rdiff -s -r tag1 -r tag2 abc" \ +'File abc/file1.txt changed from revision 1\.1 to 1\.2' + + # 1) Added file. + # 2) Removed file. + dotest_sort rdiff-short-remove-add \ +"${testcvs} -q rdiff -s -r tag2 -r tag4 abc" \ +'File abc/file1\.txt is removed; tag2 revision 1\.2 +File abc/file2\.txt is new; tag4 revision 1\.1' + + # 6) Same revision number (no difference). + dotest rdiff-short-no-change \ +"${testcvs} -q rdiff -s -r tag4 -r tag5 abc" + + # 5) Against trunk. + # Check that the messages change when we diff against the trunk + # rather than a tag or date. + dotest rdiff-short-against-trunk-1 \ +"${testcvs} -q rdiff -s -rtag4 abc" \ +"File abc/file1\.txt is new; current revision 1\.3" + + dotest rdiff-short-against-trunk-2 \ +"${testcvs} -q rdiff -s -rtag2 abc" \ +"File abc/file1\.txt changed from revision 1\.2 to 1\.3 +File abc/file2\.txt is new; current revision 1\.1" + + rm -rf ${CVSROOT_DIRNAME}/abc + ;; + + rdiff2) + # Test for the segv problem reported by James Cribb + # Somewhere to work + mkdir rdiff2; cd rdiff2 + # Create a module "m" with files "foo" and "d/bar" + mkdir m; cd m + echo foo >foo + mkdir d + echo bar >d/bar + dotest_sort rdiff2-1 \ +"${testcvs} -q import -I ! -m initial-import m vendor initial" \ +' + +N m/d/bar +N m/foo +No conflicts created by this import' + + cd .. + rm -r m + + # Remove "foo" + dotest rdiff2-2 "${testcvs} get m" \ +"${PROG} checkout: Updating m +U m/foo +${PROG} checkout: Updating m/d +U m/d/bar" + cd m + dotest rdiff2-3 "${testcvs} rm -f foo" \ +"${PROG} remove: scheduling .foo. for removal +${PROG} remove: use .${PROG} commit. to remove this file permanently" + + dotest rdiff2-4 "${testcvs} commit -m Removed foo" \ +"Removing foo; +${CVSROOT_DIRNAME}/m/foo,v <-- foo +new revision: delete; previous revision: 1\.1\.1\.1 +done" + + # Modify "d/bar" + echo foo >d/bar + dotest rdiff2-5 "${testcvs} commit -m Changed d/bar" \ +"Checking in d/bar; +${CVSROOT_DIRNAME}/m/d/bar,v <-- bar +new revision: 1\.2; previous revision: 1\.1 +done" + + # Crash before showing d/bar diffs + dotest_fail rdiff2-6 "${testcvs} rdiff -t m" \ +"${PROG} rdiff: Diffing m +${PROG} rdiff: Diffing m/d +Index: m/d/bar +diff -c m/d/bar:1\.1\.1\.1 m/d/bar:1\.2 +\*\*\* m/d/bar:1\.1\.1\.1 ${DATE} +--- m/d/bar ${DATE} +\*\*\*\*\*\*\*\*\*\*\*\*\*\*\* +\*\*\* 1 \*\*\*\* +! bar +--- 1 ---- +! foo" + if $keep; then + echo Keeping ${TESTDIR} and exiting due to --keep + exit 0 + fi + cd ../.. + rm -rf rdiff2 + rm -rf ${CVSROOT_DIRNAME}/m + ;; + diff) # Various tests specific to the "cvs diff" command. # Related tests: @@ -3866,11 +4408,11 @@ diff -c /dev/null trdiff/new:1\.1 # known" message (or worse yet, no message in some cases) but # diff says "I know nothing". Shrug. dotest_fail diff-3 "${testcvs} diff xyzpdq" \ -"${PROG} [a-z]*: I know nothing about xyzpdq" +"${PROG} diff: I know nothing about xyzpdq" touch abc dotest diff-4 "${testcvs} add abc" \ -"${PROG} [a-z]*: scheduling file .abc. for addition -${PROG} [a-z]*: use .${PROG} commit. to add this file permanently" +"${PROG} add: scheduling file .abc. for addition +${PROG} add: use .${PROG} commit. to add this file permanently" dotest diff-5 "${testcvs} -q ci -mtest" \ "RCS file: ${CVSROOT_DIRNAME}/first-dir/abc,v done @@ -3908,6 +4450,166 @@ extern int gethostname (); rm -r 1 ;; + diffnl) + # Test handling of 'cvs diff' of files without newlines + mkdir 1; cd 1 + dotest diffnl-000 "${testcvs} -q co -l ." '' + mkdir first-dir + dotest diffnl-001 "${testcvs} add first-dir" \ +"Directory ${CVSROOT_DIRNAME}/first-dir added to the repository" + cd first-dir + + ${AWK} 'BEGIN {printf("one\ntwo\nthree\nfour\nfive\nsix")}' </dev/null >abc + dotest diffnl-002 "${testcvs} add abc" \ +"${PROG} add: scheduling file .abc. for addition +${PROG} add: use .${PROG} commit. to add this file permanently" + dotest diffnl-003 "${testcvs} -q ci -mtest" \ +"RCS file: ${CVSROOT_DIRNAME}/first-dir/abc,v +done +Checking in abc; +${CVSROOT_DIRNAME}/first-dir/abc,v <-- abc +initial revision: 1\.1 +done" + + # change to line near EOF + ${AWK} 'BEGIN {printf("one\ntwo\nthree\nfour\nsix")}' </dev/null >abc + dotest_fail diffnl-100 "${testcvs} diff abc" \ +"Index: abc +=================================================================== +RCS file: ${CVSROOT_DIRNAME}/first-dir/abc,v +retrieving revision 1\.1 +diff -r1\.1 abc +5d4 +< five" + dotest_fail diffnl-101 "${testcvs} diff -u abc" \ +"Index: abc +=================================================================== +RCS file: ${CVSROOT_DIRNAME}/first-dir/abc,v +retrieving revision 1\.1 +diff -u -r1\.1 abc +--- abc ${RFCDATE} 1\.1 ++++ abc ${RFCDATE} +@@ -2,5 +2,4 @@ + two + three + four +-five + six +\\\\ No newline at end of file" + dotest diffnl-102 "${testcvs} -q ci -mtest abc" \ +"Checking in abc; +${CVSROOT_DIRNAME}/first-dir/abc,v <-- abc +new revision: 1\.2; previous revision: 1\.1 +done" + + # Change to last line + ${AWK} 'BEGIN {printf("one\ntwo\nthree\nfour\nseven")}' </dev/null >abc + dotest_fail diffnl-200 "${testcvs} diff abc" \ +"Index: abc +=================================================================== +RCS file: ${CVSROOT_DIRNAME}/first-dir/abc,v +retrieving revision 1\.2 +diff -r1\.2 abc +5c5 +< six +\\\\ No newline at end of file +--- +> seven +\\\\ No newline at end of file" + dotest_fail diffnl-201 "${testcvs} diff -u abc" \ +"Index: abc +=================================================================== +RCS file: ${CVSROOT_DIRNAME}/first-dir/abc,v +retrieving revision 1\.2 +diff -u -r1\.2 abc +--- abc ${RFCDATE} 1\.2 ++++ abc ${RFCDATE} +@@ -2,4 +2,4 @@ + two + three + four +-six +\\\\ No newline at end of file ++seven +\\\\ No newline at end of file" + dotest diffnl-202 "${testcvs} ci -mtest abc" \ +"Checking in abc; +${CVSROOT_DIRNAME}/first-dir/abc,v <-- abc +new revision: 1\.3; previous revision: 1\.2 +done" + + # Addition of newline + echo "one +two +three +four +seven" > abc + dotest_fail diffnl-300 "${testcvs} diff abc" \ +"Index: abc +=================================================================== +RCS file: ${CVSROOT_DIRNAME}/first-dir/abc,v +retrieving revision 1\.3 +diff -r1\.3 abc +5c5 +< seven +\\\\ No newline at end of file +--- +> seven" + dotest_fail diffnl-301 "${testcvs} diff -u abc" \ +"Index: abc +=================================================================== +RCS file: ${CVSROOT_DIRNAME}/first-dir/abc,v +retrieving revision 1\.3 +diff -u -r1\.3 abc +--- abc ${RFCDATE} 1\.3 ++++ abc ${RFCDATE} +@@ -2,4 +2,4 @@ + two + three + four +-seven +\\\\ No newline at end of file ++seven" + dotest diffnl-302 "${testcvs} ci -mtest abc" \ +"Checking in abc; +${CVSROOT_DIRNAME}/first-dir/abc,v <-- abc +new revision: 1\.4; previous revision: 1\.3 +done" + + # Removal of newline + ${AWK} 'BEGIN {printf("one\ntwo\nthree\nfour\nseven")}' </dev/null >abc + dotest_fail diffnl-400 "${testcvs} diff abc" \ +"Index: abc +=================================================================== +RCS file: ${CVSROOT_DIRNAME}/first-dir/abc,v +retrieving revision 1\.4 +diff -r1\.4 abc +5c5 +< seven +--- +> seven +\\\\ No newline at end of file" + dotest_fail diffnl-401 "${testcvs} diff -u abc" \ +"Index: abc +=================================================================== +RCS file: ${CVSROOT_DIRNAME}/first-dir/abc,v +retrieving revision 1\.4 +diff -u -r1\.4 abc +--- abc ${RFCDATE} 1\.4 ++++ abc ${RFCDATE} +@@ -2,4 +2,4 @@ + two + three + four +-seven ++seven +\\\\ No newline at end of file" + + cd ../.. + rm -r 1 + rm -rf ${CVSROOT_DIRNAME}/first-dir + ;; + death) # next dive. test death support. @@ -3933,8 +4635,8 @@ extern int gethostname (); cd subdir echo file in subdir >sfile dotest 65a1 "${testcvs} add sfile" \ -"${PROG}"' [a-z]*: scheduling file `sfile'\'' for addition -'"${PROG}"' [a-z]*: use .'"${PROG}"' commit. to add this file permanently' +"${PROG}"' add: scheduling file `sfile'\'' for addition +'"${PROG}"' add: use .'"${PROG}"' commit. to add this file permanently' dotest 65a2 "${testcvs} -q ci -m add-it" \ "RCS file: ${CVSROOT_DIRNAME}/first-dir/subdir/sfile,v done @@ -3944,8 +4646,8 @@ initial revision: 1\.1 done" rm sfile dotest 65a3 "${testcvs} rm sfile" \ -"${PROG}"' [a-z]*: scheduling `sfile'\'' for removal -'"${PROG}"' [a-z]*: use .'"${PROG}"' commit. to remove this file permanently' +"${PROG}"' remove: scheduling `sfile'\'' for removal +'"${PROG}"' remove: use .'"${PROG}"' commit. to remove this file permanently' dotest 65a4 "${testcvs} -q ci -m remove-it" \ "Removing sfile; ${CVSROOT_DIRNAME}/first-dir/subdir/sfile,v <-- sfile @@ -4019,8 +4721,8 @@ done" # file4 will be dead at the time of branching and stay dead. echo file4 > file4 dotest death-file4-add "${testcvs} add file4" \ -"${PROG}"' [a-z]*: scheduling file `file4'\'' for addition -'"${PROG}"' [a-z]*: use .'"${PROG}"' commit. to add this file permanently' +"${PROG}"' add: scheduling file `file4'\'' for addition +'"${PROG}"' add: use .'"${PROG}"' commit. to add this file permanently' dotest death-file4-ciadd "${testcvs} -q ci -m add file4" \ "RCS file: ${CVSROOT_DIRNAME}/first-dir/file4,v done @@ -4030,8 +4732,8 @@ initial revision: 1\.1 done" rm file4 dotest death-file4-rm "${testcvs} remove file4" \ -"${PROG}"' [a-z]*: scheduling `file4'\'' for removal -'"${PROG}"' [a-z]*: use .'"${PROG}"' commit. to remove this file permanently' +"${PROG}"' remove: scheduling `file4'\'' for removal +'"${PROG}"' remove: use .'"${PROG}"' commit. to remove this file permanently' dotest death-file4-cirm "${testcvs} -q ci -m remove file4" \ "Removing file4; ${CVSROOT_DIRNAME}/first-dir/file4,v <-- file4 @@ -4077,22 +4779,22 @@ T file2' "${testcvs} -q rdiff -r bp_branch1 -r branch1 first-dir" \ "Index: first-dir/file3 diff -c /dev/null first-dir/file3:1\.1\.2\.1 -\*\*\* /dev/null .* ---- first-dir/file3 .* +\*\*\* /dev/null ${DATE} +--- first-dir/file3 ${DATE} \*\*\*\*\*\*\*\*\*\*\*\*\*\*\* \*\*\* 0 \*\*\*\* --- 1 ---- ${PLUS} line1 from branch1" dotest death-76a1 \ "${testcvs} -q rdiff -r branch1 -r bp_branch1 first-dir" \ -'Index: first-dir/file3 +"Index: first-dir/file3 diff -c first-dir/file3:1\.1\.2\.1 first-dir/file3:removed -\*\*\* first-dir/file3:1\.1\.2\.1 .* ---- first-dir/file3 .* +\*\*\* first-dir/file3:1\.1\.2\.1 ${DATE} +--- first-dir/file3 ${DATE} \*\*\*\*\*\*\*\*\*\*\*\*\*\*\* \*\*\* 1 \*\*\*\* - line1 from branch1 ---- 0 ----' +--- 0 ----" # remove rm file3 @@ -4170,7 +4872,7 @@ diff -c first-dir/file3:1\.1\.2\.1 first-dir/file3:removed retrieving revision 1\.3 retrieving revision 1\.3\.2\.1 Merging differences between 1\.3 and 1\.3\.2\.1 into file1 -${PROG} [a-z]*: scheduling file2 for removal +${PROG} update: scheduling file2 for removal U file3" dotest_fail death-file4-5 "test -f file4" '' @@ -4241,7 +4943,7 @@ U first-dir/file3' # typo; try to get to the branch and fail dotest_fail 92.1a "${testcvs} update -r brnach1" \ - "${PROG}"' \[[a-z]* aborted\]: no such tag brnach1' + "${PROG}"' \[update aborted\]: no such tag brnach1' # Make sure we are still on the trunk if test -f file1 ; then fail 92.1b @@ -4271,8 +4973,8 @@ U first-dir/file3' # and join dotest 95 "${testcvs} -q update -j HEAD" \ -"${PROG}"' [a-z]*: file file1 has been modified, but has been removed in revision HEAD -'"${PROG}"' [a-z]*: file file3 exists, but has been added in revision HEAD' +"${PROG}"' update: file file1 has been modified, but has been removed in revision HEAD +'"${PROG}"' update: file file3 exists, but has been added in revision HEAD' dotest_fail death-file4-7 "test -f file4" '' @@ -4297,9 +4999,9 @@ U first-dir/file3' echo "first revision" > file1 echo "file4 first revision" > file4 dotest death2-2 "${testcvs} add file1 file4" \ -"${PROG}"' [a-z]*: scheduling file `file1'\'' for addition -'"${PROG}"' [a-z]*: scheduling file `file4'\'' for addition -'"${PROG}"' [a-z]*: use .'"${PROG}"' commit. to add these files permanently' +"${PROG}"' add: scheduling file `file1'\'' for addition +'"${PROG}"' add: scheduling file `file4'\'' for addition +'"${PROG}"' add: use .'"${PROG}"' commit. to add these files permanently' dotest death2-3 "${testcvs} -q commit -m add" \ "RCS file: ${CVSROOT_DIRNAME}/first-dir/file1,v @@ -4329,12 +5031,12 @@ T file4' # Delete the file on the branch. rm file1 dotest death2-7 "${testcvs} rm file1" \ -"${PROG} [a-z]*: scheduling .file1. for removal -${PROG} [a-z]*: use .${PROG} commit. to remove this file permanently" +"${PROG} remove: scheduling .file1. for removal +${PROG} remove: use .${PROG} commit. to remove this file permanently" # Test diff of the removed file before it is committed. dotest_fail death2-diff-1 "${testcvs} -q diff file1" \ -"${PROG} [a-z]*: file1 was removed, no comparison available" +"${PROG} diff: file1 was removed, no comparison available" dotest_fail death2-diff-2 "${testcvs} -q diff -N -c file1" \ "Index: file1 @@ -4351,13 +5053,19 @@ diff -N file1 dotest death2-8 "${testcvs} -q ci -m removed" \ "Removing file1; ${CVSROOT_DIRNAME}/first-dir/file1,v <-- file1 -new revision: delete; previous revision: 1\.1\.2 +new revision: delete; previous revision: 1\.1 done" # Test diff of a dead file. dotest_fail death2-diff-3 \ "${testcvs} -q diff -r1.1 -rbranch -c file1" \ -"${PROG} [a-z]*: file1 was removed, no comparison available" +"${PROG} diff: Tag branch refers to a dead (removed) revision in file .file1.\. +${PROG} diff: No comparison available\. Pass .-N. to .${PROG} diff.${QUESTION}" + # and in reverse + dotest_fail death2-diff-3a \ +"${testcvs} -q diff -rbranch -r1.1 -c file1" \ +"${PROG} diff: Tag branch refers to a dead (removed) revision in file .file1.\. +${PROG} diff: No comparison available\. Pass .-N. to .${PROG} diff.${QUESTION}" dotest_fail death2-diff-4 \ "${testcvs} -q diff -r1.1 -rbranch -N -c file1" \ @@ -4371,9 +5079,23 @@ diff -N file1 \*\*\* 1 \*\*\*\* - first revision --- 0 ----" + # and in reverse + dotest_fail death2-diff-4a \ +"${testcvs} -q diff -rbranch -r1.1 -N -c file1" \ +"Index: file1 +=================================================================== +RCS file: file1 +diff -N file1 +\*\*\* /dev/null ${RFCDATE_EPOCH} +--- file1 ${RFCDATE} [0-9.]* +\*\*\*\*\*\*\*\*\*\*\*\*\*\*\* +\*\*\* 0 \*\*\*\* +--- 1 ---- ++ first revision" + dotest_fail death2-diff-5 "${testcvs} -q diff -rtag -c ." \ -"${PROG} [a-z]*: file1 no longer exists, no comparison available" +"${PROG} diff: file1 no longer exists, no comparison available" dotest_fail death2-diff-6 "${testcvs} -q diff -rtag -N -c ." \ "Index: file1 @@ -4404,12 +5126,12 @@ diff -c first-dir/file1:1\.1 first-dir/file1:removed # Readd the file to the branch. echo "second revision" > file1 dotest death2-9 "${testcvs} add file1" \ -"${PROG}"' [a-z]*: file `file1'\'' will be added on branch `branch'\'' from version 1\.1\.2\.1 -'"${PROG}"' [a-z]*: use .'"${PROG}"' commit. to add this file permanently' +"${PROG}"' add: file `file1'\'' will be added on branch `branch'\'' from version 1\.1\.2\.1 +'"${PROG}"' add: use .'"${PROG}"' commit. to add this file permanently' # Test diff of the added file before it is committed. dotest_fail death2-diff-7 "${testcvs} -q diff file1" \ -"${PROG} [a-z]*: file1 is a new entry, no comparison available" +"${PROG} diff: file1 is a new entry, no comparison available" dotest_fail death2-diff-8 "${testcvs} -q diff -N -c file1" \ "Index: file1 @@ -4431,12 +5153,12 @@ 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" +"${PROG} remove: scheduling .file4. for removal +${PROG} remove: use .${PROG} commit. to remove this file permanently" dotest death2-10b "${testcvs} -q ci -m removed" \ "Removing file4; ${CVSROOT_DIRNAME}/first-dir/file4,v <-- file4 -new revision: delete; previous revision: 1\.1\.2 +new revision: delete; previous revision: 1\.1 done" # Back to the trunk. @@ -4447,8 +5169,8 @@ U file4" # Add another file on the trunk. echo "first revision" > file2 dotest death2-12 "${testcvs} add file2" \ -"${PROG}"' [a-z]*: scheduling file `file2'\'' for addition -'"${PROG}"' [a-z]*: use .'"${PROG}"' commit. to add this file permanently' +"${PROG}"' add: scheduling file `file2'\'' for addition +'"${PROG}"' add: use .'"${PROG}"' commit. to add this file permanently' dotest death2-13 "${testcvs} -q commit -m add" \ "RCS file: ${CVSROOT_DIRNAME}/first-dir/file2,v done @@ -4471,14 +5193,14 @@ done" # this case. dotest death2-14 "${testcvs} -q update -r branch" \ "[UP] file1 -${PROG} [a-z]*: file2 is no longer in the repository -${PROG} [a-z]*: file4 is no longer in the repository" +${PROG} update: file2 is no longer in the repository +${PROG} update: file4 is no longer in the repository" # Add a file on the branch with the same name. echo "branch revision" > file2 dotest death2-15 "${testcvs} add file2" \ -"${PROG}"' [a-z]*: scheduling file `file2'\'' for addition on branch `branch'\'' -'"${PROG}"' [a-z]*: use .'"${PROG}"' commit. to add this file permanently' +"${PROG}"' add: scheduling file `file2'\'' for addition on branch `branch'\'' +'"${PROG}"' add: use .'"${PROG}"' commit. to add this file permanently' dotest death2-16 "${testcvs} -q commit -m add" \ "Checking in file2; ${CVSROOT_DIRNAME}/first-dir/file2,v <-- file2 @@ -4488,8 +5210,8 @@ done" # Add a new file on the branch. echo "first revision" > file3 dotest death2-17 "${testcvs} add file3" \ -"${PROG}"' [a-z]*: scheduling file `file3'\'' for addition on branch `branch'\'' -'"${PROG}"' [a-z]*: use .'"${PROG}"' commit. to add this file permanently' +"${PROG}"' add: scheduling file `file3'\'' for addition on branch `branch'\'' +'"${PROG}"' add: use .'"${PROG}"' commit. to add this file permanently' dotest death2-18 "${testcvs} -q commit -m add" \ "RCS file: ${CVSROOT_DIRNAME}/first-dir/Attic/file3,v done @@ -4500,7 +5222,7 @@ done" # Test diff of a nonexistent tag dotest_fail death2-diff-9 "${testcvs} -q diff -rtag -c file3" \ -"${PROG} [a-z]*: tag tag is not in file file3" +"${PROG} diff: tag tag is not in file file3" dotest_fail death2-diff-10 "${testcvs} -q diff -rtag -N -c file3" \ "Index: file3 @@ -4528,9 +5250,9 @@ diff -c -r1\.1 -r1\.1\.2\.2 ! first revision --- 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]*: file4 no longer exists, no comparison available" +${PROG} diff: tag tag is not in file file2 +${PROG} diff: tag tag is not in file file3 +${PROG} diff: file4 no longer exists, no comparison available" dotest_fail death2-diff-12 "${testcvs} -q diff -rtag -c -N ." \ "Index: file1 @@ -4580,15 +5302,16 @@ diff -N file4 # Switch to the nonbranch tag. dotest death2-19 "${testcvs} -q update -r tag" \ "[UP] file1 -${PROG} [a-z]*: file2 is no longer in the repository -${PROG} [a-z]*: file3 is no longer in the repository +${PROG} update: file2 is no longer in the repository +${PROG} update: file3 is no longer in the repository U file4" dotest_fail death2-20 "test -f file2" # Make sure diff only reports appropriate files. dotest_fail death2-diff-13 "${testcvs} -q diff -r rdiff-tag" \ -"${PROG} [a-z]*: file1 is a new entry, no comparison available" +"${PROG} diff: Tag rdiff-tag refers to a dead (removed) revision in file .file1.\. +${PROG} diff: No comparison available\. Pass .-N. to .${PROG} diff.${QUESTION}" dotest_fail death2-diff-14 "${testcvs} -q diff -r rdiff-tag -c -N" \ "Index: file1 @@ -4615,8 +5338,8 @@ U first-dir/file4" cd first-dir dotest death2-23 "${testcvs} rm -f file4" \ -"${PROG} [a-z]*: scheduling .file4. for removal -${PROG} [a-z]*: use .${PROG} commit. to remove this file permanently" +"${PROG} remove: scheduling .file4. for removal +${PROG} remove: use .${PROG} commit. to remove this file permanently" dotest death2-24 "${testcvs} -q ci -m removed file4" \ "Removing file4; ${CVSROOT_DIRNAME}/first-dir/file4,v <-- file4 @@ -4625,7 +5348,7 @@ done" cd .. echo "new stuff" >file4 dotest_fail death2-25 "${testcvs} up file4" \ -"${PROG} [a-z]*: conflict: file4 is modified but no longer in the repository +"${PROG} update: conflict: file4 is modified but no longer in the repository C file4" cd .. ; rm -rf first-dir ${CVSROOT_DIRNAME}/first-dir @@ -4642,7 +5365,7 @@ C file4" file=x echo >$file dotest rm-update-message-setup-2 "$testcvs -q add $file" \ -"$PROG [a-z]*: use .$PROG commit. to add this file permanently" +"${PROG} add: use .${PROG} commit. to add this file permanently" dotest rm-update-message-setup-3 "$testcvs -q ci -mcreate $file" \ "RCS file: $CVSROOT_DIRNAME/rm-update-message/$file,v done @@ -4652,13 +5375,9 @@ initial revision: 1\.1 done" rm $file - if $remote; then - dotest rm-update-message-1 "$testcvs up $file" "U $file" - else - dotest rm-update-message-1 "$testcvs up $file" \ -"$PROG [a-z]*: warning: $file was lost + dotest rm-update-message-1 "$testcvs up $file" \ +"${PROG} update: warning: $file was lost U $file" - fi cd ../.. if $keep; then :; else @@ -4684,17 +5403,17 @@ U $file" cd first-dir echo first file1 >file1 dotest rmadd-3 "${testcvs} add file1" \ -"${PROG} [a-z]*: scheduling file .file1. for addition -${PROG} [a-z]*: use .${PROG} commit. to add this file permanently" +"${PROG} add: scheduling file .file1. for addition +${PROG} add: use .${PROG} commit. to add this file permanently" dotest_fail rmadd-4 "${testcvs} -q ci -r 1.2.2.4 -m add" \ -"${PROG} [a-z]*: cannot add file .file1' with revision .1\.2\.2\.4'; must be on trunk -${PROG} \[[a-z]* aborted\]: correct above errors first!" +"${PROG} commit: cannot add file .file1' with revision .1\.2\.2\.4'; must be on trunk +${PROG} \[commit aborted\]: correct above errors first!" dotest_fail rmadd-5 "${testcvs} -q ci -r 1.2.2 -m add" \ -"${PROG} [a-z]*: cannot add file .file1' with revision .1\.2\.2'; must be on trunk -${PROG} \[[a-z]* aborted\]: correct above errors first!" +"${PROG} commit: cannot add file .file1' with revision .1\.2\.2'; must be on trunk +${PROG} \[commit aborted\]: correct above errors first!" dotest_fail rmadd-6 "${testcvs} -q ci -r mybranch -m add" \ -"${PROG} \[[a-z]* aborted\]: no such tag mybranch" +"${PROG} \[commit aborted\]: no such tag mybranch" # The thing with the trailing periods strikes me as a very # bizarre behavior, but it would seem to be intentional @@ -4726,8 +5445,8 @@ done" # saying "sticky tag is not a branch" like keywordlog-4b. # Or something. dotest rmadd-10 "${testcvs} add file2" \ -"${PROG} [a-z]*: scheduling file .file2. for addition on branch .7' -${PROG} [a-z]*: use .${PROG} commit. to add this file permanently" +"${PROG} add: scheduling file .file2. for addition on branch .7' +${PROG} add: use .${PROG} commit. to add this file permanently" # As in the previous example, CVS is confused.... dotest rmadd-11 "${testcvs} -q ci -m add" \ "RCS file: ${CVSROOT_DIRNAME}/first-dir/file2,v @@ -4740,12 +5459,12 @@ done" dotest rmadd-12 "${testcvs} -q update -A" "" touch file3 dotest rmadd-13 "${testcvs} add file3" \ -"${PROG} [a-z]*: scheduling file .file3. for addition -${PROG} [a-z]*: use .${PROG} commit. to add this file permanently" +"${PROG} add: scheduling file .file3. for addition +${PROG} add: use .${PROG} commit. to add this file permanently" # Huh? file2 is not up to date? Seems buggy to me.... dotest_fail rmadd-14 "${testcvs} -q ci -r mybranch -m add" \ -"${PROG} [a-z]*: Up-to-date check failed for .file2' -${PROG} \[[a-z]* aborted\]: correct above errors first!" +"${PROG} commit: Up-to-date check failed for .file2' +${PROG} \[commit aborted\]: correct above errors first!" # Whatever, let's not let file2 distract us.... dotest rmadd-15 "${testcvs} -q ci -r mybranch -m add file3" \ "RCS file: ${CVSROOT_DIRNAME}/first-dir/Attic/file3,v @@ -4757,15 +5476,15 @@ done" touch file4 dotest rmadd-16 "${testcvs} add file4" \ -"${PROG} [a-z]*: scheduling file .file4. for addition -${PROG} [a-z]*: use .${PROG} commit. to add this file permanently" +"${PROG} add: scheduling file .file4. for addition +${PROG} add: use .${PROG} commit. to add this file permanently" # Same "Up-to-date check" issues as in rmadd-14. # The "no such tag" thing is due to the fact that we only # update val-tags when the tag is used (might be more of a # bug than a feature, I dunno). dotest_fail rmadd-17 \ "${testcvs} -q ci -r mynonbranch -m add file4" \ -"${PROG} \[[a-z]* aborted\]: no such tag mynonbranch" +"${PROG} \[commit aborted\]: no such tag mynonbranch" # Try to make CVS write val-tags. dotest rmadd-18 "${testcvs} -q update -p -r mynonbranch file1" \ "first file1" @@ -4773,7 +5492,7 @@ ${PROG} [a-z]*: use .${PROG} commit. to add this file permanently" # behavior). dotest_fail rmadd-19 \ "${testcvs} -q ci -r mynonbranch -m add file4" \ -"${PROG} \[[a-z]* aborted\]: no such tag mynonbranch" +"${PROG} \[commit aborted\]: no such tag mynonbranch" # Now make CVS write val-tags for real. dotest rmadd-20 "${testcvs} -q update -r mynonbranch file1" "" # Oops - CVS isn't distinguishing between a branch tag and @@ -4791,8 +5510,8 @@ done" # a modification with ci -r and sniff around for sticky tags. echo file5 >file5 dotest rmadd-22 "${testcvs} add file5" \ -"${PROG} [a-z]*: scheduling file .file5. for addition -${PROG} [a-z]*: use .${PROG} commit. to add this file permanently" +"${PROG} add: scheduling file .file5. for addition +${PROG} add: use .${PROG} commit. to add this file permanently" if $remote; then # Interesting bug (or missing feature) here. findmaxrev # gets the major revision from the Entries. Well, remote @@ -4823,8 +5542,8 @@ done" dotest_fail rmadd-24 "${testcvs} -q ci -r 4.8 -m change file5" \ "Checking in file5; ${CVSROOT_DIRNAME}/first-dir/file5,v <-- file5 -${PROG} [a-z]*: ${CVSROOT_DIRNAME}/first-dir/file5,v: revision 4\.8 too low; must be higher than 7\.1 -${PROG} [a-z]*: could not check in file5" +${PROG} commit: ${CVSROOT_DIRNAME}/first-dir/file5,v: revision 4\.8 too low; must be higher than 7\.1 +${PROG} commit: could not check in file5" dotest rmadd-24a "${testcvs} -q ci -r 8.4 -m change file5" \ "Checking in file5; ${CVSROOT_DIRNAME}/first-dir/file5,v <-- file5 @@ -4848,7 +5567,7 @@ File: file5 Status: Up-to-date "Directory ${CVSROOT_DIRNAME}/first-dir/sub added to the repository" echo hello >sub/subfile dotest rmadd-27 "${testcvs} -q add sub/subfile" \ -"${PROG} [a-z]*: use .$PROG commit. to add this file permanently" +"${PROG} add: use .${PROG} commit. to add this file permanently" dotest rmadd-28 "${testcvs} -q ci -m. sub" \ "RCS file: ${CVSROOT_DIRNAME}/first-dir/sub/subfile,v @@ -4860,8 +5579,8 @@ done" # lose the branch dotest rmadd-29 "${testcvs} -q up -A" \ -"${PROG} [a-z]*: file3 is no longer in the repository -${PROG} [a-z]*: file4 is no longer in the repository" +"${PROG} update: file3 is no longer in the repository +${PROG} update: file4 is no longer in the repository" # -f disables recursion dotest rmadd-30 "${testcvs} -q ci -f -r9 -m." \ @@ -4921,8 +5640,8 @@ done" cd first-dir echo 'initial contents' >file1 dotest rmadd2-3 "${testcvs} add file1" \ -"${PROG} [a-z]*: scheduling file .file1. for addition -${PROG} [a-z]*: use .${PROG} commit. to add this file permanently" +"${PROG} add: scheduling file .file1. for addition +${PROG} add: use .${PROG} commit. to add this file permanently" dotest rmadd2-4 "${testcvs} -q ci -m add" \ "RCS file: ${CVSROOT_DIRNAME}/first-dir/file1,v done @@ -4932,8 +5651,8 @@ initial revision: 1\.1 done" dotest rmadd2-4a "${testcvs} -Q tag tagone" "" dotest rmadd2-5 "${testcvs} rm -f file1" \ -"${PROG} [a-z]*: scheduling .file1. for removal -${PROG} [a-z]*: use .${PROG} commit. to remove this file permanently" +"${PROG} remove: scheduling .file1. for removal +${PROG} remove: use .${PROG} commit. to remove this file permanently" dotest rmadd2-6 "${testcvs} -q ci -m remove" \ "Removing file1; ${CVSROOT_DIRNAME}/first-dir/file1,v <-- file1 @@ -4967,7 +5686,7 @@ done" # Hmm, might be a bit odd that this works even if 1.3 is not # the head. dotest rmadd2-14 "${testcvs} -q update -j 1.3 -j 1.2 file1" \ -"${PROG} [a-z]*: scheduling file1 for removal" +"${PROG} update: scheduling file1 for removal" # Check that -p can get arbitrary revisions of a removed file dotest rmadd2-14a "${testcvs} -q update -p" "initial contents" @@ -5007,6 +5726,155 @@ File: no file file1 Status: Up-to-date rm -rf ${CVSROOT_DIRNAME}/first-dir ;; + rmadd3) + # This test demonstrates that CVS notices that file1 exists rather + # that deleting or writing over it after: + # + # cvs remove -f file1; touch file1; cvs add file1. + # + # According to the manual, this should work for: + # + # rm file1; cvs remove file1; cvs add file1 + # + # but in past version of CVS, new content in file1 would be + # erroneously deleted when file1 reappeared between the remove and + # the add. + # + # Later versions of CVS would refuse to perform the add, but still + # allow a subsequent local commit to erase the file from the + # workspace, possibly losing data. + mkdir 1; cd 1 + dotest rmadd3-init1 "${testcvs} -q co -l ." '' + mkdir first-dir + dotest rmadd3-init2 "${testcvs} add first-dir" \ +"Directory ${CVSROOT_DIRNAME}/first-dir added to the repository" + cd first-dir + + echo initial content for file1 >file1 + dotest rmadd3-init3 "${testcvs} add file1" \ +"${PROG} add: scheduling file \`file1' for addition +${PROG} add: use '${PROG} commit' to add this file permanently" + dotest rmadd3-init4 "${testcvs} -q ci -m add" \ +"RCS file: ${CVSROOT_DIRNAME}/first-dir/file1,v +done +Checking in file1; +${CVSROOT_DIRNAME}/first-dir/file1,v <-- file1 +initial revision: 1\.1 +done" + + # Here begins the guts of this test, as detailed above. + dotest rmadd3-1 "${testcvs} rm -f file1" \ +"${PROG} remove: scheduling \`file1' for removal +${PROG} remove: use '${PROG} commit' to remove this file permanently" + + # Now recreate the file: + echo desired future contents for file1 >file1 + + # And attempt to resurrect it at the same time: + dotest_fail rmadd3-2 "${testcvs} add file1" \ +"${PROG} add: file1 should be removed and is still there (or is back again)" + + # Now prove that commit knows that it shouldn't erase files. + dotest_fail rmadd3-3 "${testcvs} -q ci -m." \ +"$PROG commit: \`file1' should be removed and is still there (or is back again) +$PROG \[commit aborted\]: correct above errors first!" + + # Then these should pass too: + dotest rmadd3-4 "test -f file1" + dotest rmadd3-5 "cat file1" "desired future contents for file1" + + if $keep; then + echo Keeping ${TESTDIR} and exiting due to --keep + exit 0 + fi + + cd ../.. + rm -r 1 + rm -rf ${CVSROOT_DIRNAME}/first-dir + ;; + + resurrection) + # This test tests a few file resurrection scenarios. + mkdir 1; cd 1 + dotest resurrection-init1 "$testcvs -q co -l ." '' + mkdir first-dir + dotest resurrection-init2 "$testcvs add first-dir" \ +"Directory $CVSROOT_DIRNAME/first-dir added to the repository" + cd first-dir + + echo initial content for file1 >file1 + dotest resurrection-init3 "$testcvs add file1" \ +"$PROG add: scheduling file \`file1' for addition +$PROG add: use '$PROG commit' to add this file permanently" + dotest resurrection-init4 "$testcvs -q ci -m add" \ +"RCS file: $CVSROOT_DIRNAME/first-dir/file1,v +done +Checking in file1; +$CVSROOT_DIRNAME/first-dir/file1,v <-- file1 +initial revision: 1\.1 +done" + + dotest resurrection-init5 "$testcvs -Q rm -f file1" + + # The first test is that `cvs add' will resurrect a file before it + # has been committed. + dotest_sort resurrection-1 "$testcvs add file1" \ +"U file1 +$PROG add: file1, version 1\.1, resurrected" + dotest resurrection-2 "$testcvs -Q diff file1" "" + + dotest resurrection-init6 "$testcvs -Q tag -b resurrection" + dotest resurrection-init7 "$testcvs -Q rm -f file1" + dotest resurrection-init8 "$testcvs -Q ci -mrm" \ +"Removing file1; +$CVSROOT_DIRNAME/first-dir/file1,v <-- file1 +new revision: delete; previous revision: 1\.1 +done" + + # The next test is that CVS will resurrect a committed removal. + dotest_sort resurrection-3 "$testcvs add file1" \ +"U file1 +$PROG add: Re-adding file \`file1' (in place of dead revision 1\.2)\. +$PROG add: Resurrecting file \`file1' from revision 1\.1\. +$PROG add: use 'cvs commit' to add this file permanently" + dotest resurrection-4 "$testcvs -q diff -r1.1 file1" "" + dotest resurrection-5 "$testcvs -q ci -mreadd" \ +"Checking in file1; +$CVSROOT_DIRNAME/first-dir/file1,v <-- file1 +new revision: 1\.3; previous revision: 1\.2 +done" + + dotest resurrection-init9 "$testcvs -Q up -rresurrection" + dotest resurrection-init10 "$testcvs -Q rm -f file1" + dotest resurrection-init11 "$testcvs -Q ci -mrm-on-resurrection" \ +"Removing file1; +$CVSROOT_DIRNAME/first-dir/file1,v <-- file1 +new revision: delete; previous revision: 1\.1 +done" + + # The next test is that CVS will resurrect a committed removal to a + # branch. + dotest_sort resurrection-6 "$testcvs add file1" \ +"U file1 +$PROG add: Resurrecting file \`file1' from revision 1\.1\. +$PROG add: file \`file1' will be added on branch \`resurrection' from version 1\.1\.2\.1 +$PROG add: use 'cvs commit' to add this file permanently" + dotest resurrection-7 "$testcvs -Q diff -r1.1 file1" "" + dotest resurrection-8 "$testcvs -q ci -mreadd" \ +"Checking in file1; +$CVSROOT_DIRNAME/first-dir/file1,v <-- file1 +new revision: 1\.1\.2\.2; previous revision: 1\.1\.2\.1 +done" + if $keep; then + echo Keeping $TESTDIR and exiting due to --keep + exit 0 + fi + + cd ../.. + rm -r 1 + rm -rf $CVSROOT_DIRNAME/first-dir + ;; + dirs) # Tests related to removing and adding directories. # See also: @@ -5028,7 +5896,7 @@ File: no file file1 Status: Up-to-date N dir1/file1 N dir1/sdir/sfile No conflicts created by this import -${PROG} [a-z]*: Importing ${CVSROOT_DIRNAME}/dir1/sdir" +${PROG} import: Importing ${CVSROOT_DIRNAME}/dir1/sdir" cd .. mkdir 1; cd 1 @@ -5043,23 +5911,23 @@ ${PROG} [a-z]*: Importing ${CVSROOT_DIRNAME}/dir1/sdir" rm -rf ${CVSROOT_DIRNAME}/dir1/sdir dotest dirs-3 "${testcvs} update" \ -"${PROG} [a-z]*: Updating dir1 -${PROG} [a-z]*: Updating dir1/sdir -${PROG} [a-z]*: cannot open directory ${CVSROOT_DIRNAME}/dir1/sdir: No such file or directory -${PROG} [a-z]*: skipping directory dir1/sdir" +"${PROG} update: Updating dir1 +${PROG} update: Updating dir1/sdir +${PROG} update: cannot open directory ${CVSROOT_DIRNAME}/dir1/sdir: No such file or directory +${PROG} update: skipping directory dir1/sdir" dotest dirs-3a "${testcvs} update -d" \ -"${PROG} [a-z]*: Updating dir1 -${PROG} [a-z]*: Updating dir1/sdir -${PROG} [a-z]*: cannot open directory ${CVSROOT_DIRNAME}/dir1/sdir: No such file or directory -${PROG} [a-z]*: skipping directory dir1/sdir" +"${PROG} update*: Updating dir1 +${PROG} update: Updating dir1/sdir +${PROG} update: cannot open directory ${CVSROOT_DIRNAME}/dir1/sdir: No such file or directory +${PROG} update: skipping directory dir1/sdir" # If we say "yes", then CVS gives errors about not being able to # create lock files. # The fact that it says "skipping directory " rather than # "skipping directory dir1/sdir" is some kind of bug. - echo no | dotest dirs-4 "${testcvs} release -d dir1/sdir" \ -"${PROG} [a-z]*: cannot open directory ${CVSROOT_DIRNAME}/dir1/sdir: No such file or directory -${PROG} [a-z]*: skipping directory + dotest dirs-4 "echo no | ${testcvs} release -d dir1/sdir" \ +"${PROG} update: cannot open directory ${CVSROOT_DIRNAME}/dir1/sdir: No such file or directory +${PROG} update: skipping directory You have \[0\] altered files in this repository\. Are you sure you want to release (and delete) directory .dir1/sdir': .. .release' aborted by user choice." @@ -5069,12 +5937,12 @@ Are you sure you want to release (and delete) directory .dir1/sdir': .. .release dotest dirs-5 "cat dir1/CVS/Entries" \ "/file1/1.1.1.1/[a-zA-Z0-9 :]*// D/sdir////" - dotest dirs-6 "${testcvs} update" "${PROG} [a-z]*: Updating dir1" + dotest dirs-6 "${testcvs} update" "${PROG} update: Updating dir1" dotest dirs-7 "cat dir1/CVS/Entries" \ "/file1/1.1.1.1/[a-zA-Z0-9 :]*// D/sdir////" dotest dirs-8 "${testcvs} update -d dir1" \ -"${PROG} [a-z]*: Updating dir1" +"${PROG} update: Updating dir1" cd .. @@ -5098,8 +5966,8 @@ D/sdir////" "Directory ${CVSROOT_DIRNAME}/first-dir/sdir added to the repository" touch sdir/file1 dotest dirs2-4 "${testcvs} add sdir/file1" \ -"${PROG} [a-z]*: scheduling file .sdir/file1. for addition -${PROG} [a-z]*: use .${PROG} commit. to add this file permanently" +"${PROG} add: scheduling file .sdir/file1. for addition +${PROG} add: use .${PROG} commit. to add this file permanently" dotest dirs2-5 "${testcvs} -q ci -m add" \ "RCS file: ${CVSROOT_DIRNAME}/first-dir/sdir/file1,v done @@ -5112,8 +5980,8 @@ done" # This is just like conflicts3-23 dotest_fail dirs2-6 "${testcvs} update -d" \ "${QUESTION} sdir -${PROG} server: Updating \. -${PROG} server: Updating sdir +${PROG} update: Updating \. +${PROG} update: Updating sdir ${PROG} update: move away sdir/file1; it is in the way C sdir/file1" rm sdir/file1 @@ -5122,8 +5990,8 @@ C sdir/file1" # This is where things are not just like conflicts3-23 dotest dirs2-7 "${testcvs} update -d" \ "${QUESTION} sdir -${PROG} server: Updating \. -${PROG} server: Updating sdir +${PROG} update: Updating \. +${PROG} update: Updating sdir U sdir/file1" else dotest dirs2-6 "${testcvs} update -d" \ @@ -5148,14 +6016,14 @@ ${QUESTION} sdir" # get updated. dotest_fail dirs2-10 "${testcvs} update -d -r br" \ "${QUESTION} sdir -${PROG} \[server aborted\]: no such tag br" - dotest dirs2-10-rem \ +${PROG} \[update aborted\]: no such tag br" + dotest dirs2-10ar \ "${testcvs} -q rdiff -u -r 1.1 -r br first-dir/sdir/file1" \ "" dotest_fail dirs2-10-again "${testcvs} update -d -r br" \ "${QUESTION} sdir -${PROG} server: Updating \. -${PROG} server: Updating sdir +${PROG} update: Updating \. +${PROG} update: Updating sdir ${PROG} update: move away sdir/file1; it is in the way C sdir/file1" else @@ -5177,19 +6045,19 @@ ${PROG} \[update aborted\]: there is no version here; do '${PROG} checkout' firs # Hmm, this doesn't mention the branch like add does. That's # an odd non-orthogonality. dotest dirs2-12 "${testcvs} rm -f sdir/file1" \ -"${PROG} [a-z]*: scheduling .sdir/file1. for removal -${PROG} [a-z]*: use .${PROG} commit. to remove this file permanently" +"${PROG} remove: scheduling .sdir/file1. for removal +${PROG} remove: use .${PROG} commit. to remove this file permanently" dotest dirs2-13 "${testcvs} -q ci -m remove" \ "Removing sdir/file1; ${CVSROOT_DIRNAME}/first-dir/sdir/file1,v <-- file1 -new revision: delete; previous revision: 1\.1\.2 +new revision: delete; previous revision: 1\.1 done" cd ../../2/first-dir if $remote; then dotest dirs2-14 "${testcvs} update -d -r br" \ "${QUESTION} sdir/file1 -${PROG} server: Updating \. -${PROG} server: Updating sdir" +${PROG} update: Updating \. +${PROG} update: Updating sdir" else dotest dirs2-14 "${testcvs} update -d -r br" \ "${PROG} update: Updating \. @@ -5211,11 +6079,11 @@ ${QUESTION} sdir" echo 3:ancest >file3 echo 4:trunk-1 >file4 dotest branches-2 "${testcvs} add file1 file2 file3 file4" \ -"${PROG}"' [a-z]*: scheduling file `file1'\'' for addition -'"${PROG}"' [a-z]*: scheduling file `file2'\'' for addition -'"${PROG}"' [a-z]*: scheduling file `file3'\'' for addition -'"${PROG}"' [a-z]*: scheduling file `file4'\'' for addition -'"${PROG}"' [a-z]*: use .'"${PROG}"' commit. to add these files permanently' +"${PROG}"' add: scheduling file `file1'\'' for addition +'"${PROG}"' add: scheduling file `file2'\'' for addition +'"${PROG}"' add: scheduling file `file3'\'' for addition +'"${PROG}"' add: scheduling file `file4'\'' for addition +'"${PROG}"' add: use .'"${PROG}"' commit. to add these files permanently' dotest branches-2a "${testcvs} -n -q ci -m dont-commit" "" dotest_lit branches-3 "${testcvs} -q ci -m add-it" <<HERE RCS file: ${CVSROOT_DIRNAME}/first-dir/file1,v @@ -5260,13 +6128,13 @@ T file4" # someone is hacking along, says "oops, I should be doing this on # a branch", and only then creates the branch. echo 1:br1 >file1 - dotest branches-4 "${testcvs} tag -b br1" "${PROG}"' [a-z]*: Tagging \. + dotest branches-4 "${testcvs} tag -b br1" "${PROG}"' tag: Tagging \. T file1 T file2 T file3 T file4' dotest branches-5 "${testcvs} update -r br1" \ -"${PROG} [a-z]*: Updating \. +"${PROG} update: Updating \. M file1" echo 2:br1 >file2 echo 4:br1 >file4 @@ -5371,7 +6239,7 @@ revision 1\.2\.2\.1\.2\.1 date: [0-9/: ]*; author: ${username}; state: Exp; lines: ${PLUS}1 -1 modify =============================================================================" - dotest_status branches-14.4 1 \ + dotest_fail branches-14.4 \ "${testcvs} diff -c -r 1.1 -r 1.3 file4" \ "Index: file4 =================================================================== @@ -5386,7 +6254,7 @@ diff -c -r1\.1 -r1\.3 ! 4:trunk-1 --- 1 ---- ! 4:trunk-3" - dotest_status branches-14.5 1 \ + dotest_fail branches-14.5 \ "${testcvs} diff -c -r 1.1 -r 1.2.2.1 file4" \ "Index: file4 =================================================================== @@ -5449,8 +6317,8 @@ done" 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" +"${PROG} add: scheduling file .file1. for addition +${PROG} add: use .${PROG} commit. to add this file permanently" dotest branches2-3 "${testcvs} commit -m add file1" \ "RCS file: ${CVSROOT_DIRNAME}/first-dir/file1,v done @@ -5474,16 +6342,16 @@ done" 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' +"${PROG}"' add: scheduling file `file2'\'' for addition on branch `b1'\'' +'"${PROG}"' add: use .'"${PROG}"' commit. to add this file permanently' mkdir dir1 dotest branches2-9 "${testcvs} add dir1" \ "Directory ${CVSROOT_DIRNAME}/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' +"${PROG}"' add: scheduling file `dir1/file3'\'' for addition on branch `b1'\'' +'"${PROG}"' add: use .'"${PROG}"' commit. to add this file permanently' dotest branches2-11 "${testcvs} -q ci -madd ." \ "RCS file: ${CVSROOT_DIRNAME}/first-dir/Attic/file2,v done @@ -5507,7 +6375,7 @@ done" 'U first-dir/file1' cd first-dir dotest branches2-13 "${testcvs} update -d -r b1 dir1" \ -"${PROG} [a-z]*: Updating dir1 +"${PROG} update: Updating dir1 U dir1/file3" dotest branches2-14 "${testcvs} -q status" \ "=================================================================== @@ -5534,7 +6402,7 @@ File: file3 Status: Up-to-date # below as well. rm -r dir1 dotest branches2-15 "${testcvs} update -d -j b1 dir1" \ -"${PROG} [a-z]*: Updating dir1 +"${PROG} update: 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 @@ -5561,10 +6429,10 @@ File: file3 Status: Locally Added cd ../../trunk/first-dir dotest branches2-17 "${testcvs} update -d -P dir1" \ -"${PROG} [a-z]*: Updating dir1" +"${PROG} update: Updating dir1" dotest_fail branches2-18 "test -d dir1" dotest branches2-19 "${testcvs} update -d -P -r b1 dir1" \ -"${PROG} [a-z]*: Updating dir1 +"${PROG} update: Updating dir1 U dir1/file3" dotest branches2-20 "${testcvs} -q status" \ "=================================================================== @@ -5587,7 +6455,7 @@ File: file3 Status: Up-to-date rm -r dir1 dotest branches2-21 "${testcvs} update -d -P -j b1 dir1" \ -"${PROG} [a-z]*: Updating dir1 +"${PROG} update: Updating dir1 U dir1/file3" dotest branches2-22 "${testcvs} -q status" \ "=================================================================== @@ -5633,8 +6501,8 @@ U first-dir/dir1/file3' --> 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' +"${PROG}"' add: scheduling file `dir2/file4'\'' for addition on branch `b1'\'' +'"${PROG}"' add: use .'"${PROG}"' commit. to add this file permanently' dotest branches2-27 "${testcvs} -q commit -madd" \ "RCS file: ${CVSROOT_DIRNAME}/first-dir/dir2/Attic/file4,v done @@ -5645,7 +6513,7 @@ done" cd ../../b1b/first-dir dotest branches2-28 "${testcvs} update -d dir2" \ -"${PROG} [a-z]*: Updating dir2 +"${PROG} update: Updating dir2 U dir2/file4" cd dir2 dotest branches2-29 "${testcvs} -q status" \ @@ -5663,7 +6531,7 @@ File: file4 Status: Up-to-date cd .. rm -r dir2 dotest branches2-31 "${testcvs} update -A -d dir2" \ -"${PROG} [a-z]*: Updating dir2" +"${PROG} update: Updating dir2" cd dir2 dotest branches2-32 "${testcvs} -q status" '' dotest_fail branches2-33 "test -f CVS/Tag" @@ -5671,8 +6539,8 @@ File: file4 Status: Up-to-date # 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' +"${PROG}"' add: scheduling file `file5'\'' for addition +'"${PROG}"' add: use .'"${PROG}"' commit. to add this file permanently' dotest branches2-35 "${testcvs} -q commit -madd" \ "RCS file: ${CVSROOT_DIRNAME}/first-dir/dir2/file5,v done @@ -5710,9 +6578,9 @@ File: file5 Status: Up-to-date cd first-dir touch file1 file2 dotest tagc-3 "${testcvs} add file1 file2" \ -"${PROG} [a-z]*: scheduling file .file1. for addition -${PROG} [a-z]*: scheduling file .file2. for addition -${PROG} [a-z]*: use .${PROG} commit. to add these files permanently" +"${PROG} add: scheduling file .file1. for addition +${PROG} add: scheduling file .file2. for addition +${PROG} add: use .${PROG} commit. to add these files permanently" dotest tagc-4 "${testcvs} -q ci -m add" \ "RCS file: ${CVSROOT_DIRNAME}/first-dir/file1,v done @@ -5738,17 +6606,17 @@ T file2" sleep 1 echo myedit >>file1 dotest tagc-6a "${testcvs} rm -f file2" \ -"${PROG} [a-z]*: scheduling .file2. for removal -${PROG} [a-z]*: use .${PROG} commit. to remove this file permanently" +"${PROG} remove: scheduling .file2. for removal +${PROG} remove: use .${PROG} commit. to remove this file permanently" touch file3 dotest tagc-6b "${testcvs} add file3" \ -"${PROG} [a-z]*: scheduling file .file3. for addition -${PROG} [a-z]*: use .${PROG} commit. to add this file permanently" +"${PROG} add: scheduling file .file3. for addition +${PROG} add: use .${PROG} commit. to add this file permanently" dotest_fail tagc-7 "${testcvs} -q tag -c tag3" \ -"${PROG} [a-z]*: file1 is locally modified -${PROG} [a-z]*: file2 is locally modified -${PROG} [a-z]*: file3 is locally modified -${PROG} \[[a-z]* aborted\]: correct the above errors first!" +"${PROG} tag: file1 is locally modified +${PROG} tag: file2 is locally modified +${PROG} tag: file3 is locally modified +${PROG} \[tag aborted\]: correct the above errors first!" cd ../.. mkdir 2 cd 2 @@ -5773,7 +6641,7 @@ initial revision: 1\.1 done" cd ../../2/first-dir dotest tagc-10 "${testcvs} -q tag -c tag4" \ -"${PROG} [a-z]*: file2 is no longer in the repository +"${PROG} tag: file2 is no longer in the repository T file1 T file2" cd ../.. @@ -5803,10 +6671,10 @@ T file2" echo v1 > $file dotest update-p-4 "$testcvs -Q add $file" '' dotest update-p-5 "$testcvs -Q ci -m. $file" \ -"RCS file: ${TESTDIR}/cvsroot/$module/$file,v +"RCS file: ${CVSROOT_DIRNAME}/$module/$file,v done Checking in $file; -${TESTDIR}/cvsroot/$module/$file,v <-- $file +${CVSROOT_DIRNAME}/$module/$file,v <-- $file initial revision: 1\.1 done" dotest update-p-6 "$testcvs -Q tag T $file" '' @@ -5821,7 +6689,7 @@ done" dotest update-p-9 "$testcvs update -p -rT $file" \ "=================================================================== Checking out $file -RCS: ${TESTDIR}/cvsroot/$module/$file,v +RCS: ${CVSROOT_DIRNAME}/$module/$file,v VERS: 1\.1 \*\*\*\*\*\*\*\*\*\*\*\*\*\*\* v1" @@ -5835,7 +6703,7 @@ v1" dotest update-p-10 "$testcvs update -p -rT $file" \ "=================================================================== Checking out $file -RCS: ${TESTDIR}/cvsroot/$module/$file,v +RCS: ${CVSROOT_DIRNAME}/$module/$file,v VERS: 1\.1 \*\*\*\*\*\*\*\*\*\*\*\*\*\*\* v1" @@ -5852,25 +6720,25 @@ v1" # to return to the state of being on the trunk with a $file # that we can then remove. dotest update-p-undead-0 "$testcvs update -A" \ -"${PROG} [a-z]*: Updating \. -${PROG} [a-z]*: warning: new-born $file has disappeared" +"${PROG} update: Updating \. +${PROG} update: warning: new-born $file has disappeared" dotest update-p-undead-1 "$testcvs update" \ -"${PROG} [a-z]*: Updating \. +"${PROG} update: Updating \. U $file" dotest update-p-undead-2 "$testcvs -Q update -p -rT $file" v1 dotest update-p-undead-3 "$testcvs -Q rm -f $file" '' dotest update-p-undead-4 "$testcvs -Q update -p -rT $file" v1 dotest update-p-undead-5 "$testcvs -Q ci -m. $file" \ "Removing $file; -${TESTDIR}/cvsroot/$module/$file,v <-- $file +${CVSROOT_DIRNAME}/$module/$file,v <-- $file new revision: delete; previous revision: 1\.1 done" dotest update-p-undead-6 "$testcvs -Q update -p -rT $file" v1 echo v2 > $file dotest update-p-undead-7 "$testcvs -Q update -p -rT $file" v1 dotest update-p-undead-8 "$testcvs add $file" \ -"${PROG} [a-z]*: re-adding file $file (in place of dead revision 1\.2) -${PROG} [a-z]*: use .${PROG} commit. to add this file permanently" +"${PROG} add: Re-adding file .$file. (in place of dead revision 1\.2)\. +${PROG} add: use .${PROG} commit. to add this file permanently" dotest update-p-undead-9 "$testcvs -Q update -p -rT $file" v1 @@ -5892,9 +6760,9 @@ ${PROG} [a-z]*: use .${PROG} commit. to add this file permanently" cd first-dir touch file1 file2 dotest tagf-3 "${testcvs} add file1 file2" \ -"${PROG} [a-z]*: scheduling file .file1. for addition -${PROG} [a-z]*: scheduling file .file2. for addition -${PROG} [a-z]*: use .${PROG} commit. to add these files permanently" +"${PROG} add: scheduling file .file1. for addition +${PROG} add: scheduling file .file2. for addition +${PROG} add: use .${PROG} commit. to add these files permanently" dotest tagf-4 "${testcvs} -q ci -m add" \ "RCS file: ${CVSROOT_DIRNAME}/first-dir/file1,v done @@ -5929,8 +6797,8 @@ done" # because converting a branch tag to non-branch # is potentially catastrophic. dotest tagf-8a "${testcvs} -q tag -F br" \ -"${PROG} [a-z]*: file1: Not moving branch tag .br. from 1\.1\.2\.1 to 1\.1\\.2\.1\. -${PROG} [a-z]*: file2: Not moving branch tag .br. from 1\.1\.2\.1 to 1\.1\.2\.1\." +"${PROG} tag: file1: Not moving branch tag .br. from 1\.1\.2\.1 to 1\.1\\.2\.1\. +${PROG} tag: file2: Not moving branch tag .br. from 1\.1\.2\.1 to 1\.1\.2\.1\." # however, if we *really* are sure we want to move a branch tag, # "-F -B" will do the trick dotest tagf-8 "${testcvs} -q tag -F -B br" "T file1 @@ -5970,7 +6838,7 @@ retrieving revision 1\.1\.2\.1 retrieving revision 1\.1 Merging differences between 1\.1\.2\.1 and 1\.1 into file1 rcsmerge: warning: conflicts during merge -${PROG} [a-z]*: conflicts found in file1 +${PROG} update: conflicts found in file1 C file1 M file2" # CVS is giving a conflict because we are trying to get back to @@ -5994,42 +6862,42 @@ new revision: 1\.1\.2\.2; previous revision: 1\.1\.2\.1 done" # try accidentally deleting branch tag, "tag -d" dotest_fail tagf-16 "${testcvs} tag -d br" \ -"${PROG} [a-z]*: Untagging \. -${PROG} [a-z]*: Not removing branch tag .br. from .${CVSROOT_DIRNAME}/first-dir/file1,v.\. -${PROG} [a-z]*: Not removing branch tag .br. from .${CVSROOT_DIRNAME}/first-dir/file2,v.\." +"${PROG} tag: Untagging \. +${PROG} tag: Not removing branch tag .br. from .${CVSROOT_DIRNAME}/first-dir/file1,v.\. +${PROG} tag: Not removing branch tag .br. from .${CVSROOT_DIRNAME}/first-dir/file2,v.\." # try accidentally deleting branch tag, "rtag -d" dotest_fail tagf-17 "${testcvs} rtag -d br first-dir" \ -"${PROG} [a-z]*: Untagging first-dir -${PROG} [a-z]*: Not removing branch tag .br. from .${CVSROOT_DIRNAME}/first-dir/file1,v.\. -${PROG} [a-z]*: Not removing branch tag .br. from .${CVSROOT_DIRNAME}/first-dir/file2,v.\." +"${PROG} rtag: Untagging first-dir +${PROG} rtag: Not removing branch tag .br. from .${CVSROOT_DIRNAME}/first-dir/file1,v.\. +${PROG} rtag: Not removing branch tag .br. from .${CVSROOT_DIRNAME}/first-dir/file2,v.\." # try accidentally converting branch tag to non-branch tag "tag -F" dotest tagf-18 "${testcvs} tag -r1.1 -F br file1" \ -"${PROG} [a-z]*: file1: Not moving branch tag .br. from 1\.1\.4\.1 to 1\.1\." +"${PROG} tag: file1: Not moving branch tag .br. from 1\.1\.4\.1 to 1\.1\." # try accidentally converting branch tag to non-branch tag "rtag -F" dotest tagf-19 "${testcvs} rtag -r1.1 -F br first-dir" \ -"${PROG} [a-z]*: Tagging first-dir -${PROG} [a-z]*: first-dir/file1: Not moving branch tag .br. from 1\.1\.4\.1 to 1\.1\. -${PROG} [a-z]*: first-dir/file2: Not moving branch tag .br. from 1\.1\.2\.2 to 1\.1\." +"${PROG} rtag: Tagging first-dir +${PROG} rtag: first-dir/file1: Not moving branch tag .br. from 1\.1\.4\.1 to 1\.1\. +${PROG} rtag: first-dir/file2: Not moving branch tag .br. from 1\.1\.2\.2 to 1\.1\." # create a non-branch tag dotest tagf-20 "${testcvs} rtag regulartag first-dir" \ -"${PROG} [a-z]*: Tagging first-dir" +"${PROG} rtag: Tagging first-dir" # try accidentally converting non-branch tag to branch tag (tag -F -B -b) dotest tagf-21 "${testcvs} tag -F -B -b regulartag file1" \ -"${PROG} [a-z]*: file1: Not moving non-branch tag .regulartag. from 1\.1 to 1\.1\.4\.1\.0\.2 due to .-B. option\." +"${PROG} tag: file1: Not moving non-branch tag .regulartag. from 1\.1 to 1\.1\.4\.1\.0\.2 due to .-B. option\." # try accidentally converting non-branch tag to branch rtag (rtag -F -B -b) dotest tagf-22 "${testcvs} rtag -F -B -b regulartag first-dir" \ -"${PROG} [a-z]*: Tagging first-dir -${PROG} [a-z]*: first-dir/file1: Not moving non-branch tag .regulartag. from 1\.1 to 1\.1\.0\.6 due to .-B. option\. -${PROG} [a-z]*: first-dir/file2: Not moving non-branch tag .regulartag. from 1\.1 to 1\.1\.0\.4 due to .-B. option\." +"${PROG} rtag: Tagging first-dir +${PROG} rtag: first-dir/file1: Not moving non-branch tag .regulartag. from 1\.1 to 1\.1\.0\.6 due to .-B. option\. +${PROG} rtag: first-dir/file2: Not moving non-branch tag .regulartag. from 1\.1 to 1\.1\.0\.4 due to .-B. option\." # Try accidentally deleting non-branch: (tag -d -B) dotest_fail tagf-23 "${testcvs} tag -d -B regulartag file1" \ -"${PROG} [a-z]*: Not removing non-branch tag .regulartag. from .${CVSROOT_DIRNAME}/first-dir/file1,v. due to .-B. option\." +"${PROG} tag: Not removing non-branch tag .regulartag. from .${CVSROOT_DIRNAME}/first-dir/file1,v. due to .-B. option\." # Try accidentally deleting non-branch: (rtag -d -B) dotest_fail tagf-24 \ "${testcvs} rtag -d -B regulartag first-dir" \ -"${PROG} [a-z]*: Untagging first-dir -${PROG} [a-z]*: Not removing non-branch tag .regulartag. from .${CVSROOT_DIRNAME}/first-dir/file1,v. due to .-B. option\. -${PROG} [a-z]*: Not removing non-branch tag .regulartag. from .${CVSROOT_DIRNAME}/first-dir/file2,v. due to .-B. option\." +"${PROG} rtag: Untagging first-dir +${PROG} rtag: Not removing non-branch tag .regulartag. from .${CVSROOT_DIRNAME}/first-dir/file1,v. due to .-B. option\. +${PROG} rtag: Not removing non-branch tag .regulartag. from .${CVSROOT_DIRNAME}/first-dir/file2,v. due to .-B. option\." # the following tests (throught the next commit) keep moving the same # tag back and forth between 1.1.6 & 1.1.8 in file1 and between @@ -6043,14 +6911,14 @@ ${PROG} [a-z]*: Not removing non-branch tag .regulartag. from .${CVSROOT_DIRNAME "T file1" # try intentionally converting mixed tags to branch tags (rtag -F -b) dotest tagf-26a "${testcvs} rtag -F -b regulartag first-dir" \ -"${PROG} [a-z]*: Tagging first-dir -${PROG} [a-z]*: first-dir/file1: Not moving branch tag .regulartag. from 1\.1 to 1\.1\.0\.8\." +"${PROG} rtag: Tagging first-dir +${PROG} rtag: first-dir/file1: Not moving branch tag .regulartag. from 1\.1 to 1\.1\.0\.8\." # try intentionally converting a branch to a new branch tag (rtag -F -b -B) dotest tagf-26b "${testcvs} rtag -F -B -b -r1.1 regulartag first-dir" \ -"${PROG} [a-z]*: Tagging first-dir" +"${PROG} rtag: Tagging first-dir" # update to our new branch dotest tagf-27 "${testcvs} update -r regulartag" \ -"${PROG} [a-z]*: Updating \. +"${PROG} update: Updating \. U file1 U file2" # commit some changes and see that all rev numbers look right @@ -6071,26 +6939,26 @@ done" "T file1" # try non-branch to non-branch (tag -F -B) dotest tagf-29a "${testcvs} tag -F -B -r br regulartag file1" \ -"${PROG} [a-z]*: file1: Not moving non-branch tag .regulartag. from 1\.1 to 1\.1\.4\.1 due to .-B. option\." +"${PROG} tag: file1: Not moving non-branch tag .regulartag. from 1\.1 to 1\.1\.4\.1 due to .-B. option\." # try mixed-branch to non-branch (rtag -F -B ) dotest tagf-29b "${testcvs} rtag -F -B -r br regulartag first-dir" \ -"${PROG} [a-z]*: Tagging first-dir -${PROG} [a-z]*: first-dir/file1: Not moving non-branch tag .regulartag. from 1\.1 to 1\.1\.4\.1 due to .-B. option\." +"${PROG} rtag: Tagging first-dir +${PROG} rtag: first-dir/file1: Not moving non-branch tag .regulartag. from 1\.1 to 1\.1\.4\.1 due to .-B. option\." # at this point, regulartag is a regular tag within # file1 and file2 # try intentional branch to non-branch (rtag -F -B) dotest tagf-30 "${testcvs} rtag -F -B -r1.1 br first-dir" \ -"${PROG} [a-z]*: Tagging first-dir" +"${PROG} rtag: Tagging first-dir" # create a branch tag so we can try to delete it. dotest tagf-31 "${testcvs} rtag -b brtag first-dir" \ -"${PROG} [a-z]*: Tagging first-dir" +"${PROG} rtag: Tagging first-dir" # try intentinal deletion of branch tag (tag -d -B) dotest tagf-32 "${testcvs} tag -d -B brtag file1" "D file1" # try intentinal deletion of branch tag (rtag -d -B) dotest tagf-33 "${testcvs} rtag -d -B brtag first-dir" \ -"${PROG} [a-z]*: Untagging first-dir" +"${PROG} rtag: Untagging first-dir" cd ../.. @@ -6110,8 +6978,8 @@ ${PROG} [a-z]*: first-dir/file1: Not moving non-branch tag .regulartag. from 1\. cd first-dir echo "I am the first foo, and my name is $""Name$." > foo.c dotest rcsdiff-2 "${testcvs} add -m new-file foo.c" \ -"${PROG} [a-z]*: scheduling file .foo\.c. for addition -${PROG} [a-z]*: use .${PROG} commit. to add this file permanently" +"${PROG} add: scheduling file .foo\.c. for addition +${PROG} add: use .${PROG} commit. to add this file permanently" dotest rcsdiff-3 "${testcvs} commit -m rev1 foo.c" \ "RCS file: ${CVSROOT_DIRNAME}/first-dir/foo\.c,v done @@ -6144,7 +7012,7 @@ VERS: 1\.2 I am the second foo, and my name is \$""Name: second \$\." dotest_fail rcsdiff-9 "${testcvs} diff -r first -r second" \ -"${PROG} [a-z]*: Diffing \. +"${PROG} diff: Diffing \. Index: foo\.c =================================================================== RCS file: ${CVSROOT_DIRNAME}/first-dir/foo\.c,v @@ -6158,7 +7026,7 @@ diff -r1\.1 -r1\.2 echo "I am the once and future foo, and my name is $""Name$." > foo.c dotest_fail rcsdiff-10 "${testcvs} diff -r first" \ -"${PROG} [a-z]*: Diffing \. +"${PROG} diff: Diffing \. Index: foo\.c =================================================================== RCS file: ${CVSROOT_DIRNAME}/first-dir/foo\.c,v @@ -6186,7 +7054,7 @@ grumble; EOF dotest rcslib-diffrgx-1 "${testcvs} -q add -m '' rgx.c" \ -"${PROG} [a-z]*: use .${PROG} commit. to add this file permanently" +"${PROG} add: use .${PROG} commit. to add this file permanently" dotest rcslib-diffrgx-2 "${testcvs} -q ci -m '' rgx.c" \ "RCS file: ${CVSROOT_DIRNAME}/first-dir/rgx\.c,v done @@ -6250,7 +7118,7 @@ diff -c -F\.\*( -r1\.1 rgx\.c echo '2' >> file1 echo '3' >> file1 dotest rcslib-merge-4 "${testcvs} -q add file1" \ -"${PROG} [a-z]*: use .${PROG} commit. to add this file permanently" +"${PROG} add: use .${PROG} commit. to add this file permanently" dotest rcslib-merge-5 "${testcvs} -q commit -m '' file1" \ "RCS file: ${CVSROOT_DIRNAME}/first-dir/file1,v done @@ -6304,7 +7172,15 @@ two [>]>>>>>> 1\.2" # Test behavior of symlinks in the repository. - dotest rcslib-symlink-1 "ln -s file1,v ${CVSROOT_DIRNAME}/first-dir/file2,v" + if test -n "$remotehost"; then + # Create the link on the remote system. This is because Cygwin's + # Windows support creates *.lnk files for Windows. When creating + # these in an SMB share from UNIX, these links won't work from the + # UNIX side. + dotest rcslib-symlink-1remotehost "${CVS_RSH} $remotehost 'ln -s file1,v ${CVSROOT_DIRNAME}/first-dir/file2,v'" + else + dotest rcslib-symlink-1 "ln -s file1,v ${CVSROOT_DIRNAME}/first-dir/file2,v" + fi dotest rcslib-symlink-2 "${testcvs} update file2" "U file2" echo "This is a change" >> file2 dotest rcslib-symlink-3 "${testcvs} ci -m because file2" \ @@ -6312,19 +7188,22 @@ two ${CVSROOT_DIRNAME}/first-dir/file1,v <-- file2 new revision: 1\.1\.2\.2; previous revision: 1\.1\.2\.1 done" - dotest rcslib-symlink-4 "ls -l $CVSROOT_DIRNAME/first-dir/file2,v" \ + + # Switch as for rcslib-symlink-1 + if test -n "$remotehost"; then + dotest rcslib-symlink-4 "$CVS_RSH $remotehost 'ls -l $CVSROOT_DIRNAME/first-dir/file2,v'" \ +".*$CVSROOT_DIRNAME/first-dir/file2,v -> file1,v" + else + dotest rcslib-symlink-4 "ls -l $CVSROOT_DIRNAME/first-dir/file2,v" \ ".*$CVSROOT_DIRNAME/first-dir/file2,v -> file1,v" + fi # CVS was failing to check both the symlink and the file # for timestamp changes for a while. Test that. rm file1 - if $remote; then - dotest rcslib-symlink-3ar "${testcvs} -q up file1" "U file1" - else - dotest rcslib-symlink-3a "${testcvs} -q up file1" \ -"${PROG} [a-z]*: warning: file1 was lost + dotest rcslib-symlink-3a "${testcvs} -q up file1" \ +"${PROG} update: warning: file1 was lost U file1" - fi echo "This is a change" >> file1 dotest rcslib-symlink-3b "${testcvs} ci -m because file1" \ "Checking in file1; @@ -6342,8 +7221,15 @@ Checking in file3; ${CVSROOT_DIRNAME}/first-dir/Attic/file3,v <-- file3 new revision: 1\.1\.2\.1; previous revision: 1\.1 done" + rm -f ${CVSROOT_DIRNAME}/first-dir/file2,v - dotest rcslib-symlink-3f "ln -s Attic/file3,v ${CVSROOT_DIRNAME}/first-dir/file2,v" + # As for rcslib-symlink-1 + if test -n "$remotehost"; then + dotest rcslib-symlink-3f "$CVS_RSH $remotehost 'ln -s Attic/file3,v ${CVSROOT_DIRNAME}/first-dir/file2,v'" + else + dotest rcslib-symlink-3f "ln -s Attic/file3,v ${CVSROOT_DIRNAME}/first-dir/file2,v" + fi + dotest rcslib-symlink-3g "${testcvs} update file2" "U file2" # restore the link to file1 for the following tests @@ -6355,7 +7241,12 @@ new revision: delete; previous revision: 1\.1\.2\.1 done" rm -f ${CVSROOT_DIRNAME}/first-dir/file2,v rm -f ${CVSROOT_DIRNAME}/first-dir/Attic/file3,v - dotest rcslib-symlink-3h "ln -s file1,v ${CVSROOT_DIRNAME}/first-dir/file2,v" + # As for rcslib-symlink-1 + if test -n "$remotehost"; then + dotest rcslib-symlink-3h "$CVS_RSH $remotehost 'ln -s file1,v ${CVSROOT_DIRNAME}/first-dir/file2,v'" + else + dotest rcslib-symlink-3h "ln -s file1,v ${CVSROOT_DIRNAME}/first-dir/file2,v" + fi # Test 5 reveals a problem with having symlinks in the # repository. CVS will try to tag both of the files @@ -6365,11 +7256,17 @@ done" # changing operations to notice cases like this? This # strikes me as a difficult problem. -Noel dotest rcslib-symlink-5 "${testcvs} tag the_tag" \ -"${PROG} [a-z]*: Tagging . +"${PROG} tag: Tagging . T file1 W file2 : the_tag already exists on version 1.1.2.3 : NOT MOVING tag to version 1.1.2.1" - dotest rcslib-symlink-6 "ls -l $CVSROOT_DIRNAME/first-dir/file2,v" \ + # As for rcslib-symlink-1 + if test -n "$remotehost"; then + dotest rcslib-symlink-6 "$CVS_RSH $remotehost 'ls -l $CVSROOT_DIRNAME/first-dir/file2,v'" \ +".*$CVSROOT_DIRNAME/first-dir/file2,v -> file1,v" + else + dotest rcslib-symlink-6 "ls -l $CVSROOT_DIRNAME/first-dir/file2,v" \ ".*$CVSROOT_DIRNAME/first-dir/file2,v -> file1,v" + fi # Symlinks tend to interact poorly with the Attic. cd .. @@ -6379,8 +7276,8 @@ W file2 : the_tag already exists on version 1.1.2.3 : NOT MOVING tag to version U first-dir/file2" cd first-dir dotest rcslib-symlink-8 "${testcvs} rm -f file2" \ -"${PROG} [a-z]*: scheduling .file2. for removal -${PROG} [a-z]*: use .${PROG} commit. to remove this file permanently" +"${PROG} remove: scheduling .file2. for removal +${PROG} remove: use .${PROG} commit. to remove this file permanently" dotest rcslib-symlink-9 "${testcvs} -q ci -m rm-it" \ "Removing file2; ${CVSROOT_DIRNAME}/first-dir/file1,v <-- file2 @@ -6391,9 +7288,9 @@ done" # Why it happens a third time I didn't try to find out. dotest rcslib-symlink-10 \ "${testcvs} -q rtag -b -r the_tag brtag first-dir" \ -"${PROG} [a-z]*: could not read RCS file for file2 -${PROG} [a-z]*: could not read RCS file for first-dir/file2 -${PROG} [a-z]*: could not read RCS file for first-dir/file2" +"${PROG} rtag: could not read RCS file for file2 +${PROG} rtag: could not read RCS file for first-dir/file2 +${PROG} rtag: could not read RCS file for first-dir/file2" cd .. cd .. @@ -6403,6 +7300,18 @@ ${PROG} [a-z]*: could not read RCS file for first-dir/file2" exit 0 fi + # Must remove the symlink first. Samba doesn't appear to show + # broken symlink across the SMB share, and rm -rf by itself + # will remove file1,v first and leave file2,v a broken link and the + # rm -rf will fail since it doesn't find file2,v and it still gets + # directory not empty errors removing cvsroot/first-dir. + # + # I'm not sure why I need to do this on $remotehost. The rm above + # rcslib-symlink-3j works fine, but the next one doesn't unless run + # remotely under Cygwin and using a TESTDIR on a Samba share. + if test -n "$remotehost"; then + $CVS_RSH $remotehost "rm -f ${CVSROOT_DIRNAME}/first-dir/file2,v" + fi rm -rf ${CVSROOT_DIRNAME}/first-dir rm -r first-dir 2 ;; @@ -6415,8 +7324,8 @@ ${PROG} [a-z]*: could not read RCS file for first-dir/file2" cd first-dir echo 1:trunk-1 >file1 dotest multibranch-2 "${testcvs} add file1" \ -"${PROG}"' [a-z]*: scheduling file `file1'\'' for addition -'"${PROG}"' [a-z]*: use .'"${PROG}"' commit. to add this file permanently' +"${PROG}"' add: scheduling file `file1'\'' for addition +'"${PROG}"' add: use .'"${PROG}"' commit. to add this file permanently' dotest_lit multibranch-3 "${testcvs} -q ci -m add-it" <<HERE RCS file: ${CVSROOT_DIRNAME}/first-dir/file1,v done @@ -6426,10 +7335,10 @@ initial revision: 1.1 done HERE dotest multibranch-4 "${testcvs} tag -b br1" \ -"${PROG} [a-z]*: Tagging \. +"${PROG} tag: Tagging \. T file1" dotest multibranch-5 "${testcvs} tag -b br2" \ -"${PROG} [a-z]*: Tagging \. +"${PROG} tag: Tagging \. T file1" dotest multibranch-6 "${testcvs} -q update -r br1" '' echo on-br1 >file1 @@ -6504,6 +7413,7 @@ modify-on-br1 # info -- imports which are rejected by verifymsg # head -- intended to test vendor branches and HEAD, # although it doesn't really do it yet. + # import-CVS -- refuse to import directories named "CVS". # import mkdir import-dir ; cd import-dir @@ -6552,8 +7462,8 @@ U first-dir/imported-f4" # remove rm imported-f1 dotest import-99 "${testcvs} rm imported-f1" \ -"${PROG}"' [a-z]*: scheduling `imported-f1'\'' for removal -'"${PROG}"' [a-z]*: use .'"${PROG}"' commit. to remove this file permanently' +"${PROG}"' remove: scheduling `imported-f1'\'' for removal +'"${PROG}"' remove: use .'"${PROG}"' commit. to remove this file permanently' # change echo local-change >> imported-f2 @@ -6602,15 +7512,15 @@ first-import # update into the vendor branch. dotest import-102 "${testcvs} update -rvendor-branch" \ -"${PROG} [a-z]*: Updating . +"${PROG} update: Updating . [UP] imported-f1 [UP] imported-f2" # remove file4 on the vendor branch rm imported-f4 dotest import-103 "${testcvs} rm imported-f4" \ -"${PROG}"' [a-z]*: scheduling `imported-f4'\'' for removal -'"${PROG}"' [a-z]*: use .'"${PROG}"' commit. to remove this file permanently' +"${PROG}"' remove: scheduling `imported-f4'\'' for removal +'"${PROG}"' remove: use .'"${PROG}"' commit. to remove this file permanently' # commit dotest import-104 \ @@ -6622,7 +7532,7 @@ done" # update to main line dotest import-105 "${testcvs} -q update -A" \ -"${PROG} [a-z]*: imported-f1 is no longer in the repository +"${PROG} update: imported-f1 is no longer in the repository [UP] imported-f2" # second import - file4 deliberately unchanged @@ -6655,7 +7565,7 @@ Use the following command to help the merge:" # co dotest import-107 "${testcvs} co first-dir" \ -"${PROG} [a-z]*: Updating first-dir +"${PROG} checkout: Updating first-dir [UP] first-dir/imported-f3 [UP] first-dir/imported-f4" @@ -6676,19 +7586,21 @@ Use the following command to help the merge:" # update to main line dotest import-112 "${testcvs} -q update -A" \ -"${PROG} [a-z]*: imported-f1 is no longer in the repository +"${PROG} update: imported-f1 is no longer in the repository [UP] imported-f2" cd .. dotest import-113 \ "${testcvs} -q co -jjunk-1_0 -jjunk-2_0 first-dir" \ -"${PROG} [a-z]*: file first-dir/imported-f1 does not exist, but is present in revision junk-2_0 +"${PROG} checkout: file first-dir/imported-f1 does not exist, but is present in revision junk-2_0 RCS file: ${CVSROOT_DIRNAME}/first-dir/imported-f2,v retrieving revision 1\.1\.1\.1 retrieving revision 1\.1\.1\.2 Merging differences between 1\.1\.1\.1 and 1\.1\.1\.2 into imported-f2 -rcsmerge: warning: conflicts during merge" +rcsmerge: warning: conflicts during merge +first-dir/imported-f3 already contains the differences between 1\.1\.1\.1 and 1\.1\.1\.2 +first-dir/imported-f4 already contains the differences between 1\.1\.1\.1 and 1\.1\.1\.3" cd first-dir @@ -6835,13 +7747,13 @@ N first-dir/adir/sub2/file2 N first-dir/bdir/subdir/file1 N first-dir/cdir/cfile No conflicts created by this import -${PROG} [a-z]*: Importing ${CVSROOT_DIRNAME}/first-dir/adir -${PROG} [a-z]*: Importing ${CVSROOT_DIRNAME}/first-dir/adir/sub1 -${PROG} [a-z]*: Importing ${CVSROOT_DIRNAME}/first-dir/adir/sub1/ssdir -${PROG} [a-z]*: Importing ${CVSROOT_DIRNAME}/first-dir/adir/sub2 -${PROG} [a-z]*: Importing ${CVSROOT_DIRNAME}/first-dir/bdir -${PROG} [a-z]*: Importing ${CVSROOT_DIRNAME}/first-dir/bdir/subdir -${PROG} [a-z]*: Importing ${CVSROOT_DIRNAME}/first-dir/cdir" +${PROG} import: Importing ${CVSROOT_DIRNAME}/first-dir/adir +${PROG} import: Importing ${CVSROOT_DIRNAME}/first-dir/adir/sub1 +${PROG} import: Importing ${CVSROOT_DIRNAME}/first-dir/adir/sub1/ssdir +${PROG} import: Importing ${CVSROOT_DIRNAME}/first-dir/adir/sub2 +${PROG} import: Importing ${CVSROOT_DIRNAME}/first-dir/bdir +${PROG} import: Importing ${CVSROOT_DIRNAME}/first-dir/bdir/subdir +${PROG} import: Importing ${CVSROOT_DIRNAME}/first-dir/cdir" cd .. mkdir 2; cd 2 dotest importc-2 "${testcvs} -q co first-dir" \ @@ -6852,12 +7764,12 @@ U first-dir/bdir/subdir/file1 U first-dir/cdir/cfile" cd first-dir dotest importc-3 "${testcvs} update adir/sub1" \ -"${PROG} [a-z]*: Updating adir/sub1 -${PROG} [a-z]*: Updating adir/sub1/ssdir" +"${PROG} update: Updating adir/sub1 +${PROG} update: Updating adir/sub1/ssdir" dotest importc-4 "${testcvs} update adir/sub1 bdir/subdir" \ -"${PROG} [a-z]*: Updating adir/sub1 -${PROG} [a-z]*: Updating adir/sub1/ssdir -${PROG} [a-z]*: Updating bdir/subdir" +"${PROG} update: Updating adir/sub1 +${PROG} update: Updating adir/sub1/ssdir +${PROG} update: Updating bdir/subdir" echo modify >>cdir/cfile dotest importc-5 \ @@ -6944,6 +7856,42 @@ import-it rm -rf ${CVSROOT_DIRNAME}/first-dir ;; + import-CVS) + mkdir import-CVS + cd import-CVS + touch file1 file2 file3 + dotest_fail import-CVS-1 "$testcvs import CVS vtag rtag" \ +"$PROG import: The word \`CVS' is reserved by CVS and may not be used +$PROG \[import aborted\]: as a directory in a path or as a file name\." + mkdir sdir + mkdir sdir/CVS + touch sdir/CVS/file4 sdir/CVS/file5 sdir/file6 sdir/file7 + # Calling the imported directory import-CVS is dual purpose in the + # following test. It makes sure the path test which matched above + # wasn't too strict. + dotest_sort import-CVS-2 \ +"$testcvs import -I! -mimport import-CVS vtag rtag" \ +" + +I import-CVS/sdir/CVS +N import-CVS/file1 +N import-CVS/file2 +N import-CVS/file3 +N import-CVS/sdir/file6 +N import-CVS/sdir/file7 +No conflicts created by this import +$PROG import: Importing $CVSROOT_DIRNAME/import-CVS/sdir" + + if $keep; then + echo Keeping ${TESTDIR} and exiting due to --keep + exit 0 + fi + + cd .. + rm -r import-CVS + rm -rf $CVSROOT_DIRNAME/import-CVS + ;; + import-after-initial) # Properly handle the case in which the first version of a # file is created by a regular cvs add and commit, and there @@ -6999,6 +7947,70 @@ done" rm -rf ${CVSROOT_DIRNAME}/$module ;; + branch-after-import) + # Test branching after an import via both cvs tag -b and + # cvs add to verify that the HEAD remains at 1.1.1.1 + # This was a FreeBSD bug documented at the URL: + # http://www.freebsd.org/cgi/query-pr.cgi?pr=4033 + + mkdir branch-after-import + cd branch-after-import + + # OK, first we get some sources from the NetMunger project, + # and import them into the 1.1.1 vendor branch. + mkdir imp-dir + cd imp-dir + echo 'OpenMunger sources' >file1 + echo 'OpenMunger sources' >file2 + dotest_sort branch-after-import-1 \ +"${testcvs} import -m add first-dir openmunger openmunger-1_0" \ +' + +N first-dir/file1 +N first-dir/file2 +No conflicts created by this import' + cd .. + + # Next checkout the new module + dotest branch-after-import-2 \ +"${testcvs} -q co first-dir" \ +'U first-dir/file1 +U first-dir/file2' + cd first-dir + # Branch tag the file1 and cvs add file2, + # the branch should remain the same in both cases + # such that a new import will not require a conflict + # resolution. + dotest branch-after-import-3 \ +"${testcvs} tag -b TESTTOTRON file1" \ +'T file1' + dotest branch-after-import-4 \ +"${testcvs} -q update -r TESTTOTRON" \ +"${PROG} update: file2 is no longer in the repository" + + cp ../imp-dir/file2 . + dotest branch-after-import-5 \ +"${testcvs} add file2" \ +"${PROG} add: scheduling file .file2. for addition on branch .TESTTOTRON. +${PROG} add: use .${PROG} commit. to add this file permanently" + + dotest branch-after-import-6 \ +"${testcvs} commit -m cvs-add file2" \ +"Checking in file2; +${CVSROOT_DIRNAME}/first-dir/file2,v <-- file2 +new revision: 1\.1\.1\.1\.2\.1; previous revision: 1\.1\.1\.1 +done" + + if $keep; then + echo Keeping ${TESTDIR} and exiting due to --keep + exit 0 + fi + + cd ../.. + rm -r branch-after-import + rm -rf ${CVSROOT_DIRNAME}/first-dir + ;; + join) # Test doing joins which involve adding and removing files. # Variety of scenarios (see list below), in the context of: @@ -7043,9 +8055,13 @@ done" # Nothing should happen. # 6) File removed between T1 and T2, also removed on main line. # Nothing should happen. - # 7) File added on main line, not added between T1 and T2. + # 7) File not added between T1 and T2, added on main line. # Nothing should happen. - # 8) File removed on main line, not modified between T1 and T2. + # 8) File not modified between T1 and T2, removed on main line. + # Nothing should happen. + # 9) File modified between T1 and T2, removed on main line. + # Conflict. + # 10) File was never on branch, removed on main line. # Nothing should happen. # We also check merging changes from a branch into the main @@ -7066,6 +8082,10 @@ done" # Nothing should happen. # 8) File removed on main line, not modified on branch. # Nothing should happen. + # 9) File modified on branch, removed on main line. + # Conflict. + # 10) File was never on branch, removed on main line. + # Nothing should happen. # In the tests below, fileN represents case N in the above # lists. @@ -7082,12 +8102,14 @@ done" echo 'first revision of file4' > file4 echo 'first revision of file6' > file6 echo 'first revision of file8' > file8 - dotest join-2 "${testcvs} add file3 file4 file6 file8" \ -"${PROG}"' [a-z]*: scheduling file `file3'\'' for addition -'"${PROG}"' [a-z]*: scheduling file `file4'\'' for addition -'"${PROG}"' [a-z]*: scheduling file `file6'\'' for addition -'"${PROG}"' [a-z]*: scheduling file `file8'\'' for addition -'"${PROG}"' [a-z]*: use .'"${PROG}"' commit. to add these files permanently' + echo 'first revision of file9' > file9 + dotest join-2 "${testcvs} add file3 file4 file6 file8 file9" \ +"${PROG}"' add: scheduling file `file3'\'' for addition +'"${PROG}"' add: scheduling file `file4'\'' for addition +'"${PROG}"' add: scheduling file `file6'\'' for addition +'"${PROG}"' add: scheduling file `file8'\'' for addition +'"${PROG}"' add: scheduling file `file9'\'' for addition +'"${PROG}"' add: use .'"${PROG}"' commit. to add these files permanently' dotest join-3 "${testcvs} -q commit -m add" \ "RCS file: ${CVSROOT_DIRNAME}/first-dir/file3,v @@ -7113,6 +8135,12 @@ done Checking in file8; ${CVSROOT_DIRNAME}/first-dir/file8,v <-- file8 initial revision: 1\.1 +done +RCS file: ${CVSROOT_DIRNAME}/first-dir/file9,v +done +Checking in file9; +${CVSROOT_DIRNAME}/first-dir/file9,v <-- file9 +initial revision: 1\.1 done" # Make a branch. @@ -7120,23 +8148,34 @@ done" 'T file3 T file4 T file6 -T file8' +T file8 +T file9' - # Add file2 and file7, modify file4, and remove file6 and file8. + # Add file2, file7, and file10, modify file4, and remove + # file6, file8, and file9. echo 'first revision of file2' > file2 echo 'second revision of file4' > file4 echo 'first revision of file7' > file7 - rm file6 file8 - dotest join-5 "${testcvs} add file2 file7" \ -"${PROG}"' [a-z]*: scheduling file `file2'\'' for addition -'"${PROG}"' [a-z]*: scheduling file `file7'\'' for addition -'"${PROG}"' [a-z]*: use .'"${PROG}"' commit. to add these files permanently' - dotest join-6 "${testcvs} rm file6 file8" \ -"${PROG}"' [a-z]*: scheduling `file6'\'' for removal -'"${PROG}"' [a-z]*: scheduling `file8'\'' for removal -'"${PROG}"' [a-z]*: use .'"${PROG}"' commit. to remove these files permanently' + rm file6 file8 file9 + echo 'first revision of file10' > file10 + dotest join-5 "${testcvs} add file2 file7 file10" \ +"${PROG}"' add: scheduling file `file2'\'' for addition +'"${PROG}"' add: scheduling file `file7'\'' for addition +'"${PROG}"' add: scheduling file `file10'\'' for addition +'"${PROG}"' add: use .'"${PROG}"' commit. to add these files permanently' + dotest join-6 "${testcvs} rm file6 file8 file9" \ +"${PROG}"' remove: scheduling `file6'\'' for removal +'"${PROG}"' remove: scheduling `file8'\'' for removal +'"${PROG}"' remove: scheduling `file9'\'' for removal +'"${PROG}"' remove: use .'"${PROG}"' commit. to remove these files permanently' dotest join-7 "${testcvs} -q ci -mx ." \ -"RCS file: ${CVSROOT_DIRNAME}/first-dir/file2,v +"RCS file: ${CVSROOT_DIRNAME}/first-dir/file10,v +done +Checking in file10; +${CVSROOT_DIRNAME}/first-dir/file10,v <-- file10 +initial revision: 1\.1 +done +RCS file: ${CVSROOT_DIRNAME}/first-dir/file2,v done Checking in file2; ${CVSROOT_DIRNAME}/first-dir/file2,v <-- file2 @@ -7159,6 +8198,20 @@ done Removing file8; ${CVSROOT_DIRNAME}/first-dir/file8,v <-- file8 new revision: delete; previous revision: 1\.1 +done +Removing file9; +${CVSROOT_DIRNAME}/first-dir/file9,v <-- file9 +new revision: delete; previous revision: 1\.1 +done" + + # Remove file10 + dotest join-7a "${testcvs} rm -f file10" \ +"${PROG}"' remove: scheduling `file10'\'' for removal +'"${PROG}"' remove: use .'"${PROG}"' commit. to remove this file permanently' + dotest join-7b "${testcvs} -q ci -mx ." \ +"Removing file10; +${CVSROOT_DIRNAME}/first-dir/file10,v <-- file10 +new revision: delete; previous revision: 1\.1 done" # Check out the branch. @@ -7169,7 +8222,8 @@ done" 'U first-dir/file3 U first-dir/file4 U first-dir/file6 -U first-dir/file8' +U first-dir/file8 +U first-dir/file9' cd first-dir @@ -7177,11 +8231,12 @@ U first-dir/file8' # ancestor of the main line, and add file5 echo 'first branch revision of file3' > file3 echo 'first branch revision of file4' > file4 - echo 'first branch revision of file6' > file6 echo 'first branch revision of file5' > file5 + echo 'first branch revision of file6' > file6 + echo 'first branch revision of file9' > file9 dotest join-9 "${testcvs} add file5" \ -"${PROG}"' [a-z]*: scheduling file `file5'\'' for addition on branch `branch'\'' -'"${PROG}"' [a-z]*: use .'"${PROG}"' commit. to add this file permanently' +"${PROG}"' add: scheduling file `file5'\'' for addition on branch `branch'\'' +'"${PROG}"' add: use .'"${PROG}"' commit. to add this file permanently' dotest join-10 "${testcvs} -q ci -mx ." \ "Checking in file3; ${CVSROOT_DIRNAME}/first-dir/file3,v <-- file3 @@ -7200,6 +8255,10 @@ done Checking in file6; ${CVSROOT_DIRNAME}/first-dir/Attic/file6,v <-- file6 new revision: 1\.1\.2\.1; previous revision: 1\.1 +done +Checking in file9; +${CVSROOT_DIRNAME}/first-dir/Attic/file9,v <-- file9 +new revision: 1\.1\.2\.1; previous revision: 1\.1 done" # Tag the current revisions on the branch. @@ -7208,22 +8267,24 @@ done" T file4 T file5 T file6 -T file8' +T file8 +T file9' - # Add file1 and file2, and remove the other files. + # Add file1 and file2, modify file9, and remove the other files. echo 'first branch revision of file1' > file1 echo 'first branch revision of file2' > file2 + echo 'second branch revision of file9' > file9 rm file3 file4 file5 file6 dotest join-12 "${testcvs} add file1 file2" \ -"${PROG}"' [a-z]*: scheduling file `file1'\'' for addition on branch `branch'\'' -'"${PROG}"' [a-z]*: scheduling file `file2'\'' for addition on branch `branch'\'' -'"${PROG}"' [a-z]*: use .'"${PROG}"' commit. to add these files permanently' +"${PROG}"' add: scheduling file `file1'\'' for addition on branch `branch'\'' +'"${PROG}"' add: scheduling file `file2'\'' for addition on branch `branch'\'' +'"${PROG}"' add: use .'"${PROG}"' commit. to add these files permanently' dotest join-13 "${testcvs} rm file3 file4 file5 file6" \ -"${PROG}"' [a-z]*: scheduling `file3'\'' for removal -'"${PROG}"' [a-z]*: scheduling `file4'\'' for removal -'"${PROG}"' [a-z]*: scheduling `file5'\'' for removal -'"${PROG}"' [a-z]*: scheduling `file6'\'' for removal -'"${PROG}"' [a-z]*: use .'"${PROG}"' commit. to remove these files permanently' +"${PROG}"' remove: scheduling `file3'\'' for removal +'"${PROG}"' remove: scheduling `file4'\'' for removal +'"${PROG}"' remove: scheduling `file5'\'' for removal +'"${PROG}"' remove: scheduling `file6'\'' for removal +'"${PROG}"' remove: use .'"${PROG}"' commit. to remove these files permanently' dotest join-14 "${testcvs} -q ci -mx ." \ "RCS file: ${CVSROOT_DIRNAME}/first-dir/Attic/file1,v done @@ -7250,13 +8311,18 @@ done Removing file6; ${CVSROOT_DIRNAME}/first-dir/Attic/file6,v <-- file6 new revision: delete; previous revision: 1\.1\.2\.1 +done +Checking in file9; +${CVSROOT_DIRNAME}/first-dir/Attic/file9,v <-- file9 +new revision: 1\.1\.2\.2; previous revision: 1\.1\.2\.1 done" # Tag the current revisions on the branch. dotest join-15 "${testcvs} -q tag T2 ." \ 'T file1 T file2 -T file8' +T file8 +T file9' # Do a checkout with a merge. cd ../.. @@ -7265,12 +8331,13 @@ T file8' dotest join-16 "${testcvs} -q co -jT1 -jT2 first-dir" \ 'U first-dir/file1 U first-dir/file2 -'"${PROG}"' [a-z]*: file first-dir/file2 exists, but has been added in revision T2 +'"${PROG}"' checkout: file first-dir/file2 exists, but has been added in revision T2 U first-dir/file3 -'"${PROG}"' [a-z]*: scheduling first-dir/file3 for removal +'"${PROG}"' checkout: scheduling first-dir/file3 for removal U first-dir/file4 -'"${PROG}"' [a-z]*: scheduling first-dir/file4 for removal -U first-dir/file7' +'"${PROG}"' checkout: scheduling first-dir/file4 for removal +U first-dir/file7 +'"${PROG}"' checkout: file first-dir/file9 does not exist, but is present in revision T2' # Verify that the right changes have been scheduled. cd first-dir @@ -7284,10 +8351,11 @@ R file4' echo 'third revision of file4' > file4 dotest join-18 "${testcvs} -q update -jT1 -jT2 ." \ 'U file1 -'"${PROG}"' [a-z]*: file file2 exists, but has been added in revision T2 -'"${PROG}"' [a-z]*: scheduling file3 for removal +'"${PROG}"' update: file file2 exists, but has been added in revision T2 +'"${PROG}"' update: scheduling file3 for removal M file4 -'"${PROG}"' [a-z]*: file file4 is locally modified, but has been removed in revision T2' +'"${PROG}"' update: file file4 is locally modified, but has been removed in revision T2 +'"${PROG}"' update: file file9 does not exist, but is present in revision T2' # Verify that the right changes have been scheduled. dotest join-19 "${testcvs} -q update" \ @@ -7316,10 +8384,11 @@ retrieving revision 1\.1 retrieving revision 1\.1\.2\.1 Merging differences between 1\.1 and 1\.1\.2\.1 into file2 U first-dir/file3 -${PROG} [a-z]*: scheduling first-dir/file3 for removal +${PROG} checkout: scheduling first-dir/file3 for removal U first-dir/file4 -${PROG} [a-z]*: file first-dir/file4 has been modified, but has been removed in revision branch -U first-dir/file7" +${PROG} checkout: file first-dir/file4 has been modified, but has been removed in revision branch +U first-dir/file7 +${PROG} checkout: file first-dir/file9 does not exist, but is present in revision branch" # Verify that the right changes have been scheduled. # The M file2 line is a bug; see above join-20. @@ -7349,9 +8418,10 @@ RCS file: ${CVSROOT_DIRNAME}/first-dir/file2,v retrieving revision 1\.1 retrieving revision 1\.1\.2\.1 Merging differences between 1\.1 and 1\.1\.2\.1 into file2 -${PROG} [a-z]*: scheduling file3 for removal +${PROG} update: scheduling file3 for removal M file4 -${PROG} [a-z]*: file file4 is locally modified, but has been removed in revision branch" +${PROG} update: file file4 is locally modified, but has been removed in revision branch +${PROG} update: file file9 does not exist, but is present in revision branch" # Verify that the right changes have been scheduled. # The M file2 line is a bug; see above join-20 @@ -7378,8 +8448,8 @@ T file3 T file4 T file7" dotest join-27 "${testcvs} -q update -r br2" "" - # The handling of file8 here looks fishy to me. I don't see - # why it should be different from the case where we merge to + # The handling of file8 and file9 here look fishy to me. I don't + # see why it should be different from the case where we merge to # the trunk (e.g. join-23). dotest join-28 "${testcvs} -q update -j branch" \ "U file1 @@ -7387,15 +8457,17 @@ RCS file: ${CVSROOT_DIRNAME}/first-dir/file2,v retrieving revision 1.1 retrieving revision 1.1.2.1 Merging differences between 1.1 and 1.1.2.1 into file2 -${PROG} [a-z]*: scheduling file3 for removal -${PROG} [a-z]*: file file4 has been modified, but has been removed in revision branch -U file8" +${PROG} update: scheduling file3 for removal +${PROG} update: file file4 has been modified, but has been removed in revision branch +U file8 +U file9" # Verify that the right changes have been scheduled. dotest join-29 "${testcvs} -q update" \ "A file1 M file2 R file3 -A file8" +A file8 +A file9" # Checkout the mainline again to try updating and merging between two # branches in the same step @@ -7408,10 +8480,11 @@ A file8" dotest join-twobranch-1 "${testcvs} -q co -rbranch first-dir" \ 'U first-dir/file1 U first-dir/file2 -U first-dir/file8' +U first-dir/file8 +U first-dir/file9' cd first-dir dotest join-twobranch-2 "${testcvs} -q update -rbr2 -jbranch" \ -"$PROG [a-z]*: file1 is no longer in the repository +"${PROG} update: file1 is no longer in the repository U file1 U file2 RCS file: ${CVSROOT_DIRNAME}/first-dir/file2,v @@ -7419,18 +8492,21 @@ retrieving revision 1\.1 retrieving revision 1\.1\.2\.1 Merging differences between 1\.1 and 1\.1\.2\.1 into file2 U file3 -${PROG} [a-z]*: scheduling file3 for removal +${PROG} update: scheduling file3 for removal U file4 -${PROG} [a-z]*: file file4 has been modified, but has been removed in revision branch +${PROG} update: file file4 has been modified, but has been removed in revision branch U file7 -${PROG} [a-z]*: file8 is no longer in the repository -U file8" +${PROG} update: file8 is no longer in the repository +U file8 +${PROG} update: file9 is no longer in the repository +U file9" # Verify that the right changes have been scheduled. dotest join-twobranch-3 "${testcvs} -q update" \ "A file1 M file2 R file3 -A file8" +A file8 +A file9" # Checkout the mainline again to try merging from the trunk # to a branch. @@ -7468,7 +8544,7 @@ T file7' # Now update branch to T3. cd ../../2/first-dir dotest join-34 "${testcvs} -q up -jT3" \ -"${PROG} [a-z]*: file file4 does not exist, but is present in revision T3 +"${PROG} update: file file4 does not exist, but is present in revision T3 U file7" # Verify that the right changes have been scheduled. @@ -7508,8 +8584,8 @@ Merging differences between 1\.1 and 1\.2 into file7" cd first-dir echo 'initial contents of file1' >file1 dotest join2-3 "${testcvs} add file1" \ -"${PROG} [a-z]*: scheduling file .file1. for addition -${PROG} [a-z]*: use .${PROG} commit. to add this file permanently" +"${PROG} add: scheduling file .file1. for addition +${PROG} add: use .${PROG} commit. to add this file permanently" dotest join2-4 "${testcvs} -q ci -m add" \ "RCS file: ${CVSROOT_DIRNAME}/first-dir/file1,v done @@ -7522,8 +8598,8 @@ done" echo 'modify on branch' >>file1 touch bradd dotest join2-6a "${testcvs} add bradd" \ -"${PROG} [a-z]*: scheduling file .bradd. for addition on branch .br1. -${PROG} [a-z]*: use .${PROG} commit. to add this file permanently" +"${PROG} add: scheduling file .bradd. for addition on branch .br1. +${PROG} add: use .${PROG} commit. to add this file permanently" dotest join2-7 "${testcvs} -q ci -m modify" \ "RCS file: ${CVSROOT_DIRNAME}/first-dir/Attic/bradd,v done @@ -7588,10 +8664,10 @@ done" # CVS, would be a lot of work and I'm not sure this case justifies # it. dotest join2-17-circumvent "${testcvs} -q update -A" \ -"${PROG} [a-z]*: bradd is no longer in the repository +"${PROG} update: bradd is no longer in the repository [UP] file1" : dotest join2-17 "${testcvs} -q update -A bradd" \ -"${PROG} [a-z]*: warning: bradd is not (any longer) pertinent" +"${PROG} update: warning: bradd is not (any longer) pertinent" dotest join2-18 "${testcvs} -q update -j br1 bradd" "U bradd" dotest join2-19 "${testcvs} -q status bradd" \ "=================================================================== @@ -7625,8 +8701,8 @@ done" cd first-dir echo 'initial contents of file1' >file1 dotest join3-3 "${testcvs} add file1" \ -"${PROG} [a-z]*: scheduling file .file1. for addition -${PROG} [a-z]*: use .${PROG} commit. to add this file permanently" +"${PROG} add: scheduling file .file1. for addition +${PROG} add: use .${PROG} commit. to add this file permanently" dotest join3-4 "${testcvs} -q ci -m add" \ "RCS file: ${CVSROOT_DIRNAME}/first-dir/file1,v done @@ -7649,8 +8725,8 @@ done" dotest join3-8 "${testcvs} -q update -A" "[UP] file1" echo 'trunk:line1' > file2 dotest join3-8a "${testcvs} add file2" \ -"${PROG} [a-z]*: scheduling file .file2. for addition -${PROG} [a-z]*: use .${PROG} commit. to add this file permanently" +"${PROG} add: scheduling file .file2. for addition +${PROG} add: use .${PROG} commit. to add this file permanently" echo 'trunk:line1' >>file1 dotest join3-9 "${testcvs} -q ci -m modify" \ "Checking in file1; @@ -7668,7 +8744,7 @@ T file2" # Before we actually have any revision on br2, let's try a join dotest join3-11 "${testcvs} -q update -r br1" "[UP] file1 -${PROG} [a-z]*: file2 is no longer in the repository" +${PROG} update: file2 is no longer in the repository" dotest join3-12 "${testcvs} -q update -j br2" \ "RCS file: ${CVSROOT_DIRNAME}/first-dir/file1,v retrieving revision 1\.1 @@ -7687,7 +8763,7 @@ trunk:line1 # OK, we'll try the same thing with a revision on br2. dotest join3-14 "${testcvs} -q update -r br2 file1" \ -"${PROG} [a-z]*: warning: file1 was lost +"${PROG} update: warning: file1 was lost U file1" "U file1" echo 'br2:line1' >>file1 dotest join3-15 "${testcvs} -q ci -m modify file1" \ @@ -7722,6 +8798,500 @@ br2:line1 rm -rf ${CVSROOT_DIRNAME}/first-dir ;; + join4) + # Like join, but with local (uncommitted) modifications. + + mkdir ${CVSROOT_DIRNAME}/first-dir + mkdir 1 + cd 1 + dotest join4-1 "${testcvs} -q co first-dir" '' + + cd first-dir + + # Add two files. + echo 'first revision of file3' > file3 + echo 'first revision of file4' > file4 + echo 'first revision of file6' > file6 + echo 'first revision of file8' > file8 + echo 'first revision of file9' > file9 + dotest join4-2 "${testcvs} add file3 file4 file6 file8 file9" \ +"${PROG}"' add: scheduling file `file3'\'' for addition +'"${PROG}"' add: scheduling file `file4'\'' for addition +'"${PROG}"' add: scheduling file `file6'\'' for addition +'"${PROG}"' add: scheduling file `file8'\'' for addition +'"${PROG}"' add: scheduling file `file9'\'' for addition +'"${PROG}"' add: use .'"${PROG}"' commit. to add these files permanently' + + dotest join4-3 "${testcvs} -q commit -m add" \ +"RCS file: ${CVSROOT_DIRNAME}/first-dir/file3,v +done +Checking in file3; +${CVSROOT_DIRNAME}/first-dir/file3,v <-- file3 +initial revision: 1\.1 +done +RCS file: ${CVSROOT_DIRNAME}/first-dir/file4,v +done +Checking in file4; +${CVSROOT_DIRNAME}/first-dir/file4,v <-- file4 +initial revision: 1\.1 +done +RCS file: ${CVSROOT_DIRNAME}/first-dir/file6,v +done +Checking in file6; +${CVSROOT_DIRNAME}/first-dir/file6,v <-- file6 +initial revision: 1\.1 +done +RCS file: ${CVSROOT_DIRNAME}/first-dir/file8,v +done +Checking in file8; +${CVSROOT_DIRNAME}/first-dir/file8,v <-- file8 +initial revision: 1\.1 +done +RCS file: ${CVSROOT_DIRNAME}/first-dir/file9,v +done +Checking in file9; +${CVSROOT_DIRNAME}/first-dir/file9,v <-- file9 +initial revision: 1\.1 +done" + + # Make a branch. + dotest join4-4 "${testcvs} -q tag -b branch ." \ +'T file3 +T file4 +T file6 +T file8 +T file9' + + # Add file10 + echo 'first revision of file10' > file10 + dotest join4-7a "${testcvs} add file10" \ +"${PROG}"' add: scheduling file `file10'\'' for addition +'"${PROG}"' add: use .'"${PROG}"' commit. to add this file permanently' + dotest join4-7b "${testcvs} -q ci -mx ." \ +"RCS file: ${CVSROOT_DIRNAME}/first-dir/file10,v +done +Checking in file10; +${CVSROOT_DIRNAME}/first-dir/file10,v <-- file10 +initial revision: 1\.1 +done" + + # Add file2 and file7, modify file4, and remove + # file6, file8, file9, and file10. + echo 'first revision of file2' > file2 + echo 'second revision of file4' > file4 + echo 'first revision of file7' > file7 + rm file6 file8 file9 file10 + dotest join4-5 "${testcvs} add file2 file7" \ +"${PROG}"' add: scheduling file `file2'\'' for addition +'"${PROG}"' add: scheduling file `file7'\'' for addition +'"${PROG}"' add: use .'"${PROG}"' commit. to add these files permanently' + dotest join4-6 "${testcvs} rm file6 file8 file9 file10" \ +"${PROG}"' remove: scheduling `file6'\'' for removal +'"${PROG}"' remove: scheduling `file8'\'' for removal +'"${PROG}"' remove: scheduling `file9'\'' for removal +'"${PROG}"' remove: scheduling `file10'\'' for removal +'"${PROG}"' remove: use .'"${PROG}"' commit. to remove these files permanently' + + # Check out the branch. + cd ../.. + mkdir 2 + cd 2 + dotest join4-8 "${testcvs} -q co -r branch first-dir" \ +'U first-dir/file3 +U first-dir/file4 +U first-dir/file6 +U first-dir/file8 +U first-dir/file9' + + cd first-dir + + # Modify the files on the branch, so that T1 is not an + # ancestor of the main line, and add file5 + echo 'first branch revision of file3' > file3 + echo 'first branch revision of file4' > file4 + echo 'first branch revision of file5' > file5 + echo 'first branch revision of file6' > file6 + echo 'first branch revision of file9' > file9 + dotest join4-9 "${testcvs} add file5" \ +"${PROG}"' add: scheduling file `file5'\'' for addition on branch `branch'\'' +'"${PROG}"' add: use .'"${PROG}"' commit. to add this file permanently' + dotest join4-10 "${testcvs} -q ci -mx ." \ +"Checking in file3; +${CVSROOT_DIRNAME}/first-dir/file3,v <-- file3 +new revision: 1\.1\.2\.1; previous revision: 1\.1 +done +Checking in file4; +${CVSROOT_DIRNAME}/first-dir/file4,v <-- file4 +new revision: 1\.1\.2\.1; previous revision: 1\.1 +done +RCS file: ${CVSROOT_DIRNAME}/first-dir/Attic/file5,v +done +Checking in file5; +${CVSROOT_DIRNAME}/first-dir/Attic/file5,v <-- file5 +new revision: 1\.1\.2\.1; previous revision: 1\.1 +done +Checking in file6; +${CVSROOT_DIRNAME}/first-dir/file6,v <-- file6 +new revision: 1\.1\.2\.1; previous revision: 1\.1 +done +Checking in file9; +${CVSROOT_DIRNAME}/first-dir/file9,v <-- file9 +new revision: 1\.1\.2\.1; previous revision: 1\.1 +done" + + # Tag the current revisions on the branch. + dotest join4-11 "${testcvs} -q tag T1 ." \ +'T file3 +T file4 +T file5 +T file6 +T file8 +T file9' + + # Add file1 and file2, modify file9, and remove the other files. + echo 'first branch revision of file1' > file1 + echo 'first branch revision of file2' > file2 + echo 'second branch revision of file9' > file9 + rm file3 file4 file5 file6 + dotest join4-12 "${testcvs} add file1 file2" \ +"${PROG}"' add: scheduling file `file1'\'' for addition on branch `branch'\'' +'"${PROG}"' add: scheduling file `file2'\'' for addition on branch `branch'\'' +'"${PROG}"' add: use .'"${PROG}"' commit. to add these files permanently' + dotest join4-13 "${testcvs} rm file3 file4 file5 file6" \ +"${PROG}"' remove: scheduling `file3'\'' for removal +'"${PROG}"' remove: scheduling `file4'\'' for removal +'"${PROG}"' remove: scheduling `file5'\'' for removal +'"${PROG}"' remove: scheduling `file6'\'' for removal +'"${PROG}"' remove: use .'"${PROG}"' commit. to remove these files permanently' + dotest join4-14 "${testcvs} -q ci -mx ." \ +"RCS file: ${CVSROOT_DIRNAME}/first-dir/Attic/file1,v +done +Checking in file1; +${CVSROOT_DIRNAME}/first-dir/Attic/file1,v <-- file1 +new revision: 1\.1\.2\.1; previous revision: 1\.1 +done +RCS file: ${CVSROOT_DIRNAME}/first-dir/Attic/file2,v +done +Checking in file2; +${CVSROOT_DIRNAME}/first-dir/Attic/file2,v <-- file2 +new revision: 1\.1\.2\.1; previous revision: 1\.1 +done +Removing file3; +${CVSROOT_DIRNAME}/first-dir/file3,v <-- file3 +new revision: delete; previous revision: 1\.1\.2\.1 +done +Removing file4; +${CVSROOT_DIRNAME}/first-dir/file4,v <-- file4 +new revision: delete; previous revision: 1\.1\.2\.1 +done +Removing file5; +${CVSROOT_DIRNAME}/first-dir/Attic/file5,v <-- file5 +new revision: delete; previous revision: 1\.1\.2\.1 +done +Removing file6; +${CVSROOT_DIRNAME}/first-dir/file6,v <-- file6 +new revision: delete; previous revision: 1\.1\.2\.1 +done +Checking in file9; +${CVSROOT_DIRNAME}/first-dir/file9,v <-- file9 +new revision: 1\.1\.2\.2; previous revision: 1\.1\.2\.1 +done" + + # Tag the current revisions on the branch. + dotest join4-15 "${testcvs} -q tag T2 ." \ +'T file1 +T file2 +T file8 +T file9' + + # Modify file4 locally, and do an update with a merge. + cd ../../1/first-dir + echo 'third revision of file4' > file4 + dotest join4-18 "${testcvs} -q update -jT1 -jT2 ." \ +'U file1 +R file10 +A file2 +'"${PROG}"' update: file file2 exists, but has been added in revision T2 +'"${PROG}"' update: scheduling file3 for removal +M file4 +'"${PROG}"' update: file file4 is locally modified, but has been removed in revision T2 +R file6 +A file7 +R file8 +R file9 +'"${PROG}"' update: file file9 does not exist, but is present in revision T2' + + # Verify that the right changes have been scheduled. + dotest join4-19 "${testcvs} -q update" \ +'A file1 +R file10 +A file2 +R file3 +M file4 +R file6 +A file7 +R file8 +R file9' + + cd ../.. + + rm -r 1 2 + rm -rf ${CVSROOT_DIRNAME}/first-dir + ;; + + join5) + # This test verifies that CVS can handle filenames starting with a + # dash (`-') properly. What used to happen was that CVS handled it + # just fine, until it went to pass them as arguments to the diff + # library, at which point it neglected to pass `--' before the file + # list, causing the diff library to attempt to interpret the file + # name as an argument. + mkdir join5; cd join5 + mkdir 1; cd 1 + dotest join5-init-1 "${testcvs} -Q co -l ." + mkdir join5 + dotest join5-init-2 "${testcvs} -Q add join5" + cd join5 + echo "there once was a file from harrisburg" >-file + echo "who's existance it seems was quiteabsurd" >>-file + dotest join5-init-3 "${testcvs} -Q add -- -file" + dotest join5-init-4 "${testcvs} -q ci -minitial" \ +"RCS file: ${CVSROOT_DIRNAME}/join5/-file,v +done +Checking in -file; +${CVSROOT_DIRNAME}/join5/-file,v <-- -file +initial revision: 1\.1 +done" + cd ../.. + + mkdir 2; cd 2 + dotest join5-init-5 "${testcvs} -Q co join5" + cd join5 + echo "it tested for free" >>-file + echo "when paid it should be" >>-file + dotest join5-init-4 "${testcvs} -q ci -msecond" \ +"Checking in -file; +${CVSROOT_DIRNAME}/join5/-file,v <-- -file +new revision: 1\.2; previous revision: 1\.1 +done" + cd ../.. + + cd 1/join5 + echo "but maybe it could charge bytheword" >>-file + # This is the test that used to spew complaints from diff3: + dotest join5 "${testcvs} up" \ +"${PROG} update: Updating \. +RCS file: ${CVSROOT_DIRNAME}/join5/-file,v +retrieving revision 1\.1 +retrieving revision 1\.2 +Merging differences between 1\.1 and 1\.2 into -file +rcsmerge: warning: conflicts during merge +${PROG} update: conflicts found in -file +C -file" + cd ../.. + + if $keep; then + echo Keeping ${TESTDIR} and exiting due to --keep + exit 0 + fi + + cd .. + rm -r join5 + rm -rf ${CVSROOT_DIRNAME}/join5 + ;; + + join6) + mkdir join6; cd join6 + mkdir 1; cd 1 + dotest join6-init-1 "${testcvs} -Q co -l ." + mkdir join6 + dotest join6-init-2 "${testcvs} -Q add join6" + cd join6 + echo aaa >temp.txt + echo bbb >>temp.txt + echo ccc >>temp.txt + dotest join6-1 "${testcvs} -Q add temp.txt" + dotest join6-2 "${testcvs} -q commit -minitial temp.txt" \ +"RCS file: ${CVSROOT_DIRNAME}/join6/temp\.txt,v +done +Checking in temp\.txt; +${CVSROOT_DIRNAME}/join6/temp.txt,v <-- temp\.txt +initial revision: 1\.1 +done" + cp temp.txt temp2.txt + echo ddd >>temp.txt + dotest join6-3 "${testcvs} -q commit -madd temp.txt" \ +"Checking in temp\.txt; +${CVSROOT_DIRNAME}/join6/temp.txt,v <-- temp\.txt +new revision: 1\.2; previous revision: 1\.1 +done" + + # The case where the merge target is up-to-date and its base revision + # matches the second argument to -j: CVS doesn't bother attempting + # the merge since it already knows that the target contains the + # change. + dotest join6-3.3 "${testcvs} update -j1.1 -j1.2 temp.txt" \ +"temp\.txt already contains the differences between 1\.1 and 1\.2" + dotest join6-3.4 "${testcvs} diff temp.txt" "" + + # The case where the merge target is modified but already contains + # the change. + echo bbb >temp.txt + echo ccc >>temp.txt + echo ddd >>temp.txt + dotest join6-3.5 "${testcvs} update -j1.1 -j1.2 temp.txt" \ +"M temp\.txt +RCS file: ${CVSROOT_DIRNAME}/join6/temp\.txt,v +retrieving revision 1\.1 +retrieving revision 1\.2 +Merging differences between 1\.1 and 1\.2 into temp\.txt +temp\.txt already contains the differences between 1\.1 and 1\.2" + dotest_fail join6-3.6 "${testcvs} diff temp.txt" \ +"Index: temp\.txt +=================================================================== +RCS file: ${CVSROOT_DIRNAME}/join6/temp\.txt,v +retrieving revision 1\.2 +diff -r1\.2 temp.txt +1d0 +< aaa" + + cp temp2.txt temp.txt + dotest_fail join6-4 "${testcvs} diff temp.txt" \ +"Index: temp.txt +=================================================================== +RCS file: ${CVSROOT_DIRNAME}/join6/temp\.txt,v +retrieving revision 1\.2 +diff -r1\.2 temp\.txt +4d3 +< ddd" + + dotest join6-5 "${testcvs} update -j1.1 -j1.2 temp.txt" \ +"M temp\.txt +RCS file: ${CVSROOT_DIRNAME}/join6/temp\.txt,v +retrieving revision 1\.1 +retrieving revision 1\.2 +Merging differences between 1\.1 and 1\.2 into temp\.txt" + dotest join6-6 "${testcvs} diff temp.txt" "" + mv temp.txt temp3.txt + dotest join6-7 "sed 's/ddd/dddd/' < temp3.txt > temp.txt" "" + dotest join6-8 "${testcvs} update -j1.1 -j1.2 temp.txt" \ +"M temp\.txt +RCS file: ${CVSROOT_DIRNAME}/join6/temp\.txt,v +retrieving revision 1\.1 +retrieving revision 1\.2 +Merging differences between 1\.1 and 1\.2 into temp\.txt +rcsmerge: warning: conflicts during merge" + dotest_fail join6-9 "${testcvs} diff temp.txt" \ +"Index: temp\.txt +=================================================================== +RCS file: ${CVSROOT_DIRNAME}/join6/temp.txt,v +retrieving revision 1\.2 +diff -r1\.2 temp\.txt +3a4,6 +> <<<<<<< temp\.txt +> dddd +> ======= +4a8 +> >>>>>>> 1\.2" + cp temp2.txt temp.txt + dotest join6-10 "${testcvs} -q ci -m del temp.txt" \ +"Checking in temp\.txt; +${CVSROOT_DIRNAME}/join6/temp.txt,v <-- temp\.txt +new revision: 1\.3; previous revision: 1\.2 +done" + cp temp3.txt temp.txt + dotest_fail join6-11 "${testcvs} diff temp.txt" \ +"Index: temp\.txt +=================================================================== +RCS file: ${CVSROOT_DIRNAME}/join6/temp.txt,v +retrieving revision 1\.3 +diff -r1\.3 temp\.txt +3a4 +> ddd" + dotest join6-12 "${testcvs} update -j1.2 -j1.3 temp.txt" \ +"M temp\.txt +RCS file: ${CVSROOT_DIRNAME}/join6/temp\.txt,v +retrieving revision 1\.2 +retrieving revision 1\.3 +Merging differences between 1\.2 and 1\.3 into temp\.txt" + dotest join6-13 "${testcvs} diff temp.txt" "" + + # The case where the merge target wasn't created until after the + # first tag was applied + rm temp2.txt temp3.txt + dotest join6-20 "${testcvs} -q tag -r1.1 t1" \ +"T temp.txt" + echo xxx >temp2.txt + dotest join6-21 "${testcvs} -Q add temp2.txt" + dotest join6-22 "${testcvs} -q ci -m." \ +"RCS file: ${CVSROOT_DIRNAME}/join6/temp2.txt,v +done +Checking in temp2\.txt; +${CVSROOT_DIRNAME}/join6/temp2\.txt,v <-- temp2\.txt +initial revision: 1\.1 +done" + dotest join6-23 "${testcvs} -q tag t2" \ +"T temp.txt +T temp2.txt" + echo xxx >>temp.txt + dotest join6-24 "${testcvs} -q ci -m." \ +"Checking in temp\.txt; +${CVSROOT_DIRNAME}/join6/temp.txt,v <-- temp\.txt +new revision: 1\.4; previous revision: 1\.3 +done" + dotest join6-25 "${testcvs} -q up -jt1 -jt2" \ +"RCS file: ${CVSROOT_DIRNAME}/join6/temp.txt,v +retrieving revision 1\.1 +retrieving revision 1\.3 +Merging differences between 1\.1 and 1\.3 into temp.txt +temp.txt already contains the differences between 1\.1 and 1\.3 +temp2.txt already contains the differences between creation and 1\.1" + + # Now for my next trick: delete the file, recreate it, and + # try to merge + dotest join6-30 "${testcvs} -q rm -f temp2.txt" \ +"${PROG} remove: use .${PROG} commit. to remove this file permanently" + dotest join6-31 "${testcvs} -q ci -m. temp2.txt" \ +"Removing temp2\.txt; +${CVSROOT_DIRNAME}/join6/temp2\.txt,v <-- temp2\.txt +new revision: delete; previous revision: 1\.1 +done" + echo new >temp2.txt + # FIXCVS: Local and remote really shouldn't be different and there + # really shouldn't be two different status lines for temp2.txt + if $remote; then + dotest_fail join6-32 "${testcvs} -q up -jt1 -jt2" \ +"? temp2\.txt +RCS file: ${CVSROOT_DIRNAME}/join6/temp.txt,v +retrieving revision 1\.1 +retrieving revision 1\.3 +Merging differences between 1\.1 and 1\.3 into temp.txt +temp.txt already contains the differences between 1\.1 and 1\.3 +${PROG} update: move away \./temp2\.txt; it is in the way +C temp2\.txt" + else + dotest join6-32 "${testcvs} -q up -jt1 -jt2" \ +"RCS file: ${CVSROOT_DIRNAME}/join6/temp.txt,v +retrieving revision 1\.1 +retrieving revision 1\.3 +Merging differences between 1\.1 and 1\.3 into temp.txt +temp.txt already contains the differences between 1\.1 and 1\.3 +${PROG} update: use .${PROG} add. to create an entry for temp2\.txt +U temp2\.txt +? temp2\.txt" + fi + + cd ../../.. + + if $keep; then + echo Keeping ${TESTDIR} and exiting due to --keep + exit 0 + fi + + rm -r join6 + rm -rf ${CVSROOT_DIRNAME}/join6 + ;; + join-readonly-conflict) # Previously, only tests 1 & 11 were being tested. I added the # intermediate dotest's to try and diagnose a different failure @@ -7773,7 +9343,7 @@ retrieving revision 1\.1 retrieving revision 1\.1\.2\.1 Merging differences between 1\.1 and 1\.1\.2\.1 into $file rcsmerge: warning: conflicts during merge -$PROG [a-z]*: conflicts found in $file +${PROG} update: conflicts found in $file C $file" # restore to the trunk @@ -7796,7 +9366,7 @@ retrieving revision 1\.1 retrieving revision 1\.1\.2\.1 Merging differences between 1\.1 and 1\.1\.2\.1 into $file rcsmerge: warning: conflicts during merge -$PROG [a-z]*: conflicts found in $file +${PROG} update: conflicts found in $file C m" cd ../.. @@ -7905,22 +9475,24 @@ done" dotest join-admin-2-13 "$testcvs -Q update -r T" '' "${QUESTION} e0" dotest join-admin-2-14 "$testcvs update -kk -jM1 -jM2" \ -"${PROG} [a-z]*: Updating . +"${PROG} update: Updating . U b U e RCS file: ${CVSROOT_DIRNAME}/x/e,v retrieving revision 1\.1 retrieving revision 1\.2 Merging differences between 1\.1 and 1\.2 into e +e already contains the differences between 1\.1 and 1\.2 ${QUESTION} e0" \ "${QUESTION} e0 -${PROG} [a-z]*: Updating . +${PROG} update: Updating . U b U e RCS file: ${CVSROOT_DIRNAME}/x/e,v retrieving revision 1\.1 retrieving revision 1\.2 -Merging differences between 1\.1 and 1\.2 into e" +Merging differences between 1\.1 and 1\.2 into e +e already contains the differences between 1\.1 and 1\.2" # Verify that the $Id.$ string is not expanded. dotest join-admin-2-15 "cat e" '$''Id$' @@ -7930,6 +9502,183 @@ Merging differences between 1\.1 and 1\.2 into e" rm -rf ${CVSROOT_DIRNAME}/$module ;; + join-rm) + # This first half of this test checks that a single-argument merge + # from a branch is capable of removing files. + # + # The second half verifies that an update to another location with an + # uncommitted removal will transfer the destination branch of the + # removal. + + module=join-rm + mkdir $module; cd $module + + dotest join-rm-init-1 "$testcvs -q co -l ." '' + mkdir $module + dotest join-rm-init-2 "$testcvs -q add $module" \ +"Directory $CVSROOT_DIRNAME/$module added to the repository" + cd $module + + # add some files. + touch a b c d e f g + dotest join-rm-init-3 "$testcvs -Q add a b c d e f g" + dotest join-rm-init-4 "$testcvs -Q ci -m add-em" \ +"RCS file: $CVSROOT_DIRNAME/join-rm/a,v +done +Checking in a; +$CVSROOT_DIRNAME/join-rm/a,v <-- a +initial revision: 1\.1 +done +RCS file: $CVSROOT_DIRNAME/join-rm/b,v +done +Checking in b; +$CVSROOT_DIRNAME/join-rm/b,v <-- b +initial revision: 1\.1 +done +RCS file: $CVSROOT_DIRNAME/join-rm/c,v +done +Checking in c; +$CVSROOT_DIRNAME/join-rm/c,v <-- c +initial revision: 1\.1 +done +RCS file: $CVSROOT_DIRNAME/join-rm/d,v +done +Checking in d; +$CVSROOT_DIRNAME/join-rm/d,v <-- d +initial revision: 1\.1 +done +RCS file: $CVSROOT_DIRNAME/join-rm/e,v +done +Checking in e; +$CVSROOT_DIRNAME/join-rm/e,v <-- e +initial revision: 1\.1 +done +RCS file: $CVSROOT_DIRNAME/join-rm/f,v +done +Checking in f; +$CVSROOT_DIRNAME/join-rm/f,v <-- f +initial revision: 1\.1 +done +RCS file: $CVSROOT_DIRNAME/join-rm/g,v +done +Checking in g; +$CVSROOT_DIRNAME/join-rm/g,v <-- g +initial revision: 1\.1 +done" + + # create the branch and update to it + dotest join-rm-init-5 "$testcvs -Q tag -b br" + dotest join-rm-init-6 "$testcvs -Q up -rbr" + + # remove a few files from the branch + dotest join-rm-init-7 "$testcvs -Q rm -f b d g" + dotest join-rm-init-8 "$testcvs -Q ci -mrm" \ +"Removing b; +$CVSROOT_DIRNAME/join-rm/b,v <-- b +new revision: delete; previous revision: 1\.1 +done +Removing d; +$CVSROOT_DIRNAME/join-rm/d,v <-- d +new revision: delete; previous revision: 1\.1 +done +Removing g; +$CVSROOT_DIRNAME/join-rm/g,v <-- g +new revision: delete; previous revision: 1\.1 +done" + + # update to the trunk + dotest join-rm-init-9 "$testcvs -Q up -A" + + # now for the test - try and merge the removals. + dotest join-rm-1 "$testcvs -q up -jbr" \ +"$PROG update: scheduling b for removal +$PROG update: scheduling d for removal +$PROG update: scheduling g for removal" + + # And make sure the merge took + dotest join-rm-2 "$testcvs -qn up" \ +"R b +R d +R g" + + dotest join-rm-3 "$testcvs -q ci -m 'save the merge'" \ +"Removing b; +$CVSROOT_DIRNAME/join-rm/b,v <-- b +new revision: delete; previous revision: 1\.1 +done +Removing d; +$CVSROOT_DIRNAME/join-rm/d,v <-- d +new revision: delete; previous revision: 1\.1 +done +Removing g; +$CVSROOT_DIRNAME/join-rm/g,v <-- g +new revision: delete; previous revision: 1\.1 +done" + + # and verify that it was the head revision which was removed. + dotest join-rm-4 "$testcvs -q log b" " +RCS file: $CVSROOT_DIRNAME/join-rm/Attic/b,v +Working file: b +head: 1\.2 +branch: +locks: strict +access list: +symbolic names: + br: 1\.1\.0\.2 +keyword substitution: kv +total revisions: 3; selected revisions: 3 +description: +---------------------------- +revision 1\.2 +date: [0-9/]* [0-9:]*; author: $username; state: dead; lines: ${PLUS}0 -0 +save the merge +---------------------------- +revision 1\.1 +date: [0-9/]* [0-9:]*; author: $username; state: Exp; +branches: 1.1.2; +add-em +---------------------------- +revision 1\.1\.2\.1 +date: [0-9/]* [0-9:]*; author: $username; state: dead; lines: ${PLUS}0 -0 +rm +=============================================================================" + + # go back to the branch to set up for the second set of tests + dotest join-rm-init-10 "$testcvs -Q up -rbr" + dotest join-rm-init-11 "$testcvs -Q rm -f a" + dotest join-rm-init-12 "$testcvs -Q ci -m rma" \ +"Removing a; +$CVSROOT_DIRNAME/join-rm/a,v <-- a +new revision: delete; previous revision: 1\.1 +done" + + # now the test: update to the trunk + # + # FIXCVS: This update should merge the removal to the trunk. It does + # not. + dotest join-rm-5 "$testcvs -q up -A" "U a" + + # and verify that there is no sticky tag + dotest join-rm-6 "$testcvs status a" \ +"=================================================================== +File: a Status: Up-to-date + + Working revision: 1\.1.* + Repository revision: 1\.1 $CVSROOT_DIRNAME/join-rm/a,v + Sticky Tag: (none) + Sticky Date: (none) + Sticky Options: (none)" + + if $keep; then + echo Keeping $TESTDIR and exiting due to --keep + exit 0 + fi + + cd ../.. + rm -rf $CVSROOT_DIRNAME/$module + rm -r $module + ;; + new) # look for stray "no longer pertinent" messages. mkdir ${CVSROOT_DIRNAME}/first-dir @@ -7998,8 +9747,8 @@ Merging differences between 1\.1 and 1\.2 into e" cd first-dir touch a dotest newb-123b "${testcvs} add a" \ -"${PROG} [a-z]*: scheduling file .a. for addition -${PROG} [a-z]*: use .${PROG} commit. to add this file permanently" +"${PROG} add: scheduling file .a. for addition +${PROG} add: use .${PROG} commit. to add this file permanently" dotest newb-123c "${testcvs} -q ci -m added" \ "RCS file: ${CVSROOT_DIRNAME}/first-dir/a,v done @@ -8028,12 +9777,12 @@ done" cd first-dir rm a dotest newb-123g "${testcvs} rm a" \ -"${PROG} [a-z]*: scheduling .a. for removal -${PROG} [a-z]*: use .${PROG} commit. to remove this file permanently" +"${PROG} remove: scheduling .a. for removal +${PROG} remove: use .${PROG} commit. to remove this file permanently" dotest newb-123h "${testcvs} -q ci -m removed" \ "Removing a; ${CVSROOT_DIRNAME}/first-dir/a,v <-- a -new revision: delete; previous revision: 1\.1\.2 +new revision: delete; previous revision: 1\.1 done" # Check out the file on the branch. This should report @@ -8042,14 +9791,14 @@ done" cd .. rm -r first-dir dotest newb-123i "${testcvs} -q co -r branch first-dir/a" \ -"${PROG} [a-z]*: warning: first-dir/a is not (any longer) pertinent" +"${PROG} checkout: warning: first-dir/a is not (any longer) pertinent" # Update the other copy, and make sure that a is removed. cd ../1/first-dir # "Entry Invalid" is a rather strange output here. Something like # "Removed in Repository" would make more sense. dotest newb-123j0 "${testcvs} status a" \ -"${PROG} [a-z]*: a is no longer in the repository +"${PROG} status: a is no longer in the repository =================================================================== File: a Status: Entry Invalid @@ -8059,7 +9808,7 @@ File: a Status: Entry Invalid Sticky Date: (none) Sticky Options: (none)" dotest newb-123j "${testcvs} -q update" \ -"${PROG} [a-z]*: a is no longer in the repository" +"${PROG} update: a is no longer in the repository" if test -f a; then fail newb-123k @@ -8084,8 +9833,8 @@ File: a Status: Entry Invalid touch a dotest conflicts-125 "${testcvs} add a" \ -"${PROG} [a-z]*: scheduling file .a. for addition -${PROG} [a-z]*: use .${PROG} commit. to add this file permanently" +"${PROG} add: scheduling file .a. for addition +${PROG} add: use .${PROG} commit. to add this file permanently" dotest conflicts-126 "${testcvs} -q ci -m added" \ "RCS file: ${CVSROOT_DIRNAME}/first-dir/a,v done @@ -8099,7 +9848,7 @@ done" cd 2 dotest conflicts-126.5 "${testcvs} co -p first-dir" \ -"${PROG} [a-z]*: Updating first-dir +"${PROG} checkout: Updating first-dir =================================================================== Checking out first-dir/a RCS: ${CVSROOT_DIRNAME}/first-dir/a,v @@ -8134,7 +9883,7 @@ done" mkdir 3 cd 3 dotest conflicts-128.5 "${testcvs} co -p -l first-dir" \ -"${PROG} [a-z]*: Updating first-dir +"${PROG} checkout: Updating first-dir =================================================================== Checking out first-dir/a RCS: ${CVSROOT_DIRNAME}/first-dir/a,v @@ -8149,8 +9898,8 @@ add a line" cd 2/first-dir echo add a conflicting line >>a dotest_fail conflicts-129 "${testcvs} -q ci -m changed" \ -"${PROG}"' [a-z]*: Up-to-date check failed for `a'\'' -'"${PROG}"' \[[a-z]* aborted\]: correct above errors first!' +"${PROG}"' commit: Up-to-date check failed for `a'\'' +'"${PROG}"' \[commit aborted\]: correct above errors first!' mkdir dir1 mkdir sdir dotest conflicts-status-0 "${testcvs} status a" \ @@ -8168,7 +9917,7 @@ retrieving revision 1\.1 retrieving revision 1\.2 Merging differences between 1\.1 and 1\.2 into a rcsmerge: warning: conflicts during merge -${PROG} [a-z]*: conflicts found in a +${PROG} update: conflicts found in a C a" dotest conflicts-130 "${testcvs} -q update" \ "RCS file: ${CVSROOT_DIRNAME}/first-dir/a,v @@ -8176,7 +9925,7 @@ retrieving revision 1\.1 retrieving revision 1\.2 Merging differences between 1\.1 and 1\.2 into a rcsmerge: warning: conflicts during merge -${PROG} [a-z]*: conflicts found in a +${PROG} update: conflicts found in a C a ${QUESTION} dir1 ${QUESTION} sdir" \ @@ -8187,7 +9936,7 @@ retrieving revision 1\.1 retrieving revision 1\.2 Merging differences between 1\.1 and 1\.2 into a rcsmerge: warning: conflicts during merge -${PROG} [a-z]*: conflicts found in a +${PROG} update: conflicts found in a C a" rmdir dir1 sdir @@ -8201,23 +9950,23 @@ File: a Status: File had conflicts on merge Sticky Date: (none) Sticky Options: (none)" dotest_fail conflicts-131 "${testcvs} -q ci -m try" \ -"${PROG} [a-z]*: file .a. had a conflict and has not been modified -${PROG} \[[a-z]* aborted\]: correct above errors first!" +"${PROG} commit: file .a. had a conflict and has not been modified +${PROG} \[commit aborted\]: correct above errors first!" # Try to check in the file with the conflict markers in it. # Make sure we detect any one of the three conflict markers mv a aa grep '^<<<<<<<' aa >a dotest conflicts-status-2 "${testcvs} -nq ci -m try a" \ -"${PROG} [a-z]*: warning: file .a. seems to still contain conflict indicators" +"${PROG} commit: warning: file .a. seems to still contain conflict indicators" grep '^=======' aa >a dotest conflicts-status-3 "${testcvs} -nq ci -m try a" \ -"${PROG} [a-z]*: warning: file .a. seems to still contain conflict indicators" +"${PROG} commit: warning: file .a. seems to still contain conflict indicators" grep '^>>>>>>>' aa >a dotest conflicts-status-4 "${testcvs} -qn ci -m try a" \ -"${PROG} [a-z]*: warning: file .a. seems to still contain conflict indicators" +"${PROG} commit: warning: file .a. seems to still contain conflict indicators" mv aa a echo lame attempt at resolving it >>a @@ -8231,7 +9980,7 @@ File: a Status: File had conflicts on merge Sticky Date: (none) Sticky Options: (none)" dotest conflicts-132 "${testcvs} -q ci -m try" \ -"${PROG} [a-z]*: warning: file .a. seems to still contain conflict indicators +"${PROG} commit: warning: file .a. seems to still contain conflict indicators Checking in a; ${CVSROOT_DIRNAME}/first-dir/a,v <-- a new revision: 1\.3; previous revision: 1\.2 @@ -8350,9 +10099,9 @@ File: a Status: Up-to-date touch a abc dotest conflicts2-142a2 "${testcvs} add a abc" \ -"${PROG} [a-z]*: scheduling file .a. for addition -${PROG} [a-z]*: scheduling file .abc. for addition -${PROG} [a-z]*: use .${PROG} commit. to add these files permanently" +"${PROG} add: scheduling file .a. for addition +${PROG} add: scheduling file .abc. for addition +${PROG} add: use .${PROG} commit. to add these files permanently" dotest conflicts2-142a3 "${testcvs} -q ci -m added" \ "RCS file: ${CVSROOT_DIRNAME}/first-dir/a,v done @@ -8391,52 +10140,51 @@ done" cd ../../2/first-dir rm a dotest conflicts2-142b3 "${testcvs} rm a" \ -"${PROG} [a-z]*: scheduling .a. for removal -${PROG} [a-z]*: use .${PROG} commit. to remove this file permanently" +"${PROG} remove: scheduling .a. for removal +${PROG} remove: use .${PROG} commit. to remove this file permanently" dotest_fail conflicts2-142b4 "${testcvs} -q update" \ -"${PROG} [a-z]*: conflict: removed a was modified by second party +"${PROG} update: conflict: removed a was modified by second party C a" # Resolve the conflict by deciding not to remove the file # after all. - dotest conflicts2-142b5 "${testcvs} add a" "U a -${PROG} [a-z]*: a, version 1\.1, resurrected" - dotest conflicts2-142b6 "${testcvs} -q update" '' + dotest_sort conflicts2-142b5 "${testcvs} add a" "U a +${PROG} add: a, version 1\.1, resurrected" + dotest conflicts2-142b5b1 "$testcvs status a" \ +"=================================================================== +File: a Status: Needs Patch + + Working revision: 1\.1.* + Repository revision: 1\.2 $CVSROOT_DIRNAME/first-dir/a,v + Sticky Tag: (none) + Sticky Date: (none) + Sticky Options: (none)" + dotest conflicts2-142b6 "${testcvs} -q update" 'U a' # Now one level up. cd .. dotest conflicts2-142b7 "${testcvs} rm -f first-dir/a" \ -"${PROG} [a-z]*: scheduling .first-dir/a. for removal -${PROG} [a-z]*: use .${PROG} commit. to remove this file permanently" +"${PROG} remove: scheduling .first-dir/a. for removal +${PROG} remove: use .${PROG} commit. to remove this file permanently" if $remote; then # Haven't investigated this one. - dotest_fail conflicts2-142b8 "${testcvs} add first-dir/a" \ + dotest_fail conflicts2-142b8r "$testcvs add first-dir/a" \ "${PROG} add: in directory \.: ${PROG} \[add aborted\]: there is no version here; do '${PROG} checkout' first" cd first-dir else - # The "nothing known" is a bug. Correct behavior is for a to get - # created, as above. Cause is pretty obvious - add.c - # calls update() without dealing with the fact we are chdir'd. - # Also note that resurrecting 1.2 instead of 1.1 is also a - # bug, I think (the same part of add.c has a comment which says - # "XXX - bugs here; this really resurrect the head" which - # presumably refers to this). - # The fix for both is presumably to call RCS_checkout() or - # something other than update(). dotest conflicts2-142b8 "${testcvs} add first-dir/a" \ -"${PROG} [a-z]*: nothing known about first-dir -${PROG} [a-z]*: first-dir/a, version 1\.2, resurrected" +"U first-dir/a +${PROG} add: first-dir/a, version 1\.2, resurrected" cd first-dir # Now recover from the damage that the 142b8 test did. dotest conflicts2-142b9 "${testcvs} rm -f a" \ -"${PROG} [a-z]*: scheduling .a. for removal -${PROG} [a-z]*: use .${PROG} commit. to remove this file permanently" +"${PROG} remove: scheduling .a. for removal +${PROG} remove: use .${PROG} commit. to remove this file permanently" fi - # As before, 1.2 instead of 1.1 is a bug. - dotest conflicts2-142b10 "${testcvs} add a" "U a -${PROG} [a-z]*: a, version 1\.2, resurrected" + dotest_sort conflicts2-142b10 "${testcvs} add a" "U a +${PROG} add: a, version 1\.2, resurrected" # As with conflicts2-142b6, check that things are normal again. dotest conflicts2-142b11 "${testcvs} -q update" '' cd ../.. @@ -8448,8 +10196,8 @@ ${PROG} [a-z]*: a, version 1\.2, resurrected" cd 1/first-dir rm abc dotest conflicts2-142c0 "${testcvs} rm abc" \ -"${PROG} [a-z]*: scheduling .abc. for removal -${PROG} [a-z]*: use .${PROG} commit. to remove this file permanently" +"${PROG} remove: scheduling .abc. for removal +${PROG} remove: use .${PROG} commit. to remove this file permanently" dotest conflicts2-142c1 "${testcvs} -q ci -m remove-abc" \ "Removing abc; ${CVSROOT_DIRNAME}/first-dir/abc,v <-- abc @@ -8458,10 +10206,10 @@ done" cd ../../2/first-dir rm abc dotest conflicts2-142c2 "${testcvs} rm abc" \ -"${PROG} [a-z]*: scheduling .abc. for removal -${PROG} [a-z]*: use .${PROG} commit. to remove this file permanently" +"${PROG} remove: scheduling .abc. for removal +${PROG} remove: use .${PROG} commit. to remove this file permanently" dotest conflicts2-142c3 "${testcvs} update" \ -"${PROG} [a-z]*: Updating \." +"${PROG} update: Updating \." cd ../.. # conflicts2-142d*: test that if one party adds a file, and another @@ -8470,9 +10218,9 @@ ${PROG} [a-z]*: use .${PROG} commit. to remove this file permanently" touch aa.c echo 'contents unchanged' >same.c dotest conflicts2-142d0 "${testcvs} add aa.c same.c" \ -"${PROG} [a-z]*: scheduling file .aa\.c. for addition -${PROG} [a-z]*: scheduling file .same\.c. for addition -${PROG} [a-z]*: use .${PROG} commit. to add these files permanently" +"${PROG} add: scheduling file .aa\.c. for addition +${PROG} add: scheduling file .same\.c. for addition +${PROG} add: use .${PROG} commit. to add these files permanently" dotest conflicts2-142d1 "${testcvs} -q ci -m added" \ "RCS file: ${CVSROOT_DIRNAME}/first-dir/aa\.c,v done @@ -8511,7 +10259,7 @@ C aa\.c U same\.c" fi dotest conflicts2-142d3 "${testcvs} -q status aa.c" \ -"${PROG} [a-z]*: move away aa\.c; it is in the way +"${PROG} status: move away aa\.c; it is in the way =================================================================== File: aa\.c Status: Unresolved Conflict @@ -8524,7 +10272,7 @@ File: aa\.c Status: Unresolved Conflict # means that we get to work in parallel if we choose, right? And # then at commit time it would be a conflict. dotest_fail conflicts2-142d4 "${testcvs} -q add aa.c" \ -"${PROG} [a-z]*: aa.c added independently by second party" +"${PROG} add: aa.c added independently by second party" # The user might want to see just what the conflict is. # Don't bother, diff seems to kind of lose its mind, with or @@ -8548,7 +10296,7 @@ File: aa\.c Status: Unresolved Conflict cd ../.. - rm -r 1 2 ; rm -rf ${CVSROOT_DIRNAME}/first-dir + rm -r 1 2; rm -rf ${CVSROOT_DIRNAME}/first-dir ;; conflicts3) @@ -8566,9 +10314,9 @@ File: aa\.c Status: Unresolved Conflict cd ../1/first-dir touch file1 file2 dotest conflicts3-4 "${testcvs} add file1 file2" \ -"${PROG} [a-z]*: scheduling file .file1. for addition -${PROG} [a-z]*: scheduling file .file2. for addition -${PROG} [a-z]*: use .${PROG} commit. to add these files permanently" +"${PROG} add: scheduling file .file1. for addition +${PROG} add: scheduling file .file2. for addition +${PROG} add: use .${PROG} commit. to add these files permanently" dotest conflicts3-5 "${testcvs} -q ci -m add-them" \ "RCS file: ${CVSROOT_DIRNAME}/first-dir/file1,v done @@ -8596,9 +10344,9 @@ U file2" # OK, now remove two files at once dotest conflicts3-10 "${testcvs} rm -f file1 file2" \ -"${PROG} [a-z]*: scheduling .file1. for removal -${PROG} [a-z]*: scheduling .file2. for removal -${PROG} [a-z]*: use .${PROG} commit. to remove these files permanently" +"${PROG} remove: scheduling .file1. for removal +${PROG} remove: scheduling .file2. for removal +${PROG} remove: use .${PROG} commit. to remove these files permanently" dotest conflicts3-11 "${testcvs} -q ci -m remove-them" \ "Removing file1; ${CVSROOT_DIRNAME}/first-dir/file1,v <-- file1 @@ -8610,11 +10358,11 @@ new revision: delete; previous revision: 1\.1 done" cd ../../1/first-dir dotest conflicts3-12 "${testcvs} -n -q update" \ -"${PROG} [a-z]*: file1 is no longer in the repository -${PROG} [a-z]*: file2 is no longer in the repository" +"${PROG} update: file1 is no longer in the repository +${PROG} update: file2 is no longer in the repository" dotest conflicts3-13 "${testcvs} -q update" \ -"${PROG} [a-z]*: file1 is no longer in the repository -${PROG} [a-z]*: file2 is no longer in the repository" +"${PROG} update: file1 is no longer in the repository +${PROG} update: file2 is no longer in the repository" # OK, now add a directory to both working directories # and see that CVS doesn't lose its mind. @@ -8623,8 +10371,8 @@ ${PROG} [a-z]*: file2 is no longer in the repository" "Directory ${CVSROOT_DIRNAME}/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" +"${PROG} add: scheduling file .sdir/sfile. for addition +${PROG} add: use .${PROG} commit. to add this file permanently" dotest conflicts3-14b "${testcvs} -q ci -m add" \ "RCS file: ${CVSROOT_DIRNAME}/first-dir/sdir/sfile,v done @@ -8652,15 +10400,15 @@ done" else dotest conflicts3-15 "${testcvs} -q update" \ "${QUESTION} sdir -${PROG} [a-z]*: ignoring sdir (CVS/Repository missing)" +${PROG} update: ignoring sdir (CVS/Repository missing)" touch sdir/CVS/Repository dotest conflicts3-16 "${testcvs} -q update" \ "${QUESTION} sdir -${PROG} [a-z]*: ignoring sdir (CVS/Entries missing)" +${PROG} update: 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)" +${PROG} update: ignoring first-dir/sdir (CVS/Entries missing)" cd first-dir fi rm -r sdir @@ -8713,8 +10461,8 @@ C sdir/sfile" dotest conflicts3-24 "${testcvs} -q update -d sdir" "U sdir/sfile" rm sdir/sfile dotest conflicts3-25 "${testcvs} rm sdir/sfile" \ -"${PROG} [a-z]*: scheduling .sdir/sfile. for removal -${PROG} [a-z]*: use .${PROG} commit. to remove this file permanently" +"${PROG} remove: scheduling .sdir/sfile. for removal +${PROG} remove: use .${PROG} commit. to remove this file permanently" dotest conflicts3-26 "${testcvs} ci -m remove sdir/sfile" \ "Removing sdir/sfile; ${CVSROOT_DIRNAME}/first-dir/sdir/sfile,v <-- sfile @@ -8741,8 +10489,8 @@ done" cd first-dir echo "The usual boring test text." > cleanme.txt dotest clean-3 "${testcvs} add cleanme.txt" \ -"${PROG} [a-z]*: scheduling file .cleanme\.txt. for addition -${PROG} [a-z]*: use .${PROG} commit. to add this file permanently" +"${PROG} add: scheduling file .cleanme\.txt. for addition +${PROG} add: use .${PROG} commit. to add this file permanently" dotest clean-4 "${testcvs} -q ci -m clean-3" \ "RCS file: ${CVSROOT_DIRNAME}/first-dir/cleanme\.txt,v done @@ -8800,7 +10548,7 @@ retrieving revision 1\.1 retrieving revision 1\.2 Merging differences between 1\.1 and 1\.2 into cleanme\.txt rcsmerge: warning: conflicts during merge -${PROG} [a-z]*: conflicts found in cleanme\.txt +${PROG} update: conflicts found in cleanme\.txt C cleanme\.txt" dotest clean-18 "${testcvs} -q update -C" \ "(Locally modified cleanme\.txt moved to \.#cleanme\.txt\.1\.1) @@ -8821,6 +10569,7 @@ fish" # -a: # error on incorrect placement: modules # error combining with other options: modules2-a* + # infinite loops: modules148a1.1 - modules148a1.2 # use to specify a file more than once: modules3 # use with ! feature: modules4 # regular modules: modules, modules2, cvsadm @@ -8855,7 +10604,7 @@ U CVSROOT/verifymsg' ${CVSROOT_DIRNAME}/CVSROOT/modules,v <-- modules new revision: 1\.[0-9]*; previous revision: 1\.[0-9]* done -${PROG} [a-z]*: Rebuilding administrative file database" +${PROG} commit: Rebuilding administrative file database" cd .. rm -rf 1 @@ -8879,7 +10628,7 @@ U CVSROOT/verifymsg' ${CVSROOT_DIRNAME}/CVSROOT/modules,v <-- modules new revision: 1\.[0-9]*; previous revision: 1\.[0-9]* done -${PROG} [a-z]*: Rebuilding administrative file database" +${PROG} commit: Rebuilding administrative file database" cd .. rm -rf 1 @@ -8906,7 +10655,7 @@ U CVSROOT/verifymsg' ${CVSROOT_DIRNAME}/CVSROOT/modules,v <-- modules new revision: 1\.[0-9]*; previous revision: 1\.[0-9]* done -${PROG} [a-z]*: Rebuilding administrative file database" +${PROG} commit: Rebuilding administrative file database" cd ../.. rm -rf 1 rm -rf ${CVSROOT_DIRNAME}/somedir @@ -8935,9 +10684,9 @@ ${PROG} [a-z]*: Rebuilding administrative file database" touch a b dotest modules-144 "${testcvs} add a b" \ -"${PROG} [a-z]*: scheduling file .a. for addition -${PROG} [a-z]*: scheduling file .b. for addition -${PROG} [a-z]*: use .${PROG} commit. to add these files permanently" +"${PROG} add: scheduling file .a. for addition +${PROG} add: scheduling file .b. for addition +${PROG} add: use .${PROG} commit. to add these files permanently" dotest modules-145 "${testcvs} ci -m added" \ "${PROG} [a-z]*: Examining . @@ -8984,6 +10733,15 @@ aliasnested -a first-dir/subdir/ssdir topfiles -a first-dir/file1 first-dir/file2 world -a . statusmod -s Mungeable +# Check for ability to block infinite loops. +infinitealias -a infinitealias +# Prior to 1.11.12 & 1.12.6, the infinite alias loop check didn't strip +# slashes or work if a module called a module which then called itself +# (A -> A was blocked, but not A -> B -> A or deeper). +infinitealias2 -a infinitealias2/ +infinitealias3 -a infinitealias4/ +infinitealias4 -a aliasmodule infinitealias5 +infinitealias5 -a infinitealias3/ # Options must come before arguments. It is possible this should # be relaxed at some point (though the result would be bizarre for # -a); for now test the current behavior. @@ -8994,7 +10752,7 @@ EOF ${CVSROOT_DIRNAME}/CVSROOT/modules,v <-- modules new revision: 1\.[0-9]*; previous revision: 1\.[0-9]* done -${PROG} [a-z]*: Rebuilding administrative file database" +${PROG} commit: Rebuilding administrative file database" cd .. # The "statusmod" module contains an error; trying to use it @@ -9005,6 +10763,11 @@ ${PROG} [a-z]*: Rebuilding administrative file database" aliasnested -a first-dir/subdir/ssdir bogusalias first-dir/subdir/a -a dirmodule first-dir/subdir +infinitealias -a infinitealias +infinitealias2 -a infinitealias2/ +infinitealias3 -a infinitealias4/ +infinitealias4 -a aliasmodule infinitealias5 +infinitealias5 -a infinitealias3/ namedmodule -d nameddir first-dir/subdir realmodule first-dir/subdir a statusmod -s Mungeable @@ -9020,6 +10783,24 @@ dirmodule NONE first-dir/subdir namedmodule NONE first-dir/subdir realmodule NONE first-dir/subdir a' + # Check that infinite loops are avoided + dotest modules-148a1.1 "${testcvs} co infinitealias" \ +"$PROG checkout: module \`infinitealias' in modules file contains infinite loop" \ +"$PROG server: module \`infinitealias' in modules file contains infinite loop +$PROG checkout: module \`infinitealias' in modules file contains infinite loop" + # Prior to 1.11.12 & 1.12.6, the inifinte alias loop check did not + # strip slashes. + dotest modules-148a1.2 "${testcvs} co infinitealias2" \ +"$PROG checkout: module \`infinitealias2' in modules file contains infinite loop" \ +"$PROG server: module \`infinitealias2' in modules file contains infinite loop +$PROG checkout: module \`infinitealias2' in modules file contains infinite loop" + # Prior to 1.11.12 & 1.12.6, the inifinte alias loop check did not + # notice when A -> B -> A, it only noticed A -> A. + dotest modules-148a1.3 "${testcvs} co infinitealias3/" \ +"$PROG checkout: module \`infinitealias3' in modules file contains infinite loop" \ +"$PROG server: module \`infinitealias3' in modules file contains infinite loop +$PROG checkout: module \`infinitealias3' in modules file contains infinite loop" + # Test that real modules check out to realmodule/a, not subdir/a. dotest modules-149a1 "${testcvs} co realmodule" "U realmodule/a" dotest modules-149a2 "test -d realmodule && test -f realmodule/a" "" @@ -9030,9 +10811,9 @@ realmodule NONE first-dir/subdir a' Are you sure you want to release (and delete) directory .realmodule.: " dotest_fail modules-149b1 "${testcvs} co realmodule/a" \ -"${PROG}"' [a-z]*: module `realmodule/a'\'' is a request for a file in a module which is not a directory' \ -"${PROG}"' [a-z]*: module `realmodule/a'\'' is a request for a file in a module which is not a directory -'"${PROG}"' \[[a-z]* aborted\]: cannot expand modules' +"${PROG}"' checkout: module `realmodule/a'\'' is a request for a file in a module which is not a directory' \ +"${PROG}"' server: module `realmodule/a'\'' is a request for a file in a module which is not a directory +'"${PROG}"' \[checkout aborted\]: cannot expand modules' # Now test the ability to check out a single file from a directory dotest modules-150c "${testcvs} co dirmodule/a" "U dirmodule/a" @@ -9048,7 +10829,7 @@ Are you sure you want to release (and delete) directory .dirmodule.: " # (Dec 95). Probably the exit status should be nonzero, # however. dotest modules-150g1 "${testcvs} co dirmodule/nonexist" \ -"${PROG} [a-z]*: warning: new-born dirmodule/nonexist has disappeared" +"${PROG} checkout: warning: new-born dirmodule/nonexist has disappeared" # We tolerate the creation of the dirmodule directory, since that # is what CVS does, not because we view that as preferable to not # creating it. @@ -9082,7 +10863,7 @@ Are you sure you want to release (and delete) directory .nameddir.: " mkdir 2 cd 2 dotest modules-155a0 "${testcvs} co aliasnested" \ -"${PROG} [a-z]*: Updating first-dir/subdir/ssdir" +"${PROG} checkout: Updating first-dir/subdir/ssdir" dotest modules-155a1 "test -d first-dir" '' dotest modules-155a2 "test -d first-dir/subdir" '' dotest modules-155a3 "test -d first-dir/subdir/ssdir" '' @@ -9116,9 +10897,9 @@ U first-dir/subdir/b" echo 'first revision' > file1 echo 'first revision' > file2 dotest modules-155c2 "${testcvs} add file1 file2" \ -"${PROG}"' [a-z]*: scheduling file `file1'\'' for addition -'"${PROG}"' [a-z]*: scheduling file `file2'\'' for addition -'"${PROG}"' [a-z]*: use .'"${PROG}"' commit. to add these files permanently' +"${PROG}"' add: scheduling file `file1'\'' for addition +'"${PROG}"' add: scheduling file `file2'\'' for addition +'"${PROG}"' add: use .'"${PROG}"' commit. to add these files permanently' dotest modules-155c3 "${testcvs} -q ci -m add-it" \ "RCS file: ${CVSROOT_DIRNAME}/first-dir/file1,v done @@ -9143,7 +10924,7 @@ U first-dir/file2" # Make sure the right thing happens if we remove a file. cd first-dir dotest modules-155c6 "${testcvs} -q rm -f file1" \ -"${PROG} [a-z]*: use .${PROG} commit. to remove this file permanently" +"${PROG} remove: use .${PROG} commit. to remove this file permanently" dotest modules-155c7 "${testcvs} -q ci -m remove-it" \ "Removing file1; ${CVSROOT_DIRNAME}/first-dir/file1,v <-- file1 @@ -9152,7 +10933,7 @@ done" cd .. rm -r first-dir dotest modules-155c8 "${testcvs} -q co topfiles" \ -"${PROG} [a-z]*: warning: first-dir/file1 is not (any longer) pertinent +"${PROG} checkout: warning: first-dir/file1 is not (any longer) pertinent U first-dir/file2" cd .. @@ -9174,8 +10955,8 @@ Directory ${CVSROOT_DIRNAME}/third-dir added to the repository" cd third-dir touch file3 dotest modules2-setup-3 "${testcvs} add file3" \ -"${PROG} [a-z]*: scheduling file .file3. for addition -${PROG} [a-z]*: use .${PROG} commit. to add this file permanently" +"${PROG} add: scheduling file .file3. for addition +${PROG} add: use .${PROG} commit. to add this file permanently" dotest modules2-setup-4 "${testcvs} -q ci -m add file3" \ "RCS file: ${CVSROOT_DIRNAME}/third-dir/file3,v done @@ -9207,7 +10988,7 @@ EOF ${CVSROOT_DIRNAME}/CVSROOT/modules,v <-- modules new revision: 1\.[0-9]*; previous revision: 1\.[0-9]* done -${PROG} [a-z]*: Rebuilding administrative file database" +${PROG} commit: Rebuilding administrative file database" cd .. @@ -9258,22 +11039,22 @@ EOF # Note that this message should say "Updating ampermodule/first-dir" # I suspect. This is a long-standing behavior/bug.... dotest modules2-9 "${testcvs} co ampermodule" \ -"${PROG} [a-z]*: Updating first-dir -${PROG} [a-z]*: Updating second-dir" +"${PROG} checkout: Updating first-dir +${PROG} checkout: Updating second-dir" touch ampermodule/first-dir/amper1 cd ampermodule dotest modules2-10 "${testcvs} add first-dir/amper1" \ -"${PROG} [a-z]*: scheduling file .first-dir/amper1. for addition -${PROG} [a-z]*: use .${PROG} commit. to add this file permanently" +"${PROG} add: scheduling file .first-dir/amper1. for addition +${PROG} add: use .${PROG} commit. to add this file permanently" cd .. # As with the "Updating xxx" message, the "U first-dir/amper1" # message (instead of "U ampermodule/first-dir/amper1") is # rather fishy. dotest modules2-12 "${testcvs} co ampermodule" \ -"${PROG} [a-z]*: Updating first-dir +"${PROG} checkout: Updating first-dir A first-dir/amper1 -${PROG} [a-z]*: Updating second-dir" +${PROG} checkout: Updating second-dir" if $remote; then dotest modules2-13 "${testcvs} -q ci -m add-it ampermodule" \ @@ -9304,7 +11085,7 @@ done" mkdir 1; cd 1 dotest modules2-14 "${testcvs} co combmodule" \ "U combmodule/file3 -${PROG} [a-z]*: Updating first-dir +${PROG} checkout: Updating first-dir U first-dir/amper1" dotest modules2-15 "test -f combmodule/file3" "" dotest modules2-16 "test -f combmodule/first-dir/amper1" "" @@ -9318,7 +11099,7 @@ U first-dir/amper1" # third-dir, so CVS just acts as if there is nothing there # to do. dotest modules2-17 "${testcvs} update -d" \ -"${PROG} [a-z]*: Updating \." +"${PROG} update: Updating \." cd .. dotest modules2-18 "${testcvs} -q co combmodule" \ @@ -9332,15 +11113,15 @@ U first-dir/amper1" # "missing directory" error message. mkdir 1; cd 1 dotest modules2-20 "${testcvs} co ampdirmod" \ -"${PROG} [a-z]*: Updating first-dir +"${PROG} checkout: Updating first-dir U first-dir/amper1 -${PROG} [a-z]*: Updating second-dir" +${PROG} checkout: Updating second-dir" dotest modules2-21 "test -f newdir/first-dir/amper1" "" dotest modules2-22 "test -d newdir/second-dir" "" dotest_fail modules2-23 "${testcvs} co badmod" \ -"${PROG} [a-z]*: modules file missing directory for module badmod" \ -"${PROG} [a-z]*: modules file missing directory for module badmod -${PROG} \[[a-z]* aborted\]: cannot expand modules" +"${PROG} checkout: modules file missing directory for module badmod" \ +"${PROG} server: modules file missing directory for module badmod +${PROG} \[checkout aborted\]: cannot expand modules" cd .. rm -r 1 @@ -9406,12 +11187,12 @@ ${PROG} \[[a-z]* aborted\]: cannot expand 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" +${PROG} commit: Rebuilding administrative file database" cd .. dotest_fail modules2-a1 "${testcvs} -q co aliasopt" \ -"${PROG} [a-z]*: -a cannot be specified in the modules file along with other options" \ -"${PROG} [a-z]*: -a cannot be specified in the modules file along with other options -${PROG} \[[a-z]* aborted\]: cannot expand modules" +"${PROG} checkout: -a cannot be specified in the modules file along with other options" \ +"${PROG} server: -a cannot be specified in the modules file along with other options +${PROG} \[checkout aborted\]: cannot expand modules" cd ..; rm -r 1 # Clean up. @@ -9435,8 +11216,8 @@ ${PROG} \[[a-z]* aborted\]: cannot expand modules" cd first-dir echo file1 >file1 dotest modules3-2 "${testcvs} add file1" \ -"${PROG}"' [a-z]*: scheduling file `file1'\'' for addition -'"${PROG}"' [a-z]*: use .'"${PROG}"' commit. to add this file permanently' +"${PROG} add: scheduling file \`file1' for addition +${PROG} add: use '${PROG} commit' to add this file permanently" dotest modules3-3 "${testcvs} -q ci -m add-it" \ "RCS file: ${CVSROOT_DIRNAME}/first-dir/file1,v done @@ -9463,7 +11244,7 @@ EOF ${CVSROOT_DIRNAME}/CVSROOT/modules,v <-- modules new revision: 1\.[0-9]*; previous revision: 1\.[0-9]* done -${PROG} [a-z]*: Rebuilding administrative file database" +${PROG} commit: Rebuilding administrative file database" cd .. dotest modules3-6 "${testcvs} -q co bigmod" '' @@ -9480,18 +11261,18 @@ ${PROG} [a-z]*: Rebuilding administrative file database" # considering this is a documented technique and everything. dotest modules3-7a \ "${testcvs} import -m add-dirs second-dir tag1 tag2" \ -"${PROG} [a-z]*: Importing ${CVSROOT_DIRNAME}/second-dir/suba -${PROG} [a-z]*: Importing ${CVSROOT_DIRNAME}/second-dir/suba/subb +"${PROG} import: Importing ${CVSROOT_DIRNAME}/second-dir/suba +${PROG} import: Importing ${CVSROOT_DIRNAME}/second-dir/suba/subb No conflicts created by this import" " No conflicts created by this import" cd ..; rm -r 1 mkdir 1; cd 1 dotest modules3-7b "${testcvs} co second-dir" \ -"${PROG} [a-z]*: Updating second-dir -${PROG} [a-z]*: Updating second-dir/suba -${PROG} [a-z]*: Updating second-dir/suba/subb" \ -"${PROG} server: Updating second-dir" +"${PROG} checkout: Updating second-dir +${PROG} checkout: Updating second-dir/suba +${PROG} checkout: Updating second-dir/suba/subb" \ +"${PROG} checkout: Updating second-dir" if $remote; then cd second-dir @@ -9508,8 +11289,8 @@ ${PROG} [a-z]*: Updating second-dir/suba/subb" \ cd second-dir/suba/subb touch fileb dotest modules3-7c "${testcvs} add fileb" \ -"${PROG} [a-z]*: scheduling file .fileb. for addition -${PROG} [a-z]*: use .${PROG} commit. to add this file permanently" +"${PROG} add: scheduling file .fileb. for addition +${PROG} add: use .${PROG} commit. to add this file permanently" dotest modules3-7d "${testcvs} -q ci -m add-it" \ "RCS file: ${CVSROOT_DIRNAME}/second-dir/suba/subb/fileb,v done @@ -9612,13 +11393,13 @@ done" echo file1 > file1 dotest modules4-4 "${testcvs} add file1" \ -"${PROG}"' [a-z]*: scheduling file `file1'\'' for addition -'"${PROG}"' [a-z]*: use .'"${PROG}"' commit. to add this file permanently' +"${PROG}"' add: scheduling file `file1'\'' for addition +'"${PROG}"' add: use .'"${PROG}"' commit. to add this file permanently' echo file2 > subdir/file2 dotest modules4-5 "${testcvs} add subdir/file2" \ -"${PROG}"' [a-z]*: scheduling file `subdir/file2'\'' for addition -'"${PROG}"' [a-z]*: use .'"${PROG}"' commit. to add this file permanently' +"${PROG}"' add: scheduling file `subdir/file2'\'' for addition +'"${PROG}"' add: use .'"${PROG}"' commit. to add this file permanently' dotest modules4-6 "${testcvs} -q ci -m add-it" \ "RCS file: ${CVSROOT_DIRNAME}/first-dir/file1,v @@ -9649,7 +11430,7 @@ EOF ${CVSROOT_DIRNAME}/CVSROOT/modules,v <-- modules new revision: 1\.[0-9]*; previous revision: 1\.[0-9]* done -${PROG} [a-z]*: Rebuilding administrative file database" +${PROG} commit: Rebuilding administrative file database" cd .. cd .. @@ -9683,8 +11464,8 @@ U first-dir/subdir/file2" rm -r 2 dotest modules4-12 "${testcvs} rtag tag some" \ -"${PROG} [a-z]*: Tagging first-dir -${PROG} [a-z]*: Ignoring first-dir/subdir" +"${PROG} rtag: Tagging first-dir +${PROG} rtag: Ignoring first-dir/subdir" cd 1/first-dir/subdir dotest modules4-13 "${testcvs} log file2" " @@ -9727,9 +11508,9 @@ add-it "Directory ${CVSROOT_DIRNAME}/first-dir/subdir/ssdir added to the repository" touch a b dotest modules5-4 "${testcvs} add a b" \ -"${PROG} [a-z]*: scheduling file .a. for addition -${PROG} [a-z]*: scheduling file .b. for addition -${PROG} [a-z]*: use .${PROG} commit. to add these files permanently" +"${PROG} add: scheduling file .a. for addition +${PROG} add: scheduling file .b. for addition +${PROG} add: use .${PROG} commit. to add these files permanently" dotest modules5-5 "${testcvs} ci -m added" \ "${PROG} [a-z]*: Examining . @@ -9764,17 +11545,22 @@ U CVSROOT/verifymsg" # FIXCVS: The sleep in the following script helps avoid out of # order messages, but we really need to figure out how to fix # cvs to prevent them in the first place. - for i in checkin checkout update export tag; do + for i in checkout export tag; do cat >> ${CVSROOT_DIRNAME}/$i.sh <<EOF #! /bin/sh sleep 1 echo "$i script invoked in \`pwd\`" echo "args: \$@" EOF - chmod +x ${CVSROOT_DIRNAME}/$i.sh + # Cygwin doesn't set premissions correctly over the Samba share. + if test -n "$remotehost"; then + $CVS_RSH $remotehost "chmod +x ${CVSROOT_DIRNAME}/$i.sh" + else + chmod +x ${CVSROOT_DIRNAME}/$i.sh + fi done - OPTS="-i ${CVSROOT_DIRNAME}/checkin.sh -o${CVSROOT_DIRNAME}/checkout.sh -u ${CVSROOT_DIRNAME}/update.sh -e ${CVSROOT_DIRNAME}/export.sh -t${CVSROOT_DIRNAME}/tag.sh" + OPTS="-o${CVSROOT_DIRNAME}/checkout.sh -e ${CVSROOT_DIRNAME}/export.sh -t${CVSROOT_DIRNAME}/tag.sh" cat >CVSROOT/modules <<EOF realmodule ${OPTS} first-dir/subdir a dirmodule ${OPTS} first-dir/subdir @@ -9787,7 +11573,7 @@ EOF ${CVSROOT_DIRNAME}/CVSROOT/modules,v <-- modules new revision: 1\.[0-9]*; previous revision: 1\.[0-9]* done -${PROG} [a-z]*: Rebuilding administrative file database" +${PROG} commit: Rebuilding administrative file database" cd .. rm -rf first-dir @@ -9796,13 +11582,13 @@ ${PROG} [a-z]*: Rebuilding administrative file database" if $remote; then dotest modules5-8 "${testcvs} co realmodule" \ "U realmodule/a -${PROG} [a-z]*: Executing ..${CVSROOT_DIRNAME}/checkout\.sh. .realmodule.. +${PROG} checkout: Executing ..${CVSROOT_DIRNAME}/checkout\.sh. .realmodule.. checkout script invoked in ${TMPDIR}/cvs-serv[0-9a-z]* args: realmodule" else dotest modules5-8 "${testcvs} co realmodule" \ "U realmodule/a -${PROG} [a-z]*: Executing ..${CVSROOT_DIRNAME}/checkout\.sh. .realmodule.. +${PROG} checkout: Executing ..${CVSROOT_DIRNAME}/checkout\.sh. .realmodule.. checkout script invoked in ${TESTDIR}/1 args: realmodule" fi @@ -9812,36 +11598,24 @@ args: realmodule" dotest modules5-11 "${testcvs} -q co realmodule" \ "checkout script invoked in ${TMPDIR}/cvs-serv[0-9a-z]* args: realmodule" - dotest modules5-12 "${testcvs} -q update" \ -"${PROG} [a-z]*: Executing ..${CVSROOT_DIRNAME}/update\.sh. .${CVSROOT_DIRNAME}/first-dir/subdir.. -update script invoked in ${TMPDIR}/cvs-serv[0-9a-z]*/realmodule -args: ${CVSROOT_DIRNAME}/first-dir/subdir" + dotest modules5-12 "${testcvs} -q update" '' echo "change" >>realmodule/a dotest modules5-13 "${testcvs} -q ci -m." \ "Checking in realmodule/a; ${CVSROOT_DIRNAME}/first-dir/subdir/a,v <-- a new revision: 1\.2; previous revision: 1\.1 -done -${PROG} [a-z]*: Executing ..${CVSROOT_DIRNAME}/checkin\.sh. .${CVSROOT_DIRNAME}/first-dir/subdir.. -checkin script invoked in ${TMPDIR}/cvs-serv[0-9a-z]*/realmodule -args: ${CVSROOT_DIRNAME}/first-dir/subdir" +done" else dotest modules5-11 "${testcvs} -q co realmodule" \ "checkout script invoked in ${TESTDIR}/1 args: realmodule" - dotest modules5-12 "${testcvs} -q update" \ -"${PROG} [a-z]*: Executing ..${CVSROOT_DIRNAME}/update\.sh. .${CVSROOT_DIRNAME}/first-dir/subdir.. -update script invoked in ${TESTDIR}/1/realmodule -args: ${CVSROOT_DIRNAME}/first-dir/subdir" + dotest modules5-12 "${testcvs} -q update" '' echo "change" >>realmodule/a dotest modules5-13 "${testcvs} -q ci -m." \ "Checking in realmodule/a; ${CVSROOT_DIRNAME}/first-dir/subdir/a,v <-- a new revision: 1\.2; previous revision: 1\.1 -done -${PROG} [a-z]*: Executing ..${CVSROOT_DIRNAME}/checkin\.sh. .${CVSROOT_DIRNAME}/first-dir/subdir.. -checkin script invoked in ${TESTDIR}/1/realmodule -args: ${CVSROOT_DIRNAME}/first-dir/subdir" +done" fi dotest modules5-14 "echo yes | ${testcvs} release -d realmodule" \ "You have \[0\] altered files in this repository\. @@ -9865,21 +11639,21 @@ args: realmodule" rm -r realmodule dotest_fail modules5-17 "${testcvs} co realmodule/a" \ -"${PROG}"' [a-z]*: module `realmodule/a'\'' is a request for a file in a module which is not a directory' \ -"${PROG}"' [a-z]*: module `realmodule/a'\'' is a request for a file in a module which is not a directory -'"${PROG}"' \[[a-z]* aborted\]: cannot expand modules' +"${PROG}"' checkout: module `realmodule/a'\'' is a request for a file in a module which is not a directory' \ +"${PROG}"' server: module `realmodule/a'\'' is a request for a file in a module which is not a directory +'"${PROG}"' \[checkout aborted\]: cannot expand modules' # Now test the ability to check out a single file from a directory if $remote; then dotest modules5-18 "${testcvs} co dirmodule/a" \ "U dirmodule/a -${PROG} [a-z]*: Executing ..${CVSROOT_DIRNAME}/checkout\.sh. .dirmodule.. +${PROG} checkout: Executing ..${CVSROOT_DIRNAME}/checkout\.sh. .dirmodule.. checkout script invoked in ${TMPDIR}/cvs-serv[0-9a-z]* args: dirmodule" else dotest modules5-18 "${testcvs} co dirmodule/a" \ "U dirmodule/a -${PROG} [a-z]*: Executing ..${CVSROOT_DIRNAME}/checkout\.sh. .dirmodule.. +${PROG} checkout: Executing ..${CVSROOT_DIRNAME}/checkout\.sh. .dirmodule.. checkout script invoked in ${TESTDIR}/1 args: dirmodule" fi @@ -9897,14 +11671,14 @@ Are you sure you want to release (and delete) directory .dirmodule.: " # however. if $remote; then dotest modules5-22 "${testcvs} co dirmodule/nonexist" \ -"${PROG} [a-z]*: warning: new-born dirmodule/nonexist has disappeared -${PROG} [a-z]*: Executing ..${CVSROOT_DIRNAME}/checkout\.sh. .dirmodule.. +"${PROG} checkout: warning: new-born dirmodule/nonexist has disappeared +${PROG} checkout: Executing ..${CVSROOT_DIRNAME}/checkout\.sh. .dirmodule.. checkout script invoked in ${TMPDIR}/cvs-serv[0-9a-z]* args: dirmodule" else dotest modules5-22 "${testcvs} co dirmodule/nonexist" \ -"${PROG} [a-z]*: warning: new-born dirmodule/nonexist has disappeared -${PROG} [a-z]*: Executing ..${CVSROOT_DIRNAME}/checkout\.sh. .dirmodule.. +"${PROG} checkout: warning: new-born dirmodule/nonexist has disappeared +${PROG} checkout: Executing ..${CVSROOT_DIRNAME}/checkout\.sh. .dirmodule.. checkout script invoked in ${TESTDIR}/1 args: dirmodule" fi @@ -9937,17 +11711,11 @@ args: nameddir" if $remote; then dotest modules5-26 "${testcvs} -q co namedmodule" \ "M nameddir/a -${PROG} [a-z]*: Executing ..${CVSROOT_DIRNAME}/update\.sh. .${CVSROOT_DIRNAME}/first-dir/subdir.. -update script invoked in ${TMPDIR}/cvs-serv[0-9a-z]*/nameddir -args: ${CVSROOT_DIRNAME}/first-dir/subdir checkout script invoked in ${TMPDIR}/cvs-serv[0-9a-z]* args: nameddir" else dotest modules5-26 "${testcvs} -q co namedmodule" \ "M nameddir/a -${PROG} [a-z]*: Executing ..${CVSROOT_DIRNAME}/update\.sh. .${CVSROOT_DIRNAME}/first-dir/subdir.. -update script invoked in ${TESTDIR}/1/nameddir -args: ${CVSROOT_DIRNAME}/first-dir/subdir checkout script invoked in ${TESTDIR}/1 args: nameddir" fi @@ -9956,17 +11724,11 @@ args: nameddir" if $remote; then dotest modules5-27 "${testcvs} -q co namedmodule" \ "U nameddir/a -${PROG} [a-z]*: Executing ..${CVSROOT_DIRNAME}/update\.sh. .${CVSROOT_DIRNAME}/first-dir/subdir.. -update script invoked in ${TMPDIR}/cvs-serv[0-9a-z]*/nameddir -args: ${CVSROOT_DIRNAME}/first-dir/subdir checkout script invoked in ${TMPDIR}/cvs-serv[0-9a-z]* args: nameddir" else dotest modules5-27 "${testcvs} -q co namedmodule" \ "U nameddir/a -${PROG} [a-z]*: Executing ..${CVSROOT_DIRNAME}/update\.sh. .${CVSROOT_DIRNAME}/first-dir/subdir.. -update script invoked in ${TESTDIR}/1/nameddir -args: ${CVSROOT_DIRNAME}/first-dir/subdir checkout script invoked in ${TESTDIR}/1 args: nameddir" fi @@ -9980,13 +11742,13 @@ Are you sure you want to release (and delete) directory .nameddir.: " if $remote; then dotest modules5-29 "${testcvs} co -d mydir realmodule" \ "U mydir/a -${PROG} [a-z]*: Executing ..${CVSROOT_DIRNAME}/checkout\.sh. .mydir.. +${PROG} checkout: Executing ..${CVSROOT_DIRNAME}/checkout\.sh. .mydir.. checkout script invoked in ${TMPDIR}/cvs-serv[0-9a-z]* args: mydir" else dotest modules5-29 "${testcvs} co -d mydir realmodule" \ "U mydir/a -${PROG} [a-z]*: Executing ..${CVSROOT_DIRNAME}/checkout\.sh. .mydir.. +${PROG} checkout: Executing ..${CVSROOT_DIRNAME}/checkout\.sh. .mydir.. checkout script invoked in ${TESTDIR}/1 args: mydir" fi @@ -9996,36 +11758,24 @@ args: mydir" dotest modules5-32 "${testcvs} -q co -d mydir realmodule" \ "checkout script invoked in ${TMPDIR}/cvs-serv[0-9a-z]* args: mydir" - dotest modules5-33 "${testcvs} -q update" \ -"${PROG} [a-z]*: Executing ..${CVSROOT_DIRNAME}/update\.sh. .${CVSROOT_DIRNAME}/first-dir/subdir.. -update script invoked in ${TMPDIR}/cvs-serv[0-9a-z]*/mydir -args: ${CVSROOT_DIRNAME}/first-dir/subdir" + dotest modules5-33 "${testcvs} -q update" '' echo "change" >>mydir/a dotest modules5-34 "${testcvs} -q ci -m." \ "Checking in mydir/a; ${CVSROOT_DIRNAME}/first-dir/subdir/a,v <-- a new revision: 1\.3; previous revision: 1\.2 -done -${PROG} [a-z]*: Executing ..${CVSROOT_DIRNAME}/checkin\.sh. .${CVSROOT_DIRNAME}/first-dir/subdir.. -checkin script invoked in ${TMPDIR}/cvs-serv[0-9a-z]*/mydir -args: ${CVSROOT_DIRNAME}/first-dir/subdir" +done" else dotest modules5-32 "${testcvs} -q co -d mydir realmodule" \ "checkout script invoked in ${TESTDIR}/1 args: mydir" - dotest modules5-33 "${testcvs} -q update" \ -"${PROG} [a-z]*: Executing ..${CVSROOT_DIRNAME}/update\.sh. .${CVSROOT_DIRNAME}/first-dir/subdir.. -update script invoked in ${TESTDIR}/1/mydir -args: ${CVSROOT_DIRNAME}/first-dir/subdir" + dotest modules5-33 "${testcvs} -q update" '' echo "change" >>mydir/a dotest modules5-34 "${testcvs} -q ci -m." \ "Checking in mydir/a; ${CVSROOT_DIRNAME}/first-dir/subdir/a,v <-- a new revision: 1\.3; previous revision: 1\.2 -done -${PROG} [a-z]*: Executing ..${CVSROOT_DIRNAME}/checkin\.sh. .${CVSROOT_DIRNAME}/first-dir/subdir.. -checkin script invoked in ${TESTDIR}/1/mydir -args: ${CVSROOT_DIRNAME}/first-dir/subdir" +done" fi dotest modules5-35 "echo yes | ${testcvs} release -d mydir" \ "You have \[0\] altered files in this repository\. @@ -10053,13 +11803,13 @@ args: mydir" if $remote; then dotest modules5-38 "${testcvs} co -d mydir dirmodule/a" \ "U mydir/a -${PROG} [a-z]*: Executing ..${CVSROOT_DIRNAME}/checkout\.sh. .mydir.. +${PROG} checkout: Executing ..${CVSROOT_DIRNAME}/checkout\.sh. .mydir.. checkout script invoked in ${TMPDIR}/cvs-serv[0-9a-z]* args: mydir" else dotest modules5-38 "${testcvs} co -d mydir dirmodule/a" \ "U mydir/a -${PROG} [a-z]*: Executing ..${CVSROOT_DIRNAME}/checkout\.sh. .mydir.. +${PROG} checkout: Executing ..${CVSROOT_DIRNAME}/checkout\.sh. .mydir.. checkout script invoked in ${TESTDIR}/1 args: mydir" fi @@ -10077,14 +11827,14 @@ Are you sure you want to release (and delete) directory .mydir.: " # however. if $remote; then dotest modules5-42 "${testcvs} co -d mydir dirmodule/nonexist" \ -"${PROG} [a-z]*: warning: new-born mydir/nonexist has disappeared -${PROG} [a-z]*: Executing ..${CVSROOT_DIRNAME}/checkout\.sh. .mydir.. +"${PROG} checkout: warning: new-born mydir/nonexist has disappeared +${PROG} checkout: Executing ..${CVSROOT_DIRNAME}/checkout\.sh. .mydir.. checkout script invoked in ${TMPDIR}/cvs-serv[0-9a-z]* args: mydir" else dotest modules5-42 "${testcvs} co -d mydir dirmodule/nonexist" \ -"${PROG} [a-z]*: warning: new-born mydir/nonexist has disappeared -${PROG} [a-z]*: Executing ..${CVSROOT_DIRNAME}/checkout\.sh. .mydir.. +"${PROG} checkout: warning: new-born mydir/nonexist has disappeared +${PROG} checkout: Executing ..${CVSROOT_DIRNAME}/checkout\.sh. .mydir.. checkout script invoked in ${TESTDIR}/1 args: mydir" fi @@ -10116,17 +11866,11 @@ args: mydir" if $remote; then dotest modules5-47 "${testcvs} -q co -d mydir namedmodule" \ "M mydir/a -${PROG} [a-z]*: Executing ..${CVSROOT_DIRNAME}/update\.sh. .${CVSROOT_DIRNAME}/first-dir/subdir.. -update script invoked in ${TMPDIR}/cvs-serv[0-9a-z]*/mydir -args: ${CVSROOT_DIRNAME}/first-dir/subdir checkout script invoked in ${TMPDIR}/cvs-serv[0-9a-z]* args: mydir" else dotest modules5-47 "${testcvs} -q co -d mydir namedmodule" \ "M mydir/a -${PROG} [a-z]*: Executing ..${CVSROOT_DIRNAME}/update\.sh. .${CVSROOT_DIRNAME}/first-dir/subdir.. -update script invoked in ${TESTDIR}/1/mydir -args: ${CVSROOT_DIRNAME}/first-dir/subdir checkout script invoked in ${TESTDIR}/1 args: mydir" fi @@ -10135,17 +11879,11 @@ args: mydir" if $remote; then dotest modules5-48 "${testcvs} -q co -d mydir namedmodule" \ "U mydir/a -${PROG} [a-z]*: Executing ..${CVSROOT_DIRNAME}/update\.sh. .${CVSROOT_DIRNAME}/first-dir/subdir.. -update script invoked in ${TMPDIR}/cvs-serv[0-9a-z]*/mydir -args: ${CVSROOT_DIRNAME}/first-dir/subdir checkout script invoked in ${TMPDIR}/cvs-serv[0-9a-z]* args: mydir" else dotest modules5-48 "${testcvs} -q co -d mydir namedmodule" \ "U mydir/a -${PROG} [a-z]*: Executing ..${CVSROOT_DIRNAME}/update\.sh. .${CVSROOT_DIRNAME}/first-dir/subdir.. -update script invoked in ${TESTDIR}/1/mydir -args: ${CVSROOT_DIRNAME}/first-dir/subdir checkout script invoked in ${TESTDIR}/1 args: mydir" fi @@ -10184,15 +11922,15 @@ Are you sure you want to release (and delete) directory .mydir.: " ${CVSROOT_DIRNAME}/CVSROOT/modules,v <-- modules new revision: [0-9.]*; previous revision: [0-9.]* done -${PROG} [a-z]*: Rebuilding administrative file database" +${PROG} commit: Rebuilding administrative file database" # Here's where CVS would report not being able to find `lename' cd .. dotest_fail modules6-1 "${testcvs} -q co badname" \ -"${PROG} [a-z]*: warning: NULL value for key .badname. at line 2 of .${CVSROOT_DIRNAME}/CVSROOT/modules. -${PROG} [a-z]*: cannot find module .badname. - ignored" \ -"${PROG} [a-z]*: warning: NULL value for key .badname. at line 2 of .${CVSROOT_DIRNAME}/CVSROOT/modules. -${PROG} [a-z]*: cannot find module .badname. - ignored +"${PROG} checkout: warning: NULL value for key .badname. at line 2 of .${CVSROOT_DIRNAME}/CVSROOT/modules. +${PROG} checkout: cannot find module .badname. - ignored" \ +"${PROG} server: warning: NULL value for key .badname. at line 2 of .${CVSROOT_DIRNAME}/CVSROOT/modules. +${PROG} server: cannot find module .badname. - ignored ${PROG} \[checkout aborted\]: cannot expand modules" # cleanup @@ -10203,7 +11941,7 @@ ${PROG} \[checkout aborted\]: cannot expand modules" ${CVSROOT_DIRNAME}/CVSROOT/modules,v <-- modules new revision: [0-9.]*; previous revision: [0-9.]* done -${PROG} [a-z]*: Rebuilding administrative file database" +${PROG} commit: Rebuilding administrative file database" cd ../.. if $keep; then :; else @@ -10211,30 +11949,160 @@ ${PROG} [a-z]*: Rebuilding administrative file database" fi ;; - mkmodules-temp-file-removal) + mkmodules) # When a file listed in checkoutlist doesn't exist, cvs-1.10.4 # would fail to remove the CVSROOT/.#[0-9]* temporary file it # creates while mkmodules is in the process of trying to check # out the missing file. mkdir 1; cd 1 - dotest mtfr-1 "${testcvs} -Q co CVSROOT" '' + dotest mkmodules-temp-file-removal-1 "${testcvs} -Q co CVSROOT" '' cd CVSROOT echo no-such-file >> checkoutlist - dotest mtfr-2 "${testcvs} -Q ci -m. checkoutlist" \ + dotest mkmodules-temp-file-removal-2 "${testcvs} -Q ci -m. checkoutlist" \ "Checking in checkoutlist; $CVSROOT_DIRNAME/CVSROOT/checkoutlist,v <-- checkoutlist new revision: 1\.2; previous revision: 1\.1 done -$PROG [a-z]*: Rebuilding administrative file database" +${PROG} commit: Rebuilding administrative file database" - dotest mtfr-3 "echo $CVSROOT_DIRNAME/CVSROOT/.#[0-9]*" \ + dotest mkmodules-temp-file-removal-3 "echo $CVSROOT_DIRNAME/CVSROOT/.#[0-9]*" \ "$CVSROOT_DIRNAME/CVSROOT/\.#\[0-9\]\*" + # Versions 1.11.6 & 1.12.1 and earlier of CVS printed most of the + # white space included before error messages in checkoutlist. + echo "no-such-file Failed to update no-such-file." >checkoutlist + dotest mkmodules-error-message-1 "${testcvs} -Q ci -m. checkoutlist" \ +"Checking in checkoutlist; +$CVSROOT_DIRNAME/CVSROOT/checkoutlist,v <-- checkoutlist +new revision: 1\.3; previous revision: 1\.2 +done +${PROG} commit: Rebuilding administrative file database +${PROG} commit: Failed to update no-such-file\." + + # Versions 1.11.6 & 1.12.1 and earlier of CVS used the error string + # from the checkoutlist file as the format string passed to error()'s + # printf. Check that this is no longer the case by verifying that + # printf format patterns remain unchanged. + echo "no-such-file Failed to update %s %lx times because %s happened %d times." >checkoutlist + dotest mkmodules-error-message-2 "${testcvs} -Q ci -m. checkoutlist" \ +"Checking in checkoutlist; +$CVSROOT_DIRNAME/CVSROOT/checkoutlist,v <-- checkoutlist +new revision: 1\.4; previous revision: 1\.3 +done +${PROG} commit: Rebuilding administrative file database +${PROG} commit: Failed to update %s %lx times because %s happened %d times\." + + dotest mkmodules-cleanup-1 "${testcvs} -Q up -pr1.1 checkoutlist >checkoutlist" + dotest mkmodules-cleanup-2 "${testcvs} -Q ci -m. checkoutlist" \ +"Checking in checkoutlist; +$CVSROOT_DIRNAME/CVSROOT/checkoutlist,v <-- checkoutlist +new revision: 1\.5; previous revision: 1\.4 +done +${PROG} commit: Rebuilding administrative file database" + cd ../.. rm -rf 1 ;; + co-d) + # Some tests of various permutations of co-d when directories exist + # and checkouts lengthen. + # + # Interestingly enough, these same tests pass when the directory + # lengthening happens via the modules file. Go figure. + module=co-d + mkdir $module; cd $module + mkdir top; cd top + dotest co-d-init-1 "$testcvs -Q co -l ." + mkdir $module + dotest co-d-init-2 "$testcvs -Q add $module" + cd $module + echo content >file1 + echo different content >file2 + dotest co-d-init-3 "$testcvs -Q add file1 file2" + dotest co-d-init-4 "$testcvs -Q ci -madd-em" \ +"RCS file: $CVSROOT_DIRNAME/co-d/file1,v +done +Checking in file1; +$CVSROOT_DIRNAME/co-d/file1,v <-- file1 +initial revision: 1\.1 +done +RCS file: $CVSROOT_DIRNAME/co-d/file2,v +done +Checking in file2; +$CVSROOT_DIRNAME/co-d/file2,v <-- file2 +initial revision: 1\.1 +done" + cd ../.. + + mkdir 2; cd 2 + dotest co-d-1 "$testcvs -q co -d dir $module" \ +"U dir/file1 +U dir/file2" + dotest co-d-1.2 "cat dir/CVS/Repository" "$module" + + # FIXCVS: This should work. Correct expected result: + # + #"U dir2/sdir/file1 + #U dir2/sdir/file2" + dotest_fail co-d-2 "$testcvs -q co -d dir2/sdir $module" \ +"$PROG \[checkout aborted\]: could not change directory to requested checkout directory \`dir2': No such file or directory" + # FIXCVS: + # dotest co-d-2.2 "cat dir4/CVS/Repository" "CVSROOT/Emptydir" + # dotest co-d-2.3 "cat dir5/CVS/Repository" "$module" + + mkdir dir3 + dotest co-d-3 "$testcvs -q co -d dir3 $module" \ +"U dir3/file1 +U dir3/file2" + dotest co-d-3.2 "cat dir3/CVS/Repository" "$module" + + if $remote; then + # FIXCVS: As for co-d-2. + mkdir dir4 + dotest_fail co-d-4r "$testcvs -q co -d dir4/sdir $module" \ +"$PROG \[checkout aborted\]: could not change directory to requested checkout directory \`dir4': No such file or directory" + + # FIXCVS: As for co-d-2. + mkdir dir5 + mkdir dir5/sdir + dotest_fail co-d-5r "$testcvs -q co -d dir5/sdir $module" \ +"$PROG \[checkout aborted\]: could not change directory to requested checkout directory \`dir5': No such file or directory" + else + mkdir dir4 + dotest co-d-4 "$testcvs -q co -d dir4/sdir $module" \ +"U dir4/sdir/file1 +U dir4/sdir/file2" + # CVS only creates administration directories for directories it + # creates, and the last portion of the path passed to -d + # regardless. + dotest_fail co-d-4.2 "test -d dir4/CVS" + dotest co-d-4.3 "cat dir4/sdir/CVS/Repository" "$module" + + mkdir dir5 + mkdir dir5/sdir + dotest co-d-5 "$testcvs -q co -d dir5/sdir $module" \ +"U dir5/sdir/file1 +U dir5/sdir/file2" + # CVS only creates administration directories for directories it + # creates, and the last portion of the path passed to -d + # regardless. + dotest_fail co-d-5.2 "test -d dir5/CVS" + dotest co-d-5.3 "cat dir5/sdir/CVS/Repository" "$module" + fi + + # clean up + if $keep; then + echo Keeping ${TESTDIR} and exiting due to --keep + exit 0 + fi + + cd ../.. + rm -rf $CVSROOT_DIRNAME/$module + rm -r $module + ;; + cvsadm) # These test check the content of CVS' administrative # files as they are checked out in various configurations. @@ -10286,7 +12154,7 @@ $PROG [a-z]*: Rebuilding administrative file database" ${CVSROOT_DIRNAME}/CVSROOT/config,v <-- config new revision: 1\.[0-9]*; previous revision: 1\.[0-9]* done -${PROG} [a-z]*: Rebuilding administrative file database" +${PROG} commit: Rebuilding administrative file database" cd ../.. rm -r 1 @@ -10326,9 +12194,9 @@ 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" \ -"${PROG} [a-z]*: Examining . -${PROG} [a-z]*: Examining CVSROOT" +${PROG} commit: Rebuilding administrative file database" \ +"${PROG} commit: Examining . +${PROG} commit: Examining CVSROOT" rm -rf CVS CVSROOT; # Create the various modules @@ -10353,11 +12221,11 @@ Directory ${CVSROOT_DIRNAME}/mod2-2/sub2-2 added to the repository" echo "file2" > mod2/sub2/file2 echo "file2-2" > mod2-2/sub2-2/file2-2 dotest cvsadm-2aa "${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" +"${PROG} add: scheduling file .mod1/file1. for addition +${PROG} add: scheduling file .mod1-2/file1-2. for addition +${PROG} add: scheduling file .mod2/sub2/file2. for addition +${PROG} add: scheduling file .mod2-2/sub2-2/file2-2. for addition +${PROG} add: 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 @@ -10404,35 +12272,35 @@ done" # order. dotest cvsadm-3 "${testcvs} co 1mod" \ -"${PROG} [a-z]*: Updating 1mod +"${PROG} checkout: Updating 1mod U 1mod/file1" dotest cvsadm-3b "cat CVS/Repository" "\." dotest cvsadm-3d "cat 1mod/CVS/Repository" "mod1" rm -rf CVS 1mod dotest cvsadm-4 "${testcvs} co 2mod" \ -"${PROG} [a-z]*: Updating 2mod +"${PROG} checkout: Updating 2mod U 2mod/file2" dotest cvsadm-4b "cat CVS/Repository" "\." dotest cvsadm-4d "cat 2mod/CVS/Repository" "mod2/sub2" rm -rf CVS 2mod dotest cvsadm-5 "${testcvs} co 1d1mod" \ -"${PROG} [a-z]*: Updating dir1d1 +"${PROG} checkout: Updating dir1d1 U dir1d1/file1" dotest cvsadm-5b "cat CVS/Repository" "\." dotest cvsadm-5d "cat dir1d1/CVS/Repository" "mod1" rm -rf CVS dir1d1 dotest cvsadm-6 "${testcvs} co 1d2mod" \ -"${PROG} [a-z]*: Updating dir1d2 +"${PROG} checkout: Updating dir1d2 U dir1d2/file2" dotest cvsadm-6b "cat CVS/Repository" "\." dotest cvsadm-6d "cat dir1d2/CVS/Repository" "mod2/sub2" rm -rf CVS dir1d2 dotest cvsadm-7 "${testcvs} co 2d1mod" \ -"${PROG} [a-z]*: Updating dir2d1/sub2d1 +"${PROG} checkout: Updating dir2d1/sub2d1 U dir2d1/sub2d1/file1" dotest cvsadm-7b "cat CVS/Repository" "\." dotest cvsadm-7d "cat dir2d1/CVS/Repository" "\." @@ -10440,7 +12308,7 @@ U dir2d1/sub2d1/file1" rm -rf CVS dir2d1 dotest cvsadm-8 "${testcvs} co 2d2mod" \ -"${PROG} [a-z]*: Updating dir2d2/sub2d2 +"${PROG} checkout: Updating dir2d2/sub2d2 U dir2d2/sub2d2/file2" dotest cvsadm-8b "cat CVS/Repository" "\." dotest cvsadm-8d "cat dir2d2/CVS/Repository" "mod2" @@ -10455,9 +12323,9 @@ U dir2d2/sub2d2/file2" ### 1mod dotest cvsadm-9 "${testcvs} co 1mod 1mod-2" \ -"${PROG} [a-z]*: Updating 1mod +"${PROG} checkout: Updating 1mod U 1mod/file1 -${PROG} [a-z]*: Updating 1mod-2 +${PROG} checkout: Updating 1mod-2 U 1mod-2/file1-2" # the usual for the top level dotest cvsadm-9b "cat CVS/Repository" "\." @@ -10469,9 +12337,9 @@ U 1mod-2/file1-2" # 1mod 2mod redmod bluemod dotest cvsadm-10 "${testcvs} co 1mod 2mod" \ -"${PROG} [a-z]*: Updating 1mod +"${PROG} checkout: Updating 1mod U 1mod/file1 -${PROG} [a-z]*: Updating 2mod +${PROG} checkout: Updating 2mod U 2mod/file2" # the usual for the top level dotest cvsadm-10b "cat CVS/Repository" "\." @@ -10482,9 +12350,9 @@ U 2mod/file2" rm -rf CVS 1mod 2mod dotest cvsadm-11 "${testcvs} co 1mod 1d1mod" \ -"${PROG} [a-z]*: Updating 1mod +"${PROG} checkout: Updating 1mod U 1mod/file1 -${PROG} [a-z]*: Updating dir1d1 +${PROG} checkout: Updating dir1d1 U dir1d1/file1" # the usual for the top level dotest cvsadm-11b "cat CVS/Repository" "\." @@ -10495,9 +12363,9 @@ U dir1d1/file1" rm -rf CVS 1mod dir1d1 dotest cvsadm-12 "${testcvs} co 1mod 1d2mod" \ -"${PROG} [a-z]*: Updating 1mod +"${PROG} checkout: Updating 1mod U 1mod/file1 -${PROG} [a-z]*: Updating dir1d2 +${PROG} checkout: Updating dir1d2 U dir1d2/file2" # the usual for the top level dotest cvsadm-12b "cat CVS/Repository" "\." @@ -10508,9 +12376,9 @@ U dir1d2/file2" rm -rf CVS 1mod dir1d2 dotest cvsadm-13 "${testcvs} co 1mod 2d1mod" \ -"${PROG} [a-z]*: Updating 1mod +"${PROG} checkout: Updating 1mod U 1mod/file1 -${PROG} [a-z]*: Updating dir2d1/sub2d1 +${PROG} checkout: Updating dir2d1/sub2d1 U dir2d1/sub2d1/file1" # the usual for the top level dotest cvsadm-13b "cat CVS/Repository" "\." @@ -10522,9 +12390,9 @@ U dir2d1/sub2d1/file1" rm -rf CVS 1mod dir2d1 dotest cvsadm-14 "${testcvs} co 1mod 2d2mod" \ -"${PROG} [a-z]*: Updating 1mod +"${PROG} checkout: Updating 1mod U 1mod/file1 -${PROG} [a-z]*: Updating dir2d2/sub2d2 +${PROG} checkout: Updating dir2d2/sub2d2 U dir2d2/sub2d2/file2" # the usual for the top level dotest cvsadm-14b "cat CVS/Repository" "\." @@ -10539,9 +12407,9 @@ U dir2d2/sub2d2/file2" ### 2mod dotest cvsadm-15 "${testcvs} co 2mod 2mod-2" \ -"${PROG} [a-z]*: Updating 2mod +"${PROG} checkout: Updating 2mod U 2mod/file2 -${PROG} [a-z]*: Updating 2mod-2 +${PROG} checkout: Updating 2mod-2 U 2mod-2/file2-2" # the usual for the top level dotest cvsadm-15b "cat CVS/Repository" "\." @@ -10553,9 +12421,9 @@ U 2mod-2/file2-2" dotest cvsadm-16 "${testcvs} co 2mod 1d1mod" \ -"${PROG} [a-z]*: Updating 2mod +"${PROG} checkout: Updating 2mod U 2mod/file2 -${PROG} [a-z]*: Updating dir1d1 +${PROG} checkout: Updating dir1d1 U dir1d1/file1" # the usual for the top level dotest cvsadm-16b "cat CVS/Repository" "\." @@ -10566,9 +12434,9 @@ U dir1d1/file1" rm -rf CVS 2mod dir1d1 dotest cvsadm-17 "${testcvs} co 2mod 1d2mod" \ -"${PROG} [a-z]*: Updating 2mod +"${PROG} checkout: Updating 2mod U 2mod/file2 -${PROG} [a-z]*: Updating dir1d2 +${PROG} checkout: Updating dir1d2 U dir1d2/file2" # the usual for the top level dotest cvsadm-17b "cat CVS/Repository" "\." @@ -10579,9 +12447,9 @@ U dir1d2/file2" rm -rf CVS 2mod dir1d2 dotest cvsadm-18 "${testcvs} co 2mod 2d1mod" \ -"${PROG} [a-z]*: Updating 2mod +"${PROG} checkout: Updating 2mod U 2mod/file2 -${PROG} [a-z]*: Updating dir2d1/sub2d1 +${PROG} checkout: Updating dir2d1/sub2d1 U dir2d1/sub2d1/file1" # the usual for the top level dotest cvsadm-18b "cat CVS/Repository" "\." @@ -10593,9 +12461,9 @@ U dir2d1/sub2d1/file1" rm -rf CVS 2mod dir2d1 dotest cvsadm-19 "${testcvs} co 2mod 2d2mod" \ -"${PROG} [a-z]*: Updating 2mod +"${PROG} checkout: Updating 2mod U 2mod/file2 -${PROG} [a-z]*: Updating dir2d2/sub2d2 +${PROG} checkout: Updating dir2d2/sub2d2 U dir2d2/sub2d2/file2" # the usual for the top level dotest cvsadm-19b "cat CVS/Repository" "\." @@ -10610,9 +12478,9 @@ U dir2d2/sub2d2/file2" ### 1d1mod dotest cvsadm-20 "${testcvs} co 1d1mod 1d1mod-2" \ -"${PROG} [a-z]*: Updating dir1d1 +"${PROG} checkout: Updating dir1d1 U dir1d1/file1 -${PROG} [a-z]*: Updating dir1d1-2 +${PROG} checkout: Updating dir1d1-2 U dir1d1-2/file1-2" # the usual for the top level dotest cvsadm-20b "cat CVS/Repository" "\." @@ -10623,9 +12491,9 @@ U dir1d1-2/file1-2" rm -rf CVS dir1d1 dir1d1-2 dotest cvsadm-21 "${testcvs} co 1d1mod 1d2mod" \ -"${PROG} [a-z]*: Updating dir1d1 +"${PROG} checkout: Updating dir1d1 U dir1d1/file1 -${PROG} [a-z]*: Updating dir1d2 +${PROG} checkout: Updating dir1d2 U dir1d2/file2" # the usual for the top level dotest cvsadm-21b "cat CVS/Repository" "\." @@ -10636,9 +12504,9 @@ U dir1d2/file2" rm -rf CVS dir1d1 dir1d2 dotest cvsadm-22 "${testcvs} co 1d1mod 2d1mod" \ -"${PROG} [a-z]*: Updating dir1d1 +"${PROG} checkout: Updating dir1d1 U dir1d1/file1 -${PROG} [a-z]*: Updating dir2d1/sub2d1 +${PROG} checkout: Updating dir2d1/sub2d1 U dir2d1/sub2d1/file1" # the usual for the top level dotest cvsadm-22b "cat CVS/Repository" "\." @@ -10650,9 +12518,9 @@ U dir2d1/sub2d1/file1" rm -rf CVS dir1d1 dir2d1 dotest cvsadm-23 "${testcvs} co 1d1mod 2d2mod" \ -"${PROG} [a-z]*: Updating dir1d1 +"${PROG} checkout: Updating dir1d1 U dir1d1/file1 -${PROG} [a-z]*: Updating dir2d2/sub2d2 +${PROG} checkout: Updating dir2d2/sub2d2 U dir2d2/sub2d2/file2" # the usual for the top level dotest cvsadm-23b "cat CVS/Repository" "\." @@ -10667,9 +12535,9 @@ U dir2d2/sub2d2/file2" ### 1d2mod dotest cvsadm-24 "${testcvs} co 1d2mod 1d2mod-2" \ -"${PROG} [a-z]*: Updating dir1d2 +"${PROG} checkout: Updating dir1d2 U dir1d2/file2 -${PROG} [a-z]*: Updating dir1d2-2 +${PROG} checkout: Updating dir1d2-2 U dir1d2-2/file2-2" # the usual for the top level dotest cvsadm-24b "cat CVS/Repository" "\." @@ -10680,9 +12548,9 @@ U dir1d2-2/file2-2" rm -rf CVS dir1d2 dir1d2-2 dotest cvsadm-25 "${testcvs} co 1d2mod 2d1mod" \ -"${PROG} [a-z]*: Updating dir1d2 +"${PROG} checkout: Updating dir1d2 U dir1d2/file2 -${PROG} [a-z]*: Updating dir2d1/sub2d1 +${PROG} checkout: Updating dir2d1/sub2d1 U dir2d1/sub2d1/file1" # the usual for the top level dotest cvsadm-25b "cat CVS/Repository" "\." @@ -10694,9 +12562,9 @@ U dir2d1/sub2d1/file1" rm -rf CVS dir1d2 dir2d1 dotest cvsadm-26 "${testcvs} co 1d2mod 2d2mod" \ -"${PROG} [a-z]*: Updating dir1d2 +"${PROG} checkout: Updating dir1d2 U dir1d2/file2 -${PROG} [a-z]*: Updating dir2d2/sub2d2 +${PROG} checkout: Updating dir2d2/sub2d2 U dir2d2/sub2d2/file2" # the usual for the top level dotest cvsadm-26b "cat CVS/Repository" "\." @@ -10711,9 +12579,9 @@ U dir2d2/sub2d2/file2" # 2d1mod dotest cvsadm-27 "${testcvs} co 2d1mod 2d1mod-2" \ -"${PROG} [a-z]*: Updating dir2d1/sub2d1 +"${PROG} checkout: Updating dir2d1/sub2d1 U dir2d1/sub2d1/file1 -${PROG} [a-z]*: Updating dir2d1-2/sub2d1-2 +${PROG} checkout: Updating dir2d1-2/sub2d1-2 U dir2d1-2/sub2d1-2/file1-2" # the usual for the top level dotest cvsadm-27b "cat CVS/Repository" "\." @@ -10726,9 +12594,9 @@ U dir2d1-2/sub2d1-2/file1-2" rm -rf CVS dir2d1 dir2d1-2 dotest cvsadm-28 "${testcvs} co 2d1mod 2d2mod" \ -"${PROG} [a-z]*: Updating dir2d1/sub2d1 +"${PROG} checkout: Updating dir2d1/sub2d1 U dir2d1/sub2d1/file1 -${PROG} [a-z]*: Updating dir2d2/sub2d2 +${PROG} checkout: Updating dir2d2/sub2d2 U dir2d2/sub2d2/file2" # the usual for the top level dotest cvsadm-28b "cat CVS/Repository" "\." @@ -10744,9 +12612,9 @@ U dir2d2/sub2d2/file2" # 2d2mod dotest cvsadm-29 "${testcvs} co 2d2mod 2d2mod-2" \ -"${PROG} [a-z]*: Updating dir2d2/sub2d2 +"${PROG} checkout: Updating dir2d2/sub2d2 U dir2d2/sub2d2/file2 -${PROG} [a-z]*: Updating dir2d2-2/sub2d2-2 +${PROG} checkout: Updating dir2d2-2/sub2d2-2 U dir2d2-2/sub2d2-2/file2-2" # the usual for the top level dotest cvsadm-29b "cat CVS/Repository" "\." @@ -10765,42 +12633,42 @@ U dir2d2-2/sub2d2-2/file2-2" ################################################## dotest cvsadm-1d3 "${testcvs} co -d dir 1mod" \ -"${PROG} [a-z]*: Updating dir +"${PROG} checkout: Updating dir U dir/file1" dotest cvsadm-1d3b "cat CVS/Repository" "\." dotest cvsadm-1d3d "cat dir/CVS/Repository" "mod1" rm -rf CVS dir dotest cvsadm-1d4 "${testcvs} co -d dir 2mod" \ -"${PROG} [a-z]*: Updating dir +"${PROG} checkout: Updating dir U dir/file2" dotest cvsadm-1d4b "cat CVS/Repository" "\." dotest cvsadm-1d4d "cat dir/CVS/Repository" "mod2/sub2" rm -rf CVS dir dotest cvsadm-1d5 "${testcvs} co -d dir 1d1mod" \ -"${PROG} [a-z]*: Updating dir +"${PROG} checkout: Updating dir U dir/file1" dotest cvsadm-1d5b "cat CVS/Repository" "\." dotest cvsadm-1d5d "cat dir/CVS/Repository" "mod1" rm -rf CVS dir dotest cvsadm-1d6 "${testcvs} co -d dir 1d2mod" \ -"${PROG} [a-z]*: Updating dir +"${PROG} checkout: Updating dir U dir/file2" dotest cvsadm-1d6b "cat CVS/Repository" "\." dotest cvsadm-1d6d "cat dir/CVS/Repository" "mod2/sub2" rm -rf CVS dir dotest cvsadm-1d7 "${testcvs} co -d dir 2d1mod" \ -"${PROG} [a-z]*: Updating dir +"${PROG} checkout: Updating dir U dir/file1" dotest cvsadm-1d7b "cat CVS/Repository" "\." dotest cvsadm-1d7d "cat dir/CVS/Repository" "mod1" rm -rf CVS dir dotest cvsadm-1d8 "${testcvs} co -d dir 2d2mod" \ -"${PROG} [a-z]*: Updating dir +"${PROG} checkout: Updating dir U dir/file2" dotest cvsadm-1d8b "cat CVS/Repository" "\." dotest cvsadm-1d8d "cat dir/CVS/Repository" "mod2/sub2" @@ -10813,9 +12681,9 @@ U dir/file2" ### 1mod dotest cvsadm-1d9 "${testcvs} co -d dir 1mod 1mod-2" \ -"${PROG} [a-z]*: Updating dir/1mod +"${PROG} checkout: Updating dir/1mod U dir/1mod/file1 -${PROG} [a-z]*: Updating dir/1mod-2 +${PROG} checkout: Updating dir/1mod-2 U dir/1mod-2/file1-2" # the usual for the top level dotest cvsadm-1d9b "cat CVS/Repository" "\." @@ -10829,9 +12697,9 @@ U dir/1mod-2/file1-2" # 1mod 2mod redmod bluemod dotest cvsadm-1d10 "${testcvs} co -d dir 1mod 2mod" \ -"${PROG} [a-z]*: Updating dir/1mod +"${PROG} checkout: Updating dir/1mod U dir/1mod/file1 -${PROG} [a-z]*: Updating dir/2mod +${PROG} checkout: Updating dir/2mod U dir/2mod/file2" dotest cvsadm-1d10b "cat CVS/Repository" "\." # the usual for the dir level @@ -10843,9 +12711,9 @@ U dir/2mod/file2" rm -rf CVS dir dotest cvsadm-1d11 "${testcvs} co -d dir 1mod 1d1mod" \ -"${PROG} [a-z]*: Updating dir/1mod +"${PROG} checkout: Updating dir/1mod U dir/1mod/file1 -${PROG} [a-z]*: Updating dir/dir1d1 +${PROG} checkout: Updating dir/dir1d1 U dir/dir1d1/file1" dotest cvsadm-1d11b "cat CVS/Repository" "\." # the usual for the dir level @@ -10857,9 +12725,9 @@ U dir/dir1d1/file1" rm -rf CVS dir dotest cvsadm-1d12 "${testcvs} co -d dir 1mod 1d2mod" \ -"${PROG} [a-z]*: Updating dir/1mod +"${PROG} checkout: Updating dir/1mod U dir/1mod/file1 -${PROG} [a-z]*: Updating dir/dir1d2 +${PROG} checkout: Updating dir/dir1d2 U dir/dir1d2/file2" dotest cvsadm-1d12b "cat CVS/Repository" "\." # the usual for the dir level @@ -10871,9 +12739,9 @@ U dir/dir1d2/file2" rm -rf CVS dir dotest cvsadm-1d13 "${testcvs} co -d dir 1mod 2d1mod" \ -"${PROG} [a-z]*: Updating dir/1mod +"${PROG} checkout: Updating dir/1mod U dir/1mod/file1 -${PROG} [a-z]*: Updating dir/dir2d1/sub2d1 +${PROG} checkout: Updating dir/dir2d1/sub2d1 U dir/dir2d1/sub2d1/file1" dotest cvsadm-1d13b "cat CVS/Repository" "\." # the usual for the dir level @@ -10886,9 +12754,9 @@ U dir/dir2d1/sub2d1/file1" rm -rf CVS dir dotest cvsadm-1d14 "${testcvs} co -d dir 1mod 2d2mod" \ -"${PROG} [a-z]*: Updating dir/1mod +"${PROG} checkout: Updating dir/1mod U dir/1mod/file1 -${PROG} [a-z]*: Updating dir/dir2d2/sub2d2 +${PROG} checkout: Updating dir/dir2d2/sub2d2 U dir/dir2d2/sub2d2/file2" dotest cvsadm-1d14b "cat CVS/Repository" "\." # the usual for the dir level @@ -10904,9 +12772,9 @@ U dir/dir2d2/sub2d2/file2" ### 2mod dotest cvsadm-1d15 "${testcvs} co -d dir 2mod 2mod-2" \ -"${PROG} [a-z]*: Updating dir/2mod +"${PROG} checkout: Updating dir/2mod U dir/2mod/file2 -${PROG} [a-z]*: Updating dir/2mod-2 +${PROG} checkout: Updating dir/2mod-2 U dir/2mod-2/file2-2" dotest cvsadm-1d15b "cat CVS/Repository" "\." # the usual for the dir level @@ -10918,9 +12786,9 @@ U dir/2mod-2/file2-2" rm -rf CVS dir dotest cvsadm-1d16 "${testcvs} co -d dir 2mod 1d1mod" \ -"${PROG} [a-z]*: Updating dir/2mod +"${PROG} checkout: Updating dir/2mod U dir/2mod/file2 -${PROG} [a-z]*: Updating dir/dir1d1 +${PROG} checkout: Updating dir/dir1d1 U dir/dir1d1/file1" dotest cvsadm-1d16b "cat CVS/Repository" "\." # the usual for the dir level @@ -10932,9 +12800,9 @@ U dir/dir1d1/file1" rm -rf CVS dir dotest cvsadm-1d17 "${testcvs} co -d dir 2mod 1d2mod" \ -"${PROG} [a-z]*: Updating dir/2mod +"${PROG} checkout: Updating dir/2mod U dir/2mod/file2 -${PROG} [a-z]*: Updating dir/dir1d2 +${PROG} checkout: Updating dir/dir1d2 U dir/dir1d2/file2" dotest cvsadm-1d17b "cat CVS/Repository" "\." # the usual for the dir level @@ -10946,9 +12814,9 @@ U dir/dir1d2/file2" rm -rf CVS dir dotest cvsadm-1d18 "${testcvs} co -d dir 2mod 2d1mod" \ -"${PROG} [a-z]*: Updating dir/2mod +"${PROG} checkout: Updating dir/2mod U dir/2mod/file2 -${PROG} [a-z]*: Updating dir/dir2d1/sub2d1 +${PROG} checkout: Updating dir/dir2d1/sub2d1 U dir/dir2d1/sub2d1/file1" dotest cvsadm-1d18b "cat CVS/Repository" "\." # the usual for the dir level @@ -10961,9 +12829,9 @@ U dir/dir2d1/sub2d1/file1" rm -rf CVS dir dotest cvsadm-1d19 "${testcvs} co -d dir 2mod 2d2mod" \ -"${PROG} [a-z]*: Updating dir/2mod +"${PROG} checkout: Updating dir/2mod U dir/2mod/file2 -${PROG} [a-z]*: Updating dir/dir2d2/sub2d2 +${PROG} checkout: Updating dir/dir2d2/sub2d2 U dir/dir2d2/sub2d2/file2" dotest cvsadm-1d19b "cat CVS/Repository" "\." # the usual for the dir level @@ -10979,9 +12847,9 @@ U dir/dir2d2/sub2d2/file2" ### 1d1mod dotest cvsadm-1d20 "${testcvs} co -d dir 1d1mod 1d1mod-2" \ -"${PROG} [a-z]*: Updating dir/dir1d1 +"${PROG} checkout: Updating dir/dir1d1 U dir/dir1d1/file1 -${PROG} [a-z]*: Updating dir/dir1d1-2 +${PROG} checkout: Updating dir/dir1d1-2 U dir/dir1d1-2/file1-2" dotest cvsadm-1d20b "cat CVS/Repository" "\." # the usual for the dir level @@ -10993,9 +12861,9 @@ U dir/dir1d1-2/file1-2" rm -rf CVS dir dotest cvsadm-1d21 "${testcvs} co -d dir 1d1mod 1d2mod" \ -"${PROG} [a-z]*: Updating dir/dir1d1 +"${PROG} checkout: Updating dir/dir1d1 U dir/dir1d1/file1 -${PROG} [a-z]*: Updating dir/dir1d2 +${PROG} checkout: Updating dir/dir1d2 U dir/dir1d2/file2" dotest cvsadm-1d21b "cat CVS/Repository" "\." # the usual for the dir level @@ -11007,9 +12875,9 @@ U dir/dir1d2/file2" rm -rf CVS dir dotest cvsadm-1d22 "${testcvs} co -d dir 1d1mod 2d1mod" \ -"${PROG} [a-z]*: Updating dir/dir1d1 +"${PROG} checkout: Updating dir/dir1d1 U dir/dir1d1/file1 -${PROG} [a-z]*: Updating dir/dir2d1/sub2d1 +${PROG} checkout: Updating dir/dir2d1/sub2d1 U dir/dir2d1/sub2d1/file1" dotest cvsadm-1d22b "cat CVS/Repository" "\." # the usual for the dir level @@ -11022,9 +12890,9 @@ U dir/dir2d1/sub2d1/file1" rm -rf CVS dir dotest cvsadm-1d23 "${testcvs} co -d dir 1d1mod 2d2mod" \ -"${PROG} [a-z]*: Updating dir/dir1d1 +"${PROG} checkout: Updating dir/dir1d1 U dir/dir1d1/file1 -${PROG} [a-z]*: Updating dir/dir2d2/sub2d2 +${PROG} checkout: Updating dir/dir2d2/sub2d2 U dir/dir2d2/sub2d2/file2" dotest cvsadm-1d23b "cat CVS/Repository" "\." # the usual for the dir level @@ -11040,9 +12908,9 @@ U dir/dir2d2/sub2d2/file2" ### 1d2mod dotest cvsadm-1d24 "${testcvs} co -d dir 1d2mod 1d2mod-2" \ -"${PROG} [a-z]*: Updating dir/dir1d2 +"${PROG} checkout: Updating dir/dir1d2 U dir/dir1d2/file2 -${PROG} [a-z]*: Updating dir/dir1d2-2 +${PROG} checkout: Updating dir/dir1d2-2 U dir/dir1d2-2/file2-2" dotest cvsadm-1d24b "cat CVS/Repository" "\." # the usual for the dir level @@ -11054,9 +12922,9 @@ U dir/dir1d2-2/file2-2" rm -rf CVS dir dotest cvsadm-1d25 "${testcvs} co -d dir 1d2mod 2d1mod" \ -"${PROG} [a-z]*: Updating dir/dir1d2 +"${PROG} checkout: Updating dir/dir1d2 U dir/dir1d2/file2 -${PROG} [a-z]*: Updating dir/dir2d1/sub2d1 +${PROG} checkout: Updating dir/dir2d1/sub2d1 U dir/dir2d1/sub2d1/file1" dotest cvsadm-1d25b "cat CVS/Repository" "\." # the usual for the dir level @@ -11069,9 +12937,9 @@ U dir/dir2d1/sub2d1/file1" rm -rf CVS dir dotest cvsadm-1d26 "${testcvs} co -d dir 1d2mod 2d2mod" \ -"${PROG} [a-z]*: Updating dir/dir1d2 +"${PROG} checkout: Updating dir/dir1d2 U dir/dir1d2/file2 -${PROG} [a-z]*: Updating dir/dir2d2/sub2d2 +${PROG} checkout: Updating dir/dir2d2/sub2d2 U dir/dir2d2/sub2d2/file2" dotest cvsadm-1d26b "cat CVS/Repository" "\." # the usual for the dir level @@ -11087,9 +12955,9 @@ U dir/dir2d2/sub2d2/file2" # 2d1mod dotest cvsadm-1d27 "${testcvs} co -d dir 2d1mod 2d1mod-2" \ -"${PROG} [a-z]*: Updating dir/dir2d1/sub2d1 +"${PROG} checkout: Updating dir/dir2d1/sub2d1 U dir/dir2d1/sub2d1/file1 -${PROG} [a-z]*: Updating dir/dir2d1-2/sub2d1-2 +${PROG} checkout: Updating dir/dir2d1-2/sub2d1-2 U dir/dir2d1-2/sub2d1-2/file1-2" dotest cvsadm-1d27b "cat CVS/Repository" "\." # the usual for the dir level @@ -11104,9 +12972,9 @@ U dir/dir2d1-2/sub2d1-2/file1-2" rm -rf CVS dir dotest cvsadm-1d28 "${testcvs} co -d dir 2d1mod 2d2mod" \ -"${PROG} [a-z]*: Updating dir/dir2d1/sub2d1 +"${PROG} checkout: Updating dir/dir2d1/sub2d1 U dir/dir2d1/sub2d1/file1 -${PROG} [a-z]*: Updating dir/dir2d2/sub2d2 +${PROG} checkout: Updating dir/dir2d2/sub2d2 U dir/dir2d2/sub2d2/file2" dotest cvsadm-1d28b "cat CVS/Repository" "\." # the usual for the dir level @@ -11123,9 +12991,9 @@ U dir/dir2d2/sub2d2/file2" # 2d2mod dotest cvsadm-1d29 "${testcvs} co -d dir 2d2mod 2d2mod-2" \ -"${PROG} [a-z]*: Updating dir/dir2d2/sub2d2 +"${PROG} checkout: Updating dir/dir2d2/sub2d2 U dir/dir2d2/sub2d2/file2 -${PROG} [a-z]*: Updating dir/dir2d2-2/sub2d2-2 +${PROG} checkout: Updating dir/dir2d2-2/sub2d2-2 U dir/dir2d2-2/sub2d2-2/file2-2" dotest cvsadm-1d29b "cat CVS/Repository" "\." # the usual for the dir level @@ -11153,7 +13021,7 @@ U dir/dir2d2-2/sub2d2-2/file2-2" mkdir dir dotest cvsadm-2d3 "${testcvs} co -d dir/dir2 1mod" \ -"${PROG} [a-z]*: Updating dir/dir2 +"${PROG} checkout: Updating dir/dir2 U dir/dir2/file1" dotest cvsadm-2d3b "cat CVS/Repository" "\." dotest_fail cvsadm-2d3d "test -f dir/CVS/Repository" "" @@ -11162,7 +13030,7 @@ U dir/dir2/file1" mkdir dir dotest cvsadm-2d4 "${testcvs} co -d dir/dir2 2mod" \ -"${PROG} [a-z]*: Updating dir/dir2 +"${PROG} checkout: Updating dir/dir2 U dir/dir2/file2" dotest cvsadm-2d4b "cat CVS/Repository" "\." dotest cvsadm-2d4f "cat dir/dir2/CVS/Repository" "mod2/sub2" @@ -11170,7 +13038,7 @@ U dir/dir2/file2" mkdir dir dotest cvsadm-2d5 "${testcvs} co -d dir/dir2 1d1mod" \ -"${PROG} [a-z]*: Updating dir/dir2 +"${PROG} checkout: Updating dir/dir2 U dir/dir2/file1" dotest cvsadm-2d5b "cat CVS/Repository" "\." dotest cvsadm-2d5f "cat dir/dir2/CVS/Repository" "mod1" @@ -11178,7 +13046,7 @@ U dir/dir2/file1" mkdir dir dotest cvsadm-2d6 "${testcvs} co -d dir/dir2 1d2mod" \ -"${PROG} [a-z]*: Updating dir/dir2 +"${PROG} checkout: Updating dir/dir2 U dir/dir2/file2" dotest cvsadm-2d6b "cat CVS/Repository" "\." dotest cvsadm-2d6f "cat dir/dir2/CVS/Repository" "mod2/sub2" @@ -11186,7 +13054,7 @@ U dir/dir2/file2" mkdir dir dotest cvsadm-2d7 "${testcvs} co -d dir/dir2 2d1mod" \ -"${PROG} [a-z]*: Updating dir/dir2 +"${PROG} checkout: Updating dir/dir2 U dir/dir2/file1" dotest cvsadm-2d7b "cat CVS/Repository" "\." dotest cvsadm-2d7f "cat dir/dir2/CVS/Repository" "mod1" @@ -11194,7 +13062,7 @@ U dir/dir2/file1" mkdir dir dotest cvsadm-2d8 "${testcvs} co -d dir/dir2 2d2mod" \ -"${PROG} [a-z]*: Updating dir/dir2 +"${PROG} checkout: Updating dir/dir2 U dir/dir2/file2" dotest cvsadm-2d8b "cat CVS/Repository" "\." dotest cvsadm-2d8f "cat dir/dir2/CVS/Repository" "mod2/sub2" @@ -11206,35 +13074,35 @@ U dir/dir2/file2" ################################################## dotest cvsadm-N3 "${testcvs} co -N 1mod" \ -"${PROG} [a-z]*: Updating 1mod +"${PROG} checkout: Updating 1mod U 1mod/file1" dotest cvsadm-N3b "cat CVS/Repository" "\." dotest cvsadm-N3d "cat 1mod/CVS/Repository" "mod1" rm -rf CVS 1mod dotest cvsadm-N4 "${testcvs} co -N 2mod" \ -"${PROG} [a-z]*: Updating 2mod +"${PROG} checkout: Updating 2mod U 2mod/file2" dotest cvsadm-N4b "cat CVS/Repository" "\." dotest cvsadm-N4d "cat 2mod/CVS/Repository" "mod2/sub2" rm -rf CVS 2mod dotest cvsadm-N5 "${testcvs} co -N 1d1mod" \ -"${PROG} [a-z]*: Updating dir1d1 +"${PROG} checkout: Updating dir1d1 U dir1d1/file1" dotest cvsadm-N5b "cat CVS/Repository" "\." dotest cvsadm-N5d "cat dir1d1/CVS/Repository" "mod1" rm -rf CVS dir1d1 dotest cvsadm-N6 "${testcvs} co -N 1d2mod" \ -"${PROG} [a-z]*: Updating dir1d2 +"${PROG} checkout: Updating dir1d2 U dir1d2/file2" dotest cvsadm-N6b "cat CVS/Repository" "\." dotest cvsadm-N6d "cat dir1d2/CVS/Repository" "mod2/sub2" rm -rf CVS dir1d2 dotest cvsadm-N7 "${testcvs} co -N 2d1mod" \ -"${PROG} [a-z]*: Updating dir2d1/sub2d1 +"${PROG} checkout: Updating dir2d1/sub2d1 U dir2d1/sub2d1/file1" dotest cvsadm-N7b "cat CVS/Repository" "\." dotest cvsadm-N7d "cat dir2d1/CVS/Repository" "\." @@ -11242,7 +13110,7 @@ U dir2d1/sub2d1/file1" rm -rf CVS dir2d1 dotest cvsadm-N8 "${testcvs} co -N 2d2mod" \ -"${PROG} [a-z]*: Updating dir2d2/sub2d2 +"${PROG} checkout: Updating dir2d2/sub2d2 U dir2d2/sub2d2/file2" dotest cvsadm-N8b "cat CVS/Repository" "\." dotest cvsadm-N8d "cat dir2d2/CVS/Repository" "mod2" @@ -11252,7 +13120,7 @@ U dir2d2/sub2d2/file2" ## the ones in one-deep directories dotest cvsadm-N1d3 "${testcvs} co -N -d dir 1mod" \ -"${PROG} [a-z]*: Updating dir/1mod +"${PROG} checkout: Updating dir/1mod U dir/1mod/file1" dotest cvsadm-N1d3b "cat CVS/Repository" "\." dotest cvsadm-N1d3d "cat dir/CVS/Repository" "\." @@ -11260,7 +13128,7 @@ U dir/1mod/file1" rm -rf CVS dir dotest cvsadm-N1d4 "${testcvs} co -N -d dir 2mod" \ -"${PROG} [a-z]*: Updating dir/2mod +"${PROG} checkout: Updating dir/2mod U dir/2mod/file2" dotest cvsadm-N1d4b "cat CVS/Repository" "\." dotest cvsadm-N1d4d "cat dir/CVS/Repository" "mod2" @@ -11268,7 +13136,7 @@ U dir/2mod/file2" rm -rf CVS dir dotest cvsadm-N1d5 "${testcvs} co -N -d dir 1d1mod" \ -"${PROG} [a-z]*: Updating dir/dir1d1 +"${PROG} checkout: Updating dir/dir1d1 U dir/dir1d1/file1" dotest cvsadm-N1d5b "cat CVS/Repository" "\." dotest cvsadm-N1d5d "cat dir/CVS/Repository" "\." @@ -11276,7 +13144,7 @@ U dir/dir1d1/file1" rm -rf CVS dir dotest cvsadm-N1d6 "${testcvs} co -N -d dir 1d2mod" \ -"${PROG} [a-z]*: Updating dir/dir1d2 +"${PROG} checkout: Updating dir/dir1d2 U dir/dir1d2/file2" dotest cvsadm-N1d6b "cat CVS/Repository" "\." dotest cvsadm-N1d6d "cat dir/CVS/Repository" "mod2" @@ -11284,7 +13152,7 @@ U dir/dir1d2/file2" rm -rf CVS dir dotest cvsadm-N1d7 "${testcvs} co -N -d dir 2d1mod" \ -"${PROG} [a-z]*: Updating dir/dir2d1/sub2d1 +"${PROG} checkout: Updating dir/dir2d1/sub2d1 U dir/dir2d1/sub2d1/file1" dotest cvsadm-N1d7b "cat CVS/Repository" "\." dotest cvsadm-N1d7d "cat dir/CVS/Repository" "CVSROOT/Emptydir" @@ -11293,7 +13161,7 @@ U dir/dir2d1/sub2d1/file1" rm -rf CVS dir dotest cvsadm-N1d8 "${testcvs} co -N -d dir 2d2mod" \ -"${PROG} [a-z]*: Updating dir/dir2d2/sub2d2 +"${PROG} checkout: Updating dir/dir2d2/sub2d2 U dir/dir2d2/sub2d2/file2" dotest cvsadm-N1d8b "cat CVS/Repository" "\." dotest cvsadm-N1d8d "cat dir/CVS/Repository" "\." @@ -11306,7 +13174,7 @@ U dir/dir2d2/sub2d2/file2" mkdir dir dotest cvsadm-N2d3 "${testcvs} co -N -d dir/dir2 1mod" \ -"${PROG} [a-z]*: Updating dir/dir2/1mod +"${PROG} checkout: Updating dir/dir2/1mod U dir/dir2/1mod/file1" dotest cvsadm-N2d3b "cat CVS/Repository" "\." dotest cvsadm-N2d3f "cat dir/dir2/CVS/Repository" "\." @@ -11315,7 +13183,7 @@ U dir/dir2/1mod/file1" mkdir dir dotest cvsadm-N2d4 "${testcvs} co -N -d dir/dir2 2mod" \ -"${PROG} [a-z]*: Updating dir/dir2/2mod +"${PROG} checkout: Updating dir/dir2/2mod U dir/dir2/2mod/file2" dotest cvsadm-N2d4b "cat CVS/Repository" "\." dotest cvsadm-N2d4f "cat dir/dir2/CVS/Repository" "mod2" @@ -11324,7 +13192,7 @@ U dir/dir2/2mod/file2" mkdir dir dotest cvsadm-N2d5 "${testcvs} co -N -d dir/dir2 1d1mod" \ -"${PROG} [a-z]*: Updating dir/dir2/dir1d1 +"${PROG} checkout: Updating dir/dir2/dir1d1 U dir/dir2/dir1d1/file1" dotest cvsadm-N2d5b "cat CVS/Repository" "\." dotest cvsadm-N2d5f "cat dir/dir2/CVS/Repository" "\." @@ -11333,7 +13201,7 @@ U dir/dir2/dir1d1/file1" mkdir dir dotest cvsadm-N2d6 "${testcvs} co -N -d dir/dir2 1d2mod" \ -"${PROG} [a-z]*: Updating dir/dir2/dir1d2 +"${PROG} checkout: Updating dir/dir2/dir1d2 U dir/dir2/dir1d2/file2" dotest cvsadm-N2d6b "cat CVS/Repository" "\." dotest cvsadm-N2d6f "cat dir/dir2/CVS/Repository" "mod2" @@ -11342,7 +13210,7 @@ U dir/dir2/dir1d2/file2" mkdir dir dotest cvsadm-N2d7 "${testcvs} co -N -d dir/dir2 2d1mod" \ -"${PROG} [a-z]*: Updating dir/dir2/dir2d1/sub2d1 +"${PROG} checkout: Updating dir/dir2/dir2d1/sub2d1 U dir/dir2/dir2d1/sub2d1/file1" dotest cvsadm-N2d7b "cat CVS/Repository" "\." dotest cvsadm-N2d7f "cat dir/dir2/CVS/Repository" "CVSROOT/Emptydir" @@ -11353,7 +13221,7 @@ U dir/dir2/dir2d1/sub2d1/file1" mkdir dir dotest cvsadm-N2d8 "${testcvs} co -N -d dir/dir2 2d2mod" \ -"${PROG} [a-z]*: Updating dir/dir2/dir2d2/sub2d2 +"${PROG} checkout: Updating dir/dir2/dir2d2/sub2d2 U dir/dir2/dir2d2/sub2d2/file2" dotest cvsadm-N2d8b "cat CVS/Repository" "\." dotest cvsadm-N2d8f "cat dir/dir2/CVS/Repository" "\." @@ -11377,7 +13245,7 @@ U dir/dir2/dir2d2/sub2d2/file2" ${CVSROOT_DIRNAME}/CVSROOT/config,v <-- config new revision: 1\.[0-9]*; previous revision: 1\.[0-9]* done -${PROG} [a-z]*: Rebuilding administrative file database" +${PROG} commit: Rebuilding administrative file database" cd .. rm -rf CVSROOT CVS @@ -11414,25 +13282,25 @@ 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" \ -"${PROG} [a-z]*: Examining CVSROOT" +${PROG} commit: Rebuilding administrative file database" \ +"${PROG} commit: Examining CVSROOT" rm -rf CVS CVSROOT mkdir ${CVSROOT_DIRNAME}/mod1 ${CVSROOT_DIRNAME}/moda # Populate. Not sure we really need to do this. dotest emptydir-3 "${testcvs} -q co -l ." "" dotest emptydir-3a "${testcvs} co mod1 moda" \ -"${PROG} [a-z]*: Updating mod1 -${PROG} [a-z]*: Updating moda" +"${PROG} checkout: Updating mod1 +${PROG} checkout: Updating moda" echo "file1" > mod1/file1 mkdir moda/modasub dotest emptydir-3b "${testcvs} add moda/modasub" \ "Directory ${CVSROOT_DIRNAME}/moda/modasub added to the repository" echo "filea" > moda/modasub/filea dotest emptydir-4 "${testcvs} add mod1/file1 moda/modasub/filea" \ -"${PROG} [a-z]*: scheduling file .mod1/file1. for addition -${PROG} [a-z]*: scheduling file .moda/modasub/filea. for addition -${PROG} [a-z]*: use '${PROG} commit' to add these files permanently" +"${PROG} add: scheduling file .mod1/file1. for addition +${PROG} add: scheduling file .moda/modasub/filea. for addition +${PROG} add: use .${PROG} commit. to add these files permanently" dotest emptydir-5 "${testcvs} -q ci -m yup" \ "RCS file: ${CVSROOT_DIRNAME}/mod1/file1,v done @@ -11450,7 +13318,7 @@ done" # End Populate. dotest emptydir-6 "${testcvs} co 2d1mod" \ -"${PROG} [a-z]*: Updating dir2d1/sub/sub2d1 +"${PROG} checkout: Updating dir2d1/sub/sub2d1 U dir2d1/sub/sub2d1/file1" cd dir2d1 touch emptyfile @@ -11459,7 +13327,7 @@ U dir2d1/sub/sub2d1/file1" # the working directory doesn't correspond to anything in # the repository. dotest_fail emptydir-7 "${testcvs} add emptyfile" \ -"${PROG} \[[a-z]* aborted\]: cannot add to ${CVSROOT_DIRNAME}/CVSROOT/Emptydir" +"${PROG} \[add aborted\]: cannot add to ${CVSROOT_DIRNAME}/CVSROOT/Emptydir" mkdir emptydir dotest_fail emptydir-8 "${testcvs} add emptydir" \ "${PROG} \[[a-z]* aborted\]: cannot add to ${CVSROOT_DIRNAME}/CVSROOT/Emptydir" @@ -11489,13 +13357,29 @@ U dir2d1/sub/sub2d1/file1" # test. dotest emptydir-13 "cat dir2d1/CVS/Repository" "moda" dotest_fail emptydir-14 "${testcvs} co comb" \ -"${PROG} [a-z]*: existing repository ${CVSROOT_DIRNAME}/moda/modasub does not match ${TESTDIR}/cvsroot/mod1 -${PROG} [a-z]*: ignoring module 2d1modb -${PROG} [a-z]*: Updating dir2d1/suba" +"${PROG} checkout: existing repository ${CVSROOT_DIRNAME}/moda/modasub does not match ${CVSROOT_DIRNAME}/mod1 +${PROG} checkout: ignoring module 2d1modb +${PROG} checkout: Updating dir2d1/suba" dotest emptydir-15 "cat dir2d1/CVS/Repository" "moda" cd .. - rm -r 1 2 + # Test the effect of a non-cvs directory already existing with the + # same name as one in the modules file. + mkdir 3; cd 3 + mkdir dir2d1 + dotest emptydir-16 "${testcvs} co 2d1mod" \ +"${PROG} checkout: Updating dir2d1/sub/sub2d1 +U dir2d1/sub/sub2d1/file1" + dotest emptydir-17 "test -d dir2d1/CVS" + + # clean up + if $keep; then + echo Keeping ${TESTDIR} and exiting due to --keep + exit 0 + fi + + cd .. + rm -r 1 2 3 rm -rf ${CVSROOT_DIRNAME}/mod1 ${CVSROOT_DIRNAME}/moda # I guess for the moment the convention is going to be # that we don't need to remove ${CVSROOT_DIRNAME}/CVSROOT/Emptydir @@ -11513,21 +13397,21 @@ ${PROG} [a-z]*: Updating dir2d1/suba" # 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" +"${PROG} checkout: Updating mod1 +${PROG} checkout: Updating mod2" # Populate the module echo "file1" > mod1/file1 echo "file2" > mod2/file2 cd mod1 dotest abspath-1ba "${testcvs} add file1" \ -"${PROG} [a-z]*: scheduling file .file1. for addition -${PROG} [a-z]*: use '${PROG} commit' to add this file permanently" +"${PROG} add: scheduling file .file1. for addition +${PROG} add: use .${PROG} commit. to add this file permanently" cd .. cd mod2 dotest abspath-1bb "${testcvs} add file2" \ -"${PROG} [a-z]*: scheduling file .file2. for addition -${PROG} [a-z]*: use '${PROG} commit' to add this file permanently" +"${PROG} add: scheduling file .file2. for addition +${PROG} add: use .${PROG} commit. to add this file permanently" cd .. dotest abspath-1c "${testcvs} ci -m yup mod1 mod2" \ @@ -11552,13 +13436,13 @@ done" # Try checking out the module in a local directory if $remote; then dotest_fail abspath-2a "${testcvs} co -d ${TESTDIR}/1 mod1" \ -"${PROG} \[server aborted\]: absolute pathname .${TESTDIR}/1. illegal for server" +"${PROG} \[checkout aborted\]: absolute pathname .${TESTDIR}/1. illegal for server" dotest abspath-2a-try2 "${testcvs} co -d 1 mod1" \ -"${PROG} [a-z]*: Updating 1 +"${PROG} checkout: Updating 1 U 1/file1" else dotest abspath-2a "${testcvs} co -d ${TESTDIR}/1 mod1" \ -"${PROG} [a-z]*: Updating ${TESTDIR}/1 +"${PROG} checkout: Updating ${TESTDIR}/1 U ${TESTDIR}/1/file1" fi # remote workaround @@ -11590,16 +13474,16 @@ U ${TESTDIR}/1/file1" # a bug, it should only need to exist on the client side. # See also cvsadm-2d3. dotest_fail abspath-3a "${testcvs} co -d 1/2 mod1" \ -"${PROG} \[server aborted\]: could not change directory to requested checkout directory .1.: No such file or directory" +"${PROG} \[checkout aborted\]: could not change directory to requested checkout directory .1.: No such file or directory" cd 1 dotest abspath-3a-try2 "${testcvs} co -d 2 mod1" \ -"${PROG} [a-z]*: Updating 2 +"${PROG} checkout: Updating 2 U 2/file1" cd .. rm -rf 1/CVS else dotest abspath-3a "${testcvs} co -d ${TESTDIR}/1/2 mod1" \ -"${PROG} [a-z]*: Updating ${TESTDIR}/1/2 +"${PROG} checkout: Updating ${TESTDIR}/1/2 U ${TESTDIR}/1/2/file1" fi # remote workaround dotest abspath-3b "cat ${TESTDIR}/1/2/CVS/Repository" "mod1" @@ -11616,13 +13500,9 @@ U ${TESTDIR}/1/2/file1" # Now try someplace where we don't have permission. mkdir ${TESTDIR}/barf chmod -w ${TESTDIR}/barf - if $remote; then dotest_fail abspath-4r "${testcvs} co -d ${TESTDIR}/barf/sub mod1" \ -"${PROG} \[server aborted\]: absolute pathname .${TESTDIR}/barf/sub. illegal for server" - else - dotest_fail abspath-4 "${testcvs} co -d ${TESTDIR}/barf/sub mod1" \ -"${PROG} \[[a-z]* aborted\]: cannot make directory sub: No such file or directory" - fi +"${PROG} \[checkout aborted\]: absolute pathname .${TESTDIR}/barf/sub. illegal for server" \ +"${PROG} \[checkout aborted\]: cannot make directory sub: Permission denied" chmod +w ${TESTDIR}/barf rmdir ${TESTDIR}/barf # Done. Nothing to clean up. @@ -11631,15 +13511,15 @@ U ${TESTDIR}/1/2/file1" # Try checking out two modules into the same directory. if $remote; then dotest abspath-5ar "${testcvs} co -d 1 mod1 mod2" \ -"${PROG} [a-z]*: Updating 1/mod1 +"${PROG} checkout: Updating 1/mod1 U 1/mod1/file1 -${PROG} [a-z]*: Updating 1/mod2 +${PROG} checkout: Updating 1/mod2 U 1/mod2/file2" else dotest abspath-5a "${testcvs} co -d ${TESTDIR}/1 mod1 mod2" \ -"${PROG} [a-z]*: Updating ${TESTDIR}/1/mod1 +"${PROG} checkout: Updating ${TESTDIR}/1/mod1 U ${TESTDIR}/1/mod1/file1 -${PROG} [a-z]*: Updating ${TESTDIR}/1/mod2 +${PROG} checkout: Updating ${TESTDIR}/1/mod2 U ${TESTDIR}/1/mod2/file2" fi # end remote workaround dotest abspath-5b "cat ${TESTDIR}/1/CVS/Repository" "\." @@ -11652,21 +13532,21 @@ U ${TESTDIR}/1/mod2/file2" # Try checking out the top-level module. if $remote; then dotest abspath-6ar "${testcvs} co -d 1 ." \ -"${PROG} [a-z]*: Updating 1 -${PROG} [a-z]*: Updating 1/CVSROOT +"${PROG} checkout: Updating 1 +${PROG} checkout: Updating 1/CVSROOT ${DOTSTAR} -${PROG} [a-z]*: Updating 1/mod1 +${PROG} checkout: Updating 1/mod1 U 1/mod1/file1 -${PROG} [a-z]*: Updating 1/mod2 +${PROG} checkout: Updating 1/mod2 U 1/mod2/file2" else dotest abspath-6a "${testcvs} co -d ${TESTDIR}/1 ." \ -"${PROG} [a-z]*: Updating ${TESTDIR}/1 -${PROG} [a-z]*: Updating ${TESTDIR}/1/CVSROOT +"${PROG} checkout: Updating ${TESTDIR}/1 +${PROG} checkout: Updating ${TESTDIR}/1/CVSROOT ${DOTSTAR} -${PROG} [a-z]*: Updating ${TESTDIR}/1/mod1 +${PROG} checkout: Updating ${TESTDIR}/1/mod1 U ${TESTDIR}/1/mod1/file1 -${PROG} [a-z]*: Updating ${TESTDIR}/1/mod2 +${PROG} checkout: Updating ${TESTDIR}/1/mod2 U ${TESTDIR}/1/mod2/file2" fi # end of remote workaround dotest abspath-6b "cat ${TESTDIR}/1/CVS/Repository" "\." @@ -11682,8 +13562,8 @@ U ${TESTDIR}/1/mod2/file2" cd 1 if $remote; then dotest_fail abspath-7ar "${testcvs} -q co -d ../2 mod2" \ -"${PROG} server: protocol error: .\.\./2. contains more leading \.\. -${PROG} \[server aborted\]: than the 0 which Max-dotdot specified" +"${PROG} checkout: protocol error: .\.\./2. contains more leading \.\. +${PROG} \[checkout aborted\]: than the 0 which Max-dotdot specified" cd .. dotest abspath-7a-try2r "${testcvs} -q co -d 2 mod2" \ "U 2/file2" @@ -11718,17 +13598,28 @@ ${PROG} \[server aborted\]: than the 0 which Max-dotdot specified" ;; + + + abspath2) + # More absolute path checks. The following used to attempt to create + # directories in /: + # + # $ cvs -d:fork:/cvsroot co /foo + # cvs checkout: warning: cannot make directory CVS in /: Permission denied + # cvs [checkout aborted]: cannot make directory /foo: Permission denied + # $ + dotest_fail abspath2-1 "${testcvs} co /foo" \ +"$PROG \[checkout aborted\]: Absolute module reference invalid: \`/foo'" \ +"$PROG \[server aborted\]: Absolute module reference invalid: \`/foo' +$PROG \[checkout aborted\]: end of file from server (consult above messages if any)" + ;; + + + 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 (cvsadm, emptydir, &c). - # (On the other hand, should CVS care whether there is an - # Emptydir? That would seem a bit odd). - rm -rf ${CVSROOT_DIRNAME}/CVSROOT/Emptydir - # First set the TopLevelAdmin setting. mkdir 1; cd 1 dotest toplevel-1a "${testcvs} -q co CVSROOT/config" \ @@ -11740,7 +13631,7 @@ ${PROG} \[server aborted\]: than the 0 which Max-dotdot specified" ${CVSROOT_DIRNAME}/CVSROOT/config,v <-- config new revision: 1\.[0-9]*; previous revision: 1\.[0-9]* done -${PROG} [a-z]*: Rebuilding administrative file database" +${PROG} commit: Rebuilding administrative file database" cd ../.. rm -r 1 @@ -11754,8 +13645,8 @@ Directory ${CVSROOT_DIRNAME}/second-dir added to the repository" 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" +"${PROG} add: scheduling file .file1. for addition +${PROG} add: use .${PROG} commit. to add this file permanently" dotest toplevel-4 "${testcvs} -q ci -m add" \ "RCS file: ${CVSROOT_DIRNAME}/top-dir/file1,v done @@ -11768,8 +13659,8 @@ done" 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" +"${PROG} add: scheduling file .file2. for addition +${PROG} add: use .${PROG} commit. to add this file permanently" dotest toplevel-4s "${testcvs} -q ci -m add" \ "RCS file: ${CVSROOT_DIRNAME}/second-dir/file2,v done @@ -11781,20 +13672,20 @@ done" cd ../.. rm -r 1; mkdir 1; cd 1 dotest toplevel-5 "${testcvs} co top-dir" \ -"${PROG} [a-z]*: Updating top-dir +"${PROG} checkout: Updating top-dir U top-dir/file1" dotest toplevel-6 "${testcvs} update top-dir" \ -"${PROG} [a-z]*: Updating top-dir" +"${PROG} update: Updating top-dir" dotest toplevel-7 "${testcvs} update" \ -"${PROG} [a-z]*: Updating \. -${PROG} [a-z]*: Updating top-dir" +"${PROG} update: Updating \. +${PROG} update: Updating top-dir" dotest toplevel-8 "${testcvs} update -d top-dir" \ -"${PROG} [a-z]*: Updating top-dir" +"${PROG} update: Updating top-dir" # There is some sentiment that - # "${PROG} [a-z]*: Updating \. - # ${PROG} [a-z]*: Updating top-dir" + # "${PROG} update: Updating \. + # ${PROG} update: 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). # @@ -11804,15 +13695,15 @@ ${PROG} [a-z]*: Updating top-dir" # 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 +"${PROG} update: Updating \. +${PROG} update: Updating CVSROOT ${DOTSTAR} -${PROG} [a-z]*: Updating top-dir" +${PROG} update: Updating top-dir" cd .. rm -r 1; mkdir 1; cd 1 dotest toplevel-10 "${testcvs} co top-dir" \ -"${PROG} [a-z]*: Updating top-dir +"${PROG} checkout: Updating top-dir U top-dir/file1" # This tests more or less the same thing, in a particularly @@ -11826,17 +13717,22 @@ U top-dir/file1" # 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 + if test -n "$remotehost"; then + # Cygwin again. + $CVS_RSH $remotehost "chmod -w $TESTDIR/1" + else + chmod -w ../1 + fi # Now see whether CVS has trouble because it can't create CVS. # First string is for local, second is for remote. dotest toplevel-12 "${testcvs} co top-dir" \ -"${PROG} [a-z]*: warning: cannot make directory CVS in \.: Permission denied -${PROG} [a-z]*: Updating top-dir" \ -"${PROG} [a-z]*: warning: cannot make directory CVS in \.: Permission denied -${PROG} [a-z]*: warning: cannot make directory CVS in \.: Permission denied -${PROG} [a-z]*: in directory \.: -${PROG} [a-z]*: cannot open CVS/Entries for reading: No such file or directory -${PROG} [a-z]*: Updating top-dir" +"${PROG} checkout: warning: cannot make directory CVS in \.: Permission denied +${PROG} checkout: Updating top-dir" \ +"${PROG} checkout: warning: cannot make directory CVS in \.: Permission denied +${PROG} checkout: warning: cannot make directory CVS in \.: Permission denied +${PROG} checkout: in directory \.: +${PROG} checkout: cannot open CVS/Entries for reading: No such file or directory +${PROG} checkout: Updating top-dir" chmod +w ../1 @@ -11849,7 +13745,7 @@ ${PROG} [a-z]*: Updating top-dir" ${CVSROOT_DIRNAME}/CVSROOT/config,v <-- config new revision: 1\.[0-9]*; previous revision: 1\.[0-9]* done -${PROG} [a-z]*: Rebuilding administrative file database" +${PROG} commit: Rebuilding administrative file database" cd ../.. rm -r 1 @@ -11870,7 +13766,7 @@ ${PROG} [a-z]*: Rebuilding administrative file database" ${CVSROOT_DIRNAME}/CVSROOT/config,v <-- config new revision: 1\.[0-9]*; previous revision: 1\.[0-9]* done -${PROG} [a-z]*: Rebuilding administrative file database" +${PROG} commit: Rebuilding administrative file database" cd ../.. rm -r 1 @@ -11885,8 +13781,8 @@ Directory ${CVSROOT_DIRNAME}/second-dir added to the repository" touch file1 dotest toplevel2-3 "${testcvs} add file1" \ -"${PROG} [a-z]*: scheduling file .file1. for addition -${PROG} [a-z]*: use .${PROG} commit. to add this file permanently" +"${PROG} add: scheduling file .file1. for addition +${PROG} add: use .${PROG} commit. to add this file permanently" dotest toplevel2-4 "${testcvs} -q ci -m add" \ "RCS file: ${CVSROOT_DIRNAME}/top-dir/file1,v done @@ -11899,8 +13795,8 @@ done" cd second-dir touch file2 dotest toplevel2-3s "${testcvs} add file2" \ -"${PROG} [a-z]*: scheduling file .file2. for addition -${PROG} [a-z]*: use .${PROG} commit. to add this file permanently" +"${PROG} add: scheduling file .file2. for addition +${PROG} add: use .${PROG} commit. to add this file permanently" dotest toplevel2-4s "${testcvs} -q ci -m add" \ "RCS file: ${CVSROOT_DIRNAME}/second-dir/file2,v done @@ -11912,24 +13808,24 @@ done" cd ../.. rm -r 1; mkdir 1; cd 1 dotest toplevel2-5 "${testcvs} co top-dir" \ -"${PROG} [a-z]*: Updating top-dir +"${PROG} checkout: Updating top-dir U top-dir/file1" dotest toplevel2-6 "${testcvs} update top-dir" \ -"${PROG} [a-z]*: Updating top-dir" +"${PROG} update: Updating top-dir" dotest toplevel2-7 "${testcvs} update" \ -"${PROG} [a-z]*: Updating top-dir" +"${PROG} update: Updating top-dir" dotest toplevel2-8 "${testcvs} update -d top-dir" \ -"${PROG} [a-z]*: Updating top-dir" +"${PROG} update: Updating top-dir" # Contrast this with toplevel-9, which has TopLevelAdmin=yes. dotest toplevel2-9 "${testcvs} update -d" \ -"${PROG} [a-z]*: Updating top-dir" +"${PROG} update: Updating top-dir" cd .. rm -r 1; mkdir 1; cd 1 dotest toplevel2-10 "${testcvs} co top-dir" \ -"${PROG} [a-z]*: Updating top-dir +"${PROG} checkout: Updating top-dir U top-dir/file1" # This tests more or less the same thing, in a particularly # "real life" example. With TopLevelAdmin=yes, this command @@ -11945,19 +13841,72 @@ U top-dir/file1" ${CVSROOT_DIRNAME}/CVSROOT/config,v <-- config new revision: 1\.[0-9]*; previous revision: 1\.[0-9]* done -${PROG} [a-z]*: Rebuilding administrative file database" +${PROG} commit: Rebuilding administrative file database" cd ../.. rm -r 1 rm -rf ${CVSROOT_DIRNAME}/top-dir ${CVSROOT_DIRNAME}/second-dir ;; + + + top-level) + # FIXCVS: + # This test confirms a bug that exists in the r* commands currently + # when run against the top-level project. + # + # The assertion failure is something like: + # do_recursion: Assertion \`strstr (repository, \"/\./\") == ((void \*)0)' failed\..*" + dotest_fail top-level-1 "$testcvs rlog ." \ +"${DOTSTAR}ssertion.*failed${DOTSTAR}" "${DOTSTAR}failed assertion${DOTSTAR}" + + if $keep; then + echo Keeping ${TESTDIR} and exiting due to --keep + exit 0 + fi + ;; + + + checkout_repository) - dotest_fail check_repository-1 "${testcvs} co -d ${CVSROOT_DIRNAME} CVSROOT" \ -"${PROG} \[checkout aborted\]: Cannot check out files into the repository itself" + dotest_fail checkout_repository-1 \ +"${testcvs} co -d ${CVSROOT_DIRNAME} CVSROOT" \ +"${PROG} \[checkout aborted\]: Cannot check out files into the repository itself" \ +"${PROG} \[checkout aborted\]: absolute pathname \`${CVSROOT_DIRNAME}' illegal for server" + + # The behavior of the client/server test below should be correct. + # The CVS client currently has no way of knowing that the client and + # server are the same machine and thus skips the $CVSROOT checks. + # I think checking for this case in CVS would be bloat since this + # should be a fairly rare occurance. cd ${CVSROOT_DIRNAME} - dotest_fail check_repository-2 "${testcvs} co CVSROOT" \ -"${PROG} \[checkout aborted\]: Cannot check out files into the repository itself" - dotest check_repository-3 "${testcvs} co -p CVSROOT/modules >/dev/null" \ + dotest_fail checkout_repository-2 "${testcvs} co CVSROOT" \ +"${PROG} \[checkout aborted\]: Cannot check out files into the repository itself" \ +"${PROG} checkout: Updating CVSROOT +${PROG} checkout: move away CVSROOT/checkoutlist; it is in the way +C CVSROOT/checkoutlist +${PROG} checkout: move away CVSROOT/commitinfo; it is in the way +C CVSROOT/commitinfo +${PROG} checkout: move away CVSROOT/config; it is in the way +C CVSROOT/config +${PROG} checkout: move away CVSROOT/cvswrappers; it is in the way +C CVSROOT/cvswrappers +${PROG} checkout: move away CVSROOT/editinfo; it is in the way +C CVSROOT/editinfo +${PROG} checkout: move away CVSROOT/loginfo; it is in the way +C CVSROOT/loginfo +${PROG} checkout: move away CVSROOT/modules; it is in the way +C CVSROOT/modules +${PROG} checkout: move away CVSROOT/notify; it is in the way +C CVSROOT/notify +${PROG} checkout: move away CVSROOT/rcsinfo; it is in the way +C CVSROOT/rcsinfo +${PROG} checkout: move away CVSROOT/taginfo; it is in the way +C CVSROOT/taginfo +${PROG} checkout: move away CVSROOT/verifymsg; it is in the way +C CVSROOT/verifymsg" + + dotest checkout_repository-3 \ +"${testcvs} co -p CVSROOT/modules >/dev/null" \ "=================================================================== Checking out CVSROOT/modules RCS: ${CVSROOT_DIRNAME}/CVSROOT/modules,v @@ -12045,9 +13994,9 @@ EOF cd first-dir touch file1 file2 dotest editor-3 "${testcvs} add file1 file2" \ -"${PROG} [a-z]*: scheduling file .file1. for addition -${PROG} [a-z]*: scheduling file .file2. for addition -${PROG} [a-z]*: use .${PROG} commit. to add these files permanently" +"${PROG} add: scheduling file .file1. for addition +${PROG} add: scheduling file .file2. for addition +${PROG} add: use .${PROG} commit. to add these files permanently" dotest editor-4 "${testcvs} -e ${TESTDIR}/editme -q ci" \ "RCS file: ${CVSROOT_DIRNAME}/first-dir/file1,v done @@ -12245,6 +14194,97 @@ Log message unchanged or not specified a)bort, c)ontinue, e)dit, !)reuse this message unchanged for remaining dirs Action: (continue) ${PROG} \[[a-z]* aborted\]: aborted by user" + # Test CVS's response to a log message that is zero bytes + # in length. This caused core dumps in cvs 1.11.5 on Solaris + # hosts. + cd .. + dotest editor-emptylog-continue-1 "${testcvs} -q co CVSROOT/loginfo" \ +"U CVSROOT/loginfo" + + cd CVSROOT + echo 'DEFAULT (echo Start-Log;cat;echo End-Log) >> \$CVSROOT/CVSROOT/commitlog' > loginfo + dotest editor-emptylog-continue-2 "${testcvs} commit -m add loginfo" \ +"Checking in loginfo; +${CVSROOT_DIRNAME}/CVSROOT/loginfo,v <-- loginfo +new revision: 1\.2; previous revision: 1\.1 +done +${PROG} commit: Rebuilding administrative file database" + + cd ../first-dir + cat >${TESTDIR}/editme <<EOF +#!${TESTSHELL} +sleep 1 +cp /dev/null \$1 +exit 1 +EOF + chmod +x ${TESTDIR}/editme + dotest editor-emptylog-continue-3 "echo c |${testcvs} -e ${TESTDIR}/editme ci -f file1" \ +"${PROG} [a-z]*: warning: editor session failed + +Log message unchanged or not specified +a)bort, c)ontinue, e)dit, !)reuse this message unchanged for remaining dirs +Action: (continue) Checking in file1; +${CVSROOT_DIRNAME}/first-dir/file1,v <-- file1 +new revision: 1\.2; previous revision: 1\.1 +done" + # The loginfo Log message should be an empty line and not "(null)" + # which is what some fprintf() implementations do with "%s" + # format and a NULL pointer... + if $remote; then + dotest editor-emptylog-continue-4r \ +"cat ${CVSROOT_DIRNAME}/CVSROOT/commitlog" \ +"Start-Log +Update of ${CVSROOT_DIRNAME}/first-dir +In directory ${hostname}:${TMPDIR}/cvs-serv[0-9a-z]* + +Modified Files: + file1 +Log Message: + +End-Log" + else + dotest editor-emptylog-continue-4 \ +"cat ${CVSROOT_DIRNAME}/CVSROOT/commitlog" \ +"Start-Log +Update of ${CVSROOT_DIRNAME}/first-dir +In directory ${hostname}:${TESTDIR}/1/first-dir + +Modified Files: + file1 +Log Message: + +End-Log" + fi + # There should have an empty log message at this point + dotest editor-emptylog-continue-5 "${testcvs} log -N -r1.2 file1" \ +" +RCS file: ${CVSROOT_DIRNAME}/first-dir/file1,v +Working file: file1 +head: 1\.2 +branch: +locks: strict +access list: +keyword substitution: kv +total revisions: 3; selected revisions: 1 +description: +---------------------------- +revision 1\.2 +date: [0-9/]* [0-9:]*; author: ${username}; state: Exp; lines: +0 -0 +\*\*\* empty log message \*\*\* +=============================================================================" + + # clean up + if $keep; then + echo Keeping ${TESTDIR} and exiting due to --keep + exit 0 + fi + + # restore the default loginfo script + rm -f ${CVSROOT_DIRNAME}/CVSROOT/loginfo,v \ + ${CVSROOT_DIRNAME}/CVSROOT/loginfo \ + ${CVSROOT_DIRNAME}/CVSROOT/commitlog + dotest editor-emptylog-continue-cleanup-1 "${testcvs} init" '' + cd ../.. rm -r 1 rm ${TESTDIR}/editme @@ -12295,11 +14335,20 @@ Action: (continue) ${PROG} \[[a-z]* aborted\]: aborted by user" fi cd ../../2/1dir - dotest 168 "${testcvs} -q update" \ -"${PROG} [a-z]*: foo is no longer in the repository + # The second case in the local and remote versions of errmsg1-168 + # below happens on Cygwin under Windows, where write privileges + # aren't enforced properly. + if $remote; then + dotest errmsg1-168r "${testcvs} -q update" \ +"${PROG} update: foo is no longer in the repository +${PROG} update: unable to remove \./foo: Permission denied" \ +"${PROG} update: foo is no longer in the repository" + else + dotest errmsg1-168 "${testcvs} -q update" \ +"${PROG} update: foo is no longer in the repository ${PROG} update: unable to remove foo: Permission denied" \ -"${PROG} [a-z]*: foo is no longer in the repository -${PROG} update: unable to remove \./foo: Permission denied" +"${PROG} update: foo is no longer in the repository" + fi cd .. chmod u+w 1dir @@ -12332,9 +14381,9 @@ ${PROG} update: unable to remove \./foo: Permission denied" # special file" message fits this pattern, at # least currently. dotest_fail errmsg2-4 "${testcvs} add CVS file1" \ -"${PROG} [a-z]*: cannot add special file .CVS.; skipping -${PROG} [a-z]*: scheduling file .file1. for addition -${PROG} [a-z]*: use .${PROG} commit. to add this file permanently" +"${PROG} add: cannot add special file .CVS.; skipping +${PROG} add: scheduling file .file1. for addition +${PROG} add: use .${PROG} commit. to add this file permanently" # I'm not sure these tests completely convey the various strange # behaviors that CVS had before it specially checked for "." and # "..". Suffice it to say that these are unlikely to work right @@ -12370,9 +14419,9 @@ ${PROG} \[[a-z]* aborted\]: correct above errors first!" touch file10 mkdir sdir10 dotest errmsg2-10 "${testcvs} add file10 sdir10" \ -"${PROG} [a-z]*: scheduling file .file10. for addition +"${PROG} add: scheduling file .file10. for addition Directory ${CVSROOT_DIRNAME}/first-dir/sdir10 added to the repository -${PROG} [a-z]*: use .${PROG} commit. to add this file permanently" +${PROG} add: use .${PROG} commit. to add this file permanently" dotest errmsg2-11 "${testcvs} -q ci -m add-file10" \ "RCS file: ${CVSROOT_DIRNAME}/first-dir/file10,v done @@ -12394,12 +14443,12 @@ done" touch first-dir/sdir10/ssdir/ssfile dotest errmsg2-14 \ "${testcvs} add first-dir/sdir10/ssdir/ssfile" \ -"${PROG} [a-z]*: scheduling file .first-dir/sdir10/ssdir/ssfile. for addition -${PROG} [a-z]*: use .${PROG} commit. to add this file permanently" +"${PROG} add: scheduling file .first-dir/sdir10/ssdir/ssfile. for addition +${PROG} add: use .${PROG} commit. to add this file permanently" touch first-dir/file15 dotest errmsg2-15 "${testcvs} add first-dir/file15" \ -"${PROG} [a-z]*: scheduling file .first-dir/file15. for addition -${PROG} [a-z]*: use .${PROG} commit. to add this file permanently" +"${PROG} add: scheduling file .first-dir/file15. for addition +${PROG} add: use .${PROG} commit. to add this file permanently" # Now the case where we try to give it a directory which is not # under CVS control. @@ -12410,9 +14459,9 @@ ${PROG} [a-z]*: use .${PROG} commit. to add this file permanently" # message (e.g. the one from local CVS). But at least it is an # error message. dotest_fail errmsg2-16 "${testcvs} add bogus-dir/file16" \ -"${PROG} [a-z]*: in directory bogus-dir: -${PROG} \[[a-z]* aborted\]: there is no version here; do .${PROG} checkout. first" \ -"${PROG} [a-z]*: cannot open CVS/Entries for reading: No such file or directory +"${PROG} add: in directory bogus-dir: +${PROG} \[add aborted\]: there is no version here; do .${PROG} checkout. first" \ +"${PROG} add: cannot open CVS/Entries for reading: No such file or directory ${PROG} \[add aborted\]: no repository" rm -r bogus-dir @@ -12439,9 +14488,9 @@ done" if $remote; then :; else cd ${CVSROOT_DIRNAME} dotest_fail errmsg2-20 "${testcvs} import -mtest . A B" \ -"${PROG} \[[a-z]* aborted\]: attempt to import the repository" +"${PROG} \[import aborted\]: attempt to import the repository" dotest_fail errmsg2-21 "${testcvs} import -mtest first-dir A B" \ -"${PROG} \[[a-z]* aborted\]: attempt to import the repository" +"${PROG} \[import aborted\]: attempt to import the repository" fi cd .. @@ -12470,12 +14519,12 @@ done" # to test some other messages touch file1 dotest adderrmsg-3 "${testcvs} add file1" \ -"${PROG} [a-z]*: scheduling file .file1. for addition -${PROG} [a-z]*: use .${PROG} commit. to add this file permanently" +"${PROG} add: scheduling file .file1. for addition +${PROG} add: use .${PROG} commit. to add this file permanently" # add it twice dotest_fail adderrmsg-4 "${testcvs} add file1" \ -"${PROG} [a-z]*: file1 has already been entered" +"${PROG} add: file1 has already been entered" dotest_fail adderrmsg-5 "${testcvs} -q add file1" "" dotest adderrmsg-6 "${testcvs} -q ci -madd" \ @@ -12488,7 +14537,7 @@ done" # file in Entries & repository dotest_fail adderrmsg-7 "${testcvs} add file1" \ -"${PROG} [a-z]*: file1 already exists, with version number 1\.1" +"${PROG} add: file1 already exists, with version number 1\.1" dotest_fail adderrmsg-8 "${testcvs} -q add file1" "" # clean up @@ -12499,141 +14548,120 @@ done" fi ;; + opterrmsg) + # Test some option parsing error messages + + # No init is necessary since these error messages are printed b4 + # CVS looks for a sandbox or repository + + # -z used to accept non-numeric arguments. This bit someone who + # attempted `cvs -z -n up' when the -n was read as the argument to + # -z. + dotest_fail opterrmsg-1 "${testcvs} -z -n up" \ +"${PROG}: gzip compression level must be between 0 and 9" + + # Some general -z checks + dotest_fail opterrmsg-2 "${testcvs} -z -1 up" \ +"${PROG}: gzip compression level must be between 0 and 9" + dotest_fail opterrmsg-3 "${testcvs} -z10 up" \ +"${PROG}: gzip compression level must be between 0 and 9" + ;; + devcom) mkdir ${CVSROOT_DIRNAME}/first-dir mkdir 1 cd 1 - if ${testcvs} -q co first-dir >>${LOGFILE} ; then - pass 169 - else - fail 169 - fi + dotest devcom-1 "${testcvs} -q co first-dir" cd first-dir echo abb >abb - if ${testcvs} add abb 2>>${LOGFILE}; then - pass 170 - else - fail 170 - fi - if ${testcvs} ci -m added >>${LOGFILE} 2>&1; then - pass 171 - else - fail 171 - fi - dotest_fail 171a0 "${testcvs} watch" "Usage${DOTSTAR}" - if ${testcvs} watch on; then - pass 172 - else - fail 172 - fi + dotest devcom-2 "${testcvs} add abb" \ +"$PROG add: scheduling file \`abb' for addition +$PROG add: use '$PROG commit' to add this file permanently" + + dotest devcom-3 "${testcvs} -q ci -m added" \ +"RCS file: ${CVSROOT_DIRNAME}/first-dir/abb,v +done +Checking in abb; +${CVSROOT_DIRNAME}/first-dir/abb,v <-- abb +initial revision: 1\.1 +done" + + dotest_fail devcom-4 "${testcvs} watch" "Usage${DOTSTAR}" + + dotest devcom-5 "${testcvs} watch on" + echo abc >abc - if ${testcvs} add abc 2>>${LOGFILE}; then - pass 173 - else - fail 173 - fi - if ${testcvs} ci -m added >>${LOGFILE} 2>&1; then - pass 174 - else - fail 174 - fi + dotest devcom-6 "${testcvs} add abc" \ +"$PROG add: scheduling file \`abc' for addition +$PROG add: use '$PROG commit' to add this file permanently" + + dotest devcom-7 "${testcvs} -q ci -m added" \ +"RCS file: ${CVSROOT_DIRNAME}/first-dir/abc,v +done +Checking in abc; +${CVSROOT_DIRNAME}/first-dir/abc,v <-- abc +initial revision: 1\.1 +done" cd ../.. mkdir 2 cd 2 - if ${testcvs} -q co first-dir >>${LOGFILE}; then - pass 175 - else - fail 175 - fi + dotest devcom-8 "${testcvs} -q co first-dir" \ +"U first-dir/abb +U first-dir/abc" + cd first-dir - if test -w abb; then - fail 176 - else - pass 176 - fi - if test -w abc; then - fail 177 - else - pass 177 - fi + dotest_fail devcom-9 "test -w abb" + dotest_fail devcom-9 "test -w abc" - dotest devcom-178 "${testcvs} editors" "" + dotest devcom-10 "${testcvs} editors" "" - if ${testcvs} edit abb; then - pass 179 - else - fail 179 - fi + dotest devcom-11 "${testcvs} edit abb" # Here we test for the traditional ISO C ctime() date format. # We assume the C locale; I guess that works provided we set # LC_ALL at the start of this script but whether these # strings should vary based on locale does not strike me as # self-evident. - dotest devcom-180 "${testcvs} editors" \ + dotest devcom-12 "${testcvs} editors" \ "abb ${username} [SMTWF][uoehra][neduit] [JFAMSOND][aepuco][nbrylgptvc] [0-9 ][0-9] [0-9:]* [0-9][0-9][0-9][0-9] GMT [-a-zA-Z_.0-9]* ${TESTDIR}/2/first-dir" echo aaaa >>abb - if ${testcvs} ci -m modify abb >>${LOGFILE} 2>&1; then - pass 182 - else - fail 182 - fi + dotest devcom-13 "${testcvs} ci -m modify abb" \ +"Checking in abb; +${CVSROOT_DIRNAME}/first-dir/abb,v <-- abb +new revision: 1\.2; previous revision: 1\.1 +done" + # Unedit of a file not being edited should be a noop. - dotest 182.5 "${testcvs} unedit abb" '' + dotest devcom-14 "${testcvs} unedit abb" '' - dotest devcom-183 "${testcvs} editors" "" + dotest devcom-15 "${testcvs} editors" "" - if test -w abb; then - fail 185 - else - pass 185 - fi + dotest_fail devcom-16 "test -w abb" + + dotest devcom-17 "${testcvs} edit abc" - if ${testcvs} edit abc; then - pass 186a1 - else - fail 186a1 - fi # Unedit of an unmodified file. - if ${testcvs} unedit abc; then - pass 186a2 - else - fail 186a2 - fi - if ${testcvs} edit abc; then - pass 186a3 - else - fail 186a3 - fi + dotest devcom-18 "${testcvs} unedit abc" + dotest devcom-19 "${testcvs} edit abc" + echo changedabc >abc # Try to unedit a modified file; cvs should ask for confirmation - if (echo no | ${testcvs} unedit abc) >>${LOGFILE}; then - pass 186a4 - else - fail 186a4 - fi - if echo changedabc | cmp - abc; then - pass 186a5 - else - fail 186a5 - fi + dotest devcom-20 "echo no | ${testcvs} unedit abc" \ +"abc has been modified; revert changes? " + + dotest devcom-21 "echo changedabc | cmp - abc" + # OK, now confirm the unedit - if (echo yes | ${testcvs} unedit abc) >>${LOGFILE}; then - pass 186a6 - else - fail 186a6 - fi - if echo abc | cmp - abc; then - pass 186a7 - else - fail 186a7 - fi + dotest devcom-22 "echo yes | ${testcvs} unedit abc" \ +"abc has been modified; revert changes? " + + dotest devcom-23 "echo abc | cmp - abc" - dotest devcom-a0 "${testcvs} watchers" '' + dotest devcom-24 "${testcvs} watchers" '' # FIXME: This probably should be an error message instead # of silently succeeding and printing nothing. @@ -12863,20 +14891,27 @@ G@#..!@#=&" # Now test disconnected "cvs edit" and the format of the # CVS/Notify file. if $remote; then - CVS_SERVER_SAVED=${CVS_SERVER} + CVS_SERVER_save=${CVS_SERVER} CVS_SERVER=${TESTDIR}/cvs-none; export CVS_SERVER - # The ${DOTSTAR} matches the exact exec error message - # (which varies) and either "end of file from server" - # (if the process doing the exec exits before the parent - # gets around to sending data to it) or "broken pipe" (if it - # is the other way around). - dotest_fail devcom3-9ar "${testcvs} edit w1" \ -"${PROG} \[edit aborted\]: cannot exec ${TESTDIR}/cvs-none: ${DOTSTAR}" + # The ${DOTSTAR} below matches the exact CVS server error message, + # which in :fork: mode is: + # "$PROG \[edit aborted\]: cannot exec $TESTDIR/cvs-none: ${DOTSTAR}", + # but which is: + # "bash2: line 1: $TESTDIR/cvs-none: No such file or directory" + # when testing across an :ext:/ssh link to my Linux 2.4 box. + # + # I can't even test for the second part of the error message, + # from the client, which varies more consistently, usually either + # "end of file from server" (if the process doing the exec exits + # before the parent gets around to sending data to it) or + # "received broken pipe signal" (if it is the other way around), + # since HP-UX fails to output it. + dotest_fail devcom3-9ar "${testcvs} edit w1 2>/dev/null" dotest devcom3-9br "test -w w1" "" dotest devcom3-9cr "cat CVS/Notify" \ "Ew1 [SMTWF][uoehra][neduit] [JFAMSOND][aepuco][nbrylgptvc] [0-9 ][0-9] [0-9:]* [0-9][0-9][0-9][0-9] GMT [-a-zA-Z_.0-9]* ${TESTDIR}/1/first-dir EUC" - CVS_SERVER=${CVS_SERVER_SAVED}; export CVS_SERVER + CVS_SERVER=${CVS_SERVER_save}; export CVS_SERVER dotest devcom3-9dr "${testcvs} -q update" "" dotest_fail devcom3-9er "test -f CVS/Notify" "" dotest devcom3-9fr "${testcvs} watchers w1" \ @@ -12895,7 +14930,7 @@ G@#..!@#=&" ${CVSROOT_DIRNAME}/first-dir/CVS/fileattr mkdir 2; cd 2 dotest_fail devcom3-10 "${testcvs} -Q co ." \ -"${PROG} \[[a-z]* aborted\]: file attribute database corruption: tab missing in ${CVSROOT_DIRNAME}/first-dir/CVS/fileattr" +"${PROG} \[checkout aborted\]: file attribute database corruption: tab missing in ${CVSROOT_DIRNAME}/first-dir/CVS/fileattr" cd .. # Use -f because of the readonly files. @@ -12916,8 +14951,8 @@ G@#..!@#=&" # This is just like the 173 test touch file1 dotest watch4-2 "${testcvs} add file1" \ -"${PROG} [a-z]*: scheduling file .file1. for addition -${PROG} [a-z]*: use .${PROG} commit. to add this file permanently" +"${PROG} add: scheduling file .file1. for addition +${PROG} add: use .${PROG} commit. to add this file permanently" dotest watch4-3 "${testcvs} -q ci -m add" \ "RCS file: ${CVSROOT_DIRNAME}/first-dir/file1,v done @@ -12932,8 +14967,8 @@ done" cd subdir touch sfile dotest watch4-5 "${testcvs} add sfile" \ -"${PROG} [a-z]*: scheduling file .sfile. for addition -${PROG} [a-z]*: use .${PROG} commit. to add this file permanently" +"${PROG} add: scheduling file .sfile. for addition +${PROG} add: use .${PROG} commit. to add this file permanently" dotest watch4-6 "${testcvs} -q ci -m add" \ "RCS file: ${CVSROOT_DIRNAME}/first-dir/subdir/sfile,v done @@ -12968,7 +15003,7 @@ retrieving revision 1\.1 retrieving revision 1\.2 Merging differences between 1\.1 and 1\.2 into file1 rcsmerge: warning: conflicts during merge -${PROG} [a-z]*: conflicts found in file1 +${PROG} update: conflicts found in file1 C file1" if (echo yes | ${testcvs} unedit file1) >>${LOGFILE}; then pass watch4-14 @@ -13022,8 +15057,8 @@ C file1" # This is just like the 173 test touch file1 dotest watch5-2 "${testcvs} add file1" \ -"${PROG} [a-z]*: scheduling file .file1. for addition -${PROG} [a-z]*: use .${PROG} commit. to add this file permanently" +"${PROG} add: scheduling file .file1. for addition +${PROG} add: use .${PROG} commit. to add this file permanently" dotest watch5-3 "${testcvs} -q ci -m add" \ "RCS file: ${CVSROOT_DIRNAME}/first-dir/file1,v done @@ -13085,13 +15120,9 @@ ${PROG} unedit: run update to complete the unedit" dotest unedit-without-baserev-5 "cat CVS/Entries" \ "/$file/1\.1\.1\.1/${DOTSTAR}" - if $remote; then - dotest unedit-without-baserev-6r "${testcvs} -q update" "U m" - else - dotest unedit-without-baserev-6 "${testcvs} -q update" \ + dotest unedit-without-baserev-6 "${testcvs} -q update" \ "${PROG} update: warning: m was lost U m" - fi # OK, those were the easy cases. Now tackle the hard one # (the reason that CVS/Baserev was invented rather than just @@ -13123,19 +15154,15 @@ retrieving revision 1\.1\.1\.1 retrieving revision 1\.2 Merging differences between 1\.1\.1\.1 and 1\.2 into m rcsmerge: warning: conflicts during merge -${PROG} [a-z]*: conflicts found in m +${PROG} update: conflicts found in m C m" rm CVS/Baserev - echo yes | dotest unedit-without-baserev-14 "${testcvs} unedit m" \ + dotest unedit-without-baserev-14 "echo yes | ${testcvs} unedit m" \ "m has been modified; revert changes${QUESTION} ${PROG} unedit: m not mentioned in CVS/Baserev ${PROG} unedit: run update to complete the unedit" - if $remote; then - dotest unedit-without-baserev-15r "${testcvs} -q update" "U m" - else - dotest unedit-without-baserev-15 "${testcvs} -q update" \ + dotest unedit-without-baserev-15 "${testcvs} -q update" \ "${PROG} update: warning: m was lost U m" - fi # The following tests are kind of degenerate compared with # watch4-16 through watch4-18 but might as well make sure that # nothing seriously wrong has happened to the working directory. @@ -13159,8 +15186,9 @@ U m" dotest ignore-1 "${testcvs} -q co CVSROOT" "U CVSROOT/${DOTSTAR}" cd CVSROOT echo rootig.c >cvsignore - dotest ignore-2 "${testcvs} add cvsignore" "${PROG}"' [a-z]*: scheduling file `cvsignore'"'"' for addition -'"${PROG}"' [a-z]*: use .'"${PROG}"' commit. to add this file permanently' + dotest ignore-2 "${testcvs} add cvsignore" \ +"${PROG}"' add: scheduling file `cvsignore'"'"' for addition +'"${PROG}"' add: use .'"${PROG}"' commit. to add this file permanently' # As of Jan 96, local CVS prints "Examining ." and remote doesn't. # Accept either. @@ -13172,7 +15200,7 @@ Checking in cvsignore; ${CVSROOT_DIRNAME}/CVSROOT/cvsignore,v <-- cvsignore initial revision: 1\.1 done -${PROG} [a-z]*: Rebuilding administrative file database" +${PROG} commit: Rebuilding administrative file database" cd .. if echo "yes" | ${testcvs} release -d CVSROOT >>${LOGFILE} ; then @@ -13302,7 +15330,7 @@ Are you sure you want to release (and delete) directory .second-dir': " cd setup echo file1 >file1 dotest ignore-on-branch-setup-2 "$testcvs -q add file1" \ -"$PROG [a-z]*: use .$PROG commit. to add this file permanently" +"${PROG} add: use .${PROG} commit. to add this file permanently" dotest ignore-on-branch-setup-3 "$testcvs -q ci -mfile1 file1" \ "RCS file: $CVSROOT_DIRNAME/ignore-on-branch/file1,v done @@ -13313,7 +15341,7 @@ done" dotest ignore-on-branch-setup-4 "$testcvs -q tag -b branch" 'T file1' echo file2 >file2 dotest ignore-on-branch-setup-5 "$testcvs -q add file2" \ -"$PROG [a-z]*: use .$PROG commit. to add this file permanently" +"${PROG} add: use .${PROG} commit. to add this file permanently" dotest ignore-on-branch-setup-6 "$testcvs -q ci -mtrunk file2" \ "RCS file: $CVSROOT_DIRNAME/ignore-on-branch/file2,v done @@ -13344,14 +15372,14 @@ T file1' dotest ignore-on-branch-3 "$testcvs -q tag -b branch2" 'T file1' fi dotest ignore-on-branch-4 "$testcvs -q add file2" \ -"$PROG [a-z]*: use .$PROG commit. to add this file permanently" +"${PROG} add: use .${PROG} commit. to add this file permanently" dotest ignore-on-branch-5 "$testcvs -q ci -mbranch file2" \ "Checking in file2; $CVSROOT_DIRNAME/ignore-on-branch/file2,v <-- file2 new revision: 1\.1\.2\.1; previous revision: 1\.1 done" dotest ignore-on-branch-6 "$testcvs -q up -rbranch2" \ -"$PROG [a-z]*: file2 is no longer in the repository" +"${PROG} update: file2 is no longer in the repository" dotest ignore-on-branch-7 "$testcvs -q up -jbranch" 'U file2' cd ../.. @@ -13379,8 +15407,8 @@ done" cd first-dir cp ../binfile.dat binfile dotest binfiles-2 "${testcvs} add -kb binfile" \ -"${PROG}"' [a-z]*: scheduling file `binfile'\'' for addition -'"${PROG}"' [a-z]*: use .'"${PROG}"' commit. to add this file permanently' +"${PROG}"' add: scheduling file `binfile'\'' for addition +'"${PROG}"' add: use .'"${PROG}"' commit. to add this file permanently' dotest binfiles-3 "${testcvs} -q ci -m add-it" \ "RCS file: ${CVSROOT_DIRNAME}/first-dir/binfile,v done @@ -13448,9 +15476,9 @@ done" echo 'edits in dir 2' >binfile dotest binfiles-con1 "${testcvs} -q update" \ "U binfile -${PROG} [a-z]*: nonmergeable file needs merge -${PROG} [a-z]*: revision 1\.3 from repository is now in binfile -${PROG} [a-z]*: file from working directory is now in \.#binfile\.1\.2 +${PROG} update: nonmergeable file needs merge +${PROG} update: revision 1\.3 from repository is now in binfile +${PROG} update: file from working directory is now in \.#binfile\.1\.2 C binfile" dotest binfiles-con2 "cmp binfile ../../1/binfile.dat" '' dotest binfiles-con3 "cat .#binfile.1.2" 'edits in dir 2' @@ -13539,7 +15567,7 @@ File: binfile Status: Up-to-date # Do sticky options work when used with 'cvs update'? echo "Not a binary file." > nibfile dotest binfiles-sticky1 "${testcvs} -q add nibfile" \ -"${PROG} [a-z]*: use .${PROG} commit. to add this file permanently" +"${PROG} add: use .${PROG} commit. to add this file permanently" dotest binfiles-sticky2 "${testcvs} -q ci -m add-it nibfile" \ "RCS file: ${CVSROOT_DIRNAME}/first-dir/nibfile,v done @@ -13658,10 +15686,10 @@ total revisions: 1 cp ../binfile brmod-wdmod dotest binfiles2-1a \ "${testcvs} add -kb brmod brmod-trmod brmod-wdmod" \ -"${PROG} [a-z]*: scheduling file .brmod. for addition -${PROG} [a-z]*: scheduling file .brmod-trmod. for addition -${PROG} [a-z]*: scheduling file .brmod-wdmod. for addition -${PROG} [a-z]*: use .${PROG} commit. to add these files permanently" +"${PROG} add: scheduling file .brmod. for addition +${PROG} add: scheduling file .brmod-trmod. for addition +${PROG} add: scheduling file .brmod-wdmod. for addition +${PROG} add: use .${PROG} commit. to add these files permanently" dotest binfiles2-1b "${testcvs} -q ci -m add" \ "RCS file: ${CVSROOT_DIRNAME}/first-dir/brmod,v done @@ -13687,8 +15715,8 @@ T brmod-wdmod' dotest binfiles2-3 "${testcvs} -q update -r br" '' cp ../binfile binfile.dat dotest binfiles2-4 "${testcvs} add -kb binfile.dat" \ -"${PROG} [a-z]*: scheduling file .binfile\.dat. for addition on branch .br. -${PROG} [a-z]*: use .${PROG} commit. to add this file permanently" +"${PROG} add: scheduling file .binfile\.dat. for addition on branch .br. +${PROG} add: use .${PROG} commit. to add this file permanently" cp ../binfile2 brmod cp ../binfile2 brmod-trmod cp ../binfile2 brmod-wdmod @@ -13712,7 +15740,7 @@ ${CVSROOT_DIRNAME}/first-dir/brmod-wdmod,v <-- brmod-wdmod new revision: 1\.1\.2\.1; previous revision: 1\.1 done" dotest binfiles2-6 "${testcvs} -q update -A" \ -"${PROG} [a-z]*: binfile\.dat is no longer in the repository +"${PROG} update: binfile\.dat is no longer in the repository [UP] brmod [UP] brmod-trmod [UP] brmod-wdmod" @@ -13729,14 +15757,14 @@ done" dotest binfiles2-8 "${testcvs} -q update -j br" \ "U binfile\.dat U brmod -${PROG} [a-z]*: nonmergeable file needs merge -${PROG} [a-z]*: revision 1.1.2.1 from repository is now in brmod-trmod -${PROG} [a-z]*: file from working directory is now in .#brmod-trmod.1.2 +${PROG} update: nonmergeable file needs merge +${PROG} update: revision 1.1.2.1 from repository is now in brmod-trmod +${PROG} update: file from working directory is now in .#brmod-trmod.1.2 C brmod-trmod M brmod-wdmod -${PROG} [a-z]*: nonmergeable file needs merge -${PROG} [a-z]*: revision 1.1.2.1 from repository is now in brmod-wdmod -${PROG} [a-z]*: file from working directory is now in .#brmod-wdmod.1.1 +${PROG} update: nonmergeable file needs merge +${PROG} update: revision 1.1.2.1 from repository is now in brmod-wdmod +${PROG} update: file from working directory is now in .#brmod-wdmod.1.1 C brmod-wdmod" dotest binfiles2-9 "cmp ../binfile binfile.dat" @@ -13768,8 +15796,8 @@ done" dotest_fail binfiles2-o1 "${testcvs} -q admin -o :1.2 brmod-trmod" \ "RCS file: ${CVSROOT_DIRNAME}/first-dir/brmod-trmod,v deleting revision 1\.2 -${PROG} [a-z]*: ${CVSROOT_DIRNAME}/first-dir/brmod-trmod,v: can't remove branch point 1\.1 -${PROG} [a-z]*: RCS file for .brmod-trmod. not modified\." +${PROG} admin: ${CVSROOT_DIRNAME}/first-dir/brmod-trmod,v: can't remove branch point 1\.1 +${PROG} admin: RCS file for .brmod-trmod. not modified\." dotest binfiles2-o2 "${testcvs} -q admin -o 1.1.2.1: brmod-trmod" \ "RCS file: ${CVSROOT_DIRNAME}/first-dir/brmod-trmod,v deleting revision 1\.1\.2\.1 @@ -13812,8 +15840,8 @@ checkin cd first-dir echo hello >file1 dotest binfiles3-2 "${testcvs} add file1" \ -"${PROG} [a-z]*: scheduling file .file1. for addition -${PROG} [a-z]*: use .${PROG} commit. to add this file permanently" +"${PROG} add: scheduling file .file1. for addition +${PROG} add: use .${PROG} commit. to add this file permanently" dotest binfiles3-3 "${testcvs} -q ci -m add-it" \ "RCS file: ${CVSROOT_DIRNAME}/first-dir/file1,v done @@ -13823,8 +15851,8 @@ initial revision: 1\.1 done" rm file1 dotest binfiles3-4 "${testcvs} rm file1" \ -"${PROG} [a-z]*: scheduling .file1. for removal -${PROG} [a-z]*: use .${PROG} commit. to remove this file permanently" +"${PROG} remove: scheduling .file1. for removal +${PROG} remove: use .${PROG} commit. to remove this file permanently" dotest binfiles3-5 "${testcvs} -q ci -m remove-it" \ "Removing file1; ${CVSROOT_DIRNAME}/first-dir/file1,v <-- file1 @@ -13832,8 +15860,8 @@ new revision: delete; previous revision: 1\.1 done" cp ../binfile.dat file1 dotest binfiles3-6 "${testcvs} add -kb file1" \ -"${PROG} [a-z]*: re-adding file file1 (in place of dead revision 1\.2) -${PROG} [a-z]*: use .${PROG} commit. to add this file permanently" +"${PROG} add: Re-adding file .file1. (in place of dead revision 1\.2)\. +${PROG} add: use .${PROG} commit. to add this file permanently" # The idea behind this test is to make sure that the file # gets opened in binary mode to send to "cvs ci". dotest binfiles3-6a "cat CVS/Entries" \ @@ -13844,7 +15872,7 @@ D" # in checkaddfile()); should also test the case in which # we are changing it from one non-default value to another. dotest binfiles3-7 "${testcvs} -q ci -m readd-it" \ -"${PROG} [a-z]*: changing keyword expansion mode to -kb +"${PROG} commit: changing keyword expansion mode to -kb Checking in file1; ${CVSROOT_DIRNAME}/first-dir/file1,v <-- file1 new revision: 1\.3; previous revision: 1\.2 @@ -13926,11 +15954,11 @@ done" echo "* -m 'COPY'" >.cvswrappers dotest mcopy-1a \ "${testcvs} add .cvswrappers brmod brmod-trmod brmod-wdmod" \ -"${PROG} [a-z]*: scheduling file .\.cvswrappers. for addition -${PROG} [a-z]*: scheduling file .brmod. for addition -${PROG} [a-z]*: scheduling file .brmod-trmod. for addition -${PROG} [a-z]*: scheduling file .brmod-wdmod. for addition -${PROG} [a-z]*: use .${PROG} commit. to add these files permanently" +"${PROG} add: scheduling file .\.cvswrappers. for addition +${PROG} add: scheduling file .brmod. for addition +${PROG} add: scheduling file .brmod-trmod. for addition +${PROG} add: scheduling file .brmod-wdmod. for addition +${PROG} add: use .${PROG} commit. to add these files permanently" dotest mcopy-1b "${testcvs} -q ci -m add" \ "RCS file: ${CVSROOT_DIRNAME}/first-dir/\.cvswrappers,v done @@ -14003,14 +16031,14 @@ done" dotest mcopy-8 "${testcvs} -q update -j br" \ "U brmod -${PROG} [a-z]*: nonmergeable file needs merge -${PROG} [a-z]*: revision 1.1.2.1 from repository is now in brmod-trmod -${PROG} [a-z]*: file from working directory is now in .#brmod-trmod.1.2 +${PROG} update: nonmergeable file needs merge +${PROG} update: revision 1.1.2.1 from repository is now in brmod-trmod +${PROG} update: file from working directory is now in .#brmod-trmod.1.2 C brmod-trmod M brmod-wdmod -${PROG} [a-z]*: nonmergeable file needs merge -${PROG} [a-z]*: revision 1.1.2.1 from repository is now in brmod-wdmod -${PROG} [a-z]*: file from working directory is now in .#brmod-wdmod.1.1 +${PROG} update: nonmergeable file needs merge +${PROG} update: revision 1.1.2.1 from repository is now in brmod-wdmod +${PROG} update: file from working directory is now in .#brmod-wdmod.1.1 C brmod-wdmod" dotest mcopy-9 "cat brmod brmod-trmod brmod-wdmod" \ @@ -14258,11 +16286,11 @@ File: foo\.exe Status: Up-to-date ${CVSROOT_DIRNAME}/CVSROOT/cvswrappers,v <-- cvswrappers new revision: 1\.[0-9]*; previous revision: 1\.[0-9]* done -${PROG} [a-z]*: Rebuilding administrative file database" +${PROG} commit: Rebuilding administrative file database" cd .. # Avoid environmental interference - CVSWRAPPERS_SAVED=${CVSWRAPPERS} + CVSWRAPPERS_save=${CVSWRAPPERS} unset CVSWRAPPERS # Do the import @@ -14285,9 +16313,9 @@ ${PROG} [a-z]*: Rebuilding administrative file database" echo .cvsignore >>.cvsignore touch file1.newbin file1.txt dotest binwrap3-2c "${testcvs} add file1.newbin file1.txt" \ -"${PROG} [a-z]*: scheduling file .file1\.newbin. for addition -${PROG} [a-z]*: scheduling file .file1\.txt. for addition -${PROG} [a-z]*: use .${PROG} commit. to add these files permanently" +"${PROG} add: scheduling file .file1\.newbin. for addition +${PROG} add: scheduling file .file1\.txt. for addition +${PROG} add: use .${PROG} commit. to add these files permanently" dotest binwrap3-2d "${testcvs} -q ci -m add" \ "RCS file: ${CVSROOT_DIRNAME}/binwrap3/sub2/file1\.newbin,v done @@ -14408,7 +16436,7 @@ done" cd .. rm -r wnt rm -rf ${CVSROOT_DIRNAME}/binwrap3 - CVSWRAPPERS=${CVSWRAPPERS_SAVED} + CVSWRAPPERS=${CVSWRAPPERS_save} ;; mwrap) @@ -14441,7 +16469,7 @@ done" ${CVSROOT_DIRNAME}/CVSROOT/cvswrappers,v <-- cvswrappers new revision: 1\.[0-9]*; previous revision: 1\.[0-9]* done -${PROG} [a-z]*: Rebuilding administrative file database" +${PROG} commit: Rebuilding administrative file database" cd .. mkdir m1; cd m1 dotest mwrap-1 "${testcvs} -q co -l ." '' @@ -14451,8 +16479,8 @@ ${PROG} [a-z]*: Rebuilding administrative file database" cd first-dir touch aa dotest mwrap-3 "${testcvs} add aa" \ -"${PROG} [a-z]*: scheduling file .aa. for addition -${PROG} [a-z]*: use .${PROG} commit. to add this file permanently" +"${PROG} add: scheduling file .aa. for addition +${PROG} add: use .${PROG} commit. to add this file permanently" dotest mwrap-4 "${testcvs} -q ci -m add" \ "RCS file: ${CVSROOT_DIRNAME}/first-dir/aa,v done @@ -14478,24 +16506,24 @@ done" # trying to figure out how it interacts with the "C aa" and # other stuff. The whole deal of having both is pretty iffy. dotest mwrap-7 "${testcvs} -nq update" \ -"${PROG} [a-z]*: nonmergeable file needs merge -${PROG} [a-z]*: revision 1\.2 from repository is now in aa -${PROG} [a-z]*: file from working directory is now in \.#aa\.1\.1 +"${PROG} update: nonmergeable file needs merge +${PROG} update: revision 1\.2 from repository is now in aa +${PROG} update: file from working directory is now in \.#aa\.1\.1 C aa U aa" else dotest mwrap-7 "${testcvs} -nq update" \ "U aa -${PROG} [a-z]*: nonmergeable file needs merge -${PROG} [a-z]*: revision 1\.2 from repository is now in aa -${PROG} [a-z]*: file from working directory is now in \.#aa\.1\.1 +${PROG} update: nonmergeable file needs merge +${PROG} update: revision 1\.2 from repository is now in aa +${PROG} update: file from working directory is now in \.#aa\.1\.1 C aa" fi dotest mwrap-8 "${testcvs} -q update" \ "U aa -${PROG} [a-z]*: nonmergeable file needs merge -${PROG} [a-z]*: revision 1\.2 from repository is now in aa -${PROG} [a-z]*: file from working directory is now in \.#aa\.1\.1 +${PROG} update: nonmergeable file needs merge +${PROG} update: revision 1\.2 from repository is now in aa +${PROG} update: file from working directory is now in \.#aa\.1\.1 C aa" dotest mwrap-9 "cat aa" "changed in m2" dotest mwrap-10 "cat .#aa.1.1" "changed in m1" @@ -14507,7 +16535,7 @@ C aa" ${CVSROOT_DIRNAME}/CVSROOT/cvswrappers,v <-- cvswrappers new revision: 1\.[0-9]*; previous revision: 1\.[0-9]* done -${PROG} [a-z]*: Rebuilding administrative file database" +${PROG} commit: Rebuilding administrative file database" cd .. rm -r CVSROOT rm -r m1 m2 @@ -14548,15 +16576,15 @@ ${PROG} [a-z]*: Rebuilding administrative file database" # work to create a loginfo file if you didn't create one # with "cvs init". : dotest info-2 "${testcvs} add loginfo" \ -"${PROG}"' [a-z]*: scheduling file `loginfo'"'"' for addition -'"${PROG}"' [a-z]*: use .'"${PROG}"' commit. to add this file permanently' +"${PROG}"' add: scheduling file `loginfo'"'"' for addition +'"${PROG}"' add: use .'"${PROG}"' commit. to add this file permanently' dotest info-3 "${testcvs} -q ci -m new-loginfo" \ "Checking in loginfo; ${CVSROOT_DIRNAME}/CVSROOT/loginfo,v <-- loginfo new revision: 1\.[0-9]*; previous revision: 1\.[0-9]* done -${PROG} [a-z]*: Rebuilding administrative file database" +${PROG} commit: Rebuilding administrative file database" cd .. mkdir ${CVSROOT_DIRNAME}/first-dir @@ -14564,8 +16592,8 @@ ${PROG} [a-z]*: Rebuilding administrative file database" cd first-dir touch file1 dotest info-6 "${testcvs} add file1" \ -"${PROG}"' [a-z]*: scheduling file `file1'\'' for addition -'"${PROG}"' [a-z]*: use .'"${PROG}"' commit. to add this file permanently' +"${PROG}"' add: scheduling file `file1'\'' for addition +'"${PROG}"' add: use .'"${PROG}"' commit. to add this file permanently' echo "cvs -s OTHER=not-this -s MYENV=env-" >>$HOME/.cvsrc dotest info-6a "${testcvs} -q -s OTHER=value ci -m add-it" \ "RCS file: ${CVSROOT_DIRNAME}/first-dir/file1,v @@ -14574,14 +16602,14 @@ Checking in file1; ${CVSROOT_DIRNAME}/first-dir/file1,v <-- file1 initial revision: 1\.1 done -${PROG} [a-z]*: loginfo:1: no such user variable \${=ZEE}" +${PROG} commit: loginfo:1: no such user variable \${=ZEE}" echo line0 >>file1 dotest info-6b "${testcvs} -q -sOTHER=foo ci -m mod-it" \ "Checking in file1; ${CVSROOT_DIRNAME}/first-dir/file1,v <-- file1 new revision: 1\.2; previous revision: 1\.1 done -${PROG} [a-z]*: loginfo:1: no such user variable \${=ZEE}" +${PROG} commit: loginfo:1: no such user variable \${=ZEE}" echo line1 >>file1 dotest info-7 "${testcvs} -q -s OTHER=value -s ZEE=z ci -m mod-it" \ "Checking in file1; @@ -14590,7 +16618,8 @@ new revision: 1\.3; previous revision: 1\.2 done" cd .. dotest info-9 "cat $TESTDIR/testlog" "xenv-valueyz=${username}=${CVSROOT_DIRNAME}=" - dotest info-10 "cat $TESTDIR/testlog2" 'first-dir file1,NONE,1.1 + dotest info-10 "cat $TESTDIR/testlog2" \ +'first-dir file1,NONE,1.1 first-dir 1.1 first-dir file1 first-dir NONEAX @@ -14613,14 +16642,14 @@ first-dir file1ux' ${CVSROOT_DIRNAME}/CVSROOT/loginfo,v <-- loginfo new revision: 1\.[0-9]*; previous revision: 1\.[0-9]* done -${PROG} [a-z]*: Rebuilding administrative file database" +${PROG} commit: Rebuilding administrative file database" # Now test verifymsg cat >${TESTDIR}/vscript <<EOF #!${TESTSHELL} -if head -1 < \$1 | grep '^BugId:[ ]*[0-9][0-9]*$' > /dev/null; then +if sed 1q < \$1 | grep '^BugId:[ ]*[0-9][0-9]*$' > /dev/null; then exit 0 -elif head -1 < \$1 | grep '^BugId:[ ]*new$' > /dev/null; then +elif sed 1q < \$1 | grep '^BugId:[ ]*new$' > /dev/null; then echo A new bugid was found. >> \$1 exit 0 else @@ -14643,22 +16672,29 @@ else exit 0 fi EOF - chmod +x ${TESTDIR}/vscript* + # Grumble, grumble, mumble, search for "Cygwin". + if test -n "$remotehost"; then + $CVS_RSH $remotehost "chmod +x ${TESTDIR}/vscript*" + else + chmod +x ${TESTDIR}/vscript* + fi echo "^first-dir/yet-another\\(/\\|\$\\) ${TESTDIR}/vscript2" >>verifymsg echo "^first-dir\\(/\\|\$\\) ${TESTDIR}/vscript" >>verifymsg + echo "^missing-script\$ ${TESTDIR}/bogus" >>verifymsg + echo "^missing-var\$ ${TESTDIR}/vscript \${=Bogus}" >>verifymsg # first test the directory independant verifymsg dotest info-v1 "${testcvs} -q ci -m add-verification" \ "Checking in verifymsg; ${CVSROOT_DIRNAME}/CVSROOT/verifymsg,v <-- verifymsg new revision: 1\.[0-9]*; previous revision: 1\.[0-9]* done -${PROG} [a-z]*: Rebuilding administrative file database" +${PROG} commit: Rebuilding administrative file database" cd ../first-dir echo line2 >>file1 dotest_fail info-v2 "${testcvs} -q ci -m bogus" \ "No BugId found\. -${PROG} \[[a-z]* aborted\]: Message verification failed" +${PROG} \[commit aborted\]: Message verification failed" cat >${TESTDIR}/comment.tmp <<EOF BugId: 42 @@ -14678,7 +16714,7 @@ done" dotest_fail info-v4 \ "${testcvs} import -m bogus first-dir/another x y" \ "No BugId found\. -${PROG} \[[a-z]* aborted\]: Message verification failed" +${PROG} \[import aborted\]: Message verification failed" # now verify that directory dependent verifymsgs work dotest info-v5 \ @@ -14706,7 +16742,7 @@ No conflicts created by this import" dotest_fail info-v6r \ "${testcvs} import -m bogus first-dir/yet-another/and-another x y" \ "${CVSROOT_DIRNAME}/first-dir/yet-another/and-another -${PROG} \[[a-z]* aborted\]: Message verification failed" +${PROG} \[import aborted\]: Message verification failed" else dotest info-v6 \ "${testcvs} import -m bogus first-dir/yet-another/and-another x y" \ @@ -14715,6 +16751,21 @@ N first-dir/yet-another/and-another/file2 No conflicts created by this import" fi + + # check that errors invoking the script cause verification failure + # + # The second text below occurs on Cygwin, where I assume execvp + # does not return to let CVS print the error message when its + # argument does not exist. + dotest_fail info-v7 "${testcvs} import -m bogus missing-script x y" \ +"${PROG} import: cannot exec ${TESTDIR}/bogus: No such file or directory +${PROG} \[import aborted\]: Message verification failed" \ +"${PROG} \[import aborted\]: Message verification failed" + + dotest_fail info-v8 "${testcvs} import -m bogus missing-var x y" \ +"${PROG} import: verifymsg:25: no such user variable \${=Bogus} +${PROG} \[import aborted\]: Message verification failed" + rm file2 cd .. rmdir another-dir @@ -14726,7 +16777,7 @@ No conflicts created by this import" ${CVSROOT_DIRNAME}/CVSROOT/config,v <-- config new revision: 1\.[0-9]*; previous revision: 1\.[0-9]* done -${PROG} [a-z]*: Rebuilding administrative file database" +${PROG} commit: Rebuilding administrative file database" cd ../first-dir echo line3 >>file1 cat >${TESTDIR}/comment.tmp <<EOF @@ -14754,7 +16805,7 @@ A new bugid was found. ${CVSROOT_DIRNAME}/CVSROOT/config,v <-- config new revision: 1\.[0-9]*; previous revision: 1\.[0-9]* done -${PROG} [a-z]*: Rebuilding administrative file database" +${PROG} commit: Rebuilding administrative file database" cd ../first-dir echo line4 >>file1 cat >${TESTDIR}/comment.tmp <<EOF @@ -14782,7 +16833,7 @@ A new bugid was found. ${CVSROOT_DIRNAME}/CVSROOT/config,v <-- config new revision: 1\.[0-9]*; previous revision: 1\.[0-9]* done -${PROG} [a-z]*: Rebuilding administrative file database" +${PROG} commit: Rebuilding administrative file database" cd ../first-dir echo line5 >>file1 cat >${TESTDIR}/comment.tmp <<EOF @@ -14799,12 +16850,12 @@ done" BugId: new See what happens next. =============================================================================" - cd .. - cd CVSROOT - echo '# do nothing' >verifymsg + cd ../CVSROOT + echo 'DEFAULT false' >verifymsg + echo 'DEFAULT true' >>verifymsg echo '# defaults' >config - dotest info-cleanup-verifymsg "${testcvs} -q ci -m nuke-verifymsg" \ + dotest info-multdef "${testcvs} -q ci -m multdef" \ "Checking in config; ${CVSROOT_DIRNAME}/CVSROOT/config,v <-- config new revision: 1\.[0-9]*; previous revision: 1\.[0-9]* @@ -14813,7 +16864,17 @@ Checking in verifymsg; ${CVSROOT_DIRNAME}/CVSROOT/verifymsg,v <-- verifymsg new revision: 1\.[0-9]*; previous revision: 1\.[0-9]* done -${PROG} [a-z]*: Rebuilding administrative file database" +${PROG} commit: Rebuilding administrative file database" + + cd ../CVSROOT + echo '# do nothing' >verifymsg + dotest info-cleanup-verifymsg "${testcvs} -q ci -m nuke-verifymsg" \ +"${PROG} commit: Multiple .DEFAULT. lines (1 and 2) in verifymsg file +Checking in verifymsg; +${CVSROOT_DIRNAME}/CVSROOT/verifymsg,v <-- verifymsg +new revision: 1\.[0-9]*; previous revision: 1\.[0-9]* +done +${PROG} commit: Rebuilding administrative file database" rm ${TESTDIR}/vscript* cd .. @@ -14855,14 +16916,19 @@ else exit 0 fi EOF - chmod +x ${TESTDIR}/1/loggit + # #^@&!^@ Cygwin. + if test -n "$remotehost"; then + $CVS_RSH $remotehost "chmod +x ${TESTDIR}/1/loggit" + else + chmod +x ${TESTDIR}/1/loggit + fi echo "ALL ${TESTDIR}/1/loggit" >taginfo dotest taginfo-2 "${testcvs} -q ci -m check-in-taginfo" \ "Checking in taginfo; ${CVSROOT_DIRNAME}/CVSROOT/taginfo,v <-- taginfo new revision: 1\.2; previous revision: 1\.1 done -${PROG} [a-z]*: Rebuilding administrative file database" +${PROG} commit: Rebuilding administrative file database" cd .. # taginfo-3 used to rely on the top-level CVS directory @@ -14875,8 +16941,8 @@ ${PROG} [a-z]*: Rebuilding administrative file database" cd first-dir echo first >file1 dotest taginfo-4 "${testcvs} add file1" \ -"${PROG} [a-z]*: scheduling file .file1. for addition -${PROG} [a-z]*: use .${PROG} commit. to add this file permanently" +"${PROG} add: scheduling file .file1. for addition +${PROG} add: use .${PROG} commit. to add this file permanently" dotest taginfo-5 "${testcvs} -q ci -m add-it" \ "RCS file: ${CVSROOT_DIRNAME}/first-dir/file1,v done @@ -14896,8 +16962,8 @@ done" dotest taginfo-10 "${testcvs} -q tag -F -c brtag" "T file1" dotest_fail taginfo-11 "${testcvs} -q tag rejectme" \ -"${PROG} [a-z]*: Pre-tag check failed -${PROG} \[[a-z]* aborted\]: correct the above errors first!" +"${PROG} tag: Pre-tag check failed +${PROG} \[tag aborted\]: correct the above errors first!" # When we are using taginfo to allow/disallow, it would be # convenient to be able to use "cvs -n tag" to test whether @@ -14948,7 +17014,7 @@ tag1 del ${CVSROOT_DIRNAME}/first-dir" ${CVSROOT_DIRNAME}/CVSROOT/taginfo,v <-- taginfo new revision: 1\.3; previous revision: 1\.2 done -${PROG} [a-z]*: Rebuilding administrative file database" +${PROG} commit: Rebuilding administrative file database" cd .. cd .. rm -r 1 @@ -14974,7 +17040,7 @@ ${PROG} [a-z]*: Rebuilding administrative file database" ${CVSROOT_DIRNAME}/CVSROOT/config,v <-- config new revision: 1\.[0-9]*; previous revision: 1\.[0-9]* done -${PROG} [a-z]*: Rebuilding administrative file database" +${PROG} commit: Rebuilding administrative file database" echo 'BogusOption=yes' >config dotest config-4 "${testcvs} -q ci -m change-to-bogus-opt" \ "${PROG} [a-z]*: syntax error in ${CVSROOT_DIRNAME}/CVSROOT/config: line 'bogus line' is missing '=' @@ -14982,7 +17048,7 @@ Checking in config; ${CVSROOT_DIRNAME}/CVSROOT/config,v <-- config new revision: 1\.[0-9]*; previous revision: 1\.[0-9]* done -${PROG} [a-z]*: Rebuilding administrative file database" +${PROG} commit: Rebuilding administrative file database" echo '# No config is a good config' > config dotest config-5 "${testcvs} -q ci -m change-to-comment" \ "${PROG} [a-z]*: ${CVSROOT_DIRNAME}/CVSROOT/config: unrecognized keyword 'BogusOption' @@ -14990,7 +17056,7 @@ Checking in config; ${CVSROOT_DIRNAME}/CVSROOT/config,v <-- config new revision: 1\.[0-9]*; previous revision: 1\.[0-9]* done -${PROG} [a-z]*: Rebuilding administrative file database" +${PROG} commit: Rebuilding administrative file database" dotest config-6 "${testcvs} -q update" '' cd .. @@ -15015,8 +17081,8 @@ ${PROG} [a-z]*: Rebuilding administrative file database" echo '$''Name$' > file1 echo '1' >> file1 dotest serverpatch-2 "${testcvs} add file1" \ -"${PROG}"' [a-z]*: scheduling file `file1'\'' for addition -'"${PROG}"' [a-z]*: use .'"${PROG}"' commit. to add this file permanently' +"${PROG}"' add: scheduling file `file1'\'' for addition +'"${PROG}"' add: use .'"${PROG}"' commit. to add this file permanently' dotest serverpatch-3 "${testcvs} -q commit -m add" \ "RCS file: ${CVSROOT_DIRNAME}/first-dir/file1,v @@ -15054,10 +17120,11 @@ done" cd ../../2/first-dir dotest serverpatch-8 "${testcvs} -q update" \ 'U file1' \ -'P file1 -'"${PROG}"' [a-z]*: checksum failure after patch to ./file1; will refetch -'"${PROG}"' [a-z]*: refetching unpatchable files -U file1' +"P file1 +${PROG} update: checksum failure after patch to \./file1; will refetch +${PROG} client: refetching unpatchable files +${PROG} update: warning: file1 was lost +U file1" cd ../.. rm -r 1 2 @@ -15086,9 +17153,9 @@ U file1' echo 'first revision' > file1 echo 'first revision' > file2 dotest log-2 "${testcvs} add file1 file2" \ -"${PROG} [a-z]*: scheduling file .file1. for addition -${PROG} [a-z]*: scheduling file .file2. for addition -${PROG} [a-z]*: use .${PROG} commit. to add these files permanently" +"${PROG} add: scheduling file .file1. for addition +${PROG} add: scheduling file .file2. for addition +${PROG} add: use .${PROG} commit. to add these files permanently" # While we're at it, check multi-line comments, input from file, # and trailing whitespace trimming @@ -15143,7 +17210,7 @@ done" dotest log-7 "${testcvs} -q update -r branch" \ "[UP] file1 -${PROG} [a-z]*: file2 is no longer in the repository" +${PROG} update: file2 is no longer in the repository" echo 'first branch revision' > file1 dotest log-8 "${testcvs} -q ci -m1b file1" \ @@ -15264,7 +17331,7 @@ ${log_trailer}" # In the error message, HEAD is a file name, not a tag name (which # might be confusing itself). dotest_fail log-14b "${testcvs} log -r HEAD file1" \ -"${PROG} [a-z]*: nothing known about HEAD +"${PROG} log: nothing known about HEAD ${log_header1} ${log_tags1} ${log_keyword} @@ -15495,7 +17562,7 @@ ${log_rev3} ${log_trailer}" dotest_fail log-r14b "${testcvs} rlog -r HEAD first-dir/file1" \ -"${PROG} [a-z]*: cannot find module .HEAD. - ignored +"${PROG} rlog: cannot find module .HEAD. - ignored ${rlog_header1} ${log_tags1} ${log_keyword} @@ -15667,7 +17734,7 @@ ${log_trailer}" "[UP] file1 U file2" dotest log-d1 "${testcvs} -q rm -f file1" \ -"${PROG} [a-z]*: use .${PROG} commit. to remove this file permanently" +"${PROG} remove: use .${PROG} commit. to remove this file permanently" dotest log-d2 "${testcvs} -q ci -m4" \ "Removing file1; ${CVSROOT_DIRNAME}/first-dir/file1,v <-- file1 @@ -15737,7 +17804,7 @@ description: ${log_rev2b} ${log_rev1b} ${log_trailer} -${PROG} [a-z]*: warning: no revision .branch. in .${CVSROOT_DIRNAME}/first-dir/file2,v. +${PROG} log: warning: no revision .branch. in .${CVSROOT_DIRNAME}/first-dir/file2,v. ${log_header2} ${log_tags2} ${log_keyword} @@ -15751,7 +17818,7 @@ ${log_keyword} total revisions: 6 description: ${log_trailer} -${PROG} [a-z]*: warning: no revision .branch. in .${CVSROOT_DIRNAME}/first-dir/file2,v. +${PROG} log: warning: no revision .branch. in .${CVSROOT_DIRNAME}/first-dir/file2,v. ${log_header2} ${log_tags2} ${log_keyword} @@ -15765,14 +17832,14 @@ ${log_keyword} total revisions: 6; selected revisions: 2 description: ${log_trailer} -${PROG} [a-z]*: warning: no revision .branch. in .${CVSROOT_DIRNAME}/first-dir/file2,v." +${PROG} log: warning: no revision .branch. in .${CVSROOT_DIRNAME}/first-dir/file2,v." dotest log-d4c "${testcvs} -q log -h -rbranch" \ "${log_header1} ${log_tags1} ${log_keyword} total revisions: 6 ${log_trailer} -${PROG} [a-z]*: warning: no revision .branch. in .${CVSROOT_DIRNAME}/first-dir/file2,v. +${PROG} log: warning: no revision .branch. in .${CVSROOT_DIRNAME}/first-dir/file2,v. ${log_header2} ${log_tags2} ${log_keyword} @@ -15784,13 +17851,13 @@ ${log_tags1} ${log_keyword} total revisions: 6; selected revisions: 2 ${log_trailer} -${PROG} [a-z]*: warning: no revision .branch. in .${CVSROOT_DIRNAME}/first-dir/file2,v." +${PROG} log: warning: no revision .branch. in .${CVSROOT_DIRNAME}/first-dir/file2,v." dotest log-d4e "${testcvs} -q log -R -rbranch" \ "${CVSROOT_DIRNAME}/first-dir/Attic/file1,v ${CVSROOT_DIRNAME}/first-dir/file2,v" dotest log-d4f "${testcvs} -q log -R -S -rbranch" \ "${CVSROOT_DIRNAME}/first-dir/Attic/file1,v -${PROG} [a-z]*: warning: no revision .branch. in .${CVSROOT_DIRNAME}/first-dir/file2,v." +${PROG} log: warning: no revision .branch. in .${CVSROOT_DIRNAME}/first-dir/file2,v." dotest log-rd4 "${testcvs} -q rlog -rbranch first-dir" \ "${rlog_header1} ${log_tags1} @@ -15800,7 +17867,7 @@ description: ${log_rev2b} ${log_rev1b} ${log_trailer} -${PROG} [a-z]*: warning: no revision .branch. in .${CVSROOT_DIRNAME}/first-dir/file2,v. +${PROG} rlog: warning: no revision .branch. in .${CVSROOT_DIRNAME}/first-dir/file2,v. ${rlog_header2} ${log_tags2} ${log_keyword} @@ -15814,7 +17881,7 @@ ${log_keyword} total revisions: 6 description: ${log_trailer} -${PROG} [a-z]*: warning: no revision .branch. in .${CVSROOT_DIRNAME}/first-dir/file2,v. +${PROG} rlog: warning: no revision .branch. in .${CVSROOT_DIRNAME}/first-dir/file2,v. ${rlog_header2} ${log_tags2} ${log_keyword} @@ -15828,14 +17895,14 @@ ${log_keyword} total revisions: 6; selected revisions: 2 description: ${log_trailer} -${PROG} [a-z]*: warning: no revision .branch. in .${CVSROOT_DIRNAME}/first-dir/file2,v." +${PROG} rlog: warning: no revision .branch. in .${CVSROOT_DIRNAME}/first-dir/file2,v." dotest log-rd4c "${testcvs} -q rlog -h -rbranch first-dir" \ "${rlog_header1} ${log_tags1} ${log_keyword} total revisions: 6 ${log_trailer} -${PROG} [a-z]*: warning: no revision .branch. in .${CVSROOT_DIRNAME}/first-dir/file2,v. +${PROG} rlog: warning: no revision .branch. in .${CVSROOT_DIRNAME}/first-dir/file2,v. ${rlog_header2} ${log_tags2} ${log_keyword} @@ -15847,13 +17914,13 @@ ${log_tags1} ${log_keyword} total revisions: 6; selected revisions: 2 ${log_trailer} -${PROG} [a-z]*: warning: no revision .branch. in .${CVSROOT_DIRNAME}/first-dir/file2,v." +${PROG} rlog: warning: no revision .branch. in .${CVSROOT_DIRNAME}/first-dir/file2,v." dotest log-rd4e "${testcvs} -q rlog -R -rbranch first-dir" \ "${CVSROOT_DIRNAME}/first-dir/Attic/file1,v ${CVSROOT_DIRNAME}/first-dir/file2,v" dotest log-rd4f "${testcvs} -q rlog -R -S -rbranch first-dir" \ "${CVSROOT_DIRNAME}/first-dir/Attic/file1,v -${PROG} [a-z]*: warning: no revision .branch. in .${CVSROOT_DIRNAME}/first-dir/file2,v." +${PROG} rlog: warning: no revision .branch. in .${CVSROOT_DIRNAME}/first-dir/file2,v." dotest log-d5 "${testcvs} log -r1.2.2.1:1.2.2.2 file1" \ "${log_header1} ${log_tags1} @@ -15921,8 +17988,8 @@ ${log_rev3} ${log_rev2} ${log_trailer}" dotest log-d8 "${testcvs} -q log -rtag1:tag2" \ -"${PROG} [a-z]*: warning: no revision .tag1. in .${CVSROOT_DIRNAME}/first-dir/Attic/file1,v. -${PROG} [a-z]*: warning: no revision .tag2. in .${CVSROOT_DIRNAME}/first-dir/Attic/file1,v. +"${PROG} log: warning: no revision .tag1. in .${CVSROOT_DIRNAME}/first-dir/Attic/file1,v. +${PROG} log: warning: no revision .tag2. in .${CVSROOT_DIRNAME}/first-dir/Attic/file1,v. ${log_header1} ${log_tags1} ${log_keyword} @@ -15938,8 +18005,8 @@ ${log_rev3} ${log_rev22} ${log_trailer}" dotest log-d8a "${testcvs} -q log -rtag1:tag2 -S" \ -"${PROG} [a-z]*: warning: no revision .tag1. in .${CVSROOT_DIRNAME}/first-dir/Attic/file1,v. -${PROG} [a-z]*: warning: no revision .tag2. in .${CVSROOT_DIRNAME}/first-dir/Attic/file1,v. +"${PROG} log: warning: no revision .tag1. in .${CVSROOT_DIRNAME}/first-dir/Attic/file1,v. +${PROG} log: warning: no revision .tag2. in .${CVSROOT_DIRNAME}/first-dir/Attic/file1,v. ${log_header2} ${log_tags2} ${log_keyword} @@ -15949,8 +18016,8 @@ ${log_rev3} ${log_rev22} ${log_trailer}" dotest log-rd8 "${testcvs} -q rlog -rtag1:tag2 first-dir" \ -"${PROG} [a-z]*: warning: no revision .tag1. in .${CVSROOT_DIRNAME}/first-dir/Attic/file1,v. -${PROG} [a-z]*: warning: no revision .tag2. in .${CVSROOT_DIRNAME}/first-dir/Attic/file1,v. +"${PROG} rlog: warning: no revision .tag1. in .${CVSROOT_DIRNAME}/first-dir/Attic/file1,v. +${PROG} rlog: warning: no revision .tag2. in .${CVSROOT_DIRNAME}/first-dir/Attic/file1,v. ${rlog_header1} ${log_tags1} ${log_keyword} @@ -15966,8 +18033,8 @@ ${log_rev3} ${log_rev22} ${log_trailer}" dotest log-rd8a "${testcvs} -q rlog -rtag1:tag2 -S first-dir" \ -"${PROG} [a-z]*: warning: no revision .tag1. in .${CVSROOT_DIRNAME}/first-dir/Attic/file1,v. -${PROG} [a-z]*: warning: no revision .tag2. in .${CVSROOT_DIRNAME}/first-dir/Attic/file1,v. +"${PROG} rlog: warning: no revision .tag1. in .${CVSROOT_DIRNAME}/first-dir/Attic/file1,v. +${PROG} rlog: warning: no revision .tag2. in .${CVSROOT_DIRNAME}/first-dir/Attic/file1,v. ${rlog_header2} ${log_tags2} ${log_keyword} @@ -15979,7 +18046,7 @@ ${log_trailer}" dotest log-d99 "${testcvs} -q up -rbranch" \ "[UP] file1 -${PROG} [a-z]*: file2 is no longer in the repository" +${PROG} update: file2 is no longer in the repository" # Now test outdating revisions @@ -16034,8 +18101,8 @@ ${log_trailer}" cd first-dir echo 'first revision' > file1 dotest log2-2 "${testcvs} add -m file1-is-for-testing file1" \ -"${PROG}"' [a-z]*: scheduling file `file1'\'' for addition -'"${PROG}"' [a-z]*: use .'"${PROG}"' commit. to add this file permanently' +"${PROG}"' add: scheduling file `file1'\'' for addition +'"${PROG}"' add: use .'"${PROG}"' commit. to add this file permanently' dotest log2-3 "${testcvs} -q commit -m 1" \ "RCS file: ${CVSROOT_DIRNAME}/first-dir/file1,v done @@ -16151,8 +18218,8 @@ date: [0-9/]* [0-9:]*; author: ${username}; state: Exp; cd first-dir echo hi >file1 dotest logopt-3 "${testcvs} add file1" \ -"${PROG} [a-z]*: scheduling file .file1. for addition -${PROG} [a-z]*: use .${PROG} commit. to add this file permanently" +"${PROG} add: scheduling file .file1. for addition +${PROG} add: use .${PROG} commit. to add this file permanently" dotest logopt-4 "${testcvs} -q ci -m add file1" \ "RCS file: ${CVSROOT_DIRNAME}/first-dir/file1,v done @@ -16163,20 +18230,20 @@ done" cd .. dotest logopt-5 "${testcvs} log -R -d 2038-01-01" \ -"${PROG} [a-z]*: Logging \. -${PROG} [a-z]*: Logging first-dir +"${PROG} log: Logging \. +${PROG} log: Logging first-dir ${CVSROOT_DIRNAME}/first-dir/file1,v" dotest logopt-6 "${testcvs} log -d 2038-01-01 -R" \ -"${PROG} [a-z]*: Logging \. -${PROG} [a-z]*: Logging first-dir +"${PROG} log: Logging \. +${PROG} log: Logging first-dir ${CVSROOT_DIRNAME}/first-dir/file1,v" dotest logopt-6a "${testcvs} log -Rd 2038-01-01" \ -"${PROG} [a-z]*: Logging \. -${PROG} [a-z]*: Logging first-dir +"${PROG} log: Logging \. +${PROG} log: Logging first-dir ${CVSROOT_DIRNAME}/first-dir/file1,v" dotest logopt-7 "${testcvs} log -s Exp -R" \ -"${PROG} [a-z]*: Logging \. -${PROG} [a-z]*: Logging first-dir +"${PROG} log: Logging \. +${PROG} log: Logging first-dir ${CVSROOT_DIRNAME}/first-dir/file1,v" cd .. @@ -16203,8 +18270,8 @@ ancestral file EOF dotest ann-3 "${testcvs} add file1" \ -"${PROG} [a-z]*: scheduling file .file1. for addition -${PROG} [a-z]*: use .${PROG} commit. to add this file permanently" +"${PROG} add: scheduling file .file1. for addition +${PROG} add: use .${PROG} commit. to add this file permanently" dotest ann-4 "${testcvs} -q ci -m add file1" \ "RCS file: ${CVSROOT_DIRNAME}/first-dir/file1,v done @@ -16314,7 +18381,7 @@ Annotations for file1 1\.2\.2\.1 (${username} *[0-9a-zA-Z-]*): and some 1\.2\.2\.1 (${username} *[0-9a-zA-Z-]*): branched content" dotest_fail ann-14 "${testcvs} ann -r bill-clintons-chastity file1" \ -"${PROG} \[[a-z]* aborted\]: no such tag bill-clintons-chastity" +"${PROG} \[annotate aborted\]: no such tag bill-clintons-chastity" # Now get rid of the working directory and test rannotate @@ -16365,7 +18432,7 @@ Annotations for first-dir/file1 1\.2\.2\.1 (${username} *[0-9a-zA-Z-]*): and some 1\.2\.2\.1 (${username} *[0-9a-zA-Z-]*): branched content" dotest_fail ann-r14 "${testcvs} rann -r bill-clintons-chastity first-dir/file1" \ -"${PROG} \[[a-z]* aborted\]: no such tag bill-clintons-chastity" +"${PROG} \[rannotate aborted\]: no such tag bill-clintons-chastity" rm -rf ${CVSROOT_DIRNAME}/first-dir ;; @@ -16387,8 +18454,8 @@ Annotations for first-dir/file1 echo '$Id''$' > $file dotest ann-id-3 "$testcvs add $file" \ -"${PROG} [a-z]*: scheduling file .$file. for addition -${PROG} [a-z]*: use .${PROG} commit. to add this file permanently" +"${PROG} add: scheduling file .$file. for addition +${PROG} add: use .${PROG} commit. to add this file permanently" dotest ann-id-4 "$testcvs -Q ci -m . $file" \ "RCS file: ${CVSROOT_DIRNAME}/$module/$file,v done @@ -16422,6 +18489,8 @@ Annotations for $file # Various tests relating to creating repositories, operating # on repositories created with old versions of CVS, etc. + CVS_SERVER_save=$CVS_SERVER + # Because this test is all about -d options and such, it # at least to some extent needs to be different for remote vs. # local. @@ -16444,13 +18513,28 @@ Annotations for $file # with our own CVS_RSH rather than worrying about a system one # would do the trick. + # Make sure server ignores real ${HOME}/.cvsrc: + cat >$TESTDIR/cvs-setHome <<EOF +#!/bin/sh +HOME=$HOME +export HOME +exec $CVS_SERVER_save "\$@" +EOF + chmod a+x $TESTDIR/cvs-setHome + # Note that we set CVS_SERVER at the beginning. - CREREPOS_ROOT=:ext:`hostname`:${TESTDIR}/crerepos + CVS_SERVER=$TESTDIR/cvs-setHome; export CVS_SERVER + + if test -n "$remotehost"; then + CREREPOS_ROOT=:ext:$remotehost${TESTDIR}/crerepos + else + CREREPOS_ROOT=:ext:`hostname`:${TESTDIR}/crerepos + fi # If we're going to do remote testing, make sure 'rsh' works first. host="`hostname`" - if test "x`${CVS_RSH-rsh} $host -n 'echo hi'`" != "xhi"; then - echo "ERROR: cannot test remote CVS, because \`${CVS_RSH-rsh} $host' fails." >&2 + if test "x`${CVS_RSH} $host -n 'echo hi'`" != "xhi"; then + echo "ERROR: cannot test remote CVS, because \`${CVS_RSH} $host' fails." >&2 exit 1 fi @@ -16459,26 +18543,26 @@ Annotations for $file # First, if the repository doesn't exist at all... dotest_fail crerepos-1 \ "${testcvs} -d ${TESTDIR}/crerepos co cvs-sanity" \ -"${PROG} \[[a-z]* aborted\]: ${TESTDIR}/crerepos/CVSROOT: .*" +"${PROG} \[checkout aborted\]: ${TESTDIR}/crerepos/CVSROOT: .*" mkdir crerepos # The repository exists but CVSROOT doesn't. dotest_fail crerepos-2 \ "${testcvs} -d ${TESTDIR}/crerepos co cvs-sanity" \ -"${PROG} \[[a-z]* aborted\]: ${TESTDIR}/crerepos/CVSROOT: .*" +"${PROG} \[checkout aborted\]: ${TESTDIR}/crerepos/CVSROOT: .*" mkdir crerepos/CVSROOT # Checkout of nonexistent module dotest_fail crerepos-3 \ "${testcvs} -d ${TESTDIR}/crerepos co cvs-sanity" \ -"${PROG} [a-z]*: cannot find module .cvs-sanity. - ignored" +"${PROG} checkout: cannot find module .cvs-sanity. - ignored" # Now test that CVS works correctly without a modules file # or any of that other stuff. In particular, it *must* # function if administrative files added to CVS recently (since # CVS 1.3) do not exist, because the repository might have # been created with an old version of CVS. - mkdir tmp; cd tmp + mkdir 1; cd 1 dotest crerepos-4 \ "${testcvs} -q -d ${TESTDIR}/crerepos co CVSROOT" \ '' @@ -16490,8 +18574,8 @@ ${testcvs} -d ${TESTDIR}/crerepos release -d CVSROOT >>${LOGFILE}; then fi rm -rf CVS cd .. - # The directory tmp should be empty - dotest crerepos-6 "rmdir tmp" '' + # The directory 1 should be empty + dotest crerepos-6 "rmdir 1" CREREPOS_ROOT=${TESTDIR}/crerepos @@ -16531,16 +18615,16 @@ ${PROG} \[[a-z]* aborted\]: Bad CVSROOT: .:ext:${hostname}:crerepos.\." # key or somesuch. Which error message we get depends on whether # false finishes running before we try to talk to it or not. dotest_fail crerepos-6a "CVS_RSH=false ${testcvs} -q -d ../crerepos get ." \ -"$PROG \[[a-z]* aborted\]: end of file from server (consult above messages if any)" \ -"$PROG \[[a-z]* aborted\]: received broken pipe signal" +"${PROG} \[checkout aborted\]: end of file from server (consult above messages if any)" \ +"${PROG} \[checkout aborted\]: received broken pipe signal" cd .. rm -r 1 mkdir 1; cd 1 dotest_fail crerepos-6b "${testcvs} -d crerepos init" \ -"${PROG} [a-z]*: CVSROOT must be an absolute pathname (not .crerepos.) -${PROG} [a-z]*: when using local access method\. -${PROG} \[[a-z]* aborted\]: Bad CVSROOT: .crerepos.\." +"${PROG} init: CVSROOT must be an absolute pathname (not .crerepos.) +${PROG} init: when using local access method\. +${PROG} \[init aborted\]: Bad CVSROOT: .crerepos.\." cd .. rm -r 1 fi # end of tests to be skipped for remote @@ -16561,8 +18645,8 @@ ${PROG} \[[a-z]* aborted\]: Bad CVSROOT: .crerepos.\." cd first-dir touch file1 dotest crerepos-10 "${testcvs} add file1" \ -"${PROG} [a-z]*: scheduling file .file1. for addition -${PROG} [a-z]*: use .${PROG} commit. to add this file permanently" +"${PROG} add: scheduling file .file1. for addition +${PROG} add: use .${PROG} commit. to add this file permanently" dotest crerepos-11 "${testcvs} -q ci -m add-it" \ "RCS file: ${CVSROOT_DIRNAME}/first-dir/file1,v done @@ -16581,8 +18665,8 @@ done" cd crerepos-dir touch cfile dotest crerepos-14 "${testcvs} add cfile" \ -"${PROG} [a-z]*: scheduling file .cfile. for addition -${PROG} [a-z]*: use .${PROG} commit. to add this file permanently" +"${PROG} add: scheduling file .cfile. for addition +${PROG} add: use .${PROG} commit. to add this file permanently" dotest crerepos-15 "${testcvs} -q ci -m add-it" \ "RCS file: ${TESTDIR}/crerepos/crerepos-dir/cfile,v done @@ -16595,26 +18679,31 @@ done" mkdir 1; cd 1 dotest crerepos-16 "${testcvs} co first-dir" \ -"${PROG} [a-z]*: Updating first-dir +"${PROG} checkout: Updating first-dir U first-dir/file1" dotest crerepos-17 "${testcvs} -d ${CREREPOS_ROOT} co crerepos-dir" \ -"${PROG} [a-z]*: Updating crerepos-dir +"${PROG} checkout: Updating crerepos-dir U crerepos-dir/cfile" dotest crerepos-18 "${testcvs} update" \ -"${PROG} [a-z]*: Updating first-dir -${PROG} [a-z]*: Updating crerepos-dir" +"${PROG} update: Updating first-dir +${PROG} update: Updating crerepos-dir" cd .. + CVS_SERVER=$CVS_SERVER_save; export CVS_SERVER + if $keep; then echo Keeping ${TESTDIR} and exiting due to --keep exit 0 fi + rm -f $TESTDIR/cvs-setHome rm -r 1 rm -rf ${CVSROOT_DIRNAME}/first-dir ${TESTDIR}/crerepos ;; + + rcs) # Test ability to import an RCS file. Note that this format # is fixed--files written by RCS5, and other software which @@ -17200,14 +19289,14 @@ EOF # question one way or the other (it has a grammar but almost # nothing about lexical analysis). dotest_fail rcs3-1 "${testcvs} -q co first-dir" \ -"${PROG} \[[a-z]* aborted\]: EOF while looking for value in RCS file ${CVSROOT_DIRNAME}/first-dir/file1,v" +"${PROG} \[checkout aborted\]: EOF while looking for value in RCS file ${CVSROOT_DIRNAME}/first-dir/file1,v" cat <<EOF >${CVSROOT_DIRNAME}/first-dir/file1,v head 1.1; access; symbols; locks; expand o; 1.1 date 2007.03.20.04.03.02 ; author jeremiah ;state ; branches; next;desc @@1.1log@@text@head@ EOF # Whitespace issues, likewise. dotest_fail rcs3-2 "${testcvs} -q co first-dir" \ -"${PROG} \[[a-z]* aborted\]: unexpected '.x6c' reading revision number in RCS file ${CVSROOT_DIRNAME}/first-dir/file1,v" +"${PROG} \[checkout aborted\]: unexpected '.x6c' reading revision number in RCS file ${CVSROOT_DIRNAME}/first-dir/file1,v" cat <<EOF >${CVSROOT_DIRNAME}/first-dir/file1,v head 1.1; access; symbols; locks; expand o; 1.1 date 2007.03.20.04.03.02 ; author jeremiah ;state ; branches; next;desc @@1.1 log@@text@head@ @@ -17215,7 +19304,7 @@ EOF # Charming array of different messages for similar # whitespace issues (depending on where the whitespace is). dotest_fail rcs3-3 "${testcvs} -q co first-dir" \ -"${PROG} \[[a-z]* aborted\]: EOF while looking for value in RCS file ${CVSROOT_DIRNAME}/first-dir/file1,v" +"${PROG} \[checkout aborted\]: EOF while looking for value in RCS file ${CVSROOT_DIRNAME}/first-dir/file1,v" cat <<EOF >${CVSROOT_DIRNAME}/first-dir/file1,v head 1.1; access; symbols; locks; expand o; 1.1 date 2007.03.20.04.03.02 ; author jeremiah ;state ; branches; next;desc @@1.1 log @@text @head@ @@ -17240,13 +19329,102 @@ EOF ${AWK} </dev/null 'BEGIN { printf "@%c", 10 }' | ${TR} '@' '\000' \ >>${CVSROOT_DIRNAME}/first-dir/file1,v dotest_fail rcs3-7 "${testcvs} log -s nostate file1" \ -"${PROG} \[[a-z]* aborted\]: unexpected '.x0' reading revision number in RCS file ${CVSROOT_DIRNAME}/first-dir/file1,v" +"${PROG} \[log aborted\]: unexpected '.x0' reading revision number in RCS file ${CVSROOT_DIRNAME}/first-dir/file1,v" cd ../.. rm -r 1 rm -rf ${CVSROOT_DIRNAME}/first-dir ;; + rcs4) + # Fix a bug that shows up when checking out files by date with the + # "-D date" command line option. There is code in the original to + # handle a special case. If the date search finds revision 1.1 it + # is supposed to check whether revision 1.1.1.1 has the same date + # stamp, which would indicate that the file was originally brought + # in with "cvs import". In that case it is supposed to return the + # vendor branch version 1.1.1.1. + # + # However, there is a bug in the code. It actually compares + # the date of revision 1.1 for equality with the date given + # on the command line -- clearly wrong. This commit fixes + # the coding bug. + # + # There is an additional bug which is _not_ fixed yet. + # The date comparison should not be a strict + # equality test. It should allow a fudge factor of, say, 2-3 + # seconds. Old versions of CVS created the two revisions + # with two separate invocations of the RCS "ci" command. We + # have many old files in the tree in which the dates of + # revisions 1.1 and 1.1.1.1 differ by 1 second. + + mkdir rcs4 + cd rcs4 + + mkdir imp-dir + cd imp-dir + echo 'OpenMunger sources' >file1 + + # choose a time in the past to demonstrate the problem + TZ=GMT touch -t 200012010123 file1 + + dotest_sort rcs4-1 \ +"${testcvs} import -d -m add rcs4-dir openmunger openmunger-1_0" \ +' + +N rcs4-dir/file1 +No conflicts created by this import' + echo 'OpenMunger sources release 1.1 extras' >>file1 + TZ=GMT touch -t 200112011234 file1 + dotest_sort rcs4-2 \ +"${testcvs} import -d -m add rcs4-dir openmunger openmunger-1_1" \ +' + +No conflicts created by this import +U rcs4-dir/file1' + cd .. + # Next checkout the new module + dotest rcs4-3 \ +"${testcvs} -q co rcs4-dir" \ +'U rcs4-dir/file1' + cd rcs4-dir + echo 'local change' >> file1 + + # commit a local change + dotest rcs4-4 \ +"${testcvs} -q commit -m hack file1" \ +"Checking in file1; +${CVSROOT_DIRNAME}/rcs4-dir/file1,v <-- file1 +new revision: 1\.2; previous revision: 1\.1 +done" + # now see if we get version 1.1 or 1.1.1.1 when we ask for + # a checkout by time... it really should be 1.1.1.1 as + # that was indeed the version that was visible at the target + # time. + dotest rcs4-5 \ +"${testcvs} -q update -D 'October 1, 2001 UTC' file1" \ +'[UP] file1' + dotest rcs4-6 \ +"${testcvs} -q status file1" \ +'=================================================================== +File: file1 Status: Up-to-date + + Working revision: 1\.1\.1\.1.* + Repository revision: 1\.1\.1\.1 '${CVSROOT_DIRNAME}'/rcs4-dir/file1,v + Sticky Tag: (none) + Sticky Date: 2001\.10\.01\.00\.00\.00 + Sticky Options: (none)' + + if $keep; then + echo Keeping ${TESTDIR} and exiting due to --keep + exit 0 + fi + + cd ../.. + rm -r rcs4 + rm -rf ${CVSROOT_DIRNAME}/rcs4-dir + ;; + lockfiles) # Tests of CVS lock files. # TODO-maybe: Add a test where we arrange for a loginfo @@ -17272,15 +19450,20 @@ EOF ${CVSROOT_DIRNAME}/CVSROOT/config,v <-- config new revision: 1\.[0-9]*; previous revision: 1\.[0-9]* done -${PROG} [a-z]*: Rebuilding administrative file database" +${PROG} commit: Rebuilding administrative file database" cd ../first-dir/sdir/ssdir # The error message appears twice because Lock_Cleanup only # stops recursing after the first attempt. dotest_fail lockfiles-5 "${testcvs} -q update" \ -"${PROG} \[[a-z]* aborted\]: cannot stat ${TESTDIR}/locks: No such file or directory -${PROG} \[[a-z]* aborted\]: cannot stat ${TESTDIR}/locks: No such file or directory" +"${PROG} \[update aborted\]: cannot stat ${TESTDIR}/locks: No such file or directory +${PROG} \[update aborted\]: cannot stat ${TESTDIR}/locks: No such file or directory" mkdir ${TESTDIR}/locks - chmod u=rwx,g=r,o= ${TESTDIR}/locks + # Grumble, mumble. Cygwin. + if test -n "$remotehost"; then + $CVS_RSH $remotehost "chmod u=rwx,g=r,o= ${TESTDIR}/locks" + else + chmod u=rwx,g=r,o= ${TESTDIR}/locks + fi umask 0077 CVSUMASK=0077; export CVSUMASK dotest lockfiles-6 "${testcvs} -q update" "" @@ -17293,10 +19476,19 @@ ${PROG} \[[a-z]* aborted\]: cannot stat ${TESTDIR}/locks: No such file or direct # inherit the permissions from the parent directory. CVSUMASK # isn't right, because typically the reason for LockDir is to # use a different set of permissions. - dotest lockfiles-7a "ls -ld ${TESTDIR}/locks/first-dir" \ -"drwxr----- .*first-dir" - dotest lockfiles-7b "ls -ld ${TESTDIR}/locks/first-dir/sdir/ssdir" \ -"drwxr----- .*first-dir/sdir/ssdir" + # + # Bah! Cygwin! + if test -n "$remotehost"; then + dotest lockfiles-7a "$CVS_RSH $remotehost 'ls -ld ${TESTDIR}/locks/first-dir'" \ +"drwxr-----.*first-dir" + dotest lockfiles-7b "$CVS_RSH $remotehost 'ls -ld ${TESTDIR}/locks/first-dir/sdir/ssdir'" \ +"drwxr-----.*first-dir/sdir/ssdir" + else + dotest lockfiles-7a "ls -ld ${TESTDIR}/locks/first-dir" \ +"drwxr-----.*first-dir" + dotest lockfiles-7b "ls -ld ${TESTDIR}/locks/first-dir/sdir/ssdir" \ +"drwxr-----.*first-dir/sdir/ssdir" + fi cd ../../.. dotest lockfiles-8 "${testcvs} -q update" "" @@ -17309,7 +19501,7 @@ ${PROG} \[[a-z]* aborted\]: cannot stat ${TESTDIR}/locks: No such file or direct ${CVSROOT_DIRNAME}/CVSROOT/config,v <-- config new revision: 1\.[0-9]*; previous revision: 1\.[0-9]* done -${PROG} [a-z]*: Rebuilding administrative file database" +${PROG} commit: Rebuilding administrative file database" cd ../.. # Perhaps should restore the umask and CVSUMASK to what they # were before. But the other tests "should" not care about them... @@ -17353,7 +19545,7 @@ ${PROG} [a-z]*: Rebuilding administrative file database" "Directory ${CVSROOT_DIRNAME}/first-dir/dir added to the repository" touch file1 dir/file2 dotest backuprecover-4 "${testcvs} -q add file1 dir/file2" \ -"${PROG} [a-z]*: use '${PROG} commit' to add these files permanently" +"${PROG} add: use .${PROG} commit. to add these files permanently" dotest backuprecover-5 "${testcvs} -q ci -mtest" \ "RCS file: ${CVSROOT_DIRNAME}/first-dir/file1,v done @@ -17417,7 +19609,7 @@ new revision: 1\.3; previous revision: 1\.2 done" # Save a backup copy - cp -r ${CVSROOT_DIRNAME}/first-dir ${TESTDIR}/cvsroot/backup + cp -r ${CVSROOT_DIRNAME}/first-dir ${CVSROOT_DIRNAME}/backup # Simulate developer 3 cd ../.. @@ -17488,16 +19680,16 @@ done" # Slag the original and restore it a few revisions back rm -rf ${CVSROOT_DIRNAME}/first-dir - mv ${CVSROOT_DIRNAME}/backup ${TESTDIR}/cvsroot/first-dir + mv ${CVSROOT_DIRNAME}/backup ${CVSROOT_DIRNAME}/first-dir # Have developer 1 try an update and lose some data # # Feel free to imagine the horrific scream of despair cd ../../1/first-dir dotest backuprecover-15 "${testcvs} update" \ -"${PROG} [a-z]*: Updating . +"${PROG} update: Updating . U file1 -${PROG} [a-z]*: Updating dir +${PROG} update: Updating dir U dir/file2" # Developer 3 tries the same thing (he has an office) @@ -17505,8 +19697,8 @@ U dir/file2" # uncommitted changes cd ../../3/first-dir dotest_fail backuprecover-16 "${testcvs} update" \ -"${PROG} [a-z]*: Updating \. -${PROG} \[[a-z]* aborted\]: could not find desired version 1\.6 in ${CVSROOT_DIRNAME}/first-dir/file1,v" +"${PROG} update: Updating \. +${PROG} \[update aborted\]: could not find desired version 1\.6 in ${CVSROOT_DIRNAME}/first-dir/file1,v" # create our workspace fixin' script cd ../.. @@ -17552,21 +19744,21 @@ done" # and we should get a conflict on developer 4's stuff cd ../../4/first-dir dotest backuprecover-20 "${testcvs} update" \ -"${PROG} [a-z]*: Updating \. +"${PROG} update: Updating \. RCS file: ${CVSROOT_DIRNAME}/first-dir/file1,v retrieving revision 1\.3 retrieving revision 1\.4 Merging differences between 1\.3 and 1\.4 into file1 rcsmerge: warning: conflicts during merge -${PROG} [a-z]*: conflicts found in file1 +${PROG} update: conflicts found in file1 C file1 -${PROG} [a-z]*: Updating dir +${PROG} update: Updating dir RCS file: ${CVSROOT_DIRNAME}/first-dir/dir/file2,v retrieving revision 1\.3 retrieving revision 1\.4 Merging differences between 1\.3 and 1\.4 into file2 rcsmerge: warning: conflicts during merge -${PROG} [a-z]*: conflicts found in dir/file2 +${PROG} update: conflicts found in dir/file2 C dir/file2" sed -e \ "/^<<<<<<</,/^=======/d @@ -17722,8 +19914,8 @@ O 1997-06-06 08:12 ${PLUS}0000 kingdon ccvs =ccvs= <remote>/\*" done done dotest big-2 "${testcvs} add file1" \ -"${PROG} [a-z]*: scheduling file .file1. for addition -${PROG} [a-z]*: use .${PROG} commit. to add this file permanently" +"${PROG} add: scheduling file .file1. for addition +${PROG} add: use .${PROG} commit. to add this file permanently" dotest big-3 "${testcvs} -q ci -m add" \ "RCS file: ${CVSROOT_DIRNAME}/first-dir/file1,v done @@ -17779,8 +19971,8 @@ done" cd first-dir touch aa dotest modes-3 "${testcvs} add aa" \ -"${PROG} [a-z]*: scheduling file .aa. for addition -${PROG} [a-z]*: use .${PROG} commit. to add this file permanently" +"${PROG} add: scheduling file .aa. for addition +${PROG} add: use .${PROG} commit. to add this file permanently" dotest modes-4 "${testcvs} -q ci -m add" \ "RCS file: ${CVSROOT_DIRNAME}/first-dir/aa,v done @@ -17788,8 +19980,14 @@ Checking in aa; ${CVSROOT_DIRNAME}/first-dir/aa,v <-- aa initial revision: 1\.1 done" - dotest modes-5 "ls -l ${CVSROOT_DIRNAME}/first-dir/aa,v" \ + # Yawn. Cygwin. + if test -n "$remotehost"; then + dotest modes-5remotehost "$CVS_RSH $remotehost 'ls -l ${CVSROOT_DIRNAME}/first-dir/aa,v'" \ "-r--r--r-- .*" + else + dotest modes-5 "ls -l ${CVSROOT_DIRNAME}/first-dir/aa,v" \ +"-r--r--r-- .*" + fi # Test for whether we can set the execute bit. chmod +x aa @@ -17802,19 +20000,38 @@ done" # If CVS let us update the execute bit, it would be set here. # But it doesn't, and as far as I know that is longstanding # CVS behavior. - dotest modes-7 "ls -l ${CVSROOT_DIRNAME}/first-dir/aa,v" \ + # + # Yeah, yeah. Search for "Cygwin". + if test -n "$remotehost"; then + dotest modes-7remotehost "$CVS_RSH $remotehost 'ls -l ${CVSROOT_DIRNAME}/first-dir/aa,v'" \ "-r--r--r-- .*" + else + dotest modes-7 "ls -l ${CVSROOT_DIRNAME}/first-dir/aa,v" \ +"-r--r--r-- .*" + fi # OK, now manually change the modes and see what happens. - chmod g=r,o= ${CVSROOT_DIRNAME}/first-dir/aa,v + # + # Cygwin, already. + if test -n "$remotehost"; then + $CVS_RSH $remotehost "chmod g=r,o= ${CVSROOT_DIRNAME}/first-dir/aa,v" + else + chmod g=r,o= ${CVSROOT_DIRNAME}/first-dir/aa,v + fi echo second line >>aa dotest modes-7a "${testcvs} -q ci -m set-execute-bit" \ "Checking in aa; ${CVSROOT_DIRNAME}/first-dir/aa,v <-- aa new revision: 1\.3; previous revision: 1\.2 done" - dotest modes-7b "ls -l ${CVSROOT_DIRNAME}/first-dir/aa,v" \ + # Cygwin. + if test -n "$remotehost"; then + dotest modes-7bremotehost "$CVS_RSH $remotehost 'ls -l ${CVSROOT_DIRNAME}/first-dir/aa,v'" \ +"-r--r----- .*" + else + dotest modes-7b "ls -l ${CVSROOT_DIRNAME}/first-dir/aa,v" \ "-r--r----- .*" + fi CVSUMASK=007 export CVSUMASK @@ -17822,8 +20039,8 @@ done" # Might as well test the execute bit too. chmod +x ab dotest modes-8 "${testcvs} add ab" \ -"${PROG} [a-z]*: scheduling file .ab. for addition -${PROG} [a-z]*: use .${PROG} commit. to add this file permanently" +"${PROG} add: scheduling file .ab. for addition +${PROG} add: use .${PROG} commit. to add this file permanently" dotest modes-9 "${testcvs} -q ci -m add" \ "RCS file: ${CVSROOT_DIRNAME}/first-dir/ab,v done @@ -17835,8 +20052,13 @@ done" # The problem here is that the CVSUMASK environment variable # needs to be set on the server (e.g. .bashrc). This is, of # course, bogus, but that is the way it is currently. - dotest modes-10r "ls -l ${CVSROOT_DIRNAME}/first-dir/ab,v" \ + if test -n "$remotehost"; then + dotest modes-10remotehost "$CVS_RSH $remotehost 'ls -l ${CVSROOT_DIRNAME}/first-dir/ab,v'" \ +"-r--r--r--.*" + else + dotest modes-10r "ls -l ${CVSROOT_DIRNAME}/first-dir/ab,v" \ "-r-xr-x---.*" "-r-xr-xr-x.*" + fi else dotest modes-10 "ls -l ${CVSROOT_DIRNAME}/first-dir/ab,v" \ "-r-xr-x---.*" @@ -17849,8 +20071,8 @@ T ab' dotest modes-12 "${testcvs} -q update -r br" '' touch ac dotest modes-13 "${testcvs} add ac" \ -"${PROG} [a-z]*: scheduling file .ac. for addition on branch .br. -${PROG} [a-z]*: use .${PROG} commit. to add this file permanently" +"${PROG} add: scheduling file .ac. for addition on branch .br. +${PROG} add: use .${PROG} commit. to add this file permanently" # Not sure it really makes sense to refer to a "previous revision" # when we are just now adding the file; as far as I know # that is longstanding CVS behavior, for what it's worth. @@ -17868,9 +20090,15 @@ done" # first match is for the :ext: method (where the CVSUMASK # won't be set), while the second is for the :fork: method # (where it will be). - dotest modes-15r \ + if test -n "$remotehost"; then + dotest modes-15r \ +"$CVS_RSH $remotehost 'ls -l ${CVSROOT_DIRNAME}/first-dir/Attic/ac,v'" \ +"-r--r--r--.*" + else + dotest modes-15r \ "ls -l ${CVSROOT_DIRNAME}/first-dir/Attic/ac,v" \ "-r--r--r--.*" "-r--r-----.*" + fi else dotest modes-15 \ "ls -l ${CVSROOT_DIRNAME}/first-dir/Attic/ac,v" \ @@ -17897,8 +20125,8 @@ done" cd first-dir touch aa dotest modes2-3 "${testcvs} add aa" \ -"${PROG} [a-z]*: scheduling file .aa. for addition -${PROG} [a-z]*: use .${PROG} commit. to add this file permanently" +"${PROG} add: scheduling file .aa. for addition +${PROG} add: use .${PROG} commit. to add this file permanently" dotest modes2-4 "${testcvs} -q ci -m add" \ "RCS file: ${CVSROOT_DIRNAME}/first-dir/aa,v done @@ -17920,9 +20148,12 @@ done" # do this while the file is still writable. touch aa chmod a= aa - dotest_fail modes2-6 "${testcvs} -q update -r 1.1 aa" \ + # Don't try this when permissions are broken, as with Cygwin. + if ls ${CVSROOT_DIRNAME}/first-dir >/dev/null 2>&1; then :; else + dotest_fail modes2-6 "${testcvs} -q update -r 1.1 aa" \ "${PROG} \[update aborted\]: cannot open file aa for comparing: Permission denied" \ "${PROG} \[update aborted\]: reading aa: Permission denied" + fi chmod u+rwx aa cd ../.. @@ -17944,9 +20175,9 @@ done" Directory ${CVSROOT_DIRNAME}/second-dir added to the repository" touch first-dir/aa second-dir/ab dotest modes3-3 "${testcvs} add first-dir/aa second-dir/ab" \ -"${PROG} [a-z]*: scheduling file .first-dir/aa. for addition -${PROG} [a-z]*: scheduling file .second-dir/ab. for addition -${PROG} [a-z]*: use .${PROG} commit. to add these files permanently" +"${PROG} add: scheduling file .first-dir/aa. for addition +${PROG} add: scheduling file .second-dir/ab. for addition +${PROG} add: use .${PROG} commit. to add these files permanently" dotest modes3-4 "${testcvs} -q ci -m add" \ "RCS file: ${CVSROOT_DIRNAME}/first-dir/aa,v done @@ -17960,32 +20191,64 @@ Checking in second-dir/ab; ${CVSROOT_DIRNAME}/second-dir/ab,v <-- ab initial revision: 1\.1 done" - chmod a= ${CVSROOT_DIRNAME}/first-dir - dotest modes3-5 "${testcvs} update" \ -"${PROG} [a-z]*: Updating \. -${PROG} [a-z]*: Updating first-dir -${PROG} [a-z]*: cannot open directory ${CVSROOT_DIRNAME}/first-dir: Permission denied -${PROG} [a-z]*: skipping directory first-dir -${PROG} [a-z]*: Updating second-dir" + if test -n "$remotehost"; then + $CVS_RSH $remotehost "chmod a= ${CVSROOT_DIRNAME}/first-dir" + else + chmod a= ${CVSROOT_DIRNAME}/first-dir + fi + if ls ${CVSROOT_DIRNAME}/first-dir >/dev/null 2>&1; then + # Avoid this test under Cygwin since permissions work differently + # there. + # + # This test also gets avoided under Mac OS X since the system `ls' + # is broken and exits with a 0 status despite the permission + # denied error. + if test -n "$remotehost"; then + cygwin_hack=false + else + cygwin_hack=: + fi + else + cygwin_hack=false + fi + + cd $TESTDIR/1 + if $cygwin_hack; then :; else + dotest modes3-5 "${testcvs} update" \ +"${PROG} update: Updating \. +${PROG} update: Updating first-dir +${PROG} update: cannot open directory ${CVSROOT_DIRNAME}/first-dir: Permission denied +${PROG} update: skipping directory first-dir +${PROG} update: Updating second-dir" + fi # OK, I can see why one might say the above case could be a # fatal error, because normally users without access to first-dir # won't have it in their working directory. But the next # one is more of a problem if it is fatal. + # + # The second text string below is for Cygwin again, and again it + # should really be XFAIL under Cygwin, but for now deal with the + # passing opendir by accepting the alternate string. rm -r first-dir dotest modes3-6 "${testcvs} update -dP" \ -"${PROG} [a-z]*: Updating . -${PROG} [a-z]*: Updating CVSROOT +"${PROG} update: Updating . +${PROG} update: Updating CVSROOT +U ${DOTSTAR} +${PROG} update: Updating first-dir +${PROG} update: cannot open directory ${CVSROOT_DIRNAME}/first-dir: Permission denied +${PROG} update: skipping directory first-dir +${PROG} update: Updating second-dir" \ +"${PROG} update: Updating . +${PROG} update: Updating CVSROOT U ${DOTSTAR} -${PROG} [a-z]*: Updating first-dir -${PROG} [a-z]*: cannot open directory ${CVSROOT_DIRNAME}/first-dir: Permission denied -${PROG} [a-z]*: skipping directory first-dir -${PROG} [a-z]*: Updating second-dir" +${PROG} update: Updating first-dir +${PROG} update: Updating second-dir" cd .. rm -r 1 chmod u+rwx ${CVSROOT_DIRNAME}/first-dir - rm -rf ${CVSROOT_DIRNAME}/first-dir ${TESTDIR}/cvsroot/second-dir + rm -rf ${CVSROOT_DIRNAME}/first-dir ${CVSROOT_DIRNAME}/second-dir ;; stamps) @@ -17998,6 +20261,10 @@ ${PROG} [a-z]*: Updating second-dir" cd first-dir touch aa echo '$''Id$' >kw + # Cygwin, *cough*, puts the year in the time column until the minute + # is no longer the current minute. Sleep 60 seconds to avoid this + # problem. + sleep 60 ls -l aa >${TESTDIR}/1/stamp.aa.touch ls -l kw >${TESTDIR}/1/stamp.kw.touch # "sleep 1" would suffice if we could assume ls --full-time, but @@ -18005,9 +20272,9 @@ ${PROG} [a-z]*: Updating second-dir" # way to get the timestamp of a file, including the seconds? sleep 60 dotest stamps-3 "${testcvs} add aa kw" \ -"${PROG} [a-z]*: scheduling file .aa. for addition -${PROG} [a-z]*: scheduling file .kw. for addition -${PROG} [a-z]*: use .${PROG} commit. to add these files permanently" +"${PROG} add: scheduling file .aa. for addition +${PROG} add: scheduling file .kw. for addition +${PROG} add: use .${PROG} commit. to add these files permanently" ls -l aa >${TESTDIR}/1/stamp.aa.add ls -l kw >${TESTDIR}/1/stamp.kw.add # "cvs add" should not muck with the timestamp. @@ -18029,6 +20296,10 @@ Checking in kw; ${CVSROOT_DIRNAME}/first-dir/kw,v <-- kw initial revision: 1\.1 done" + # Cygwin, *cough*, puts the year in the time column until the minute + # is no longer the current minute. Sleep 60 seconds to avoid this + # problem. + sleep 60 ls -l aa >${TESTDIR}/1/stamp.aa.ci ls -l kw >${TESTDIR}/1/stamp.kw.ci # If there are no keywords, "cvs ci" leaves the timestamp alone @@ -18080,6 +20351,11 @@ Checking in kw; ${CVSROOT_DIRNAME}/first-dir/kw,v <-- kw new revision: 1\.2; previous revision: 1\.1 done" + + # Cygwin, *cough*, puts the year in the time column until the minute + # is no longer the current minute. Sleep 60 seconds to avoid this + # problem. + sleep 60 ls -l aa >${TESTDIR}/1/stamp.aa.ci2 ls -l kw >${TESTDIR}/1/stamp.kw.ci2 cd ../.. @@ -18144,8 +20420,8 @@ done" touch foo chmod 431 foo dotest perms-3 "${testcvs} add foo" \ -"${PROG} [a-z]*: scheduling file .foo. for addition -${PROG} [a-z]*: use .${PROG} commit. to add this file permanently" +"${PROG} add: scheduling file .foo. for addition +${PROG} add: use .${PROG} commit. to add this file permanently" dotest perms-4 "${testcvs} -q ci -m ''" \ "RCS file: ${CVSROOT_DIRNAME}/first-dir/foo,v done @@ -18188,8 +20464,8 @@ done" dotest symlinks-2.1 "ln -s ${TESTDIR}/fumble slink" "" dotest symlinks-3 "${testcvs} add slink" \ -"${PROG} [a-z]*: scheduling file .slink. for addition -${PROG} [a-z]*: use .${PROG} commit. to add this file permanently" +"${PROG} add: scheduling file .slink. for addition +${PROG} add: use .${PROG} commit. to add this file permanently" if $remote; then # Remote doesn't implement PreservePermissions, and in its # absence the correct behavior is to follow the symlink. @@ -18234,8 +20510,8 @@ done" cd first-dir echo nonsymlink > slink dotest symlinks2-3 "${testcvs} add slink" \ -"${PROG} [a-z]*: scheduling file .slink. for addition -${PROG} [a-z]*: use .${PROG} commit. to add this file permanently" +"${PROG} add: scheduling file .slink. for addition +${PROG} add: use .${PROG} commit. to add this file permanently" dotest symlinks2-4 "${testcvs} -q ci -m ''" \ "RCS file: ${CVSROOT_DIRNAME}/first-dir/slink,v done @@ -18299,10 +20575,10 @@ done" fi dotest hardlinks-3 "${testcvs} add [abd]*" \ -"${PROG} [a-z]*: scheduling file .aaaa. for addition -${PROG} [a-z]*: scheduling file .b\.b\.b\.b. for addition -${PROG} [a-z]*: scheduling file .dd dd dd. for addition -${PROG} [a-z]*: use .${PROG} commit. to add these files permanently" +"${PROG} add: scheduling file .aaaa. for addition +${PROG} add: scheduling file .b\.b\.b\.b. for addition +${PROG} add: scheduling file .dd dd dd. for addition +${PROG} add: use .${PROG} commit. to add these files permanently" dotest hardlinks-4 "${testcvs} -q ci -m ''" \ "RCS file: ${CVSROOT_DIRNAME}/first-dir/aaaa,v done @@ -18377,8 +20653,8 @@ U first-dir/dd dd dd" touch file1 dotest sticky-3 "${testcvs} add file1" \ -"${PROG} [a-z]*: scheduling file .file1. for addition -${PROG} [a-z]*: use .${PROG} commit. to add this file permanently" +"${PROG} add: scheduling file .file1. for addition +${PROG} add: use .${PROG} commit. to add this file permanently" dotest sticky-4 "${testcvs} -q ci -m add" \ "RCS file: ${CVSROOT_DIRNAME}/first-dir/file1,v done @@ -18399,13 +20675,13 @@ done" dotest sticky-10 "cat file1" '' touch file2 dotest_fail sticky-11 "${testcvs} add file2" \ -"${PROG} [a-z]*: cannot add file on non-branch tag tag1" +"${PROG} add: cannot add file on non-branch tag tag1" dotest sticky-12 "${testcvs} -q update -A" "[UP] file1 ${QUESTION} file2" "${QUESTION} file2 [UP] file1" dotest sticky-13 "${testcvs} add file2" \ -"${PROG} [a-z]*: scheduling file .file2. for addition -${PROG} [a-z]*: use .${PROG} commit. to add this file permanently" +"${PROG} add: scheduling file .file2. for addition +${PROG} add: use .${PROG} commit. to add this file permanently" dotest sticky-14 "${testcvs} -q ci -m add" \ "RCS file: ${CVSROOT_DIRNAME}/first-dir/file2,v done @@ -18416,12 +20692,12 @@ done" # Now back to tag1 dotest sticky-15 "${testcvs} -q update -r tag1" "[UP] file1 -${PROG} [a-z]*: file2 is no longer in the repository" +${PROG} update: file2 is no longer in the repository" rm file1 dotest sticky-16 "${testcvs} rm file1" \ -"${PROG} [a-z]*: scheduling .file1. for removal -${PROG} [a-z]*: use .${PROG} commit. to remove this file permanently" +"${PROG} remove: scheduling .file1. for removal +${PROG} remove: use .${PROG} commit. to remove this file permanently" # Hmm, this command seems to silently remove the tag from # the file. This appears to be intentional. # The silently part especially strikes me as odd, though. @@ -18429,15 +20705,15 @@ ${PROG} [a-z]*: use .${PROG} commit. to remove this file permanently" dotest sticky-18 "${testcvs} -q update -A" "U file1 U file2" dotest sticky-19 "${testcvs} -q update -r tag1" \ -"${PROG} [a-z]*: file1 is no longer in the repository -${PROG} [a-z]*: file2 is no longer in the repository" +"${PROG} update: file1 is no longer in the repository +${PROG} update: file2 is no longer in the repository" dotest sticky-20 "${testcvs} -q update -A" "U file1 U file2" # Now try with a numeric revision. dotest sticky-21 "${testcvs} -q update -r 1.1 file1" "U file1" dotest sticky-22 "${testcvs} rm -f file1" \ -"${PROG} [a-z]*: cannot remove file .file1. which has a numeric sticky tag of .1\.1." +"${PROG} remove: cannot remove file .file1. which has a numeric sticky tag of .1\.1." # The old behavior was that remove allowed this and then commit # gave an error, which was somewhat hard to clear. I mean, you # could get into a long elaborate discussion of this being a @@ -18452,13 +20728,13 @@ U file2" # discrepency between local and remote CVS and should probably # be cleaned up at some point. dotest sticky-23 "${testcvs} -q update -Dnow file1" \ -"${PROG} [a-z]*: warning: file1 was lost +"${PROG} update: warning: file1 was lost U file1" "U file1" dotest sticky-24 "${testcvs} rm -f file1" \ -"${PROG} [a-z]*: cannot remove file .file1. which has a sticky date of .[0-9.]*." +"${PROG} remove: cannot remove file .file1. which has a sticky date of .[0-9.]*." dotest sticky-25 "${testcvs} -q update -A" \ -"${PROG} [a-z]*: warning: file1 was lost +"${PROG} update: warning: file1 was lost U file1" "U file1" cd ../.. @@ -18505,8 +20781,8 @@ U file1" "U file1" echo 'xx $''Log$' >> file1 dotest keyword-3 "${testcvs} add file1" \ -"${PROG} [a-z]*: scheduling file .file1. for addition -${PROG} [a-z]*: use .${PROG} commit. to add this file permanently" +"${PROG} add: scheduling file .file1. for addition +${PROG} add: use .${PROG} commit. to add this file permanently" dotest keyword-4 "${testcvs} -q ci -m add" \ "RCS file: ${CVSROOT_DIRNAME}/first-dir/file1,v done @@ -18655,7 +20931,16 @@ done" ${CVSROOT_DIRNAME}/first-dir/file1,v <-- file1 new revision: 1\.3; previous revision: 1\.2 done" - dotest keyword-21 "${testcvs} -q update -r tag1" "[UP] file1" + # FIXCVS - These unpatchable files are happening because the tag + # associated with the current base version of the file in the + # sandbox is not available in these cases. See the note in the + # patch_file function in update.c. + dotest keyword-21 "${testcvs} -q update -r tag1" "U file1" \ +"P file1 +${PROG} update: checksum failure after patch to \./file1; will refetch +${PROG} client: refetching unpatchable files +${PROG} update: warning: file1 was lost +U file1" dotest keyword-22 "cat file1" '\$'"Name: tag1 "'\$' @@ -18665,6 +20950,7 @@ done" dotest keyword-23r "${testcvs} update -A file1" "P file1 ${PROG} update: checksum failure after patch to \./file1; will refetch ${PROG} client: refetching unpatchable files +${PROG} update: warning: file1 was lost U file1" else dotest keyword-23 "${testcvs} update -A file1" "[UP] file1" @@ -18687,8 +20973,8 @@ change" cd first-dir echo initial >file1 dotest keywordlog-3 "${testcvs} add file1" \ -"${PROG} [a-z]*: scheduling file .file1. for addition -${PROG} [a-z]*: use .${PROG} commit. to add this file permanently" +"${PROG} add: scheduling file .file1. for addition +${PROG} add: use .${PROG} commit. to add this file permanently" # See "rmadd" for a list of other tests of cvs ci -r. dotest keywordlog-4 "${testcvs} -q ci -r 1.3 -m add file1" \ @@ -18712,8 +20998,8 @@ EOF # As with rmadd-25, "cvs ci -r" sets a sticky tag. dotest_fail keywordlog-4b \ "${testcvs} ci -F ${TESTDIR}/comment.tmp file1" \ -"${PROG} [a-z]*: sticky tag .1\.3. for file .file1. is not a branch -${PROG} \[[a-z]* aborted\]: correct above errors first!" +"${PROG} commit: sticky tag .1\.3. for file .file1. is not a branch +${PROG} \[commit aborted\]: correct above errors first!" dotest keywordlog-4c "${testcvs} -q update -A" "M file1" dotest keywordlog-5 "${testcvs} ci -F ${TESTDIR}/comment.tmp file1" \ @@ -18900,6 +21186,135 @@ xx" rm -rf ${CVSROOT_DIRNAME}/first-dir ;; + keywordname) + # Test the Name keyword. + # See the keyword test for a descriptions of some other tests that + # test keyword expansion modes. + mkdir keywordname; cd keywordname + mkdir 1; cd 1 + dotest keywordname-init-1 "${testcvs} -q co -l ." '' + mkdir first-dir + dotest keywordname-init-2 "${testcvs} add first-dir" \ +"Directory ${CVSROOT_DIRNAME}/first-dir added to the repository" + cd first-dir + + echo '$'"Name$" >file1 + echo '$'"Name$" >file2 + dotest keywordname-init-3 "${testcvs} add file1 file2" \ +"${PROG} add: scheduling file .file1. for addition +${PROG} add: scheduling file .file2. for addition +${PROG} add: use .${PROG} commit. to add these files permanently" + + # See "rmadd" for a list of other tests of cvs ci -r. + dotest keywordname-init-4 "${testcvs} -q ci -r 1.3 -m add" \ +"RCS file: ${CVSROOT_DIRNAME}/first-dir/file1,v +done +Checking in file1; +${CVSROOT_DIRNAME}/first-dir/file1,v <-- file1 +initial revision: 1\.3 +done +RCS file: ${CVSROOT_DIRNAME}/first-dir/file2,v +done +Checking in file2; +${CVSROOT_DIRNAME}/first-dir/file2,v <-- file2 +initial revision: 1\.3 +done" + + dotest keywordname-init-6 "${testcvs} -q up -A" + dotest keywordname-init-7 "${testcvs} -q tag -b br" \ +"T file1 +T file2" + + echo new data >>file1 + dotest keywordname-init-8 "${testcvs} -q ci -mchange" \ +"Checking in file1; +${CVSROOT_DIRNAME}/first-dir/file1,v <-- file1 +new revision: 1\.4; previous revision: 1\.3 +done" + + # First check out a branch. + # + # There used to be a bug where static tags would be substituted for + # Name keywords but not branch tags. + # + # FIXCVS - BUG + # Why shouldn't the non-update case not cause a substitution? + # An update -kk or -A will unsub and sub keywords without updates + # being required. + # FIXCVS - see note above keyword-21 + dotest keywordname-update-1 "${testcvs} -q up -rbr" "U file1" \ +"P file1 +${PROG} update: checksum failure after patch to \./file1; will refetch +${PROG} client: refetching unpatchable files +${PROG} update: warning: file1 was lost +U file1" + dotest keywordname-update-2 "cat file1" '\$'"Name: br "'\$' + dotest keywordname-update-3 "cat file2" '\$'"Name: "'\$' + + # Now verify that updating to the trunk leaves no substitution for + # $Name + dotest keywordname-update-4 "${testcvs} -q tag firsttag" \ +"T file1 +T file2" + # FIXCVS - see note above keyword-21 + dotest keywordname-update-5 "${testcvs} -q up -A" "U file1" \ +"P file1 +${PROG} update: checksum failure after patch to \./file1; will refetch +${PROG} client: refetching unpatchable files +${PROG} update: warning: file1 was lost +U file1" + dotest keywordname-update-6 "cat file1" \ +'\$'"Name: "'\$'" +new data" + dotest keywordname-update-7 "cat file2" '\$'"Name: "'\$' + + # But updating to a static tag does cause a substitution + # FIXCVS - see same note above + dotest keywordname-update-8 "${testcvs} -q up -rfirsttag" "U file1" \ +"P file1 +${PROG} update: checksum failure after patch to \./file1; will refetch +${PROG} client: refetching unpatchable files +${PROG} update: warning: file1 was lost +U file1" + dotest keywordname-update-9 "cat file1" '\$'"Name: firsttag "'\$' + dotest keywordname-update-10 "cat file2" '\$'"Name: "'\$' + + # And reverify the trunk update when the change is actually removed. + dotest keywordname-update-11 "${testcvs} -q up -A" "[UP] file1" \ +"P file1 +${PROG} update: checksum failure after patch to ./file1; will refetch +${PROG} client: refetching unpatchable files +${PROG} update: warning: file1 was lost +U file1" + dotest keywordname-update-12 "cat file1" \ +'\$'"Name: "'\$'" +new data" + dotest keywordname-update-13 "cat file2" '\$'"Name: "'\$' + + cd ../.. + + # now verify that a fresh checkout substitutes all the $Name fields + mkdir 2; cd 2 + dotest keywordname-checkout-1 \ +"${testcvs} -q co -rfirsttag first-dir" \ +"U first-dir/file1 +U first-dir/file2" + cd first-dir + dotest keywordname-checkout-2 "cat file1" '\$'"Name: firsttag "'\$' + dotest keywordname-checkout-3 "cat file2" '\$'"Name: firsttag "'\$' + + cd ../.. + + if $keep; then + echo Keeping ${TESTDIR} and exiting due to --keep + exit 0 + fi + + cd .. + rm -r keywordname + rm -rf ${CVSROOT_DIRNAME}/first-dir + ;; + keyword2) # Test merging on files with keywords: # without -kk @@ -18932,16 +21347,16 @@ xx" echo "did a much better" >>file1 echo "job." >>file1 dotest keyword2-3 "${testcvs} add file1" \ -"${PROG} [a-z]*: scheduling file .file1. for addition -${PROG} [a-z]*: use .${PROG} commit. to add this file permanently" +"${PROG} add: scheduling file .file1. for addition +${PROG} add: use .${PROG} commit. to add this file permanently" ${AWK} 'BEGIN { printf "%c%c%c%sRevision: 1.1 $@%c%c", \ 2, 10, 137, "$", 13, 10 }' \ </dev/null | ${TR} '@' '\000' >../binfile.dat cp ../binfile.dat . dotest keyword2-5 "${testcvs} add -kb binfile.dat" \ -"${PROG} [a-z]*: scheduling file .binfile\.dat. for addition -${PROG} [a-z]*: use .${PROG} commit. to add this file permanently" +"${PROG} add: scheduling file .binfile\.dat. for addition +${PROG} add: use .${PROG} commit. to add this file permanently" dotest keyword2-6 "${testcvs} -q ci -m add" \ "RCS file: ${CVSROOT_DIRNAME}/first-dir/binfile\.dat,v @@ -19003,24 +21418,14 @@ diff -r1\.2 file1 # Here's the problem... shouldn't -kk a binary file... rm file1 - if $remote; then - dotest keyword2-13r "${testcvs} -q update -A -kk -j branch" \ -"U binfile.dat -U file1 -RCS file: ${CVSROOT_DIRNAME}/first-dir/file1,v -retrieving revision 1\.1 -retrieving revision 1\.1\.2\.1 -Merging differences between 1\.1 and 1\.1\.2\.1 into file1" - else - dotest keyword2-13 "${testcvs} -q update -A -kk -j branch" \ -"U binfile.dat -${PROG} [a-z]*: warning: file1 was lost + dotest keyword2-13 "${testcvs} -q update -A -kk -j branch" \ +"U binfile\.dat +${PROG} update: warning: file1 was lost U file1 RCS file: ${CVSROOT_DIRNAME}/first-dir/file1,v retrieving revision 1\.1 retrieving revision 1\.1\.2\.1 Merging differences between 1\.1 and 1\.1\.2\.1 into file1" - fi # binfile won't get checked in, but it is now corrupt and could # have been checked in if it had changed on the branch... @@ -19210,18 +21615,18 @@ ${PLUS} modify on branch after brtag" # Note that we are testing both the case where this deletes # a revision (file1) and the case where it does not (file2) dotest_fail head-o0a "${testcvs} admin -o ::br1" \ -"${PROG} [a-z]*: Administrating \. +"${PROG} admin: Administrating \. RCS file: ${CVSROOT_DIRNAME}/first-dir/file1,v -${PROG} [a-z]*: cannot remove revision 1\.3\.2\.1 because it has tags -${PROG} [a-z]*: RCS file for .file1. not modified\. +${PROG} admin: cannot remove revision 1\.3\.2\.1 because it has tags +${PROG} admin: RCS file for .file1. not modified\. RCS file: ${CVSROOT_DIRNAME}/first-dir/file2,v done" dotest head-o0b "${testcvs} tag -d brtag" \ -"${PROG} [a-z]*: Untagging \. +"${PROG} tag: Untagging \. D file1 D file2" dotest head-o1 "${testcvs} admin -o ::br1" \ -"${PROG} [a-z]*: Administrating \. +"${PROG} admin: Administrating \. RCS file: ${CVSROOT_DIRNAME}/first-dir/file1,v deleting revision 1\.3\.2\.1 done @@ -19258,8 +21663,8 @@ done" echo trunk-1 >file1 dotest tagdate-3 "${testcvs} add file1" \ -"${PROG} [a-z]*: scheduling file .file1. for addition -${PROG} [a-z]*: use .${PROG} commit. to add this file permanently" +"${PROG} add: scheduling file .file1. for addition +${PROG} add: use .${PROG} commit. to add this file permanently" dotest tagdate-4 "${testcvs} -q ci -m add" \ "RCS file: ${CVSROOT_DIRNAME}/first-dir/file1,v done @@ -19292,7 +21697,7 @@ done" # For some reason, doing this on a branch seems to be relevant. dotest_fail tagdate-12 "${testcvs} -q update -j:yesterday" \ -"${PROG} \[[a-z]* aborted\]: argument to join may not contain a date specifier without a tag" +"${PROG} \[update aborted\]: argument to join may not contain a date specifier without a tag" # And check export # Wish some shorter sleep interval would suffice, but I need to @@ -19359,9 +21764,9 @@ Annotations for file1 echo trunk-1 >file1 echo trunk-1 >file2 dotest multibranch2-3 "${testcvs} add file1 file2" \ -"${PROG} [a-z]*: scheduling file .file1. for addition -${PROG} [a-z]*: scheduling file .file2. for addition -${PROG} [a-z]*: use .${PROG} commit. to add these files permanently" +"${PROG} add: scheduling file .file1. for addition +${PROG} add: scheduling file .file2. for addition +${PROG} add: use .${PROG} commit. to add these files permanently" dotest multibranch2-4 "${testcvs} -q ci -m add" \ "RCS file: ${CVSROOT_DIRNAME}/first-dir/file1,v done @@ -19498,8 +21903,8 @@ done" file=m : > $file dotest tag8k-3 "$testcvs add $file" \ -"${PROG} [a-z]*: scheduling file .$file. for addition -${PROG} [a-z]*: use .${PROG} commit. to add this file permanently" +"${PROG} add: scheduling file .$file. for addition +${PROG} add: use .${PROG} commit. to add this file permanently" dotest tag8k-4 "$testcvs -Q ci -m . $file" \ "RCS file: ${CVSROOT_DIRNAME}/$module/$file,v done @@ -19536,7 +21941,7 @@ done" dotest tag8k-16 "$testcvs -Q tag $t-a $file" '' # Extract the author value. - name=`sed -n 's/.*; author \([^;]*\);.*/\1/p' ${CVSROOT_DIRNAME}/$module/$file,v|head -1` + name=`sed -n 's/.*; author \([^;]*\);.*/\1/p' ${CVSROOT_DIRNAME}/$module/$file,v|sed 1q` # Form a suffix string of length (16 - length($name)). # CAREFUL: this will lose if $name is longer than 16. @@ -19597,15 +22002,17 @@ done" ${PROG} admin: run add or import to create an RCS file ${PROG} \[admin aborted\]: specify ${PROG} -H admin for usage information" dotest_fail admin-4 "${testcvs} -q log file1" \ -"${PROG} [a-z]*: nothing known about file1" +"${PROG} log: nothing known about file1" + dotest_fail admin-4a "${testcvs} -q admin file1" \ +"${PROG} admin: nothing known about file1" # Set up some files, file2 a plain one and file1 with a revision # on a branch. touch file1 file2 dotest admin-5 "${testcvs} add file1 file2" \ -"${PROG} [a-z]*: scheduling file .file1. for addition -${PROG} [a-z]*: scheduling file .file2. for addition -${PROG} [a-z]*: use .${PROG} commit. to add these files permanently" +"${PROG} add: scheduling file .file1. for addition +${PROG} add: scheduling file .file2. for addition +${PROG} add: use .${PROG} commit. to add these files permanently" dotest admin-6 "${testcvs} -q ci -m add" \ "RCS file: ${CVSROOT_DIRNAME}/first-dir/file1,v done @@ -19623,12 +22030,35 @@ done" T file2" dotest admin-8 "${testcvs} -q update -r br" "" echo 'add a line on the branch' >> file1 - dotest admin-9 "${testcvs} -q ci -m modify-on-branch" \ + echo 'add a file on the branch' >> file3 + dotest admin-9a "${testcvs} -q add file3" \ +"${PROG} add: use .${PROG} commit. to add this file permanently" + dotest admin-9b "${testcvs} -q ci -m modify-on-branch" \ "Checking in file1; ${CVSROOT_DIRNAME}/first-dir/file1,v <-- file1 new revision: 1\.1\.2\.1; previous revision: 1\.1 +done +RCS file: ${CVSROOT_DIRNAME}/first-dir/Attic/file3,v +done +Checking in file3; +${CVSROOT_DIRNAME}/first-dir/Attic/file3,v <-- file3 +new revision: 1\.1\.2\.1; previous revision: 1\.1 +done" + dotest admin-10 "${testcvs} -q update -A" \ +"U file1 +${PROG} update: file3 is no longer in the repository" + + # Check that we can administer files in the repository that + # aren't in the working directory. + dotest admin-10-1 "${testcvs} admin ." \ +"${PROG} admin: Administrating . +RCS file: ${CVSROOT_DIRNAME}/first-dir/file1,v +done +RCS file: ${CVSROOT_DIRNAME}/first-dir/file2,v +done" + dotest admin-10-2 "${testcvs} -q admin file3" \ +"RCS file: ${CVSROOT_DIRNAME}/first-dir/Attic/file3,v done" - dotest admin-10 "${testcvs} -q update -A" "U file1" # Try to recurse with a numeric revision arg. # If we wanted to comprehensive about this, we would also test @@ -19643,11 +22073,11 @@ ${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: ${CVSROOT_DIRNAME}/first-dir/file1,v -${PROG} [a-z]*: ${CVSROOT_DIRNAME}/first-dir/file1,v: Symbolic name BOGUS is undefined. -${PROG} [a-z]*: RCS file for .file1. not modified\. +${PROG} admin: ${CVSROOT_DIRNAME}/first-dir/file1,v: Symbolic name BOGUS is undefined. +${PROG} admin: RCS file for .file1. not modified\. RCS file: ${CVSROOT_DIRNAME}/first-dir/file2,v -${PROG} [a-z]*: ${CVSROOT_DIRNAME}/first-dir/file2,v: Symbolic name BOGUS is undefined. -${PROG} [a-z]*: RCS file for .file2. not modified\." +${PROG} admin: ${CVSROOT_DIRNAME}/first-dir/file2,v: Symbolic name BOGUS is undefined. +${PROG} admin: RCS file for .file2. not modified\." # Note that -s option applies to the new default branch, not # the old one. @@ -19764,7 +22194,30 @@ text @a0 1 add a line on the branch @" - dotest admin-14 "${testcvs} -q admin -aauth3 -aauth2,foo \ + dotest_fail admin-14-1 "${testcvs} -q admin \ +-m1.1.1.1:changed-bogus-log-message file2" \ +"RCS file: ${CVSROOT_DIRNAME}/first-dir/file2,v +cvs admin: ${CVSROOT_DIRNAME}/first-dir/file2,v: no such revision 1\.1\.1\.1 +cvs admin: RCS file for .file2. not modified." + dotest admin-14-2 "${testcvs} -q log file2" " +RCS file: ${CVSROOT_DIRNAME}/first-dir/file2,v +Working file: file2 +head: 1\.1 +branch: +locks: strict +access list: +symbolic names: + br: 1\.1\.0\.2 +keyword substitution: kv +total revisions: 1; selected revisions: 1 +description: +---------------------------- +revision 1\.1 +date: [0-9/]* [0-9:]*; author: ${username}; state: Exp; +add +=============================================================================" + + dotest admin-14-3 "${testcvs} -q admin -aauth3 -aauth2,foo \ -soneone:1.1 -m1.1:changed-log-message -ntagone: file2" \ "RCS file: ${CVSROOT_DIRNAME}/first-dir/file2,v done" @@ -19824,8 +22277,8 @@ modify-on-branch dotest_fail admin-18 "${testcvs} -q admin -nbr:1.1.2 file1" \ "RCS file: ${CVSROOT_DIRNAME}/first-dir/file1,v -${PROG} [a-z]*: ${CVSROOT_DIRNAME}/first-dir/file1,v: symbolic name br already bound to 1\.1 -${PROG} [a-z]*: RCS file for .file1. not modified\." +${PROG} admin: ${CVSROOT_DIRNAME}/first-dir/file1,v: symbolic name br already bound to 1\.1 +${PROG} admin: RCS file for .file1. not modified\." dotest admin-19 "${testcvs} -q admin -ebaz -ebar,auth3 -nbr file1" \ "RCS file: ${CVSROOT_DIRNAME}/first-dir/file1,v done" @@ -19860,8 +22313,8 @@ modify-on-branch dotest_fail admin-19a-nonexist \ "${testcvs} -q admin -A${TESTDIR}/foo/bar file1" \ "RCS file: ${CVSROOT_DIRNAME}/first-dir/file1,v -${PROG} [a-z]*: Couldn't open rcs file .${TESTDIR}/foo/bar.: No such file or directory -${PROG} \[[a-z]* aborted\]: cannot continue" +${PROG} admin: Couldn't open rcs file .${TESTDIR}/foo/bar.: No such file or directory +${PROG} \[admin aborted\]: cannot continue" # In the remote case, we are cd'd off into the temp directory # and so these tests give "No such file or directory" errors. @@ -19923,8 +22376,8 @@ done" echo first rev > aaa dotest admin-22-o1 "${testcvs} add aaa" \ -"${PROG} [a-z]*: scheduling file .aaa. for addition -${PROG} [a-z]*: use .${PROG} commit. to add this file permanently" +"${PROG} add: scheduling file .aaa. for addition +${PROG} add: use .${PROG} commit. to add this file permanently" dotest admin-22-o2 "${testcvs} -q ci -m first aaa" \ "RCS file: ${CVSROOT_DIRNAME}/first-dir/aaa,v done @@ -19985,8 +22438,8 @@ sixth =============================================================================" dotest_fail admin-22-o10 "${testcvs} admin -o1.5: aaa" \ "RCS file: ${CVSROOT_DIRNAME}/first-dir/aaa,v -${PROG} [a-z]*: ${CVSROOT_DIRNAME}/first-dir/aaa,v: can't remove locked revision 1\.6 -${PROG} [a-z]*: RCS file for .aaa. not modified\." +${PROG} admin: ${CVSROOT_DIRNAME}/first-dir/aaa,v: can't remove locked revision 1\.6 +${PROG} admin: RCS file for .aaa. not modified\." dotest admin-22-o11 "${testcvs} admin -u aaa" \ "RCS file: ${CVSROOT_DIRNAME}/first-dir/aaa,v 1\.6 unlocked @@ -20036,8 +22489,8 @@ done" dotest_fail admin-22-o17 "${testcvs} admin -o1.2:1.4 aaa" \ "RCS file: ${CVSROOT_DIRNAME}/first-dir/aaa,v deleting revision 1\.4 -${PROG} [a-z]*: ${CVSROOT_DIRNAME}/first-dir/aaa,v: can't remove branch point 1\.3 -${PROG} [a-z]*: RCS file for .aaa. not modified\." +${PROG} admin: ${CVSROOT_DIRNAME}/first-dir/aaa,v: can't remove branch point 1\.3 +${PROG} admin: RCS file for .aaa. not modified\." dotest admin-22-o18 "${testcvs} update -p -r1.4 aaa" \ "=================================================================== Checking out aaa @@ -20262,8 +22715,8 @@ done" dotest_fail admin-27-4 "${testcvs} admin -ntagfour:1.3 file2" \ "RCS file: ${CVSROOT_DIRNAME}/first-dir/file2,v -${PROG} [a-z]*: ${CVSROOT_DIRNAME}/first-dir/file2,v: symbolic name tagfour already bound to 1\.1 -${PROG} [a-z]*: RCS file for .file2. not modified\." +${PROG} admin: ${CVSROOT_DIRNAME}/first-dir/file2,v: symbolic name tagfour already bound to 1\.1 +${PROG} admin: RCS file for .file2. not modified\." # Succeed at reattaching existing tag, using -N # @@ -20276,37 +22729,37 @@ done" # dotest_fail admin-28-1 "${testcvs} admin -ntagsix:tagfive file2" \ "RCS file: ${CVSROOT_DIRNAME}/first-dir/file2,v -${PROG} [a-z]*: ${CVSROOT_DIRNAME}/first-dir/file2,v: Symbolic name or revision tagfive is undefined\. -${PROG} [a-z]*: RCS file for .file2. not modified\." +${PROG} admin: ${CVSROOT_DIRNAME}/first-dir/file2,v: Symbolic name or revision tagfive is undefined\. +${PROG} admin: RCS file for .file2. not modified\." # Try a some nonexisting numeric target tags # dotest_fail admin-28-2 "${testcvs} admin -ntagseven:2.1 file2" \ "RCS file: ${CVSROOT_DIRNAME}/first-dir/file2,v -${PROG} \[[a-z]* aborted\]: revision .2\.1. does not exist" +${PROG} \[admin aborted\]: revision .2\.1. does not exist" dotest_fail admin-28-3 "${testcvs} admin -ntageight:2.1.2 file2" \ "RCS file: ${CVSROOT_DIRNAME}/first-dir/file2,v -${PROG} \[[a-z]* aborted\]: revision .2\.1\.2. does not exist" +${PROG} \[admin aborted\]: revision .2\.1\.2. does not exist" # Try some invalid targets # dotest_fail admin-28-4 "${testcvs} admin -ntagnine:1.a.2 file2" \ "RCS file: ${CVSROOT_DIRNAME}/first-dir/file2,v -${PROG} \[[a-z]* aborted\]: tag .1\.a\.2. must start with a letter" +${PROG} \[admin aborted\]: tag .1\.a\.2. must start with a letter" # Confirm that a missing tag is not a fatal error. dotest admin-28-5.1 "${testcvs} -Q tag BO+GUS file1" '' dotest_fail admin-28-5.2 "${testcvs} admin -ntagten:BO+GUS file2 file1" \ "RCS file: ${CVSROOT_DIRNAME}/first-dir/file2,v -${PROG} [a-z]*: ${CVSROOT_DIRNAME}/first-dir/file2,v: Symbolic name or revision BO${PLUS}GUS is undefined\. -${PROG} [a-z]*: RCS file for .file2. not modified\. +${PROG} admin: ${CVSROOT_DIRNAME}/first-dir/file2,v: Symbolic name or revision BO${PLUS}GUS is undefined\. +${PROG} admin: RCS file for .file2. not modified\. RCS file: ${CVSROOT_DIRNAME}/first-dir/file1,v done" dotest_fail admin-28-6 "${testcvs} admin -nq.werty:tagfour file2" \ "RCS file: ${CVSROOT_DIRNAME}/first-dir/file2,v -${PROG} \[[a-z]* aborted\]: tag .q\.werty. must not contain the characters ..*" +${PROG} \[admin aborted\]: tag .q\.werty. must not contain the characters ..*" # Verify the archive # @@ -20377,7 +22830,141 @@ text @d2 1 @" + dotest_fail admin-30 "${testcvs} admin -mbr:another-log-message \ +file2 aaa file3" \ +"RCS file: ${CVSROOT_DIRNAME}/first-dir/file2,v +${PROG} admin: ${CVSROOT_DIRNAME}/first-dir/file2,v: no such revision br: 1\.1 +${PROG} admin: RCS file for .file2. not modified. +RCS file: ${CVSROOT_DIRNAME}/first-dir/aaa,v +${PROG} admin: ${CVSROOT_DIRNAME}/first-dir/aaa,v: no such revision br +${PROG} admin: RCS file for .aaa. not modified. +RCS file: ${CVSROOT_DIRNAME}/first-dir/Attic/file3,v +done" + dotest admin-31 "${testcvs} log" \ +"${PROG} log: Logging \. + +RCS file: ${CVSROOT_DIRNAME}/first-dir/aaa,v +Working file: aaa +head: 1\.4 +branch: +locks: strict +access list: +symbolic names: + br1: 1\.3\.0\.2 +keyword substitution: kv +total revisions: 5; selected revisions: 5 +description: +---------------------------- +revision 1\.4 +date: [0-9/]* [0-9:]*; author: ${username}; state: Exp; lines: ${PLUS}1 -0 +fourth +---------------------------- +revision 1\.3 +date: [0-9/]* [0-9:]*; author: ${username}; state: Exp; lines: ${PLUS}1 -0 +branches: 1\.3\.2; +third +---------------------------- +revision 1\.2 +date: [0-9/]* [0-9:]*; author: ${username}; state: Exp; lines: ${PLUS}1 -0 +second +---------------------------- +revision 1\.1 +date: [0-9/]* [0-9:]*; author: ${username}; state: Exp; +first +---------------------------- +revision 1\.3\.2\.4 +date: [0-9/]* [0-9:]*; author: ${username}; state: Exp; lines: ${PLUS}4 -0 +branch-four +============================================================================= + +RCS file: ${CVSROOT_DIRNAME}/first-dir/file1,v +Working file: file1 +head: 1\.1 +branch: +locks: strict +access list: + foo + auth2 +symbolic names: + tagten: 1\.1 + BO${PLUS}GUS: 1\.1 +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 +============================================================================= + +RCS file: ${CVSROOT_DIRNAME}/first-dir/file2,v +Working file: file2 +head: 1\.4 +branch: +locks: strict +access list: + auth3 + auth2 + foo +symbolic names: + tagfour: 1\.3 + br4: 1\.1\.0\.2 + br2: 1\.1\.0\.2 + tagthree: 1\.1 + br1: 1\.1\.0\.2 + tagtwo: 1\.1 + tagone: 1\.1 + br: 1\.1\.0\.2 +keyword substitution: kv +total revisions: 3; selected revisions: 3 +description: +---------------------------- +revision 1\.4 +date: [0-9/]* [0-9:]*; author: ${username}; state: Exp; lines: ${PLUS}1 -0 +yet_another +---------------------------- +revision 1\.3 +date: [0-9/]* [0-9:]*; author: ${username}; state: Exp; lines: ${PLUS}1 -0 +nuthr_line +---------------------------- +revision 1\.2 +date: [0-9/]* [0-9:]*; author: ${username}; state: Exp; +modify +============================================================================= + +RCS file: ${CVSROOT_DIRNAME}/first-dir/Attic/file3,v +Working file: file3 +head: 1\.1 +branch: +locks: strict +access list: +symbolic names: + br: 1\.1\.0\.2 +keyword substitution: kv +total revisions: 2; selected revisions: 2 +description: +---------------------------- +revision 1\.1 +date: [0-9/]* [0-9:]*; author: ${username}; state: dead; +branches: 1\.1\.2; +file file3 was initially added on branch br\. +---------------------------- +revision 1\.1\.2\.1 +date: [0-9/]* [0-9:]*; author: ${username}; state: Exp; lines: ${PLUS}1 -0 +another-log-message +=============================================================================" + cd ../.. + if $keep; then + echo Keeping ${TESTDIR} and exiting due to --keep + exit 0 + fi + # clean up our after ourselves rm -r 1 rm -rf ${CVSROOT_DIRNAME}/first-dir ;; @@ -20403,8 +22990,8 @@ text cd first-dir touch file1 dotest reserved-3 "${testcvs} add file1" \ -"${PROG} [a-z]*: scheduling file .file1. for addition -${PROG} [a-z]*: use .${PROG} commit. to add this file permanently" +"${PROG} add: scheduling file .file1. for addition +${PROG} add: use .${PROG} commit. to add this file permanently" dotest reserved-4 "${testcvs} -q ci -m add" \ "RCS file: ${CVSROOT_DIRNAME}/first-dir/file1,v done @@ -20478,12 +23065,17 @@ else exit 1 fi EOF - chmod +x ${TESTDIR}/lockme + # Cygwin. Blaaarg. + if test -n "$remotehost"; then + $CVS_RSH $remotehost "chmod +x ${TESTDIR}/lockme" + else + chmod +x ${TESTDIR}/lockme + fi echo stuff > a-lock dotest reserved-9 "${testcvs} add a-lock" \ -"${PROG} [a-z]*: scheduling file .a-lock. for addition -${PROG} [a-z]*: use .${PROG} commit. to add this file permanently" +"${PROG} add: scheduling file .a-lock. for addition +${PROG} add: use .${PROG} commit. to add this file permanently" dotest reserved-10 "${testcvs} -q ci -m new a-lock" \ "RCS file: ${CVSROOT_DIRNAME}/first-dir/a-lock,v done @@ -20508,29 +23100,39 @@ done" ${CVSROOT_DIRNAME}/CVSROOT/commitinfo,v <-- commitinfo new revision: 1\.2; previous revision: 1\.1 done -${PROG} [a-z]*: Rebuilding administrative file database" +${PROG} commit: Rebuilding administrative file database" cd ..; cd first-dir # Simulate (approximately) what a-lock would look like # if someone else had locked revision 1.1. sed -e 's/locks; strict;/locks fred:1.1; strict;/' ${CVSROOT_DIRNAME}/first-dir/a-lock,v > a-lock,v - chmod 644 ${CVSROOT_DIRNAME}/first-dir/a-lock,v + # Cygwin. + if test -n "$remotehost"; then + $CVS_RSH $remotehost "chmod 644 ${CVSROOT_DIRNAME}/first-dir/a-lock,v" + else + chmod 644 ${CVSROOT_DIRNAME}/first-dir/a-lock,v + fi dotest reserved-13 "mv a-lock,v ${CVSROOT_DIRNAME}/first-dir/a-lock,v" - chmod 444 ${CVSROOT_DIRNAME}/first-dir/a-lock,v + # Cygwin. Blah. + if test -n "$remotehost"; then + $CVS_RSH $remotehost "chmod 444 ${CVSROOT_DIRNAME}/first-dir/a-lock,v" + else + chmod 444 ${CVSROOT_DIRNAME}/first-dir/a-lock,v + fi echo more stuff >> a-lock dotest_fail reserved-13b "${testcvs} ci -m '' a-lock" \ "fred has file a-lock locked for version 1\.1 -${PROG} [a-z]*: Pre-commit check failed -${PROG} \[[a-z]* aborted\]: correct above errors first!" +${PROG} commit: Pre-commit check failed +${PROG} \[commit aborted\]: correct above errors first!" # OK, now test "cvs admin -l" in the case where someone # else has the file locked. dotest_fail reserved-13c "${testcvs} admin -l a-lock" \ "RCS file: ${CVSROOT_DIRNAME}/first-dir/a-lock,v -${PROG} \[[a-z]* aborted\]: Revision 1\.1 is already locked by fred" +${PROG} \[admin aborted\]: Revision 1\.1 is already locked by fred" dotest reserved-14 "${testcvs} admin -u1.1 a-lock" \ "RCS file: ${CVSROOT_DIRNAME}/first-dir/a-lock,v -${PROG} [a-z]*: ${CVSROOT_DIRNAME}/first-dir/a-lock,v: revision 1\.1 locked by fred; breaking lock +${PROG} admin: ${CVSROOT_DIRNAME}/first-dir/a-lock,v: revision 1\.1 locked by fred; breaking lock 1\.1 unlocked done" dotest reserved-15 "${testcvs} -q ci -m success a-lock" \ @@ -20562,7 +23164,7 @@ done" ${CVSROOT_DIRNAME}/CVSROOT/commitinfo,v <-- commitinfo new revision: 1\.3; previous revision: 1\.2 done -${PROG} [a-z]*: Rebuilding administrative file database" +${PROG} commit: Rebuilding administrative file database" cd ..; rm -r CVSROOT; cd first-dir cd ../.. @@ -20590,7 +23192,7 @@ ${PROG} [a-z]*: Rebuilding administrative file database" # been lost. Later you discover this, and you suspect me of # deliberately sabotaging your work, so you let all the air # out of my tires. Only after a series of expensive lawsuits - # and countersuits do we discover it this was all CVS's + # and countersuits do we discover that this was all CVS's # fault. # # Luckily, this problem has been fixed now, as our test will @@ -20712,6 +23314,7 @@ RCS file: ${CVSROOT_DIRNAME}/diffmerge1/testcase07,v retrieving revision 1\.1\.1\.1 retrieving revision 1\.1\.1\.1\.2\.1 Merging differences between 1\.1\.1\.1 and 1\.1\.1\.1\.2\.1 into testcase07 +testcase07 already contains the differences between 1\.1\.1\.1 and 1\.1\.1\.1\.2\.1 M testcase08 RCS file: ${CVSROOT_DIRNAME}/diffmerge1/testcase08,v retrieving revision 1\.1\.1\.1 @@ -21478,9 +24081,9 @@ EOF dotest_fail release-7 "test -d first-dir/dir1" '' dotest_fail release-8 "test -d first-dir/dir2/dir3" '' dotest release-9 "${testcvs} update" \ -"${PROG} [a-z]*: Updating \. -${PROG} [a-z]*: Updating first-dir -${PROG} [a-z]*: Updating first-dir/dir2" +"${PROG} update: Updating \. +${PROG} update: Updating first-dir +${PROG} update: Updating first-dir/dir2" cd first-dir mkdir dir1 @@ -21513,26 +24116,628 @@ EOF rm -rf first-dir/dir1 first-dir/dir2 dotest release-16 "${testcvs} update" \ -"${PROG} [a-z]*: Updating \. -${PROG} [a-z]*: Updating first-dir" +"${PROG} update: Updating \. +${PROG} update: Updating first-dir" + + # Check to make sure release isn't overwriting a + # CVS/Entries file in the current directory (using data + # from the released directory). + + # cvs 1.11 (remote) fails on release-21 (a message about + # chdir into the removed directory), although it seemingly + # unedits and removes the directory correctly. If + # you manually continue, it then fails on release-22 do + # to the messed up CVS/Entries file from release-21. + cd first-dir + mkdir second-dir + dotest release-18 "$testcvs add second-dir" \ +"Directory $CVSROOT_DIRNAME/first-dir/second-dir added to the repository" + + cd second-dir + touch file1 + dotest release-19 "$testcvs -Q add file1" + dotest release-20 '$testcvs -q ci -m add' \ +"RCS file: $CVSROOT_DIRNAME/first-dir/second-dir/file1,v +done +Checking in file1; +$CVSROOT_DIRNAME/first-dir/second-dir/file1,v <-- file1 +initial revision: 1\.1 +done" + dotest release-21 "$testcvs edit file1" cd .. - rm -rf 1 + dotest release-22 "echo yes | $testcvs release -d second-dir" \ +"You have \[0\] altered files in this repository. +Are you sure you want to release (and delete) directory \`second-dir': " + dotest release-23 "$testcvs -q update -d" "U second-dir/file1" + dotest release-24 "$testcvs edit" + + cd ../.. + rm -rf 1 $CVSROOT_DIRNAME/first-dir ;; - + + + + recase) + # + # Some tests of behavior which broke at one time or another when run + # from case insensitive clients against case sensitive servers. + # + # These tests are namned according to the following convention: + # + # ci Client (sandbox filesystem) case Insensitive + # cs Client (sandbox filesystem) case Sensitive + # si Server (repository filesystem) case Insensitive + # ss Server (repository filesystem) case Sensitive + # + + mkdir 1; cd 1 + + # First, we will expect different results for a few of these tests + # based on whether the repository is on a case sensitive filesystem + # or not and whether the sandbox is on a case sensitive filesystem or + # not, so determine which cases we are dealing with: + echo file >file + echo FiLe >FiLe + if cmp file FiLe >/dev/null; then + client_sensitive=false + else + client_sensitive=: + fi + if test -n "$remotehost"; then + $CVS_RSH $remotehost 'echo file >file' + $CVS_RSH $remotehost 'echo FiLe >FiLe' + if $CVS_RSH $remotehost 'cmp file FiLe >/dev/null'; then + server_sensitive=false + else + server_sensitive=: + fi + else + server_sensitive=$client_sensitive + fi + + # The first test (recase-1 & recase-2) is for a remove of a file then + # a readd in a different case. + mkdir $CVSROOT_DIRNAME/first-dir + dotest recase-init-1 "$testcvs -Q co first-dir" + cd first-dir + + echo this file has no content >file + dotest recase-init-2 "$testcvs -Q add file" + dotest recase-init-3 "$testcvs -Q ci -madd" \ +"RCS file: $CVSROOT_DIRNAME/first-dir/file,v +done +Checking in file; +$CVSROOT_DIRNAME/first-dir/file,v <-- file +initial revision: 1\.1 +done" + dotest recase-init-4 "$testcvs -Q tag first" + + # Now remove the file. + dotest recase-init-5 "$testcvs -Q rm -f file" + dotest recase-init-6 "$testcvs -Q ci -mrm" \ +"Removing file; +$CVSROOT_DIRNAME/first-dir/file,v <-- file +new revision: delete; previous revision: 1\.1 +done" + + # Now the test - readd in a different case. + echo this file needs some content >FiLe + if $server_sensitive; then + dotest recase-1ss "$testcvs add FiLe" \ +"$PROG add: scheduling file \`FiLe' for addition +$PROG add: use '$PROG commit' to add this file permanently" + dotest recase-2ss "$testcvs -q ci -mrecase" \ +"RCS file: $CVSROOT_DIRNAME/first-dir/FiLe,v +done +Checking in FiLe; +$CVSROOT_DIRNAME/first-dir/FiLe,v <-- FiLe +initial revision: 1\.1 +done" + else # server insensitive + dotest recase-1si "$testcvs add FiLe" \ +"$PROG add: Re-adding file \`FiLe' (in place of dead revision 1\.2)\. +$PROG add: use '$PROG commit' to add this file permanently" + dotest recase-2si "$testcvs -q ci -mrecase" \ +"Checking in FiLe; +$CVSROOT_DIRNAME/first-dir/FiLe,v <-- FiLe +new revision: 1\.3; previous revision: 1\.2 +done" + fi + + # Now verify that a checkout will still work + cd ../.. + mkdir 2; cd 2 + dotest recase-3 "$testcvs -q co first-dir" \ +"U first-dir/FiLe" + + cd first-dir + # Prove that we can still get status and log information on + # conflicting case files (1 in Attic, one in parent). + if $remote; then + if $client_sensitive; then + file=file + fIlE=fIlE + else # client insensitive + # Because FiLe is present on a case insensitive client, it is the + # only one ever found and queried or altered. + file=FiLe + fIlE=FiLe + fi + else # ! $remote + file=file + fIlE=fIlE + fi + if $server_sensitive; then + if $client_sensitive; then + # Client finds Entry only for FiLe. Others returned by server. + dotest recase-4sscs "$testcvs status file" \ +"=================================================================== +File: no file file Status: Up-to-date + + Working revision: No entry for file + Repository revision: 1\.2 $CVSROOT_DIRNAME/first-dir/Attic/file,v" + dotest recase-5sscs "$testcvs log file" \ +" +RCS file: $CVSROOT_DIRNAME/first-dir/Attic/file,v +Working file: file +head: 1\.2 +branch: +locks: strict +access list: +symbolic names: + first: 1\.1 +keyword substitution: kv +total revisions: 2; selected revisions: 2 +description: +---------------------------- +revision 1\.2 +date: [0-9/]* [0-9:]*; author: $username; state: dead; lines: +0 -0 +rm +---------------------------- +revision 1\.1 +date: [0-9/]* [0-9:]*; author: $username; state: Exp; +add +=============================================================================" + dotest recase-6sscs "$testcvs status FiLe" \ +"=================================================================== +File: FiLe Status: Up-to-date + + Working revision: 1\.1.* + Repository revision: 1\.1 $CVSROOT_DIRNAME/first-dir/FiLe,v + Sticky Tag: (none) + Sticky Date: (none) + Sticky Options: (none)" + dotest recase-7sscs "$testcvs log FiLe" \ +" +RCS file: $CVSROOT_DIRNAME/first-dir/FiLe,v +Working file: FiLe +head: 1\.1 +branch: +locks: strict +access list: +symbolic names: +keyword substitution: kv +total revisions: 1; selected revisions: 1 +description: +---------------------------- +revision 1\.1 +date: [0-9/]* [0-9:]*; author: $username; state: Exp; +recase +=============================================================================" + else # server sensitive && client insensitive + # Client finds same Entry for file & FiLe. + dotest recase-4ssci "$testcvs status file" \ +"=================================================================== +File: FiLe Status: Up-to-date + + Working revision: 1\.1.* + Repository revision: 1\.1 $CVSROOT_DIRNAME/first-dir/FiLe,v + Sticky Tag: (none) + Sticky Date: (none) + Sticky Options: (none)" + dotest recase-5ssci "$testcvs log file" \ +" +RCS file: $CVSROOT_DIRNAME/first-dir/FiLe,v +Working file: FiLe +head: 1\.1 +branch: +locks: strict +access list: +symbolic names: +keyword substitution: kv +total revisions: 1; selected revisions: 1 +description: +---------------------------- +revision 1\.1 +date: [0-9/]* [0-9:]*; author: $username; state: Exp; +recase +=============================================================================" + dotest recase-6ss "$testcvs status FiLe" \ +"=================================================================== +File: FiLe Status: Up-to-date + + Working revision: 1\.1.* + Repository revision: 1\.1 $CVSROOT_DIRNAME/first-dir/FiLe,v + Sticky Tag: (none) + Sticky Date: (none) + Sticky Options: (none)" + dotest recase-7ss "$testcvs log FiLe" \ +" +RCS file: $CVSROOT_DIRNAME/first-dir/FiLe,v +Working file: FiLe +head: 1\.1 +branch: +locks: strict +access list: +symbolic names: +keyword substitution: kv +total revisions: 1; selected revisions: 1 +description: +---------------------------- +revision 1\.1 +date: [0-9/]* [0-9:]*; author: $username; state: Exp; +recase +=============================================================================" + fi + else # server insensitive + # There is only one archive when the server is insensitive, but the + # printed file/archive name can vary. + dotest recase-4si "$testcvs status file" \ +"=================================================================== +File: $file Status: Up-to-date + + Working revision: 1\.3.* + Repository revision: 1\.3 $CVSROOT_DIRNAME/first-dir/$file,v + Sticky Tag: (none) + Sticky Date: (none) + Sticky Options: (none)" + dotest recase-5si "$testcvs log file" \ +" +RCS file: $CVSROOT_DIRNAME/first-dir/$file,v +Working file: $file +head: 1\.3 +branch: +locks: strict +access list: +symbolic names: + first: 1\.1 +keyword substitution: kv +total revisions: 3; selected revisions: 3 +description: +---------------------------- +revision 1\.3 +date: [0-9/]* [0-9:]*; author: $username; state: Exp; lines: +1 -1 +recase +---------------------------- +revision 1\.2 +date: [0-9/]* [0-9:]*; author: $username; state: dead; lines: +0 -0 +rm +---------------------------- +revision 1\.1 +date: [0-9/]* [0-9:]*; author: $username; state: Exp; +add +=============================================================================" + dotest recase-6si "$testcvs status FiLe" \ +"=================================================================== +File: FiLe Status: Up-to-date + + Working revision: 1\.3.* + Repository revision: 1\.3 $CVSROOT_DIRNAME/first-dir/FiLe,v + Sticky Tag: (none) + Sticky Date: (none) + Sticky Options: (none)" + dotest recase-7si "$testcvs log FiLe" \ +" +RCS file: $CVSROOT_DIRNAME/first-dir/FiLe,v +Working file: FiLe +head: 1\.3 +branch: +locks: strict +access list: +symbolic names: + first: 1\.1 +keyword substitution: kv +total revisions: 3; selected revisions: 3 +description: +---------------------------- +revision 1\.3 +date: [0-9/]* [0-9:]*; author: $username; state: Exp; lines: +1 -1 +recase +---------------------------- +revision 1\.2 +date: [0-9/]* [0-9:]*; author: $username; state: dead; lines: +0 -0 +rm +---------------------------- +revision 1\.1 +date: [0-9/]* [0-9:]*; author: $username; state: Exp; +add +=============================================================================" + fi + + # And when the file does not exist on the client, we go with the + # client Entries match. + if $client_sensitive && $server_sensitive; then + dotest recase-8sscs "$testcvs status fIlE" \ +"$PROG status: nothing known about fIlE +=================================================================== +File: no file fIlE Status: Unknown + + Working revision: No entry for fIlE + Repository revision: No revision control file" + else # !$client_sensitive || !$server_sensitive + dotest recase-8anyi "$testcvs status fIlE" \ +"=================================================================== +File: $fIlE Status: Up-to-date + + Working revision: 1\.[0-9]*.* + Repository revision: 1\.[0-9]* $CVSROOT_DIRNAME/first-dir/$fIlE,v + Sticky Tag: (none) + Sticky Date: (none) + Sticky Options: (none)" + fi + + # and an update + if $server_sensitive; then + dotest recase-9ss "$testcvs -q up -rfirst" \ +"$PROG update: FiLe is no longer in the repository +U file" + + if $client_sensitive; then + dotest recase-10sscs "$testcvs -q up -A" \ +"U FiLe +$PROG update: file is no longer in the repository" + else # client insensitive + # FIXCVS: This should remove the offending file first. + dotest_fail recase-10ssci "$testcvs -q up -A" \ +"$PROG update: move away \./FiLe; it is in the way +C FiLe +$PROG update: file is no longer in the repository" + + cd .. + rm -r first-dir + dotest recase-11ssci "$testcvs -q co first-dir" \ +"U first-dir/FiLe" + cd first-dir + fi + + # + # See what happens when cased names clash. + # + + # Copy the archive + if test -n "$remotehost"; then + $CVS_RSH $remotehost "cp $CVSROOT_DIRNAME/first-dir/FiLe,v \ + $CVSROOT_DIRNAME/first-dir/FILE,v" + else + cp $CVSROOT_DIRNAME/first-dir/FiLe,v \ + $CVSROOT_DIRNAME/first-dir/FILE,v + fi + + if $client_sensitive; then + dotest recase-12sscs "$testcvs -q up" "U FILE" + else # client insensitive + dotest_fail recase-12ssci "$testcvs -q up" \ +"$PROG update: move away \./FILE; it is in the way +C FILE" + fi + else # server insensitive + dotest recase-9si "$testcvs -q up -rfirst" "U FiLe" + dotest recase-10si "$testcvs -q up -A" "U FiLe" + fi + + # Prove that we can still get status and log information on + # conflicting case files (1 in Attic, two in parent). + if $server_sensitive; then + if $client_sensitive; then + # Client finds Entry only for FiLe. Others returned by server. + dotest recase-13sscs "$testcvs status file" \ +"=================================================================== +File: no file file Status: Up-to-date + + Working revision: No entry for file + Repository revision: 1\.2 $CVSROOT_DIRNAME/first-dir/Attic/file,v" + dotest recase-14sscs "$testcvs log file" \ +" +RCS file: $CVSROOT_DIRNAME/first-dir/Attic/file,v +Working file: file +head: 1\.2 +branch: +locks: strict +access list: +symbolic names: + first: 1\.1 +keyword substitution: kv +total revisions: 2; selected revisions: 2 +description: +---------------------------- +revision 1\.2 +date: [0-9/]* [0-9:]*; author: $username; state: dead; lines: +0 -0 +rm +---------------------------- +revision 1\.1 +date: [0-9/]* [0-9:]*; author: $username; state: Exp; +add +=============================================================================" + dotest recase-15sscs "$testcvs status FiLe" \ +"=================================================================== +File: FiLe Status: Up-to-date + + Working revision: 1\.1.* + Repository revision: 1\.1 $CVSROOT_DIRNAME/first-dir/FiLe,v + Sticky Tag: (none) + Sticky Date: (none) + Sticky Options: (none)" + dotest recase-16sscs "$testcvs log FiLe" \ +" +RCS file: $CVSROOT_DIRNAME/first-dir/FiLe,v +Working file: FiLe +head: 1\.1 +branch: +locks: strict +access list: +symbolic names: +keyword substitution: kv +total revisions: 1; selected revisions: 1 +description: +---------------------------- +revision 1\.1 +date: [0-9/]* [0-9:]*; author: $username; state: Exp; +recase +=============================================================================" + dotest recase-17sscs "$testcvs status FILE" \ +"=================================================================== +File: FILE Status: Up-to-date + + Working revision: 1.1.* + Repository revision: 1.1 ${CVSROOT_DIRNAME}/first-dir/FILE,v + Sticky Tag: (none) + Sticky Date: (none) + Sticky Options: (none)" + dotest recase-18sscs "$testcvs log FILE" \ +" +RCS file: $CVSROOT_DIRNAME/first-dir/FILE,v +Working file: FILE +head: 1\.1 +branch: +locks: strict +access list: +symbolic names: +keyword substitution: kv +total revisions: 1; selected revisions: 1 +description: +---------------------------- +revision 1\.1 +date: [0-9/]* [0-9:]*; author: $username; state: Exp; +recase +=============================================================================" + else # $server_sensitive && !$client_sensitive + # Client finds same Entry for file & FiLe. + dotest recase-13ssci "$testcvs status file" \ +"=================================================================== +File: FiLe Status: Up-to-date + + Working revision: 1\.1.* + Repository revision: 1\.1 $CVSROOT_DIRNAME/first-dir/FiLe,v + Sticky Tag: (none) + Sticky Date: (none) + Sticky Options: (none)" + dotest recase-16ssci "$testcvs log FiLe" \ +" +RCS file: $CVSROOT_DIRNAME/first-dir/FiLe,v +Working file: FiLe +head: 1\.1 +branch: +locks: strict +access list: +symbolic names: +keyword substitution: kv +total revisions: 1; selected revisions: 1 +description: +---------------------------- +revision 1\.1 +date: [0-9/]* [0-9:]*; author: $username; state: Exp; +recase +=============================================================================" + dotest recase-17ssci "$testcvs status FILE" \ +"=================================================================== +File: FiLe Status: Up-to-date + + Working revision: 1\.1.* + Repository revision: 1\.1 $CVSROOT_DIRNAME/first-dir/FiLe,v + Sticky Tag: (none) + Sticky Date: (none) + Sticky Options: (none)" + dotest recase-18ssci "$testcvs log FILE" \ +" +RCS file: $CVSROOT_DIRNAME/first-dir/FiLe,v +Working file: FiLe +head: 1\.1 +branch: +locks: strict +access list: +symbolic names: +keyword substitution: kv +total revisions: 1; selected revisions: 1 +description: +---------------------------- +revision 1\.1 +date: [0-9/]* [0-9:]*; author: $username; state: Exp; +recase +=============================================================================" + fi + else # !$server_sensitive + # Skip these when the server is case insensitive - nothing + # has changed since recase-[4-7]si + : + fi + + if $client_sensitive && $server_sensitive; then + dotest recase-19sscs "$testcvs status fIlE" \ +"$PROG status: nothing known about fIlE +=================================================================== +File: no file fIlE Status: Unknown + + Working revision: No entry for fIlE + Repository revision: No revision control file" + else # !$client_sensitive || !$server_sensitive + dotest recase-19anyi "$testcvs status fIlE" \ +"=================================================================== +File: $fIlE Status: Up-to-date + + Working revision: 1\.[0-9]*.* + Repository revision: 1\.[0-9]* $CVSROOT_DIRNAME/first-dir/$fIlE,v + Sticky Tag: (none) + Sticky Date: (none) + Sticky Options: (none)" + fi + + # And last but not least, prove that a checkout is still possible. + cd ../.. + mkdir 3; cd 3 + if $server_sensitive; then + if $client_sensitive; then + dotest recase-20sscs "$testcvs -q co first-dir" \ +"U first-dir/FILE +U first-dir/FiLe" + else # $server_senstive && !$client_sensitive + dotest_fail recase-20ssci "$testcvs -q co first-dir" \ +"U first-dir/FILE +$PROG checkout: move away first-dir/FiLe; it is in the way +C first-dir/FiLe" + fi + else # !$server_sensitive + # Skip these since nothing has changed. + : + fi + + if $keep; then + echo Keeping ${TESTDIR} and exiting due to --keep + exit 0 + fi + + cd .. + rm -r 1 2 3 + if $server_sensitive && test -n "$remotehost"; then + # It is necessary to remove one of the case-conflicted files before + # recursively removing the rest under Cygwin on a Samba share or + # Samba returns a permission denied error due to its case + # confusion. + $CVS_RSH $remotehost "rm -f $CVSROOT_DIRNAME/first-dir/FILE,v" + fi + rm -rf $CVSROOT_DIRNAME/first-dir + ;; + + + multiroot) - # # set up two repositories # CVSROOT1_DIRNAME=${TESTDIR}/root1 CVSROOT2_DIRNAME=${TESTDIR}/root2 - CVSROOT1=${CVSROOT1_DIRNAME} ; export CVSROOT1 - CVSROOT2=${CVSROOT2_DIRNAME} ; export CVSROOT2 - if $remote; then - CVSROOT1=:fork:${CVSROOT1_DIRNAME} ; export CVSROOT1 - CVSROOT2=:fork:${CVSROOT2_DIRNAME} ; export CVSROOT2 - fi + CVSROOT1=`newroot $CVSROOT1_DIRNAME` + CVSROOT2=`newroot $CVSROOT2_DIRNAME` testcvs1="${testcvs} -d ${CVSROOT1}" testcvs2="${testcvs} -d ${CVSROOT2}" @@ -21544,7 +24749,8 @@ ${PROG} [a-z]*: Updating first-dir" # create some directories in root1 # mkdir 1; cd 1 - dotest multiroot-setup-4 "${testcvs1} co -l ." "${PROG} [a-z]*: Updating ." + dotest multiroot-setup-4 "${testcvs1} co -l ." \ +"${PROG} checkout: Updating ." mkdir mod1-1 mod1-2 dotest multiroot-setup-5 "${testcvs1} add mod1-1 mod1-2" \ "Directory ${CVSROOT1_DIRNAME}/mod1-1 added to the repository @@ -21552,9 +24758,9 @@ Directory ${CVSROOT1_DIRNAME}/mod1-2 added to the repository" echo file1-1 > mod1-1/file1-1 echo file1-2 > mod1-2/file1-2 dotest multiroot-setup-6 "${testcvs1} add mod1-1/file1-1 mod1-2/file1-2" \ -"${PROG} [a-z]*: scheduling file .mod1-1/file1-1. for addition -${PROG} [a-z]*: scheduling file .mod1-2/file1-2. for addition -${PROG} [a-z]*: use '${PROG} commit' to add these files permanently" +"${PROG} add: scheduling file .mod1-1/file1-1. for addition +${PROG} add: scheduling file .mod1-2/file1-2. for addition +${PROG} add: use .${PROG} commit. to add these files permanently" dotest multiroot-setup-7 "${testcvs1} commit -m is" \ "${PROG} [a-z]*: Examining \. ${PROG} [a-z]*: Examining mod1-1 @@ -21578,7 +24784,8 @@ done" # create some directories in root2 # mkdir 1; cd 1 - dotest multiroot-setup-8 "${testcvs2} co -l ." "${PROG} [a-z]*: Updating ." + dotest multiroot-setup-8 "${testcvs2} co -l ." \ +"${PROG} checkout: Updating ." mkdir mod2-1 mod2-2 dotest multiroot-setup-9 "${testcvs2} add mod2-1 mod2-2" \ "Directory ${CVSROOT2_DIRNAME}/mod2-1 added to the repository @@ -21586,9 +24793,9 @@ Directory ${CVSROOT2_DIRNAME}/mod2-2 added to the repository" echo file2-1 > mod2-1/file2-1 echo file2-2 > mod2-2/file2-2 dotest multiroot-setup-6 "${testcvs2} add mod2-1/file2-1 mod2-2/file2-2" \ -"${PROG} [a-z]*: scheduling file .mod2-1/file2-1. for addition -${PROG} [a-z]*: scheduling file .mod2-2/file2-2. for addition -${PROG} [a-z]*: use '${PROG} commit' to add these files permanently" +"${PROG} add: scheduling file .mod2-1/file2-1. for addition +${PROG} add: scheduling file .mod2-2/file2-2. for addition +${PROG} add: use .${PROG} commit. to add these files permanently" dotest multiroot-setup-10 "${testcvs2} commit -m anyone" \ "${PROG} [a-z]*: Examining \. ${PROG} [a-z]*: Examining mod2-1 @@ -21628,23 +24835,23 @@ done" dotest multiroot-workaround "${testcvs1} -q co -l ." "" dotest multiroot-setup-11 "${testcvs1} co mod1-1 mod1-2" \ -"${PROG} [a-z]*: Updating mod1-1 +"${PROG} checkout: Updating mod1-1 U mod1-1/file1-1 -${PROG} [a-z]*: Updating mod1-2 +${PROG} checkout: Updating mod1-2 U mod1-2/file1-2" dotest multiroot-setup-12 "${testcvs2} co mod2-1 mod2-2" \ -"${PROG} [a-z]*: Updating mod2-1 +"${PROG} checkout: Updating mod2-1 U mod2-1/file2-1 -${PROG} [a-z]*: Updating mod2-2 +${PROG} checkout: Updating mod2-2 U mod2-2/file2-2" cd mod1-2 dotest multiroot-setup-13 "${testcvs2} co mod2-2" \ -"${PROG} [a-z]*: Updating mod2-2 +"${PROG} checkout: Updating mod2-2 U mod2-2/file2-2" cd .. cd mod2-2 dotest multiroot-setup-14 "${testcvs1} co mod1-2" \ -"${PROG} [a-z]*: Updating mod1-2 +"${PROG} checkout: Updating mod1-2 U mod1-2/file1-2" cd .. @@ -21676,33 +24883,33 @@ U mod1-2/file1-2" # choice of which CVSROOT is specified on the command line. dotest multiroot-update-1a "${testcvs1} update" \ -"${PROG} [a-z]*: Updating \. -${PROG} [a-z]*: Updating mod1-1 -${PROG} [a-z]*: Updating mod1-2 -${PROG} [a-z]*: Updating mod1-2/mod2-2 -${PROG} [a-z]*: cannot open directory ${TESTDIR}/root1/mod2-2: No such file or directory -${PROG} [a-z]*: skipping directory mod1-2/mod2-2 -${PROG} [a-z]*: Updating mod2-1 -${PROG} [a-z]*: cannot open directory ${TESTDIR}/root1/mod2-1: No such file or directory -${PROG} [a-z]*: skipping directory mod2-1 -${PROG} [a-z]*: Updating mod2-2 -${PROG} [a-z]*: cannot open directory ${TESTDIR}/root1/mod2-2: No such file or directory -${PROG} [a-z]*: skipping directory mod2-2" +"${PROG} update: Updating \. +${PROG} update: Updating mod1-1 +${PROG} update: Updating mod1-2 +${PROG} update: Updating mod1-2/mod2-2 +${PROG} update: cannot open directory ${CVSROOT1_DIRNAME}/mod2-2: No such file or directory +${PROG} update: skipping directory mod1-2/mod2-2 +${PROG} update: Updating mod2-1 +${PROG} update: cannot open directory ${CVSROOT1_DIRNAME}/mod2-1: No such file or directory +${PROG} update: skipping directory mod2-1 +${PROG} update: Updating mod2-2 +${PROG} update: cannot open directory ${CVSROOT1_DIRNAME}/mod2-2: No such file or directory +${PROG} update: skipping directory mod2-2" # Same deal but with -d ${CVSROOT2}. dotest multiroot-update-1b "${testcvs2} update" \ -"${PROG} [a-z]*: Updating \. -${PROG} [a-z]*: Updating mod1-1 -${PROG} [a-z]*: cannot open directory ${TESTDIR}/root2/mod1-1: No such file or directory -${PROG} [a-z]*: skipping directory mod1-1 -${PROG} [a-z]*: Updating mod1-2 -${PROG} [a-z]*: cannot open directory ${TESTDIR}/root2/mod1-2: No such file or directory -${PROG} [a-z]*: skipping directory mod1-2 -${PROG} [a-z]*: Updating mod2-1 -${PROG} [a-z]*: Updating mod2-2 -${PROG} [a-z]*: Updating mod2-2/mod1-2 -${PROG} [a-z]*: cannot open directory ${TESTDIR}/root2/mod1-2: No such file or directory -${PROG} [a-z]*: skipping directory mod2-2/mod1-2" +"${PROG} update: Updating \. +${PROG} update: Updating mod1-1 +${PROG} update: cannot open directory ${CVSROOT2_DIRNAME}/mod1-1: No such file or directory +${PROG} update: skipping directory mod1-1 +${PROG} update: Updating mod1-2 +${PROG} update: cannot open directory ${CVSROOT2_DIRNAME}/mod1-2: No such file or directory +${PROG} update: skipping directory mod1-2 +${PROG} update: Updating mod2-1 +${PROG} update: Updating mod2-2 +${PROG} update: Updating mod2-2/mod1-2 +${PROG} update: cannot open directory ${CVSROOT2_DIRNAME}/mod1-2: No such file or directory +${PROG} update: skipping directory mod2-2/mod1-2" # modify all files and do a diff @@ -21711,9 +24918,9 @@ ${PROG} [a-z]*: skipping directory mod2-2/mod1-2" echo goes >> mod2-1/file2-1 echo down >> mod2-2/file2-2 - dotest_status multiroot-diff-1 1 "${testcvs} diff" \ + dotest_fail multiroot-diff-1 "${testcvs} diff" \ "${PROG} diff: Diffing \. -${PROG} [a-z]*: Diffing mod1-1 +${PROG} diff: Diffing mod1-1 Index: mod1-1/file1-1 =================================================================== RCS file: ${TESTDIR}/root1/mod1-1/file1-1,v @@ -21721,7 +24928,7 @@ retrieving revision 1\.1 diff -r1\.1 file1-1 1a2 > bobby -${PROG} [a-z]*: Diffing mod1-2 +${PROG} diff: Diffing mod1-2 Index: mod1-2/file1-2 =================================================================== RCS file: ${TESTDIR}/root1/mod1-2/file1-2,v @@ -21729,9 +24936,9 @@ retrieving revision 1\.1 diff -r1\.1 file1-2 1a2 > brown -${PROG} [a-z]*: Diffing mod2-2/mod1-2 -${PROG} [a-z]*: Diffing mod1-2/mod2-2 -${PROG} [a-z]*: Diffing mod2-1 +${PROG} diff: Diffing mod2-2/mod1-2 +${PROG} diff: Diffing mod1-2/mod2-2 +${PROG} diff: Diffing mod2-1 Index: mod2-1/file2-1 =================================================================== RCS file: ${TESTDIR}/root2/mod2-1/file2-1,v @@ -21739,7 +24946,7 @@ retrieving revision 1\.1 diff -r1\.1 file2-1 1a2 > goes -${PROG} [a-z]*: Diffing mod2-2 +${PROG} diff: Diffing mod2-2 Index: mod2-2/file2-2 =================================================================== RCS file: ${TESTDIR}/root2/mod2-2/file2-2,v @@ -21747,8 +24954,8 @@ retrieving revision 1\.1 diff -r1\.1 file2-2 1a2 > down" \ -"${PROG} server: Diffing \. -${PROG} [a-z]*: Diffing mod1-1 +"${PROG} diff: Diffing \. +${PROG} diff: Diffing mod1-1 Index: mod1-1/file1-1 =================================================================== RCS file: ${TESTDIR}/root1/mod1-1/file1-1,v @@ -21756,7 +24963,7 @@ retrieving revision 1\.1 diff -r1\.1 file1-1 1a2 > bobby -${PROG} [a-z]*: Diffing mod1-2 +${PROG} diff: Diffing mod1-2 Index: mod1-2/file1-2 =================================================================== RCS file: ${TESTDIR}/root1/mod1-2/file1-2,v @@ -21764,11 +24971,11 @@ retrieving revision 1\.1 diff -r1\.1 file1-2 1a2 > brown -${PROG} [a-z]*: Diffing mod2-2 -${PROG} [a-z]*: Diffing mod2-2/mod1-2 -${PROG} [a-z]*: Diffing mod1-2 -${PROG} [a-z]*: Diffing mod1-2/mod2-2 -${PROG} [a-z]*: Diffing mod2-1 +${PROG} diff: Diffing mod2-2 +${PROG} diff: Diffing mod2-2/mod1-2 +${PROG} diff: Diffing mod1-2 +${PROG} diff: Diffing mod1-2/mod2-2 +${PROG} diff: Diffing mod2-1 Index: mod2-1/file2-1 =================================================================== RCS file: ${TESTDIR}/root2/mod2-1/file2-1,v @@ -21776,7 +24983,7 @@ retrieving revision 1\.1 diff -r1\.1 file2-1 1a2 > goes -${PROG} [a-z]*: Diffing mod2-2 +${PROG} diff: Diffing mod2-2 Index: mod2-2/file2-2 =================================================================== RCS file: ${TESTDIR}/root2/mod2-2/file2-2,v @@ -21785,7 +24992,6 @@ diff -r1\.1 file2-2 1a2 > down" - dotest multiroot-commit-1 "${testcvs} commit -m actually" \ "${PROG} [a-z]*: Examining \. ${PROG} [a-z]*: Examining mod1-1 @@ -21819,45 +25025,45 @@ ${PROG} [a-z]*: Updating mod2-2/mod1-2 U mod2-2/mod1-2/file1-2 ${PROG} [a-z]*: Updating mod1-2/mod2-2 U mod1-2/mod2-2/file2-2 -${PROG} [a-z]*: Updating mod2-1 -${PROG} [a-z]*: Updating mod2-2" \ -"${PROG} server: Updating \. -${PROG} [a-z]*: Updating mod1-1 -${PROG} [a-z]*: Updating mod1-2 -${PROG} [a-z]*: Updating mod2-2 -${PROG} [a-z]*: Updating mod2-2/mod1-2 +${PROG} update: Updating mod2-1 +${PROG} update: Updating mod2-2" \ +"${PROG} update: Updating \. +${PROG} update: Updating mod1-1 +${PROG} update: Updating mod1-2 +${PROG} update: Updating mod2-2 +${PROG} update: Updating mod2-2/mod1-2 P mod2-2/mod1-2/file1-2 -${PROG} [a-z]*: Updating mod1-2 -${PROG} [a-z]*: Updating mod1-2/mod2-2 +${PROG} update: Updating mod1-2 +${PROG} update: Updating mod1-2/mod2-2 P mod1-2/mod2-2/file2-2 -${PROG} [a-z]*: Updating mod2-1 -${PROG} [a-z]*: Updating mod2-2" +${PROG} update: Updating mod2-1 +${PROG} update: Updating mod2-2" dotest multiroot-tag-1 "${testcvs} tag cattle" \ "${PROG} tag: Tagging \. -${PROG} [a-z]*: Tagging mod1-1 +${PROG} tag: Tagging mod1-1 T mod1-1/file1-1 -${PROG} [a-z]*: Tagging mod1-2 +${PROG} tag: Tagging mod1-2 T mod1-2/file1-2 -${PROG} [a-z]*: Tagging mod2-2/mod1-2 -${PROG} [a-z]*: Tagging mod1-2/mod2-2 +${PROG} tag: Tagging mod2-2/mod1-2 +${PROG} tag: Tagging mod1-2/mod2-2 T mod1-2/mod2-2/file2-2 -${PROG} [a-z]*: Tagging mod2-1 +${PROG} tag: Tagging mod2-1 T mod2-1/file2-1 -${PROG} [a-z]*: Tagging mod2-2" \ -"${PROG} server: Tagging \. -${PROG} [a-z]*: Tagging mod1-1 +${PROG} tag: Tagging mod2-2" \ +"${PROG} tag: Tagging \. +${PROG} tag: Tagging mod1-1 T mod1-1/file1-1 -${PROG} [a-z]*: Tagging mod1-2 +${PROG} tag: Tagging mod1-2 T mod1-2/file1-2 -${PROG} [a-z]*: Tagging mod2-2 -${PROG} [a-z]*: Tagging mod2-2/mod1-2 -${PROG} [a-z]*: Tagging mod1-2 -${PROG} [a-z]*: Tagging mod1-2/mod2-2 +${PROG} tag: Tagging mod2-2 +${PROG} tag: Tagging mod2-2/mod1-2 +${PROG} tag: Tagging mod1-2 +${PROG} tag: Tagging mod1-2/mod2-2 T mod1-2/mod2-2/file2-2 -${PROG} [a-z]*: Tagging mod2-1 +${PROG} tag: Tagging mod2-1 T mod2-1/file2-1 -${PROG} [a-z]*: Tagging mod2-2" +${PROG} tag: Tagging mod2-2" echo anotherfile1-1 > mod1-1/anotherfile1-1 echo anotherfile2-1 > mod2-1/anotherfile2-1 @@ -21867,33 +25073,33 @@ ${PROG} [a-z]*: Tagging mod2-2" if $remote; then cd mod1-1 dotest multiroot-add-1ar "${testcvs} add anotherfile1-1" \ -"${PROG} [a-z]*: scheduling file .anotherfile1-1. for addition -${PROG} [a-z]*: use .${PROG} commit. to add this file permanently" +"${PROG} add: scheduling file .anotherfile1-1. for addition +${PROG} add: use .${PROG} commit. to add this file permanently" cd ../mod2-1 dotest multiroot-add-1br "${testcvs} add anotherfile2-1" \ -"${PROG} [a-z]*: scheduling file .anotherfile2-1. for addition -${PROG} [a-z]*: use .${PROG} commit. to add this file permanently" +"${PROG} add: scheduling file .anotherfile2-1. for addition +${PROG} add: use .${PROG} commit. to add this file permanently" cd ../mod2-2/mod1-2 dotest multiroot-add-1cr "${testcvs} add anotherfile1-2" \ -"${PROG} [a-z]*: scheduling file .anotherfile1-2. for addition -${PROG} [a-z]*: use .${PROG} commit. to add this file permanently" +"${PROG} add: scheduling file .anotherfile1-2. for addition +${PROG} add: use .${PROG} commit. to add this file permanently" cd ../../mod1-2/mod2-2 dotest multiroot-add-1dr "${testcvs} add anotherfile2-2" \ -"${PROG} [a-z]*: scheduling file .anotherfile2-2. for addition -${PROG} [a-z]*: use .${PROG} commit. to add this file permanently" +"${PROG} add: scheduling file .anotherfile2-2. for addition +${PROG} add: use .${PROG} commit. to add this file permanently" cd ../.. else dotest multiroot-add-1 "${testcvs} add mod1-1/anotherfile1-1 mod2-1/anotherfile2-1 mod2-2/mod1-2/anotherfile1-2 mod1-2/mod2-2/anotherfile2-2" \ -"${PROG} [a-z]*: scheduling file .mod1-1/anotherfile1-1. for addition -${PROG} [a-z]*: scheduling file .mod2-1/anotherfile2-1. for addition -${PROG} [a-z]*: scheduling file .mod2-2/mod1-2/anotherfile1-2. for addition -${PROG} [a-z]*: scheduling file .mod1-2/mod2-2/anotherfile2-2. for addition -${PROG} [a-z]*: use .${PROG} commit. to add these files permanently" +"${PROG} add: scheduling file .mod1-1/anotherfile1-1. for addition +${PROG} add: scheduling file .mod2-1/anotherfile2-1. for addition +${PROG} add: scheduling file .mod2-2/mod1-2/anotherfile1-2. for addition +${PROG} add: scheduling file .mod1-2/mod2-2/anotherfile2-2. for addition +${PROG} add: use .${PROG} commit. to add these files permanently" fi dotest multiroot-status-1 "${testcvs} status -v" \ "${PROG} status: Examining \. -${PROG} [a-z]*: Examining mod1-1 +${PROG} status: Examining mod1-1 =================================================================== File: anotherfile1-1 Status: Locally Added @@ -21915,7 +25121,7 @@ File: file1-1 Status: Up-to-date Existing Tags: cattle (revision: 1\.2) -${PROG} [a-z]*: Examining mod1-2 +${PROG} status: Examining mod1-2 =================================================================== File: file1-2 Status: Up-to-date @@ -21928,7 +25134,7 @@ File: file1-2 Status: Up-to-date Existing Tags: cattle (revision: 1\.2) -${PROG} [a-z]*: Examining mod2-2/mod1-2 +${PROG} status: Examining mod2-2/mod1-2 =================================================================== File: anotherfile1-2 Status: Locally Added @@ -21950,7 +25156,7 @@ File: file1-2 Status: Up-to-date Existing Tags: cattle (revision: 1\.2) -${PROG} [a-z]*: Examining mod1-2/mod2-2 +${PROG} status: Examining mod1-2/mod2-2 =================================================================== File: anotherfile2-2 Status: Locally Added @@ -21972,7 +25178,7 @@ File: file2-2 Status: Up-to-date Existing Tags: cattle (revision: 1\.2) -${PROG} [a-z]*: Examining mod2-1 +${PROG} status: Examining mod2-1 =================================================================== File: anotherfile2-1 Status: Locally Added @@ -21994,7 +25200,7 @@ File: file2-1 Status: Up-to-date Existing Tags: cattle (revision: 1\.2) -${PROG} [a-z]*: Examining mod2-2 +${PROG} status: Examining mod2-2 =================================================================== File: file2-2 Status: Up-to-date @@ -22006,8 +25212,8 @@ File: file2-2 Status: Up-to-date Existing Tags: cattle (revision: 1\.2)" \ -"${PROG} server: Examining \. -${PROG} [a-z]*: Examining mod1-1 +"${PROG} status: Examining \. +${PROG} status: Examining mod1-1 =================================================================== File: anotherfile1-1 Status: Locally Added @@ -22029,7 +25235,7 @@ File: file1-1 Status: Up-to-date Existing Tags: cattle (revision: 1\.2) -${PROG} [a-z]*: Examining mod1-2 +${PROG} status: Examining mod1-2 =================================================================== File: file1-2 Status: Up-to-date @@ -22042,8 +25248,8 @@ File: file1-2 Status: Up-to-date Existing Tags: cattle (revision: 1\.2) -${PROG} [a-z]*: Examining mod2-2 -${PROG} [a-z]*: Examining mod2-2/mod1-2 +${PROG} status: Examining mod2-2 +${PROG} status: Examining mod2-2/mod1-2 =================================================================== File: anotherfile1-2 Status: Locally Added @@ -22065,8 +25271,8 @@ File: file1-2 Status: Up-to-date Existing Tags: cattle (revision: 1\.2) -${PROG} [a-z]*: Examining mod1-2 -${PROG} [a-z]*: Examining mod1-2/mod2-2 +${PROG} status: Examining mod1-2 +${PROG} status: Examining mod1-2/mod2-2 =================================================================== File: anotherfile2-2 Status: Locally Added @@ -22088,7 +25294,7 @@ File: file2-2 Status: Up-to-date Existing Tags: cattle (revision: 1\.2) -${PROG} [a-z]*: Examining mod2-1 +${PROG} status: Examining mod2-1 =================================================================== File: anotherfile2-1 Status: Locally Added @@ -22110,7 +25316,7 @@ File: file2-1 Status: Up-to-date Existing Tags: cattle (revision: 1\.2) -${PROG} [a-z]*: Examining mod2-2 +${PROG} status: Examining mod2-2 =================================================================== File: file2-2 Status: Up-to-date @@ -22166,21 +25372,21 @@ ${PROG} [a-z]*: Updating mod1-2/mod2-2 ${PROG} [a-z]*: Updating mod2-1 ${PROG} [a-z]*: Updating mod2-2 U mod2-2/anotherfile2-2" \ -"${PROG} server: Updating \. -${PROG} [a-z]*: Updating mod1-1 -${PROG} [a-z]*: Updating mod1-2 +"${PROG} update: Updating \. +${PROG} update: Updating mod1-1 +${PROG} update: Updating mod1-2 U mod1-2/anotherfile1-2 -${PROG} [a-z]*: Updating mod2-2 -${PROG} [a-z]*: Updating mod2-2/mod1-2 -${PROG} [a-z]*: Updating mod1-2 -${PROG} [a-z]*: Updating mod1-2/mod2-2 -${PROG} [a-z]*: Updating mod2-1 -${PROG} [a-z]*: Updating mod2-2 +${PROG} update: Updating mod2-2 +${PROG} update: Updating mod2-2/mod1-2 +${PROG} update: Updating mod1-2 +${PROG} update: Updating mod1-2/mod2-2 +${PROG} update: Updating mod2-1 +${PROG} update: Updating mod2-2 U mod2-2/anotherfile2-2" dotest multiroot-log-1 "${testcvs} log" \ "${PROG} log: Logging \. -${PROG} [a-z]*: Logging mod1-1 +${PROG} log: Logging mod1-1 RCS file: ${CVSROOT1_DIRNAME}/mod1-1/anotherfile1-1,v Working file: mod1-1/anotherfile1-1 @@ -22218,7 +25424,7 @@ revision 1\.1 date: [0-9/]* [0-9:]*; author: ${username}; state: Exp; is ============================================================================= -${PROG} [a-z]*: Logging mod1-2 +${PROG} log: Logging mod1-2 RCS file: ${CVSROOT1_DIRNAME}/mod1-2/anotherfile1-2,v Working file: mod1-2/anotherfile1-2 @@ -22256,7 +25462,7 @@ revision 1\.1 date: [0-9/]* [0-9:]*; author: ${username}; state: Exp; is ============================================================================= -${PROG} [a-z]*: Logging mod2-2/mod1-2 +${PROG} log: Logging mod2-2/mod1-2 RCS file: ${CVSROOT1_DIRNAME}/mod1-2/anotherfile1-2,v Working file: mod2-2/mod1-2/anotherfile1-2 @@ -22294,7 +25500,7 @@ revision 1\.1 date: [0-9/]* [0-9:]*; author: ${username}; state: Exp; is ============================================================================= -${PROG} [a-z]*: Logging mod1-2/mod2-2 +${PROG} log: Logging mod1-2/mod2-2 RCS file: ${CVSROOT2_DIRNAME}/mod2-2/anotherfile2-2,v Working file: mod1-2/mod2-2/anotherfile2-2 @@ -22332,7 +25538,7 @@ revision 1\.1 date: [0-9/]* [0-9:]*; author: ${username}; state: Exp; anyone ============================================================================= -${PROG} [a-z]*: Logging mod2-1 +${PROG} log: Logging mod2-1 RCS file: ${CVSROOT2_DIRNAME}/mod2-1/anotherfile2-1,v Working file: mod2-1/anotherfile2-1 @@ -22370,7 +25576,7 @@ revision 1\.1 date: [0-9/]* [0-9:]*; author: ${username}; state: Exp; anyone ============================================================================= -${PROG} [a-z]*: Logging mod2-2 +${PROG} log: Logging mod2-2 RCS file: ${CVSROOT2_DIRNAME}/mod2-2/anotherfile2-2,v Working file: mod2-2/anotherfile2-2 @@ -22408,8 +25614,8 @@ revision 1\.1 date: [0-9/]* [0-9:]*; author: ${username}; state: Exp; anyone =============================================================================" \ -"${PROG} server: Logging \. -${PROG} [a-z]*: Logging mod1-1 +"${PROG} log: Logging \. +${PROG} log: Logging mod1-1 RCS file: ${CVSROOT1_DIRNAME}/mod1-1/anotherfile1-1,v Working file: mod1-1/anotherfile1-1 @@ -22447,7 +25653,7 @@ revision 1\.1 date: [0-9/]* [0-9:]*; author: ${username}; state: Exp; is ============================================================================= -${PROG} [a-z]*: Logging mod1-2 +${PROG} log: Logging mod1-2 RCS file: ${CVSROOT1_DIRNAME}/mod1-2/anotherfile1-2,v Working file: mod1-2/anotherfile1-2 @@ -22485,8 +25691,8 @@ revision 1\.1 date: [0-9/]* [0-9:]*; author: ${username}; state: Exp; is ============================================================================= -${PROG} [a-z]*: Logging mod2-2 -${PROG} [a-z]*: Logging mod2-2/mod1-2 +${PROG} log: Logging mod2-2 +${PROG} log: Logging mod2-2/mod1-2 RCS file: ${CVSROOT1_DIRNAME}/mod1-2/anotherfile1-2,v Working file: mod2-2/mod1-2/anotherfile1-2 @@ -22524,8 +25730,8 @@ revision 1\.1 date: [0-9/]* [0-9:]*; author: ${username}; state: Exp; is ============================================================================= -${PROG} [a-z]*: Logging mod1-2 -${PROG} [a-z]*: Logging mod1-2/mod2-2 +${PROG} log: Logging mod1-2 +${PROG} log: Logging mod1-2/mod2-2 RCS file: ${CVSROOT2_DIRNAME}/mod2-2/anotherfile2-2,v Working file: mod1-2/mod2-2/anotherfile2-2 @@ -22563,7 +25769,7 @@ revision 1\.1 date: [0-9/]* [0-9:]*; author: ${username}; state: Exp; anyone ============================================================================= -${PROG} [a-z]*: Logging mod2-1 +${PROG} log: Logging mod2-1 RCS file: ${CVSROOT2_DIRNAME}/mod2-1/anotherfile2-1,v Working file: mod2-1/anotherfile2-1 @@ -22601,7 +25807,7 @@ revision 1\.1 date: [0-9/]* [0-9:]*; author: ${username}; state: Exp; anyone ============================================================================= -${PROG} [a-z]*: Logging mod2-2 +${PROG} log: Logging mod2-2 RCS file: ${CVSROOT2_DIRNAME}/mod2-2/anotherfile2-2,v Working file: mod2-2/anotherfile2-2 @@ -22663,12 +25869,8 @@ anyone CVSROOT1_DIRNAME=${TESTDIR}/root1 CVSROOT2_DIRNAME=${TESTDIR}/root2 - CVSROOT1=${CVSROOT1_DIRNAME} ; export CVSROOT1 - CVSROOT2=${CVSROOT2_DIRNAME} ; export CVSROOT2 - if $remote; then - CVSROOT1=:fork:${CVSROOT1_DIRNAME} ; export CVSROOT1 - CVSROOT2=:fork:${CVSROOT2_DIRNAME} ; export CVSROOT2 - fi + CVSROOT1=`newroot $CVSROOT1_DIRNAME` + CVSROOT2=`newroot $CVSROOT2_DIRNAME` dotest multiroot2-1 "${testcvs} -d ${CVSROOT1} init" "" dotest multiroot2-2 "${testcvs} -d ${CVSROOT2} init" "" @@ -22686,8 +25888,8 @@ N dir1/file1 N dir1/sdir/sfile N dir1/sdir/ssdir/ssfile No conflicts created by this import -${PROG} [a-z]*: Importing ${TESTDIR}/root1/dir1/sdir -${PROG} [a-z]*: Importing ${TESTDIR}/root1/dir1/sdir/ssdir" +${PROG} import: Importing ${TESTDIR}/root1/dir1/sdir +${PROG} import: Importing ${TESTDIR}/root1/dir1/sdir/ssdir" cd sdir dotest_sort multiroot2-4 \ "${testcvs} -d ${CVSROOT2} import -m import-to-root2 sdir vend2 rel2" " @@ -22695,7 +25897,7 @@ ${PROG} [a-z]*: Importing ${TESTDIR}/root1/dir1/sdir/ssdir" N sdir/sfile N sdir/ssdir/ssfile No conflicts created by this import -${PROG} [a-z]*: Importing ${TESTDIR}/root2/sdir/ssdir" +${PROG} import: Importing ${TESTDIR}/root2/sdir/ssdir" cd ../.. mkdir 1; cd 1 @@ -22719,11 +25921,11 @@ U sdir/ssdir/ssfile" ${PROG} update: Updating dir1 ${PROG} update: Updating dir1/sdir ${PROG} update: Updating dir1/sdir/ssdir" \ -"${PROG} server: Updating \. -${PROG} server: Updating dir1 -${PROG} server: Updating dir1 -${PROG} server: Updating dir1/sdir -${PROG} server: Updating dir1/sdir/ssdir" +"${PROG} update: Updating \. +${PROG} update: Updating dir1 +${PROG} update: Updating dir1 +${PROG} update: Updating dir1/sdir +${PROG} update: Updating dir1/sdir/ssdir" # Two reasons we don't run this on the server: (1) the server # also prints some trace messages, and (2) the server trace # messages are subject to out-of-order bugs (this one is hard @@ -22766,7 +25968,7 @@ done" "T dir1/file1 T dir1/sdir/sfile T dir1/sdir/ssdir/ssfile" - dotest_status multiroot2-12 1 \ + dotest_fail multiroot2-12 \ "${testcvs} -q diff -u -r tag1 -r tag2" \ "Index: dir1/file1 =================================================================== @@ -22809,13 +26011,8 @@ ${PLUS}change him too" # Not drastically different from multiroot but it covers somewhat # different stuff. - if $remote; then - CVSROOT1=:fork:${TESTDIR}/root1 ; export CVSROOT1 - CVSROOT2=:fork:${TESTDIR}/root2 ; export CVSROOT2 - else - CVSROOT1=${TESTDIR}/root1 ; export CVSROOT1 - CVSROOT2=${TESTDIR}/root2 ; export CVSROOT2 - fi + CVSROOT1=`newroot ${TESTDIR}/root1` + CVSROOT2=`newroot ${TESTDIR}/root2` mkdir 1; cd 1 dotest multiroot3-1 "${testcvs} -d ${CVSROOT1} init" "" @@ -22849,17 +26046,17 @@ ${PLUS}change him too" # having a different root from the child, hence the cd. cd dir1 dotest multiroot3-8 "${testcvs} add file1" \ -"${PROG} [a-z]*: scheduling file .file1. for addition -${PROG} [a-z]*: use .${PROG} commit. to add this file permanently" +"${PROG} add: scheduling file .file1. for addition +${PROG} add: use .${PROG} commit. to add this file permanently" cd .. dotest multiroot3-8a "${testcvs} add dir2/file2" \ -"${PROG} [a-z]*: scheduling file .dir2/file2. for addition -${PROG} [a-z]*: use .${PROG} commit. to add this file permanently" +"${PROG} add: scheduling file .dir2/file2. for addition +${PROG} add: use .${PROG} commit. to add this file permanently" else dotest multiroot3-8 "${testcvs} add dir1/file1 dir2/file2" \ -"${PROG} [a-z]*: scheduling file .dir1/file1. for addition -${PROG} [a-z]*: scheduling file .dir2/file2. for addition -${PROG} [a-z]*: use .${PROG} commit. to add these files permanently" +"${PROG} add: scheduling file .dir1/file1. for addition +${PROG} add: scheduling file .dir2/file2. for addition +${PROG} add: use .${PROG} commit. to add these files permanently" fi dotest multiroot3-9 "${testcvs} -q ci -m add-them" \ @@ -22880,50 +26077,54 @@ done" # something which doesn't make sense. dotest_fail multiroot3-10 \ "${testcvs} -q -d ${CVSROOT1} diff dir1/file1 dir2/file2" \ -"${PROG} [a-z]*: failed to create lock directory for .${TESTDIR}/root1/dir2' (${TESTDIR}/root1/dir2/#cvs.lock): No such file or directory -${PROG} [a-z]*: failed to obtain dir lock in repository .${TESTDIR}/root1/dir2' -${PROG} \[[a-z]* aborted\]: read lock failed - giving up" +"${PROG} diff: failed to create lock directory for .${TESTDIR}/root1/dir2' (${TESTDIR}/root1/dir2/#cvs.lock): No such file or directory +${PROG} diff: failed to obtain dir lock in repository .${TESTDIR}/root1/dir2' +${PROG} \[diff aborted\]: read lock failed - giving up" # This one is supposed to work. dotest multiroot3-11 "${testcvs} -q diff dir1/file1 dir2/file2" "" # make sure we can't access across repositories - # FIXCVS: we probably shouldn't even create the local directories - # in this case, but we do, so deal with it. mkdir 1a cd 1a dotest_fail multiroot3-12 \ -"${testcvs} -d ${CVSROOT1} -q co ../root2/dir2" \ -"${PROG} [a-z]*: in directory \.\./root2/dir2: -${PROG} [a-z]*: .\.\..-relative repositories are not supported. -${PROG} \[[a-z]* aborted\]: illegal source repository" - rm -rf ../root2 +"$testcvs -d $CVSROOT1 -q co ../root2/dir2" \ +"$PROG \[checkout aborted\]: up-level in module reference (\`..') invalid: \`\.\./root2/dir2'\." \ +"$PROG \[server aborted\]: up-level in module reference (\`..') invalid: \`\.\./root2/dir2'\. +$PROG \[checkout aborted\]: end of file from server (consult above messages if any)" dotest_fail multiroot3-13 \ -"${testcvs} -d ${CVSROOT2} -q co ../root1/dir1" \ -"${PROG} [a-z]*: in directory \.\./root1/dir1: -${PROG} [a-z]*: .\.\..-relative repositories are not supported. -${PROG} \[[a-z]* aborted\]: illegal source repository" - rm -rf ../root1 +"$testcvs -d $CVSROOT2 -q co ../root1/dir1" \ +"$PROG \[checkout aborted\]: up-level in module reference (\`..') invalid: \`\.\./root1/dir1'\." \ +"$PROG \[server aborted\]: up-level in module reference (\`..') invalid: \`\.\./root1/dir1'\. +$PROG \[checkout aborted\]: end of file from server (consult above messages if any)" dotest_fail multiroot3-14 \ -"${testcvs} -d ${CVSROOT1} -q co ./../root2/dir2" \ -"${PROG} [a-z]*: in directory \./\.\./root2/dir2: -${PROG} [a-z]*: .\.\..-relative repositories are not supported. -${PROG} \[[a-z]* aborted\]: illegal source repository" - rm -rf ../root2 +"$testcvs -d $CVSROOT1 -q co ./../root2/dir2" \ +"$PROG \[checkout aborted\]: up-level in module reference (\`..') invalid: \`\./\.\./root2/dir2'\." \ +"$PROG \[server aborted\]: up-level in module reference (\`..') invalid: \`\./\.\./root2/dir2'\. +$PROG \[checkout aborted\]: end of file from server (consult above messages if any)" dotest_fail multiroot3-15 \ -"${testcvs} -d ${CVSROOT2} -q co ./../root1/dir1" \ -"${PROG} [a-z]*: in directory \./\.\./root1/dir1: -${PROG} [a-z]*: .\.\..-relative repositories are not supported. -${PROG} \[[a-z]* aborted\]: illegal source repository" - rm -rf ../root1 - - cd ../.. +"$testcvs -d $CVSROOT2 -q co ./../root1/dir1" \ +"$PROG \[checkout aborted\]: up-level in module reference (\`..') invalid: \`\./\.\./root1/dir1'\." \ +"$PROG \[server aborted\]: up-level in module reference (\`..') invalid: \`\./\.\./root1/dir1'\. +$PROG \[checkout aborted\]: end of file from server (consult above messages if any)" + dotest_fail multiroot3-16 \ +"$testcvs -d $CVSROOT1 -q co -p ../root2/dir2" \ +"$PROG \[checkout aborted\]: up-level in module reference (\`..') invalid: \`\.\./root2/dir2'\." \ +"$PROG \[server aborted\]: up-level in module reference (\`..') invalid: \`\.\./root2/dir2'\. +$PROG \[checkout aborted\]: end of file from server (consult above messages if any)" + dotest_fail multiroot3-17 \ +"$testcvs -d $CVSROOT1 -q co -p ./../root1/dir1" \ +"$PROG \[checkout aborted\]: up-level in module reference (\`..') invalid: \`\./\.\./root1/dir1'\." \ +"$PROG \[server aborted\]: up-level in module reference (\`..') invalid: \`\./\.\./root1/dir1'\. +$PROG \[checkout aborted\]: end of file from server (consult above messages if any)" if $keep; then - echo Keeping ${TESTDIR} and exiting due to --keep + echo Keeping $TESTDIR and exiting due to --keep exit 0 fi + cd ../.. + rm -r 1 rm -rf ${TESTDIR}/root1 ${TESTDIR}/root2 unset CVSROOT1 @@ -22934,13 +26135,9 @@ ${PROG} \[[a-z]* aborted\]: illegal source repository" # More multiroot tests, in particular we have two roots with # similarly-named directories and we try to see that CVS can # keep them separate. - if $remote; then - CVSROOT1=:fork:${TESTDIR}/root1 ; export CVSROOT1 - CVSROOT2=:fork:${TESTDIR}/root2 ; export CVSROOT2 - else - CVSROOT1=${TESTDIR}/root1 ; export CVSROOT1 - CVSROOT2=${TESTDIR}/root2 ; export CVSROOT2 - fi + + CVSROOT1=`newroot ${TESTDIR}/root1` + CVSROOT2=`newroot ${TESTDIR}/root2` mkdir 1; cd 1 dotest multiroot4-1 "${testcvs} -d ${CVSROOT1} init" "" @@ -22951,8 +26148,8 @@ ${PROG} \[[a-z]* aborted\]: illegal source repository" cd dircom touch file1 dotest multiroot4-4 "${testcvs} add file1" \ -"${PROG} [a-z]*: scheduling file .file1. for addition -${PROG} [a-z]*: use .${PROG} commit. to add this file permanently" +"${PROG} add: scheduling file .file1. for addition +${PROG} add: use .${PROG} commit. to add this file permanently" dotest multiroot4-5 "${testcvs} -q ci -m add" \ "RCS file: ${TESTDIR}/root1/dircom/file1,v done @@ -22970,8 +26167,8 @@ done" cd dircom touch file2 dotest multiroot4-9 "${testcvs} add file2" \ -"${PROG} [a-z]*: scheduling file .file2. for addition -${PROG} [a-z]*: use .${PROG} commit. to add this file permanently" +"${PROG} add: scheduling file .file2. for addition +${PROG} add: use .${PROG} commit. to add this file permanently" dotest multiroot4-10 "${testcvs} -q ci -m add" \ "RCS file: ${TESTDIR}/root2/dircom/file2,v done @@ -23019,9 +26216,9 @@ done" cd first-dir touch file1 file2 dotest rmroot-setup-3 "${testcvs} add file1 file2" \ -"${PROG} [a-z]*: scheduling file .file1. for addition -${PROG} [a-z]*: scheduling file .file2. for addition -${PROG} [a-z]*: use .${PROG} commit. to add these files permanently" +"${PROG} add: scheduling file .file1. for addition +${PROG} add: scheduling file .file2. for addition +${PROG} add: use .${PROG} commit. to add these files permanently" dotest rmroot-setup-4 "${testcvs} -q commit -minit" \ "RCS file: ${CVSROOT_DIRNAME}/first-dir/file1,v done @@ -23046,14 +26243,8 @@ done" # More tests of repositories and specifying them. # Similar to crerepos but that test is probably getting big # enough. - - if $remote; then - CVSROOT1=:fork:${TESTDIR}/root1 ; export CVSROOT1 - CVSROOT_MOVED=:fork:${TESTDIR}/root-moved ; export CVSROOT1 - else - CVSROOT1=${TESTDIR}/root1 ; export CVSROOT1 - CVSROOT_MOVED=${TESTDIR}/root-moved ; export CVSROOT1 - fi + CVSROOT1=`newroot ${TESTDIR}/root1` + CVSROOT_MOVED=`newroot ${TESTDIR}/root-moved` dotest reposmv-setup-1 "${testcvs} -d ${CVSROOT1} init" "" mkdir imp-dir; cd imp-dir @@ -23091,41 +26282,41 @@ ${PROG} update: skipping directory " # CVS/Root overrides $CVSROOT if $remote; then - CVSROOT_SAVED=${CVSROOT} + CVSROOT_save=${CVSROOT} CVSROOT=:fork:${TESTDIR}/root-moved; export CVSROOT dotest_fail reposmv-3r "${testcvs} update" \ "Cannot access ${TESTDIR}/root1/CVSROOT No such file or directory" - CVSROOT=${CVSROOT_SAVED}; export CVSROOT + CVSROOT=${CVSROOT_save}; export CVSROOT else - CVSROOT_SAVED=${CVSROOT} + CVSROOT_save=${CVSROOT} CVSROOT=${TESTDIR}/root-moved; export CVSROOT dotest reposmv-3 "${testcvs} update" \ "${DOTSTAR} ${PROG} update: ignoring CVS/Root because it specifies a non-existent repository ${TESTDIR}/root1 ${PROG} update: Updating \. ${DOTSTAR}" - CVSROOT=${CVSROOT_SAVED}; export CVSROOT + CVSROOT=${CVSROOT_save}; export CVSROOT fi if $remote; then - CVSROOT_SAVED=${CVSROOT} + CVSROOT_save=${CVSROOT} CVSROOT=:fork:${TESTDIR}/root-none; export CVSROOT dotest_fail reposmv-4 "${testcvs} update" \ "Cannot access ${TESTDIR}/root1/CVSROOT No such file or directory" - CVSROOT=${CVSROOT_SAVED}; export CVSROOT + CVSROOT=${CVSROOT_save}; export CVSROOT else # CVS/Root doesn't seem to quite completely override $CVSROOT # Bug? Not necessarily a big deal if it only affects error # messages. - CVSROOT_SAVED=${CVSROOT} + CVSROOT_save=${CVSROOT} CVSROOT=${TESTDIR}/root-none; export CVSROOT dotest_fail reposmv-4 "${testcvs} update" \ "${PROG} update: in directory \.: ${PROG} update: ignoring CVS/Root because it specifies a non-existent repository ${TESTDIR}/root1 ${PROG} \[update aborted\]: ${TESTDIR}/root-none/CVSROOT: No such file or directory" - CVSROOT=${CVSROOT_SAVED}; export CVSROOT + CVSROOT=${CVSROOT_save}; export CVSROOT fi # -d overrides CVS/Root @@ -23134,7 +26325,7 @@ ${PROG} \[update aborted\]: ${TESTDIR}/root-none/CVSROOT: No such file or direct # local (that is, it would appear that CVS/Root would not # get used, but would produce an error if it didn't exist). dotest reposmv-5 "${testcvs} -d ${CVSROOT_MOVED} update" \ -"${PROG} [a-z]*: Updating \." +"${PROG} update: Updating \." # TODO: could also test various other things, like what if the # user removes CVS/Root (which is legit). Or another set of @@ -23162,9 +26353,10 @@ ${PROG} \[update aborted\]: ${TESTDIR}/root-none/CVSROOT: No such file or direct ${CVSROOT_DIRNAME}/CVSROOT/config,v <-- config new revision: 1\.[0-9]*; previous revision: 1\.[0-9]* done -${PROG} [a-z]*: Rebuilding administrative file database" +${PROG} commit: Rebuilding administrative file database" cat >${CVSROOT_DIRNAME}/CVSROOT/passwd <<EOF testme:q6WV9d2t848B2:$username +dontroot:q6WV9d2t848B2:root anonymous::$username $username: willfail: :whocares @@ -23178,6 +26370,28 @@ Ay::'d END AUTH REQUEST EOF + # Confirm that not sending a newline during auth cannot constitute + # a denial-of-service attack. This assumes that PATH_MAX is less + # than 65536 bytes. If PATH_MAX is larger than 65535 bytes, this + # test could hang indefinitely. + ${AWK} 'BEGIN { printf "0123456789abcdef" }' </dev/null >garbageseg + echo "BEGIN AUTH REQUEST" >garbageinput + i=0 + while test $i -lt 64; do + cat <garbageseg >>garbageseg2 + i=`expr $i + 1` + done + i=0 + while test $i -lt 64; do + cat <garbageseg2 >>garbageinput + i=`expr $i + 1` + done + dotest_fail pserver-auth-no-dos \ +"${testcvs} --allow-root=${CVSROOT_DIRNAME} pserver" \ +"${PROG} \\[pserver aborted\\]: Maximum line length exceeded during authentication\." <garbageinput + unset i + rm garbageseg garbageseg2 garbageinput + # Sending the Root and noop before waiting for the # "I LOVE YOU" is bogus, but hopefully we can get # away with it. @@ -23193,6 +26407,16 @@ Root ${CVSROOT_DIRNAME} noop EOF + dotest_fail pserver-4.2 \ +"${testcvs} --allow-root=${CVSROOT_DIRNAME} pserver" \ +"error 0: root not allowed" <<EOF +BEGIN AUTH REQUEST +${CVSROOT_DIRNAME} +dontroot +Ay::'d +END AUTH REQUEST +EOF + dotest pserver-5 "${testcvs} --allow-root=${CVSROOT_DIRNAME} pserver" \ "${DOTSTAR} LOVE YOU E Protocol error: Root says \"${TESTDIR}/1\" but pserver says \"${CVSROOT_DIRNAME}\" @@ -23554,7 +26778,7 @@ EOF # pserver used to try and print from the NULL pointer # in this error message in this case dotest_fail pserver-bufinit "${testcvs} pserver" \ -"$PROG \[pserver aborted\]: bad auth protocol start: EOF" </dev/null +"${PROG} \[pserver aborted\]: bad auth protocol start: EOF" </dev/null # Clean up. echo "# comments only" >config @@ -23563,7 +26787,7 @@ EOF ${CVSROOT_DIRNAME}/CVSROOT/config,v <-- config new revision: 1\.[0-9]*; previous revision: 1\.[0-9]* done -${PROG} [a-z]*: Rebuilding administrative file database" +${PROG} commit: Rebuilding administrative file database" cd ../.. rm -r 1 rm ${CVSROOT_DIRNAME}/CVSROOT/passwd ${CVSROOT_DIRNAME}/CVSROOT/writers @@ -23741,6 +26965,14 @@ ${TESTDIR}/crerepos/dir1 editors EOF + # Test that the global `-l' option is ignored nonfatally. + dotest server-16 "${testcvs} server" \ +"E cvs server: WARNING: global \`-l' option ignored\. +ok" <<EOF +Global_option -l +noop +EOF + if $keep; then echo Keeping ${TESTDIR} and exiting due to --keep exit 0 @@ -23756,7 +26988,7 @@ EOF # possible security holes are plugged. if $remote; then dotest server2-1 "${testcvs} server" \ -"E protocol error: directory '${CVSROOT_DIRNAME}/\.\./dir1' not within root '${TESTDIR}/cvsroot' +"E protocol error: directory '${CVSROOT_DIRNAME}/\.\./dir1' not within root '${CVSROOT_DIRNAME}' error " <<EOF Root ${CVSROOT_DIRNAME} Directory . @@ -23765,7 +26997,7 @@ noop EOF dotest server2-2 "${testcvs} server" \ -"E protocol error: directory '${CVSROOT_DIRNAME}dir1' not within root '${TESTDIR}/cvsroot' +"E protocol error: directory '${CVSROOT_DIRNAME}dir1' not within root '${CVSROOT_DIRNAME}' error " <<EOF Root ${CVSROOT_DIRNAME} Directory . @@ -23820,7 +27052,13 @@ echo "xyz" echo "ok" cat >/dev/null EOF - chmod +x ${TESTDIR}/serveme + # Cygwin. Pthffffffffft! + if test -n "$remotehost"; then + $CVS_RSH $remotehost "chmod +x ${TESTDIR}/serveme" + else + chmod +x ${TESTDIR}/serveme + fi + save_CVS_SERVER=$CVS_SERVER CVS_SERVER=${TESTDIR}/serveme; export CVS_SERVER mkdir 1; cd 1 dotest_fail client-1 "${testcvs} -q co first-dir" \ @@ -23885,6 +27123,7 @@ EOF # By specifying the time zone in local time, we don't # know exactly how that will translate to GMT. dotest client-8 "${testcvs} update -D 99-10-04" "OK, whatever" + # String 2 below is Cygwin again - ptoooey. dotest client-9 "cat ${TESTDIR}/client.tmp" \ "Root ${CVSROOT_DIRNAME} Valid-responses [-a-zA-Z ]* @@ -23899,16 +27138,261 @@ Modified file1 u=rw,g=,o= 4 abc +update" \ +"Root ${CVSROOT_DIRNAME} +Valid-responses [-a-zA-Z ]* +valid-requests +Argument -D +Argument [34] Oct 1999 [0-9][0-9]:00:00 -0000 +Argument -- +Directory \. +${CVSROOT_DIRNAME}/first-dir +Entry /file1/1\.2/// +Modified file1 +u=rw,g=r,o=r +4 +abc update" + # The following test tests what was a potential client update in + # CVS versions 1.11.14 and CVS versions 1.12.6 and earlier. This + # exploit would allow a trojan server to create arbitrary files, + # anywhere the user had write permissions, even outside of the + # user's sandbox. + cat >$HOME/.bashrc <<EOF +#!$TESTSHELL +# This is where login scripts would usually be +# stored. +EOF + cat >$TESTDIR/serveme <<EOF +#!$TESTSHELL +echo "Valid-requests Root Valid-responses valid-requests Directory Entry Modified Unchanged Argument Argumentx ci co update" +echo "ok" +echo "Rcs-diff $HOME/" +echo "$HOME/.bashrc" +echo "/.bashrc/73.50///" +echo "u=rw,g=rw,o=rw" +echo "20" +echo "a1 1" +echo "echo 'gotcha!'" +echo "ok" +cat >/dev/null +EOF + + # If I don't run the following sleep between the above cat and + # the following calls to dotest, sometimes the serveme file isn't + # completely written yet by the time CVS tries to execute it, + # causing the shell to intermittantly report syntax errors (usually + # early EOF). There's probably a new race condition here, but this + # works. + # + # Incidentally, I can reproduce this behavior with Linux 2.4.20 and + # Bash 2.05 or Bash 2.05b. + sleep 1 + dotest_fail client-10 "$testcvs update" \ +"$PROG update: Server attempted to update a file via an invalid pathname: +$PROG \[update aborted\]: \`$HOME/.bashrc'\." + + # A second try at a client exploit. This one never actually + # failed in the past, but I thought it wouldn't hurt to add a test. + cat >$TESTDIR/serveme <<EOF +#!$TESTSHELL +echo "Valid-requests Root Valid-responses valid-requests Directory Entry Modified Unchanged Argument Argumentx ci co update" +echo "ok" +echo "Rcs-diff ./" +echo "$HOME/.bashrc" +echo "/.bashrc/73.50///" +echo "u=rw,g=rw,o=rw" +echo "20" +echo "a1 1" +echo "echo 'gotcha!'" +echo "ok" +cat >/dev/null +EOF + sleep 1 + dotest_fail client-11 "$testcvs update" \ +"$PROG \[update aborted\]: patch original file \./\.bashrc does not exist" + + # A third try at a client exploit. This one did used to fail like + # client-10. + cat >$TESTDIR/serveme <<EOF +#!$TESTSHELL +echo "Valid-requests Root Valid-responses valid-requests Directory Entry Modified Unchanged Argument Argumentx ci co update" +echo "ok" +echo "Rcs-diff ../../home/" +echo "../../.bashrc" +echo "/.bashrc/73.50///" +echo "u=rw,g=rw,o=rw" +echo "20" +echo "a1 1" +echo "echo 'gotcha!'" +echo "ok" +cat >/dev/null +EOF + sleep 1 + dotest_fail client-12 "$testcvs update" \ +"$PROG update: Server attempted to update a file via an invalid pathname: +$PROG \[update aborted\]: \`\.\./\.\./home/.bashrc'\." + + # Try the same exploit using the Created response. + cat >$TESTDIR/serveme <<EOF +#!$TESTSHELL +echo "Valid-requests Root Valid-responses valid-requests Directory Entry Modified Unchanged Argument Argumentx ci co update" +echo "ok" +echo "Created $HOME/" +echo "$HOME/.bashrc" +echo "/.bashrc/73.50///" +echo "u=rw,g=rw,o=rw" +echo "26" +echo "#! /bin/sh" +echo "echo 'gotcha!'" +echo "ok" +cat >/dev/null +EOF + sleep 1 + dotest_fail client-13 "$testcvs update" \ +"$PROG update: Server attempted to update a file via an invalid pathname: +$PROG \[update aborted\]: \`$HOME/.bashrc'\." + + # Now try using the Update-existing response + cat >$TESTDIR/serveme <<EOF +#!$TESTSHELL +echo "Valid-requests Root Valid-responses valid-requests Directory Entry Modified Unchanged Argument Argumentx ci co update" +echo "ok" +echo "Update-existing ../../home/" +echo "../../home/.bashrc" +echo "/.bashrc/73.50///" +echo "u=rw,g=rw,o=rw" +echo "26" +echo "#! /bin/sh" +echo "echo 'gotcha!'" +echo "ok" +cat >/dev/null +EOF + sleep 1 + dotest_fail client-14 "$testcvs update" \ +"$PROG update: Server attempted to update a file via an invalid pathname: +$PROG \[update aborted\]: \`\.\./\.\./home/.bashrc'\." + + # Try the same exploit using the Merged response. + cat >$TESTDIR/serveme <<EOF +#!$TESTSHELL +echo "Valid-requests Root Valid-responses valid-requests Directory Entry Modified Unchanged Argument Argumentx ci co update" +echo "ok" +echo "Merged $HOME/" +echo "$HOME/.bashrc" +echo "/.bashrc/73.50///" +echo "u=rw,g=rw,o=rw" +echo "26" +echo "#! /bin/sh" +echo "echo 'gotcha!'" +echo "ok" +cat >/dev/null +EOF + sleep 1 + dotest_fail client-15 "$testcvs update" \ +"$PROG update: Server attempted to update a file via an invalid pathname: +$PROG \[update aborted\]: \`$HOME/.bashrc'\." + + # Now try using the Updated response + cat >$TESTDIR/serveme <<EOF +#!$TESTSHELL +echo "Valid-requests Root Valid-responses valid-requests Directory Entry Modified Unchanged Argument Argumentx ci co update" +echo "ok" +echo "Updated ../../home/" +echo "../../home/.bashrc" +echo "/.bashrc/73.50///" +echo "u=rw,g=rw,o=rw" +echo "26" +echo "#! /bin/sh" +echo "echo 'gotcha!'" +echo "ok" +cat >/dev/null +EOF + sleep 1 + dotest_fail client-16 "$testcvs update" \ +"$PROG update: Server attempted to update a file via an invalid pathname: +$PROG \[update aborted\]: \`\.\./\.\./home/.bashrc'\." + + # Try the same exploit using the Copy-file response. + # As far as I know, Copy-file was never exploitable either. + cat >$TESTDIR/serveme <<EOF +#!$TESTSHELL +echo "Valid-requests Root Valid-responses valid-requests Directory Entry Modified Unchanged Argument Argumentx ci co update" +echo "ok" +echo "Created ." +echo "./innocuous" +echo "/innocuous/73.50///" +echo "u=rw,g=rw,o=rw" +echo "26" +echo "#! /bin/sh" +echo "echo 'gotcha!'" +echo "Copy-file ." +echo "./innocuous" +echo "$HOME/innocuous" +echo "ok" +cat >/dev/null +EOF + sleep 1 + dotest_fail client-18 "$testcvs update" \ +"$PROG \[update aborted\]: protocol error: Copy-file tried to specify directory" + + # And verify that none of the exploits was successful. + dotest client-19 "cat $HOME/.bashrc" \ +"#!$TESTSHELL +# This is where login scripts would usually be +# stored\." + + if $keep; then + echo Keeping ${TESTDIR} and exiting due to --keep + exit 0 + fi + cd ../.. rm -r 1 rmdir ${TESTDIR}/bogus - rm ${TESTDIR}/serveme - CVS_SERVER=${testcvs}; export CVS_SERVER + rm $TESTDIR/serveme $HOME/.bashrc + CVS_SERVER=${save_CVS_SERVER}; export CVS_SERVER fi # skip the whole thing for local ;; + dottedroot) + # Check that a CVSROOT with a "." in the name will work. + CVSROOT_save=${CVSROOT} + CVSROOT_DIRNAME_save=${CVSROOT_DIRNAME} + CVSROOT_DIRNAME=${TESTDIR}/cvs.root + CVSROOT=`newroot ${CVSROOT_DIRNAME}` + + dotest dottedroot-init-1 "${testcvs} init" "" + mkdir dir1 + mkdir dir1/dir2 + echo version1 >dir1/dir2/file1 + cd dir1 + dotest dottedroot-1 "${testcvs} import -m '' module1 AUTHOR INITIAL" \ +"${PROG} [a-z]*: Importing ${CVSROOT_DIRNAME}/module1/dir2 +N module1/dir2/file1 + +No conflicts created by this import" + cd .. + + # This is the test that used to cause an assertion failure + # in recurse.c:do_recursion(). + dotest dottedroot-2 "${testcvs} co -rINITIAL module1" \ +"${PROG} [a-z]*: Updating module1 +${PROG} [a-z]*: Updating module1/dir2 +U module1/dir2/file1" + + if $keep; then + echo Keeping ${TESTDIR} and exiting due to --keep + exit 0 + fi + + rm -rf ${CVSROOT_DIRNAME} + rm -r dir1 module1 + CVSROOT_DIRNAME=${CVSROOT_DIRNAME_save} + CVSROOT=${CVSROOT_save} + ;; + fork) # Test that the server defaults to the correct executable in :fork: # mode. See the note in the TODO at the end of this file about this. @@ -23920,6 +27404,7 @@ update" # working, but that test might be better here. if $remote; then mkdir fork; cd fork + save_CVS_SERVER=$CVS_SERVER unset CVS_SERVER # So looking through $PATH for cvs won't work... echo "echo junk" >cvs @@ -23928,11 +27413,14 @@ update" dotest fork-1 "$testcvs -d:fork:$CVSROOT_DIRNAME version" \ 'Client: \(.*\) Server: \1' - CVS_SERVER=${testcvs}; export CVS_SERVER + CVS_SERVER=${save_CVS_SERVER}; export CVS_SERVER + unset save_CVS_SERVER PATH=$save_PATH; unset save_PATH cd .. - if $keep; then :; else - rm -rf fork + + if $keep; then + echo Keeping ${TESTDIR} and exiting due to --keep + exit 0 fi fi ;; @@ -23956,8 +27444,8 @@ Server: \1' dotest commit-add-missing-4 "$testcvs -Q add $file" '' rm -f $file dotest_fail commit-add-missing-5 "$testcvs -Q ci -m. $file" \ -"${PROG} [a-z]*: Up-to-date check failed for .$file' -${PROG} \[[a-z]* aborted\]: correct above errors first!" +"${PROG} commit: Up-to-date check failed for .$file' +${PROG} \[commit aborted\]: correct above errors first!" cd ../.. rm -rf 1 @@ -23978,11 +27466,11 @@ ${PROG} \[[a-z]* aborted\]: correct above errors first!" echo nosuchhost:/cvs > CVS/Root dotest commit-d-3 "$testcvs -Q -d $CVSROOT commit -m." \ "Checking in file1; -${TESTDIR}/cvsroot/c-d-c/file1,v <-- file1 +${CVSROOT_DIRNAME}/c-d-c/file1,v <-- file1 new revision: 1.2; previous revision: 1.1 done Checking in subdir/file2; -${TESTDIR}/cvsroot/c-d-c/subdir/file2,v <-- file2 +${CVSROOT_DIRNAME}/c-d-c/subdir/file2,v <-- file2 new revision: 1.2; previous revision: 1.1 done" cd ../.. @@ -23993,15 +27481,27 @@ done" echo $what is not the name of a test -- ignored ;; esac -done -# Sanity check sanity.sh. :) -# -# Test our exit directory so that tests that exit in an incorrect directory are -# noticed during single test runs. -if test "x$TESTDIR" != "x`pwd`"; then - fail "cleanup: PWD != TESTDIR (\``pwd`' != \`$TESTDIR')" -fi + # Sanity check sanity.sh. :) + # + # Test our exit directory so that tests that exit in an incorrect directory + # are noticed during single test runs. + if test "x$TESTDIR" != "x`pwd`"; then + fail "cleanup: PWD != TESTDIR (\``pwd`' != \`$TESTDIR')" + fi + + # Test our temp directory for cvs-serv* directories and cvsXXXXXX temp + # files. We would like to not leave any behind. + if $remote && ls $TMPDIR/cvs-serv* >/dev/null 2>&1; then + # A true value means ls found files/directories with these names. + fail "Found cvs-serv* directories in $TMPDIR." + fi + if ls $TMPDIR/cvs?????? >/dev/null 2>&1; then + # A true value means ls found files/directories with these names. + fail "Found cvsXXXXXX temp files in $TMPDIR." + fi + +done # The big loop echo "OK, all tests completed." |