3 # sanity.sh -- a growing testsuite for cvs.
5 # The copyright notice said: "Copyright (C) 1992, 1993 Cygnus Support"
6 # I'm not adding new copyright notices for new years as our recent
7 # practice has been to include copying terms without copyright notices.
9 # This program is free software; you can redistribute it and/or modify
10 # it under the terms of the GNU General Public License as published by
11 # the Free Software Foundation; either version 2, or (at your option)
14 # This program is distributed in the hope that it will be useful,
15 # but WITHOUT ANY WARRANTY; without even the implied warranty of
16 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 # GNU General Public License for more details.
19 # Original Author: K. Richard Pixley
24 echo "Usage: `basename $0` --help"
25 echo "Usage: `basename $0` [--eklr] [-c CONFIG-FILE] [-f FROM-TEST] \\"
26 echo " [-h HOSTNAME] [-s CVS-FOR-CVS-SERVER] CVS-TO-TEST \\"
27 echo " [TESTS-TO-RUN...]"
40 echo "-H|--help display this text"
42 echo "--config=CONFIG_FILE"
43 echo " use an alternate test suite config file (defaults to"
44 echo " \`sanity.config.sh' in the same directory as"
45 echo " CVS-TO-TEST is found in)"
46 echo "-e|--skipfail Treat tests that would otherwise be nonfatally skipped"
47 echo " for reasons like missing tools as failures, exiting"
48 echo " with an error message. Also treat warnings as"
51 echo "--from-test=FROM-TEST"
52 echo " run TESTS-TO-RUN, skipping all tests in the list before"
55 echo "--hostname HOSTNAME"
56 echo " Use :ext:HOSTNAME to run remote tests rather than"
57 echo " :fork:. Implies --remote and assumes that \$TESTDIR"
58 echo " resolves to the same directory on both the client and"
60 echo "-k|--keep try to keep directories created by individual tests"
61 echo " around, exiting after the first test which supports"
64 echo " test CVS using a symlink to a real CVSROOT"
65 echo "-n|--noredirect"
66 echo " test a secondary/primary CVS server (writeproxy)"
67 echo " configuration with the Redirect response disabled"
68 echo " (implies --proxy)."
69 echo "-p|--proxy test a secondary/primary CVS server (writeproxy)"
70 echo " configuration (implies --remote)."
71 echo "-r|--remote test client/server, as opposed to local, CVS"
72 echo "-s CVS-FOR-CVS-SERVER"
73 echo "--server=CVS-FOR-CVS-SERVER"
74 echo " use CVS-FOR-CVS-SERVER as the path to the CVS SERVER"
75 echo " executable to be tested (defaults to CVS-TO-TEST and"
76 echo " implies --remote)"
78 echo "CVS-TO-TEST the path to the CVS executable to be tested; used as"
79 echo " the path to the CVS client when CVS-FOR-CVS-SERVER is"
81 echo "TESTS-TO-RUN the names of the tests to run (defaults to all tests)"
87 if test "x$1" != xoptional
&& test -z "$OPTARG"; then
88 echo "option \`--$LONGOPT' requires an argument" >&2
93 # See TODO list at end of file.
95 # required to make this script work properly.
98 # We want to invoke a predictable set of i18n behaviors, not whatever
99 # the user running this script might have set.
101 # 'sort' and tabs and spaces (LC_COLLATE).
102 # Messages from getopt (LC_MESSAGES) (in the future, CVS itself might
103 # also alter its messages based on LC_MESSAGES).
109 # And a few tests want a predictable umask.
113 # Initialize the test counts.
135 while getopts Hc
:ef
:h
:klnprs
:-: option
; do
136 # convert the long opts to short opts
137 if test x
$option = x-
; then
138 # remove any argument
139 if echo "$OPTARG" |
grep = >/dev
/null
; then
140 LONGOPT
=`echo "$OPTARG" |sed 's/=.*$//'`
141 OPTARG
=`echo "$OPTARG" |sed -e 's/^.*=//'`
146 # Convert LONGOPT to lower case
147 LONGOPT
=`echo "$LONGOPT" |sed 'y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/'`
149 c|co|con|conf|confi|config
)
153 f|fr|fro|from|from-|from-t|from-te|from-tes|from-test
)
158 echo "\`--h' is ambiguous. Could mean \`--help' or \`--hostname'" >&2
165 ho|hos|
host|hostn|hostna|hostnam|hostname
)
173 l|li|lin|link|link-|link-r
]|link-ro|link-roo|link-root
)
177 n|no|nor|nore|nored|noredi|noredir|noredire|noredirec|noredirect
)
185 r|re|rem|remo|remot|remote
)
190 echo "\`--s' is ambiguous. Could mean \`--server' or \`--skipfail'" >&2
193 se|ser|serv|serve|server
)
197 sk|ski|skip|skipf|skipfa|skipfai|skipfail
)
217 # Set a remotehost to run the remote tests on via :ext:
218 # Implies `-r' and assumes that $TESTDIR resolves to the same
219 # directory on the client and the server.
227 # The -k (keep) option will eventually cause all the tests to
228 # leave around the contents of the /tmp directory; right now only
229 # some implement it. Not originally intended to be useful with
230 # more than one test, but this should work if each test uses a
231 # uniquely named dir (use the name of the test).
259 # boot the arguments we used above
260 while test $OPTIND -gt 1 ; do
262 OPTIND
=`expr $OPTIND - 1`
265 # Use full path for CVS executable, so that CVS_SERVER gets set properly
280 # Verify that $testcvs looks like CVS.
281 # we can't use test -x since BSD 4.3 doesn't support it.
282 if test ! -f $testcvs ||
test ! -r $testcvs; then
283 echo "No such file or file not readable: $testcvs" >&2
286 if $testcvs --version </dev
/null
2>/dev
/null |
287 grep '^Concurrent Versions System' >/dev
/null
2>&1; then :; else
288 echo "Not a CVS executable: $testcvs" >&2
292 # If $remotehost is set, warn if $TESTDIR isn't since we are pretty sure
293 # that its default value of `/tmp/cvs-sanity' will not resolve to the same
294 # directory on two different machines.
295 if test -n "$remotehost" && test -z "$TESTDIR"; then
296 echo "WARNING: CVS server hostname is set and \$TESTDIR is not. If" >&2
297 echo "$remotehost is not the local machine, then it is unlikely that" >&2
298 echo "the default value assigned to \$TESTDIR will resolve to the same" >&2
299 echo "directory on both this client and the CVS server." >&2
302 # Read our config file if we can find it.
304 # The config file should always be located in the same directory as the CVS
305 # executable, unless we are testing an executable outside of the build
306 # directory. In this case, we echo a warning and attempt to assume the most
307 # portable configuration.
308 if test -z "$configfile"; then
309 configfile
=`dirname $testcvs`/sanity.config.sh
311 if test -r "$configfile"; then
314 echo "WARNING: Failed to locate test suite config file" >&2
315 echo " \`$configfile'." >&2
320 # Set a default value for $CVS_RSH. The sanity.config.sh file will
321 # have the configured value in the RSH_DFLT variable.
323 : ${CVS_RSH=${RSH_DFLT:-ssh}}; export CVS_RSH
325 if test -n "$remotehost"; then
326 # Verify that $CVS_RSH $remotehost works.
327 result
=`$CVS_RSH $remotehost 'echo test'`
328 if test $?
!= 0 ||
test "x$result" != "xtest"; then
329 echo "\`$CVS_RSH $remotehost' failed." >&2
343 servercvs
=`pwd`/$servercvs
347 if test false
!= $servercvs; then
348 # Allow command line to override $CVS_SERVER
349 CVS_SERVER
=$servercvs
351 # default $CVS_SERVER to ${testcvs}
352 : ${CVS_SERVER=$testcvs}
353 # With the previous command, effectively defaults $servercvs to $CVS_SERVER,
355 servercvs
=$CVS_SERVER
358 servercvs_orig
=$servercvs
360 # Fail in client/server mode if our ${servercvs} does not contain server
363 if test -n "$remotehost"; then
364 if $CVS_RSH $remotehost "test ! -f ${servercvs} || test ! -r ${servercvs}"
366 echo "No such file or file not readable: $remotehost:${testcvs}" >&2
369 if $CVS_RSH $remotehost "${servercvs} --version </dev/null 2>/dev/null |
370 grep '^Concurrent Versions System' >/dev/null 2>&1"; then :; else
371 echo "Not a CVS executable: $remotehost:${servercvs}" >&2
374 if $CVS_RSH $remotehost "${servercvs} --version </dev/null |
375 grep '^Concurrent.*(.*server)$' >/dev/null 2>&1"; then :; else
376 echo "CVS executable \`$remotehost:${servercvs}' does not contain server support." >&2
380 if test ! -f ${servercvs} ||
test ! -r ${servercvs}; then
381 echo "No such file or file not readable: ${testcvs}" >&2
384 if ${servercvs} --version </dev
/null
2>/dev
/null |
385 grep '^Concurrent Versions System' >/dev
/null
2>&1; then :; else
386 echo "Not a CVS executable: ${servercvs}" >&2
389 if ${servercvs} --version </dev
/null |
390 grep '^Concurrent.*(.*server)$' >/dev
/null
2>&1; then :; else
391 echo "CVS executable \`${servercvs}' does not contain server support." >&2
397 # Fail in client/server mode if our ${testcvs} does not contain client
400 if ${testcvs} --version </dev
/null |
401 grep '^Concurrent.*(client.*)$' >/dev
/null
2>&1; then :; else
402 echo "CVS executable \`${testcvs}' does not contain client support." >&2
407 # For the "fork" tests.
408 if ${testcvs} --version </dev
/null |
409 grep '^Concurrent.*(.*server)$' >/dev
/null
2>&1
411 testcvs_server_support
=:
413 testcvs_server_support
=false
421 echo "Keeping ${TESTDIR} for test case \`${what}' and exiting due to --keep"
435 echo 'This test should produce no other output than this message, and a final "OK".'
436 echo '(Note that the test can take an hour or more to run and periodically stops'
437 echo 'for as long as one minute. Do not assume there is a problem just because'
438 echo 'nothing seems to happen for a long time. If you cannot live without'
439 echo "running status, try the command: \`tail -f check.log' from another window.)"
441 # Regexp to match what the CVS client will call itself in output that it prints.
442 # FIXME: we don't properly quote this--if the name contains . we'll
443 # just spuriously match a few things; if the name contains other regexp
444 # special characters we are probably in big trouble.
445 CPROG
=`basename ${testcvs} |sed 's/\.exe$//'`
446 # And the regexp for the CVS server when we have one. In local mode, this
447 # defaults to $CPROG since $servercvs already did.
448 # FIXCVS: There are a few places in error messages where CVS suggests a command
449 # and outputs $SPROG as the suggested executable. This could hopefully use
450 # MT (tagged text - see doc/cvs-client.texi) to request that the client print
452 SPROG
=`basename ${servercvs} |sed 's/\.exe$//'`
456 hostname
="[-_.a-zA-Z0-9]*"
458 # Regexp to match a commitid
459 commitid
="[a-zA-Z0-9]*"
461 # Regexp to match the name of a temporary file (from cvs_temp_name).
462 # This appears in certain diff output.
463 tempfile
="cvs[-a-zA-Z0-9.%_]*"
464 # $tempname set after $TMPDIR, below.
466 # Regexp to match a date in RFC822 format (as amended by RFC1123).
467 RFCDATE
="[a-zA-Z0-9 ][a-zA-Z0-9 ]* [0-9:][0-9:]* -0000"
468 RFCDATE_EPOCH
="1 Jan 1970 00:00:00 -0000"
470 # Special times used in touch -t commands and the regular expresions
471 # to match them. Now that the tests set TZ=UTC0, it
472 # should be easier to be more exact in their regexp.
473 TOUCH1971
="197107040343"
474 # This date regexp was 1971/07/0[3-5] [0-9][0-9]:43:[0-9][0-9]
475 ISO8601DATE1971
="1971-07-04 03:43:[0-9][0-9] [+-]0000"
477 TOUCH2034
="203412251801"
478 # This date regexp was 2034/12/2[4-6] [0-9][0-9]:01:[0-9][0-9]
479 ISO8601DATE2034
="2034-12-25 18:01:[0-9][0-9] [+-]0000"
481 # Used in admin tests for exporting RCS files.
482 # The RAWRCSDATE..... format is for internal ,v files and
483 # the ISO8601DATE..... format is to allow for a regular expression in
484 # 'cvs log' output patterns. The tests that use this set of specific
485 # ${ISO8601DATE.....} variables also force TZ=UTC0 for the test.
486 RAWRCSDATE2000A
="2000.11.24.15.58.37"
487 RAWRCSDATE1996A
="96.11.24.15.57.41"
488 RAWRCSDATE1996B
="96.11.24.15.56.05"
489 ISO8601DATE2000A
="2000-11-24 15:58:37 [+-]0000"
490 ISO8601DATE1996A
="1996-11-24 15:57:41 [+-]0000"
491 ISO8601DATE1996B
="1996-11-24 15:56:05 [+-]0000"
493 # Regexp to match the date in cvs log command output
494 # This format has been enhanced in the future to accept either
495 # old-style cvs log output dates or new-style ISO8601 timezone
496 # information similar to the ISODATE format. The RCSKEYDATE is
497 # similar, but uses '/' instead of '-' to sepearate year/month/day
498 # and does not include the optional timezone offset.
499 ISO8601DATE
="[0-9][0-9][0-9][0-9]-[0-1][0-9]-[0-3][0-9] [0-2][0-9]:[0-6][0-9]:[0-6][0-9] [-+][0-1][0-9][0-6][0-9]"
501 # Regexp to match the dates found in rcs keyword strings
502 RCSKEYDATE
="[0-9][0-9][0-9][0-9]/[0-9][0-9]/[0-9][0-9] [0-9][0-9]:[0-9][0-9]:[0-9][0-9]"
504 # Regexp to match the date in the delta section of rcs format files.
505 # Dates in very old RCS files may not have included the century.
506 RCSDELTADATE
="[0-9][0-9]*\.[0-9][0-9]\.[0-9][0-9]\.[0-9][0-9]\.[0-9][0-9]\.[0-9][0-9]"
508 # Regexp to match a date in standard Unix format as used by rdiff
509 # FIXCVS: There's no reason for rdiff to use a different date format
511 DATE
="[a-zA-Z]* [a-zA-Z]* [ 1-3][0-9] [0-9:]* [0-9]*"
512 # ISO 8601 format "yyyy-mm-dd hh:mm -0000"
513 ISODATE
="[0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9] [0-9][0-9]:[0-9][0-9] [+-][0-9][0-9][0-9][0-9]"
514 # %p format is not well defined (nil) and hex digits are common. Using
515 # ..* is a bad idea as the tests take a very long time to run due to
516 # the complexity of the expressions. If you run into any other characters
517 # that are used in a %p format, add them here.
518 PFMT
="[0-9a-zA-Z()][0-9a-zA-Z()]*"
520 # Which directories should Which and find_tool search for executables?
521 SEARCHPATH
=$PATH:/usr
/local
/bin
:/usr
/contrib
/bin
:/usr
/contrib
:/usr
/gnu
/bin
:/local
/bin
:/local
/gnu
/bin
:/gnu
/bin
:/sw
/bin
:/usr
/pkg
/bin
523 # Do not assume that `type -p cmd` is portable
524 # Usage: Which [-a] [-x|-f|-r] prog [$SEARCHPATH:/with/directories:/to/search]
526 # Optional first argument for file type, defaults to -x.
527 # Second argument is the file or directory to be found.
528 # Third argument is the PATH to search.
529 # By default, print only the first file that matches,
530 # -a will cause all matches to be printed.
532 if [ "x$1" = "x-a" ]; then notevery
=false
; shift; fi
538 # FIXME: Someday this may need to be fixed
539 # to deal better with C:\some\path\to\ssh values...
540 /*) test $t $1 && echo $1 ;;
541 *) for d
in `IFS=:; echo ${2-$SEARCHPATH}`
543 test $t $d/$1 && { echo $d/$1; if $notevery; then break; fi; }
550 # On cygwin32, we may not have /bin/sh.
551 if test -r /bin
/sh
; then
554 TESTSHELL
=`Which -f sh`
555 if test ! -r "$TESTSHELL"; then
560 # FIXME: try things (what things? checkins?) without -m.
562 # Some of these tests are written to expect -Q. But testing with
563 # -Q is kind of bogus, it is not the way users actually use CVS (usually).
564 # So new tests probably should invoke ${testcvs} directly, rather than ${CVS}.
565 # and then they've obviously got to do something with the output....
569 LOGFILE
=`pwd`/check.log
571 # Save the previous log in case the person running the tests decides
572 # they want to look at it. The extension ".plog" is chosen for consistency
574 test -f check.plog
&& mv check.plog check.plog~
575 test -f check.log
&& mv check.log check.plog
577 # Create the log file so check.log can be tailed almost immediately after
578 # this script is started. Otherwise it can take up to a minute or two before
579 # the log file gets created when $remotehost is specified on some systems,
580 # which makes for a lot of failed `tail -f' attempts.
583 # Workaround any X11Forwarding by ssh. Otherwise this text:
584 # Warning: No xauth data; using fake authentication data for X11 forwarding.
585 # has been known to end up in the test results below
586 # causing the test to fail.
587 [ -n "$DISPLAY" ] && unset DISPLAY
589 # The default value of /tmp/cvs-sanity for TESTDIR is dubious,
590 # because it loses if two people/scripts try to run the tests
591 # at the same time. Some possible solutions:
592 # 1. Use /tmp/cvs-test$$. One disadvantage is that the old
593 # cvs-test* directories would pile up, because they wouldn't
594 # necessarily get removed.
595 # 2. Have everyone/everything running the testsuite set
596 # TESTDIR to some appropriate directory.
597 # 3. Have the default value of TESTDIR be some variation of
598 # `pwd`/cvs-sanity. The biggest problem here is that we have
599 # been fairly careful to test that CVS prints in messages the
600 # actual pathnames that we pass to it, rather than a different
601 # pathname for the same directory, as may come out of `pwd`.
602 # So this would be lost if everything was `pwd`-based. I suppose
603 # if we wanted to get baroque we could start making symlinks
604 # to ensure the two are different.
605 if test -n "$remotehost"; then
606 # We need to set $tmp on the server since $TMPDIR is compared against
607 # messages generated by the server.
608 tmp
=`$CVS_RSH $remotehost 'cd /tmp; /bin/pwd || pwd' 2>/dev/null`
609 if test $?
!= 0; then
610 echo "$CVS_RSH $remotehost failed." >&2
614 tmp
=`(cd /tmp; /bin/pwd || pwd) 2>/dev/null`
618 # 1) Set TESTDIR if it's not set already
619 # 2) Remove any old test remnants
621 # 4) Normalize TESTDIR with `cd && (/bin/pwd || pwd)`
622 # (This will match CVS output later)
623 : ${TESTDIR=$tmp/cvs-sanity}
624 # clean any old remnants (we need the chmod because some tests make
625 # directories read-only)
626 if test -d $TESTDIR; then
627 chmod -R a
+wx
$TESTDIR
630 # These exits are important. The first time I tried this, if the `mkdir && cd`
631 # failed then the build directory would get blown away. Some people probably
632 # wouldn't appreciate that.
633 mkdir
$TESTDIR ||
exit 1
634 cd $TESTDIR ||
exit 1
635 # Ensure $TESTDIR is absolute
636 if echo "$TESTDIR" |
grep '^[^/]'; then
637 # Don't resolve this unless we have to. This keeps symlinks intact. This
638 # is important at least when testing using -h $remotehost, because the same
639 # value for $TESTDIR must resolve to the same directory on the client and
640 # the server and we likely used Samba, and possibly symlinks, to do this.
641 TESTDIR
=`(/bin/pwd || pwd) 2>/dev/null`
644 if test -z "$TESTDIR" ||
echo "$TESTDIR" |
grep '^[^/]'; then
645 echo "Unable to resolve TESTDIR to an absolute directory." >&2
654 # Now override our CVS_RSH in order to forward variables which affect the
655 # test suite through. This always needs to be done when $remotehost is
656 # set, needs to be done in $proxy mode for the crerepos tests, and needs to
657 # be done in $remote mode for the writeproxy-ssh tests.
659 time="/usr/bin/time -ao'$TESTDIR/time.out'"
663 cat >$TESTDIR/ssh-wrapper-env
<<EOF
670 var=\`echo "\$1" | sed 's/^\\(.*\\)=.*\$/\\1/'\`
679 chmod a
+x
$TESTDIR/ssh-wrapper-env
680 cat >$TESTDIR/ssh-wrapper
<<EOF
687 $TESTDIR/ssh-wrapper-env \
688 "CVS_SERVER='\$CVS_SERVER'" \
689 "CVS_SERVER_SLEEP='\$CVS_SERVER_SLEEP'" \
690 "CVS_PARENT_SERVER_SLEEP='\$CVS_PARENT_SERVER_SLEEP'" \
691 "CVS_SERVER_LOG='\$CVS_SERVER_LOG'" \
692 "CVS_SECONDARY_LOG='\$CVS_SECONDARY_LOG'" \
693 "TMPDIR='\$TMPDIR'" \
694 "CVS_RSH='$TESTDIR/ssh-wrapper'" \
695 "CVSUMASK='\$CVSUMASK'" \
696 "CVS_PID='\$CVS_PID'" \
700 chmod a
+x
$TESTDIR/ssh-wrapper
701 CVS_RSH
=$TESTDIR/ssh-wrapper
706 # Now set $TMPDIR if the user hasn't overridden it.
708 # We use a $TMPDIR under $TESTDIR by default so that two tests may be run at
709 # the same time without bumping heads without requiring the user to specify
710 # more than $TESTDIR. See the test for leftover cvs-serv* directories near the
711 # end of this script at the end of "The big loop".
712 : ${TMPDIR=$TESTDIR/tmp}
714 if test -d $TMPDIR; then :; else
719 # Regexp to match the the full path to a temporary file (from cvs_temp_name).
720 # This appears in certain diff output.
721 tempname
=$TMPDIR/$tempfile
723 # Make sure various tools work the way we expect, or try to find
730 # Keep track of tools that are found, but do NOT work as we hope
731 # in order to avoid them in future
735 badtools
=$badtools:$1
739 case ":$badtools:" in *:$1:*) return 0 ;; *) return 1 ; esac
746 if RES
=`$vercmd --version </dev/null 2>&1`; then
747 if test "X$RES" != "X--version" && test "X$RES" != "X" ; then
753 echo "The command \`$vercmd' does not support the --version option."
755 # It does not really matter that --version is not supported
759 # Try to find a tool that satisfies all of the tests.
760 # Usage: list:of:colon:separated:alternatives test1 test2 test3 test4...
761 # Example: find_tool awk:gawk:nawk awk_tooltest1 awk_tooltest2
765 echo find_tool
: ${1+"$@"} >>$LOGFILE
766 cmds
="`IFS=:; echo $1`"; shift; tooltests
="${1+$@}"
767 if test -z "$tooltests"; then tooltests
=version_test
; fi
768 clist
=; for cmd
in $cmds; do clist
="$clist `Which -a $cmd`"; done
769 # Make sure the default tool is just the first real command name
770 for default_TOOL
in $clist `IFS=:; echo $default_TOOL`; do break; done
772 for trytool
in $clist ; do
774 for tooltest
in $tooltests; do
775 result
=`eval $tooltest $trytool`
777 echo "Running $tooltest $trytool" >>$LOGFILE
778 if test -n "$result"; then
779 echo "$result" >>$LOGFILE
781 if test "$rc" = "0"; then
782 echo "PASS: $tooltest $trytool" >>$LOGFILE
783 elif test "$rc" = "77"; then
784 echo "MARGINAL: $tooltest $trytool; rc=$rc" >>$LOGFILE
788 set_bad_tool
$trytool
789 echo "FAIL: $tooltest $trytool; rc=$rc" >>$LOGFILE
798 if test -n "$TOOL"; then
799 echo "Notice: The default version of \`$default_TOOL' is defective." >>$LOGFILE
800 echo "using \`$TOOL' and hoping for the best." >>$LOGFILE
801 echo "Notice: The default version of \`$default_TOOL' is defective." >&2
802 echo "using \`$TOOL' and hoping for the best." >&2
812 if $id -u >/dev
/null
2>&1 && $id -un >/dev
/null
2>&1; then
815 echo "Running these tests requires an \`id' program that understands the"
816 echo "-u and -n flags. Make sure that such an id (GNU, or many but not"
817 echo "all vendor-supplied versions) is in your path."
822 ID
=`find_tool id version_test id_tool_test`
823 echo "Using ID=$ID" >>$LOGFILE
825 # You can't run CVS as root; print a nice error message here instead
826 # of somewhere later, after making a mess.
827 for pass
in false
:; do
828 case "`$ID -u 2>/dev/null`" in
830 echo "Test suite does not work correctly when run as root" >&2
840 # Cause NextStep 3.3 users to lose in a more graceful fashion.
846 def' >/dev
/null
; then
850 echo 'Running these tests requires an "expr" program that can handle'
851 echo 'multi-line patterns. Make sure that such an expr (GNU, or many but'
852 echo 'not all vendor-supplied versions) is in your path.'
857 # Warn SunOS, SysVr3.2, etc., users that they may be partially losing
858 # if we can't find a GNU expr to ease their troubles...
865 echo 'Warning: you are using a version of expr that does not correctly'
866 echo 'match multi-line patterns. Some tests may spuriously pass or fail.'
867 echo 'You may wish to make sure GNU expr is in your path.'
876 echo 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ' >${TESTDIR}/foo
877 cat ${TESTDIR}/foo ${TESTDIR}/foo ${TESTDIR}/foo ${TESTDIR}/foo >${TESTDIR}/bar
878 cat ${TESTDIR}/bar ${TESTDIR}/bar ${TESTDIR}/bar ${TESTDIR}/bar >${TESTDIR}/foo
879 cat ${TESTDIR}/foo ${TESTDIR}/foo ${TESTDIR}/foo ${TESTDIR}/foo >${TESTDIR}/bar
886 # More SunOS lossage...
887 test ! -f ${TESTDIR}/bar
&& expr_create_bar
888 if $expr "`cat ${TESTDIR}/bar`" : "`cat ${TESTDIR}/bar`" >/dev
/null
; then
891 echo 'Warning: you are using a version of expr that does not correctly'
892 echo 'match large patterns. Some tests may spuriously pass or fail.'
893 echo 'You may wish to make sure GNU expr is in your path.'
896 if $expr "`cat ${TESTDIR}/bar`x" : "`cat ${TESTDIR}/bar`y" >/dev
/null
; then
897 echo 'Warning: you are using a version of expr that does not correctly'
898 echo 'match large patterns. Some tests may spuriously pass or fail.'
899 echo 'You may wish to make sure GNU expr is in your path.'
906 # That we should have to do this is total bogosity, but GNU expr
907 # version 1.9.4-1.12 uses the emacs definition of "$" instead of the unix
908 # (e.g. SunOS 4.1.3 expr) one. Rumor has it this will be fixed in the
909 # next release of GNU expr after 1.12 (but we still have to cater to the old
910 # ones for some time because they are in many linux distributions).
912 expr_set_ENDANCHOR
()
917 def' : 'abc$' >/dev
/null
; then
919 echo "Notice: An ENDANCHOR of dollar does not work."
920 echo "Using a workaround for GNU expr versions 1.9.4 thru 1.12"
925 # Work around another GNU expr (version 1.10-1.12) bug/incompatibility.
926 # "." doesn't appear to match a newline
(it does with SunOS
4.1.3 expr).
927 # Note that the workaround is not a complete equivalent of .* because
928 # the first parenthesized expression in the regexp must match something
929 # in order for expr to return a successful exit status.
930 # Rumor has it this will be fixed in the
931 # next release of GNU expr after 1.12 (but we still have to cater to the old
932 # ones for some time because they are in many linux distributions).
939 def' : "a${DOTSTAR}f" >/dev
/null
; then
944 echo "Notice: DOTSTAR changed from sane \`.*' value to \`$DOTSTAR\`"
945 echo "to workaround GNU expr version 1.10 thru 1.12 bug where \`.'"
946 echo "does not match a newline."
951 # Now that we have DOTSTAR, make sure it works with big matches
952 expr_tooltest_DOTSTAR
()
955 test ! -f ${TESTDIR}/bar
&& expr_create_bar
956 if $expr "`cat ${TESTDIR}/bar`" : "${DOTSTAR}xyzABC${DOTSTAR}$" >/dev
/null
; then
960 echo 'Warning: you are using a version of expr that does not correctly'
961 echo 'match large patterns. Some tests may spuriously pass or fail.'
962 echo 'You may wish to make sure GNU expr is in your path.'
967 EXPR
=`find_tool ${EXPR}:gexpr \
968 version_test expr_tooltest1 expr_tooltest2 expr_tooltest3 \
969 expr_set_ENDANCHOR expr_set_DOTSTAR expr_tooltest_DOTSTAR`
971 # Set the ENDANCHOR and DOTSTAR for the chosen expr version.
972 expr_set_ENDANCHOR
${EXPR} >/dev
/null
973 expr_tooltest_DOTSTAR
${EXPR} >/dev
/null
975 echo "Using EXPR=$EXPR" >>$LOGFILE
976 echo "Using ENDANCHOR=$ENDANCHOR" >>$LOGFILE
977 echo "Using DOTSTAR=$DOTSTAR" >>$LOGFILE
982 # Work around yet another GNU expr (version 1.10) bug/incompatibility.
983 # "+" is a special character, yet for unix expr (e.g. SunOS 4.1.3)
984 # it is not. I doubt that POSIX allows us to use \+ and assume it means
985 # (non-special) +, so here is another workaround
986 # Rumor has it this will be fixed in the
987 # next release of GNU expr after 1.12 (but we still have to cater to the old
988 # ones for some time because they are in many linux distributions).
990 if $EXPR 'a +b' : "a ${PLUS}b" >/dev
/null
; then
998 if $EXPR 'a?b' : "a${QUESTION}b" >/dev
/null
; then
1004 # Now test the username to make sure it contains only valid characters
1006 if $EXPR "${username}" : "${username}" >/dev
/null
; then
1009 echo "Test suite does not work correctly when run by a username" >&2
1010 echo "containing regular expression meta-characters." >&2
1014 # Only 8 characters of $username appear in some output.
1015 if test `echo $username |wc -c` -gt 8; then
1016 username8
=`echo $username |sed 's/^\(........\).*/\1/'`
1021 # Rarely, we need to match any username, not just the name of the user
1022 # running this test. This variable usually shouldn't be used. $username
1023 # contains the name of the user actually running this test.
1025 # I believe this only ever actually gets compared to usernames created by this
1026 # test. It used to be compared to the username of the user running this test,
1027 # but this hasn't been true for a long time. Regardless, I tried to get the
1028 # allowed character set right, based on a list in a private email from Mark
1029 # Baushke, basically the allowed names from Linux systems (plus `.', which is
1030 # only allowed on Gentoo Linux as of 2005-09-13).
1031 anyusername
="[_a-zA-Z0-9][-_.$a-zA-Z0-9]*"
1033 # now make sure that tr works on NULs
1037 if $EXPR `echo "123" | $tr '2' '\0'` : "123" >/dev
/null
2>&1; then
1038 echo 'Warning: you are using a version of tr which does not correctly'
1039 echo 'handle NUL bytes. Some tests may spuriously pass or fail.'
1040 echo 'You may wish to make sure GNU tr is in your path.'
1047 TR
=`find_tool ${TR}:gtr version_test tr_tooltest1`
1048 echo "Using TR=$TR" >>$LOGFILE
1050 # MacOS X (10.2.8) has a /bin/ls that does not work correctly in that
1051 # it will return true even if the wildcard argument does not match any
1057 if test -d $TESTDIR/ls-test
; then
1058 chmod -R a
+wx
$TESTDIR/ls-test
1059 rm -rf $TESTDIR/ls-test
1061 if $ls $TESTDIR/ls-test
>/dev
/null
2>&1; then
1062 echo "Notice: \`$ls' is defective."
1063 echo 'This is a version of ls which does not correctly'
1064 echo 'return false for files that do not exist. Some tests may'
1065 echo 'spuriously pass or fail.'
1066 echo 'You may wish to put a an ls from GNU coreutils into your path.'
1072 LS
=`find_tool ls:gls version_test ls_tooltest`
1073 echo "Using LS=$LS" >>$LOGFILE
1080 $awk 'BEGIN {printf("one\ntwo\nthree\nfour\nfive\nsix")}' </dev
/null
>abc
1081 if $EXPR "`cat abc`" : \
1092 echo "Notice: awk BEGIN clause or printf is not be working properly."
1097 # Format item %c check
1101 $awk 'BEGIN { printf "%c%c%c", 2, 3, 4 }' </dev
/null \
1102 |
${TR} '\002\003\004' '123' >abc
1103 if $EXPR "`cat abc`" : "123" ; then
1106 echo "Notice: awk format %c string may not be working properly."
1114 AWK
=`find_tool gawk:nawk:awk version_test awk_tooltest1 awk_tooltest2`
1115 echo "Using AWK=$AWK" >>$LOGFILE
1119 ### Functions used by tests.
1122 # Execute a command on the repository, syncing when done if necessary.
1124 # Syntax is as `eval'.
1129 # And now resync the secondary.
1130 $TESTDIR/sync-secondary
"repo modification" modify_repo ALL
"$@"
1134 # Restore changes to CVSROOT admin files.
1137 modify_repo
rm -rf $CVSROOT_DIRNAME/CVSROOT
1138 modify_repo
cp -Rp $TESTDIR/CVSROOT.save
$CVSROOT_DIRNAME/CVSROOT
1141 # Test that $RSYNC supports the options we need or try to find a
1142 # replacement. If $RSYNC works or we replace it, and return 0.
1143 # Otherwise, set $skipreason and return 77.
1147 # rsync is NOT a GNU tool, so do NOT use find_tool for name munging.
1148 for rsync
in ${RSYNC} `Which -a rsync`;
1151 if is_bad_tool
`Which $rsync` ; then continue ; fi
1152 # Make some data to test rsync on.
1153 mkdir
$TESTDIR/rsync-test
1154 mkdir
$TESTDIR/rsync-test
/Attic
&& touch $TESTDIR/rsync-test
/Attic
/6
1155 mkdir
$TESTDIR/rsync-test
/otherdir
&& touch $TESTDIR/rsync-test
/otherdir
/7
1156 for file in 1 2 3 4 5; do
1157 touch $TESTDIR/rsync-test
/$file
1160 if test -f "$rsync" && test -r "$rsync" \
1161 && $rsync -rglop --delete $TESTDIR/rsync-test
/ $TESTDIR/rsync-test-copy \
1163 && $rsync -rglop --delete --include Attic
--exclude '*/' \
1164 $TESTDIR/rsync-test
/ $TESTDIR/rsync-test-copy2 \
1166 && test -f $TESTDIR/rsync-test
/5 \
1167 && mv $TESTDIR/rsync-test
/5 $TESTDIR/rsync-test
/Attic
/5 \
1168 && test -f $TESTDIR/rsync-test-copy
/Attic
/6 \
1169 && $rsync -rglop --delete $TESTDIR/rsync-test
/ $TESTDIR/rsync-test-copy \
1171 && $rsync -rglop --delete --include Attic
--exclude '*/' \
1172 $TESTDIR/rsync-test
/ $TESTDIR/rsync-test-copy2 \
1174 && test ! -f $TESTDIR/rsync-test-copy
/5 \
1175 && test ! -f $TESTDIR/rsync-test-copy
2/5 \
1176 && test -f $TESTDIR/rsync-test-copy
2/Attic
/5 \
1177 && test ! -f $TESTDIR/rsync-test-copy
2/otherdir
/7
1183 # Only use Which because of ${RSYNC} in the for loop.
1184 set_bad_tool
`Which $rsync`
1187 rm -rf $TESTDIR/rsync-test
$TESTDIR/rsync-test-copy \
1188 $TESTDIR/rsync-test-copy2
1190 if $rsyncworks; then
1193 (echo $rsync failed to work properly
;\
1194 echo "$rsync --version"; $rsync --version) >>$LOGFILE 2>&1
1199 skipreason
="unusable or no rsync found"
1203 # Test that $1 works as a remote shell. If so, set $host, $CVS_RSH, &
1204 # $save_CVS_RSH to match and return 0. Otherwise, set $skipreason and return
1208 host=${remotehost-"`hostname`"}
1209 result
=`$1 $host 'echo test'`
1211 if test $?
!= 0 ||
test "x$result" != "xtest"; then
1212 skipreason
="\`$1 $host' failed rc=$rc result=$result"
1216 save_CVS_RSH
=$CVS_RSH
1217 CVS_RSH
=$1; export CVS_RSH
1221 # Find a usable SSH. When a usable ssh is found, set $host, $CVS_RSH, and
1222 # $save_CVS_RSH and return 0. Otherwise, set $skipreason and return 77.
1227 tryssh
=`Which $CVS_RSH`
1228 if [ ! -n "$tryssh" ]; then
1229 skipreason
="Unable to find CVS_RSH=$CVS_RSH executable"
1231 elif [ ! -x "$tryssh" ]; then
1232 skipreason
="Unable to execute $tryssh program"
1237 # Look in the user's PATH for "ssh"
1239 if test ! -r "$tryssh"; then
1240 skipreason
="Unable to find ssh program"
1246 require_rsh
"$tryssh"
1252 echo "PASS: $1" >>${LOGFILE}
1253 passed
=`expr $passed + 1`
1256 # Like skip(), but don't fail when $skipfail is set.
1259 echo "SKIP: $1${2+ ($2)}" >>$LOGFILE
1260 skipped
=`expr $skipped + 1`
1270 skip_always
${1+"$@"}
1273 # Convenience function for skipping tests run only in remote mode.
1276 skip_always
$1 "only tested in remote mode"
1279 # Convenience function for skipping tests not run in proxy mode.
1282 skip_always
$1 "not tested in proxy mode"
1285 # Convenience function for skipping tests not run in proxy mode.
1288 skip_always
$1 "not tested in proxy-noredirect mode"
1296 echo "WARNING: $1${2+ ($2)}" >>$LOGFILE
1298 warnings
=`expr $warnings + 1`
1303 echo "FAIL: $1" |
tee -a ${LOGFILE}
1304 echo "*** Please see the \`TESTS' and \`check.log' files for more information." >&2
1305 # This way the tester can go and see what remnants were left
1311 # Test our temp directory for cvs-serv* directories and cvsXXXXXX temp
1312 # files. We would like to not leave any behind.
1313 if $remote && $LS $TMPDIR/cvs-serv
* >/dev
/null
2>&1; then
1314 # A true value means ls found files/directories with these names.
1315 # Give the server some time to finish, then retry.
1317 if $LS $TMPDIR/cvs-serv
* >/dev
/null
2>&1; then
1318 warn
"$1" "Found cvs-serv* directories in $TMPDIR."
1319 # The above will exit if $skipfail
1320 rm -rf $TMPDIR/cvs-serv
*
1323 if $LS $TMPDIR/cvs??????
>/dev
/null
2>&1; then
1324 # A true value means ls found files/directories with these names.
1325 warn
"$1" "Found cvsXXXXXX temp files in $TMPDIR."
1326 # The above will exit if $skipfail
1327 rm -f ls $TMPDIR/cvs??????
1331 # See dotest and dotest_fail for explanation (this is the parts
1332 # of the implementation common to the two).
1335 if $EXPR "`cat ${TESTDIR}/dotest.tmp`" : "$3${ENDANCHOR}" >/dev
/null
; then
1336 # Why, I hear you ask, do we write this to the logfile
1337 # even when the test passes? The reason is that the test
1338 # may give us the regexp which we were supposed to match,
1339 # but sometimes it may be useful to look at the exact
1340 # text which was output. For example, suppose one wants
1341 # to grep for a particular warning, and make _sure_ that
1342 # CVS never hits it (even in cases where the tests might
1343 # match it with .*). Or suppose one wants to see the exact
1344 # date format output in a certain case (where the test will
1345 # surely use a somewhat non-specific pattern).
1346 cat ${TESTDIR}/dotest.tmp
>>${LOGFILE}
1348 verify_tmp_empty
"$1"
1349 # expr can't distinguish between "zero characters matched" and "no match",
1350 # so special-case it.
1351 elif test -z "$3" && test ! -s ${TESTDIR}/dotest.tmp
; then
1353 verify_tmp_empty
"$1"
1354 elif test x
"$4" != x
; then
1355 if $EXPR "`cat ${TESTDIR}/dotest.tmp`" : "$4${ENDANCHOR}" >/dev
/null
; then
1356 cat ${TESTDIR}/dotest.tmp
>>${LOGFILE}
1358 verify_tmp_empty
"$1"
1360 echo "** expected: " >>${LOGFILE}
1361 echo "$3" >>${LOGFILE}
1362 echo "$3" > ${TESTDIR}/dotest.ex1
1363 echo "** or: " >>${LOGFILE}
1364 echo "$4" >>${LOGFILE}
1365 echo "$4" > ${TESTDIR}/dotest.ex2
1366 echo "** got: " >>${LOGFILE}
1367 cat ${TESTDIR}/dotest.tmp
>>${LOGFILE}
1371 echo "** expected: " >>${LOGFILE}
1372 echo "$3" >>${LOGFILE}
1373 echo "$3" > ${TESTDIR}/dotest.exp
1374 echo "** got: " >>${LOGFILE}
1375 cat ${TESTDIR}/dotest.tmp
>>${LOGFILE}
1380 dotest_all_in_one
()
1382 if $EXPR "`cat ${TESTDIR}/dotest.tmp`" : \
1383 "`cat ${TESTDIR}/dotest.exp`" >/dev
/null
; then
1389 # WARNING: this won't work with REs that match newlines....
1391 dotest_line_by_line
()
1394 while [ $line -le `wc -l <${TESTDIR}/dotest.tmp` ] ; do
1395 if $EXPR "`sed -n ${line}p ${TESTDIR}/dotest.tmp`" : \
1396 "`sed -n ${line}p ${TESTDIR}/dotest.exp`" >/dev
/null
; then
1398 elif test -z "`sed -n ${line}p ${TESTDIR}/dotest.tmp`" &&
1399 test -z "`sed -n ${line}p ${TESTDIR}/dotest.exp`"; then
1402 echo "Line $line:" >> ${LOGFILE}
1403 echo "**** expected: " >>${LOGFILE}
1404 sed -n ${line}p ${TESTDIR}/dotest.exp >>${LOGFILE}
1405 echo "**** got: " >>${LOGFILE}
1406 sed -n ${line}p ${TESTDIR}/dotest.tmp >>${LOGFILE}
1410 line
=`expr $line + 1`
1416 # If you are having trouble telling which line of a multi-line
1417 # expression is not being matched, replace calls to dotest_internal()
1418 # with calls to this function:
1420 dotest_internal_debug
()
1422 if test -z "$3"; then
1423 if test -s ${TESTDIR}/dotest.tmp
; then
1424 echo "** expected: " >>${LOGFILE}
1425 echo "$3" >>${LOGFILE}
1426 echo "$3" > ${TESTDIR}/dotest.exp
1427 rm -f ${TESTDIR}/dotest.ex2
1428 echo "** got: " >>${LOGFILE}
1429 cat ${TESTDIR}/dotest.tmp
>>${LOGFILE}
1433 verify_tmp_empty
"$1"
1436 echo "$3" > ${TESTDIR}/dotest.exp
1437 if dotest_line_by_line
"$1" "$2"; then
1439 verify_tmp_empty
"$1"
1441 if test x
"$4" != x
; then
1442 mv ${TESTDIR}/dotest.exp
${TESTDIR}/dotest.ex1
1443 echo "$4" > ${TESTDIR}/dotest.exp
1444 if dotest_line_by_line
"$1" "$2"; then
1446 verify_tmp_empty
"$1"
1448 mv ${TESTDIR}/dotest.exp
${TESTDIR}/dotest.ex2
1449 echo "** expected: " >>${LOGFILE}
1450 echo "$3" >>${LOGFILE}
1451 echo "** or: " >>${LOGFILE}
1452 echo "$4" >>${LOGFILE}
1453 echo "** got: " >>${LOGFILE}
1454 cat ${TESTDIR}/dotest.tmp
>>${LOGFILE}
1458 echo "** expected: " >>${LOGFILE}
1459 echo "$3" >>${LOGFILE}
1460 echo "** got: " >>${LOGFILE}
1461 cat ${TESTDIR}/dotest.tmp
>>${LOGFILE}
1468 # This function allows the test output to be filtered before being verified.
1469 # The dotest_* functions all call this function, which runs the command
1470 # in the env var $TEST_FILTER on its argument if $TEST_FILTER is set. If
1471 # $TEST_FILTER is not set, this function does nothing.
1473 # I found this primarily useful when running the test suite on a CVS
1474 # executable linked with memory and function profilers which can generate
1478 if test -n "$TEST_FILTER"; then
1479 # Make sure there is an EOL
1481 sed '${/^$/d}' <$1 >$1.filter1
1483 eval "$TEST_FILTER" <$1.filter1
>$1.filter2
1484 diff -u $1 $1.filter2 \
1492 # dotest TESTNAME COMMAND OUTPUT [OUTPUT2]
1493 # TESTNAME is the name used in the log to identify the test.
1494 # COMMAND is the command to run; for the test to pass, it exits with
1496 # OUTPUT is a regexp which is compared against the output (stdout and
1497 # stderr combined) from the test. It is anchored to the start and end
1498 # of the output, so should start or end with ".*" if that is what is desired.
1499 # Trailing newlines are stripped from the command's actual output before
1500 # matching against OUTPUT.
1501 # If OUTPUT2 is specified and the output matches it, then it is also
1502 # a pass (partial workaround for the fact that some versions of expr
1506 rm -f $TESTDIR/dotest.ex?
2>&1
1507 eval "$2" >$TESTDIR/dotest.tmp
2>&1
1509 run_filter
$TESTDIR/dotest.tmp
1510 if test "$status" != 0; then
1511 cat $TESTDIR/dotest.tmp
>>$LOGFILE
1512 echo "exit status was $status" >>${LOGFILE}
1515 dotest_internal
"$@"
1518 # Like dotest except only 2 args and result must exactly match stdin
1521 rm -f $TESTDIR/dotest.ex?
2>&1
1522 eval "$2" >$TESTDIR/dotest.tmp
2>&1
1524 run_filter
$TESTDIR/dotest.tmp
1525 if test "$status" != 0; then
1526 cat $TESTDIR/dotest.tmp
>>$LOGFILE
1527 echo "exit status was $status" >>$LOGFILE
1530 cat >$TESTDIR/dotest.exp
1531 if cmp $TESTDIR/dotest.exp
$TESTDIR/dotest.tmp
>/dev
/null
2>&1; then
1533 verify_tmp_empty
"$1"
1535 echo "** expected: " >>$LOGFILE
1536 cat $TESTDIR/dotest.exp
>>$LOGFILE
1537 echo "** got: " >>$LOGFILE
1538 cat $TESTDIR/dotest.tmp
>>$LOGFILE
1543 # Like dotest except exitstatus should be nonzero.
1546 rm -f $TESTDIR/dotest.ex?
2>&1
1547 eval "$2" >$TESTDIR/dotest.tmp
2>&1
1549 run_filter
$TESTDIR/dotest.tmp
1550 if test "$status" = 0; then
1551 cat $TESTDIR/dotest.tmp
>>$LOGFILE
1552 echo "exit status was $status" >>$LOGFILE
1555 dotest_internal
"$@"
1558 # Like dotest except output is sorted.
1561 rm -f $TESTDIR/dotest.ex?
2>&1
1562 eval "$2" >$TESTDIR/dotest.tmp1
2>&1
1564 run_filter
$TESTDIR/dotest.tmp1
1565 if test "$status" != 0; then
1566 cat $TESTDIR/dotest.tmp1
>>$LOGFILE
1567 echo "exit status was $status" >>$LOGFILE
1570 $TR ' ' ' ' < $TESTDIR/dotest.tmp1 |
sort > $TESTDIR/dotest.tmp
1571 dotest_internal
"$@"
1574 # Like dotest_fail except output is sorted.
1577 rm -f $TESTDIR/dotest.ex?
2>&1
1578 eval "$2" >$TESTDIR/dotest.tmp1
2>&1
1580 run_filter
$TESTDIR/dotest.tmp1
1581 if test "$status" = 0; then
1582 cat $TESTDIR/dotest.tmp1
>>$LOGFILE
1583 echo "exit status was $status" >>$LOGFILE
1586 $TR ' ' ' ' < $TESTDIR/dotest.tmp1 |
sort > $TESTDIR/dotest.tmp
1587 dotest_internal
"$@"
1590 # A function for fetching the timestamp of a revison of a file
1592 ${testcvs} -n rlog
-N ${1+"$@"} |
1593 while read token value
; do
1596 echo $value |
sed "s,;.*,,"
1603 # Avoid picking up any stray .cvsrc, etc., from the user running the tests
1605 HOME
=$TESTDIR/home
; export HOME
1607 # Make sure this variable is not defined to anything that would
1608 # change the format of rcs dates. Otherwise people using e.g.,
1609 # RCSINIT=-zLT get lots of spurious failures.
1610 RCSINIT
=; export RCSINIT
1612 # Remaining arguments are the names of tests to run.
1614 # The testsuite is broken up into (hopefully manageably-sized)
1615 # independently runnable tests, so that one can quickly get a result
1616 # from a cvs or testsuite change, and to facilitate understanding the
1619 if test x
"$*" = x
; then
1620 # Basic/miscellaneous functionality
1621 tests
="version basica basicb basicc basic1 deep basic2 ls"
1622 tests
="$tests parseroot parseroot2 parseroot3 files spacefiles"
1623 tests
="${tests} commit-readonly commit-add-missing"
1624 tests
="${tests} status"
1625 # Branching, tagging, removing, adding, multiple directories
1626 tests
="${tests} rdiff rdiff-short"
1627 tests
="${tests} rdiff2 diff diffnl death death2"
1628 tests
="${tests} rm-update-message rmadd rmadd2 rmadd3 resurrection"
1629 tests
="${tests} dirs dirs2 branches branches2 branches3"
1630 tests
="${tests} branches4 tagc tagf tag-space"
1631 tests
="${tests} rcslib multibranch import importb importc importX"
1632 tests
="$tests importX2 import-CVS import-quirks"
1633 tests
="${tests} update-p import-after-initial branch-after-import"
1634 tests
="${tests} join join2 join3 join4 join5 join6 join7"
1635 tests
="${tests} join-readonly-conflict join-admin join-admin-2"
1636 tests
="${tests} join-rm"
1637 tests
="${tests} new newb conflicts conflicts2 conflicts3"
1638 tests
="${tests} clean"
1639 tests
="${tests} keywordexpand"
1640 # Checking out various places (modules, checkout -d, &c)
1641 tests
="${tests} modules modules2 modules3 modules4 modules5 modules6"
1642 tests
="${tests} modules7 mkmodules co-d"
1643 tests
="${tests} cvsadm emptydir abspath abspath2 toplevel toplevel2"
1644 tests
="${tests} rstar-toplevel trailingslashes checkout_repository"
1645 # Log messages, error messages.
1646 tests
="${tests} mflag editor env errmsg1 errmsg2 adderrmsg opterrmsg"
1647 tests
="${tests} errmsg3"
1648 tests
="${tests} close-stdout"
1649 tests
="$tests debug-log-nonfatal"
1650 # Watches, binary files, history browsing, &c.
1651 tests
="${tests} devcom devcom2 devcom3 watch4 watch5 watch6-0 watch6"
1652 tests
="${tests} edit-check"
1653 tests
="${tests} unedit-without-baserev"
1654 tests
="${tests} ignore ignore-on-branch binfiles binfiles2 binfiles3"
1655 tests
="${tests} mcopy binwrap binwrap2"
1656 tests
="${tests} binwrap3 mwrap info taginfo posttag"
1657 tests
="$tests config config2 config3 config4"
1658 tests
="${tests} serverpatch log log2 logopt ann ann-id"
1659 # Repository Storage (RCS file format, CVS lock files, creating
1660 # a repository without "cvs init", &c).
1661 tests
="${tests} crerepos rcs rcs2 rcs3 rcs4 rcs5"
1662 tests
="$tests lockfiles backuprecover"
1663 tests
="${tests} sshstdio"
1664 # More history browsing, &c.
1665 tests
="${tests} history"
1666 tests
="${tests} big modes modes2 modes3 stamps"
1667 # PreservePermissions stuff: permissions, symlinks et al.
1668 # tests="${tests} perms symlinks symlinks2 hardlinks"
1669 # More tag and branch tests, keywords.
1670 tests
="${tests} sticky keyword keywordlog keywordname keyword2"
1671 tests
="${tests} head tagdate multibranch2 tag8k"
1672 # "cvs admin", reserved checkouts.
1673 tests
="${tests} admin reserved"
1674 # Nuts and bolts of diffing/merging (diff library, &c)
1675 tests
="${tests} diffmerge1 diffmerge2"
1676 # Release of multiple directories
1677 tests
="${tests} release"
1678 tests
="${tests} recase"
1679 # Multiple root directories and low-level protocol tests.
1680 tests
="${tests} multiroot multiroot2 multiroot3 multiroot4"
1681 tests
="${tests} rmroot reposmv pserver server server2 client"
1682 tests
="${tests} dottedroot fork commit-d template"
1683 tests
="${tests} writeproxy writeproxy-noredirect writeproxy-ssh"
1684 tests
="${tests} writeproxy-ssh-noredirect"
1689 # Now check the -f argument for validity.
1690 if test -n "$fromtest"; then
1691 # Don't allow spaces - they are our delimiters in tests
1693 for sub
in $fromtest; do
1694 count
=`expr $count + 1`
1696 if test $count != 1; then
1697 echo "No such test \`$fromtest'." >&2
1700 # make sure it is in $tests
1705 echo "No such test \`$fromtest'." >&2
1713 # a simple function to compare directory contents
1715 # Returns: 0 for same, 1 for different
1724 find .
-print | fgrep
-v /CVS |
sort > $TESTDIR/dc$
$d1
1726 # go back where we were to avoid symlink hell...
1729 find .
-print | fgrep
-v /CVS |
sort > $TESTDIR/dc$
$d2
1731 if diff $TESTDIR/dc$
$d1 $TESTDIR/dc$
$d2 >/dev
/null
2>&1
1740 if test -f $DIR_1/"$a" ; then
1741 cmp -s $DIR_1/"$a" $DIR_2/"$a"
1742 if test $?
-ne 0 ; then
1746 done < $TESTDIR/dc$
$d1
1747 rm -f $TESTDIR/dc$$
*
1754 # The following 4 functions are used by the diffmerge1 test case. They set up,
1755 # respectively, the four versions of the files necessary:
1757 # 1. Ancestor revisions.
1758 # 2. "Your" changes.
1760 # 4. Expected merge result.
1763 # Create ancestor revisions for diffmerge1
1764 diffmerge_create_older_files
() {
1765 # This test case was supplied by Noah Friedman:
1766 cat >testcase01
<<EOF
1769 package random.application;
1771 import random.util.*;
1775 /* Instantiates a Button with origin (0, 0) and zero width and height.
1776 * You must call an initializer method to properly initialize the Button.
1782 _titleColor = Color.black;
1783 _disabledTitleColor = Color.gray;
1784 _titleFont = Font.defaultFont ();
1787 /* Convenience constructor for instantiating a Button with
1788 * bounds x, y, width, and height. Equivalent to
1789 * foo = new Button ();
1790 * foo.init (x, y, width, height);
1792 public Button (int x, int y, int width, int height)
1795 init (x, y, width, height);
1800 # This test case was supplied by Jacob Burckhardt:
1801 cat >testcase02
<<EOF
1809 # This test case was supplied by Karl Tomlinson who also wrote the
1810 # patch which lets CVS correctly handle this and several other cases:
1811 cat >testcase03
<<EOF
1820 # This test case was supplied by Karl Tomlinson:
1821 cat >testcase04
<<EOF
1837 # This test case was supplied by Karl Tomlinson:
1838 cat >testcase05
<<EOF
1866 # This test case was supplied by Jacob Burckhardt:
1867 cat >testcase06
<<EOF
1883 # This test is supposed to verify that the horizon lines are the same
1884 # for both 2-way diffs, but unfortunately, it does not fail with the
1885 # old version of cvs. However, Karl Tomlinson still thought it would
1886 # be good to test it anyway:
1887 cat >testcase07
<<EOF
1918 # This test case was supplied by Jacob Burckhardt:
1919 cat >testcase08
<<EOF
1920 Both changes move this line to the end of the file.
1926 First change will delete this line.
1928 First change will also delete this line.
1934 Second change will change it here.
1941 # This test case was supplied by Jacob Burckhardt. Note that I do not
1942 # think cvs has ever failed with this case, but I include it anyway,
1943 # since I think it is a hard case. It is hard because Peter Miller's
1944 # fmerge utility fails on it:
1945 cat >testcase09
<<EOF
1955 # This test case was supplied by Martin Dorey and simplified by Jacob
1957 cat >testcase10
<<EOF
1960 fV ( MtatRk != Zy ) UDTXUK_DUUZU ( BGKT_ZFDK_qjT_HGTG );
1962 MtatRk = MQfr_GttpfIRte_MtpeaL ( &acI, jfle_Uecopd_KRLIep * jfle_Uecopd_MfJe_fY_nEtek );
1963 OjZy MtatRk = Uead_GttpfIRte_MtpeaL ( &acI, jfle_Uecopd_MfJe_fY_nEtek, nRVVep );
1965 Bloke_GttpfIRte_MtpeaL ( &acI );
1966 MTGTXM Uead_Ktz_qjT_jfle_Uecopd ( fYt Y, uofd *nRVVep )
1970 petRpY ( Uead_Mectopk ( noot_Uecopd.qVtHatabcY0 * noot_Uecopd.MectopkFepBlRktep +
1971 Y * jfle_Uecopd_MfJe_fY_Mectopk,
1972 jfle_Uecopd_MfJe_fY_Mectopk,
1977 petRpY ( Uead_Mectopk ( noot_Uecopd.qVtqfppHatabcY0 * noot_Uecopd.MectopkFepBlRktep +
1978 ( Y - 16 ) * jfle_Uecopd_MfJe_fY_Mectopk,
1979 jfle_Uecopd_MfJe_fY_Mectopk,
1986 /****************************************************************************
1988 * Uead Mectopk ( Uelatfue to tze cRppeYt raptftfoY ) *
1990 ****************************************************************************/
1992 MTGTXM Uead_Mectopk ( RfYt64 Mtapt_Mectop, RfYt64 KRL_Mectopk, uofd *nRVVep )
1996 MtatRk = Uead_HfkQ ( FaptftfoY_TaIle.Uelatfue_Mectop + Mtapt_Mectop, KRL_Mectopk, nRVVep );
2001 HfkQipfte ( waYdle, /* waYdle */
2002 waYdleFok, /* ZVVket VpoL ktapt oV dfkQ */
2003 (coYkt RfYt8*) nRVVep, /* nRVVep */
2004 0, /* MRrepVlRoRk KfxoYfkL */
2005 beYgtz /* nEtek to Apfte */
2013 # Create "your" revisions for diffmerge1
2014 diffmerge_create_your_files
() {
2015 # remove the Button() method
2016 cat >testcase01
<<\EOF
2019 package random.application
;
2021 import random.util.
*;
2025 /* Instantiates a Button with origin
(0, 0) and zero width and height.
2026 * You must call an initializer method to properly initialize the Button.
2032 _titleColor
= Color.black
;
2033 _disabledTitleColor
= Color.gray
;
2034 _titleFont
= Font.defaultFont
();
2039 cat >testcase02
<<\EOF
2047 cat >testcase03
<<\EOF
2058 cat >testcase04
<<\EOF
2068 cat >testcase05
<<\EOF
2085 # Test case 6 and test case 7 both use the same input files, but they
2086 # order the input files differently. In one case, a certain file is
2087 # used as the older file, but in the other test case, that same file
2088 # is used as the file which has changes. I could have put echo
2089 # commands here, but since the echo lines would be the same as those
2090 # in the previous function, I decided to save space and avoid repeating
2091 # several lines of code. Instead, I merely swap the files:
2093 mv testcase06 testcase07
2096 # Make the date newer so that cvs thinks that the files are changed:
2097 touch testcase06 testcase07
2099 cat >testcase08
<<\EOF
2104 First change has now added this
in.
2110 Second change will change it here.
2116 Both changes move this line to the end of the
file.
2119 cat >testcase09
<<\EOF
2133 cat >testcase10
<<\EOF
2135 fV
( BzQkV_URYYfYg
) (*jfle_Uecopdk
)[0].jfle_Uecopd_KRLIep
= ZpfgfYal_jUK
;
2138 fV
( MtatRk
!= Zy
) UDTXUK_DUUZU
( BGKT_ZFDK_qjT_HGTG
);
2140 fV
( jfle_Uecopd_KRLIep
< 16 )
2142 MtatRk
= Uead_Ktz_qjT_jfle_Uecopd
( jfle_Uecopd_KRLIep
, (uofd
*)nRVVep
);
2146 MtatRk
= ZreY_GttpfIRte_MtpeaL
( qjT_jfle_Uecopdk
, qjT_jfle_Uecopd_BoRYt
, HGTG_TvFD
, KXbb
, KXbb
, &acI
);
2147 fV
( MtatRk
!= Zy
) UDTXUK_DUUZU
( BGKT_ZFDK_qjT_HGTG
);
2149 MtatRk
= MQfr_GttpfIRte_MtpeaL
( &acI
, jfle_Uecopd_KRLIep
* jfle_Uecopd_MfJe_fY_nEtek
);
2150 OjZy MtatRk
= Uead_GttpfIRte_MtpeaL
( &acI
, jfle_Uecopd_MfJe_fY_nEtek
, nRVVep
);
2152 Bloke_GttpfIRte_MtpeaL
( &acI
);
2153 MTGTXM Uead_Ktz_qjT_jfle_Uecopd
( fYt Y
, uofd
*nRVVep
)
2159 petRpY
( Uead_Mectopk
( noot_Uecopd.qVtHatabcY0
* noot_Uecopd.MectopkFepBlRktep
+
2160 Y
* jfle_Uecopd_MfJe_fY_Mectopk
,
2161 jfle_Uecopd_MfJe_fY_Mectopk
,
2166 petRpY
( Uead_Mectopk
( noot_Uecopd.qVtqfppHatabcY0
* noot_Uecopd.MectopkFepBlRktep
+
2167 ( Y
- 16 ) * jfle_Uecopd_MfJe_fY_Mectopk
,
2168 jfle_Uecopd_MfJe_fY_Mectopk
,
2177 /****************************************************************************
2179 * Uead Mectopk
( Uelatfue to tze cRppeYt raptftfoY
) *
2181 ****************************************************************************/
2183 MTGTXM Uead_Mectopk
( RfYt64 Mtapt_Mectop
, RfYt64 KRL_Mectopk
, uofd
*nRVVep
)
2187 MtatRk
= Uead_HfkQ
( FaptftfoY_TaIle.Uelatfue_Mectop
+ Mtapt_Mectop
, KRL_Mectopk
, nRVVep
);
2192 HfkQipfte
( waYdle
, /* waYdle
*/
2193 waYdleFok
, /* ZVVket VpoL ktapt oV dfkQ
*/
2194 (coYkt RfYt8
*) nRVVep
, /* nRVVep
*/
2195 0, /* MRrepVlRoRk KfxoYfkL
*/
2196 beYgtz
/* nEtek to Apfte
*/
2205 # Create "my" revisions for diffmerge1
2206 diffmerge_create_my_files
() {
2207 # My working copy still has the Button() method, but I
2208 # comment out some code at the top of the class.
2209 cat >testcase01
<<\EOF
2212 package random.application
;
2214 import random.util.
*;
2218 /* Instantiates a Button with origin
(0, 0) and zero width and height.
2219 * You must call an initializer method to properly initialize the Button.
2225 // _titleColor
= Color.black
;
2226 // _disabledTitleColor
= Color.gray
;
2227 // _titleFont
= Font.defaultFont
();
2230 /* Convenience constructor
for instantiating a Button with
2231 * bounds x
, y
, width
, and height. Equivalent to
2232 * foo
= new Button
();
2233 * foo.init
(x
, y
, width
, height
);
2235 public Button
(int x
, int y
, int width
, int height
)
2238 init
(x
, y
, width
, height
);
2243 cat >testcase02
<<\EOF
2251 cat >testcase03
<<\EOF
2261 cat >testcase04
<<\EOF
2279 # Note that in test case 5, there are no changes in the "mine"
2280 # section, which explains why there is no command here which writes to
2283 # no changes for testcase06
2285 # The two branches make the same changes:
2286 cp ..
/yours
/testcase07 .
2288 cat >testcase08
<<\EOF
2293 First change will delete this line.
2295 First change will also delete this line.
2301 Second change has now changed it here.
2307 Both changes move this line to the end of the
file.
2310 cat >testcase09
<<\EOF
2323 cat >testcase10
<<\EOF
2326 fV
( MtatRk
!= Zy
) UDTXUK_DUUZU
( BGKT_ZFDK_qjT_HGTG
);
2328 MtatRk
= MQfr_GttpfIRte_MtpeaL
( &acI
, jfle_Uecopd_KRLIep
* jfle_Uecopd_MfJe_fY_nEtek
);
2329 OjZy MtatRk
= Uead_GttpfIRte_MtpeaL
( &acI
, jfle_Uecopd_MfJe_fY_nEtek
, nRVVep
);
2331 Bloke_GttpfIRte_MtpeaL
( &acI
);
2332 MTGTXM Uead_Ktz_qjT_jfle_Uecopd
( fYt Y
, uofd
*nRVVep
)
2336 petRpY
( Uead_Mectopk
( noot_Uecopd.qVtHatabcY0
* noot_Uecopd.MectopkFepBlRktep
+
2337 Y
* jfle_Uecopd_MfJe_fY_Mectopk
,
2338 jfle_Uecopd_MfJe_fY_Mectopk
,
2343 petRpY
( Uead_Mectopk
( noot_Uecopd.qVtqfppHatabcY0
* noot_Uecopd.MectopkFepBlRktep
+
2344 ( Y
- 16 ) * jfle_Uecopd_MfJe_fY_Mectopk
,
2345 jfle_Uecopd_MfJe_fY_Mectopk
,
2352 /****************************************************************************
2354 * Uead Mectopk
( Uelatfue to tze cRppeYt raptftfoY
) *
2356 ****************************************************************************/
2358 MTGTXM Uead_Mectopk
( RfYt64 Mtapt_Mectop
, RfYt64 KRL_Mectopk
, uofd
*nRVVep
)
2362 MtatRk
= Uead_HfkQ
( FaptftfoY_TaIle.Uelatfue_Mectop
+ Mtapt_Mectop
, KRL_Mectopk
, nRVVep
);
2367 HfkQipfte
( waYdle
, /* waYdle
*/
2368 waYdleFok
, /* ZVVket VpoL ktapt oV dfkQ
*/
2369 (coYkt RfYt8
*) nRVVep
, /* nRVVep
*/
2370 beYgtz
/* nEtek to Apfte
*/
2379 # Create expected results of merge for diffmerge1
2380 diffmerge_create_expected_files
() {
2381 cat >testcase01
<<\EOF
2384 package random.application
;
2386 import random.util.
*;
2390 /* Instantiates a Button with origin
(0, 0) and zero width and height.
2391 * You must call an initializer method to properly initialize the Button.
2397 // _titleColor
= Color.black
;
2398 // _disabledTitleColor
= Color.gray
;
2399 // _titleFont
= Font.defaultFont
();
2404 cat >testcase02
<<\EOF
2412 cat >testcase03
<<\EOF
2424 cat >testcase04
<<\EOF
2436 # Since there are no changes in the "mine" section, just take exactly
2437 # the version in the "yours" section:
2438 cp ..
/yours
/testcase05 .
2440 cp ..
/yours
/testcase06 .
2442 # Since the two branches make the same changes, the result should be
2443 # the same as both branches. Here, I happen to pick yours to copy from,
2444 # but I could have also picked mine, since the source of the copy is
2445 # the same in either case. However, the mine has already been
2446 # altered by the update command, so don't use it. Instead, use the
2447 # yours section which has not had an update on it and so is unchanged:
2448 cp ..
/yours
/testcase07 .
2450 cat >testcase08
<<\EOF
2455 First change has now added this
in.
2461 Second change has now changed it here.
2467 Both changes move this line to the end of the
file.
2470 cat >testcase09
<<\EOF
2484 cat >testcase10
<<\EOF
2486 fV
( BzQkV_URYYfYg
) (*jfle_Uecopdk
)[0].jfle_Uecopd_KRLIep
= ZpfgfYal_jUK
;
2489 fV
( MtatRk
!= Zy
) UDTXUK_DUUZU
( BGKT_ZFDK_qjT_HGTG
);
2491 fV
( jfle_Uecopd_KRLIep
< 16 )
2493 MtatRk
= Uead_Ktz_qjT_jfle_Uecopd
( jfle_Uecopd_KRLIep
, (uofd
*)nRVVep
);
2497 MtatRk
= ZreY_GttpfIRte_MtpeaL
( qjT_jfle_Uecopdk
, qjT_jfle_Uecopd_BoRYt
, HGTG_TvFD
, KXbb
, KXbb
, &acI
);
2498 fV
( MtatRk
!= Zy
) UDTXUK_DUUZU
( BGKT_ZFDK_qjT_HGTG
);
2500 MtatRk
= MQfr_GttpfIRte_MtpeaL
( &acI
, jfle_Uecopd_KRLIep
* jfle_Uecopd_MfJe_fY_nEtek
);
2501 OjZy MtatRk
= Uead_GttpfIRte_MtpeaL
( &acI
, jfle_Uecopd_MfJe_fY_nEtek
, nRVVep
);
2503 Bloke_GttpfIRte_MtpeaL
( &acI
);
2504 MTGTXM Uead_Ktz_qjT_jfle_Uecopd
( fYt Y
, uofd
*nRVVep
)
2510 petRpY
( Uead_Mectopk
( noot_Uecopd.qVtHatabcY0
* noot_Uecopd.MectopkFepBlRktep
+
2511 Y
* jfle_Uecopd_MfJe_fY_Mectopk
,
2512 jfle_Uecopd_MfJe_fY_Mectopk
,
2517 petRpY
( Uead_Mectopk
( noot_Uecopd.qVtqfppHatabcY0
* noot_Uecopd.MectopkFepBlRktep
+
2518 ( Y
- 16 ) * jfle_Uecopd_MfJe_fY_Mectopk
,
2519 jfle_Uecopd_MfJe_fY_Mectopk
,
2528 /****************************************************************************
2530 * Uead Mectopk
( Uelatfue to tze cRppeYt raptftfoY
) *
2532 ****************************************************************************/
2534 MTGTXM Uead_Mectopk
( RfYt64 Mtapt_Mectop
, RfYt64 KRL_Mectopk
, uofd
*nRVVep
)
2538 MtatRk
= Uead_HfkQ
( FaptftfoY_TaIle.Uelatfue_Mectop
+ Mtapt_Mectop
, KRL_Mectopk
, nRVVep
);
2543 HfkQipfte
( waYdle
, /* waYdle
*/
2544 waYdleFok
, /* ZVVket VpoL ktapt oV dfkQ
*/
2545 (coYkt RfYt8
*) nRVVep
, /* nRVVep
*/
2546 beYgtz
/* nEtek to Apfte
*/
2557 # Echo a new CVSROOT based on $1, $remote, and $remotehost
2560 if test -n "$remotehost"; then
2561 echo :ext
$rootoptions:$remotehost$1
2563 echo :fork
$rootoptions:$1
2572 # Set up CVSROOT (the crerepos tests will test operating without CVSROOT set).
2574 # Currently we test :fork: and :ext: (see crerepos test). There is a
2575 # known difference between the two in modes-15 (see comments there).
2577 # :ext: can be tested against a remote machine if:
2579 # 1. $remotehost is set using the `-h' option to this script.
2580 # 2. ${CVS_RSH=rsh} $remotehost works.
2581 # 3. The path to $TESTDIR is the same on both machines (symlinks are okay)
2582 # 4. The path to $testcvs is the same on both machines (symlinks are okay)
2583 # or $CVS_SERVER is overridden in this script's environment to point to
2584 # a working CVS exectuable on the remote machine.
2586 # Testing :pserver: would be hard (inetd issues). (How about using tcpserver
2587 # and some high port number? DRP)
2590 mkdir
${TESTDIR}/realcvsroot
2591 ln -s realcvsroot
${TESTDIR}/cvsroot
2593 CVSROOT_DIRNAME
=${TESTDIR}/cvsroot
2594 CVSROOT
=`newroot $CVSROOT_DIRNAME`; export CVSROOT
2599 ### Initialize the repository
2601 dotest init-1
"$testcvs init"
2603 # Now hide the primary root behind a secondary if requested.
2605 # Save the primary root.
2606 PRIMARY_CVSROOT
=$CVSROOT
2607 PRIMARY_CVSROOT_DIRNAME
=$CVSROOT_DIRNAME
2608 # Where the secondary root will be
2609 SECONDARY_CVSROOT_DIRNAME
=$TESTDIR/secondary_cvsroot
2610 if $noredirect; then
2611 rootoptions
=";Redirect=no"
2612 SECONDARY_CVSROOT
=`newroot $PRIMARY_CVSROOT_DIRNAME`
2614 SECONDARY_CVSROOT
=`newroot $SECONDARY_CVSROOT_DIRNAME`
2616 # Now set the global CVSROOT to use the secondary.
2617 CVSROOT
=$SECONDARY_CVSROOT; export CVSROOT
2620 if test $?
-eq 77; then
2621 echo "Unable to test in proxy mode: $skipreason" >&2
2622 skip all
"missing or broken rsync command."
2626 if $noredirect; then
2627 # Wrap the CVS server to allow --primary-root to be set by the
2629 cat <<EOF >$TESTDIR/secondary-wrapper
2631 CVS_SERVER=$TESTDIR/primary-wrapper
2634 # No need to check the PID of the last client since we are testing with
2635 # Redirect disabled.
2636 proot_arg="--allow-root=$SECONDARY_CVSROOT_DIRNAME"
2637 exec $CVS_SERVER \$proot_arg "\$@"
2639 cat <<EOF >$TESTDIR/primary-wrapper
2641 if test -n "$CVS_SERVER_LOG"; then
2642 CVS_SERVER_LOG=`dirname "$CVS_SERVER_LOG"`/cvsprimarylog
2643 export CVS_SERVER_LOG
2645 exec $CVS_SERVER "\$@"
2648 CVS_SERVER_secondary
=$TESTDIR/secondary-wrapper
2649 CVS_SERVER
=$CVS_SERVER_secondary
2651 chmod a
+x
$TESTDIR/secondary-wrapper \
2652 $TESTDIR/primary-wrapper
2655 # Script to sync the secondary root.
2656 cat >$TESTDIR/sync-secondary
<<EOF
2658 # date >>$TESTDIR/update-log
2667 # echo "updating from \$ps for command \\\`\$cmd' in dir \\\`\$dir'" \${1+"\$@"} \\
2668 # >>$TESTDIR/update-log
2670 # If multiple CVS executables could attempt to access the repository, we would
2671 # Need to lock for this sync and sleep
2674 # This is a hack to allow a few of the tests to play with the
2675 # UseNewInfoFmtStrings key in CVSROOT/config. It's inefficient, but there
2676 # aren't many tests than need it and the alternative is an awful lot of
2678 $RSYNC -rglop --delete --exclude '#cvs.*' \\
2679 $PRIMARY_CVSROOT_DIRNAME/ \\
2680 $SECONDARY_CVSROOT_DIRNAME
2684 # For the majority of the tests we will only sync the directories that
2688 # For \`add', we need a recursive update due to quirks in rsync syntax,
2689 # but it shouldn't affect efficiency since any new dir should be empty.
2691 # For \`import', a recursive update is necessary since subdirs may have
2692 # been added underneath the root dir we were passed.
2694 $PRIMARY_CVSROOT_DIRNAME/"\$dir" \\
2695 $SECONDARY_CVSROOT_DIRNAME/\`dirname -- "\$dir"\`
2699 # \`tag' may have changed CVSROOT/val-tags too.
2701 $PRIMARY_CVSROOT_DIRNAME/CVSROOT/val-tags \\
2702 $SECONDARY_CVSROOT_DIRNAME/CVSROOT
2703 # Otherwise it is identical to other write commands.
2704 $RSYNC -rglop --delete \\
2705 --include Attic --include CVS \
2706 --exclude '#cvs.*' --exclude '*/' \\
2707 $PRIMARY_CVSROOT_DIRNAME/"\$dir"/ \\
2708 $SECONDARY_CVSROOT_DIRNAME/"\$dir"
2712 # By default, sync just what changed.
2713 $RSYNC -rglop --delete \\
2714 --include Attic --include CVS \
2715 --exclude '#cvs.*' --exclude '*/' \\
2716 $PRIMARY_CVSROOT_DIRNAME/"\$dir"/ \\
2717 $SECONDARY_CVSROOT_DIRNAME/"\$dir"
2721 # And keep the history file up to date for all commands.
2723 $PRIMARY_CVSROOT_DIRNAME/CVSROOT/history \\
2724 $SECONDARY_CVSROOT_DIRNAME/CVSROOT
2728 # Avoid timestamp comparison issues with rsync.
2731 chmod a
+x
$TESTDIR/sync-secondary
2733 # And now init the secondary.
2734 $TESTDIR/sync-secondary
"- no, before - create secondary root" \
2737 # Initialize the primary repository
2738 mkdir proxy-init
; cd proxy-init
2739 dotest proxy-init-1
"$testcvs -Qd$PRIMARY_CVSROOT co CVSROOT"
2742 PrimaryServer=$PRIMARY_CVSROOT
2745 ALL $TESTDIR/sync-secondary loginfo %c %p %{sVv}
2747 cat >>postadmin
<<EOF
2748 ALL $TESTDIR/sync-secondary postadmin %c %p
2751 ALL $TESTDIR/sync-secondary posttag %c %p %o %b %t %{sVv}
2753 cat >>postwatch
<<EOF
2754 ALL $TESTDIR/sync-secondary postwatch %c %p
2756 dotest proxy-init-2 \
2757 "$testcvs -Q ci -mconfigure-writeproxy"
2759 # Save these files for later reference
2760 cp config
$TESTDIR/config-clean
2761 cp loginfo
$TESTDIR/loginfo-clean
2762 cp postadmin
$TESTDIR/postadmin-clean
2763 cp posttag
$TESTDIR/posttag-clean
2764 cp postwatch
$TESTDIR/postwatch-clean
2770 # Set this even when not testing $proxy to match messages, like $SPROG.
2771 SECONDARY_CVSROOT_DIRNAME
=$CVSROOT_DIRNAME
2774 # Save a copy of the initial repository so that it may be restored after the
2775 # tests that alter it.
2776 cp -Rp $CVSROOT_DIRNAME/CVSROOT
$TESTDIR/CVSROOT.save
2782 dotest init-2
"$testcvs init"
2789 for what
in $tests; do
2790 if test -n "$fromtest" ; then
2791 if test $fromtest = $what ; then
2800 # We've had cases where the version command started dumping core,
2801 # so we might as well test it
2802 dotest version-1
"${testcvs} --version" \
2804 Concurrent Versions System (CVS) [0-9.]*.*
2806 Copyright (C) [0-9]* Free Software Foundation, Inc.
2808 Senior active maintainers include Larry Jones, Derek R. Price,
2809 and Mark D. Baushke. Please see the AUTHORS and README files from the CVS
2810 distribution kit for a complete list of contributors and copyrights.
2812 CVS may be copied only under the terms of the GNU General Public License,
2813 a copy of which can be found with the CVS distribution kit.
2815 Specify the --help option for further information about CVS'
2819 # dotest version-2r "${testcvs} version" \
2820 #'Client: Concurrent Versions System (CVS) [0-9p.]* (client.*)
2821 #Server: Concurrent Versions System (CVS) [0-9p.]* (.*server)
2822 #Secondary Server: Concurrent Versions System (CVS) [0-9p.]* (.*server)'
2824 dotest version-2r
"${testcvs} version" \
2825 'Client: Concurrent Versions System (CVS) [0-9p.]* (client.*)
2826 Server: Concurrent Versions System (CVS) [0-9p.]* (.*server)'
2828 dotest version-2
"${testcvs} version" \
2829 'Concurrent Versions System (CVS) [0-9.]*.*'
2836 # Similar in spirit to some of the basic1, and basic2
2837 # tests, but hopefully a lot faster. Also tests operating on
2838 # files two directories down *without* operating on the parent dirs.
2840 # Tests basica-0a and basica-0b provide the equivalent of the:
2841 # mkdir ${CVSROOT_DIRNAME}/first-dir
2842 # used by many of the tests. It is "more official" in the sense
2843 # that is does everything through CVS; the reason most of the
2844 # tests don't use it is mostly historical.
2846 dotest basica-0a
"$testcvs -q co -l ."
2848 dotest basica-0b
"$testcvs add first-dir" \
2849 "Directory ${CVSROOT_DIRNAME}/first-dir added to the repository"
2853 dotest basica-1
"$testcvs -q co first-dir" ''
2856 # Test a few operations, to ensure they gracefully do
2857 # nothing in an empty directory.
2858 dotest basica-1a0
"$testcvs -q update"
2859 dotest basica-1a1
"$testcvs -q diff -c"
2860 dotest basica-1a2
"$testcvs -q status"
2861 dotest basica-1a3
"$testcvs -q update ."
2862 dotest basica-1a4
"$testcvs -q update ./"
2865 # Remote CVS gives the "cannot open CVS/Entries" error, which is
2866 # clearly a bug, but not a simple one to fix.
2867 dotest basica-1a10
"$testcvs -n add sdir" \
2868 "Directory $CVSROOT_DIRNAME/first-dir/sdir added to the repository" \
2869 "$SPROG add: cannot open CVS/Entries for reading: No such file or directory
2870 Directory $CVSROOT_DIRNAME/first-dir/sdir added to the repository"
2871 dotest_fail basica-1a11 \
2872 "test -d $CVSROOT_DIRNAME/first-dir/sdir"
2873 dotest basica-2
"$testcvs add sdir" \
2874 "Directory $CVSROOT_DIRNAME/first-dir/sdir added to the repository"
2877 dotest basica-3
"$testcvs add ssdir" \
2878 "Directory $CVSROOT_DIRNAME/first-dir/sdir/ssdir added to the repository"
2882 # Trying to commit it without a "cvs add" should be an error.
2883 # The "use `cvs add' to create an entry" message is the one
2884 # that I consider to be more correct, but local cvs prints the
2885 # "nothing known" message and noone has gotten around to fixing it.
2886 dotest_fail basica-notadded
"${testcvs} -q ci ssfile" \
2887 "${CPROG} commit: use .${CPROG} add. to create an entry for \`ssfile'
2888 ${CPROG}"' \[commit aborted\]: correct above errors first!' \
2889 "${CPROG}"' commit: nothing known about `ssfile'\''
2890 '"${CPROG}"' \[commit aborted\]: correct above errors first!'
2892 dotest basica-4
"${testcvs} add ssfile" \
2893 "${SPROG}"' add: scheduling file `ssfile'\'' for addition
2894 '"${SPROG}"' add: use .'"${SPROG}"' commit. to add this file permanently'
2895 dotest_fail basica-4a
"${testcvs} tag tag0 ssfile" \
2896 "${SPROG} tag: nothing known about ssfile
2897 ${SPROG} "'\[tag aborted\]: correct the above errors first!'
2899 dotest basica-5
"${testcvs} -q ci -m add-it" \
2900 "$CVSROOT_DIRNAME/first-dir/sdir/ssdir/ssfile,v <-- sdir/ssdir/ssfile
2901 initial revision: 1\.1"
2902 dotest_fail basica-5a \
2903 "${testcvs} -q tag BASE sdir/ssdir/ssfile" \
2904 "${SPROG} tag: Attempt to add reserved tag name BASE
2905 ${SPROG} \[tag aborted\]: failed to set tag BASE to revision 1\.1 in ${CVSROOT_DIRNAME}/first-dir/sdir/ssdir/ssfile,v"
2906 dotest basica-5b
"${testcvs} -q tag NOT_RESERVED" \
2907 'T sdir/ssdir/ssfile'
2909 dotest basica-6
"${testcvs} -q update" ''
2910 echo "ssfile line 2" >>sdir
/ssdir
/ssfile
2911 dotest_fail basica-6.2
"${testcvs} -q diff -c" \
2912 "Index: sdir/ssdir/ssfile
2913 ===================================================================
2914 RCS file: ${CVSROOT_DIRNAME}/first-dir/sdir/ssdir/ssfile,v
2915 retrieving revision 1\.1
2916 diff -c -r1\.1 ssfile
2917 \*\*\* sdir/ssdir/ssfile ${RFCDATE} 1\.1
2918 --- sdir/ssdir/ssfile ${RFCDATE}
2919 \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*
2923 ${PLUS} ssfile line 2"
2924 dotest_fail basica-6.3
"${testcvs} -q diff -c -rBASE" \
2925 "Index: sdir/ssdir/ssfile
2926 ===================================================================
2927 RCS file: ${CVSROOT_DIRNAME}/first-dir/sdir/ssdir/ssfile,v
2928 retrieving revision 1\.1
2929 diff -c -r1\.1 ssfile
2930 \*\*\* sdir/ssdir/ssfile ${RFCDATE} 1\.1
2931 --- sdir/ssdir/ssfile ${RFCDATE}
2932 \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*
2936 ${PLUS} ssfile line 2"
2937 dotest_fail basica-6.4
"${testcvs} -q diff -c -rBASE -C3isacrowd" \
2938 "Index: sdir/ssdir/ssfile
2939 ===================================================================
2940 RCS file: ${CVSROOT_DIRNAME}/first-dir/sdir/ssdir/ssfile,v
2941 retrieving revision 1\.1
2942 diff -c -C 3isacrowd -r1\.1 ssfile
2943 ${SPROG} diff: invalid context length argument"
2944 dotest basica-7
"${testcvs} -q ci -m modify-it" \
2945 "$CVSROOT_DIRNAME/first-dir/sdir/ssdir/ssfile,v <-- sdir/ssdir/ssfile
2946 new revision: 1\.2; previous revision: 1\.1"
2947 dotest_fail basica-nonexist
"${testcvs} -q ci nonexist" \
2948 "${CPROG}"' commit: nothing known about `nonexist'\''
2949 '"${CPROG}"' \[commit aborted\]: correct above errors first!'
2950 dotest basica-8
"${testcvs} -q update ." ''
2952 # Test the -f option to ci
2954 dotest basica-8a0
"${testcvs} -q ci -m not-modified ssfile" ''
2955 dotest basica-8a
"${testcvs} -q ci -f -m force-it" \
2956 "$CVSROOT_DIRNAME/first-dir/sdir/ssdir/ssfile,v <-- ssfile
2957 new revision: 1\.3; previous revision: 1\.2"
2958 dotest basica-8a1
"${testcvs} -q ci -m bump-it -r 2.0" \
2959 "$CVSROOT_DIRNAME/first-dir/sdir/ssdir/ssfile,v <-- ssfile
2960 new revision: 2\.0; previous revision: 1\.3"
2961 dotest basica-8a1a
"${testcvs} -q ci -m bump-it -r 2.9" \
2962 "${CVSROOT_DIRNAME}/first-dir/sdir/ssdir/ssfile,v <-- ssfile
2963 new revision: 2\.9; previous revision: 2\.0"
2964 # Test string-based revion number increment rollover
2965 dotest basica-8a1b
"${testcvs} -q ci -m bump-it -f -r 2" \
2966 "${CVSROOT_DIRNAME}/first-dir/sdir/ssdir/ssfile,v <-- ssfile
2967 new revision: 2\.10; previous revision: 2\.9"
2968 dotest basica-8a1c
"${testcvs} -q ci -m bump-it -r 2.99" \
2969 "${CVSROOT_DIRNAME}/first-dir/sdir/ssdir/ssfile,v <-- ssfile
2970 new revision: 2\.99; previous revision: 2\.10"
2971 # Test string-based revion number increment rollover
2972 dotest basica-8a1d
"${testcvs} -q ci -m bump-it -f -r 2" \
2973 "${CVSROOT_DIRNAME}/first-dir/sdir/ssdir/ssfile,v <-- ssfile
2974 new revision: 2\.100; previous revision: 2\.99"
2975 dotest basica-8a1e
"${testcvs} -q ci -m bump-it -r 2.1099" \
2976 "${CVSROOT_DIRNAME}/first-dir/sdir/ssdir/ssfile,v <-- ssfile
2977 new revision: 2\.1099; previous revision: 2\.100"
2978 # Test string-based revion number increment rollover
2979 dotest basica-8a1f
"${testcvs} -q ci -m bump-it -f -r 2" \
2980 "${CVSROOT_DIRNAME}/first-dir/sdir/ssdir/ssfile,v <-- ssfile
2981 new revision: 2\.1100; previous revision: 2\.1099"
2982 # -f should not be necessary, but it should be harmless.
2983 # Also test the "-r 3" (rather than "-r 3.0") usage.
2984 dotest basica-8a2
"${testcvs} -q ci -m bump-it -f -r 3" \
2985 "$CVSROOT_DIRNAME/first-dir/sdir/ssdir/ssfile,v <-- ssfile
2986 new revision: 3\.1; previous revision: 2\.1100"
2988 # Test using -r to create a branch
2989 dotest_fail basica-8a3
"${testcvs} -q ci -m bogus -r 3.0.0" \
2990 "$CVSROOT_DIRNAME/first-dir/sdir/ssdir/ssfile,v <-- ssfile
2991 $SPROG commit: $CVSROOT_DIRNAME/first-dir/sdir/ssdir/ssfile,v: can't find branch point 3\.0
2992 $SPROG commit: could not check in ssfile"
2993 dotest basica-8a4
"${testcvs} -q ci -m valid -r 3.1.2" \
2994 "$CVSROOT_DIRNAME/first-dir/sdir/ssdir/ssfile,v <-- ssfile
2995 new revision: 3\.1\.2\.1; previous revision: 3\.1"
2996 # now get rid of the sticky tag and go back to the trunk
2997 dotest basica-8a5
"${testcvs} -q up -A ./" "[UP] ssfile"
3000 dotest basica-8b
"${testcvs} -q diff -r1.2 -r1.3"
3002 dotest basica-8b1
"${testcvs} -q diff -r1.2 -r1.3 -C 3isacrowd"
3004 # The .* here will normally be "No such file or directory",
3005 # but if memory serves some systems (AIX?) have a different message.
3006 : dotest_fail basica-9 \
3007 "${testcvs} -q -d ${TESTDIR}/nonexist update" \
3008 "${SPROG}: cannot access cvs root ${TESTDIR}/nonexist: .*"
3009 dotest_fail basica-9a \
3010 "${testcvs} -q -d ${TESTDIR}/nonexist update" \
3011 "${CPROG} \[update aborted\]: ${TESTDIR}/nonexist/CVSROOT: .*"
3013 dotest basica-10
"${testcvs} annotate" \
3015 Annotations for sdir/ssdir/ssfile
3016 \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*
3017 1\.1 .'"$username8"' *[0-9a-zA-Z-]*.: ssfile
3018 1\.2 .'"$username8"' *[0-9a-zA-Z-]*.: ssfile line 2'
3020 # Test resurrecting with strange revision numbers
3022 dotest basica-r1
"${testcvs} rm -f ssfile" \
3023 "${SPROG} remove: scheduling .ssfile. for removal
3024 ${SPROG} remove: use .${SPROG} commit. to remove this file permanently"
3025 dotest basica-r2
"${testcvs} -q ci -m remove" \
3026 "$CVSROOT_DIRNAME/first-dir/sdir/ssdir/ssfile,v <-- ssfile
3027 new revision: delete; previous revision: 3\.1"
3028 dotest basica-r3
"${testcvs} -q up -p -r 3.1 ./ssfile >ssfile" ""
3029 dotest basica-r4
"${testcvs} add ssfile" \
3030 "${SPROG} add: Re-adding file .ssfile. after dead revision 3\.2\.
3031 ${SPROG} add: use .${SPROG} commit. to add this file permanently"
3032 dotest basica-r5
"${testcvs} -q ci -m resurrect" \
3033 "$CVSROOT_DIRNAME/first-dir/sdir/ssdir/ssfile,v <-- ssfile
3034 new revision: 3\.3; previous revision: 3\.2"
3037 # As long as we have a file with a few revisions, test
3038 # a few "cvs admin -o" invocations.
3040 dotest_fail basica-o1
"${testcvs} admin -o 1.2::1.2" \
3041 "${CPROG} admin: while processing more than one file:
3042 ${CPROG} \[admin aborted\]: attempt to specify a numeric revision"
3043 dotest basica-o2
"${testcvs} admin -o 1.2::1.2 ssfile" \
3044 "RCS file: ${CVSROOT_DIRNAME}/first-dir/sdir/ssdir/ssfile,v
3046 dotest basica-o2a
"${testcvs} admin -o 1.1::NOT_RESERVED ssfile" \
3047 "RCS file: ${CVSROOT_DIRNAME}/first-dir/sdir/ssdir/ssfile,v
3049 dotest_fail basica-o2b
"${testcvs} admin -o 1.1::NOT_EXIST ssfile" \
3050 "RCS file: ${CVSROOT_DIRNAME}/first-dir/sdir/ssdir/ssfile,v
3051 ${SPROG} admin: ${CVSROOT_DIRNAME}/first-dir/sdir/ssdir/ssfile,v: Revision NOT_EXIST doesn't exist.
3052 ${SPROG} admin: RCS file for .ssfile. not modified\."
3053 dotest basica-o3
"${testcvs} admin -o 1.2::1.3 ssfile" \
3054 "RCS file: ${CVSROOT_DIRNAME}/first-dir/sdir/ssdir/ssfile,v
3056 dotest basica-o4
"${testcvs} admin -o 3.1:: ssfile" \
3057 "RCS file: ${CVSROOT_DIRNAME}/first-dir/sdir/ssdir/ssfile,v
3058 deleting revision 3\.3
3059 deleting revision 3\.2
3061 dotest basica-o5
"${testcvs} admin -o ::1.1 ssfile" \
3062 "RCS file: ${CVSROOT_DIRNAME}/first-dir/sdir/ssdir/ssfile,v
3064 dotest basica-o5a
"${testcvs} -n admin -o 1.2::3.1 ssfile" \
3065 "RCS file: ${CVSROOT_DIRNAME}/first-dir/sdir/ssdir/ssfile,v
3066 deleting revision 2\.1100
3067 deleting revision 2\.1099
3068 deleting revision 2\.100
3069 deleting revision 2\.99
3070 deleting revision 2\.10
3071 deleting revision 2\.9
3072 deleting revision 2\.0
3073 deleting revision 1\.3
3075 dotest basica-o6
"${testcvs} admin -o 1.2::3.1 ssfile" \
3076 "RCS file: ${CVSROOT_DIRNAME}/first-dir/sdir/ssdir/ssfile,v
3077 deleting revision 2\.1100
3078 deleting revision 2\.1099
3079 deleting revision 2\.100
3080 deleting revision 2\.99
3081 deleting revision 2\.10
3082 deleting revision 2\.9
3083 deleting revision 2\.0
3084 deleting revision 1\.3
3086 dotest basica-o6a
"${testcvs} admin -o 3.1.2: ssfile" \
3087 "RCS file: ${CVSROOT_DIRNAME}/first-dir/sdir/ssdir/ssfile,v
3088 deleting revision 3\.1\.2\.1
3090 dotest basica-o7
"${testcvs} log -N ssfile" "
3091 RCS file: ${CVSROOT_DIRNAME}/first-dir/sdir/ssdir/ssfile,v
3092 Working file: ssfile
3097 keyword substitution: kv
3098 total revisions: 3; selected revisions: 3
3100 ----------------------------
3102 date: ${ISO8601DATE}; author: ${username}; state: Exp; lines: ${PLUS}0 -0; commitid: ${commitid};
3104 ----------------------------
3106 date: ${ISO8601DATE}; author: ${username}; state: Exp; lines: ${PLUS}1 -0; commitid: ${commitid};
3108 ----------------------------
3110 date: ${ISO8601DATE}; author: ${username}; state: Exp; commitid: ${commitid};
3112 ============================================================================="
3113 dotest basica-o8
"${testcvs} -q update -p -r 1.1 ./ssfile" "ssfile"
3118 modify_repo
rm -rf $CVSROOT_DIRNAME/first-dir
3125 # More basic tests, including non-branch tags and co -d.
3127 dotest basicb-0a
"${testcvs} -q co -l ." ''
3129 dotest basicb-0b
"${testcvs} add topfile" \
3130 "${SPROG} add: scheduling file .topfile. for addition
3131 ${SPROG} add: use .${SPROG} commit. to add this file permanently"
3132 dotest basicb-0c
"${testcvs} -q ci -m add-it topfile" \
3133 "$CVSROOT_DIRNAME/topfile,v <-- topfile
3134 initial revision: 1\.1"
3138 dotest basicb-0d
"${testcvs} -q co -l ." "U topfile"
3139 # Now test the ability to run checkout on an existing working
3140 # directory without having it lose its mind. I don't know
3141 # whether this is tested elsewhere in sanity.sh. A more elaborate
3142 # test might also have modified files, make sure it works if
3143 # the modules file was modified to add new directories to the
3145 dotest basicb-0d0
"${testcvs} -q co -l ." ""
3147 dotest basicb-0e
"${testcvs} add first-dir" \
3148 "Directory ${CVSROOT_DIRNAME}/first-dir added to the repository"
3152 dotest basicb-1
"${testcvs} -q co first-dir" ''
3154 # The top-level CVS directory is not created by default.
3155 # I'm leaving basicb-1a and basicb-1b untouched, mostly, in
3156 # case we decide that the default should be reversed...
3158 dotest_fail basicb-1a
"test -d CVS" ''
3160 dotest basicb-1c
"cat first-dir/CVS/Repository" "first-dir"
3163 # Note that the name Emptydir is chosen to test that CVS just
3164 # treats it like any other directory name. It should be
3165 # special only when it is directly in $CVSROOT/CVSROOT.
3166 mkdir Emptydir sdir2
3167 dotest basicb-2
"${testcvs} add Emptydir sdir2" \
3168 "Directory ${CVSROOT_DIRNAME}/first-dir/Emptydir added to the repository
3169 Directory ${CVSROOT_DIRNAME}/first-dir/sdir2 added to the repository"
3171 echo sfile1 starts
>sfile1
3172 dotest basicb-2a10
"${testcvs} -n add sfile1" \
3173 "${SPROG} add: scheduling file .sfile1. for addition
3174 ${SPROG} add: use .${SPROG} commit. to add this file permanently"
3175 dotest basicb-2a11
"${testcvs} status sfile1" \
3176 "${SPROG} status: use \`${SPROG} add' to create an entry for \`sfile1'
3177 ===================================================================
3178 File: sfile1 Status: Unknown
3180 Working revision: No entry for sfile1
3181 Repository revision: No revision control file"
3182 dotest basicb-3
"${testcvs} add sfile1" \
3183 "${SPROG} add: scheduling file .sfile1. for addition
3184 ${SPROG} add: use .${SPROG} commit. to add this file permanently"
3185 dotest basicb-3a1
"${testcvs} status sfile1" \
3186 "===================================================================
3187 File: sfile1 Status: Locally Added
3189 Working revision: New file!
3190 Repository revision: No revision control file
3193 Sticky Options: (none)"
3196 echo sfile2 starts
>sfile2
3197 dotest basicb-4
"${testcvs} add sfile2" \
3198 "${SPROG} add: scheduling file .sfile2. for addition
3199 ${SPROG} add: use .${SPROG} commit. to add this file permanently"
3200 dotest basicb-4a
"${testcvs} -q ci CVS" \
3201 "${CPROG} commit: warning: directory CVS specified in argument
3202 ${CPROG} commit: but CVS uses CVS for its own purposes; skipping CVS directory"
3204 dotest basicb-5
"${testcvs} -q ci -m add" \
3205 "$CVSROOT_DIRNAME/first-dir/Emptydir/sfile1,v <-- Emptydir/sfile1
3206 initial revision: 1\.1
3207 $CVSROOT_DIRNAME/first-dir/sdir2/sfile2,v <-- sdir2/sfile2
3208 initial revision: 1\.1"
3209 echo sfile1 develops
>Emptydir
/sfile1
3210 dotest basicb-6
"${testcvs} -q ci -m modify" \
3211 "$CVSROOT_DIRNAME/first-dir/Emptydir/sfile1,v <-- Emptydir/sfile1
3212 new revision: 1\.2; previous revision: 1\.1"
3213 dotest basicb-7
"${testcvs} -q tag release-1" 'T Emptydir/sfile1
3215 echo not
in time for release-1
>sdir
2/sfile2
3216 dotest basicb-8
"${testcvs} -q ci -m modify-2" \
3217 "$CVSROOT_DIRNAME/first-dir/sdir2/sfile2,v <-- sdir2/sfile2
3218 new revision: 1\.2; previous revision: 1\.1"
3219 # See if CVS can correctly notice when an invalid numeric
3220 # revision is specified.
3221 # Commented out until we get around to fixing CVS
3222 : dotest basicb-8a0
"${testcvs} diff -r 1.5 -r 1.7 sfile2" 'error msg'
3225 # Test that we recurse into the correct directory when checking
3226 # for existing files, even if co -d is in use.
3227 touch first-dir
/extra
3228 dotest basicb-cod-1
"${testcvs} -q co -d first-dir1 first-dir" \
3229 'U first-dir1/Emptydir/sfile1
3230 U first-dir1/sdir2/sfile2'
3235 # FIXME? basicb-9 used to check things out like this:
3236 # U newdir/Emptydir/sfile1
3237 # U newdir/sdir2/sfile2
3238 # but that's difficult to do. The whole "shorten" thing
3239 # is pretty bogus, because it will break on things
3240 # like "cvs co foo/bar baz/quux". Unless there's some
3241 # pretty detailed expansion and analysis of the command-line
3242 # arguments, we shouldn't do "shorten" stuff at all.
3245 "${testcvs} -q co -d newdir -r release-1 first-dir/Emptydir first-dir/sdir2" \
3246 'U newdir/first-dir/Emptydir/sfile1
3247 U newdir/first-dir/sdir2/sfile2'
3249 # basicb-9a and basicb-9b: see note about basicb-1a
3251 dotest_fail basicb-9a
"test -d CVS" ''
3253 dotest basicb-9c
"cat newdir/CVS/Repository" "\."
3254 dotest basicb-9d
"cat newdir/first-dir/CVS/Repository" \
3255 "${CVSROOT_DIRNAME}/first-dir" \
3257 dotest basicb-9e
"cat newdir/first-dir/Emptydir/CVS/Repository" \
3258 "${CVSROOT_DIRNAME}/first-dir/Emptydir" \
3259 "first-dir/Emptydir"
3260 dotest basicb-9f
"cat newdir/first-dir/sdir2/CVS/Repository" \
3261 "${CVSROOT_DIRNAME}/first-dir/sdir2" \
3264 dotest basicb-10
"cat newdir/first-dir/Emptydir/sfile1 newdir/first-dir/sdir2/sfile2" \
3270 # Hmm, this might be a case for CVSNULLREPOS, but CVS doesn't
3271 # seem to deal with it...
3273 dotest basicb-11
"${testcvs} -q co -d sub1/sub2 first-dir" \
3274 "U sub1/sub2/Emptydir/sfile1
3275 U sub1/sub2/sdir2/sfile2"
3277 dotest basicb-12
"${testcvs} -q update ./." ''
3279 dotest basicb-13
"${testcvs} add xx" fixme
3282 # to test: sub1/sub2/sub3
3283 fi # end of tests commented out.
3285 # Create a second directory.
3288 dotest basicb-14
"${testcvs} -q co -l ." 'U topfile'
3290 dotest basicb-15
"${testcvs} add second-dir" \
3291 "Directory ${CVSROOT_DIRNAME}/second-dir added to the repository"
3294 dotest basicb-16
"${testcvs} add aa" \
3295 "${SPROG} add: scheduling file .aa. for addition
3296 ${SPROG} add: use .${SPROG} commit. to add this file permanently"
3297 dotest basicb-17
"${testcvs} -q ci -m add" \
3298 "$CVSROOT_DIRNAME/second-dir/aa,v <-- aa
3299 initial revision: 1\.1"
3302 # Try to remove all revisions in a file.
3303 dotest_fail basicb-o1
"${testcvs} admin -o1.1 topfile" \
3304 "RCS file: ${CVSROOT_DIRNAME}/topfile,v
3305 deleting revision 1\.1
3306 ${SPROG} \[admin aborted\]: attempt to delete all revisions"
3307 dotest basicb-o2
"${testcvs} -q update -d first-dir" \
3308 "U first-dir/Emptydir/sfile1
3309 U first-dir/sdir2/sfile2"
3310 dotest_fail basicb-o3 \
3311 "${testcvs} admin -o1.1:1.2 first-dir/sdir2/sfile2" \
3312 "RCS file: ${CVSROOT_DIRNAME}/first-dir/sdir2/sfile2,v
3313 deleting revision 1\.2
3314 deleting revision 1\.1
3315 ${SPROG} \[admin aborted\]: attempt to delete all revisions"
3320 # Note that -H is an invalid option.
3321 # I suspect that the choice between "illegal" and "invalid"
3322 # depends on the user's environment variables, the phase
3323 # of the moon (weirdness with optind), and who knows what else.
3324 # I've been seeing "illegal"...
3325 # And I switched it to "invalid". -DRP
3326 # POSIX 1003.2 specifies the format should be 'illegal option'
3327 # many other folks are still using the older 'invalid option'
3328 # lib/getopt.c will use POSIX when __posixly_correct
3329 # otherwise the other, so accept both of them. -- mdb
3330 dotest_fail basicb-21
"${testcvs} -q admin -H" \
3331 "admin: invalid option -- H
3332 ${CPROG} \[admin aborted\]: specify ${CPROG} -H admin for usage information" \
3333 "admin: illegal option -- H
3334 ${CPROG} \[admin aborted\]: specify ${CPROG} -H admin for usage information"
3339 echo Keeping
${TESTDIR} and exiting due to
--keep
3343 modify_repo
rm -rf $CVSROOT_DIRNAME/first-dir \
3344 $CVSROOT_DIRNAME/second-dir
3345 modify_repo
rm -f $CVSROOT_DIRNAME/topfile
,v
3351 # More tests of basic/miscellaneous functionality.
3353 dotest_fail basicc-1
"$testcvs diff" \
3354 "$CPROG diff: in directory \.:
3355 $CPROG \[diff aborted\]: there is no version here; run .$CPROG checkout. first"
3356 dotest basicc-2
"$testcvs -q co -l ."
3357 mkdir first-dir second-dir
3358 dotest basicc-3
"${testcvs} add first-dir second-dir" \
3359 "Directory ${CVSROOT_DIRNAME}/first-dir added to the repository
3360 Directory ${CVSROOT_DIRNAME}/second-dir added to the repository"
3361 # Old versions of CVS often didn't create this top-level CVS
3362 # directory in the first place. I think that maybe the only
3363 # way to get it to work currently is to let CVS create it,
3364 # and then blow it away (don't complain if it does not
3365 # exist). But that is perfectly valid; people who are used
3366 # to the old behavior especially may be interested.
3367 # FIXME: this test is intended for the TopLevelAdmin=yes case;
3368 # should adjust/move it accordingly.
3370 dotest basicc-4
"echo *" "first-dir second-dir"
3371 dotest basicc-5
"${testcvs} update" \
3372 "${SPROG} update: Updating first-dir
3373 ${SPROG} update: Updating second-dir" \
3374 "${SPROG} update: Updating \.
3375 ${SPROG} update: Updating first-dir
3376 ${SPROG} update: Updating second-dir"
3379 dotest basicc-6
"${testcvs} release -d" ""
3380 dotest basicc-7
"test -d ../first-dir" ""
3381 # The Linux 2.2 kernel lets you delete ".". That's OK either way,
3382 # the point is that CVS must not mess with anything *outside* "."
3383 # the way that CVS 1.10 and older tried to.
3384 dotest basicc-8
"${testcvs} -Q release -d ." \
3385 "" "${CPROG} release: deletion of directory \. failed: .*"
3386 dotest basicc-9
"test -d ../second-dir" ""
3387 # For CVS to make a syntactic check for "." wouldn't suffice.
3388 # On Linux 2.2 systems, the cwd may be gone, so we recreate it
3389 # to allow basicc-11 to actually happen
3390 if test ! -d ..
/first-dir
; then
3391 # Apparently `cd ..' doesn't work with Linux 2.2 & Bash 2.05b.
3396 dotest basicc-11
"${testcvs} -Q release -d ./." \
3397 "" "${CPROG} release: deletion of directory \./\. failed: .*"
3398 dotest basicc-11a
"test -d ../second-dir" ""
3403 dotest basicc-12
"${testcvs} -Q co ." ""
3404 # actual entries can be in either Entries or Entries.log, do
3405 # an update to get them consolidated into Entries
3406 dotest basicc-12a
"${testcvs} -Q up" ""
3407 dotest basicc-12b
"cat CVS/Entries" \
3411 dotest basicc-13
"echo *" "CVS CVSROOT first-dir second-dir"
3412 dotest basicc-14
"${testcvs} -Q release first-dir second-dir" ""
3413 # a normal release shouldn't affect the Entries file
3414 dotest basicc-14b
"cat CVS/Entries" \
3418 # FIXCVS: but release -d probably should
3419 dotest basicc-15
"${testcvs} -Q release -d first-dir second-dir" ""
3420 dotest basicc-16
"echo *" "CVS CVSROOT"
3421 dotest basicc-17
"cat CVS/Entries" \
3425 # FIXCVS: if not, update should notice the missing directories
3426 # and update Entries accordingly
3427 dotest basicc-18
"${testcvs} -Q up" ""
3428 dotest basicc-19
"cat CVS/Entries" \
3435 modify_repo
rm -rf $CVSROOT_DIRNAME/first-dir \
3436 $CVSROOT_DIRNAME/second-dir
3442 # first dive - add a files, first singly, then in a group.
3443 modify_repo mkdir
$CVSROOT_DIRNAME/first-dir
3444 mkdir basic1
; cd basic1
3445 # check out an empty directory
3446 dotest basic1-1
"${testcvs} -q co first-dir" ''
3454 dotest basic1-14-add-add
"${testcvs} add file2 file3 file4 file5" \
3455 "${SPROG} add: scheduling file \`file2' for addition
3456 ${SPROG} add: scheduling file \`file3' for addition
3457 ${SPROG} add: scheduling file \`file4' for addition
3458 ${SPROG} add: scheduling file \`file5' for addition
3459 ${SPROG} add: use .${SPROG} commit. to add these files permanently"
3460 dotest basic1-15-add-add \
3461 "${testcvs} -q update file2 file3 file4 file5" \
3466 dotest basic1-16-add-add
"${testcvs} -q update" \
3471 dotest basic1-17-add-add
"${testcvs} -q status" \
3472 "===================================================================
3473 File: file2 Status: Locally Added
3475 Working revision: New file!
3476 Repository revision: No revision control file
3479 Sticky Options: (none)
3481 ===================================================================
3482 File: file3 Status: Locally Added
3484 Working revision: New file!
3485 Repository revision: No revision control file
3488 Sticky Options: (none)
3490 ===================================================================
3491 File: file4 Status: Locally Added
3493 Working revision: New file!
3494 Repository revision: No revision control file
3497 Sticky Options: (none)
3499 ===================================================================
3500 File: file5 Status: Locally Added
3502 Working revision: New file!
3503 Repository revision: No revision control file
3506 Sticky Options: (none)"
3507 dotest basic1-18-add-add
"${testcvs} -q log" \
3508 "${SPROG} log: file2 has been added, but not committed
3509 ${SPROG} log: file3 has been added, but not committed
3510 ${SPROG} log: file4 has been added, but not committed
3511 ${SPROG} log: file5 has been added, but not committed"
3513 dotest basic1-21-add-add
"${testcvs} -q update" \
3518 # FIXCVS? Shouldn't this read first-dir/file2 instead of file2?
3519 dotest basic1-22-add-add
"${testcvs} log first-dir" \
3520 "${SPROG} log: Logging first-dir
3521 ${SPROG} log: file2 has been added, but not committed
3522 ${SPROG} log: file3 has been added, but not committed
3523 ${SPROG} log: file4 has been added, but not committed
3524 ${SPROG} log: file5 has been added, but not committed"
3525 dotest basic1-23-add-add
"${testcvs} status first-dir" \
3526 "${SPROG} status: Examining first-dir
3527 ===================================================================
3528 File: file2 Status: Locally Added
3530 Working revision: New file!
3531 Repository revision: No revision control file
3534 Sticky Options: (none)
3536 ===================================================================
3537 File: file3 Status: Locally Added
3539 Working revision: New file!
3540 Repository revision: No revision control file
3543 Sticky Options: (none)
3545 ===================================================================
3546 File: file4 Status: Locally Added
3548 Working revision: New file!
3549 Repository revision: No revision control file
3552 Sticky Options: (none)
3554 ===================================================================
3555 File: file5 Status: Locally Added
3557 Working revision: New file!
3558 Repository revision: No revision control file
3561 Sticky Options: (none)"
3562 dotest basic1-24-add-add
"${testcvs} update first-dir" \
3563 "${SPROG} update: Updating first-dir
3568 dotest basic1-27-add-add
"${testcvs} co first-dir" \
3569 "${SPROG} checkout: Updating first-dir
3575 dotest basic1-14-add-ci \
3576 "$testcvs commit -m test file2 file3 file4 file5" \
3577 "$CVSROOT_DIRNAME/first-dir/file2,v <-- file2
3578 initial revision: 1\.1
3579 $CVSROOT_DIRNAME/first-dir/file3,v <-- file3
3580 initial revision: 1\.1
3581 $CVSROOT_DIRNAME/first-dir/file4,v <-- file4
3582 initial revision: 1\.1
3583 $CVSROOT_DIRNAME/first-dir/file5,v <-- file5
3584 initial revision: 1\.1"
3585 dotest basic1-15-add-ci \
3586 "${testcvs} -q update file2 file3 file4 file5" ''
3587 dotest basic1-16-add-ci
"${testcvs} -q update" ''
3588 dotest basic1-17-add-ci
"${testcvs} -q status" \
3589 "===================================================================
3590 File: file2 Status: Up-to-date
3592 Working revision: 1\.1.*
3593 Repository revision: 1\.1 ${CVSROOT_DIRNAME}/first-dir/file2,v
3594 Commit Identifier: ${commitid}
3597 Sticky Options: (none)
3599 ===================================================================
3600 File: file3 Status: Up-to-date
3602 Working revision: 1\.1.*
3603 Repository revision: 1\.1 ${CVSROOT_DIRNAME}/first-dir/file3,v
3604 Commit Identifier: ${commitid}
3607 Sticky Options: (none)
3609 ===================================================================
3610 File: file4 Status: Up-to-date
3612 Working revision: 1\.1.*
3613 Repository revision: 1\.1 ${CVSROOT_DIRNAME}/first-dir/file4,v
3614 Commit Identifier: ${commitid}
3617 Sticky Options: (none)
3619 ===================================================================
3620 File: file5 Status: Up-to-date
3622 Working revision: 1\.1.*
3623 Repository revision: 1\.1 ${CVSROOT_DIRNAME}/first-dir/file5,v
3624 Commit Identifier: ${commitid}
3627 Sticky Options: (none)"
3628 # The "log" tests and friends probably already test the output
3629 # from log quite adequately.
3630 # Note: using dotest fails here. It seems to be related
3631 # to the output being sufficiently large (Red Hat 4.1).
3632 # dotest basic1-18-add-ci "${testcvs} log" "${DOTSTAR}"
3633 if ${testcvs} -q log
>>${LOGFILE}; then
3634 pass basic1-18-add-ci
3636 pass basic1-18-add-ci
3639 dotest basic1-21-add-ci
"${testcvs} -q update" ''
3640 # See test basic1-18-add-ci for explanation of non-use of dotest.
3641 if ${testcvs} -q log first-dir
>>${LOGFILE}; then
3642 pass basic1-22-add-ci
3644 pass basic1-22-add-ci
3646 # At least for the moment I am going to consider 17-add-ci
3647 # an adequate test of the output here.
3648 # See test basic1-18-add-ci for explanation of non-use of dotest.
3649 if ${testcvs} -q status first-dir
>>${LOGFILE}; then
3650 pass basic1-23-add-ci
3652 pass basic1-23-add-ci
3654 dotest basic1-24-add-ci
"${testcvs} -q update first-dir" ''
3655 dotest basic1-27-add-ci
"${testcvs} -q co first-dir" ''
3658 rm file2 file3 file4 file5
3659 dotest basic1-14-rm-rm
"${testcvs} rm file2 file3 file4 file5" \
3660 "${SPROG} remove: scheduling .file2. for removal
3661 ${SPROG} remove: scheduling .file3. for removal
3662 ${SPROG} remove: scheduling .file4. for removal
3663 ${SPROG} remove: scheduling .file5. for removal
3664 ${SPROG} remove: use .${SPROG} commit. to remove these files permanently"
3665 # 15-rm-rm was commented out. Why?
3666 dotest basic1-15-rm-rm \
3667 "${testcvs} -q update file2 file3 file4 file5" \
3672 dotest basic1-16-rm-rm
"${testcvs} -q update" \
3677 dotest basic1-17-rm-rm
"${testcvs} -q status" \
3678 "===================================================================
3679 File: no file file2 Status: Locally Removed
3681 Working revision: -1\.1.*
3682 Repository revision: 1\.1 ${CVSROOT_DIRNAME}/first-dir/file2,v
3683 Commit Identifier: ${commitid}
3686 Sticky Options: (none)
3688 ===================================================================
3689 File: no file file3 Status: Locally Removed
3691 Working revision: -1\.1.*
3692 Repository revision: 1\.1 ${CVSROOT_DIRNAME}/first-dir/file3,v
3693 Commit Identifier: ${commitid}
3696 Sticky Options: (none)
3698 ===================================================================
3699 File: no file file4 Status: Locally Removed
3701 Working revision: -1\.1.*
3702 Repository revision: 1\.1 ${CVSROOT_DIRNAME}/first-dir/file4,v
3703 Commit Identifier: ${commitid}
3706 Sticky Options: (none)
3708 ===================================================================
3709 File: no file file5 Status: Locally Removed
3711 Working revision: -1\.1.*
3712 Repository revision: 1\.1 ${CVSROOT_DIRNAME}/first-dir/file5,v
3713 Commit Identifier: ${commitid}
3716 Sticky Options: (none)"
3717 # Would be nice to test that real logs appear (with dead state
3718 # and all), either here or someplace like log2 tests.
3719 if ${testcvs} -q log
>>${LOGFILE}; then
3720 pass basic1-18-rm-rm
3722 fail basic1-18-rm-rm
3725 dotest basic1-21-rm-rm
"${testcvs} -q update" \
3730 if ${testcvs} -q log first-dir
>>${LOGFILE}; then
3731 pass basic1-22-rm-rm
3733 fail basic1-22-rm-rm
3735 if ${testcvs} -q status first-dir
>>${LOGFILE}; then
3736 pass basic1-23-rm-rm
3738 fail basic1-23-rm-rm
3740 dotest basic1-24-rm-rm
"${testcvs} -q update first-dir" \
3745 dotest basic1-27-rm-rm
"${testcvs} -q co first-dir" \
3751 dotest basic1-14-rm-ci
"${testcvs} -q commit -m test" \
3752 "$CVSROOT_DIRNAME/first-dir/file2,v <-- file2
3753 new revision: delete; previous revision: 1\.1
3754 $CVSROOT_DIRNAME/first-dir/file3,v <-- file3
3755 new revision: delete; previous revision: 1\.1
3756 $CVSROOT_DIRNAME/first-dir/file4,v <-- file4
3757 new revision: delete; previous revision: 1\.1
3758 $CVSROOT_DIRNAME/first-dir/file5,v <-- file5
3759 new revision: delete; previous revision: 1\.1"
3760 dotest basic1-15-rm-ci \
3761 "${testcvs} -q update file2 file3 file4 file5" ''
3762 dotest basic1-16-rm-ci
"${testcvs} -q update" ''
3763 dotest basic1-17-rm-ci
"${testcvs} -q status" ''
3764 # Would be nice to test that real logs appear (with dead state
3765 # and all), either here or someplace like log2 tests.
3766 if ${testcvs} -q log
>>${LOGFILE}; then
3767 pass basic1-18-rm-ci
3769 fail basic1-18-rm-ci
3772 dotest basic1-21-rm-ci
"${testcvs} -q update" ''
3773 if ${testcvs} -q log first-dir
>>${LOGFILE}; then
3774 pass basic1-22-rm-ci
3776 fail basic1-22-rm-ci
3778 if ${testcvs} -q status first-dir
>>${LOGFILE}; then
3779 pass basic1-23-rm-ci
3781 fail basic1-23-rm-ci
3783 dotest basic1-24-rm-ci
"${testcvs} -q update first-dir" ''
3784 dotest basic1-27-rm-ci
"${testcvs} -q co first-dir" ''
3786 # All the files are removed, so nothing gets tagged.
3787 dotest basic1-28
"${testcvs} -q tag first-dive" ''
3792 echo Keeping
${TESTDIR} and exiting due to
--keep
3797 modify_repo
rm -rf $CVSROOT_DIRNAME/first-dir
3803 # Test the ability to operate on directories nested rather deeply.
3804 modify_repo mkdir
$CVSROOT_DIRNAME/first-dir
3805 dotest deep-1
"${testcvs} -q co first-dir" ''
3807 for i
in dir1 dir2 dir3 dir4 dir5 dir6 dir7 dir8
; do
3809 dotest deep-2-
$i "${testcvs} add $i" \
3810 "Directory ${CVSROOT_DIRNAME}/first-dir/dir1[/dir0-9]* added to the repository"
3813 dotest deep-3-
$i "${testcvs} add file1" \
3814 "${SPROG}"' add: scheduling file `file1'\'' for addition
3815 '"${SPROG}"' add: use .'"${SPROG}"' commit. to add this file permanently'
3817 cd ..
/..
/..
/..
/..
/..
/..
/..
/..
3818 dotest_lit deep-4
"$testcvs -q ci -m add-them first-dir" <<HERE
3819 $CVSROOT_DIRNAME/first-dir/dir1/file1,v <-- first-dir/dir1/file1
3820 initial revision: 1.1
3821 $CVSROOT_DIRNAME/first-dir/dir1/dir2/file1,v <-- first-dir/dir1/dir2/file1
3822 initial revision: 1.1
3823 $CVSROOT_DIRNAME/first-dir/dir1/dir2/dir3/file1,v <-- first-dir/dir1/dir2/dir3/file1
3824 initial revision: 1.1
3825 $CVSROOT_DIRNAME/first-dir/dir1/dir2/dir3/dir4/file1,v <-- first-dir/dir1/dir2/dir3/dir4/file1
3826 initial revision: 1.1
3827 $CVSROOT_DIRNAME/first-dir/dir1/dir2/dir3/dir4/dir5/file1,v <-- first-dir/dir1/dir2/dir3/dir4/dir5/file1
3828 initial revision: 1.1
3829 $CVSROOT_DIRNAME/first-dir/dir1/dir2/dir3/dir4/dir5/dir6/file1,v <-- first-dir/dir1/dir2/dir3/dir4/dir5/dir6/file1
3830 initial revision: 1.1
3831 $CVSROOT_DIRNAME/first-dir/dir1/dir2/dir3/dir4/dir5/dir6/dir7/file1,v <-- first-dir/dir1/dir2/dir3/dir4/dir5/dir6/dir7/file1
3832 initial revision: 1.1
3833 $CVSROOT_DIRNAME/first-dir/dir1/dir2/dir3/dir4/dir5/dir6/dir7/dir8/file1,v <-- first-dir/dir1/dir2/dir3/dir4/dir5/dir6/dir7/dir8/file1
3834 initial revision: 1.1
3837 cd first-dir
/dir
1/dir
2/dir
3/dir
4/dir
5/dir
6/dir
7/dir8
3839 dotest deep-4a0
"$testcvs rm file1" \
3840 "$SPROG remove: scheduling .file1. for removal
3841 $SPROG remove: use .$SPROG commit. to remove this file permanently"
3842 dotest deep-4a1
"$testcvs -q ci -m rm-it" \
3843 "$CVSROOT_DIRNAME/first-dir/dir1/dir2/dir3/dir4/dir5/dir6/dir7/dir8/file1,v <-- file1
3844 new revision: delete; previous revision: 1\.1"
3846 dotest deep-4a2
"${testcvs} -q update -P dir6/dir7" ''
3847 # Should be using "test -e", but it's not portable enough -
3848 # Solaris 2.5 does not have it.
3849 dotest_fail deep-4a3
"test -d dir6/dir7/dir8" ''
3851 # Test that if we remove the working directory, CVS does not
3852 # recreate it. (I realize that this behavior is what the
3853 # users expect, but in the longer run we might want to
3854 # re-think it. The corresponding behavior for a file is that
3855 # CVS *will* recreate it, and we might want to make it so
3856 # that "cvs release -d" is the way to delete the directory
3857 # and have it stay gone -kingdon, Oct1996).
3859 dotest deep-4b0a
"${testcvs} -q diff"
3860 dotest deep-4b0b
"${testcvs} -q ci"
3861 dotest deep-4b1
"${testcvs} -q update"
3862 dotest deep-4b2
"${testcvs} -q update -d -P" \
3866 # Test what happens if one uses -P when there are files removed
3867 # but not committed.
3869 dotest deep-rm1
"${testcvs} rm -f file1" \
3870 "${SPROG} remove: scheduling .file1. for removal
3871 ${SPROG} remove: use .${SPROG} commit. to remove this file permanently"
3873 dotest deep-rm2
"${testcvs} -q update -d -P" 'R dir7/file1'
3874 dotest deep-rm3
"test -d dir7" ''
3875 dotest deep-rm4
"$testcvs -q ci -m rm-it" \
3876 "$CVSROOT_DIRNAME/first-dir/dir1/dir2/dir3/dir4/dir5/dir6/dir7/file1,v <-- dir7/file1
3877 new revision: delete; previous revision: 1\.1"
3878 dotest deep-rm5
"${testcvs} -q update -d -P" ''
3879 dotest_fail deep-rm6
"test -d dir7" ''
3883 dotest deep-rm7
"${testcvs} rm -f -R dir5" \
3884 "${SPROG} remove: Removing dir5
3885 ${SPROG} remove: scheduling .dir5/file1. for removal
3886 ${SPROG} remove: Removing dir5/dir6
3887 ${SPROG} remove: scheduling .dir5/dir6/file1. for removal
3888 ${SPROG} remove: use .${SPROG} commit. to remove these files permanently"
3889 dotest deep-rm8
"${testcvs} -q ci -m rm-it" \
3890 "$CVSROOT_DIRNAME/first-dir/dir1/dir2/dir3/dir4/dir5/file1,v <-- dir5/file1
3891 new revision: delete; previous revision: 1\.1
3892 $CVSROOT_DIRNAME/first-dir/dir1/dir2/dir3/dir4/dir5/dir6/file1,v <-- dir5/dir6/file1
3893 new revision: delete; previous revision: 1\.1"
3894 dotest deep-rm9
"${testcvs} -q update -d -P" ''
3895 dotest_fail deep-rm10
"test -d dir5"
3899 if echo "yes" |
$testcvs release
-d first-dir
>>$LOGFILE 2>&1; then
3904 modify_repo
rm -rf $CVSROOT_DIRNAME/first-dir
3910 # Test rtag, import, history, various miscellaneous operations
3912 # NOTE: this section has reached the size and
3913 # complexity where it is getting to be a good idea to
3914 # add new tests to a new section rather than
3915 # continuing to piggyback them onto the tests here.
3917 # First empty the history file
3918 modify_repo
rm -rf $CVSROOT_DIRNAME/CVSROOT
/history
3919 modify_repo
touch $CVSROOT_DIRNAME/CVSROOT
/history
3921 modify_repo mkdir
$CVSROOT_DIRNAME/first-dir
3922 dotest basic2-1
"$testcvs -q co first-dir"
3923 for i
in first-dir dir1 dir2
; do
3924 if test ! -d $i ; then
3926 dotest basic2-2-
$i "${testcvs} add $i" \
3927 "Directory ${CVSROOT_DIRNAME}/.*/$i added to the repository"
3932 for j
in file6 file7
; do
3936 dotest basic2-3-
$i "${testcvs} add file6 file7" \
3937 "${SPROG} add: scheduling file .file6. for addition
3938 ${SPROG} add: scheduling file .file7. for addition
3939 ${SPROG} add: use .${SPROG} commit. to add these files permanently"
3943 dotest basic2-4
"${testcvs} update first-dir" \
3944 "${SPROG} update: Updating first-dir
3947 ${SPROG} update: Updating first-dir/dir1
3948 A first-dir/dir1/file6
3949 A first-dir/dir1/file7
3950 ${SPROG} update: Updating first-dir/dir1/dir2
3951 A first-dir/dir1/dir2/file6
3952 A first-dir/dir1/dir2/file7"
3954 # fixme: doesn't work right for added files.
3955 dotest basic2-5
"${testcvs} log first-dir" \
3956 "${SPROG} log: Logging first-dir
3957 ${SPROG} log: file6 has been added, but not committed
3958 ${SPROG} log: file7 has been added, but not committed
3959 ${SPROG} log: Logging first-dir/dir1
3960 ${SPROG} log: file6 has been added, but not committed
3961 ${SPROG} log: file7 has been added, but not committed
3962 ${SPROG} log: Logging first-dir/dir1/dir2
3963 ${SPROG} log: file6 has been added, but not committed
3964 ${SPROG} log: file7 has been added, but not committed"
3966 dotest basic2-6
"${testcvs} status first-dir" \
3967 "${SPROG} status: Examining first-dir
3968 ===================================================================
3969 File: file6 Status: Locally Added
3971 Working revision: New file!
3972 Repository revision: No revision control file
3975 Sticky Options: (none)
3977 ===================================================================
3978 File: file7 Status: Locally Added
3980 Working revision: New file!
3981 Repository revision: No revision control file
3984 Sticky Options: (none)
3986 ${SPROG} status: Examining first-dir/dir1
3987 ===================================================================
3988 File: file6 Status: Locally Added
3990 Working revision: New file!
3991 Repository revision: No revision control file
3994 Sticky Options: (none)
3996 ===================================================================
3997 File: file7 Status: Locally Added
3999 Working revision: New file!
4000 Repository revision: No revision control file
4003 Sticky Options: (none)
4005 ${SPROG} status: Examining first-dir/dir1/dir2
4006 ===================================================================
4007 File: file6 Status: Locally Added
4009 Working revision: New file!
4010 Repository revision: No revision control file
4013 Sticky Options: (none)
4015 ===================================================================
4016 File: file7 Status: Locally Added
4018 Working revision: New file!
4019 Repository revision: No revision control file
4022 Sticky Options: (none)"
4024 # XXX why is this commented out???
4025 # if ${CVS} diff -u first-dir >> ${LOGFILE} || test $? = 1 ; then
4031 dotest basic2-8
"${testcvs} -q ci -m 'second dive' first-dir" \
4032 "$CVSROOT_DIRNAME/first-dir/file6,v <-- first-dir/file6
4033 initial revision: 1\.1
4034 $CVSROOT_DIRNAME/first-dir/file7,v <-- first-dir/file7
4035 initial revision: 1\.1
4036 $CVSROOT_DIRNAME/first-dir/dir1/file6,v <-- first-dir/dir1/file6
4037 initial revision: 1\.1
4038 $CVSROOT_DIRNAME/first-dir/dir1/file7,v <-- first-dir/dir1/file7
4039 initial revision: 1\.1
4040 $CVSROOT_DIRNAME/first-dir/dir1/dir2/file6,v <-- first-dir/dir1/dir2/file6
4041 initial revision: 1\.1
4042 $CVSROOT_DIRNAME/first-dir/dir1/dir2/file7,v <-- first-dir/dir1/dir2/file7
4043 initial revision: 1\.1"
4045 dotest basic2-9
"${testcvs} tag second-dive first-dir" \
4046 "${SPROG} tag: Tagging first-dir
4049 ${SPROG} tag: Tagging first-dir/dir1
4050 T first-dir/dir1/file6
4051 T first-dir/dir1/file7
4052 ${SPROG} tag: Tagging first-dir/dir1/dir2
4053 T first-dir/dir1/dir2/file6
4054 T first-dir/dir1/dir2/file7"
4056 # third dive - in bunch o' directories, add bunch o' files,
4057 # delete some, change some.
4059 for i
in first-dir dir1 dir2
; do
4068 dotest basic2-10-
$i "${testcvs} rm file7" \
4069 "${SPROG} remove: scheduling .file7. for removal
4070 ${SPROG} remove: use .${SPROG} commit. to remove this file permanently"
4072 # and add a new file
4075 dotest basic2-11-
$i "${testcvs} add file14" \
4076 "${SPROG} add: scheduling file .file14. for addition
4077 ${SPROG} add: use .${SPROG} commit. to add this file permanently"
4081 dotest basic2-12
"${testcvs} update first-dir" \
4082 "${SPROG} update: Updating first-dir
4086 ${SPROG} update: Updating first-dir/dir1
4087 A first-dir/dir1/file14
4088 M first-dir/dir1/file6
4089 R first-dir/dir1/file7
4090 ${SPROG} update: Updating first-dir/dir1/dir2
4091 A first-dir/dir1/dir2/file14
4092 M first-dir/dir1/dir2/file6
4093 R first-dir/dir1/dir2/file7"
4095 # FIXME: doesn't work right for added files
4096 dotest basic2-13
"${testcvs} log first-dir" \
4097 "${SPROG} log: Logging first-dir
4098 ${SPROG} log: file14 has been added, but not committed
4100 RCS file: ${CVSROOT_DIRNAME}/first-dir/file6,v
4101 Working file: first-dir/file6
4108 keyword substitution: kv
4109 total revisions: 1; selected revisions: 1
4111 ----------------------------
4113 date: ${ISO8601DATE}; author: ${username}; state: Exp; commitid: ${commitid};
4115 =============================================================================
4117 RCS file: ${CVSROOT_DIRNAME}/first-dir/file7,v
4118 Working file: first-dir/file7
4125 keyword substitution: kv
4126 total revisions: 1; selected revisions: 1
4128 ----------------------------
4130 date: ${ISO8601DATE}; author: ${username}; state: Exp; commitid: ${commitid};
4132 =============================================================================
4133 ${SPROG} log: Logging first-dir/dir1
4134 ${SPROG} log: file14 has been added, but not committed
4136 RCS file: ${CVSROOT_DIRNAME}/first-dir/dir1/file6,v
4137 Working file: first-dir/dir1/file6
4144 keyword substitution: kv
4145 total revisions: 1; selected revisions: 1
4147 ----------------------------
4149 date: ${ISO8601DATE}; author: ${username}; state: Exp; commitid: ${commitid};
4151 =============================================================================
4153 RCS file: ${CVSROOT_DIRNAME}/first-dir/dir1/file7,v
4154 Working file: first-dir/dir1/file7
4161 keyword substitution: kv
4162 total revisions: 1; selected revisions: 1
4164 ----------------------------
4166 date: ${ISO8601DATE}; author: ${username}; state: Exp; commitid: ${commitid};
4168 =============================================================================
4169 ${SPROG} log: Logging first-dir/dir1/dir2
4170 ${SPROG} log: file14 has been added, but not committed
4172 RCS file: ${CVSROOT_DIRNAME}/first-dir/dir1/dir2/file6,v
4173 Working file: first-dir/dir1/dir2/file6
4180 keyword substitution: kv
4181 total revisions: 1; selected revisions: 1
4183 ----------------------------
4185 date: ${ISO8601DATE}; author: ${username}; state: Exp; commitid: ${commitid};
4187 =============================================================================
4189 RCS file: ${CVSROOT_DIRNAME}/first-dir/dir1/dir2/file7,v
4190 Working file: first-dir/dir1/dir2/file7
4197 keyword substitution: kv
4198 total revisions: 1; selected revisions: 1
4200 ----------------------------
4202 date: ${ISO8601DATE}; author: ${username}; state: Exp; commitid: ${commitid};
4204 ============================================================================="
4206 dotest basic2-14
"${testcvs} status first-dir" \
4207 "${SPROG} status: Examining first-dir
4208 ===================================================================
4209 File: file14 Status: Locally Added
4211 Working revision: New file!
4212 Repository revision: No revision control file
4215 Sticky Options: (none)
4217 ===================================================================
4218 File: file6 Status: Locally Modified
4220 Working revision: 1\.1.*
4221 Repository revision: 1\.1 ${CVSROOT_DIRNAME}/first-dir/file6,v
4222 Commit Identifier: ${commitid}
4225 Sticky Options: (none)
4227 ===================================================================
4228 File: no file file7 Status: Locally Removed
4230 Working revision: -1\.1.*
4231 Repository revision: 1\.1 ${CVSROOT_DIRNAME}/first-dir/file7,v
4232 Commit Identifier: ${commitid}
4235 Sticky Options: (none)
4237 ${SPROG} status: Examining first-dir/dir1
4238 ===================================================================
4239 File: file14 Status: Locally Added
4241 Working revision: New file!
4242 Repository revision: No revision control file
4245 Sticky Options: (none)
4247 ===================================================================
4248 File: file6 Status: Locally Modified
4250 Working revision: 1\.1.*
4251 Repository revision: 1\.1 ${CVSROOT_DIRNAME}/first-dir/dir1/file6,v
4252 Commit Identifier: ${commitid}
4255 Sticky Options: (none)
4257 ===================================================================
4258 File: no file file7 Status: Locally Removed
4260 Working revision: -1\.1.*
4261 Repository revision: 1\.1 ${CVSROOT_DIRNAME}/first-dir/dir1/file7,v
4262 Commit Identifier: ${commitid}
4265 Sticky Options: (none)
4267 ${SPROG} status: Examining first-dir/dir1/dir2
4268 ===================================================================
4269 File: file14 Status: Locally Added
4271 Working revision: New file!
4272 Repository revision: No revision control file
4275 Sticky Options: (none)
4277 ===================================================================
4278 File: file6 Status: Locally Modified
4280 Working revision: 1\.1.*
4281 Repository revision: 1\.1 ${CVSROOT_DIRNAME}/first-dir/dir1/dir2/file6,v
4282 Commit Identifier: ${commitid}
4285 Sticky Options: (none)
4287 ===================================================================
4288 File: no file file7 Status: Locally Removed
4290 Working revision: -1\.1.*
4291 Repository revision: 1\.1 ${CVSROOT_DIRNAME}/first-dir/dir1/dir2/file7,v
4292 Commit Identifier: ${commitid}
4295 Sticky Options: (none)${DOTSTAR}"
4297 # XXX why is this commented out?
4298 # if ${CVS} diff -u first-dir >> ${LOGFILE} || test $? = 1 ; then
4304 dotest basic2-16
"${testcvs} ci -m 'third dive' first-dir" \
4305 "${CPROG} commit: Examining first-dir
4306 ${CPROG} commit: Examining first-dir/dir1
4307 ${CPROG} commit: Examining first-dir/dir1/dir2
4308 ${CVSROOT_DIRNAME}/first-dir/file14,v <-- first-dir/file14
4309 initial revision: 1\.1
4310 ${CVSROOT_DIRNAME}/first-dir/file6,v <-- first-dir/file6
4311 new revision: 1\.2; previous revision: 1\.1
4312 ${CVSROOT_DIRNAME}/first-dir/file7,v <-- first-dir/file7
4313 new revision: delete; previous revision: 1\.1
4314 ${CVSROOT_DIRNAME}/first-dir/dir1/file14,v <-- first-dir/dir1/file14
4315 initial revision: 1\.1
4316 ${CVSROOT_DIRNAME}/first-dir/dir1/file6,v <-- first-dir/dir1/file6
4317 new revision: 1\.2; previous revision: 1\.1
4318 ${CVSROOT_DIRNAME}/first-dir/dir1/file7,v <-- first-dir/dir1/file7
4319 new revision: delete; previous revision: 1\.1
4320 ${CVSROOT_DIRNAME}/first-dir/dir1/dir2/file14,v <-- first-dir/dir1/dir2/file14
4321 initial revision: 1\.1
4322 ${CVSROOT_DIRNAME}/first-dir/dir1/dir2/file6,v <-- first-dir/dir1/dir2/file6
4323 new revision: 1\.2; previous revision: 1\.1
4324 ${CVSROOT_DIRNAME}/first-dir/dir1/dir2/file7,v <-- first-dir/dir1/dir2/file7
4325 new revision: delete; previous revision: 1\.1"
4326 dotest basic2-17
"${testcvs} -q update first-dir" ''
4328 dotest basic2-18
"${testcvs} tag third-dive first-dir" \
4329 "${SPROG} tag: Tagging first-dir
4332 ${SPROG} tag: Tagging first-dir/dir1
4333 T first-dir/dir1/file14
4334 T first-dir/dir1/file6
4335 ${SPROG} tag: Tagging first-dir/dir1/dir2
4336 T first-dir/dir1/dir2/file14
4337 T first-dir/dir1/dir2/file6"
4339 dotest basic2-19
"echo yes | ${testcvs} release -d first-dir" \
4340 "You have \[0\] altered files in this repository\.
4341 Are you sure you want to release (and delete) directory .first-dir.: "
4344 dotest_fail basic2-20
"test -d first-dir" ""
4346 # now try some rtags
4349 dotest basic2-21
"${testcvs} rtag rtagged-by-head first-dir" \
4350 "${SPROG} rtag: Tagging first-dir
4351 ${SPROG} rtag: Tagging first-dir/dir1
4352 ${SPROG} rtag: Tagging first-dir/dir1/dir2"
4354 dotest basic2-21b
"${testcvs} co -p -r rtagged-by-head first-dir/file6" \
4355 "===================================================================
4356 Checking out first-dir/file6
4357 RCS: $CVSROOT_DIRNAME/first-dir/file6,v
4359 \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*
4362 # see what happens when val-tags is removed
4363 modify_repo
mv $CVSROOT_DIRNAME/CVSROOT
/val-tags \
4364 $CVSROOT_DIRNAME/CVSROOT
/val-tags.save
4365 # The output for this used to be something like:
4366 # "${SPROG} checkout: cannot open CVS/Entries for reading: No such file or directory
4367 # ${SPROG} \[checkout aborted\]: no such tag \`rtagged-by-head'"
4370 "${testcvs} co -p -r rtagged-by-head first-dir/file6" \
4371 "===================================================================
4372 Checking out first-dir/file6
4373 RCS: $CVSROOT_DIRNAME/first-dir/file6,v
4375 \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*
4378 modify_repo
mv $CVSROOT_DIRNAME/CVSROOT
/val-tags.save \
4379 $CVSROOT_DIRNAME/CVSROOT
/val-tags
4382 dotest basic2-22
"${testcvs} rtag -r rtagged-by-head rtagged-by-tag first-dir" \
4383 "${SPROG} rtag: Tagging first-dir
4384 ${SPROG} rtag: Tagging first-dir/dir1
4385 ${SPROG} rtag: Tagging first-dir/dir1/dir2"
4388 dotest basic2-23
"${testcvs} rtag -r1.1 rtagged-by-revision first-dir" \
4389 "${SPROG} rtag: Tagging first-dir
4390 ${SPROG} rtag: Tagging first-dir/dir1
4391 ${SPROG} rtag: Tagging first-dir/dir1/dir2"
4394 dotest basic2-24
"${testcvs} rdiff -r1.1 -rrtagged-by-head first-dir" \
4395 "${SPROG} rdiff: Diffing first-dir
4396 Index: first-dir/file6
4397 diff -c first-dir/file6:1\.1 first-dir/file6:1\.2
4398 \*\*\* first-dir/file6:1\.1 ${DATE}
4399 --- first-dir/file6 ${DATE}
4400 \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*
4405 Index: first-dir/file7
4406 diff -c first-dir/file7:1\.1 first-dir/file7:removed
4407 \*\*\* first-dir/file7:1.1 ${DATE}
4408 --- first-dir/file7 ${DATE}
4409 \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*
4413 ${SPROG} rdiff: Diffing first-dir/dir1
4414 Index: first-dir/dir1/file6
4415 diff -c first-dir/dir1/file6:1\.1 first-dir/dir1/file6:1\.2
4416 \*\*\* first-dir/dir1/file6:1\.1 ${DATE}
4417 --- first-dir/dir1/file6 ${DATE}
4418 \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*
4423 Index: first-dir/dir1/file7
4424 diff -c first-dir/dir1/file7:1\.1 first-dir/dir1/file7:removed
4425 \*\*\* first-dir/dir1/file7:1\.1 ${DATE}
4426 --- first-dir/dir1/file7 ${DATE}
4427 \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*
4431 ${SPROG} rdiff: Diffing first-dir/dir1/dir2
4432 Index: first-dir/dir1/dir2/file6
4433 diff -c first-dir/dir1/dir2/file6:1\.1 first-dir/dir1/dir2/file6:1\.2
4434 \*\*\* first-dir/dir1/dir2/file6:1\.1 ${DATE}
4435 --- first-dir/dir1/dir2/file6 ${DATE}
4436 \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*
4441 Index: first-dir/dir1/dir2/file7
4442 diff -c first-dir/dir1/dir2/file7:1\.1 first-dir/dir1/dir2/file7:removed
4443 \*\*\* first-dir/dir1/dir2/file7:1\.1 ${DATE}
4444 --- first-dir/dir1/dir2/file7 ${DATE}
4445 \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*
4449 dotest basic2-24a
"${testcvs} rdiff -l -r1.1 -rrtagged-by-head first-dir" \
4450 "${SPROG} rdiff: Diffing first-dir
4451 Index: first-dir/file6
4452 diff -c first-dir/file6:1\.1 first-dir/file6:1\.2
4453 \*\*\* first-dir/file6:1\.1 ${DATE}
4454 --- first-dir/file6 ${DATE}
4455 \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*
4460 Index: first-dir/file7
4461 diff -c first-dir/file7:1\.1 first-dir/file7:removed
4462 \*\*\* first-dir/file7:1.1 ${DATE}
4463 --- first-dir/file7 ${DATE}
4464 \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*
4468 # now export by rtagged-by-head and rtagged-by-tag and compare.
4469 dotest basic2-25
"${testcvs} export -r rtagged-by-head -d 1dir first-dir" \
4470 "${SPROG} export: Updating 1dir
4473 ${SPROG} export: Updating 1dir/dir1
4476 ${SPROG} export: Updating 1dir/dir1/dir2
4477 U 1dir/dir1/dir2/file14
4478 U 1dir/dir1/dir2/file6"
4479 dotest_fail basic2-25a
"test -d 1dir/CVS"
4480 dotest_fail basic2-25b
"test -d 1dir/dir1/CVS"
4481 dotest_fail basic2-25c
"test -d 1dir/dir1/dir2/CVS"
4483 dotest basic2-26
"${testcvs} export -r rtagged-by-tag first-dir" \
4484 "${SPROG} export: Updating first-dir
4487 ${SPROG} export: Updating first-dir/dir1
4488 U first-dir/dir1/file14
4489 U first-dir/dir1/file6
4490 ${SPROG} export: Updating first-dir/dir1/dir2
4491 U first-dir/dir1/dir2/file14
4492 U first-dir/dir1/dir2/file6"
4493 dotest_fail basic2-26a
"test -d first-dir/CVS"
4494 dotest_fail basic2-26b
"test -d first-dir/dir1/CVS"
4495 dotest_fail basic2-26c
"test -d first-dir/dir1/dir2/CVS"
4497 dotest basic2-27
"directory_cmp 1dir first-dir"
4498 rm -r 1dir first-dir
4500 # checkout by revision vs export by rtagged-by-revision and compare.
4502 dotest basic2-28
"${testcvs} export -rrtagged-by-revision -d export-dir first-dir" \
4503 "${SPROG} export: Updating export-dir
4507 ${SPROG} export: Updating export-dir/dir1
4508 U export-dir/dir1/file14
4509 U export-dir/dir1/file6
4510 U export-dir/dir1/file7
4511 ${SPROG} export: Updating export-dir/dir1/dir2
4512 U export-dir/dir1/dir2/file14
4513 U export-dir/dir1/dir2/file6
4514 U export-dir/dir1/dir2/file7"
4515 dotest_fail basic2-28a
"test -d export-dir/CVS"
4516 dotest_fail basic2-28b
"test -d export-dir/dir1/CVS"
4517 dotest_fail basic2-28c
"test -d export-dir/dir1/dir2/CVS"
4519 dotest basic2-29
"${testcvs} co -r1.1 first-dir" \
4520 "${SPROG} checkout: Updating first-dir
4524 ${SPROG} checkout: Updating first-dir/dir1
4525 U first-dir/dir1/file14
4526 U first-dir/dir1/file6
4527 U first-dir/dir1/file7
4528 ${SPROG} checkout: Updating first-dir/dir1/dir2
4529 U first-dir/dir1/dir2/file14
4530 U first-dir/dir1/dir2/file6
4531 U first-dir/dir1/dir2/file7"
4533 # directory copies are done in an oblique way in order to avoid a bug in sun's tmp filesystem.
4534 mkdir first-dir.cpy
; (cd first-dir
; tar cf
- . |
(cd ..
/first-dir.cpy
; tar xf
-))
4536 dotest basic2-30
"directory_cmp first-dir export-dir"
4538 # interrupt, while we've got a clean 1.1 here, let's import it
4539 # into a couple of other modules.
4541 dotest_sort basic2-31 \
4542 "$testcvs import -m first-import second-dir first-immigration immigration1 immigration1_0" \
4545 N second-dir/dir1/dir2/file14
4546 N second-dir/dir1/dir2/file6
4547 N second-dir/dir1/dir2/file7
4548 N second-dir/dir1/file14
4549 N second-dir/dir1/file6
4550 N second-dir/dir1/file7
4554 No conflicts created by this import
4555 ${SPROG} import: Importing ${CVSROOT_DIRNAME}/second-dir/dir1
4556 ${SPROG} import: Importing ${CVSROOT_DIRNAME}/second-dir/dir1/dir2"
4559 dotest basic2-32
"${testcvs} export -r HEAD second-dir" \
4560 "${SPROG} export: Updating second-dir
4564 ${SPROG} export: Updating second-dir/dir1
4565 U second-dir/dir1/file14
4566 U second-dir/dir1/file6
4567 U second-dir/dir1/file7
4568 ${SPROG} export: Updating second-dir/dir1/dir2
4569 U second-dir/dir1/dir2/file14
4570 U second-dir/dir1/dir2/file6
4571 U second-dir/dir1/dir2/file7"
4573 dotest basic2-33
"directory_cmp first-dir second-dir"
4577 rm -r export-dir first-dir
4579 (cd first-dir.cpy
; tar cf
- . |
(cd ..
/first-dir
; tar xf
-))
4581 # update the top, cancelling sticky tags, retag, update other copy, compare.
4583 dotest basic2-34
"${testcvs} update -A -l *file*" \
4585 ${SPROG} update: \`file7' is no longer in the repository"
4587 # If we don't delete the tag first, cvs won't retag it.
4588 # This would appear to be a feature.
4589 dotest basic2-35
"${testcvs} tag -l -d rtagged-by-revision" \
4590 "${SPROG} tag: Untagging \.
4593 dotest basic2-36
"${testcvs} tag -l rtagged-by-revision" \
4594 "${SPROG} tag: Tagging \.
4600 mv first-dir.cpy first-dir
4603 dotest basic2-37
"${testcvs} -q diff -u" ''
4605 dotest basic2-38
"${testcvs} update" \
4606 "${SPROG} update: Updating .
4607 ${SPROG} update: Updating dir1
4608 ${SPROG} update: Updating dir1/dir2"
4612 #### FIXME: is this expected to work??? Need to investigate
4613 #### and fix or remove the test.
4614 # dotest basic2-39 "directory_cmp 1dir first-dir"
4616 rm -r 1dir first-dir
4618 # Test the cvs history command.
4620 # Just skip these in write proxy mode for now. We should only
4621 # see write commands and maybe the last few reads in the
4622 # secondary history file the way we currently sync, but I'm not
4623 # going to try and test this yet.
4624 if $proxy; then :; else
4626 # The reason that there are two patterns rather than using
4627 # \(${TESTDIR}\|<remote>\) is that we are trying to
4628 # make this portable. Perhaps at some point we should
4629 # ditch that notion and require GNU expr (or dejagnu or....)
4630 # since it seems to be so painful.
4632 dotest basic2-64
"${testcvs} his -x TOFWUPCGMAR -a" \
4633 "O [0-9-]* [0-9:]* ${PLUS}0000 ${username} first-dir =first-dir= ${TESTDIR}/\*
4634 A [0-9-]* [0-9:]* ${PLUS}0000 ${username} 1\.1 file6 first-dir == ${TESTDIR}
4635 A [0-9-]* [0-9:]* ${PLUS}0000 ${username} 1\.1 file7 first-dir == ${TESTDIR}
4636 A [0-9-]* [0-9:]* ${PLUS}0000 ${username} 1\.1 file6 first-dir/dir1 == ${TESTDIR}
4637 A [0-9-]* [0-9:]* ${PLUS}0000 ${username} 1\.1 file7 first-dir/dir1 == ${TESTDIR}
4638 A [0-9-]* [0-9:]* ${PLUS}0000 ${username} 1\.1 file6 first-dir/dir1/dir2 == ${TESTDIR}
4639 A [0-9-]* [0-9:]* ${PLUS}0000 ${username} 1\.1 file7 first-dir/dir1/dir2 == ${TESTDIR}
4640 A [0-9-]* [0-9:]* ${PLUS}0000 ${username} 1\.1 file14 first-dir == ${TESTDIR}
4641 M [0-9-]* [0-9:]* ${PLUS}0000 ${username} 1\.2 file6 first-dir == ${TESTDIR}
4642 R [0-9-]* [0-9:]* ${PLUS}0000 ${username} 1\.2 file7 first-dir == ${TESTDIR}
4643 A [0-9-]* [0-9:]* ${PLUS}0000 ${username} 1\.1 file14 first-dir/dir1 == ${TESTDIR}
4644 M [0-9-]* [0-9:]* ${PLUS}0000 ${username} 1\.2 file6 first-dir/dir1 == ${TESTDIR}
4645 R [0-9-]* [0-9:]* ${PLUS}0000 ${username} 1\.2 file7 first-dir/dir1 == ${TESTDIR}
4646 A [0-9-]* [0-9:]* ${PLUS}0000 ${username} 1\.1 file14 first-dir/dir1/dir2 == ${TESTDIR}
4647 M [0-9-]* [0-9:]* ${PLUS}0000 ${username} 1\.2 file6 first-dir/dir1/dir2 == ${TESTDIR}
4648 R [0-9-]* [0-9:]* ${PLUS}0000 ${username} 1\.2 file7 first-dir/dir1/dir2 == ${TESTDIR}
4649 F [0-9-]* [0-9:]* ${PLUS}0000 ${username} =first-dir= ${TESTDIR}/\*
4650 T [0-9-]* [0-9:]* ${PLUS}0000 ${username} first-dir \[rtagged-by-head:A\]
4651 T [0-9-]* [0-9:]* ${PLUS}0000 ${username} first-dir \[rtagged-by-tag:rtagged-by-head\]
4652 T [0-9-]* [0-9:]* ${PLUS}0000 ${username} first-dir \[rtagged-by-revision:1\.1\]
4653 O [0-9-]* [0-9:]* ${PLUS}0000 ${username} \[1\.1\] first-dir =first-dir= ${TESTDIR}/\*
4654 U [0-9-]* [0-9:]* ${PLUS}0000 ${username} 1\.2 file6 first-dir == ${TESTDIR}/first-dir
4655 W [0-9-]* [0-9:]* ${PLUS}0000 ${username} file7 first-dir == ${TESTDIR}/first-dir" \
4656 "O [0-9-]* [0-9:]* ${PLUS}0000 ${username} first-dir =first-dir= <remote>/\*
4657 A [0-9-]* [0-9:]* ${PLUS}0000 ${username} 1\.1 file6 first-dir == <remote>
4658 A [0-9-]* [0-9:]* ${PLUS}0000 ${username} 1\.1 file7 first-dir == <remote>
4659 A [0-9-]* [0-9:]* ${PLUS}0000 ${username} 1\.1 file6 first-dir/dir1 == <remote>
4660 A [0-9-]* [0-9:]* ${PLUS}0000 ${username} 1\.1 file7 first-dir/dir1 == <remote>
4661 A [0-9-]* [0-9:]* ${PLUS}0000 ${username} 1\.1 file6 first-dir/dir1/dir2 == <remote>
4662 A [0-9-]* [0-9:]* ${PLUS}0000 ${username} 1\.1 file7 first-dir/dir1/dir2 == <remote>
4663 A [0-9-]* [0-9:]* ${PLUS}0000 ${username} 1\.1 file14 first-dir == <remote>
4664 M [0-9-]* [0-9:]* ${PLUS}0000 ${username} 1\.2 file6 first-dir == <remote>
4665 R [0-9-]* [0-9:]* ${PLUS}0000 ${username} 1\.2 file7 first-dir == <remote>
4666 A [0-9-]* [0-9:]* ${PLUS}0000 ${username} 1\.1 file14 first-dir/dir1 == <remote>
4667 M [0-9-]* [0-9:]* ${PLUS}0000 ${username} 1\.2 file6 first-dir/dir1 == <remote>
4668 R [0-9-]* [0-9:]* ${PLUS}0000 ${username} 1\.2 file7 first-dir/dir1 == <remote>
4669 A [0-9-]* [0-9:]* ${PLUS}0000 ${username} 1\.1 file14 first-dir/dir1/dir2 == <remote>
4670 M [0-9-]* [0-9:]* ${PLUS}0000 ${username} 1\.2 file6 first-dir/dir1/dir2 == <remote>
4671 R [0-9-]* [0-9:]* ${PLUS}0000 ${username} 1\.2 file7 first-dir/dir1/dir2 == <remote>
4672 F [0-9-]* [0-9:]* ${PLUS}0000 ${username} =first-dir= <remote>/\*
4673 T [0-9-]* [0-9:]* ${PLUS}0000 ${username} first-dir \[rtagged-by-head:A\]
4674 T [0-9-]* [0-9:]* ${PLUS}0000 ${username} first-dir \[rtagged-by-tag:rtagged-by-head\]
4675 T [0-9-]* [0-9:]* ${PLUS}0000 ${username} first-dir \[rtagged-by-revision:1\.1\]
4676 O [0-9-]* [0-9:]* ${PLUS}0000 ${username} \[1\.1\] first-dir =first-dir= <remote>/\*
4677 P [0-9-]* [0-9:]* ${PLUS}0000 ${username} 1\.2 file6 first-dir == <remote>
4678 W [0-9-]* [0-9:]* ${PLUS}0000 ${username} file7 first-dir == <remote>"
4682 modify_repo
rm -rf $CVSROOT_DIRNAME/first-dir \
4683 $CVSROOT_DIRNAME/second-dir
4689 # Test the ls & rls commands. There are some tests of
4690 # Interaction of ls, rls, and branches in branches2.
4692 dotest ls-init-1
"$testcvs -Q co -dtop ."
4694 dotest ls-1
"$testcvs ls CVSROOT" \
4710 dotest ls-2
"$testcvs ls -R" \
4730 # This used to cause a fatal error.
4731 modify_repo mkdir
$CVSROOT_DIRNAME/notcheckedout
4732 dotest ls-3
"$testcvs ls -RP" \
4754 # Make sure the previous command did not create the notcheckedout
4756 dotest_fail ls-4
"test -d notcheckedout"
4758 dotest ls-5
"$testcvs ls -R" \
4781 dotest_fail ls-6
"test -d notcheckedout"
4783 # Several test for ls -d, which shows dead revisions
4785 # Set up the dead files
4787 dotest ls-d-init-1
"$testcvs -Q add cemetery"
4790 dotest ls-d-init-2
"$testcvs -Q add dead living"
4791 dotest ls-d-init-3
"$testcvs -Q ci -mm dead living"
4792 dotest ls-d-init-4
"$testcvs -Q tag -b branch"
4793 dotest ls-d-init-5
"$testcvs -Q up -A"
4795 dotest ls-d-init-6
"$testcvs -Q rm dead"
4796 dotest ls-d-init-7
"$testcvs -Q ci -mm dead"
4797 dotest ls-d-init-8
"$testcvs -Q up -r branch"
4799 dotest ls-d-init-9
"$testcvs -Q rm dead"
4800 dotest ls-d-init-10
"$testcvs -Q ci -mm dead"
4803 output_living
="living"
4807 # The basic test is to make sure that dead revisions are shown if and
4808 # only if -d is speficified (and that live revisions are always
4809 # shown). The following test cases cover all combinations of these
4812 # + Working directory is on branch or trunk
4814 # + implicit branch, explicit trunk, or explicit branch
4815 # + -d present or absent
4817 # Working directory on trunk
4821 dotest ls-d-1
"$testcvs ls" "$output_living"
4822 dotest ls-d-2
"$testcvs ls -d" "$output_dead"
4824 dotest ls-d-3
"$testcvs ls -rHEAD" "$output_living"
4825 dotest ls-d-4
"$testcvs ls -drHEAD" "$output_dead"
4827 dotest ls-d-5
"$testcvs ls -rbranch" "$output_living"
4828 dotest ls-d-6
"$testcvs ls -drbranch" "$output_dead"
4831 dotest ls-d-7
"$testcvs rls cemetery" \
4832 "$SPROG rls: Listing module: \`cemetery'
4834 dotest ls-d-8
"$testcvs rls -d cemetery" \
4835 "$SPROG rls: Listing module: \`cemetery'
4838 dotest ls-d-9
"$testcvs -q rls -rHEAD cemetery" "$output_living"
4839 dotest ls-d-10
"$testcvs -q rls -drHEAD cemetery" "$output_dead"
4841 dotest ls-d-11
"$testcvs -q rls -rbranch cemetery" "$output_living"
4842 dotest ls-d-12
"$testcvs -q rls -drbranch cemetery" "$output_dead"
4844 # Working directory on branch
4845 $testcvs -Q up
-r branch
4848 dotest ls-d-13
"$testcvs ls" "$output_living"
4849 dotest ls-d-14
"$testcvs ls -d" "$output_dead"
4851 dotest ls-d-15
"$testcvs ls -r HEAD" "$output_living"
4852 dotest ls-d-16
"$testcvs ls -d -r HEAD" "$output_dead"
4854 dotest ls-d-17
"$testcvs ls -r branch" "$output_living"
4855 dotest ls-d-18
"$testcvs ls -d -r branch" "$output_dead"
4858 dotest ls-d-19
"$testcvs -q rls cemetery" "$output_living"
4859 dotest ls-d-20
"$testcvs -q rls -d cemetery" "$output_dead"
4861 dotest ls-d-21
"$testcvs -q rls -rHEAD cemetery" "$output_living"
4862 dotest ls-d-22
"$testcvs -q rls -drHEAD cemetery" "$output_dead"
4864 dotest ls-d-23
"$testcvs -q rls -rbranch cemetery" "$output_living"
4865 dotest ls-d-24
"$testcvs -q rls -drbranch cemetery" "$output_dead"
4867 # Some tests to cover specifying a file name as an option
4868 # Combinations of factors:
4870 # + file in CVS/Entries or not
4871 # + current directory or subdirectory
4872 # + file dead or not
4874 # Switch back to the trunk
4877 ## file in CVS/Entries
4878 dotest ls-filename-1
"$testcvs ls dead"
4880 # ls'ing a file that already exists once caused an assertion failure.
4881 dotest ls-filename-2
"$testcvs ls living" "living"
4884 dotest ls-filename-3
"$testcvs ls cemetery/dead"
4886 # ls'ing a file that already exists once caused an assertion failure.
4887 dotest ls-filename-4
"$testcvs ls cemetery/living" "cemetery/living"
4890 ## file not in CVS/Entries
4891 echo D
> CVS
/Entries
4893 dotest ls-filename-5
"$testcvs ls dead"
4895 # ls'ing a file that already exists once caused an assertion failure.
4896 dotest ls-filename-6
"$testcvs ls living" "living"
4899 dotest ls-filename-7
"$testcvs ls cemetery/dead"
4901 # ls'ing a file that already exists once caused an assertion failure.
4902 dotest ls-filename-8
"$testcvs ls cemetery/living" "cemetery/living"
4906 # Test the -D date option to cvs ls
4908 # try and list a file before it's created, during an old revision, in
4909 # a period when it was dead and in the future
4910 time_prebirth
=`date '+%Y-%m-%d %H:%M:%S'` ; sleep 1
4912 dotest ls-D-init-1
"$testcvs -Q add dated"
4913 dotest ls-D-init-2
"$testcvs -Q ci -mm dated"
4914 time_newborn
=`date '+%Y-%m-%d %H:%M:%S'` ; sleep 1
4916 dotest ls-D-init-2
"$testcvs -Q ci -mm dated"
4917 time_predeath
=`date '+%Y-%m-%d %H:%M:%S'` ; sleep 1
4919 dotest ls-D-init-3
"$testcvs -Q rm dated"
4920 dotest ls-D-init-4
"$testcvs -Q ci -mm dated"
4921 time_postdeath
=`date '+%Y-%m-%d %H:%M:%S'`
4923 dotest ls-D-1
"$testcvs ls -D '$time_prebirth' -e dated"
4925 # ls'ing a file that already exists once caused an assertion failure.
4926 dotest ls-D-2
"$testcvs ls -D '$time_newborn' -e dated" \
4929 # ls'ing a file that already exists once caused an assertion failure.
4930 dotest ls-D-3
"$testcvs ls -D '$time_predeath' -e dated" \
4933 dotest ls-D-4
"$testcvs ls -D '$time_postdeath' -e dated"
4938 modify_repo
rm -rf $CVSROOT_DIRNAME/notcheckedout \
4939 $CVSROOT_DIRNAME/cemetery
4940 unset output_living output_dead
4947 # Test odd cases involving CVSROOT. At the moment, that means we
4948 # are testing roots with '/'s on the end, which CVS should parse off.
4949 CVSROOT_save
=${CVSROOT}
4950 CVSROOT
="${CVSROOT}/////"
4951 dotest parseroot-1
"${testcvs} -q co CVSROOT/modules" \
4953 dotest parseroot-2
"${testcvs} -q ci -fmnull-change CVSROOT/modules" \
4954 "$CVSROOT_DIRNAME/CVSROOT/modules,v <-- CVSROOT/modules
4955 new revision: 1\.2; previous revision: 1\.1
4956 $SPROG commit: Rebuilding administrative file database"
4959 # I only test these when testing remote in case CVS was compiled
4960 # without client support.
4962 # logout does not try to contact the server.
4963 CVSROOT
=":pserver;proxy=localhost;proxyport=8080:localhost/dev/null"
4964 dotest parseroot-3r
"$testcvs -d'$CVSROOT' logout" \
4965 "Logging out of :pserver:$username@localhost:2401/dev/null
4966 $CPROG logout: warning: failed to open $HOME/\.cvspass for reading: No such file or directory
4967 $CPROG logout: Entry not found."
4968 CVSROOT
=":pserver;proxyport=8080:localhost/dev/null"
4969 dotest_fail parseroot-4r
"$testcvs -d'$CVSROOT' logout" \
4970 "$CPROG logout: Proxy port specified in CVSROOT without proxy host\.
4971 $CPROG \[logout aborted\]: Bad CVSROOT: \`:pserver;proxyport=8080:localhost/dev/null'\."
4972 CVSROOT
=":pserver;optionnoarg:localhost/dev/null"
4973 dotest_fail parseroot-5r
"$testcvs -d'$CVSROOT' logout" \
4974 "$CPROG logout: Option (\`optionnoarg') has no argument in CVSROOT\.
4975 $CPROG \[logout aborted\]: Bad CVSROOT: \`:pserver;optionnoarg:localhost/dev/null'\."
4976 CVSROOT
=":pserver;notanoption=anything:localhost/dev/null"
4977 dotest_fail parseroot-6r
"$testcvs -d'$CVSROOT' logout" \
4978 "$CPROG logout: Unknown option (\`notanoption') in CVSROOT\.
4979 $CPROG \[logout aborted\]: Bad CVSROOT: \`:pserver;notanoption=anything:localhost/dev/null'\."
4980 CVSROOT
=":local;proxy=localhost:/dev/null"
4981 dotest_fail parseroot-7r
"$testcvs -d'$CVSROOT' logout" \
4982 "$CPROG logout: CVSROOT proxy specification is only valid for gserver and
4983 $CPROG logout: pserver connection methods\.
4984 $CPROG \[logout aborted\]: Bad CVSROOT: \`:local;proxy=localhost:/dev/null'\."
4985 CVSROOT
="::pserver@anonymous@test.org:/cvs"
4986 dotest_fail parseroot-8r
"$testcvs -d'$CVSROOT' co test" \
4987 "$CPROG checkout: Unknown method (\`') in CVSROOT\.
4988 $CPROG \[checkout aborted\]: Bad CVSROOT: \`$CVSROOT'\."
4994 CVSROOT
=$CVSROOT_save
5002 # Test of how we specify files on the command line
5003 # (recurse.c and that sort of thing). Vaguely similar to
5004 # tests like basic* and deep. See modules and such tests
5005 # for what happens when we throw in modules and co -d, &c.
5007 # This particular test is fairly carefully crafted, to spot
5008 # one particular issue with remote.
5010 dotest files-1
"${testcvs} -q co -l ." ""
5012 dotest files-2
"${testcvs} add first-dir" \
5013 "Directory ${CVSROOT_DIRNAME}/first-dir added to the repository"
5016 dotest files-3
"${testcvs} add tfile" \
5017 "${SPROG} add: scheduling file .tfile. for addition
5018 ${SPROG} add: use .${SPROG} commit. to add this file permanently"
5019 dotest files-4
"${testcvs} -q ci -m add" \
5020 "$CVSROOT_DIRNAME/first-dir/tfile,v <-- tfile
5021 initial revision: 1\.1"
5022 dotest files-5
"${testcvs} -q tag -b C" "T tfile"
5023 dotest files-6
"${testcvs} -q update -r C" ""
5025 dotest files-7
"${testcvs} add dir" \
5026 "Directory ${CVSROOT_DIRNAME}/first-dir/dir added to the repository
5027 --> Using per-directory sticky tag .C'"
5030 dotest files-7b
"${testcvs} add .file" \
5031 "${SPROG} add: scheduling file .\.file' for addition on branch .C.
5032 ${SPROG} add: use .${SPROG} commit. to add this file permanently"
5034 dotest files-7c
"${testcvs} add sdir" \
5035 "Directory ${CVSROOT_DIRNAME}/first-dir/dir/sdir added to the repository
5036 --> Using per-directory sticky tag .C'"
5039 dotest files-8
"${testcvs} add ssdir" \
5040 "Directory ${CVSROOT_DIRNAME}/first-dir/dir/sdir/ssdir added to the repository
5041 --> Using per-directory sticky tag .C'"
5044 dotest files-9
"${testcvs} add .file" \
5045 "${SPROG} add: scheduling file .\.file' for addition on branch .C.
5046 ${SPROG} add: use .${SPROG} commit. to add this file permanently"
5048 dotest files-10
"${testcvs} -q ci -m test" \
5049 "$CVSROOT_DIRNAME/first-dir/dir/Attic/\.file,v <-- \.file
5050 new revision: 1\.1\.2\.1; previous revision: 1\.1
5051 $CVSROOT_DIRNAME/first-dir/dir/sdir/ssdir/Attic/\.file,v <-- sdir/ssdir/\.file
5052 new revision: 1\.1\.2\.1; previous revision: 1\.1"
5054 "${testcvs} commit -m test -f ./.file ./sdir/ssdir/.file" \
5055 "${CVSROOT_DIRNAME}/first-dir/dir/Attic/\.file,v <-- \.file
5056 new revision: 1\.1\.2\.2; previous revision: 1\.1\.2\.1
5057 ${CVSROOT_DIRNAME}/first-dir/dir/sdir/ssdir/Attic/\.file,v <-- \./sdir/ssdir/\.file
5058 new revision: 1\.1\.2\.2; previous revision: 1\.1\.2\.1"
5061 # This is a bug, looks like that toplevel_repos cruft in
5062 # client.c is coming back to haunt us.
5063 # May want to think about the whole issue, toplevel_repos
5064 # has always been crufty and trying to patch it up again
5065 # might be a mistake.
5067 "$testcvs commit -f -m test ./sdir/ssdir/.file ./.file" \
5068 "$CVSROOT_DIRNAME/first-dir/dir/sdir/ssdir/Attic/\.file,v <-- \./sdir/ssdir/\.file
5069 new revision: 1\.1\.2\.3; previous revision: 1\.1\.2\.2"
5071 # Sync up the version numbers so that the rest of the
5072 # tests don't need to expect different numbers based
5074 dotest files-12rworkaround \
5075 "$testcvs commit -f -m test .file" \
5076 "$CVSROOT_DIRNAME/first-dir/dir/Attic/\.file,v <-- \.file
5077 new revision: 1\.1\.2\.3; previous revision: 1\.1\.2\.2"
5080 "${testcvs} commit -f -m test ./sdir/ssdir/.file ./.file" \
5081 "${CVSROOT_DIRNAME}/first-dir/dir/sdir/ssdir/Attic/\.file,v <-- \./sdir/ssdir/\.file
5082 new revision: 1\.1\.2\.3; previous revision: 1\.1\.2\.2
5083 ${CVSROOT_DIRNAME}/first-dir/dir/Attic/\.file,v <-- \.file
5084 new revision: 1\.1\.2\.3; previous revision: 1\.1\.2\.2"
5087 "${testcvs} commit -fmtest ./sdir/../sdir/ssdir/..///ssdir/.file" \
5088 "${CVSROOT_DIRNAME}/first-dir/dir/sdir/ssdir/Attic/\.file,v <-- \./sdir/\.\./sdir/ssdir/\.\.///ssdir/\.file
5089 new revision: 1\.1\.2\.4; previous revision: 1\.1\.2\.3"
5091 "${testcvs} commit -fmtest ../../first-dir/dir/.file" \
5092 "${CVSROOT_DIRNAME}/first-dir/dir/Attic/\.file,v <-- \.\./\.\./first-dir/dir/\.file
5093 new revision: 1\.1\.2\.4; previous revision: 1\.1\.2\.3"
5098 modify_repo
rm -rf $CVSROOT_DIRNAME/first-dir
5104 # More filename tests, in particular spaces in file names.
5105 # (it might be better to just change a few of the names in
5106 # basica or some other test instead, always good to keep the
5107 # testsuite concise).
5110 dotest spacefiles-1
"${testcvs} -q co -l ." ""
5112 dotest spacefiles-2
"${testcvs} add -- -c" \
5113 "${SPROG} add: scheduling file .-c. for addition
5114 ${SPROG} add: use .${SPROG} commit. to add this file permanently"
5115 dotest spacefiles-3
"${testcvs} -q ci -m add" \
5116 "$CVSROOT_DIRNAME/-c,v <-- -c
5117 initial revision: 1\.1"
5119 dotest spacefiles-4
"${testcvs} add 'first dir'" \
5120 "Directory ${CVSROOT_DIRNAME}/first dir added to the repository"
5122 dotest spacefiles-5
"${testcvs} add -- -b" \
5123 "Directory ${CVSROOT_DIRNAME}/-b added to the repository"
5126 dotest spacefiles-6
"${testcvs} add 'a file'" \
5127 "${SPROG} add: scheduling file .a file. for addition
5128 ${SPROG} add: use .${SPROG} commit. to add this file permanently"
5129 dotest spacefiles-7
"${testcvs} -q ci -m add" \
5130 "$CVSROOT_DIRNAME/first dir/a file,v <-- a file
5131 initial revision: 1\.1"
5132 dotest spacefiles-8
"${testcvs} -q tag new-tag" "T a file"
5136 dotest spacefiles-10
"${testcvs} co -- -b" \
5137 "${SPROG} checkout: Updating -b"
5138 dotest spacefiles-11
"${testcvs} -q co -- -c" "U \./-c"
5140 dotest spacefiles-13
"${testcvs} -q co 'first dir'" \
5141 "U first dir/a file"
5145 dotest spacefiles-14
"${testcvs} -q co 'first dir/a file'" \
5146 "U first dir/a file"
5150 modify_repo
rm -rf "'$CVSROOT_DIRNAME/first dir'" \
5151 $CVSROOT_DIRNAME/-b $CVSROOT_DIRNAME/-c,v
5161 dotest commit-readonly-1
"$testcvs -Q import -m . $module X Y" ''
5162 dotest commit-readonly-2
"$testcvs -Q co $module" ''
5167 # Include an rcs keyword to be expanded.
5168 echo '$Id''$' > $file
5170 dotest commit-readonly-3
"$testcvs add $file" \
5171 "$SPROG add: scheduling file .$file. for addition
5172 $SPROG add: use .$SPROG commit. to add this file permanently"
5173 dotest commit-readonly-4
"$testcvs -Q ci -m . $file"
5176 # Make the file read-only.
5179 dotest commit-readonly-5
"$testcvs -Q ci -m . $file"
5184 modify_repo
rm -rf $CVSROOT_DIRNAME/"$module"
5190 # This tests for a bug in the status command which failed to
5191 # notice resolved conflicts.
5192 mkdir status
; cd status
5193 dotest status-init-1
"$testcvs -q co -l ."
5195 dotest status-init-2
"${testcvs} add first-dir" \
5196 "Directory ${CVSROOT_DIRNAME}/first-dir added to the repository"
5199 dotest status-init-3
"${testcvs} add tfile" \
5200 "${SPROG} add: scheduling file .tfile. for addition
5201 ${SPROG} add: use .${SPROG} commit. to add this file permanently"
5202 dotest status-init-4
"${testcvs} -q ci -m add" \
5203 "$CVSROOT_DIRNAME/first-dir/tfile,v <-- tfile
5204 initial revision: 1\.1"
5206 dotest status-init-5
"${testcvs} -q co -dsecond-dir first-dir" \
5207 "U second-dir/tfile"
5209 echo some junk
>>tfile
5210 dotest status-init-6
"${testcvs} -q ci -maline" \
5211 "$CVSROOT_DIRNAME/first-dir/tfile,v <-- tfile
5212 new revision: 1\.2; previous revision: 1\.1"
5214 echo force a conflict
>>tfile
5215 dotest status-init-7
"${testcvs} -q up" \
5216 "RCS file: ${CVSROOT_DIRNAME}/first-dir/tfile,v
5217 retrieving revision 1\.1
5218 retrieving revision 1\.2
5219 Merging differences between 1\.1 and 1\.2 into tfile
5220 rcsmerge: warning: conflicts during merge
5221 ${SPROG} update: conflicts found in tfile
5224 # Now note our status
5225 dotest status-1
"${testcvs} status tfile" \
5226 "===================================================================
5227 File: tfile Status: Unresolved Conflict
5229 Working revision: 1\.2.*
5230 Repository revision: 1\.2 ${CVSROOT_DIRNAME}/first-dir/tfile,v
5231 Commit Identifier: ${commitid}
5234 Sticky Options: (none)"
5236 # touch the file, leaving conflict markers in place
5237 # and note our status
5239 dotest status-2
"${testcvs} status tfile" \
5240 "===================================================================
5241 File: tfile Status: File had conflicts on merge
5243 Working revision: 1\.2.*
5244 Repository revision: 1\.2 ${CVSROOT_DIRNAME}/first-dir/tfile,v
5245 Commit Identifier: ${commitid}
5248 Sticky Options: (none)"
5250 # resolve the conflict
5251 echo resolution
>tfile
5252 dotest status-3
"${testcvs} status tfile" \
5253 "===================================================================
5254 File: tfile Status: Locally Modified
5256 Working revision: 1\.2.*
5257 Repository revision: 1\.2 ${CVSROOT_DIRNAME}/first-dir/tfile,v
5258 Commit Identifier: ${commitid}
5261 Sticky Options: (none)"
5263 # Check that there are no problems just using CVS/Root too.
5264 save_CVSROOT
=$CVSROOT
5266 dotest status-3a
"${testcvs} status tfile" \
5267 "===================================================================
5268 File: tfile Status: Locally Modified
5270 Working revision: 1\.2.*
5271 Repository revision: 1\.2 ${CVSROOT_DIRNAME}/first-dir/tfile,v
5272 Commit Identifier: ${commitid}
5275 Sticky Options: (none)"
5276 CVSROOT
=$save_CVSROOT
5280 # Update is supposed to re-Register() the file when it
5281 # finds resolved conflicts:
5282 dotest status-4
"grep 'Result of merge' CVS/Entries" \
5283 "/tfile/1\.2/Result of merge${PLUS}[a-zA-Z0-9 :]*//"
5287 dotest status-init-8
"$testcvs add fourth-dir" \
5288 "Directory $CVSROOT_DIRNAME/fourth-dir added to the repository"
5290 echo yet another line
>t3file
5291 dotest status-init-9
"$testcvs add t3file" \
5292 "$SPROG add: scheduling file .t3file. for addition
5293 $SPROG add: use .$SPROG commit. to add this file permanently"
5294 dotest status-init-10
"$testcvs -q ci -m add" \
5295 "$CVSROOT_DIRNAME/fourth-dir/t3file,v <-- t3file
5296 initial revision: 1\.1"
5299 dotest status-init-11
"$testcvs add third-dir" \
5300 "Directory $CVSROOT_DIRNAME/first-dir/third-dir added to the repository"
5302 echo another line
>t2file
5303 dotest status-init-12
"$testcvs add t2file" \
5304 "$SPROG add: scheduling file .t2file. for addition
5305 $SPROG add: use .$SPROG commit. to add this file permanently"
5306 dotest status-init-13
"$testcvs -q ci -m add" \
5307 "$CVSROOT_DIRNAME/first-dir/third-dir/t2file,v <-- t2file
5308 initial revision: 1\.1"
5309 dotest status-5
"$testcvs status ../tfile" \
5310 "===================================================================
5311 File: tfile Status: Locally Modified
5313 Working revision: 1\.2.*
5314 Repository revision: 1\.2 $CVSROOT_DIRNAME/first-dir/tfile,v
5315 Commit Identifier: ${commitid}
5318 Sticky Options: (none)"
5319 dotest status-6
"$testcvs status ../../fourth-dir/t3file" \
5320 "===================================================================
5321 File: t3file Status: Up-to-date
5323 Working revision: 1\.1.*
5324 Repository revision: 1\.1 $CVSROOT_DIRNAME/fourth-dir/t3file,v
5325 Commit Identifier: ${commitid}
5328 Sticky Options: (none)"
5333 modify_repo
rm -rf $CVSROOT_DIRNAME/first-dir \
5334 $CVSROOT_DIRNAME/fourth-dir
5343 dotest commit-readonlyfs-1
"${testcvs} -Q import -m . $module X Y" ''
5345 dotest_fail commit-readonlyfs-2r1
"${testcvs} -Q -R co $module" \
5346 "${CPROG} \[checkout aborted\]: Read-only repository feature unavailable with remote roots (cvsroot = ${CVSROOT_DIRNAME})"
5347 dotest commit-readonlyfs-2r2
"${testcvs} -Q co $module" ''
5349 dotest commit-readonlyfs-2
"${testcvs} -Q -R co $module" ''
5351 dotest commit-readonlyfs-2r3
"${testcvs} -q -R co $module" \
5354 dotest commit-readonlyfs-2r4
"${testcvs} -R co $module" \
5355 "${SPROG}: WARNING: Read-only repository access mode selected via \`cvs -R'\.
5356 Using this option to access a repository which some users write to may
5357 cause intermittent sandbox corruption\.
5358 ${SPROG} checkout: Updating $module
5364 dotest_fail commit-readonlyfs-3r
"${testcvs} -Q -R ci -m. junk" \
5365 "${SPROG} \[commit aborted\]: Read-only repository feature unavailable with remote roots (cvsroot = ${CVSROOT_DIRNAME})"
5367 dotest_fail commit-readonlyfs-3
"${testcvs} -Q -R ci -m. junk" \
5368 "${SPROG} commit: write lock failed\.
5369 WARNING: Read-only repository access mode selected via \`cvs -R'\.
5370 Attempting to write to a read-only filesystem is not allowed\.
5371 ${SPROG} \[commit aborted\]: lock failed - giving up"
5377 modify_repo
rm -rf $CVSROOT_DIRNAME/"$module"
5384 # XXX for now this is just the most essential test...
5390 echo '$''Name$' >> foo
5392 echo '$''Name$' >> bar
5393 dotest_sort rdiff-1 \
5394 "${testcvs} import -I ! -m test-import-with-keyword trdiff TRDIFF T1" \
5399 No conflicts created by this import'
5401 "${testcvs} co -ko trdiff" \
5402 "${SPROG} checkout: Updating trdiff
5406 echo something
>> foo
5408 "${testcvs} ci -m added-something foo" \
5409 "${CVSROOT_DIRNAME}/trdiff/foo,v <-- foo
5410 new revision: 1\.2; previous revision: 1\.1"
5411 echo '#ident "@(#)trdiff:$''Name$:$''Id$"' > new
5412 echo "new file" >> new
5414 "${testcvs} add -m new-file-description new" \
5415 "${SPROG} add: scheduling file \`new' for addition
5416 ${SPROG} add: use .${SPROG} commit. to add this file permanently"
5418 "${testcvs} commit -m added-new-file new" \
5419 "${CVSROOT_DIRNAME}/trdiff/new,v <-- new
5420 initial revision: 1\.1"
5422 "${testcvs} tag local-v0" \
5423 "${SPROG} tag: Tagging .
5428 "${testcvs} status -v foo" \
5429 "===================================================================
5430 File: foo Status: Up-to-date
5432 Working revision: 1\.2.*
5433 Repository revision: 1\.2 ${CVSROOT_DIRNAME}/trdiff/foo,v
5434 Commit Identifier: ${commitid}
5440 local-v0 (revision: 1\.2)
5441 T1 (revision: 1\.1\.1\.1)
5442 TRDIFF (branch: 1\.1\.1)"
5448 "${testcvs} rdiff -r T1 -r local-v0 trdiff" \
5449 "${SPROG}"' rdiff: Diffing trdiff
5451 diff -c trdiff/foo:1\.1\.1\.1 trdiff/foo:1\.2
5452 \*\*\* trdiff/foo:1\.1\.1\.1 '"${DATE}"'
5453 --- trdiff/foo '"${DATE}"'
5454 \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*
5456 ! \$''Id: foo,v 1\.1\.1\.1 [0-9/]* [0-9:]* '"${username}"' Exp \$
5459 ! \$''Id: foo,v 1\.2 [0-9/]* [0-9:]* '"${username}"' Exp \$
5460 ! \$''Name: local-v0 \$
5463 diff -c /dev/null trdiff/new:1\.1
5464 \*\*\* /dev/null '"${DATE}"'
5465 --- trdiff/new '"${DATE}"'
5466 \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*
5469 '"${PLUS}"' #ident "@(#)trdiff:\$''Name: local-v0 \$:\$''Id: new,v 1\.1 [0-9/]* [0-9:]* '"${username}"' Exp \$"
5470 '"${PLUS}"' new file'
5475 modify_repo
rm -rf $CVSROOT_DIRNAME/trdiff
5481 # Test that the short patch behaves as expected
5484 # 3) Different revision number with no difference.
5485 # 4) Different revision number with changes.
5487 # 6) Same revision number (no difference).
5488 mkdir rdiff-short
; cd rdiff-short
5490 dotest rdiff-short-init-1 \
5491 "${testcvs} -q import -I ! -m initial-import abc vendor initial" \
5493 No conflicts created by this import'
5495 dotest rdiff-short-init-2
"${testcvs} -q get abc" ''
5497 echo "abc" >file1.txt
5498 dotest rdiff-short-init-3
"${testcvs} add file1.txt" \
5499 "${SPROG} add: scheduling file .file1\.txt' for addition
5500 ${SPROG} add: use \`${SPROG} commit' to add this file permanently"
5501 dotest rdiff-short-init-4 \
5502 "${testcvs} commit -madd-file1 file1.txt" \
5503 "${CVSROOT_DIRNAME}/abc/file1\.txt,v <-- file1\.txt
5504 initial revision: 1\.1"
5505 echo def
>>file1.txt
5506 dotest rdiff-short-init-5 \
5507 "${testcvs} commit -mchange-file1 file1.txt" \
5508 "${CVSROOT_DIRNAME}/abc/file1\.txt,v <-- file1\.txt
5509 new revision: 1\.2; previous revision: 1\.1"
5510 echo "abc" >file1.txt
5511 dotest rdiff-short-init-6 \
5512 "${testcvs} commit -mrestore-file1-rev1 file1.txt" \
5513 "${CVSROOT_DIRNAME}/abc/file1\.txt,v <-- file1\.txt
5514 new revision: 1\.3; previous revision: 1\.2"
5515 dotest rdiff-short-init-7 \
5516 "${testcvs} tag -r 1.1 tag1 file1.txt" \
5518 dotest rdiff-short-init-8 \
5519 "${testcvs} tag -r 1.2 tag2 file1.txt" \
5521 dotest rdiff-short-init-9 \
5522 "${testcvs} tag -r 1.3 tag3 file1.txt" \
5524 echo "abc" >file2.txt
5525 dotest rdiff-short-init-10 \
5526 "${testcvs} add file2.txt" \
5527 "${SPROG} add: scheduling file .file2\.txt' for addition
5528 ${SPROG} add: use \`${SPROG} commit' to add this file permanently"
5529 dotest rdiff-add-remove-nodiff-init-11 \
5530 "${testcvs} commit -madd-file2 file2.txt" \
5531 "${CVSROOT_DIRNAME}/abc/file2\.txt,v <-- file2\.txt
5532 initial revision: 1\.1"
5533 dotest rdiff-short-init-12 \
5534 "${testcvs} tag -r 1.1 tag4 file2.txt" \
5536 dotest rdiff-short-init-13 \
5537 "${testcvs} tag -r 1.1 tag5 file2.txt" \
5542 # 3) Different revision number with no difference.
5543 dotest rdiff-short-no-real-change \
5544 "${testcvs} -q rdiff -s -r tag1 -r tag3 abc"
5546 # 4) Different revision number with changes.
5547 dotest rdiff-short-real-change \
5548 "${testcvs} -q rdiff -s -r tag1 -r tag2 abc" \
5549 'File abc/file1.txt changed from revision 1\.1 to 1\.2'
5553 dotest_sort rdiff-short-remove-add \
5554 "${testcvs} -q rdiff -s -r tag2 -r tag4 abc" \
5555 'File abc/file1\.txt is removed; tag2 revision 1\.2
5556 File abc/file2\.txt is new; tag4 revision 1\.1'
5558 # 6) Same revision number (no difference).
5559 dotest rdiff-short-no-change \
5560 "${testcvs} -q rdiff -s -r tag4 -r tag5 abc"
5563 # Check that the messages change when we diff against the trunk
5564 # rather than a tag or date.
5565 dotest rdiff-short-against-trunk-1 \
5566 "${testcvs} -q rdiff -s -rtag4 abc" \
5567 "File abc/file1\.txt is new; current revision 1\.3"
5569 dotest rdiff-short-against-trunk-2 \
5570 "${testcvs} -q rdiff -s -rtag2 abc" \
5571 "File abc/file1\.txt changed from revision 1\.2 to 1\.3
5572 File abc/file2\.txt is new; current revision 1\.1"
5574 modify_repo
rm -rf $CVSROOT_DIRNAME/abc
5580 # Test for the segv problem reported by James Cribb
5582 mkdir rdiff2
; cd rdiff2
5583 # Create a module "m" with files "foo" and "d/bar"
5588 dotest_sort rdiff2-1 \
5589 "${testcvs} -q import -I ! -m initial-import m vendor initial" \
5594 No conflicts created by this import'
5600 dotest rdiff2-2
"${testcvs} get m" \
5601 "${SPROG} checkout: Updating m
5603 ${SPROG} checkout: Updating m/d
5606 dotest rdiff2-3
"${testcvs} rm -f foo" \
5607 "${SPROG} remove: scheduling .foo. for removal
5608 ${SPROG} remove: use .${SPROG} commit. to remove this file permanently"
5610 dotest rdiff2-4
"${testcvs} commit -m Removed foo" \
5611 "${CVSROOT_DIRNAME}/m/foo,v <-- foo
5612 new revision: delete; previous revision: 1\.1\.1\.1"
5616 dotest rdiff2-5
"${testcvs} commit -m Changed d/bar" \
5617 "${CVSROOT_DIRNAME}/m/d/bar,v <-- d/bar
5618 new revision: 1\.2; previous revision: 1\.1"
5620 # Crash before showing d/bar diffs
5621 dotest_fail rdiff2-6
"${testcvs} rdiff -t m" \
5622 "${SPROG} rdiff: Diffing m
5623 ${SPROG} rdiff: Diffing m/d
5625 diff -c m/d/bar:1\.1\.1\.1 m/d/bar:1\.2
5626 \*\*\* m/d/bar:1\.1\.1\.1 ${DATE}
5628 \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*
5637 modify_repo
rm -rf $CVSROOT_DIRNAME/m
5643 # Various tests specific to the "cvs diff" command.
5646 # rcslib: cvs diff and $Name.
5648 # diffmerge*: nuts and bolts (stuff within diff library)
5650 dotest diff-1
"$testcvs -q co -l ."
5652 dotest diff-2
"$testcvs add first-dir" \
5653 "Directory $CVSROOT_DIRNAME/first-dir added to the repository"
5656 # diff is anomalous. Most CVS commands print the "nothing
5657 # known" message (or worse yet, no message in some cases) but
5658 # diff says "I know nothing". Shrug.
5659 dotest_fail diff-3
"${testcvs} diff xyzpdq" \
5660 "${SPROG} diff: I know nothing about xyzpdq"
5662 dotest diff-4
"${testcvs} add abc" \
5663 "${SPROG} add: scheduling file .abc. for addition
5664 ${SPROG} add: use .${SPROG} commit. to add this file permanently"
5665 dotest diff-5
"${testcvs} -q ci -mtest" \
5666 "$CVSROOT_DIRNAME/first-dir/abc,v <-- abc
5667 initial revision: 1\.1"
5668 echo "extern int gethostname ();" >abc
5669 dotest diff-6
"${testcvs} -q ci -mtest" \
5670 "$CVSROOT_DIRNAME/first-dir/abc,v <-- abc
5671 new revision: 1\.2; previous revision: 1\.1"
5672 echo "#include <winsock.h>" >abc
5673 # check the behavior of the --ifdef=MACRO option
5674 dotest_fail diff-7
"${testcvs} -q diff --ifdef=HAVE_WINSOCK_H" \
5676 ===================================================================
5677 RCS file: ${CVSROOT_DIRNAME}/first-dir/abc,v
5678 retrieving revision 1\.2
5679 diff --ifdef HAVE_WINSOCK_H -r1\.2 abc
5680 #ifndef HAVE_WINSOCK_H
5681 extern int gethostname ();
5682 #else /\* HAVE_WINSOCK_H \*/
5683 #include <winsock\.h>
5684 #endif /\* HAVE_WINSOCK_H \*/"
5688 modify_repo
rm -rf $CVSROOT_DIRNAME/first-dir
5695 # Test handling of 'cvs diff' of files without newlines
5697 dotest diffnl-000
"${testcvs} -q co -l ." ''
5699 dotest diffnl-001
"${testcvs} add first-dir" \
5700 "Directory ${CVSROOT_DIRNAME}/first-dir added to the repository"
5703 ${AWK} 'BEGIN {printf("one\ntwo\nthree\nfour\nfive\nsix")}' </dev
/null
>abc
5704 dotest diffnl-002
"${testcvs} add abc" \
5705 "${SPROG} add: scheduling file .abc. for addition
5706 ${SPROG} add: use .${SPROG} commit. to add this file permanently"
5707 dotest diffnl-003
"${testcvs} -q ci -mtest" \
5708 "$CVSROOT_DIRNAME/first-dir/abc,v <-- abc
5709 initial revision: 1\.1"
5711 # change to line near EOF
5712 ${AWK} 'BEGIN {printf("one\ntwo\nthree\nfour\nsix")}' </dev
/null
>abc
5713 dotest_fail diffnl-100
"${testcvs} diff abc" \
5715 ===================================================================
5716 RCS file: ${CVSROOT_DIRNAME}/first-dir/abc,v
5717 retrieving revision 1\.1
5721 dotest_fail diffnl-101
"${testcvs} diff -u abc" \
5723 ===================================================================
5724 RCS file: ${CVSROOT_DIRNAME}/first-dir/abc,v
5725 retrieving revision 1\.1
5727 --- abc ${RFCDATE} 1\.1
5735 \\\\ No newline at end of file"
5736 dotest diffnl-102
"${testcvs} -q ci -mtest abc" \
5737 "$CVSROOT_DIRNAME/first-dir/abc,v <-- abc
5738 new revision: 1\.2; previous revision: 1\.1"
5740 # Change to last line
5741 ${AWK} 'BEGIN {printf("one\ntwo\nthree\nfour\nseven")}' </dev
/null
>abc
5742 dotest_fail diffnl-200
"${testcvs} diff abc" \
5744 ===================================================================
5745 RCS file: ${CVSROOT_DIRNAME}/first-dir/abc,v
5746 retrieving revision 1\.2
5750 \\\\ No newline at end of file
5753 \\\\ No newline at end of file"
5754 dotest_fail diffnl-201
"${testcvs} diff -u abc" \
5756 ===================================================================
5757 RCS file: ${CVSROOT_DIRNAME}/first-dir/abc,v
5758 retrieving revision 1\.2
5760 --- abc ${RFCDATE} 1\.2
5767 \\\\ No newline at end of file
5769 \\\\ No newline at end of file"
5770 dotest diffnl-202
"${testcvs} ci -mtest abc" \
5771 "${CVSROOT_DIRNAME}/first-dir/abc,v <-- abc
5772 new revision: 1\.3; previous revision: 1\.2"
5774 # Addition of newline
5780 dotest_fail diffnl-300
"${testcvs} diff abc" \
5782 ===================================================================
5783 RCS file: ${CVSROOT_DIRNAME}/first-dir/abc,v
5784 retrieving revision 1\.3
5788 \\\\ No newline at end of file
5791 dotest_fail diffnl-301
"${testcvs} diff -u abc" \
5793 ===================================================================
5794 RCS file: ${CVSROOT_DIRNAME}/first-dir/abc,v
5795 retrieving revision 1\.3
5797 --- abc ${RFCDATE} 1\.3
5804 \\\\ No newline at end of file
5806 dotest diffnl-302
"${testcvs} ci -mtest abc" \
5807 "${CVSROOT_DIRNAME}/first-dir/abc,v <-- abc
5808 new revision: 1\.4; previous revision: 1\.3"
5810 # Removal of newline
5811 ${AWK} 'BEGIN {printf("one\ntwo\nthree\nfour\nseven")}' </dev
/null
>abc
5812 dotest_fail diffnl-400
"${testcvs} diff abc" \
5814 ===================================================================
5815 RCS file: ${CVSROOT_DIRNAME}/first-dir/abc,v
5816 retrieving revision 1\.4
5822 \\\\ No newline at end of file"
5823 dotest_fail diffnl-401
"${testcvs} diff -u abc" \
5825 ===================================================================
5826 RCS file: ${CVSROOT_DIRNAME}/first-dir/abc,v
5827 retrieving revision 1\.4
5829 --- abc ${RFCDATE} 1\.4
5837 \\\\ No newline at end of file"
5842 modify_repo
rm -rf $CVSROOT_DIRNAME/first-dir
5848 # next dive. test death support.
5850 # NOTE: this section has reached the size and
5851 # complexity where it is getting to be a good idea to
5852 # add new death support tests to a new section rather
5853 # than continuing to piggyback them onto the tests here.
5855 modify_repo mkdir
$CVSROOT_DIRNAME/first-dir
5856 dotest death-init-1
"$testcvs -Q co first-dir"
5860 # Create a directory with only dead files, to make sure CVS
5861 # doesn't get confused by it.
5863 dotest
65a0
"${testcvs} add subdir" \
5864 "Directory ${CVSROOT_DIRNAME}/first-dir/subdir added to the repository"
5866 echo file in subdir
>sfile
5867 dotest
65a1
"${testcvs} add sfile" \
5868 "${SPROG}"' add: scheduling file `sfile'\'' for addition
5869 '"${SPROG}"' add: use .'"${SPROG}"' commit. to add this file permanently'
5870 dotest
65a2
"${testcvs} -q ci -m add-it" \
5871 "$CVSROOT_DIRNAME/first-dir/subdir/sfile,v <-- sfile
5872 initial revision: 1\.1"
5874 dotest
65a3
"${testcvs} rm sfile" \
5875 "${SPROG}"' remove: scheduling `sfile'\'' for removal
5876 '"${SPROG}"' remove: use .'"${SPROG}"' commit. to remove this file permanently'
5877 dotest
65a4
"${testcvs} -q ci -m remove-it" \
5878 "$CVSROOT_DIRNAME/first-dir/subdir/sfile,v <-- sfile
5879 new revision: delete; previous revision: 1\.1"
5881 dotest
65a5
"${testcvs} -q update -P" ''
5882 dotest_fail
65a6
"test -d subdir" ''
5886 if ${CVS} add file1
2>> ${LOGFILE}; then
5893 if ${CVS} ci
-m test >> ${LOGFILE} 2>&1; then
5901 if ${CVS} rm file1
2>> ${LOGFILE}; then
5908 if ${CVS} ci
-m test >>${LOGFILE} ; then
5914 dotest_fail
69a0
"test -f file1" ''
5915 # get the old contents of file1 back
5916 if ${testcvs} update
-p -r 1.1 file1
>file1
2>>${LOGFILE}; then
5921 dotest
69a2
"cat file1" ''
5923 # create second file
5925 if ${CVS} add file1 file2
2>> ${LOGFILE}; then
5932 if ${CVS} ci
-m test >> ${LOGFILE} 2>&1; then
5939 if ${CVS} log file1
>> ${LOGFILE}; then
5945 # file4 will be dead at the time of branching and stay dead.
5947 dotest death-file4-add
"${testcvs} add file4" \
5948 "${SPROG}"' add: scheduling file `file4'\'' for addition
5949 '"${SPROG}"' add: use .'"${SPROG}"' commit. to add this file permanently'
5950 dotest death-file4-ciadd
"${testcvs} -q ci -m add file4" \
5951 "$CVSROOT_DIRNAME/first-dir/file4,v <-- file4
5952 initial revision: 1\.1"
5954 dotest death-file4-rm
"${testcvs} remove file4" \
5955 "${SPROG}"' remove: scheduling `file4'\'' for removal
5956 '"${SPROG}"' remove: use .'"${SPROG}"' commit. to remove this file permanently'
5957 dotest death-file4-cirm
"${testcvs} -q ci -m remove file4" \
5958 "$CVSROOT_DIRNAME/first-dir/file4,v <-- file4
5959 new revision: delete; previous revision: 1\.1"
5961 # Tag the branchpoint.
5962 dotest death-72a
"${testcvs} -q tag bp_branch1" 'T file1
5966 if ${CVS} tag
-b branch1
; then
5972 # and move to the branch.
5973 if ${CVS} update
-r branch1
; then
5979 dotest_fail death-file4-3
"test -f file4" ''
5981 # add a file in the branch
5982 echo line1 from branch1
>> file3
5983 if ${CVS} add file3
2>> ${LOGFILE}; then
5990 if ${CVS} ci
-m test >> ${LOGFILE} 2>&1; then
5997 "${testcvs} -q rdiff -r bp_branch1 -r branch1 first-dir" \
5998 "Index: first-dir/file3
5999 diff -c /dev/null first-dir/file3:1\.1\.2\.1
6000 \*\*\* /dev/null ${DATE}
6001 --- first-dir/file3 ${DATE}
6002 \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*
6005 ${PLUS} line1 from branch1"
6007 "${testcvs} -q rdiff -r branch1 -r bp_branch1 first-dir" \
6008 "Index: first-dir/file3
6009 diff -c first-dir/file3:1\.1\.2\.1 first-dir/file3:removed
6010 \*\*\* first-dir/file3:1\.1\.2\.1 ${DATE}
6011 --- first-dir/file3 ${DATE}
6012 \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*
6014 - line1 from branch1
6019 if ${CVS} rm file3
2>> ${LOGFILE}; then
6026 if ${CVS} ci
-m test >>${LOGFILE} ; then
6033 echo line1 from branch1
>> file3
6034 if ${CVS} add file3
2>> ${LOGFILE}; then
6041 if ${CVS} ci
-m test >> ${LOGFILE} 2>&1; then
6047 # change the first file
6048 echo line2 from branch1
>> file1
6051 if ${CVS} ci
-m test >> ${LOGFILE} 2>&1; then
6059 if ${CVS} rm file2
2>> ${LOGFILE}; then
6066 if ${CVS} ci
-m test >>${LOGFILE}; then
6072 # back to the trunk.
6073 if ${CVS} update
-A 2>> ${LOGFILE}; then
6079 dotest_fail death-file4-4
"test -f file4" ''
6081 if test -f file3
; then
6088 dotest death-86
"$testcvs -q update -j branch1" \
6089 "RCS file: $CVSROOT_DIRNAME/first-dir/file1,v
6090 retrieving revision 1\.3
6091 retrieving revision 1\.3\.2\.1
6092 Merging differences between 1\.3 and 1\.3\.2\.1 into file1
6093 ${SPROG} update: scheduling \`file2' for removal
6096 dotest_fail death-file4-5
"test -f file4" ''
6098 if test -f file3
; then
6104 # Make sure that we joined the correct change to file1
6105 if echo line2 from branch1 |
cmp - file1
>/dev
/null
; then
6112 if ${CVS} update
; then
6119 dotest
89 "${testcvs} -q ci -m test" \
6120 "$CVSROOT_DIRNAME/first-dir/file1,v <-- file1
6121 new revision: 1\.4; previous revision: 1\.3
6122 $CVSROOT_DIRNAME/first-dir/file2,v <-- file2
6123 new revision: delete; previous revision: 1\.1
6124 $CVSROOT_DIRNAME/first-dir/file3,v <-- file3
6125 new revision: 1\.2; previous revision: 1\.1"
6129 dotest
89a
"${testcvs} -q co first-dir" 'U first-dir/file1
6135 # remove first file.
6137 if ${CVS} rm file1
2>> ${LOGFILE}; then
6144 if ${CVS} ci
-m test >>${LOGFILE}; then
6150 if test -f file1
; then
6156 # typo; try to get to the branch and fail
6157 dotest_fail
92.1a
"$testcvs update -r brnach1" \
6158 "$SPROG \[update aborted\]: no such tag \`brnach1'"
6159 # Make sure we are still on the trunk
6160 if test -f file1
; then
6165 if test -f file3
; then
6172 if ${CVS} update
-r branch1
2>> ${LOGFILE}; then
6178 dotest_fail death-file4-6
"test -f file4" ''
6180 if test -f file1
; then
6187 dotest
95 "${testcvs} -q update -j HEAD" \
6188 "${SPROG}"' update: file file1 has been modified, but has been removed in revision HEAD
6189 '"${SPROG}"' update: file file3 exists, but has been added in revision HEAD'
6191 dotest_fail death-file4-7
"test -f file4" ''
6193 # file2 should not have been recreated. It was
6194 # deleted on the branch, and has not been modified on
6195 # the trunk. That means that there have been no
6196 # changes between the greatest common ancestor (the
6197 # trunk version) and HEAD.
6198 dotest_fail death-file2-1
"test -f file2" ''
6203 modify_repo
rm -rf $CVSROOT_DIRNAME/first-dir
6209 # More tests of death support.
6210 modify_repo mkdir
$CVSROOT_DIRNAME/first-dir
6211 dotest death2-1
"$testcvs -q co first-dir"
6215 # Add two files on the trunk.
6216 echo "first revision" > file1
6217 echo "file4 first revision" > file4
6218 dotest death2-2
"${testcvs} add file1 file4" \
6219 "${SPROG}"' add: scheduling file `file1'\'' for addition
6220 '"${SPROG}"' add: scheduling file `file4'\'' for addition
6221 '"${SPROG}"' add: use .'"${SPROG}"' commit. to add these files permanently'
6223 dotest death2-3
"${testcvs} -q commit -m add" \
6224 "$CVSROOT_DIRNAME/first-dir/file1,v <-- file1
6225 initial revision: 1\.1
6226 $CVSROOT_DIRNAME/first-dir/file4,v <-- file4
6227 initial revision: 1\.1"
6229 # Make a branch and a non-branch tag.
6230 dotest death2-4
"${testcvs} -q tag -b branch" \
6233 dotest death2-5
"${testcvs} -q tag tag" \
6237 # Switch over to the branch.
6238 dotest death2-6
"${testcvs} -q update -r branch" ''
6240 # Delete the file on the branch.
6242 dotest death2-7
"${testcvs} rm file1" \
6243 "${SPROG} remove: scheduling .file1. for removal
6244 ${SPROG} remove: use .${SPROG} commit. to remove this file permanently"
6246 # Test diff of the removed file before it is committed.
6247 dotest_fail death2-diff-1
"${testcvs} -q diff file1" \
6248 "${SPROG} diff: file1 was removed, no comparison available"
6250 dotest_fail death2-diff-2
"${testcvs} -q diff -N -c file1" \
6252 ===================================================================
6255 \*\*\* file1 ${RFCDATE} [0-9.]*
6256 --- /dev/null ${RFCDATE_EPOCH}
6257 \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*
6262 dotest death2-8
"${testcvs} -q ci -m removed" \
6263 "$CVSROOT_DIRNAME/first-dir/file1,v <-- file1
6264 new revision: delete; previous revision: 1\.1"
6266 # Test diff of a dead file.
6267 dotest_fail death2-diff-3 \
6268 "${testcvs} -q diff -r1.1 -rbranch -c file1" \
6269 "${SPROG} diff: Tag branch refers to a dead (removed) revision in file .file1.\.
6270 ${SPROG} diff: No comparison available\. Pass .-N. to .${SPROG} diff.${QUESTION}"
6272 dotest_fail death2-diff-3a \
6273 "${testcvs} -q diff -rbranch -r1.1 -c file1" \
6274 "${SPROG} diff: Tag branch refers to a dead (removed) revision in file .file1.\.
6275 ${SPROG} diff: No comparison available\. Pass .-N. to .${SPROG} diff.${QUESTION}"
6277 dotest_fail death2-diff-4 \
6278 "${testcvs} -q diff -r1.1 -rbranch -N -c file1" \
6280 ===================================================================
6283 \*\*\* file1 ${RFCDATE} [0-9.]*
6284 --- /dev/null ${RFCDATE_EPOCH}
6285 \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*
6290 dotest_fail death2-diff-4a \
6291 "${testcvs} -q diff -rbranch -r1.1 -N -c file1" \
6293 ===================================================================
6296 \*\*\* /dev/null ${RFCDATE_EPOCH}
6297 --- file1 ${RFCDATE} [0-9.]*
6298 \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*
6304 dotest_fail death2-diff-5
"${testcvs} -q diff -rtag -c ." \
6305 "${SPROG} diff: file1 no longer exists, no comparison available"
6307 dotest_fail death2-diff-6
"${testcvs} -q diff -rtag -N -c ." \
6309 ===================================================================
6312 \*\*\* file1 [-a-zA-Z0-9: ]* [0-9.]*
6313 --- /dev/null ${RFCDATE_EPOCH}
6314 \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*
6319 # Test rdiff of a dead file.
6320 dotest death2-rdiff-1 \
6321 "${testcvs} -q rtag -rbranch rdiff-tag first-dir" ''
6323 dotest death2-rdiff-2
"${testcvs} -q rdiff -rtag -rbranch first-dir" \
6324 "Index: first-dir/file1
6325 diff -c first-dir/file1:1\.1 first-dir/file1:removed
6326 \*\*\* first-dir/file1:1\.1 [a-zA-Z0-9: ]*
6327 --- first-dir/file1 [a-zA-Z0-9: ]*
6328 \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*
6333 # Readd the file to the branch.
6334 echo "second revision" > file1
6335 dotest death2-9
"${testcvs} add file1" \
6336 "${SPROG} add: Re-adding file \`file1' on branch \`branch' after dead revision 1\.1\.2\.1\.
6337 ${SPROG} add: use \`${SPROG} commit' to add this file permanently"
6339 # Test diff of the added file before it is committed.
6340 dotest_fail death2-diff-7
"${testcvs} -q diff file1" \
6341 "${SPROG} diff: file1 is a new entry, no comparison available"
6343 dotest_fail death2-diff-8
"${testcvs} -q diff -N -c file1" \
6345 ===================================================================
6348 \*\*\* /dev/null ${RFCDATE_EPOCH}
6349 --- file1 ${RFCDATE}
6350 \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*
6353 ${PLUS} second revision"
6355 dotest death2-10
"${testcvs} -q commit -m add" \
6356 "$CVSROOT_DIRNAME/first-dir/file1,v <-- file1
6357 new revision: 1\.1\.2\.2; previous revision: 1\.1\.2\.1"
6359 # Delete file4 from the branch
6360 dotest death2-10a
"${testcvs} rm -f file4" \
6361 "${SPROG} remove: scheduling .file4. for removal
6362 ${SPROG} remove: use .${SPROG} commit. to remove this file permanently"
6363 dotest death2-10b
"${testcvs} -q ci -m removed" \
6364 "$CVSROOT_DIRNAME/first-dir/file4,v <-- file4
6365 new revision: delete; previous revision: 1\.1"
6367 # Back to the trunk.
6368 dotest death2-11
"${testcvs} -q update -A" \
6372 # Add another file on the trunk.
6373 echo "first revision" > file2
6374 dotest death2-12
"${testcvs} add file2" \
6375 "${SPROG}"' add: scheduling file `file2'\'' for addition
6376 '"${SPROG}"' add: use .'"${SPROG}"' commit. to add this file permanently'
6377 dotest death2-13
"${testcvs} -q commit -m add" \
6378 "$CVSROOT_DIRNAME/first-dir/file2,v <-- file2
6379 initial revision: 1\.1"
6381 # Modify file4 on the trunk.
6382 echo "new file4 revision" > file4
6383 dotest death2-13a
"${testcvs} -q commit -m mod" \
6384 "$CVSROOT_DIRNAME/first-dir/file4,v <-- file4
6385 new revision: 1\.2; previous revision: 1\.1"
6387 # Back to the branch.
6388 # The ``no longer in the repository'' message doesn't really
6389 # look right to me, but that's what CVS currently prints for
6391 dotest death2-14
"${testcvs} -q update -r branch" \
6393 ${SPROG} update: \`file2' is no longer in the repository
6394 ${SPROG} update: \`file4' is no longer in the repository"
6396 # Add a file on the branch with the same name.
6397 echo "branch revision" > file2
6398 dotest death2-15
"${testcvs} add file2" \
6399 "${SPROG}"' add: scheduling file `file2'\'' for addition on branch `branch'\''
6400 '"${SPROG}"' add: use .'"${SPROG}"' commit. to add this file permanently'
6401 dotest death2-16
"${testcvs} -q commit -m add" \
6402 "$CVSROOT_DIRNAME/first-dir/file2,v <-- file2
6403 new revision: 1\.1\.2\.2; previous revision: 1\.1\.2\.1"
6405 # Add a new file on the branch.
6406 echo "first revision" > file3
6407 dotest death2-17
"${testcvs} add file3" \
6408 "${SPROG}"' add: scheduling file `file3'\'' for addition on branch `branch'\''
6409 '"${SPROG}"' add: use .'"${SPROG}"' commit. to add this file permanently'
6410 dotest death2-18
"${testcvs} -q commit -m add" \
6411 "$CVSROOT_DIRNAME/first-dir/Attic/file3,v <-- file3
6412 new revision: 1\.1\.2\.1; previous revision: 1\.1"
6414 # Test diff of a nonexistent tag
6415 dotest_fail death2-diff-9
"$testcvs -q diff -rtag -c file3" \
6416 "$SPROG diff: tag tag is not in file file3"
6418 dotest_fail death2-diff-10
"${testcvs} -q diff -rtag -N -c file3" \
6420 ===================================================================
6423 \*\*\* /dev/null ${RFCDATE_EPOCH}
6424 --- file3 ${RFCDATE} [0-9.]*
6425 \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*
6428 ${PLUS} first revision"
6430 dotest_fail death2-diff-11
"${testcvs} -q diff -rtag -c ." \
6432 ===================================================================
6433 RCS file: ${CVSROOT_DIRNAME}/first-dir/file1,v
6434 retrieving revision 1\.1
6435 retrieving revision 1\.1\.2\.2
6436 diff -c -r1\.1 -r1\.1\.2\.2
6437 \*\*\* file1 ${RFCDATE} [0-9.]*
6438 --- file1 ${RFCDATE} [0-9.]*
6439 \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*
6444 ${SPROG} diff: tag tag is not in file file2
6445 ${SPROG} diff: tag tag is not in file file3
6446 ${SPROG} diff: file4 no longer exists, no comparison available"
6448 dotest_fail death2-diff-12
"${testcvs} -q diff -rtag -c -N ." \
6450 ===================================================================
6451 RCS file: ${CVSROOT_DIRNAME}/first-dir/file1,v
6452 retrieving revision 1\.1
6453 retrieving revision 1\.1\.2\.2
6454 diff -c -r1\.1 -r1\.1\.2\.2
6455 \*\*\* file1 ${RFCDATE} [0-9.]*
6456 --- file1 ${RFCDATE} [0-9.]*
6457 \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*
6463 ===================================================================
6466 \*\*\* /dev/null ${RFCDATE_EPOCH}
6467 --- file2 ${RFCDATE} [0-9.]*
6468 \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*
6471 ${PLUS} branch revision
6473 ===================================================================
6476 \*\*\* /dev/null ${RFCDATE_EPOCH}
6477 --- file3 ${RFCDATE} [0-9.]*
6478 \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*
6481 ${PLUS} first revision
6483 ===================================================================
6486 \*\*\* file4 ${RFCDATE} [0-9.]*
6487 --- /dev/null ${RFCDATE_EPOCH}
6488 \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*
6490 - file4 first revision
6493 # Switch to the nonbranch tag.
6494 dotest death2-19
"${testcvs} -q update -r tag" \
6496 ${SPROG} update: \`file2' is no longer in the repository
6497 ${SPROG} update: \`file3' is no longer in the repository
6500 dotest_fail death2-20
"test -f file2"
6502 # Make sure diff only reports appropriate files.
6503 dotest_fail death2-diff-13
"${testcvs} -q diff -r rdiff-tag" \
6504 "${SPROG} diff: Tag rdiff-tag refers to a dead (removed) revision in file .file1.\.
6505 ${SPROG} diff: No comparison available\. Pass .-N. to .${SPROG} diff.${QUESTION}"
6507 dotest_fail death2-diff-14
"${testcvs} -q diff -r rdiff-tag -c -N" \
6509 ===================================================================
6512 \*\*\* /dev/null ${RFCDATE_EPOCH}
6513 --- file1 ${RFCDATE} [0-9.]*
6514 \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*
6517 ${PLUS} first revision"
6519 # now back to the trunk
6520 dotest death2-21
"${testcvs} -q update -A" \
6524 # test merging with a dead file
6525 dotest death2-22
"${testcvs} -q co first-dir" \
6531 dotest death2-23
"${testcvs} rm -f file4" \
6532 "${SPROG} remove: scheduling .file4. for removal
6533 ${SPROG} remove: use .${SPROG} commit. to remove this file permanently"
6534 dotest death2-24
"${testcvs} -q ci -m removed file4" \
6535 "$CVSROOT_DIRNAME/first-dir/file4,v <-- file4
6536 new revision: delete; previous revision: 1\.2"
6538 echo "new stuff" >file4
6539 dotest_fail death2-25
"${testcvs} up file4" \
6540 "${SPROG} update: conflict: \`file4' is modified but no longer in the repository
6546 modify_repo
rm -rf $CVSROOT_DIRNAME/first-dir
6553 # local CVS prints a warning message when update notices a missing
6554 # file and client/server CVS doesn't. These should be identical.
6555 mkdir rm-update-message
; cd rm-update-message
6556 modify_repo mkdir
$CVSROOT_DIRNAME/rm-update-message
6557 dotest rm-update-message-setup-1
"$testcvs -q co rm-update-message" ''
6558 cd rm-update-message
6561 dotest rm-update-message-setup-2
"$testcvs -q add $file" \
6562 "${SPROG} add: use .${SPROG} commit. to add this file permanently"
6563 dotest rm-update-message-setup-3
"$testcvs -q ci -mcreate $file" \
6564 "$CVSROOT_DIRNAME/rm-update-message/$file,v <-- $file
6565 initial revision: 1\.1"
6568 dotest rm-update-message-1
"$testcvs up $file" \
6569 "${SPROG} update: warning: \`$file' was lost
6574 rm -r rm-update-message
6575 modify_repo
rm -rf $CVSROOT_DIRNAME/rm-update-message
6581 # More tests of adding and removing files.
6582 # In particular ci -r.
6583 # Other ci -r tests:
6584 # * editor-9: checking in a modified file,
6585 # where "ci -r" means a branch.
6586 # * basica-8a1: checking in a modified file with numeric revision.
6587 # * basica-8a2: likewise.
6588 # * keywordlog-4: adding a new file with numeric revision.
6590 dotest rmadd-1
"$testcvs -q co -l ."
6592 dotest rmadd-2
"${testcvs} add first-dir" \
6593 "Directory ${CVSROOT_DIRNAME}/first-dir added to the repository"
6595 echo first file1
>file1
6596 dotest rmadd-3
"${testcvs} add file1" \
6597 "${SPROG} add: scheduling file .file1. for addition
6598 ${SPROG} add: use .${SPROG} commit. to add this file permanently"
6600 dotest_fail rmadd-4
"${testcvs} -q ci -r 1.2.2.4 -m add" \
6601 "${SPROG} commit: cannot add file .file1' with revision .1\.2\.2\.4'; must be on trunk
6602 ${SPROG} \[commit aborted\]: correct above errors first!"
6603 dotest_fail rmadd-5
"${testcvs} -q ci -r 1.2.2 -m add" \
6604 "${SPROG} commit: cannot add file .file1' with revision .1\.2\.2'; must be on trunk
6605 ${SPROG} \[commit aborted\]: correct above errors first!"
6606 dotest_fail rmadd-6
"$testcvs -q ci -r mybranch -m add" \
6607 "$SPROG \[commit aborted\]: no such tag \`mybranch'"
6609 # The thing with the trailing periods strikes me as a very
6610 # bizarre behavior, but it would seem to be intentional
6611 # (see commit.c). It probably could go away....
6612 dotest rmadd-7
"${testcvs} -q ci -r 7.... -m add" \
6613 "$CVSROOT_DIRNAME/first-dir/file1,v <-- file1
6614 initial revision: 7\.1"
6616 # I guess remote doesn't set a sticky tag in this case.
6617 # Kind of odd, in the sense that rmadd-24a does set one
6618 # both local and remote.
6619 dotest_fail rmadd-7a
"test -f CVS/Tag"
6622 dotest rmadd-7a
"cat CVS/Tag" "T7"
6625 dotest rmadd-8
"${testcvs} -q tag -b mybranch" "T file1"
6626 dotest rmadd-9
"${testcvs} -q tag mynonbranch" "T file1"
6629 # The previous "cvs ci -r" set a sticky tag of '7'. Seems a
6630 # bit odd, and I guess commit.c (findmaxrev) makes '7' sticky
6631 # tags unnecessary (?). I kind of suspect that it should be
6632 # saying "sticky tag is not a branch" like keywordlog-4b.
6634 dotest rmadd-10
"${testcvs} add file2" \
6635 "${SPROG} add: scheduling file .file2. for addition on branch .7'
6636 ${SPROG} add: use .${SPROG} commit. to add this file permanently"
6637 # As in the previous example, CVS is confused....
6638 dotest rmadd-11
"${testcvs} -q ci -m add" \
6639 "$CVSROOT_DIRNAME/first-dir/file2,v <-- file2
6640 initial revision: 7\.1"
6642 dotest rmadd-12
"${testcvs} -q update -A" ""
6644 dotest rmadd-13
"${testcvs} add file3" \
6645 "${SPROG} add: scheduling file .file3. for addition
6646 ${SPROG} add: use .${SPROG} commit. to add this file permanently"
6647 # Huh? file2 is not up to date? Seems buggy to me....
6648 dotest_fail rmadd-14
"${testcvs} -q ci -r mybranch -m add" \
6649 "${SPROG} commit: Up-to-date check failed for .file2'
6650 ${SPROG} \[commit aborted\]: correct above errors first!"
6651 # Whatever, let's not let file2 distract us....
6652 dotest rmadd-15
"${testcvs} -q ci -r mybranch -m add file3" \
6653 "$CVSROOT_DIRNAME/first-dir/Attic/file3,v <-- file3
6654 new revision: 1\.1\.2\.1; previous revision: 1\.1"
6657 dotest rmadd-16
"${testcvs} add file4" \
6658 "${SPROG} add: scheduling file .file4. for addition
6659 ${SPROG} add: use .${SPROG} commit. to add this file permanently"
6660 # Prior to CVS 1.12.10, this would fail with a, "no such tag" message
6661 # since val-tags used to be updated the first time the tag was used
6662 # rather than when it was created.
6664 # Try to make CVS write val-tags.
6665 if $proxy; then :; else
6666 # First remove the tag.
6667 grep -v mynonbranch
$CVSROOT_DIRNAME/CVSROOT
/val-tags \
6668 >$CVSROOT_DIRNAME/CVSROOT
/val-tags-tmp
6669 mv $CVSROOT_DIRNAME/CVSROOT
/val-tags-tmp \
6670 $CVSROOT_DIRNAME/CVSROOT
/val-tags
6672 dotest rmadd-18
"$testcvs -q update -p -r mynonbranch file1" \
6674 # Oops, -p suppresses writing val-tags (probably a questionable
6676 dotest_fail rmadd-19 \
6677 "$testcvs -q ci -r mynonbranch -m add file4" \
6678 "$SPROG \[commit aborted\]: no such tag \`mynonbranch'"
6679 # Now make CVS write val-tags for real.
6680 dotest rmadd-20
"$testcvs -q update -r mynonbranch file1"
6683 # Oops - CVS isn't distinguishing between a branch tag and
6686 "${testcvs} -q ci -r mynonbranch -m add file4" \
6687 "$CVSROOT_DIRNAME/first-dir/Attic/file4,v <-- file4
6688 new revision: 1\.1\.2\.1; previous revision: 1\.1"
6690 # OK, we add this one in a vanilla way, but then check in
6691 # a modification with ci -r and sniff around for sticky tags.
6693 dotest rmadd-22
"${testcvs} add file5" \
6694 "${SPROG} add: scheduling file .file5. for addition
6695 ${SPROG} add: use .${SPROG} commit. to add this file permanently"
6697 # Interesting bug (or missing feature) here. findmaxrev
6698 # gets the major revision from the Entries. Well, remote
6699 # doesn't send the entries for files which are not involved.
6700 dotest rmadd-23r
"${testcvs} -q ci -m add" \
6701 "$CVSROOT_DIRNAME/first-dir/file5,v <-- file5
6702 initial revision: 1\.1"
6703 dotest rmadd-23-workaroundr \
6704 "${testcvs} -q ci -r 7 -m bump-it file5" \
6705 "$CVSROOT_DIRNAME/first-dir/file5,v <-- file5
6706 new revision: 7\.1; previous revision: 1\.1"
6708 dotest rmadd-23
"${testcvs} -q ci -m add" \
6709 "$CVSROOT_DIRNAME/first-dir/file5,v <-- file5
6710 initial revision: 7\.1"
6712 echo change it
>file5
6713 dotest_fail rmadd-24
"$testcvs -q ci -r 4.8 -m change file5" \
6714 "$CVSROOT_DIRNAME/first-dir/file5,v <-- file5
6715 $SPROG commit: $CVSROOT_DIRNAME/first-dir/file5,v: revision 4\.8 too low; must be higher than 7\.1
6716 $SPROG commit: could not check in file5"
6717 dotest rmadd-24a
"${testcvs} -q ci -r 8.4 -m change file5" \
6718 "$CVSROOT_DIRNAME/first-dir/file5,v <-- file5
6719 new revision: 8\.4; previous revision: 7\.1"
6720 # I'm not really sure that a sticky tag make sense here.
6721 # It seems to be longstanding behavior for what that is worth.
6722 dotest rmadd-25
"${testcvs} status file5" \
6723 "===================================================================
6724 File: file5 Status: Up-to-date
6726 Working revision: 8\.4.*
6727 Repository revision: 8\.4 ${CVSROOT_DIRNAME}/first-dir/file5,v
6728 Commit Identifier: ${commitid}
6731 Sticky Options: (none)"
6733 # now try forced revision with recursion
6735 dotest rmadd-26
"${testcvs} -q add sub" \
6736 "Directory ${CVSROOT_DIRNAME}/first-dir/sub added to the repository"
6737 echo hello
>sub
/subfile
6738 dotest rmadd-27
"${testcvs} -q add sub/subfile" \
6739 "${SPROG} add: use .${SPROG} commit. to add this file permanently"
6741 dotest rmadd-28
"${testcvs} -q ci -m. sub" \
6742 "$CVSROOT_DIRNAME/first-dir/sub/subfile,v <-- sub/subfile
6743 initial revision: 1\.1"
6746 dotest rmadd-29
"${testcvs} -q up -A" \
6747 "${SPROG} update: \`file3' is no longer in the repository
6748 ${SPROG} update: \`file4' is no longer in the repository"
6750 # -f disables recursion
6751 dotest rmadd-30
"${testcvs} -q ci -f -r9 -m." \
6752 "$CVSROOT_DIRNAME/first-dir/file1,v <-- file1
6753 new revision: 9\.1; previous revision: 7\.1
6754 $CVSROOT_DIRNAME/first-dir/file2,v <-- file2
6755 new revision: 9\.1; previous revision: 7\.1
6756 $CVSROOT_DIRNAME/first-dir/file5,v <-- file5
6757 new revision: 9\.1; previous revision: 8\.4"
6759 # add -R to force recursion
6760 dotest rmadd-31
"${testcvs} -q ci -f -r9 -R -m." \
6761 "$CVSROOT_DIRNAME/first-dir/file1,v <-- file1
6762 new revision: 9\.2; previous revision: 9\.1
6763 $CVSROOT_DIRNAME/first-dir/file2,v <-- file2
6764 new revision: 9\.2; previous revision: 9\.1
6765 $CVSROOT_DIRNAME/first-dir/file5,v <-- file5
6766 new revision: 9\.2; previous revision: 9\.1
6767 $CVSROOT_DIRNAME/first-dir/sub/subfile,v <-- sub/subfile
6768 new revision: 9\.1; previous revision: 1\.1"
6771 # as noted above, remote doesn't set a sticky tag
6774 dotest rmadd-32
"cat CVS/Tag" "T9"
6775 dotest rmadd-33
"cat sub/CVS/Tag" "T9"
6781 modify_repo
rm -rf $CVSROOT_DIRNAME/first-dir
6787 # Tests of undoing commits, including in the presence of
6788 # adding and removing files. See join for a list of -j tests.
6790 dotest rmadd2-1
"${testcvs} -q co -l ." ''
6792 dotest rmadd2-2
"${testcvs} add first-dir" \
6793 "Directory ${CVSROOT_DIRNAME}/first-dir added to the repository"
6795 echo 'initial contents' >file1
6796 dotest rmadd2-3
"${testcvs} add file1" \
6797 "${SPROG} add: scheduling file .file1. for addition
6798 ${SPROG} add: use .${SPROG} commit. to add this file permanently"
6799 dotest rmadd2-4
"${testcvs} -q ci -m add" \
6800 "$CVSROOT_DIRNAME/first-dir/file1,v <-- file1
6801 initial revision: 1\.1"
6802 dotest rmadd2-4a
"${testcvs} -Q tag tagone" ""
6803 dotest rmadd2-5
"${testcvs} rm -f file1" \
6804 "${SPROG} remove: scheduling .file1. for removal
6805 ${SPROG} remove: use .${SPROG} commit. to remove this file permanently"
6806 dotest rmadd2-6
"${testcvs} -q ci -m remove" \
6807 "$CVSROOT_DIRNAME/first-dir/file1,v <-- file1
6808 new revision: delete; previous revision: 1\.1"
6809 dotest rmadd2-7
"$testcvs -q update -j 1.2 -j 1.1 file1" "U file1"
6810 dotest rmadd2-8
"${testcvs} -q ci -m readd" \
6811 "$CVSROOT_DIRNAME/first-dir/file1,v <-- file1
6812 new revision: 1\.3; previous revision: 1\.2"
6813 echo 'new contents' >file1
6814 dotest rmadd2-9
"${testcvs} -q ci -m modify" \
6815 "$CVSROOT_DIRNAME/first-dir/file1,v <-- file1
6816 new revision: 1\.4; previous revision: 1\.3"
6817 dotest rmadd2-10
"${testcvs} -q update -j 1.4 -j 1.3 file1" \
6818 "RCS file: ${CVSROOT_DIRNAME}/first-dir/file1,v
6819 retrieving revision 1\.4
6820 retrieving revision 1\.3
6821 Merging differences between 1\.4 and 1\.3 into file1"
6822 dotest rmadd2-11
"${testcvs} -q ci -m undo" \
6823 "$CVSROOT_DIRNAME/first-dir/file1,v <-- file1
6824 new revision: 1\.5; previous revision: 1\.4"
6825 dotest rmadd2-12
"cat file1" "initial contents"
6826 dotest rmadd2-13
"${testcvs} -q update -p -r 1.3" "initial contents"
6828 # Hmm, might be a bit odd that this works even if 1.3 is not
6830 dotest rmadd2-14
"${testcvs} -q update -j 1.3 -j 1.2 file1" \
6831 "${SPROG} update: scheduling \`file1' for removal"
6833 # Check that -p can get arbitrary revisions of a removed file
6834 dotest rmadd2-14a
"${testcvs} -q update -p" "initial contents"
6835 dotest rmadd2-14b
"${testcvs} -q update -p -r 1.5" "initial contents"
6836 dotest rmadd2-14c
"${testcvs} -q update -p -r 1.3" "initial contents"
6838 dotest rmadd2-15
"${testcvs} -q ci -m re-remove" \
6839 "$CVSROOT_DIRNAME/first-dir/file1,v <-- file1
6840 new revision: delete; previous revision: 1\.5"
6841 dotest rmadd2-16
"${testcvs} log -h file1" "
6842 RCS file: ${CVSROOT_DIRNAME}/first-dir/Attic/file1,v
6850 keyword substitution: kv
6852 ============================================================================="
6853 dotest rmadd2-17
"${testcvs} status -v file1" \
6854 "===================================================================
6855 File: no file file1 Status: Up-to-date
6857 Working revision: No entry for file1
6858 Repository revision: 1\.6 ${CVSROOT_DIRNAME}/first-dir/Attic/file1,v
6859 Commit Identifier: ${commitid}
6862 tagone (revision: 1.1)"
6867 modify_repo
rm -rf $CVSROOT_DIRNAME/first-dir
6873 # This test demonstrates that CVS notices that file1 exists rather
6874 # that deleting or writing over it after:
6876 # cvs remove -f file1; touch file1; cvs add file1.
6878 # According to the manual, this should work for:
6880 # rm file1; cvs remove file1; cvs add file1
6882 # but in past version of CVS, new content in file1 would be
6883 # erroneously deleted when file1 reappeared between the remove and
6886 # Later versions of CVS would refuse to perform the add, but still
6887 # allow a subsequent local commit to erase the file from the
6888 # workspace, possibly losing data.
6890 dotest rmadd3-init1
"${testcvs} -q co -l ." ''
6892 dotest rmadd3-init2
"${testcvs} add first-dir" \
6893 "Directory ${CVSROOT_DIRNAME}/first-dir added to the repository"
6896 echo initial content
for file1
>file1
6897 dotest rmadd3-init3
"${testcvs} add file1" \
6898 "${SPROG} add: scheduling file \`file1' for addition
6899 ${SPROG} add: use \`${SPROG} commit' to add this file permanently"
6900 dotest rmadd3-init4
"${testcvs} -q ci -m add" \
6901 "$CVSROOT_DIRNAME/first-dir/file1,v <-- file1
6902 initial revision: 1\.1"
6904 # Here begins the guts of this test, as detailed above.
6905 dotest rmadd3-1
"${testcvs} rm -f file1" \
6906 "${SPROG} remove: scheduling \`file1' for removal
6907 ${SPROG} remove: use \`${SPROG} commit' to remove this file permanently"
6909 # Now recreate the file:
6910 echo desired future contents
for file1
>file1
6912 # And attempt to resurrect it at the same time:
6913 dotest_fail rmadd3-2
"${testcvs} add file1" \
6914 "${SPROG} add: \`file1' should be removed and is still there (or is back again)"
6916 # Now prove that commit knows that it shouldn't erase files.
6917 dotest_fail rmadd3-3
"${testcvs} -q ci -m." \
6918 "$CPROG commit: \`file1' should be removed and is still there (or is back again)
6919 $CPROG \[commit aborted\]: correct above errors first!"
6921 # Then these should pass too:
6922 dotest rmadd3-4
"test -f file1"
6923 dotest rmadd3-5
"cat file1" "desired future contents for file1"
6926 echo Keeping
${TESTDIR} and exiting due to
--keep
6933 modify_repo
rm -rf $CVSROOT_DIRNAME/first-dir
6939 # This test tests a few file resurrection scenarios.
6941 dotest resurrection-init1
"$testcvs -q co -l ." ''
6943 dotest resurrection-init2
"$testcvs add first-dir" \
6944 "Directory $CVSROOT_DIRNAME/first-dir added to the repository"
6947 echo initial content
for file1
>file1
6948 dotest resurrection-init3
"$testcvs add file1" \
6949 "$SPROG add: scheduling file \`file1' for addition
6950 $SPROG add: use \`$SPROG commit' to add this file permanently"
6951 dotest resurrection-init4
"$testcvs -q ci -m add" \
6952 "$CVSROOT_DIRNAME/first-dir/file1,v <-- file1
6953 initial revision: 1\.1"
6955 dotest resurrection-init5
"$testcvs -Q rm -f file1"
6957 # The first test is that `cvs add' will resurrect a file before its
6958 # removal has been committed.
6959 dotest_sort resurrection-1
"$testcvs add file1" \
6961 $SPROG add: \`file1', version 1\.1, resurrected"
6962 dotest resurrection-2
"$testcvs -Q diff file1" ""
6964 dotest resurrection-init6
"$testcvs -Q tag -b resurrection"
6965 dotest resurrection-init7
"$testcvs -Q rm -f file1"
6966 dotest resurrection-init8
"$testcvs -Q ci -mrm"
6968 # The next test is that CVS will resurrect a committed removal.
6969 dotest_sort resurrection-3
"$testcvs add file1" \
6971 $SPROG add: Re-adding file \`file1' after dead revision 1\.2\.
6972 $SPROG add: Resurrecting file \`file1' from revision 1\.1\.
6973 $SPROG add: use \`$SPROG commit' to add this file permanently"
6974 dotest resurrection-4
"$testcvs -q diff -r1.1 file1" ""
6975 dotest resurrection-5
"$testcvs -q ci -mreadd" \
6976 "$CVSROOT_DIRNAME/first-dir/file1,v <-- file1
6977 new revision: 1\.3; previous revision: 1\.2"
6979 dotest resurrection-init9
"$testcvs -Q up -rresurrection"
6980 dotest resurrection-init10
"$testcvs -Q rm -f file1"
6981 dotest resurrection-init11
"$testcvs -Q ci -mrm-on-resurrection"
6983 # The next test is that CVS will resurrect a committed removal to a
6985 dotest_sort resurrection-6
"$testcvs -r add file1" \
6987 $SPROG add: Re-adding file \`file1' on branch \`resurrection' after dead revision 1\.1\.2\.1\.
6988 $SPROG add: Resurrecting file \`file1' from revision 1\.1\.
6989 $SPROG add: use \`$SPROG commit' to add this file permanently"
6990 # If the file is modified, it had better be read-write
6991 # regardless of what the user has requested with the CVSREAD
6992 # environment variable or the global -r switch
6993 dotest resurrection-6b
'test -w file1' ''
6994 dotest resurrection-7
"$testcvs -Q diff -r1.1 file1" ""
6995 dotest resurrection-8
"$testcvs -q ci -mreadd" \
6996 "$CVSROOT_DIRNAME/first-dir/file1,v <-- file1
6997 new revision: 1\.1\.2\.2; previous revision: 1\.1\.2\.1"
6999 # The next few tests verify that an attempted resurrection of a file
7000 # with no previous revision on the trunk fails.
7002 dotest resurrection-9
"$testcvs -Q add file2"
7003 dotest resurrection-10
"$testcvs -Q ci -mnew-file2"
7004 dotest resurrection-11
"$testcvs -Q up -A"
7006 # This command once caused an assertion failure.
7007 dotest resurrection-12
"$testcvs add file2" \
7008 "$SPROG add: File \`file2' has no previous revision to resurrect\."
7010 # Check what 'cvs -r add' does with resurrected files.
7011 dotest resurrection-13
"$testcvs -Q rm -f file1"
7012 dotest_sort resurrection-14
"$testcvs -r add file1" \
7014 $SPROG add: \`file1', version 1\.3, resurrected"
7015 dotest_fail resurrection-15
'test -w file1' ''
7020 modify_repo
rm -rf $CVSROOT_DIRNAME/first-dir
7026 # Tests related to removing and adding directories.
7028 # conflicts (especially dir1 in conflicts-130): What happens if
7029 # directory exists in repository and a non-CVS-controlled
7030 # directory in the working directory?
7031 # conflicts3-15. More cases, especially where CVS directory
7032 # exists but without CVS/Repository and friends.
7033 # conflicts3-22. Similar to conflicts-130 but there is a file
7035 # dirs2. Sort of similar to conflicts3-22 but somewhat different.
7036 mkdir imp-dir
; cd imp-dir
7039 echo sfile
>sdir
/sfile
7040 dotest_sort dirs-1 \
7041 "${testcvs} import -m import-it dir1 vend rel" "
7045 No conflicts created by this import
7046 ${SPROG} import: Importing ${CVSROOT_DIRNAME}/dir1/sdir"
7050 dotest dirs-2
"$testcvs -Q co dir1" ""
7052 # Various CVS administrators are in the habit of removing
7053 # the repository directory for things they don't want any
7054 # more. I've even been known to do it myself (on rare
7055 # occasions). Not the usual recommended practice, but we want
7056 # to try to come up with some kind of reasonable/documented/sensible
7058 modify_repo
rm -rf $CVSROOT_DIRNAME/dir
1/sdir
7060 dotest dirs-3
"${testcvs} update" \
7061 "${SPROG} update: Updating dir1
7062 ${SPROG} update: Updating dir1/sdir
7063 ${SPROG} update: cannot open directory ${CVSROOT_DIRNAME}/dir1/sdir: No such file or directory
7064 ${SPROG} update: skipping directory dir1/sdir"
7065 dotest dirs-3a
"${testcvs} update -d" \
7066 "${SPROG} update: Updating dir1
7067 ${SPROG} update: Updating dir1/sdir
7068 ${SPROG} update: cannot open directory ${CVSROOT_DIRNAME}/dir1/sdir: No such file or directory
7069 ${SPROG} update: skipping directory dir1/sdir"
7071 # If we say "yes", then CVS gives errors about not being able to
7072 # create lock files.
7073 # The fact that it says "skipping directory " rather than
7074 # "skipping directory dir1/sdir" is some kind of bug.
7075 dotest dirs-4
"echo no | ${testcvs} release -d dir1/sdir" \
7076 "${SPROG} update: cannot open directory ${CVSROOT_DIRNAME}/dir1/sdir: No such file or directory
7077 ${SPROG} update: skipping directory
7078 You have \[0\] altered files in this repository\.
7079 Are you sure you want to release (and delete) directory .dir1/sdir': .. .release' aborted by user choice."
7081 # OK, if "cvs release" won't help, we'll try it the other way...
7084 dotest dirs-5
"cat dir1/CVS/Entries" \
7085 "/file1/1.1.1.1/[a-zA-Z0-9 :]*//
7087 dotest dirs-6
"${testcvs} update" "${SPROG} update: Updating dir1"
7088 dotest dirs-7
"cat dir1/CVS/Entries" \
7089 "/file1/1.1.1.1/[a-zA-Z0-9 :]*//
7091 dotest dirs-8
"${testcvs} update -d dir1" \
7092 "${SPROG} update: Updating dir1"
7097 modify_repo
rm -rf $CVSROOT_DIRNAME/dir1
7103 # See "dirs" for a list of tests involving adding and
7104 # removing directories.
7106 dotest dirs2-1
"$testcvs -q co -l ."
7108 dotest dirs2-2
"${testcvs} add first-dir" \
7109 "Directory ${CVSROOT_DIRNAME}/first-dir added to the repository"
7112 dotest dirs2-3
"${testcvs} add sdir" \
7113 "Directory ${CVSROOT_DIRNAME}/first-dir/sdir added to the repository"
7115 dotest dirs2-4
"${testcvs} add sdir/file1" \
7116 "${SPROG} add: scheduling file .sdir/file1. for addition
7117 ${SPROG} add: use .${SPROG} commit. to add this file permanently"
7118 dotest dirs2-5
"${testcvs} -q ci -m add" \
7119 "$CVSROOT_DIRNAME/first-dir/sdir/file1,v <-- sdir/file1
7120 initial revision: 1\.1"
7123 # This is just like conflicts3-23
7124 dotest_fail dirs2-6r
"${testcvs} update -d" \
7126 ${SPROG} update: Updating \.
7127 ${SPROG} update: Updating sdir
7128 ${CPROG} update: move away \`sdir/file1'; it is in the way
7133 # This is where things are not just like conflicts3-23
7134 dotest dirs2-7r
"${testcvs} update -d" \
7136 ${SPROG} update: Updating \.
7137 ${SPROG} update: Updating sdir
7140 dotest dirs2-6
"${testcvs} update -d" \
7141 "${CPROG} update: Updating \.
7144 dotest dirs2-7
"${testcvs} update -d" \
7145 "${CPROG} update: Updating \.
7150 # Now, the same thing (more or less) on a branch.
7152 dotest dirs2-8
"${testcvs} -q co first-dir" 'U first-dir/sdir/file1'
7154 dotest dirs2-9
"${testcvs} -q tag -b br" "T sdir/file1"
7158 # val-tags used to have a cute little quirk; if an update didn't
7159 # recurse into the directories where the tag is defined, val-tags
7160 # wouldn't get updated. This is no longer a problem as of 1.12.10.
7161 dotest_fail dirs2-10-againr
"$testcvs update -d -r br" \
7163 $SPROG update: Updating \.
7164 $SPROG update: Updating sdir
7165 $CPROG update: move away \`sdir/file1'; it is in the way
7168 dotest dirs2-10
"${testcvs} update -d -r br" \
7169 "$SPROG update: Updating \.
7171 # This is what used to happen. I'm not sure why it changed with 1.12.10, but
7172 # as near as I can tell from the comments in update_direntproc, the new
7173 # behavior was the intended behavior.
7174 #"$CPROG update: in directory \`sdir':
7175 #$CPROG \[update aborted\]: there is no version here; do \`$CPROG checkout' first"
7179 # OK, the above tests make the situation somewhat harder
7180 # than it might be, in the sense that they actually have a
7181 # file which is alive on the branch we are updating. Let's
7182 # try it where it is just a directory where all the files
7183 # have been removed.
7185 dotest dirs2-11
"${testcvs} -q co -r br first-dir" \
7186 "U first-dir/sdir/file1"
7188 # Hmm, this doesn't mention the branch like add does. That's
7189 # an odd non-orthogonality.
7190 dotest dirs2-12
"${testcvs} rm -f sdir/file1" \
7191 "${SPROG} remove: scheduling .sdir/file1. for removal
7192 ${SPROG} remove: use .${SPROG} commit. to remove this file permanently"
7193 dotest dirs2-13
"${testcvs} -q ci -m remove" \
7194 "$CVSROOT_DIRNAME/first-dir/sdir/file1,v <-- sdir/file1
7195 new revision: delete; previous revision: 1\.1"
7196 cd ..
/..
/2/first-dir
7198 dotest dirs2-14
"${testcvs} update -d -r br" \
7199 "${QUESTION} sdir/file1
7200 ${SPROG} update: Updating \.
7201 ${SPROG} update: Updating sdir"
7203 dotest dirs2-14
"${testcvs} update -d -r br" \
7204 "${CPROG} update: Updating \.
7211 modify_repo
rm -rf $CVSROOT_DIRNAME/first-dir
7217 # More branch tests, including branches off of branches
7218 modify_repo mkdir
$CVSROOT_DIRNAME/first-dir
7219 dotest branches-1
"$testcvs -q co first-dir"
7221 echo 1:ancest
>file1
7222 echo 2:ancest
>file2
7223 echo 3:ancest
>file3
7224 echo 4:trunk-1
>file4
7225 dotest branches-2
"${testcvs} add file1 file2 file3 file4" \
7226 "$SPROG add: scheduling file \`file1' for addition
7227 $SPROG add: scheduling file \`file2' for addition
7228 $SPROG add: scheduling file \`file3' for addition
7229 $SPROG add: scheduling file \`file4' for addition
7230 $SPROG add: use .$SPROG commit. to add these files permanently"
7231 dotest branches-2a
"$testcvs -n -q ci -m dont-commit"
7232 dotest_lit branches-3
"$testcvs -q ci -m add-it" <<HERE
7233 $CVSROOT_DIRNAME/first-dir/file1,v <-- file1
7234 initial revision: 1.1
7235 $CVSROOT_DIRNAME/first-dir/file2,v <-- file2
7236 initial revision: 1.1
7237 ${CVSROOT_DIRNAME}/first-dir/file3,v <-- file3
7238 initial revision: 1.1
7239 ${CVSROOT_DIRNAME}/first-dir/file4,v <-- file4
7240 initial revision: 1.1
7242 echo 4:trunk-2
>file4
7243 dotest branches-3.2
"${testcvs} -q ci -m trunk-before-branch" \
7244 "$CVSROOT_DIRNAME/first-dir/file4,v <-- file4
7245 new revision: 1\.2; previous revision: 1\.1"
7246 # The "cvs log file4" in test branches-14.3 will test that we
7247 # didn't really add the tag.
7248 dotest branches-3.3
"${testcvs} -qn tag dont-tag" \
7253 # Modify this file before branching, to deal with the case where
7254 # someone is hacking along, says "oops, I should be doing this on
7255 # a branch", and only then creates the branch.
7257 dotest branches-4
"${testcvs} tag -b br1" "${SPROG}"' tag: Tagging \.
7262 dotest branches-5
"${testcvs} update -r br1" \
7263 "${SPROG} update: Updating \.
7267 dotest branches-6
"${testcvs} -q ci -m modify" \
7268 "$CVSROOT_DIRNAME/first-dir/file1,v <-- file1
7269 new revision: 1\.1\.2\.1; previous revision: 1\.1
7270 $CVSROOT_DIRNAME/first-dir/file2,v <-- file2
7271 new revision: 1\.1\.2\.1; previous revision: 1\.1
7272 $CVSROOT_DIRNAME/first-dir/file4,v <-- file4
7273 new revision: 1\.2\.2\.1; previous revision: 1\.2"
7274 dotest branches-7
"${testcvs} -q tag -b brbr" 'T file1
7278 dotest branches-8
"${testcvs} -q update -r brbr" ''
7281 dotest branches-9
"${testcvs} -q ci -m modify" \
7282 "$CVSROOT_DIRNAME/first-dir/file1,v <-- file1
7283 new revision: 1\.1\.2\.1\.2\.1; previous revision: 1\.1\.2\.1
7284 $CVSROOT_DIRNAME/first-dir/file4,v <-- file4
7285 new revision: 1\.2\.2\.1\.2\.1; previous revision: 1\.2\.2\.1"
7286 dotest branches-10
"cat file1 file2 file3 file4" '1:brbr
7290 dotest branches-11
"${testcvs} -q update -r br1" \
7293 dotest branches-12
"cat file1 file2 file3 file4" '1:br1
7298 dotest branches-12.2
"${testcvs} -q ci -m change-on-br1" \
7299 "$CVSROOT_DIRNAME/first-dir/file4,v <-- file4
7300 new revision: 1\.2\.2\.2; previous revision: 1\.2\.2\.1"
7301 dotest branches-13
"${testcvs} -q update -A" '[UP] file1
7304 dotest branches-14
"cat file1 file2 file3 file4" '1:ancest
7308 echo 4:trunk-3
>file4
7309 dotest branches-14.2 \
7310 "${testcvs} -q ci -m trunk-change-after-branch" \
7311 "$CVSROOT_DIRNAME/first-dir/file4,v <-- file4
7312 new revision: 1\.3; previous revision: 1\.2"
7313 dotest branches-14.3
"${testcvs} log file4" \
7315 RCS file: ${CVSROOT_DIRNAME}/first-dir/file4,v
7322 brbr: 1\.2\.2\.1\.0\.2
7324 keyword substitution: kv
7325 total revisions: 6; selected revisions: 6
7327 ----------------------------
7329 date: ${ISO8601DATE}; author: ${username}; state: Exp; lines: ${PLUS}1 -1; commitid: ${commitid};
7330 trunk-change-after-branch
7331 ----------------------------
7333 date: ${ISO8601DATE}; author: ${username}; state: Exp; lines: ${PLUS}1 -1; commitid: ${commitid};
7336 ----------------------------
7338 date: ${ISO8601DATE}; author: ${username}; state: Exp; commitid: ${commitid};
7340 ----------------------------
7342 date: ${ISO8601DATE}; author: ${username}; state: Exp; lines: ${PLUS}1 -1; commitid: ${commitid};
7344 ----------------------------
7346 date: ${ISO8601DATE}; author: ${username}; state: Exp; lines: ${PLUS}1 -1; commitid: ${commitid};
7347 branches: 1\.2\.2\.1\.2;
7349 ----------------------------
7350 revision 1\.2\.2\.1\.2\.1
7351 date: ${ISO8601DATE}; author: ${username}; state: Exp; lines: ${PLUS}1 -1; commitid: ${commitid};
7353 ============================================================================="
7354 dotest_fail branches-14.4 \
7355 "${testcvs} diff -c -r 1.1 -r 1.3 file4" \
7357 ===================================================================
7358 RCS file: ${CVSROOT_DIRNAME}/first-dir/file4,v
7359 retrieving revision 1\.1
7360 retrieving revision 1\.3
7361 diff -c -r1\.1 -r1\.3
7362 \*\*\* file4 ${RFCDATE} 1\.1
7363 --- file4 ${RFCDATE} 1\.3
7364 \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*
7369 dotest_fail branches-14.5 \
7370 "${testcvs} diff -c -r 1.1 -r 1.2.2.1 file4" \
7372 ===================================================================
7373 RCS file: ${CVSROOT_DIRNAME}/first-dir/file4,v
7374 retrieving revision 1\.1
7375 retrieving revision 1\.2\.2\.1
7376 diff -c -r1\.1 -r1\.2\.2\.1
7377 \*\*\* file4 ${RFCDATE} 1\.1
7378 --- file4 ${RFCDATE} 1\.2\.2\.1
7379 \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*
7384 dotest branches-15 \
7385 "${testcvs} update -j 1.1.2.1 -j 1.1.2.1.2.1 file1" \
7386 "RCS file: ${CVSROOT_DIRNAME}/first-dir/file1,v
7387 retrieving revision 1\.1\.2\.1
7388 retrieving revision 1\.1\.2\.1\.2\.1
7389 Merging differences between 1\.1\.2\.1 and 1\.1\.2\.1\.2\.1 into file1
7390 rcsmerge: warning: conflicts during merge"
7391 dotest branches-16
"cat file1" '<<<<<<< file1
7395 [>]>>>>>> 1\.1\.2\.1\.2\.1'
7397 dotest branches-o1
"${testcvs} -q admin -o ::brbr" \
7398 "RCS file: ${CVSROOT_DIRNAME}/first-dir/file1,v
7400 RCS file: ${CVSROOT_DIRNAME}/first-dir/file2,v
7402 RCS file: ${CVSROOT_DIRNAME}/first-dir/file3,v
7404 RCS file: ${CVSROOT_DIRNAME}/first-dir/file4,v
7409 modify_repo
rm -rf $CVSROOT_DIRNAME/first-dir
7416 # More branch tests.
7417 # Test that when updating a new subdirectory in a directory
7418 # which was checked out on a branch, the new subdirectory is
7419 # created on the appropriate branch. Test this when joining
7422 modify_repo mkdir
$CVSROOT_DIRNAME/first-dir
7423 mkdir trunk
; cd trunk
7426 dotest branches2-1
"${testcvs} -q co first-dir"
7428 echo "file1 first revision" > file1
7429 dotest branches2-2
"${testcvs} add file1" \
7430 "${SPROG} add: scheduling file .file1. for addition
7431 ${SPROG} add: use .${SPROG} commit. to add this file permanently"
7432 dotest branches2-3
"${testcvs} commit -m add file1" \
7433 "${CVSROOT_DIRNAME}/first-dir/file1,v <-- file1
7434 initial revision: 1\.1"
7437 dotest branches2-4
"${testcvs} -q tag tag1" 'T file1'
7439 # Make two branches.
7440 dotest branches2-5
"${testcvs} -q rtag -b -r tag1 b1 first-dir" ''
7441 dotest branches2-6
"${testcvs} -q rtag -b -r tag1 b2 first-dir" ''
7443 # Create some files and a subdirectory on branch b1.
7446 dotest branches2-7
"${testcvs} -q co -r b1 first-dir" \
7449 echo "file2 first revision" > file2
7450 dotest branches2-8
"${testcvs} add file2" \
7451 "${SPROG}"' add: scheduling file `file2'\'' for addition on branch `b1'\''
7452 '"${SPROG}"' add: use .'"${SPROG}"' commit. to add this file permanently'
7454 dotest branches2-9
"${testcvs} add dir1" \
7455 "Directory ${CVSROOT_DIRNAME}/first-dir/dir1 added to the repository
7456 --> Using per-directory sticky tag "'`'"b1'"
7457 echo "file3 first revision" > dir
1/file3
7458 dotest branches2-10
"${testcvs} add dir1/file3" \
7459 "${SPROG}"' add: scheduling file `dir1/file3'\'' for addition on branch `b1'\''
7460 '"${SPROG}"' add: use .'"${SPROG}"' commit. to add this file permanently'
7461 dotest branches2-11
"${testcvs} -q ci -madd ." \
7462 "$CVSROOT_DIRNAME/first-dir/Attic/file2,v <-- file2
7463 new revision: 1\.1\.2\.1; previous revision: 1\.1
7464 $CVSROOT_DIRNAME/first-dir/dir1/Attic/file3,v <-- dir1/file3
7465 new revision: 1\.1\.2\.1; previous revision: 1\.1"
7467 # Check out the second branch, and update the working
7468 # directory to the first branch, to make sure the right
7469 # happens with dir1.
7472 dotest branches2-12
"${testcvs} -q co -r b2 first-dir" \
7475 dotest branches2-13
"${testcvs} update -d -r b1 dir1" \
7476 "${SPROG} update: Updating dir1
7478 dotest branches2-14
"${testcvs} -q status" \
7479 "===================================================================
7480 File: file1 Status: Up-to-date
7482 Working revision: 1\.1.*
7483 Repository revision: 1\.1 ${CVSROOT_DIRNAME}/first-dir/file1,v
7484 Commit Identifier: ${commitid}
7485 Sticky Tag: b2 (branch: 1\.1\.4)
7487 Sticky Options: (none)
7489 ===================================================================
7490 File: file3 Status: Up-to-date
7492 Working revision: 1\.1\.2\.1.*
7493 Repository revision: 1\.1\.2\.1 ${CVSROOT_DIRNAME}/first-dir/dir1/Attic/file3,v
7494 Commit Identifier: ${commitid}
7495 Sticky Tag: b1 (branch: 1\.1\.2)
7497 Sticky Options: (none)"
7499 # Test some calls to rls here because we can. These should probably
7500 # be somewhere else, but we already have some directories set up.
7501 dotest branches2-14-rls-1
"$testcvs rls" \
7502 "$SPROG rls: Listing module: \`.'
7505 dotest branches2-14-rls-2
"$testcvs rls -R" \
7506 "$SPROG rls: Listing module: \`.'
7536 dotest branches2-14-rls-3
"$testcvs rls -l -R" \
7537 "$SPROG rls: Listing module: \`.'
7539 d--- $ISO8601DATE CVSROOT
7540 d--- $ISO8601DATE first-dir
7543 ---- $ISO8601DATE 1\.[0-9][0-9]* checkoutlist
7544 ---- $ISO8601DATE 1\.[0-9][0-9]* commitinfo
7545 ---- $ISO8601DATE 1\.[0-9][0-9]* config
7546 ---- $ISO8601DATE 1\.[0-9][0-9]* cvswrappers
7547 ---- $ISO8601DATE 1\.[0-9][0-9]* loginfo
7548 ---- $ISO8601DATE 1\.[0-9][0-9]* modules
7549 ---- $ISO8601DATE 1\.[0-9][0-9]* notify
7550 ---- $ISO8601DATE 1\.[0-9][0-9]* postadmin
7551 ---- $ISO8601DATE 1\.[0-9][0-9]* postproxy
7552 ---- $ISO8601DATE 1\.[0-9][0-9]* posttag
7553 ---- $ISO8601DATE 1\.[0-9][0-9]* postwatch
7554 ---- $ISO8601DATE 1\.[0-9][0-9]* preproxy
7555 ---- $ISO8601DATE 1\.[0-9][0-9]* rcsinfo
7556 ---- $ISO8601DATE 1\.[0-9][0-9]* taginfo
7557 ---- $ISO8601DATE 1\.[0-9][0-9]* verifymsg
7558 d--- $ISO8601DATE Emptydir
7563 ---- $ISO8601DATE 1\.1 file1
7564 d--- $ISO8601DATE dir1
7567 dotest branches2-14-rls-4
"$testcvs rls -eR" \
7568 "$SPROG rls: Listing module: \`.'
7574 /checkoutlist/1\.[0-9][0-9]*/$DATE//
7575 /commitinfo/1\.[0-9][0-9]*/$DATE//
7576 /config/1\.[0-9][0-9]*/$DATE//
7577 /cvswrappers/1\.[0-9][0-9]*/$DATE//
7578 /loginfo/1\.[0-9][0-9]*/$DATE//
7579 /modules/1\.[0-9][0-9]*/$DATE//
7580 /notify/1\.[0-9][0-9]*/$DATE//
7581 /postadmin/1\.[0-9][0-9]*/$DATE//
7582 /postproxy/1\.[0-9][0-9]*/$DATE//
7583 /posttag/1\.[0-9][0-9]*/$DATE//
7584 /postwatch/1\.[0-9][0-9]*/$DATE//
7585 /preproxy/1\.[0-9][0-9]*/$DATE//
7586 /rcsinfo/1\.[0-9][0-9]*/$DATE//
7587 /taginfo/1\.[0-9][0-9]*/$DATE//
7588 /verifymsg/1\.[0-9][0-9]*/$DATE//
7598 dotest branches2-14-rls-5
"$testcvs -q rls -R" \
7628 dotest branches2-14-rls-6
"$testcvs -q rls -lRrb1" \
7630 d--- $ISO8601DATE CVSROOT
7631 d--- $ISO8601DATE first-dir
7634 d--- $ISO8601DATE Emptydir
7639 ---- $ISO8601DATE 1\.1 file1
7640 ---- $ISO8601DATE 1\.1\.2\.1 file2
7641 d--- $ISO8601DATE dir1
7644 ---- $ISO8601DATE 1\.1\.2\.1 file3"
7645 dotest branches2-14-rls-7
"$testcvs -q rls -lRrb2" \
7647 d--- $ISO8601DATE CVSROOT
7648 d--- $ISO8601DATE first-dir
7651 d--- $ISO8601DATE Emptydir
7656 ---- $ISO8601DATE 1\.1 file1
7657 d--- $ISO8601DATE dir1
7661 # Now some calls to ls. These are more appropriate here.
7662 dotest branches2-14-ls-1
"$testcvs ls" \
7665 dotest branches2-14-ls-2
"$testcvs ls -e" \
7666 "/file1/1\.1/$DATE//
7668 dotest branches2-14-ls-3
"$testcvs ls -R" \
7675 dotest branches2-14-ls-4
"$testcvs ls -eRrHEAD" \
7677 /file1/1\.1/$DATE//THEAD
7681 dotest branches2-14-ls-5
"$testcvs ls -eRrb1" \
7683 /file1/1\.1/$DATE//Tb1
7684 /file2/1\.1\.2\.1/$DATE//Tb1
7688 /file3/1\.1\.2\.1/$DATE//Tb1"
7689 dotest branches2-14-ls-6
"$testcvs ls -eRrb2" \
7691 /file1/1.1/$DATE//Tb2
7695 # Nonexistant tags used to cause assertion failures.
7696 dotest_fail branches2-14-ls-7
"$testcvs ls -eRrnosuchtag" \
7697 "$SPROG \[ls aborted\]: no such tag \`nosuchtag'"
7699 # FIXME: Just clobbering the directory like this is a bit
7700 # tacky, although people generally expect it to work. Maybe
7701 # we should release it instead. We do it a few other places
7704 dotest branches2-15
"${testcvs} update -d -j b1 dir1" \
7705 "${SPROG} update: Updating dir1
7707 # FIXCVS: The `No revision control file' stuff seems to be
7708 # CVS's way of telling us that we're adding the file on a
7709 # branch, and the file is not on that branch yet. This
7711 dotest branches2-16
"${testcvs} -q status" \
7712 "===================================================================
7713 File: file1 Status: Up-to-date
7715 Working revision: 1\.1.*
7716 Repository revision: 1\.1 ${CVSROOT_DIRNAME}/first-dir/file1,v
7717 Commit Identifier: ${commitid}
7718 Sticky Tag: b2 (branch: 1\.1\.4)
7720 Sticky Options: (none)
7722 ===================================================================
7723 File: file3 Status: Locally Added
7725 Working revision: New file!
7726 Repository revision: No revision control file
7727 Sticky Tag: b2 - MISSING from RCS file!
7729 Sticky Options: (none)"
7731 cd ..
/..
/trunk
/first-dir
7732 dotest branches2-17
"${testcvs} update -d -P dir1" \
7733 "${SPROG} update: Updating dir1"
7734 dotest_fail branches2-18
"test -d dir1"
7735 dotest branches2-19
"${testcvs} update -d -P -r b1 dir1" \
7736 "${SPROG} update: Updating dir1
7738 dotest branches2-20
"${testcvs} -q status" \
7739 "===================================================================
7740 File: file1 Status: Up-to-date
7742 Working revision: 1\.1.*
7743 Repository revision: 1\.1 ${CVSROOT_DIRNAME}/first-dir/file1,v
7744 Commit Identifier: ${commitid}
7747 Sticky Options: (none)
7749 ===================================================================
7750 File: file3 Status: Up-to-date
7752 Working revision: 1\.1\.2\.1.*
7753 Repository revision: 1\.1\.2\.1 ${CVSROOT_DIRNAME}/first-dir/dir1/Attic/file3,v
7754 Commit Identifier: ${commitid}
7755 Sticky Tag: b1 (branch: 1\.1\.2)
7757 Sticky Options: (none)"
7760 dotest branches2-21
"${testcvs} update -d -P -j b1 dir1" \
7761 "${SPROG} update: Updating dir1
7763 dotest branches2-22
"${testcvs} -q status" \
7764 "===================================================================
7765 File: file1 Status: Up-to-date
7767 Working revision: 1\.1.*
7768 Repository revision: 1\.1 ${CVSROOT_DIRNAME}/first-dir/file1,v
7769 Commit Identifier: ${commitid}
7772 Sticky Options: (none)
7774 ===================================================================
7775 File: file3 Status: Locally Added
7777 Working revision: New file!
7778 Repository revision: 1\.1 ${CVSROOT_DIRNAME}/first-dir/dir1/Attic/file3,v
7779 Commit Identifier: ${commitid}
7782 Sticky Options: (none)"
7787 # Check out branch b1 twice. Crate a new directory in one
7788 # working directory, then do a cvs update in the other
7789 # working directory and see if the tags are right.
7793 dotest branches2-23
"${testcvs} -q co -r b1 first-dir" \
7796 U first-dir/dir1/file3'
7798 dotest branches2-24
"${testcvs} -q co -r b1 first-dir" \
7801 U first-dir/dir1/file3'
7804 dotest branches2-25
"${testcvs} add dir2" \
7805 "Directory ${CVSROOT_DIRNAME}/first-dir/dir2 added to the repository
7806 --> Using per-directory sticky tag "'`'"b1'"
7807 echo "file4 first revision" > dir
2/file4
7808 dotest branches2-26
"${testcvs} add dir2/file4" \
7809 "${SPROG}"' add: scheduling file `dir2/file4'\'' for addition on branch `b1'\''
7810 '"${SPROG}"' add: use .'"${SPROG}"' commit. to add this file permanently'
7811 dotest branches2-27
"${testcvs} -q commit -madd" \
7812 "$CVSROOT_DIRNAME/first-dir/dir2/Attic/file4,v <-- dir2/file4
7813 new revision: 1\.1\.2\.1; previous revision: 1\.1"
7815 cd ..
/..
/b1b
/first-dir
7816 dotest branches2-28
"${testcvs} update -d dir2" \
7817 "${SPROG} update: Updating dir2
7820 dotest branches2-29
"${testcvs} -q status" \
7821 "===================================================================
7822 File: file4 Status: Up-to-date
7824 Working revision: 1\.1\.2\.1.*
7825 Repository revision: 1\.1\.2\.1 ${CVSROOT_DIRNAME}/first-dir/dir2/Attic/file4,v
7826 Commit Identifier: ${commitid}
7827 Sticky Tag: b1 (branch: 1\.1\.2)
7829 Sticky Options: (none)"
7830 dotest branches2-30
"cat CVS/Tag" 'Tb1'
7832 # Test update -A on a subdirectory
7835 dotest branches2-31
"${testcvs} update -A -d dir2" \
7836 "${SPROG} update: Updating dir2"
7838 dotest branches2-32
"${testcvs} -q status" ''
7839 dotest_fail branches2-33
"test -f CVS/Tag"
7841 # Add a file on the trunk.
7842 echo "file5 first revision" > file5
7843 dotest branches2-34
"${testcvs} add file5" \
7844 "${SPROG}"' add: scheduling file `file5'\'' for addition
7845 '"${SPROG}"' add: use .'"${SPROG}"' commit. to add this file permanently'
7846 dotest branches2-35
"${testcvs} -q commit -madd" \
7847 "$CVSROOT_DIRNAME/first-dir/dir2/file5,v <-- file5
7848 initial revision: 1\.1"
7850 cd ..
/..
/..
/trunk
/first-dir
7851 dotest branches2-36
"${testcvs} -q update -d dir2" 'U dir2/file5'
7853 dotest branches2-37
"${testcvs} -q status" \
7854 "===================================================================
7855 File: file5 Status: Up-to-date
7857 Working revision: 1\.1.*
7858 Repository revision: 1\.1 ${CVSROOT_DIRNAME}/first-dir/dir2/file5,v
7859 Commit Identifier: ${commitid}
7862 Sticky Options: (none)"
7863 dotest_fail branches2-38
"test -f CVS/status"
7865 dotest branches2-39
"$testcvs rls -rb1 -l -R first-dir" \
7866 "$SPROG rls: Listing module: \`first-dir'
7868 ---- $ISO8601DATE 1\.1 file1
7869 ---- $ISO8601DATE 1\.1\.2\.1 file2
7870 d--- $ISO8601DATE dir1
7871 d--- $ISO8601DATE dir2
7874 ---- $ISO8601DATE 1\.1\.2\.1 file3
7877 ---- $ISO8601DATE 1\.1\.2\.1 file4"
7881 modify_repo
rm -rf $CVSROOT_DIRNAME/first-dir
7888 # test local branch number support
7890 # This test is skipped in $remotehost mode since the
7891 # CVS_LOCAL_BRANCH_NUM is not inherited by the server process as it
7892 # is with :fork:, for hopefully obvious reasons.
7894 # FIXCVS? Is this correct? Should CVS_LOCAL_BRANCH_NUM be sent as
7895 # a protocol extension or is it reasonable to only want this set on
7898 if test -n "$remotehost"; then :;else
7899 modify_repo mkdir
$CVSROOT_DIRNAME/first-dir
7900 mkdir branches3
; cd branches3
7902 dotest branches3-1
"$testcvs -q co first-dir"
7904 echo "file1 first revision" > file1
7905 dotest branches3-2
"${testcvs} add file1" \
7906 "${SPROG} add: scheduling file .file1. for addition
7907 ${SPROG} add: use .${SPROG} commit. to add this file permanently"
7908 dotest branches3-3
"${testcvs} commit -m add file1" \
7909 "${CVSROOT_DIRNAME}/first-dir/file1,v <-- file1
7910 initial revision: 1\.1"
7912 # Tag the file using a CVS_LOCAL_BRANCH_NUM of 1000
7913 CVS_LOCAL_BRANCH_NUM
=1000; export CVS_LOCAL_BRANCH_NUM
7914 dotest branches3-4
"${testcvs} -q tag -b tag1" 'T file1'
7915 unset CVS_LOCAL_BRANCH_NUM
7916 dotest branches3-5
"${testcvs} -q log file1" \
7918 RCS file: ${CVSROOT_DIRNAME}/first-dir/file1,v
7926 keyword substitution: kv
7927 total revisions: 1; selected revisions: 1
7929 ----------------------------
7931 date: ${ISO8601DATE}; author: ${username}; state: Exp; commitid: ${commitid};
7933 ============================================================================="
7937 modify_repo
rm -rf $CVSROOT_DIRNAME/first-dir
7945 # test where a tag is a branch tag in some files and a revision
7948 modify_repo mkdir
$CVSROOT_DIRNAME/first-dir
7949 mkdir branches4
; cd branches4
7951 dotest branches4-1
"$testcvs -q co first-dir"
7953 mkdir branches mixed mixed2 versions
7954 dotest branches4-2
"${testcvs} -q add branches mixed mixed2 versions" \
7955 "Directory ${CVSROOT_DIRNAME}/first-dir/branches added to the repository
7956 Directory ${CVSROOT_DIRNAME}/first-dir/mixed added to the repository
7957 Directory ${CVSROOT_DIRNAME}/first-dir/mixed2 added to the repository
7958 Directory ${CVSROOT_DIRNAME}/first-dir/versions added to the repository"
7960 echo file1
>branches
/file1
7961 echo file2
>branches
/file2
7962 echo file3
>branches
/file3
7963 echo file4
>branches
/file4
7964 cp branches
/file* mixed
7965 cp branches
/file* mixed2
7966 cp branches
/file* versions
7968 dotest branches4-3
"${testcvs} -q add */file*" \
7969 "${SPROG} add: use .${SPROG} commit. to add these files permanently"
7970 dotest branches4-3a
"${testcvs} -Q ci -m."
7972 dotest branches4-4
"${testcvs} -q tag xxx versions/file* mixed*/file1 mixed*/file3" \
7982 dotest branches4-5
"${testcvs} -q tag -b xxx branches/file* mixed*/file2 mixed*/file4" \
7992 # make sure we get the appropriate warnings when updating
7993 dotest branches4-6
"${testcvs} update -r xxx" \
7994 "${SPROG} update: Updating \.
7995 ${SPROG} update: Updating branches
7996 ${SPROG} update: Updating mixed
7997 ${SPROG} update: warning: xxx is a branch tag in some files and a revision tag in others\.
7998 ${SPROG} update: Updating mixed2
7999 ${SPROG} update: warning: xxx is a branch tag in some files and a revision tag in others\.
8000 ${SPROG} update: Updating versions"
8002 # make sure we don't get warned in quiet modes
8003 dotest branches4-7
"${testcvs} -q update -A"
8004 dotest branches4-8
"${testcvs} -q update -r xxx"
8005 dotest branches4-9
"${testcvs} -q update -A"
8006 dotest branches4-10
"${testcvs} -Q update -r xxx"
8008 # make sure the Tag files are correct
8009 dotest branches4-11
"cat branches/CVS/Tag" "Txxx"
8010 dotest branches4-12
"cat mixed/CVS/Tag" "Nxxx"
8011 dotest branches4-13
"cat mixed2/CVS/Tag" "Nxxx"
8012 dotest branches4-14
"cat versions/CVS/Tag" "Nxxx"
8014 # We only warn if there's mixed usage in a single directory.
8015 # We may want to consider changing that in the future.
8016 dotest branches4-15
"${testcvs} update -r xxx branches versions" \
8017 "${SPROG} update: Updating branches
8018 ${SPROG} update: Updating versions"
8022 modify_repo
rm -rf $CVSROOT_DIRNAME/first-dir
8029 # Test the tag -c option.
8031 dotest tagc-1
"${testcvs} -q co -l ." ''
8033 dotest tagc-2
"${testcvs} add first-dir" \
8034 "Directory ${CVSROOT_DIRNAME}/first-dir added to the repository"
8037 dotest tagc-3
"${testcvs} add file1 file2" \
8038 "${SPROG} add: scheduling file .file1. for addition
8039 ${SPROG} add: scheduling file .file2. for addition
8040 ${SPROG} add: use .${SPROG} commit. to add these files permanently"
8041 dotest tagc-4
"${testcvs} -q ci -m add" \
8042 "$CVSROOT_DIRNAME/first-dir/file1,v <-- file1
8043 initial revision: 1\.1
8044 $CVSROOT_DIRNAME/first-dir/file2,v <-- file2
8045 initial revision: 1\.1"
8046 dotest tagc-5
"${testcvs} -q tag -c tag1" \
8050 dotest tagc-6
"${testcvs} -q tag -c tag2" \
8053 # Avoid timestamp granularity bugs (FIXME: CVS should be
8054 # doing the sleep, right?).
8057 dotest tagc-6a
"${testcvs} rm -f file2" \
8058 "${SPROG} remove: scheduling .file2. for removal
8059 ${SPROG} remove: use .${SPROG} commit. to remove this file permanently"
8061 dotest tagc-6b
"${testcvs} add file3" \
8062 "${SPROG} add: scheduling file .file3. for addition
8063 ${SPROG} add: use .${SPROG} commit. to add this file permanently"
8064 dotest_fail tagc-7
"${testcvs} -q tag -c tag3" \
8065 "${SPROG} tag: file1 is locally modified
8066 ${SPROG} tag: file2 is locally modified
8067 ${SPROG} tag: file3 is locally modified
8068 ${SPROG} \[tag aborted\]: correct the above errors first!"
8072 dotest tagc-8
"${testcvs} -q co first-dir" \
8076 dotest tagc-9
"${testcvs} -q ci -m modify" \
8077 "$CVSROOT_DIRNAME/first-dir/file1,v <-- file1
8078 new revision: 1\.2; previous revision: 1\.1
8079 $CVSROOT_DIRNAME/first-dir/file2,v <-- file2
8080 new revision: delete; previous revision: 1\.1
8081 $CVSROOT_DIRNAME/first-dir/file3,v <-- file3
8082 initial revision: 1\.1"
8083 cd ..
/..
/2/first-dir
8084 dotest tagc-10
"${testcvs} -q tag -c tag4" \
8085 "${SPROG} tag: \`file2' is no longer in the repository
8092 modify_repo
rm -rf $CVSROOT_DIRNAME/first-dir
8098 # Make sure `cvs update -p -rT FILE' works from a branch when
8099 # FILE is already on the trunk and is being added to that branch.
8106 # Create the module.
8108 "$testcvs -Q import -m. $module X Y" ''
8111 # Check it out and tag it.
8112 dotest update-p-2
"$testcvs -Q co $module" ''
8114 dotest update-p-3
"$testcvs -Q tag -b B" ''
8116 dotest update-p-4
"$testcvs -Q add $file" ''
8117 dotest update-p-5
"$testcvs -Q ci -m. $file"
8118 dotest update-p-6
"$testcvs -Q tag T $file" ''
8119 dotest update-p-7
"$testcvs -Q update -rB" ''
8121 # This merge effectively adds file F on branch B.
8122 dotest update-p-8
"$testcvs -Q update -jT" ''
8124 # Before the fix that prompted the addition of this test,
8125 # the following command would fail with this diagnostic:
8126 # cvs update: conflict: F created independently by second party
8127 dotest update-p-9
"$testcvs update -p -rT $file" \
8128 "===================================================================
8130 RCS: ${CVSROOT_DIRNAME}/$module/$file,v
8132 \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*
8135 # Repeat the above, but with $file removed.
8136 # This exercises a slightly different code path.
8138 # Before the fix that prompted the addition of this test,
8139 # the following command would fail with this diagnostic:
8140 # cvs update: warning: new-born \`F' has disappeared
8141 dotest update-p-10
"$testcvs update -p -rT $file" \
8142 "===================================================================
8144 RCS: ${CVSROOT_DIRNAME}/$module/$file,v
8146 \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*
8149 # Exercise yet another code path:
8150 # the one that involves reviving a `dead' file.
8151 # And a little more, for good measure...
8153 dotest update-p-a1
"$testcvs -Q add new" ''
8154 dotest update-p-a2
"$testcvs -Q update -p new" ''
8155 dotest update-p-a3
"$testcvs -Q rm -f new" ''
8157 # Both an update -A, *and* the following update are required
8158 # to return to the state of being on the trunk with a $file
8159 # that we can then remove.
8160 dotest update-p-undead-0
"$testcvs update -A" \
8161 "${SPROG} update: Updating \.
8162 ${SPROG} update: warning: new-born \`$file' has disappeared"
8163 dotest update-p-undead-1
"$testcvs update" \
8164 "${SPROG} update: Updating \.
8166 dotest update-p-undead-2
"$testcvs -Q update -p -rT $file" v1
8167 dotest update-p-undead-3
"$testcvs -Q rm -f $file" ''
8168 dotest update-p-undead-4
"$testcvs -Q update -p -rT $file" v1
8169 dotest update-p-undead-5
"$testcvs -Q ci -m. $file"
8170 dotest update-p-undead-6
"$testcvs -Q update -p -rT $file" v1
8172 dotest update-p-undead-7
"$testcvs -Q update -p -rT $file" v1
8173 dotest update-p-undead-8
"$testcvs add $file" \
8174 "$SPROG add: Re-adding file .$file. after dead revision 1\.2\.
8175 $SPROG add: use \`$SPROG commit' to add this file permanently"
8177 dotest update-p-undead-9
"$testcvs -Q update -p -rT $file" v1
8182 modify_repo
rm -rf $CVSROOT_DIRNAME/$module
8188 # More tagging tests, including using tag -F -B to convert a
8189 # branch tag to a regular tag and recovering thereof.
8191 # Setup; check in first-dir/file1
8193 dotest tagf-1
"${testcvs} -q co -l ." ''
8195 dotest tagf-2
"${testcvs} add first-dir" \
8196 "Directory ${CVSROOT_DIRNAME}/first-dir added to the repository"
8199 dotest tagf-3
"${testcvs} add file1 file2" \
8200 "${SPROG} add: scheduling file .file1. for addition
8201 ${SPROG} add: scheduling file .file2. for addition
8202 ${SPROG} add: use .${SPROG} commit. to add these files permanently"
8203 dotest tagf-4
"${testcvs} -q ci -m add" \
8204 "$CVSROOT_DIRNAME/first-dir/file1,v <-- file1
8205 initial revision: 1\.1
8206 $CVSROOT_DIRNAME/first-dir/file2,v <-- file2
8207 initial revision: 1\.1"
8209 # Now create a branch and commit a revision there.
8210 dotest tagf-5
"${testcvs} -q tag -b br" "T file1
8212 dotest tagf-6
"${testcvs} -q update -r br" ""
8215 dotest tagf-7
"${testcvs} -q ci -m modify" \
8216 "$CVSROOT_DIRNAME/first-dir/file1,v <-- file1
8217 new revision: 1\.1\.2\.1; previous revision: 1\.1
8218 $CVSROOT_DIRNAME/first-dir/file2,v <-- file2
8219 new revision: 1\.1\.2\.1; previous revision: 1\.1"
8220 # Here we try to make it a non-branch tag, but will
8221 # succeed in getting only warnings, even with -F
8222 # because converting a branch tag to non-branch
8223 # is potentially catastrophic.
8224 dotest tagf-8a
"${testcvs} -q tag -F br" \
8225 "${SPROG} tag: file1: Not moving branch tag .br. from 1\.1\.2\.1 to 1\.1\\.2\.1\.
8226 ${SPROG} tag: file2: Not moving branch tag .br. from 1\.1\.2\.1 to 1\.1\.2\.1\."
8227 # however, if we *really* are sure we want to move a branch tag,
8228 # "-F -B" will do the trick
8229 dotest tagf-8
"${testcvs} -q tag -F -B br" "T file1
8231 echo moremod
>> file1
8232 echo moremod
>> file2
8233 dotest tagf-9
"${testcvs} -q status -v file1" \
8234 "===================================================================
8235 File: file1 Status: Locally Modified
8237 Working revision: 1\.1\.2\.1.*
8238 Repository revision: 1\.1\.2\.1 ${CVSROOT_DIRNAME}/first-dir/file1,v
8239 Commit Identifier: ${commitid}
8240 Sticky Tag: br (revision: 1\.1\.2\.1)
8242 Sticky Options: (none)
8245 br (revision: 1\.1\.2\.1)"
8247 # Now, how do we recover?
8248 dotest tagf-10
"${testcvs} -q tag -d br" "D file1
8250 # This creates a new branch, 1.1.4. See the code in RCS_magicrev
8251 # which will notice that there is a (non-magic) 1.1.2 and thus
8253 dotest tagf-11
"${testcvs} -q tag -r 1.1 -b br file1" "T file1"
8254 # Fix it with admin -n (cf admin-18, admin-26-4).
8255 dotest tagf-12
"${testcvs} -q admin -nbr:1.1.2 file2" \
8256 "RCS file: ${CVSROOT_DIRNAME}/first-dir/file2,v
8258 # Another variation on the file2 test would be to use two working
8259 # directories so that the update -r br would need to
8260 # a merge to get from 1.1.2.1 to the head of the 1.1.2 branch.
8261 dotest tagf-13
"${testcvs} -q update -r br" \
8262 "RCS file: ${CVSROOT_DIRNAME}/first-dir/file1,v
8263 retrieving revision 1\.1\.2\.1
8264 retrieving revision 1\.1
8265 Merging differences between 1\.1\.2\.1 and 1\.1 into file1
8266 rcsmerge: warning: conflicts during merge
8267 ${SPROG} update: conflicts found in file1
8270 # CVS is giving a conflict because we are trying to get back to
8271 # 1.1.4. I'm not sure why it is a conflict rather than just
8273 dotest tagf-14
"cat file1" \
8280 dotest tagf-15
"${testcvs} -q ci -m recovered" \
8281 "$CVSROOT_DIRNAME/first-dir/file1,v <-- file1
8282 new revision: 1\.1\.4\.1; previous revision: 1\.1
8283 $CVSROOT_DIRNAME/first-dir/file2,v <-- file2
8284 new revision: 1\.1\.2\.2; previous revision: 1\.1\.2\.1"
8285 # try accidentally deleting branch tag, "tag -d"
8286 dotest_fail tagf-16
"${testcvs} tag -d br" \
8287 "${SPROG} tag: Untagging \.
8288 ${SPROG} tag: Not removing branch tag .br. from .${CVSROOT_DIRNAME}/first-dir/file1,v.\.
8289 ${SPROG} tag: Not removing branch tag .br. from .${CVSROOT_DIRNAME}/first-dir/file2,v.\."
8290 # try accidentally deleting branch tag, "rtag -d"
8291 dotest_fail tagf-17
"${testcvs} rtag -d br first-dir" \
8292 "${SPROG} rtag: Untagging first-dir
8293 ${SPROG} rtag: Not removing branch tag .br. from .${CVSROOT_DIRNAME}/first-dir/file1,v.\.
8294 ${SPROG} rtag: Not removing branch tag .br. from .${CVSROOT_DIRNAME}/first-dir/file2,v.\."
8295 # try accidentally converting branch tag to non-branch tag "tag -F"
8296 dotest tagf-18
"${testcvs} tag -r1.1 -F br file1" \
8297 "${SPROG} tag: file1: Not moving branch tag .br. from 1\.1\.4\.1 to 1\.1\."
8298 # try accidentally converting branch tag to non-branch tag "rtag -F"
8299 dotest tagf-19
"${testcvs} rtag -r1.1 -F br first-dir" \
8300 "${SPROG} rtag: Tagging first-dir
8301 ${SPROG} rtag: first-dir/file1: Not moving branch tag .br. from 1\.1\.4\.1 to 1\.1\.
8302 ${SPROG} rtag: first-dir/file2: Not moving branch tag .br. from 1\.1\.2\.2 to 1\.1\."
8303 # create a non-branch tag
8304 dotest tagf-20
"${testcvs} rtag regulartag first-dir" \
8305 "${SPROG} rtag: Tagging first-dir"
8306 # try accidentally converting non-branch tag to branch tag (tag -F -B -b)
8307 dotest tagf-21
"${testcvs} tag -F -B -b regulartag file1" \
8308 "${SPROG} tag: file1: Not moving non-branch tag .regulartag. from 1\.1 to 1\.1\.4\.1\.0\.2 due to .-B. option\."
8309 # try accidentally converting non-branch tag to branch rtag (rtag -F -B -b)
8310 dotest tagf-22
"${testcvs} rtag -F -B -b regulartag first-dir" \
8311 "${SPROG} rtag: Tagging first-dir
8312 ${SPROG} rtag: first-dir/file1: Not moving non-branch tag .regulartag. from 1\.1 to 1\.1\.0\.6 due to .-B. option\.
8313 ${SPROG} rtag: first-dir/file2: Not moving non-branch tag .regulartag. from 1\.1 to 1\.1\.0\.4 due to .-B. option\."
8314 # Try accidentally deleting non-branch: (tag -d -B)
8315 dotest_fail tagf-23
"${testcvs} tag -d -B regulartag file1" \
8316 "${SPROG} tag: Not removing non-branch tag .regulartag. from .${CVSROOT_DIRNAME}/first-dir/file1,v. due to .-B. option\."
8317 # Try accidentally deleting non-branch: (rtag -d -B)
8318 dotest_fail tagf-24 \
8319 "${testcvs} rtag -d -B regulartag first-dir" \
8320 "${SPROG} rtag: Untagging first-dir
8321 ${SPROG} rtag: Not removing non-branch tag .regulartag. from .${CVSROOT_DIRNAME}/first-dir/file1,v. due to .-B. option\.
8322 ${SPROG} rtag: Not removing non-branch tag .regulartag. from .${CVSROOT_DIRNAME}/first-dir/file2,v. due to .-B. option\."
8324 # the following tests (throught the next commit) keep moving the same
8325 # tag back and forth between 1.1.6 & 1.1.8 in file1 and between
8326 # 1.1.4 and 1.1.6 in file2 since nothing was checked in on some of
8327 # these branches and CVS only tracks branches via tags unless they contain data.
8329 # try intentionally converting non-branch tag to branch tag (tag -F -b)
8330 dotest tagf-25a
"${testcvs} tag -F -b regulartag file1" "T file1"
8331 # try intentionally moving a branch tag to a newly created branch (tag -F -b -B)
8332 dotest tagf-25b
"${testcvs} tag -F -B -b -r1.1 regulartag file1" \
8334 # try intentionally converting mixed tags to branch tags (rtag -F -b)
8335 dotest tagf-26a
"${testcvs} rtag -F -b regulartag first-dir" \
8336 "${SPROG} rtag: Tagging first-dir
8337 ${SPROG} rtag: first-dir/file1: Not moving branch tag .regulartag. from 1\.1 to 1\.1\.0\.8\."
8338 # try intentionally converting a branch to a new branch tag (rtag -F -b -B)
8339 dotest tagf-26b
"${testcvs} rtag -F -B -b -r1.1 regulartag first-dir" \
8340 "${SPROG} rtag: Tagging first-dir"
8341 # update to our new branch
8342 dotest tagf-27
"${testcvs} update -r regulartag" \
8343 "${SPROG} update: Updating \.
8346 # commit some changes and see that all rev numbers look right
8347 echo changes
>> file1
8348 echo changes
>> file2
8349 dotest tagf-28
"${testcvs} ci -m changes" \
8350 "${CPROG} commit: Examining \.
8351 ${CVSROOT_DIRNAME}/first-dir/file1,v <-- file1
8352 new revision: 1\.1\.8\.1; previous revision: 1\.1
8353 ${CVSROOT_DIRNAME}/first-dir/file2,v <-- file2
8354 new revision: 1\.1\.6\.1; previous revision: 1\.1"
8355 # try intentional branch to non-branch (tag -F -B)
8356 dotest tagf-29
"${testcvs} tag -F -B -r1.1 regulartag file1" \
8358 # try non-branch to non-branch (tag -F -B)
8359 dotest tagf-29a
"${testcvs} tag -F -B -r br regulartag file1" \
8360 "${SPROG} tag: file1: Not moving non-branch tag .regulartag. from 1\.1 to 1\.1\.4\.1 due to .-B. option\."
8361 # try mixed-branch to non-branch (rtag -F -B )
8362 dotest tagf-29b
"${testcvs} rtag -F -B -r br regulartag first-dir" \
8363 "${SPROG} rtag: Tagging first-dir
8364 ${SPROG} rtag: first-dir/file1: Not moving non-branch tag .regulartag. from 1\.1 to 1\.1\.4\.1 due to .-B. option\."
8365 # at this point, regulartag is a regular tag within
8368 # try intentional branch to non-branch (rtag -F -B)
8369 dotest tagf-30
"${testcvs} rtag -F -B -r1.1 br first-dir" \
8370 "${SPROG} rtag: Tagging first-dir"
8371 # create a branch tag so we can try to delete it.
8372 dotest tagf-31
"${testcvs} rtag -b brtag first-dir" \
8373 "${SPROG} rtag: Tagging first-dir"
8375 # try intentinal deletion of branch tag (tag -d -B)
8376 dotest tagf-32
"${testcvs} tag -d -B brtag file1" "D file1"
8377 # try intentinal deletion of branch tag (rtag -d -B)
8378 dotest tagf-33
"${testcvs} rtag -d -B brtag first-dir" \
8379 "${SPROG} rtag: Untagging first-dir"
8384 modify_repo
rm -rf $CVSROOT_DIRNAME/first-dir
8390 # Test tags with spaces in the names.
8392 # Prior to releases 1.11.18 & 1.12.10, some commands used with
8393 # tags with spaces in the names could hang CVS.
8395 # Setup; check in first-dir/file1
8397 dotest tag-space-init-1
"$testcvs -q co -l ."
8399 dotest tag-space-init-2
"$testcvs add first-dir" \
8400 "Directory $CVSROOT_DIRNAME/first-dir added to the repository"
8403 dotest tag-space-init-3
"$testcvs add file1" \
8404 "$SPROG add: scheduling file \`file1' for addition
8405 $SPROG add: use \`$SPROG commit' to add this file permanently"
8406 dotest tag-space-init-4
"$testcvs -Q ci -m add"
8408 # Reportedly, the following two tags make it past WinCVS.
8409 dotest_fail tag-space-1
"$testcvs tag ' spacetag '" \
8410 "$SPROG \[tag aborted\]: tag \` spacetag ' must start with a letter"
8411 dotest_fail tag-space-2
"$testcvs tag 'spacetag '" \
8412 "$SPROG \[tag aborted\]: tag \`spacetag ' has non-visible graphic characters"
8415 # Verify that this isn't a client check.
8416 dotest tag-space-3
"$testcvs server" \
8417 "E $SPROG \[tag aborted\]: tag \` spacetag ' must start with a letter
8419 Root $CVSROOT_DIRNAME
8424 $CVSROOT_DIRNAME/first-dir
8430 dotest tag-space-4
"$testcvs server" \
8431 "E $SPROG \[tag aborted\]: tag \`spacetag ' has non-visible graphic characters
8433 Root $CVSROOT_DIRNAME
8438 $CVSROOT_DIRNAME/first-dir
8445 # Any number of normal tags and branches were handled correctly.
8446 dotest tag-space-5
"$testcvs -Q tag t1"
8447 dotest tag-space-5b
"$testcvs -Q tag t2"
8448 dotest tag-space-5c
"$testcvs -Q tag -b b1"
8453 # But once a vendor branch exists, it's all over.
8454 mkdir project
; cd project
8456 dotest tag-space-init-4 \
8457 "$testcvs -Q import -mimport second-dir VENDOR RELEASE"
8461 dotest_fail tag-space-6
"$testcvs -Q co -r ' spacetag ' first-dir" \
8462 "$SPROG \[checkout aborted\]: tag \` spacetag ' must start with a letter"
8464 # But when any files were imported, this test hung prior to CVS
8465 # versions 1.11.18 & 1.12.10.
8466 dotest_fail tag-space-7
"$testcvs -Q co -r ' spacetag ' second-dir" \
8467 "$SPROG \[checkout aborted\]: tag \` spacetag ' must start with a letter"
8470 # I based the client input in the next two tests on actual input
8472 dotest tag-space-8
"$testcvs server" \
8473 "E $SPROG \[checkout aborted\]: tag \` spacetag ' must start with a letter
8475 Root $CVSROOT_DIRNAME
8485 # Verify the test is not on the client side.
8486 dotest tag-space-9
"$testcvs server" \
8487 "E $SPROG \[checkout aborted\]: tag \` spacetag ' must start with a letter
8489 Root $CVSROOT_DIRNAME
8500 dotest tag-space-10
"$testcvs -Q co second-dir"
8503 # This test would also hang.
8504 dotest_fail tag-space-11
"$testcvs -Q up -r ' spacetag '" \
8505 "$SPROG \[update aborted\]: tag \` spacetag ' must start with a letter"
8508 dotest tag-space-12
"$testcvs server" \
8509 "E $SPROG \[update aborted\]: tag \` spacetag ' must start with a letter
8511 Root $CVSROOT_DIRNAME
8523 # I'm skipping tests for other commands that may have had the same
8524 # problem. Hopefully, if a new issue arises, one of the above tests
8525 # will catch the problem.
8528 echo Keeping
$TESTDIR and exiting due to
--keep
8534 modify_repo
rm -rf $CVSROOT_DIRNAME/first-dir \
8535 $CVSROOT_DIRNAME/second-dir
8541 # Test librarification of RCS.
8542 # First: test whether `cvs diff' handles $Name expansion
8543 # correctly. We diff two revisions with their symbolic tags;
8544 # neither tag should be expanded in the output. Also diff
8545 # one revision with the working copy.
8547 modify_repo mkdir
$CVSROOT_DIRNAME/first-dir
8548 dotest rcsdiff-1
"${testcvs} -q co first-dir" ''
8550 echo "I am the first foo, and my name is $""Name$." > foo.c
8551 dotest rcsdiff-2
"${testcvs} add -m new-file foo.c" \
8552 "${SPROG} add: scheduling file .foo\.c. for addition
8553 ${SPROG} add: use .${SPROG} commit. to add this file permanently"
8554 dotest rcsdiff-3
"${testcvs} commit -m rev1 foo.c" \
8555 "${CVSROOT_DIRNAME}/first-dir/foo.c,v <-- foo\.c
8556 initial revision: 1\.1"
8557 dotest rcsdiff-4
"${testcvs} tag first foo.c" "T foo\.c"
8558 dotest rcsdiff-5
"${testcvs} update -p -r first foo.c" \
8559 "===================================================================
8561 RCS: ${CVSROOT_DIRNAME}/first-dir/foo\.c,v
8563 \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*
8564 I am the first foo, and my name is \$""Name: first \$\."
8566 echo "I am the second foo, and my name is $""Name$." > foo.c
8567 dotest rcsdiff-6
"${testcvs} commit -m rev2 foo.c" \
8568 "${CVSROOT_DIRNAME}/first-dir/foo\.c,v <-- foo\.c
8569 new revision: 1\.2; previous revision: 1\.1"
8570 dotest rcsdiff-7
"${testcvs} tag second foo.c" "T foo\.c"
8571 dotest rcsdiff-8
"${testcvs} update -p -r second foo.c" \
8572 "===================================================================
8574 RCS: ${CVSROOT_DIRNAME}/first-dir/foo\.c,v
8576 \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*
8577 I am the second foo, and my name is \$""Name: second \$\."
8579 dotest_fail rcsdiff-9
"${testcvs} diff -r first -r second" \
8580 "${SPROG} diff: Diffing \.
8582 ===================================================================
8583 RCS file: ${CVSROOT_DIRNAME}/first-dir/foo\.c,v
8584 retrieving revision 1\.1
8585 retrieving revision 1\.2
8588 < I am the first foo, and my name is \$""Name: \$\.
8590 > I am the second foo, and my name is \$""Name: \$\."
8592 echo "I am the once and future foo, and my name is $""Name$." > foo.c
8593 dotest_fail rcsdiff-10
"${testcvs} diff -r first" \
8594 "${SPROG} diff: Diffing \.
8596 ===================================================================
8597 RCS file: ${CVSROOT_DIRNAME}/first-dir/foo\.c,v
8598 retrieving revision 1\.1
8601 < I am the first foo, and my name is \$""Name: \$\.
8603 > I am the once and future foo, and my name is \$""Name\$\."
8605 # Test handling of libdiff options. diff gets quite enough
8606 # of a workout elsewhere in sanity.sh, so we assume that it's
8607 # mostly working properly if it passes all the other tests.
8608 # The main one we want to try is regex handling, since we are
8609 # using CVS's regex matcher and not diff's.
8612 test_regex (whiz, bang)
8621 dotest rcslib-diffrgx-1
"${testcvs} -q add -m '' rgx.c" \
8622 "${SPROG} add: use .${SPROG} commit. to add this file permanently"
8623 dotest rcslib-diffrgx-2
"${testcvs} -q ci -m '' rgx.c" \
8624 "$CVSROOT_DIRNAME/first-dir/rgx\.c,v <-- rgx\.c
8625 initial revision: 1\.1"
8627 test_regex (whiz, bang)
8635 # Use dotest_fail because exit status from `cvs diff' must be 1.
8637 # Incidentally test that CVS no longer splits diff arguments on
8639 dotest_fail rcslib-diffrgx-3
"$testcvs diff -c -F'.* (' rgx.c" \
8641 ===================================================================
8642 RCS file: ${CVSROOT_DIRNAME}/first-dir/rgx\.c,v
8643 retrieving revision 1\.1
8644 diff -c -F '\.\* (' -r1\.1 rgx\.c
8645 \*\*\* rgx\.c ${RFCDATE} 1\.1
8646 --- rgx\.c ${RFCDATE}
8647 \*\*\*\*\*\*\*\*\*\*\*\*\*\*\* test_regex (whiz, bang)
8661 # Tests of rcsmerge/diff3. Merge operations get a good general
8662 # workout elsewhere; we want to make sure that options are still
8663 # handled properly. Try merging two branches with -kv, to test
8664 # both -j and -k switches.
8668 modify_repo
rm -rf $CVSROOT_DIRNAME/first-dir
8672 dotest rcslib-merge-1
"$testcvs -q co -l ."
8674 dotest rcslib-merge-2
"$testcvs -q add first-dir" \
8675 "Directory $CVSROOT_DIRNAME.*/first-dir added to the repository"
8678 dotest rcslib-merge-3
"$testcvs -q co first-dir" ""
8681 echo '$''Revision$' > file1
8684 dotest rcslib-merge-4
"${testcvs} -q add file1" \
8685 "${SPROG} add: use .${SPROG} commit. to add this file permanently"
8686 dotest rcslib-merge-5
"${testcvs} -q commit -m '' file1" \
8687 "$CVSROOT_DIRNAME/first-dir/file1,v <-- file1
8688 initial revision: 1\.1"
8689 sed -e 's/2/two/' file1
> f
; mv f file1
8690 dotest rcslib-merge-6
"${testcvs} -q commit -m '' file1" \
8691 "$CVSROOT_DIRNAME/first-dir/file1,v <-- file1
8692 new revision: 1\.2; previous revision: 1\.1"
8693 dotest rcslib-merge-7
"${testcvs} -q tag -b -r 1.1 patch1" "T file1"
8694 dotest rcslib-merge-8
"${testcvs} -q update -r patch1" "[UP] file1"
8695 dotest rcslib-merge-9
"${testcvs} -q status" \
8696 "===================================================================
8697 File: file1 Status: Up-to-date
8699 Working revision: 1\.1.*
8700 Repository revision: 1\.1 ${CVSROOT_DIRNAME}/first-dir/file1,v
8701 Commit Identifier: ${commitid}
8702 Sticky Tag: patch1 (branch: 1\.1\.2)
8704 Sticky Options: (none)"
8705 dotest rcslib-merge-10
"cat file1" \
8706 '$''Revision: 1\.1 $
8709 sed -e 's/3/three/' file1
> f
; mv f file1
8710 dotest rcslib-merge-11
"${testcvs} -q commit -m '' file1" \
8711 "$CVSROOT_DIRNAME/first-dir/file1,v <-- file1
8712 new revision: 1\.1\.2\.1; previous revision: 1\.1"
8713 dotest rcslib-merge-12
"${testcvs} -q update -kv -j1.2" \
8715 RCS file: ${CVSROOT_DIRNAME}/first-dir/file1,v
8716 retrieving revision 1\.1
8717 retrieving revision 1\.2
8718 Merging differences between 1\.1 and 1\.2 into file1
8719 rcsmerge: warning: conflicts during merge"
8720 dotest rcslib-merge-13
"cat file1" \
8731 # Test behavior of symlinks in the repository.
8732 if test -n "$remotehost"; then
8733 # Create the link on the remote system. This is because Cygwin's
8734 # Windows support creates *.lnk files for Windows. When creating
8735 # these in an SMB share from UNIX, these links won't work from the
8737 modify_repo
$CVS_RSH $remotehost "'ln -s file1,v $CVSROOT_DIRNAME/first-dir/file2,v'"
8739 modify_repo
ln -s file1
,v
$CVSROOT_DIRNAME/first-dir
/file2
,v
8741 dotest rcslib-symlink-2
"$testcvs update file2" "U file2"
8742 echo "This is a change" >> file2
8743 dotest rcslib-symlink-3
"$testcvs ci -m because file2" \
8744 "$CVSROOT_DIRNAME/first-dir/file1,v <-- file2
8745 new revision: 1\.1\.2\.2; previous revision: 1\.1\.2\.1"
8747 # Switch as for rcslib-symlink-1
8748 if test -n "$remotehost"; then
8749 dotest rcslib-symlink-4
"$CVS_RSH $remotehost 'ls -l $CVSROOT_DIRNAME/first-dir/file2,v'" \
8750 ".*$CVSROOT_DIRNAME/first-dir/file2,v -> file1,v"
8752 dotest rcslib-symlink-4
"ls -l $CVSROOT_DIRNAME/first-dir/file2,v" \
8753 ".*$CVSROOT_DIRNAME/first-dir/file2,v -> file1,v"
8756 # CVS was failing to check both the symlink and the file
8757 # for timestamp changes for a while. Test that.
8759 dotest rcslib-symlink-3a
"${testcvs} -q up file1" \
8760 "${SPROG} update: warning: \`file1' was lost
8762 echo "This is a change" >> file1
8763 dotest rcslib-symlink-3b
"${testcvs} ci -m because file1" \
8764 "${CVSROOT_DIRNAME}/first-dir/file1,v <-- file1
8765 new revision: 1\.1\.2\.[0-9]*; previous revision: 1\.1\.2\.[0-9]*"
8766 dotest rcslib-symlink-3c
"${testcvs} update file2" "[UP] file2"
8768 echo some new text
>file3
8769 dotest rcslib-symlink-3d
"${testcvs} -Q add file3" ''
8770 dotest rcslib-symlink-3e
"$testcvs -Q ci -mtest file3"
8772 rm -f ${CVSROOT_DIRNAME}/first-dir
/file2
,v
8773 # As for rcslib-symlink-1
8774 if test -n "$remotehost"; then
8775 modify_repo
"$CVS_RSH $remotehost 'ln -s Attic/file3,v $CVSROOT_DIRNAME/first-dir/file2,v'"
8777 modify_repo
ln -s Attic
/file3
,v
$CVSROOT_DIRNAME/first-dir
/file2
,v
8780 dotest rcslib-symlink-3g
"$testcvs update file2" "U file2"
8782 # restore the link to file1 for the following tests
8783 dotest rcslib-symlink-3i
"$testcvs -Q rm -f file3" ''
8784 dotest rcslib-symlink-3j
"$testcvs -Q ci -mwhatever file3"
8785 rm -f $CVSROOT_DIRNAME/first-dir
/file2
,v
8786 rm -f $CVSROOT_DIRNAME/first-dir
/Attic
/file3
,v
8787 # As for rcslib-symlink-1
8788 if test -n "$remotehost"; then
8789 modify_repo
"$CVS_RSH $remotehost 'ln -s file1,v $CVSROOT_DIRNAME/first-dir/file2,v'"
8791 modify_repo
ln -s file1
,v
$CVSROOT_DIRNAME/first-dir
/file2
,v
8794 # Test 5 reveals a problem with having symlinks in the
8795 # repository. CVS will try to tag both of the files
8796 # separately. After processing one, it will do the same
8797 # operation to the other, which is actually the same file,
8798 # so the tag will already be there. FIXME: do we bother
8799 # changing operations to notice cases like this? This
8800 # strikes me as a difficult problem. -Noel
8801 dotest rcslib-symlink-5
"$testcvs tag the_tag" \
8802 "$SPROG tag: Tagging .
8804 W file2 : the_tag already exists on version 1.1.2.3 : NOT MOVING tag to version 1.1.2.1"
8805 # As for rcslib-symlink-1
8806 if test -n "$remotehost"; then
8807 dotest rcslib-symlink-6
"$CVS_RSH $remotehost 'ls -l $CVSROOT_DIRNAME/first-dir/file2,v'" \
8808 ".*$CVSROOT_DIRNAME/first-dir/file2,v -> file1,v"
8810 dotest rcslib-symlink-6
"ls -l $CVSROOT_DIRNAME/first-dir/file2,v" \
8811 ".*$CVSROOT_DIRNAME/first-dir/file2,v -> file1,v"
8814 # Symlinks tend to interact poorly with the Attic.
8817 dotest rcslib-symlink-7
"$testcvs -q co first-dir" \
8821 dotest rcslib-symlink-8
"$testcvs rm -f file2" \
8822 "$SPROG remove: scheduling .file2. for removal
8823 $SPROG remove: use .$SPROG commit. to remove this file permanently"
8824 dotest rcslib-symlink-9
"$testcvs -q ci -m rm-it" \
8825 "$CVSROOT_DIRNAME/first-dir/file1,v <-- file2
8826 new revision: delete; previous revision: 1\.2"
8827 # OK, why this message happens twice is relatively clear
8828 # (the check_* and rtag_* calls to start_recursion).
8829 # Why it happens a third time I didn't try to find out.
8831 # DRP: One of the error messages disappeared while I was making
8832 # proxy modifications. Until I detect a deeper issue, I'm not
8833 # going to stress over it.
8835 # DRP: Both messages disappear starting with glibc 2.3.3 due to a bug
8836 # in the glob function which causes it to fail to return broken
8837 # symlinks. I'm submitting a bug fix to glibc which will hopefully
8838 # be released with glibc 2.3.6. Once it is released and versions
8839 # 2.3.3-2.3.5 of glibc become uncommon, the first, empty case below
8840 # should be removed again.
8841 dotest rcslib-symlink-10 \
8842 "$testcvs -q rtag -b -r the_tag brtag first-dir" "" \
8843 "$SPROG rtag: could not read RCS file for first-dir/file2
8844 $SPROG rtag: could not read RCS file for first-dir/file2"
8846 # Restore file1 for the next test.
8847 dotest rcslib-long-symlink-init-1
"$testcvs -Q up -A"
8848 dotest rcslib-long-symlink-init-2
"$testcvs -Q add file1"
8849 dotest rcslib-long-symlink-init-3
"$testcvs -Q ci -mback"
8853 # CVS has a hard-coded default link path size of 127 characters.
8854 # Make sure it knows how to exceed that.
8855 longpath
=$CVSROOT_DIRNAME
8857 while test $count -lt 10; do
8858 # 10 * 30 characters + len $CVSROOT_DIRNAME
8859 count
=`expr $count + 1`
8860 longpath
=$longpath/123456789012345678901234567890
8861 modify_repo mkdir
$longpath
8863 modify_repo
cp $CVSROOT_DIRNAME/first-dir
/file1
,v
$longpath
8864 modify_repo mkdir
$CVSROOT_DIRNAME/second-dir
8866 # Switch as for rcslib-symlink-1
8867 if test -n "$remotehost"; then
8868 modify_repo
$CVS_RSH $remotehost \
8869 'ln -s $longpath/file1,v $CVSROOT_DIRNAME/second-dir/fileX,v'
8871 modify_repo
ln -s $longpath/file1
,v \
8872 $CVSROOT_DIRNAME/second-dir
/fileX
,v
8875 dotest rcslib-long-symlink-2
"$testcvs co second-dir" \
8876 "$SPROG checkout: Updating second-dir
8880 echo change-it
>>fileX
8882 # Writes actually cause symlinks to be resolved.
8883 dotest rcslib-long-symlink-3
"$testcvs -q ci -mwrite-it" \
8884 "$CVSROOT_DIRNAME/123456789012345678901234567890/123456789012345678901234567890/123456789012345678901234567890/123456789012345678901234567890/123456789012345678901234567890/123456789012345678901234567890/123456789012345678901234567890/123456789012345678901234567890/123456789012345678901234567890/123456789012345678901234567890/file1,v <-- fileX
8885 new revision: 1\.5; previous revision: 1\.4"
8890 # Must remove the symlink first. Samba doesn't appear to show
8891 # broken symlink across the SMB share, and rm -rf by itself
8892 # will remove file1,v first and leave file2,v a broken link and the
8893 # rm -rf will fail since it doesn't find file2,v and it still gets
8894 # directory not empty errors removing cvsroot/first-dir.
8896 # I'm not sure why I need to do this on $remotehost. The rm above
8897 # rcslib-symlink-3j works fine, but the next one doesn't unless run
8898 # remotely under Cygwin and using a TESTDIR on a Samba share.
8899 if test -n "$remotehost"; then
8900 $CVS_RSH $remotehost \
8901 "rm -f $CVSROOT_DIRNAME/first-dir/file2,v $CVSROOT_DIRNAME/second-dir/fileX,v"
8903 modify_repo
rm -rf $CVSROOT_DIRNAME/first-dir \
8904 $CVSROOT_DIRNAME/second-dir \
8905 $CVSROOT_DIRNAME/123456789012345678901234567890
8906 rm -r first-dir second-dir
2
8912 # Test the ability to have several branchpoints coming off the
8914 modify_repo mkdir
$CVSROOT_DIRNAME/first-dir
8915 dotest multibranch-1
"${testcvs} -q co first-dir" ''
8917 echo 1:trunk-1
>file1
8918 dotest multibranch-2
"${testcvs} add file1" \
8919 "${SPROG}"' add: scheduling file `file1'\'' for addition
8920 '"${SPROG}"' add: use .'"${SPROG}"' commit. to add this file permanently'
8921 dotest_lit multibranch-3
"${testcvs} -q ci -m add-it" <<HERE
8922 $CVSROOT_DIRNAME/first-dir/file1,v <-- file1
8923 initial revision: 1.1
8925 dotest multibranch-4
"${testcvs} tag -b br1" \
8926 "${SPROG} tag: Tagging \.
8928 dotest multibranch-5
"${testcvs} tag -b br2" \
8929 "${SPROG} tag: Tagging \.
8931 dotest multibranch-6
"${testcvs} -q update -r br1" ''
8933 dotest multibranch-7
"${testcvs} -q ci -m modify-on-br1" \
8934 "$CVSROOT_DIRNAME/first-dir/file1,v <-- file1
8935 new revision: 1\.1\.2\.1; previous revision: 1\.1"
8936 dotest multibranch-8
"${testcvs} -q update -r br2" '[UP] file1'
8937 echo br2 adds a line
>>file1
8938 dotest multibranch-9
"${testcvs} -q ci -m modify-on-br2" \
8939 "$CVSROOT_DIRNAME/first-dir/file1,v <-- file1
8940 new revision: 1\.1\.4\.1; previous revision: 1\.1"
8941 dotest multibranch-10
"${testcvs} -q update -r br1" '[UP] file1'
8942 dotest multibranch-11
"cat file1" 'on-br1'
8943 dotest multibranch-12
"${testcvs} -q update -r br2" '[UP] file1'
8944 dotest multibranch-13
"cat file1" '1:trunk-1
8947 dotest multibranch-14
"${testcvs} log file1" \
8949 RCS file: ${CVSROOT_DIRNAME}/first-dir/file1,v
8958 keyword substitution: kv
8959 total revisions: 3; selected revisions: 3
8961 ----------------------------
8963 date: ${ISO8601DATE}; author: ${username}; state: Exp; commitid: ${commitid};
8964 branches: 1\.1\.2; 1\.1\.4;
8966 ----------------------------
8968 date: ${ISO8601DATE}; author: ${username}; state: Exp; lines: ${PLUS}1 -0; commitid: ${commitid};
8970 ----------------------------
8972 date: ${ISO8601DATE}; author: ${username}; state: Exp; lines: ${PLUS}1 -1; commitid: ${commitid};
8974 ============================================================================="
8978 modify_repo
rm -rf $CVSROOT_DIRNAME/first-dir
8984 import
) # test death after import
8985 # Tests of "cvs import":
8987 # rdiff -- imports with keywords
8988 # import -- more tests of imports with keywords
8989 # importb -- -b option.
8990 # importc -- bunch o' files in bunch o' directories
8991 # importX -- -X option.
8992 # importX2 -- CVSROOT/config ImportNewFilesToVendorBranchOnly
8995 # mflag -- various -m messages
8996 # ignore -- import and cvsignore
8997 # binwrap -- import and -k wrappers
8998 # info -- imports which are rejected by verifymsg
8999 # head -- intended to test vendor branches and HEAD,
9000 # although it doesn't really do it yet.
9001 # import-CVS -- refuse to import directories named "CVS".
9002 # import-quirks -- short tests of import quirks.
9005 mkdir import-dir
; cd import-dir
9007 for i
in 1 2 3 4 ; do
9008 echo imported
file"$i" > imported-f
"$i"
9011 # This directory should be on the default ignore list,
9012 # so it shouldn't get imported.
9014 echo ignore.me
>RCS
/ignore.me
9016 echo 'import should not expand $''Id$' >>imported-f2
9017 cp imported-f2 ..
/imported-f2-orig.tmp
9019 dotest_sort import-96 \
9020 "${testcvs} import -m first-import first-dir vendor-branch junk-1_0" \
9024 N first-dir/imported-f1
9025 N first-dir/imported-f2
9026 N first-dir/imported-f3
9027 N first-dir/imported-f4
9028 No conflicts created by this import"
9030 dotest import-96.5
"cmp ../imported-f2-orig.tmp imported-f2" ''
9035 dotest import-97
"${testcvs} -q co first-dir" \
9036 "U first-dir/imported-f1
9037 U first-dir/imported-f2
9038 U first-dir/imported-f3
9039 U first-dir/imported-f4"
9043 for i
in 1 2 3 4 ; do
9044 dotest import-98-
$i "test -f imported-f$i" ''
9046 dotest_fail import-98.5
"test -d RCS" ''
9050 dotest import-99
"${testcvs} rm imported-f1" \
9051 "${SPROG}"' remove: scheduling `imported-f1'\'' for removal
9052 '"${SPROG}"' remove: use .'"${SPROG}"' commit. to remove this file permanently'
9055 echo local-change
>> imported-f2
9058 dotest import-100
"${testcvs} ci -m local-changes" \
9059 "${CPROG} commit: Examining .
9060 ${CVSROOT_DIRNAME}/first-dir/imported-f1,v <-- imported-f1
9061 new revision: delete; previous revision: 1\.1\.1\.1
9062 ${CVSROOT_DIRNAME}/first-dir/imported-f2,v <-- imported-f2
9063 new revision: 1\.2; previous revision: 1\.1"
9066 dotest import-101
"${testcvs} log imported-f1" \
9068 RCS file: ${CVSROOT_DIRNAME}/first-dir/Attic/imported-f1,v
9069 Working file: imported-f1
9075 junk-1_0: 1\.1\.1\.1
9076 vendor-branch: 1\.1\.1
9077 keyword substitution: kv
9078 total revisions: 3; selected revisions: 3
9080 ----------------------------
9082 date: ${ISO8601DATE}; author: ${username}; state: dead; lines: ${PLUS}0 -0; commitid: ${commitid};
9084 ----------------------------
9086 date: ${ISO8601DATE}; author: ${username}; state: Exp; commitid: ${commitid};
9089 ----------------------------
9091 date: ${ISO8601DATE}; author: ${username}; state: Exp; lines: ${PLUS}0 -0; commitid: ${commitid};
9093 ============================================================================="
9095 # update into the vendor branch.
9096 dotest import-102
"${testcvs} update -rvendor-branch" \
9097 "${SPROG} update: Updating .
9101 # remove file4 on the vendor branch
9103 dotest import-103
"${testcvs} rm imported-f4" \
9104 "${SPROG}"' remove: scheduling `imported-f4'\'' for removal
9105 '"${SPROG}"' remove: use .'"${SPROG}"' commit. to remove this file permanently'
9109 "${testcvs} ci -m vendor-removed imported-f4" \
9110 "${CVSROOT_DIRNAME}/first-dir/imported-f4,v <-- imported-f4
9111 new revision: delete; previous revision: 1\.1\.1\.1"
9113 # update to main line
9114 dotest import-105
"${testcvs} -q update -A" \
9115 "${SPROG} update: \`imported-f1' is no longer in the repository
9118 # second import - file4 deliberately unchanged
9121 echo rev 2 of
file $i >> imported-f
"$i"
9123 cp imported-f2 ..
/imported-f2-orig.tmp
9125 dotest_sort import-106 \
9126 "${testcvs} import -m second-import first-dir vendor-branch junk-2_0" \
9130 ${CPROG} checkout -j<prev_rel_tag> -jjunk-2_0 first-dir
9131 2 conflicts created by this import.
9132 C first-dir/imported-f1
9133 C first-dir/imported-f2
9135 U first-dir/imported-f3
9136 U first-dir/imported-f4
9137 Use the following command to help the merge:"
9139 dotest import-106.5
"cmp ../imported-f2-orig.tmp imported-f2" \
9144 rm imported-f2-orig.tmp
9147 dotest import-107
"${testcvs} co first-dir" \
9148 "${SPROG} checkout: Updating first-dir
9149 [UP] first-dir/imported-f3
9150 [UP] first-dir/imported-f4"
9154 dotest_fail import-108
"test -f imported-f1" ''
9157 dotest import-109-
$i "test -f imported-f$i" ''
9160 # check vendor branch for file4
9161 dotest import-110
"${testcvs} -q update -rvendor-branch" \
9165 dotest import-111
"test -f imported-f4" ''
9167 # update to main line
9168 dotest import-112
"${testcvs} -q update -A" \
9169 "${SPROG} update: \`imported-f1' is no longer in the repository
9175 "${testcvs} -q co -jjunk-1_0 -jjunk-2_0 first-dir" \
9176 "${SPROG} checkout: file first-dir/imported-f1 does not exist, but is present in revision junk-2_0
9177 RCS file: ${CVSROOT_DIRNAME}/first-dir/imported-f2,v
9178 retrieving revision 1\.1\.1\.1
9179 retrieving revision 1\.1\.1\.2
9180 Merging differences between 1\.1\.1\.1 and 1\.1\.1\.2 into imported-f2
9181 rcsmerge: warning: conflicts during merge
9182 first-dir/imported-f3 already contains the differences between 1\.1\.1\.1 and 1\.1\.1\.2
9183 first-dir/imported-f4 already contains the differences between 1\.1\.1\.1 and 1\.1\.1\.3"
9187 dotest_fail import-114
"test -f imported-f1" ''
9190 dotest import-115-
$i "test -f imported-f$i" ''
9193 dotest import-116
'cat imported-f2' \
9195 [<]<<<<<< imported-f2
9196 import should not expand \$''Id: imported-f2,v 1\.2 [0-9/]* [0-9:]* '"${username}"' Exp \$
9199 import should not expand \$''Id: imported-f2,v 1\.1\.1\.2 [0-9/]* [0-9:]* '"${username}"' Exp \$
9201 [>]>>>>>> 1\.1\.1\.2'
9206 modify_repo
rm -rf $CVSROOT_DIRNAME/first-dir
9213 # More cvs import tests, especially -b option.
9215 # OK, first we get some sources from the NetMunger project, and
9216 # import them into the 1.1.1 vendor branch.
9219 echo 'OpenMunger sources' >file1
9220 echo 'OpenMunger sources' >file2
9221 dotest_sort importb-1 \
9222 "${testcvs} import -m add first-dir openmunger openmunger-1_0" \
9227 No conflicts created by this import"
9231 # Now we put the sources we get from FreeMunger into 1.1.3
9234 echo 'FreeMunger sources' >file1
9235 echo 'FreeMunger sources' >file2
9236 # Not completely sure how the conflict detection is supposed to
9237 # be working here (haven't really thought about it).
9238 # We use an explicit -d option to test that it is reflected
9239 # in the suggested checkout.
9240 dotest_sort importb-2 \
9241 "$testcvs -d '$CVSROOT' import -m add -b 1.1.3 \
9242 first-dir freemunger freemunger-1_0" \
9246 ${CPROG} -d ${CVSROOT} checkout -j<prev_rel_tag> -jfreemunger-1_0 first-dir
9247 2 conflicts created by this import.
9250 Use the following command to help the merge:"
9254 # Now a test of main branch import (into second-dir, not first-dir).
9257 echo 'my own stuff' >mine1.c
9258 echo 'my own stuff' >mine2.c
9259 dotest_fail importb-3 \
9260 "${testcvs} import -m add -b 1 second-dir dummy really_dumb_y" \
9261 "$CPROG \[import aborted\]: Only numeric branch specifications with two dots are
9262 supported by import, not \`1'\. For example: \`1\.1\.1'\."
9263 : when we implement main-branch import
, should be \
9264 "N second-dir/mine1\.c
9265 N second-dir/mine2\.c
9267 No conflicts created by this import"
9273 # when we implement main branch import, will want to
9274 # add "second-dir" here.
9275 dotest importb-4
"${testcvs} -q co first-dir" \
9279 dotest importb-5
"${testcvs} -q log file1" "
9280 RCS file: ${CVSROOT_DIRNAME}/first-dir/file1,v
9287 freemunger-1_0: 1\.1\.3\.1
9289 openmunger-1_0: 1\.1\.1\.1
9291 keyword substitution: kv
9292 total revisions: 3; selected revisions: 3
9294 ----------------------------
9296 date: ${ISO8601DATE}; author: ${username}; state: Exp; commitid: ${commitid};
9297 branches: 1\.1\.1; 1\.1\.3;
9299 ----------------------------
9301 date: ${ISO8601DATE}; author: ${username}; state: Exp; lines: ${PLUS}1 -1; commitid: ${commitid};
9303 ----------------------------
9305 date: ${ISO8601DATE}; author: ${username}; state: Exp; lines: ${PLUS}0 -0; commitid: ${commitid};
9307 ============================================================================="
9312 modify_repo
rm -rf $CVSROOT_DIRNAME/first-dir \
9313 $CVSROOT_DIRNAME/second-dir
9319 # Test importing a bunch o' files in a bunch o' directories.
9320 # Also the -d option.
9322 # Set a predictable time zone for these tests.
9327 mkdir adir bdir cdir
9328 mkdir adir
/sub1 adir
/sub2
9329 mkdir adir
/sub
1/ssdir
9331 touch adir
/sub
1/file1 adir
/sub
2/file2 adir
/sub
1/ssdir
/ssfile
9332 touch -t ${TOUCH1971} bdir
/subdir
/file1
9333 touch -t ${TOUCH2034} cdir
/cfile
9334 dotest_sort importc-1 \
9335 "${testcvs} import -d -m import-it first-dir vendor release" \
9338 N first-dir/adir/sub1/file1
9339 N first-dir/adir/sub1/ssdir/ssfile
9340 N first-dir/adir/sub2/file2
9341 N first-dir/bdir/subdir/file1
9342 N first-dir/cdir/cfile
9343 No conflicts created by this import
9344 ${SPROG} import: Importing ${CVSROOT_DIRNAME}/first-dir/adir
9345 ${SPROG} import: Importing ${CVSROOT_DIRNAME}/first-dir/adir/sub1
9346 ${SPROG} import: Importing ${CVSROOT_DIRNAME}/first-dir/adir/sub1/ssdir
9347 ${SPROG} import: Importing ${CVSROOT_DIRNAME}/first-dir/adir/sub2
9348 ${SPROG} import: Importing ${CVSROOT_DIRNAME}/first-dir/bdir
9349 ${SPROG} import: Importing ${CVSROOT_DIRNAME}/first-dir/bdir/subdir
9350 ${SPROG} import: Importing ${CVSROOT_DIRNAME}/first-dir/cdir"
9353 dotest importc-2
"${testcvs} -q co first-dir" \
9354 "U first-dir/adir/sub1/file1
9355 U first-dir/adir/sub1/ssdir/ssfile
9356 U first-dir/adir/sub2/file2
9357 U first-dir/bdir/subdir/file1
9358 U first-dir/cdir/cfile"
9360 dotest importc-3
"${testcvs} update adir/sub1" \
9361 "${SPROG} update: Updating adir/sub1
9362 ${SPROG} update: Updating adir/sub1/ssdir"
9363 dotest importc-4
"${testcvs} update adir/sub1 bdir/subdir" \
9364 "${SPROG} update: Updating adir/sub1
9365 ${SPROG} update: Updating adir/sub1/ssdir
9366 ${SPROG} update: Updating bdir/subdir"
9368 echo modify
>>cdir
/cfile
9370 "${testcvs} -q rtag -b -r release wip_test first-dir" ""
9371 dotest importc-6
"${testcvs} -q update -r wip_test" "M cdir/cfile"
9373 # This used to fail in local mode
9374 dotest importc-7
"${testcvs} -q ci -m modify -r wip_test" \
9375 "$CVSROOT_DIRNAME/first-dir/cdir/cfile,v <-- cdir/cfile
9376 new revision: 1\.1\.1\.1\.2\.1; previous revision: 1\.1\.1\.1"
9378 # TODO: should also be testing "import -d" when we update
9380 dotest importc-8
"${testcvs} -q log cdir/cfile" "
9381 RCS file: ${CVSROOT_DIRNAME}/first-dir/cdir/cfile,v
9382 Working file: cdir/cfile
9388 wip_test: 1\.1\.1\.1\.0\.2
9391 keyword substitution: kv
9392 total revisions: 3; selected revisions: 3
9394 ----------------------------
9396 date: ${ISO8601DATE2034}; author: ${username}; state: Exp; commitid: ${commitid};
9399 ----------------------------
9401 date: ${ISO8601DATE2034}; author: ${username}; state: Exp; lines: ${PLUS}0 -0; commitid: ${commitid};
9402 branches: 1\.1\.1\.1\.2;
9404 ----------------------------
9405 revision 1\.1\.1\.1\.2\.1
9406 date: ${ISO8601DATE}; author: ${username}; state: Exp; lines: ${PLUS}1 -0; commitid: ${commitid};
9408 ============================================================================="
9410 dotest importc-9
"${testcvs} -q log bdir/subdir/file1" "
9411 RCS file: ${CVSROOT_DIRNAME}/first-dir/bdir/subdir/file1,v
9412 Working file: bdir/subdir/file1
9418 wip_test: 1\.1\.1\.1\.0\.2
9421 keyword substitution: kv
9422 total revisions: 2; selected revisions: 2
9424 ----------------------------
9426 date: ${ISO8601DATE1971}; author: ${username}; state: Exp; commitid: ${commitid};
9429 ----------------------------
9431 date: ${ISO8601DATE1971}; author: ${username}; state: Exp; lines: ${PLUS}0 -0; commitid: ${commitid};
9433 ============================================================================="
9436 # Now tests of absolute pathnames and .. as repository directory.
9438 dotest_fail importc-10 \
9439 "${testcvs} import -m imp ../other vendor release2" \
9440 "${CPROG} \[import aborted\]: directory \.\./other not relative within the repository"
9441 dotest_fail importc-11 \
9442 "${testcvs} import -m imp ${TESTDIR}/other vendor release3" \
9443 "${CPROG} \[import aborted\]: directory ${TESTDIR}/other not relative within the repository"
9444 dotest_fail importc-12
"test -d ${TESTDIR}/other" ""
9450 modify_repo
rm -rf $CVSROOT_DIRNAME/first-dir
9456 # More cvs import tests, especially -X option.
9458 # OK, first we get some sources from the Munger version 0.9,
9459 # and import them into the 1.1.1 vendor branch (w/o -X). (This
9460 # will be used to test subsequent imports of the same file
9464 echo 'Munger sources 0.9' >file0
9465 dotest_sort importX-1 \
9466 "${testcvs} import -m add first-dir munger munger-0_9" \
9470 No conflicts created by this import"
9474 # Now we put the sources we get from Munger version 1.0 on
9475 # to the 1.1.1 vendor branch using -X. (This imports a new
9476 # version of file0, and imports all-new files file1 and file2.)
9479 echo 'Munger sources' >file0
9480 echo 'Munger sources' >file1
9481 echo 'Munger sources' >file2
9482 dotest_sort importX-2 \
9483 "${testcvs} import -X -m add first-dir munger munger-1_0" \
9487 ${CPROG} checkout -j<prev_rel_tag> -jmunger-1_0 first-dir
9490 No conflicts created by this import.
9492 Use the following command to help the merge:"
9496 # Now we put the sources we get from Munger version 1.1 on
9497 # to the 1.1.1 vendor branch using -X. (This imports unchanged
9498 # versions of file0 and file2, a changed version of file1, and
9499 # an all-new file3.)
9502 echo 'Munger sources' >file0
9503 echo 'Munger sources 1.1' >file1
9504 echo 'Munger sources' >file2
9505 echo 'Munger sources 1.1' >file3
9506 dotest_sort importX-3 \
9507 "$testcvs -d '$CVSROOT' import -X -m add first-dir munger munger-1_1" \
9511 ${CPROG} -d ${CVSROOT} checkout -j<prev_rel_tag> -jmunger-1_1 first-dir
9512 1 conflicts created by this import.
9517 Use the following command to help the merge:"
9523 # only file0 should be checked out
9524 dotest importX-4
"${testcvs} -q co first-dir" \
9528 dotest importX-5
"${testcvs} -q log file0" "
9529 RCS file: ${CVSROOT_DIRNAME}/first-dir/file0,v
9536 munger-1_1: 1\.1\.1\.2
9537 munger-1_0: 1\.1\.1\.2
9538 munger-0_9: 1\.1\.1\.1
9540 keyword substitution: kv
9541 total revisions: 3; selected revisions: 3
9543 ----------------------------
9545 date: ${ISO8601DATE}; author: ${username}; state: Exp; commitid: ${commitid};
9548 ----------------------------
9550 date: ${ISO8601DATE}; author: ${username}; state: Exp; lines: ${PLUS}1 -1; commitid: ${commitid};
9552 ----------------------------
9554 date: ${ISO8601DATE}; author: ${username}; state: Exp; lines: ${PLUS}0 -0; commitid: ${commitid};
9556 ============================================================================="
9558 dotest importX-6
"${testcvs} -q log file1" "
9559 RCS file: ${CVSROOT_DIRNAME}/first-dir/Attic/file1,v
9566 munger-1_1: 1\.1\.1\.2
9567 munger-1_0: 1\.1\.1\.1
9569 keyword substitution: kv
9570 total revisions: 4; selected revisions: 4
9572 ----------------------------
9574 date: ${ISO8601DATE}; author: ${username}; state: dead; lines: ${PLUS}0 -0; commitid: ${commitid};
9575 Revision 1\.1 was added on the vendor branch\.
9576 ----------------------------
9578 date: ${ISO8601DATE}; author: ${username}; state: Exp; commitid: ${commitid};
9581 ----------------------------
9583 date: ${ISO8601DATE}; author: ${username}; state: Exp; lines: ${PLUS}1 -1; commitid: ${commitid};
9585 ----------------------------
9587 date: ${ISO8601DATE}; author: ${username}; state: Exp; lines: ${PLUS}0 -0; commitid: ${commitid};
9589 ============================================================================="
9593 modify_repo
rm -rf ${CVSROOT_DIRNAME}/first-dir
9599 # Test ImportNewFilesToVendorBranchOnly config file option.
9601 # On Windows, we can't check out CVSROOT, because the case
9602 # insensitivity means that this conflicts with cvsroot.
9606 dotest importX2-1
"${testcvs} -q co CVSROOT" "[UP] CVSROOT${DOTSTAR}"
9608 echo "ImportNewFilesToVendorBranchOnly=yes" >> config
9610 dotest importX2-2
"$testcvs -q ci -m force-cvs-import-X" \
9611 "$TESTDIR/cvsroot/CVSROOT/config,v <-- config
9612 new revision: 1\.[0-9]*; previous revision: 1\.[0-9]*
9613 $SPROG commit: Rebuilding administrative file database"
9617 # Import a sources file, but do NOT specify -X. The new file
9618 # should be killed, anyway (because of the config option).
9621 echo 'source' >file1
9622 dotest_sort importX2-3 \
9623 "${testcvs} import -m add first-dir source source-1_0" \
9627 ${CPROG} checkout -j<prev_rel_tag> -jsource-1_0 first-dir
9629 No conflicts created by this import.
9630 Use the following command to help the merge:"
9636 # **nothing** should be checked out**
9637 dotest importX2-4
"${testcvs} -q co first-dir" ""
9640 dotest importX2-5
"${testcvs} -q log file1" "
9641 RCS file: ${CVSROOT_DIRNAME}/first-dir/Attic/file1,v
9648 source-1_0: 1\.1\.1\.1
9650 keyword substitution: kv
9651 total revisions: 3; selected revisions: 3
9653 ----------------------------
9655 date: ${ISO8601DATE}; author: ${username}; state: dead; lines: ${PLUS}0 -0; commitid: ${commitid};
9656 Revision 1\.1 was added on the vendor branch\.
9657 ----------------------------
9659 date: ${ISO8601DATE}; author: ${username}; state: Exp; commitid: ${commitid};
9662 ----------------------------
9664 date: ${ISO8601DATE}; author: ${username}; state: Exp; lines: ${PLUS}0 -0; commitid: ${commitid};
9666 ============================================================================="
9673 modify_repo
rm -rf $CVSROOT_DIRNAME/first-dir
9681 touch file1 file2 file3
9682 dotest_fail import-CVS-1
"$testcvs import CVS vtag rtag" \
9683 "$CPROG import: The word \`CVS' is reserved by CVS and may not be used
9684 $CPROG \[import aborted\]: as a directory in a path or as a file name\."
9687 touch sdir
/CVS
/file4 sdir
/CVS
/file5 sdir
/file6 sdir
/file7
9688 # Calling the imported directory import-CVS is dual purpose in the
9689 # following test. It makes sure the path test which matched above
9690 # wasn't too strict.
9691 dotest_sort import-CVS-2 \
9692 "$testcvs import -I! -mimport import-CVS vtag rtag" \
9695 I import-CVS/sdir/CVS
9699 N import-CVS/sdir/file6
9700 N import-CVS/sdir/file7
9701 No conflicts created by this import
9702 $SPROG import: Importing $CVSROOT_DIRNAME/import-CVS/sdir"
9707 modify_repo
rm -rf $CVSROOT_DIRNAME/import-CVS
9713 # Short tests of quirky import behavior.
9715 # For a list of other import tests with short descriptions, see the
9716 # comment header of the "import" test.
9719 touch file1 file2 file3
9721 # CVS prior to 1.11.18 and 1.12.10 used to happily import to
9722 # "branch 1.1", creating RCS archives with revisions like,
9723 # "1.1..1". That double-dot is *not* a typo.
9724 dotest_fail import-quirks-1 \
9725 "$testcvs import -b1.1. -mbad-bad-bad import-quirks VB RT" \
9726 "$CPROG \[import aborted\]: Only numeric branch specifications with two dots are
9727 supported by import, not \`1\.1\.'\. For example: \`1\.1\.1'\."
9729 dotest_fail import-quirks-2 \
9730 "$testcvs import -b1.1.1.. -mbad-bad-bad import-quirks VB RT" \
9731 "$CPROG \[import aborted\]: Only numeric branch specifications with two dots are
9732 supported by import, not \`1\.1\.1\.\.'\. For example: \`1\.1\.1'\."
9734 # Try a few odd numbers. This is hardly comprehensive.
9735 dotest_sort import-quirks-2 \
9736 "$testcvs import -b10.10.101 -mthis-ones-ok import-quirks-2 VB RT" \
9739 N import-quirks-2/file1
9740 N import-quirks-2/file2
9741 N import-quirks-2/file3
9742 No conflicts created by this import"
9744 dotest_sort import-quirks-3 \
9745 "$testcvs import -b2345678901.2345678901.2345678901 -mthis-ones-ok import-quirks-3 VB RT" \
9748 N import-quirks-3/file1
9749 N import-quirks-3/file2
9750 N import-quirks-3/file3
9751 No conflicts created by this import"
9753 dotest_sort import-quirks-4 \
9754 "$testcvs import -b1.1.2 -mthis-ones-ok import-quirks-4 VB RT" \
9757 N import-quirks-4/file1
9758 N import-quirks-4/file2
9759 N import-quirks-4/file3
9760 No conflicts created by this import"
9765 rm -rf $CVSROOT_DIRNAME/import-quirks-2 \
9766 $CVSROOT_DIRNAME/import-quirks-3 \
9767 $CVSROOT_DIRNAME/import-quirks-4
9772 import-after-initial
)
9773 # Properly handle the case in which the first version of a
9774 # file is created by a regular cvs add and commit, and there
9775 # is a subsequent cvs import of the same file. cvs update with
9776 # a date tag must resort to searching the vendor branch only if
9777 # the initial version of the file was created at the same time
9778 # as the initial version on the vendor branch.
9785 # Create the module.
9786 dotest import-after-initial-1 \
9787 "$testcvs -Q import -m. $module X Y" ''
9790 # Check it out and add a file.
9791 dotest import-after-initial-2
"$testcvs -Q co $module" ''
9793 echo original
> $file
9794 dotest import-after-initial-3
"${testcvs} -Q add $file" ""
9795 dotest import-after-initial-4
"$testcvs -Q ci -m. $file"
9797 # Delay a little so the following import isn't done in the same
9798 # second as the preceding commit.
9801 # Do the first import of $file *after* $file already has an
9805 echo newer-via-import
> $file
9806 dotest import-after-initial-5 \
9807 "$testcvs -Q import -m. $module X Y2" ''
9810 # Sleep a second so we're sure to be after the second of the import.
9813 dotest import-after-initial-6 \
9814 "$testcvs -Q update -p -D now $file" 'original'
9819 modify_repo
rm -rf $CVSROOT_DIRNAME/$module
9824 branch-after-import
)
9825 # Test branching after an import via both cvs tag -b and
9826 # cvs add to verify that the HEAD remains at 1.1.1.1
9827 # This was a FreeBSD bug documented at the URL:
9828 # http://www.freebsd.org/cgi/query-pr.cgi?pr=4033
9830 mkdir branch-after-import
9831 cd branch-after-import
9833 # OK, first we get some sources from the NetMunger project,
9834 # and import them into the 1.1.1 vendor branch.
9837 echo 'OpenMunger sources' >file1
9838 echo 'OpenMunger sources' >file2
9839 dotest_sort branch-after-import-1 \
9840 "${testcvs} import -m add first-dir openmunger openmunger-1_0" \
9845 No conflicts created by this import'
9848 # Next checkout the new module
9849 dotest branch-after-import-2 \
9850 "${testcvs} -q co first-dir" \
9854 # Branch tag the file1 and cvs add file2,
9855 # the branch should remain the same in both cases
9856 # such that a new import will not require a conflict
9858 dotest branch-after-import-3 \
9859 "${testcvs} tag -b TESTTOTRON file1" \
9861 dotest branch-after-import-4 \
9862 "${testcvs} -q update -r TESTTOTRON" \
9863 "${SPROG} update: \`file2' is no longer in the repository"
9865 cp ..
/imp-dir
/file2 .
9866 dotest branch-after-import-5 \
9867 "${testcvs} add file2" \
9868 "${SPROG} add: scheduling file .file2. for addition on branch .TESTTOTRON.
9869 ${SPROG} add: use .${SPROG} commit. to add this file permanently"
9871 dotest branch-after-import-6 \
9872 "$testcvs commit -m cvs-add file2" \
9873 "$CVSROOT_DIRNAME/first-dir/file2,v <-- file2
9874 new revision: 1\.1\.1\.1\.2\.2; previous revision: 1\.1\.1\.1\.2\.1"
9878 rm -r branch-after-import
9879 modify_repo
rm -rf $CVSROOT_DIRNAME/first-dir
9885 # Test doing joins which involve adding and removing files.
9886 # Variety of scenarios (see list below), in the context of:
9887 # * merge changes from T1 to T2 into the main line
9888 # * merge changes from branch 'branch' into the main line
9889 # * merge changes from branch 'branch' into branch 'br2'.
9890 # See also binfile2, which does similar things with binary files.
9891 # See also join2, which tests joining (and update -A) on only
9892 # a single file, rather than a directory.
9893 # See also rmadd2, which tests -j cases not involving branches
9894 # (e.g. undoing a commit)
9895 # See also join3, which tests some cases involving the greatest
9896 # common ancestor. Here is a list of tests according to branch
9899 # --->bp---->trunk too many to mention
9903 # --->bp---->trunk multibranch, multibranch2
9906 # --->bp1----->bp2---->trunk join3
9909 # --->bp1----->trunk
9910 # \----bp2---->branch branches
9911 # \------>branch-of-branch
9913 # We check merging changes from T1 to T2 into the main line.
9914 # Here are the interesting cases I can think of:
9915 # 1) File added between T1 and T2, not on main line.
9916 # File should be marked for addition.
9917 # 2) File added between T1 and T2, also added on main line.
9919 # 3) File removed between T1 and T2, unchanged on main line.
9920 # File should be marked for removal.
9921 # 4) File removed between T1 and T2, modified on main line.
9922 # If mod checked in, file should be marked for removal.
9923 # If mod still in working directory, conflict.
9924 # 5) File removed between T1 and T2, was never on main line.
9925 # Nothing should happen.
9926 # 6) File removed between T1 and T2, also removed on main line.
9927 # Nothing should happen.
9928 # 7) File not added between T1 and T2, added on main line.
9929 # Nothing should happen.
9930 # 8) File not modified between T1 and T2, removed on main line.
9931 # Nothing should happen.
9932 # 9) File modified between T1 and T2, removed on main line.
9934 # 10) File was never on branch, removed on main line.
9935 # Nothing should happen.
9937 # We also check merging changes from a branch into the main
9938 # line. Here are the interesting cases:
9939 # 1) File added on branch, not on main line.
9940 # File should be marked for addition.
9941 # 2) File added on branch, also added on main line.
9943 # 3) File removed on branch, unchanged on main line.
9944 # File should be marked for removal.
9945 # 4) File removed on branch, modified on main line.
9947 # 5) File removed on branch, was never on main line.
9948 # Nothing should happen.
9949 # 6) File removed on branch, also removed on main line.
9950 # Nothing should happen.
9951 # 7) File added on main line, not added on branch.
9952 # Nothing should happen.
9953 # 8) File removed on main line, not modified on branch.
9954 # Nothing should happen.
9955 # 9) File modified on branch, removed on main line.
9957 # 10) File was never on branch, removed on main line.
9958 # Nothing should happen.
9960 # In the tests below, fileN represents case N in the above
9963 modify_repo mkdir
$CVSROOT_DIRNAME/first-dir
9966 dotest join-1
"$testcvs -q co first-dir"
9971 echo 'first revision of file3' > file3
9972 echo 'first revision of file4' > file4
9973 echo 'first revision of file6' > file6
9974 echo 'first revision of file8' > file8
9975 echo 'first revision of file9' > file9
9976 dotest join-2
"${testcvs} add file3 file4 file6 file8 file9" \
9977 "${SPROG}"' add: scheduling file `file3'\'' for addition
9978 '"${SPROG}"' add: scheduling file `file4'\'' for addition
9979 '"${SPROG}"' add: scheduling file `file6'\'' for addition
9980 '"${SPROG}"' add: scheduling file `file8'\'' for addition
9981 '"${SPROG}"' add: scheduling file `file9'\'' for addition
9982 '"${SPROG}"' add: use .'"${SPROG}"' commit. to add these files permanently'
9984 dotest join-3
"${testcvs} -q commit -m add" \
9985 "$CVSROOT_DIRNAME/first-dir/file3,v <-- file3
9986 initial revision: 1\.1
9987 $CVSROOT_DIRNAME/first-dir/file4,v <-- file4
9988 initial revision: 1\.1
9989 $CVSROOT_DIRNAME/first-dir/file6,v <-- file6
9990 initial revision: 1\.1
9991 $CVSROOT_DIRNAME/first-dir/file8,v <-- file8
9992 initial revision: 1\.1
9993 $CVSROOT_DIRNAME/first-dir/file9,v <-- file9
9994 initial revision: 1\.1"
9997 dotest join-4
"${testcvs} -q tag -b branch ." \
10004 # Add file2, file7, and file10, modify file4, and remove
10005 # file6, file8, and file9.
10006 echo 'first revision of file2' > file2
10007 echo 'second revision of file4' > file4
10008 echo 'first revision of file7' > file7
10009 rm file6 file8 file9
10010 echo 'first revision of file10' > file10
10011 dotest join-5
"${testcvs} add file2 file7 file10" \
10012 "${SPROG}"' add: scheduling file `file2'\'' for addition
10013 '"${SPROG}"' add: scheduling file `file7'\'' for addition
10014 '"${SPROG}"' add: scheduling file `file10'\'' for addition
10015 '"${SPROG}"' add: use .'"${SPROG}"' commit. to add these files permanently'
10016 dotest join-6
"${testcvs} rm file6 file8 file9" \
10017 "${SPROG}"' remove: scheduling `file6'\'' for removal
10018 '"${SPROG}"' remove: scheduling `file8'\'' for removal
10019 '"${SPROG}"' remove: scheduling `file9'\'' for removal
10020 '"${SPROG}"' remove: use .'"${SPROG}"' commit. to remove these files permanently'
10021 dotest join-7
"${testcvs} -q ci -mx ." \
10022 "$CVSROOT_DIRNAME/first-dir/file10,v <-- file10
10023 initial revision: 1\.1
10024 $CVSROOT_DIRNAME/first-dir/file2,v <-- file2
10025 initial revision: 1\.1
10026 $CVSROOT_DIRNAME/first-dir/file4,v <-- file4
10027 new revision: 1\.2; previous revision: 1\.1
10028 $CVSROOT_DIRNAME/first-dir/file6,v <-- file6
10029 new revision: delete; previous revision: 1\.1
10030 $CVSROOT_DIRNAME/first-dir/file7,v <-- file7
10031 initial revision: 1\.1
10032 $CVSROOT_DIRNAME/first-dir/file8,v <-- file8
10033 new revision: delete; previous revision: 1\.1
10034 $CVSROOT_DIRNAME/first-dir/file9,v <-- file9
10035 new revision: delete; previous revision: 1\.1"
10038 dotest join-7a
"${testcvs} rm -f file10" \
10039 "${SPROG}"' remove: scheduling `file10'\'' for removal
10040 '"${SPROG}"' remove: use .'"${SPROG}"' commit. to remove this file permanently'
10041 dotest join-7b
"${testcvs} -q ci -mx ." \
10042 "$CVSROOT_DIRNAME/first-dir/file10,v <-- file10
10043 new revision: delete; previous revision: 1\.1"
10045 # Check out the branch.
10049 dotest join-8
"${testcvs} -q co -r branch first-dir" \
10058 # Modify the files on the branch, so that T1 is not an
10059 # ancestor of the main line, and add file5
10060 echo 'first branch revision of file3' > file3
10061 echo 'first branch revision of file4' > file4
10062 echo 'first branch revision of file5' > file5
10063 echo 'first branch revision of file6' > file6
10064 echo 'first branch revision of file9' > file9
10065 dotest join-9
"${testcvs} add file5" \
10066 "${SPROG}"' add: scheduling file `file5'\'' for addition on branch `branch'\''
10067 '"${SPROG}"' add: use .'"${SPROG}"' commit. to add this file permanently'
10068 dotest join-10
"${testcvs} -q ci -mx ." \
10069 "$CVSROOT_DIRNAME/first-dir/file3,v <-- file3
10070 new revision: 1\.1\.2\.1; previous revision: 1\.1
10071 $CVSROOT_DIRNAME/first-dir/file4,v <-- file4
10072 new revision: 1\.1\.2\.1; previous revision: 1\.1
10073 $CVSROOT_DIRNAME/first-dir/Attic/file5,v <-- file5
10074 new revision: 1\.1\.2\.1; previous revision: 1\.1
10075 $CVSROOT_DIRNAME/first-dir/Attic/file6,v <-- file6
10076 new revision: 1\.1\.2\.1; previous revision: 1\.1
10077 $CVSROOT_DIRNAME/first-dir/Attic/file9,v <-- file9
10078 new revision: 1\.1\.2\.1; previous revision: 1\.1"
10080 # Tag the current revisions on the branch.
10081 dotest join-11
"${testcvs} -q tag T1 ." \
10089 # Add file1 and file2, modify file9, and remove the other files.
10090 echo 'first branch revision of file1' > file1
10091 echo 'first branch revision of file2' > file2
10092 echo 'second branch revision of file9' > file9
10093 rm file3 file4 file5 file6
10094 dotest join-12
"${testcvs} add file1 file2" \
10095 "${SPROG}"' add: scheduling file `file1'\'' for addition on branch `branch'\''
10096 '"${SPROG}"' add: scheduling file `file2'\'' for addition on branch `branch'\''
10097 '"${SPROG}"' add: use .'"${SPROG}"' commit. to add these files permanently'
10098 dotest join-13
"${testcvs} rm file3 file4 file5 file6" \
10099 "${SPROG}"' remove: scheduling `file3'\'' for removal
10100 '"${SPROG}"' remove: scheduling `file4'\'' for removal
10101 '"${SPROG}"' remove: scheduling `file5'\'' for removal
10102 '"${SPROG}"' remove: scheduling `file6'\'' for removal
10103 '"${SPROG}"' remove: use .'"${SPROG}"' commit. to remove these files permanently'
10104 dotest join-14
"${testcvs} -q ci -mx ." \
10105 "$CVSROOT_DIRNAME/first-dir/Attic/file1,v <-- file1
10106 new revision: 1\.1\.2\.1; previous revision: 1\.1
10107 $CVSROOT_DIRNAME/first-dir/file2,v <-- file2
10108 new revision: 1\.1\.2\.2; previous revision: 1\.1\.2\.1
10109 $CVSROOT_DIRNAME/first-dir/file3,v <-- file3
10110 new revision: delete; previous revision: 1\.1\.2\.1
10111 $CVSROOT_DIRNAME/first-dir/file4,v <-- file4
10112 new revision: delete; previous revision: 1\.1\.2\.1
10113 $CVSROOT_DIRNAME/first-dir/Attic/file5,v <-- file5
10114 new revision: delete; previous revision: 1\.1\.2\.1
10115 $CVSROOT_DIRNAME/first-dir/Attic/file6,v <-- file6
10116 new revision: delete; previous revision: 1\.1\.2\.1
10117 $CVSROOT_DIRNAME/first-dir/Attic/file9,v <-- file9
10118 new revision: 1\.1\.2\.2; previous revision: 1\.1\.2\.1"
10120 # Tag the current revisions on the branch.
10121 dotest join-15
"${testcvs} -q tag T2 ." \
10127 # Do a checkout with a merge.
10131 dotest join-16
"${testcvs} -q co -jT1 -jT2 first-dir" \
10134 ${SPROG} checkout: file first-dir/file2 exists, but has been added in revision T2
10136 ${SPROG} checkout: scheduling \`first-dir/file3' for removal
10138 ${SPROG} checkout: scheduling \`first-dir/file4' for removal
10140 ${SPROG} checkout: file first-dir/file9 does not exist, but is present in revision T2"
10142 # Verify that the right changes have been scheduled.
10144 dotest join-17
"${testcvs} -q update" \
10149 # Modify file4 locally, and do an update with a merge.
10150 cd ..
/..
/1/first-dir
10151 echo 'third revision of file4' > file4
10152 dotest join-18
"${testcvs} -q update -jT1 -jT2 ." \
10154 $SPROG update: file file2 exists, but has been added in revision T2
10155 $SPROG update: scheduling \`file3' for removal
10157 $SPROG update: file file4 is locally modified, but has been removed in revision T2
10158 $SPROG update: file file9 does not exist, but is present in revision T2"
10160 # Verify that the right changes have been scheduled.
10161 dotest join-19
"${testcvs} -q update" \
10166 # Do a checkout with a merge from a single revision.
10168 # FIXME: CVS currently gets this wrong. file2 has been
10169 # added on both the branch and the main line, and so should
10170 # be regarded as a conflict. However, given the way that
10171 # CVS sets up the RCS file, there is no way to distinguish
10172 # this case from the case of file2 having existed before the
10173 # branch was made. This could be fixed by reserving
10174 # a revision somewhere, perhaps 1.1, as an always dead
10175 # revision which can be used as the source for files added
10179 dotest join-20
"${testcvs} -q co -jbranch first-dir" \
10182 RCS file: ${CVSROOT_DIRNAME}/first-dir/file2,v
10183 retrieving revision 1\.1
10184 retrieving revision 1\.1\.2\.2
10185 Merging differences between 1\.1 and 1\.1\.2\.2 into file2
10187 ${SPROG} checkout: scheduling \`first-dir/file3' for removal
10189 ${SPROG} checkout: file first-dir/file4 has been modified, but has been removed in revision branch
10191 ${SPROG} checkout: file first-dir/file9 does not exist, but is present in revision branch"
10193 # Verify that the right changes have been scheduled.
10194 # The M file2 line is a bug; see above join-20.
10196 dotest join-21
"${testcvs} -q update" \
10201 # Checkout the main line again.
10204 dotest join-22
"${testcvs} -q co first-dir" \
10210 # Modify file4 locally, and do an update with a merge from a
10212 # The file2 handling is a bug; see above join-20.
10214 echo 'third revision of file4' > file4
10215 dotest join-23
"${testcvs} -q update -jbranch ." \
10217 RCS file: ${CVSROOT_DIRNAME}/first-dir/file2,v
10218 retrieving revision 1\.1
10219 retrieving revision 1\.1\.2\.2
10220 Merging differences between 1\.1 and 1\.1\.2\.2 into file2
10221 ${SPROG} update: scheduling \`file3' for removal
10223 ${SPROG} update: file file4 is locally modified, but has been removed in revision branch
10224 ${SPROG} update: file file9 does not exist, but is present in revision branch"
10226 # Verify that the right changes have been scheduled.
10227 # The M file2 line is a bug; see above join-20
10228 dotest join-24
"${testcvs} -q update" \
10236 # Checkout the main line again and make a new branch which we
10239 dotest join-25
"${testcvs} -q co first-dir" \
10245 dotest join-26
"${testcvs} -q tag -b br2" \
10250 dotest join-27
"${testcvs} -q update -r br2" ""
10251 # The handling of file8 and file9 here look fishy to me. I don't
10252 # see why it should be different from the case where we merge to
10253 # the trunk (e.g. join-23).
10254 dotest join-28
"${testcvs} -q update -j branch" \
10256 RCS file: ${CVSROOT_DIRNAME}/first-dir/file2,v
10257 retrieving revision 1.1
10258 retrieving revision 1.1.2.2
10259 Merging differences between 1.1 and 1.1.2.2 into file2
10260 ${SPROG} update: scheduling \`file3' for removal
10261 ${SPROG} update: file file4 has been modified, but has been removed in revision branch
10264 # Verify that the right changes have been scheduled.
10265 dotest join-29
"${testcvs} -q update" \
10272 # Checkout the mainline again to try updating and merging between two
10273 # branches in the same step
10274 # this seems a likely scenario - the user finishes up on branch and
10275 # updates to br2 and merges in the same step - and there was a bug
10276 # once that if the file was removed in the update then it wouldn't be
10277 # readded in the merge
10280 dotest join-twobranch-1
"${testcvs} -q co -rbranch first-dir" \
10286 dotest join-twobranch-2
"${testcvs} -q update -rbr2 -jbranch" \
10287 "${SPROG} update: \`file1' is no longer in the repository
10290 RCS file: ${CVSROOT_DIRNAME}/first-dir/file2,v
10291 retrieving revision 1\.1
10292 retrieving revision 1\.1\.2\.2
10293 Merging differences between 1\.1 and 1\.1\.2\.2 into file2
10295 ${SPROG} update: scheduling \`file3' for removal
10297 ${SPROG} update: file file4 has been modified, but has been removed in revision branch
10299 ${SPROG} update: \`file8' is no longer in the repository
10301 ${SPROG} update: \`file9' is no longer in the repository
10303 # Verify that the right changes have been scheduled.
10304 dotest join-twobranch-3
"${testcvs} -q update" \
10311 # Checkout the mainline again to try merging from the trunk
10315 dotest join-30
"${testcvs} -q co first-dir" \
10322 # Tag the current revisions on the trunk.
10323 dotest join-31
"${testcvs} -q tag T3 ." \
10330 echo 'second revision of file7' > file7
10331 dotest join-32
"${testcvs} -q ci -mx ." \
10332 "$CVSROOT_DIRNAME/first-dir/file7,v <-- file7
10333 new revision: 1\.2; previous revision: 1\.1"
10336 dotest join-33
"${testcvs} -q tag T4 ." \
10342 # Now update branch to T3.
10343 cd ..
/..
/2/first-dir
10344 dotest join-34
"${testcvs} -q up -jT3" \
10345 "${SPROG} update: file file4 does not exist, but is present in revision T3
10348 # Verify that the right changes have been scheduled.
10349 dotest join-35
"${testcvs} -q update" \
10352 # Now update to T4.
10353 # This is probably a bug, although in this particular case it just
10354 # happens to do the right thing; see above join-20.
10355 dotest join-36
"${testcvs} -q up -j T3 -j T4" \
10357 RCS file: ${CVSROOT_DIRNAME}/first-dir/file7,v
10358 retrieving revision 1\.1
10359 retrieving revision 1\.2
10360 Merging differences between 1\.1 and 1\.2 into file7"
10362 # Verify that the right changes have been scheduled.
10363 dotest join-37
"${testcvs} -q update" \
10369 modify_repo
rm -rf $CVSROOT_DIRNAME/first-dir
10375 # More joining tests.
10377 # First the usual setup; create a directory first-dir, a file
10378 # first-dir/file1, and a branch br1.
10380 dotest join2-1
"${testcvs} -q co -l ." ''
10382 dotest join2-2
"${testcvs} add first-dir" \
10383 "Directory ${CVSROOT_DIRNAME}/first-dir added to the repository"
10385 echo 'initial contents of file1' >file1
10386 dotest join2-3
"${testcvs} add file1" \
10387 "${SPROG} add: scheduling file .file1. for addition
10388 ${SPROG} add: use .${SPROG} commit. to add this file permanently"
10389 dotest join2-4
"${testcvs} -q ci -m add" \
10390 "$CVSROOT_DIRNAME/first-dir/file1,v <-- file1
10391 initial revision: 1\.1"
10392 dotest join2-5
"${testcvs} -q tag -b br1" "T file1"
10393 dotest join2-6
"${testcvs} -q update -r br1" ""
10394 echo 'modify on branch' >>file1
10396 dotest join2-6a
"${testcvs} add bradd" \
10397 "${SPROG} add: scheduling file .bradd. for addition on branch .br1.
10398 ${SPROG} add: use .${SPROG} commit. to add this file permanently"
10399 dotest join2-7
"${testcvs} -q ci -m modify" \
10400 "$CVSROOT_DIRNAME/first-dir/Attic/bradd,v <-- bradd
10401 new revision: 1\.1\.2\.1; previous revision: 1\.1
10402 $CVSROOT_DIRNAME/first-dir/file1,v <-- file1
10403 new revision: 1\.1\.2\.1; previous revision: 1\.1"
10405 # Here is the unusual/pathological part. We switch back to
10406 # the trunk *for file1 only*, not for the whole directory.
10407 dotest join2-8
"${testcvs} -q update -A file1" '[UP] file1'
10408 dotest join2-9
"${testcvs} -q status file1" \
10409 "===================================================================
10410 File: file1 Status: Up-to-date
10412 Working revision: 1\.1.*
10413 Repository revision: 1\.1 ${CVSROOT_DIRNAME}/first-dir/file1,v
10414 Commit Identifier: ${commitid}
10416 Sticky Date: (none)
10417 Sticky Options: (none)"
10418 dotest join2-10
"cat CVS/Tag" "Tbr1"
10420 dotest join2-11
"${testcvs} -q update -j br1 file1" \
10421 "RCS file: ${CVSROOT_DIRNAME}/first-dir/file1,v
10422 retrieving revision 1\.1
10423 retrieving revision 1\.1\.2\.1
10424 Merging differences between 1\.1 and 1\.1\.2\.1 into file1"
10425 dotest join2-12
"cat file1" "initial contents of file1
10427 # We should have no sticky tag on file1
10428 dotest join2-13
"${testcvs} -q status file1" \
10429 "===================================================================
10430 File: file1 Status: Locally Modified
10432 Working revision: 1\.1.*
10433 Repository revision: 1\.1 ${CVSROOT_DIRNAME}/first-dir/file1,v
10434 Commit Identifier: ${commitid}
10436 Sticky Date: (none)
10437 Sticky Options: (none)"
10438 dotest join2-14
"cat CVS/Tag" "Tbr1"
10439 # And the checkin should go to the trunk
10440 dotest join2-15
"${testcvs} -q ci -m modify file1" \
10441 "$CVSROOT_DIRNAME/first-dir/file1,v <-- file1
10442 new revision: 1\.2; previous revision: 1\.1"
10444 # OK, the above is all well and good and has worked for some
10445 # time. Now try the case where the file had been added on
10447 dotest join2-16
"${testcvs} -q update -r br1" "[UP] file1"
10448 # The workaround is to update the whole directory.
10449 # The non-circumvented version won't work. The reason is that
10450 # update removes the entry from CVS/Entries, so of course we get
10451 # the tag from CVS/Tag and not Entries. I suppose maybe
10452 # we could invent some new format in Entries which would handle
10453 # this, but doing so, and handling it properly throughout
10454 # CVS, would be a lot of work and I'm not sure this case justifies
10456 dotest join2-17-circumvent
"${testcvs} -q update -A" \
10457 "${SPROG} update: \`bradd' is no longer in the repository
10459 : dotest join2-17
"${testcvs} -q update -A bradd" \
10460 "${SPROG} update: warning: \`bradd' is not (any longer) pertinent"
10461 dotest join2-18
"${testcvs} -q update -j br1 bradd" "U bradd"
10462 dotest join2-19
"${testcvs} -q status bradd" \
10463 "===================================================================
10464 File: bradd Status: Locally Added
10466 Working revision: New file!
10467 Repository revision: 1\.1 ${CVSROOT_DIRNAME}/first-dir/Attic/bradd,v
10468 Commit Identifier: ${commitid}
10470 Sticky Date: (none)
10471 Sticky Options: (none)"
10472 dotest join2-20
"${testcvs} -q ci -m modify bradd" \
10473 "$CVSROOT_DIRNAME/first-dir/bradd,v <-- bradd
10474 new revision: 1\.2; previous revision: 1\.1"
10479 modify_repo
rm -rf $CVSROOT_DIRNAME/first-dir
10485 # See "join" for a list of other joining/branching tests.
10486 # First the usual setup; create a directory first-dir, a file
10487 # first-dir/file1, and a branch br1.
10489 dotest join3-1
"${testcvs} -q co -l ." ''
10491 dotest join3-2
"${testcvs} add first-dir" \
10492 "Directory ${CVSROOT_DIRNAME}/first-dir added to the repository"
10494 echo 'initial contents of file1' >file1
10495 dotest join3-3
"${testcvs} add file1" \
10496 "${SPROG} add: scheduling file .file1. for addition
10497 ${SPROG} add: use .${SPROG} commit. to add this file permanently"
10498 dotest join3-4
"${testcvs} -q ci -m add" \
10499 "$CVSROOT_DIRNAME/first-dir/file1,v <-- file1
10500 initial revision: 1\.1"
10501 dotest join3-5
"${testcvs} -q tag -b br1" "T file1"
10502 dotest join3-6
"${testcvs} -q update -r br1" ""
10503 echo 'br1:line1' >>file1
10504 dotest join3-7
"${testcvs} -q ci -m modify" \
10505 "$CVSROOT_DIRNAME/first-dir/file1,v <-- file1
10506 new revision: 1\.1\.2\.1; previous revision: 1\.1"
10508 # Now back to the trunk for:
10509 # another revision and another branch for file1.
10510 # add file2, which will exist on trunk and br2 but not br1.
10511 dotest join3-8
"${testcvs} -q update -A" "[UP] file1"
10512 echo 'trunk:line1' > file2
10513 dotest join3-8a
"${testcvs} add file2" \
10514 "${SPROG} add: scheduling file .file2. for addition
10515 ${SPROG} add: use .${SPROG} commit. to add this file permanently"
10516 echo 'trunk:line1' >>file1
10517 dotest join3-9
"${testcvs} -q ci -m modify" \
10518 "$CVSROOT_DIRNAME/first-dir/file1,v <-- file1
10519 new revision: 1\.2; previous revision: 1\.1
10520 $CVSROOT_DIRNAME/first-dir/file2,v <-- file2
10521 initial revision: 1\.1"
10522 dotest join3-10
"${testcvs} -q tag -b br2" "T file1
10525 # Before we actually have any revision on br2, let's try a join
10526 dotest join3-11
"${testcvs} -q update -r br1" "[UP] file1
10527 ${SPROG} update: \`file2' is no longer in the repository"
10528 dotest join3-12
"${testcvs} -q update -j br2" \
10529 "RCS file: ${CVSROOT_DIRNAME}/first-dir/file1,v
10530 retrieving revision 1\.1
10531 retrieving revision 1\.2
10532 Merging differences between 1\.1 and 1\.2 into file1
10533 rcsmerge: warning: conflicts during merge
10535 dotest join3-13
"cat file1" \
10536 "initial contents of file1
10544 # OK, we'll try the same thing with a revision on br2.
10545 dotest join3-14
"${testcvs} -q update -r br2 file1" \
10546 "${SPROG} update: warning: \`file1' was lost
10548 echo 'br2:line1' >>file1
10549 dotest join3-15
"${testcvs} -q ci -m modify file1" \
10550 "$CVSROOT_DIRNAME/first-dir/file1,v <-- file1
10551 new revision: 1\.2\.2\.1; previous revision: 1\.2"
10553 # OK, now we can join br2 to br1
10554 dotest join3-16
"${testcvs} -q update -r br1 file1" "[UP] file1"
10555 # It may seem odd, to merge a higher branch into a lower
10556 # branch, but in fact CVS defines the ancestor as 1.1
10557 # and so it merges both the 1.1->1.2 and 1.2->1.2.2.1 changes.
10558 # This seems like a reasonably plausible behavior.
10559 dotest join3-17
"${testcvs} -q update -j br2 file1" \
10560 "RCS file: ${CVSROOT_DIRNAME}/first-dir/file1,v
10561 retrieving revision 1\.1
10562 retrieving revision 1\.2\.2\.1
10563 Merging differences between 1\.1 and 1\.2\.2\.1 into file1
10564 rcsmerge: warning: conflicts during merge"
10565 dotest join3-18
"cat file1" \
10566 "initial contents of file1
10572 [>]>>>>>> 1\.2\.2\.1"
10577 modify_repo
rm -rf $CVSROOT_DIRNAME/first-dir
10583 # Like join, but with local (uncommitted) modifications.
10585 modify_repo mkdir
$CVSROOT_DIRNAME/first-dir
10588 dotest join4-1
"${testcvs} -q co first-dir" ''
10593 echo 'first revision of file3' > file3
10594 echo 'first revision of file4' > file4
10595 echo 'first revision of file6' > file6
10596 echo 'first revision of file8' > file8
10597 echo 'first revision of file9' > file9
10598 dotest join4-2
"${testcvs} add file3 file4 file6 file8 file9" \
10599 "${SPROG}"' add: scheduling file `file3'\'' for addition
10600 '"${SPROG}"' add: scheduling file `file4'\'' for addition
10601 '"${SPROG}"' add: scheduling file `file6'\'' for addition
10602 '"${SPROG}"' add: scheduling file `file8'\'' for addition
10603 '"${SPROG}"' add: scheduling file `file9'\'' for addition
10604 '"${SPROG}"' add: use .'"${SPROG}"' commit. to add these files permanently'
10606 dotest join4-3
"${testcvs} -q commit -m add" \
10607 "$CVSROOT_DIRNAME/first-dir/file3,v <-- file3
10608 initial revision: 1\.1
10609 $CVSROOT_DIRNAME/first-dir/file4,v <-- file4
10610 initial revision: 1\.1
10611 $CVSROOT_DIRNAME/first-dir/file6,v <-- file6
10612 initial revision: 1\.1
10613 $CVSROOT_DIRNAME/first-dir/file8,v <-- file8
10614 initial revision: 1\.1
10615 $CVSROOT_DIRNAME/first-dir/file9,v <-- file9
10616 initial revision: 1\.1"
10619 dotest join4-4
"${testcvs} -q tag -b branch ." \
10627 echo 'first revision of file10' > file10
10628 dotest join4-7a
"${testcvs} add file10" \
10629 "${SPROG}"' add: scheduling file `file10'\'' for addition
10630 '"${SPROG}"' add: use .'"${SPROG}"' commit. to add this file permanently'
10631 dotest join4-7b
"${testcvs} -q ci -mx ." \
10632 "$CVSROOT_DIRNAME/first-dir/file10,v <-- file10
10633 initial revision: 1\.1"
10635 # Add file2 and file7, modify file4, and remove
10636 # file6, file8, file9, and file10.
10637 echo 'first revision of file2' > file2
10638 echo 'second revision of file4' > file4
10639 echo 'first revision of file7' > file7
10640 rm file6 file8 file9 file10
10641 dotest join4-5
"${testcvs} add file2 file7" \
10642 "${SPROG}"' add: scheduling file `file2'\'' for addition
10643 '"${SPROG}"' add: scheduling file `file7'\'' for addition
10644 '"${SPROG}"' add: use .'"${SPROG}"' commit. to add these files permanently'
10645 dotest join4-6
"${testcvs} rm file6 file8 file9 file10" \
10646 "${SPROG}"' remove: scheduling `file6'\'' for removal
10647 '"${SPROG}"' remove: scheduling `file8'\'' for removal
10648 '"${SPROG}"' remove: scheduling `file9'\'' for removal
10649 '"${SPROG}"' remove: scheduling `file10'\'' for removal
10650 '"${SPROG}"' remove: use .'"${SPROG}"' commit. to remove these files permanently'
10652 # Check out the branch.
10656 dotest join4-8
"${testcvs} -q co -r branch first-dir" \
10665 # Modify the files on the branch, so that T1 is not an
10666 # ancestor of the main line, and add file5
10667 echo 'first branch revision of file3' > file3
10668 echo 'first branch revision of file4' > file4
10669 echo 'first branch revision of file5' > file5
10670 echo 'first branch revision of file6' > file6
10671 echo 'first branch revision of file9' > file9
10672 dotest join4-9
"${testcvs} add file5" \
10673 "${SPROG}"' add: scheduling file `file5'\'' for addition on branch `branch'\''
10674 '"${SPROG}"' add: use .'"${SPROG}"' commit. to add this file permanently'
10675 dotest join4-10
"${testcvs} -q ci -mx ." \
10676 "$CVSROOT_DIRNAME/first-dir/file3,v <-- file3
10677 new revision: 1\.1\.2\.1; previous revision: 1\.1
10678 $CVSROOT_DIRNAME/first-dir/file4,v <-- file4
10679 new revision: 1\.1\.2\.1; previous revision: 1\.1
10680 $CVSROOT_DIRNAME/first-dir/Attic/file5,v <-- file5
10681 new revision: 1\.1\.2\.1; previous revision: 1\.1
10682 $CVSROOT_DIRNAME/first-dir/file6,v <-- file6
10683 new revision: 1\.1\.2\.1; previous revision: 1\.1
10684 $CVSROOT_DIRNAME/first-dir/file9,v <-- file9
10685 new revision: 1\.1\.2\.1; previous revision: 1\.1"
10687 # Tag the current revisions on the branch.
10688 dotest join4-11
"${testcvs} -q tag T1 ." \
10696 # Add file1 and file2, modify file9, and remove the other files.
10697 echo 'first branch revision of file1' > file1
10698 echo 'first branch revision of file2' > file2
10699 echo 'second branch revision of file9' > file9
10700 rm file3 file4 file5 file6
10701 dotest join4-12
"${testcvs} add file1 file2" \
10702 "${SPROG}"' add: scheduling file `file1'\'' for addition on branch `branch'\''
10703 '"${SPROG}"' add: scheduling file `file2'\'' for addition on branch `branch'\''
10704 '"${SPROG}"' add: use .'"${SPROG}"' commit. to add these files permanently'
10705 dotest join4-13
"${testcvs} rm file3 file4 file5 file6" \
10706 "${SPROG}"' remove: scheduling `file3'\'' for removal
10707 '"${SPROG}"' remove: scheduling `file4'\'' for removal
10708 '"${SPROG}"' remove: scheduling `file5'\'' for removal
10709 '"${SPROG}"' remove: scheduling `file6'\'' for removal
10710 '"${SPROG}"' remove: use .'"${SPROG}"' commit. to remove these files permanently'
10711 dotest join4-14
"${testcvs} -q ci -mx ." \
10712 "$CVSROOT_DIRNAME/first-dir/Attic/file1,v <-- file1
10713 new revision: 1\.1\.2\.1; previous revision: 1\.1
10714 $CVSROOT_DIRNAME/first-dir/Attic/file2,v <-- file2
10715 new revision: 1\.1\.2\.1; previous revision: 1\.1
10716 $CVSROOT_DIRNAME/first-dir/file3,v <-- file3
10717 new revision: delete; previous revision: 1\.1\.2\.1
10718 $CVSROOT_DIRNAME/first-dir/file4,v <-- file4
10719 new revision: delete; previous revision: 1\.1\.2\.1
10720 $CVSROOT_DIRNAME/first-dir/Attic/file5,v <-- file5
10721 new revision: delete; previous revision: 1\.1\.2\.1
10722 $CVSROOT_DIRNAME/first-dir/file6,v <-- file6
10723 new revision: delete; previous revision: 1\.1\.2\.1
10724 $CVSROOT_DIRNAME/first-dir/file9,v <-- file9
10725 new revision: 1\.1\.2\.2; previous revision: 1\.1\.2\.1"
10727 # Tag the current revisions on the branch.
10728 dotest join4-15
"${testcvs} -q tag T2 ." \
10734 # Modify file4 locally, and do an update with a merge.
10735 cd ..
/..
/1/first-dir
10736 echo 'third revision of file4' > file4
10737 dotest join4-18
"${testcvs} -q update -jT1 -jT2 ." \
10741 ${SPROG} update: file file2 exists, but has been added in revision T2
10742 ${SPROG} update: scheduling \`file3' for removal
10744 ${SPROG} update: file file4 is locally modified, but has been removed in revision T2
10749 ${SPROG} update: file file9 does not exist, but is present in revision T2"
10751 # Verify that the right changes have been scheduled.
10752 dotest join4-19
"${testcvs} -q update" \
10766 modify_repo
rm -rf $CVSROOT_DIRNAME/first-dir
10772 # This test verifies that CVS can handle filenames starting with a
10773 # dash (`-') properly. What used to happen was that CVS handled it
10774 # just fine, until it went to pass them as arguments to the diff
10775 # library, at which point it neglected to pass `--' before the file
10776 # list, causing the diff library to attempt to interpret the file
10777 # name as an argument.
10778 mkdir join5
; cd join5
10780 dotest join5-init-1
"${testcvs} -Q co -l ."
10782 dotest join5-init-2
"${testcvs} -Q add join5"
10784 echo "there once was a file from harrisburg" >-file
10785 echo "who's existance it seems was quiteabsurd" >>-file
10786 dotest join5-init-3
"${testcvs} -Q add -- -file"
10787 dotest join5-init-4
"${testcvs} -q ci -minitial" \
10788 "$CVSROOT_DIRNAME/join5/-file,v <-- -file
10789 initial revision: 1\.1"
10793 dotest join5-init-5
"${testcvs} -Q co join5"
10795 echo "it tested for free" >>-file
10796 echo "when paid it should be" >>-file
10797 dotest join5-init-4
"${testcvs} -q ci -msecond" \
10798 "$CVSROOT_DIRNAME/join5/-file,v <-- -file
10799 new revision: 1\.2; previous revision: 1\.1"
10803 echo "but maybe it could charge bytheword" >>-file
10804 # This is the test that used to spew complaints from diff3:
10805 dotest join5
"${testcvs} up" \
10806 "${SPROG} update: Updating \.
10807 RCS file: ${CVSROOT_DIRNAME}/join5/-file,v
10808 retrieving revision 1\.1
10809 retrieving revision 1\.2
10810 Merging differences between 1\.1 and 1\.2 into -file
10811 rcsmerge: warning: conflicts during merge
10812 ${SPROG} update: conflicts found in -file
10818 modify_repo
rm -rf $CVSROOT_DIRNAME/join5
10824 mkdir join6
; cd join6
10826 dotest join6-init-1
"${testcvs} -Q co -l ."
10828 dotest join6-init-2
"${testcvs} -Q add join6"
10831 echo bbb
>>temp.txt
10832 echo ccc
>>temp.txt
10833 dotest join6-1
"${testcvs} -Q add temp.txt"
10834 dotest join6-2
"${testcvs} -q commit -minitial temp.txt" \
10835 "$CVSROOT_DIRNAME/join6/temp\.txt,v <-- temp\.txt
10836 initial revision: 1\.1"
10837 cp temp.txt temp2.txt
10838 echo ddd
>>temp.txt
10839 dotest join6-3
"${testcvs} -q commit -madd temp.txt" \
10840 "$CVSROOT_DIRNAME/join6/temp.txt,v <-- temp\.txt
10841 new revision: 1\.2; previous revision: 1\.1"
10843 # The case where the merge target is up-to-date and its base revision
10844 # matches the second argument to -j: CVS doesn't bother attempting
10845 # the merge since it already knows that the target contains the
10847 dotest join6-3.3
"${testcvs} update -j1.1 -j1.2 temp.txt" \
10848 "temp\.txt already contains the differences between 1\.1 and 1\.2"
10849 dotest join6-3.4
"${testcvs} diff temp.txt" ""
10851 # The case where the merge target is modified but already contains
10854 echo ccc
>>temp.txt
10855 echo ddd
>>temp.txt
10856 dotest join6-3.5
"${testcvs} update -j1.1 -j1.2 temp.txt" \
10858 RCS file: ${CVSROOT_DIRNAME}/join6/temp\.txt,v
10859 retrieving revision 1\.1
10860 retrieving revision 1\.2
10861 Merging differences between 1\.1 and 1\.2 into temp\.txt
10862 temp\.txt already contains the differences between 1\.1 and 1\.2"
10863 dotest_fail join6-3.6
"${testcvs} diff temp.txt" \
10865 ===================================================================
10866 RCS file: ${CVSROOT_DIRNAME}/join6/temp\.txt,v
10867 retrieving revision 1\.2
10868 diff -r1\.2 temp.txt
10872 cp temp2.txt temp.txt
10873 dotest_fail join6-4
"${testcvs} diff temp.txt" \
10875 ===================================================================
10876 RCS file: ${CVSROOT_DIRNAME}/join6/temp\.txt,v
10877 retrieving revision 1\.2
10878 diff -r1\.2 temp\.txt
10882 dotest join6-5
"${testcvs} update -j1.1 -j1.2 temp.txt" \
10884 RCS file: ${CVSROOT_DIRNAME}/join6/temp\.txt,v
10885 retrieving revision 1\.1
10886 retrieving revision 1\.2
10887 Merging differences between 1\.1 and 1\.2 into temp\.txt"
10888 dotest join6-6
"${testcvs} diff temp.txt" ""
10889 mv temp.txt temp3.txt
10890 dotest join6-7
"sed 's/ddd/dddd/' < temp3.txt > temp.txt" ""
10891 dotest join6-8
"${testcvs} update -j1.1 -j1.2 temp.txt" \
10893 RCS file: ${CVSROOT_DIRNAME}/join6/temp\.txt,v
10894 retrieving revision 1\.1
10895 retrieving revision 1\.2
10896 Merging differences between 1\.1 and 1\.2 into temp\.txt
10897 rcsmerge: warning: conflicts during merge"
10898 dotest_fail join6-9
"${testcvs} diff temp.txt" \
10900 ===================================================================
10901 RCS file: ${CVSROOT_DIRNAME}/join6/temp.txt,v
10902 retrieving revision 1\.2
10903 diff -r1\.2 temp\.txt
10905 > <<<<<<< temp\.txt
10910 cp temp2.txt temp.txt
10911 dotest join6-10
"${testcvs} -q ci -m del temp.txt" \
10912 "$CVSROOT_DIRNAME/join6/temp.txt,v <-- temp\.txt
10913 new revision: 1\.3; previous revision: 1\.2"
10914 cp temp3.txt temp.txt
10915 dotest_fail join6-11
"${testcvs} diff temp.txt" \
10917 ===================================================================
10918 RCS file: ${CVSROOT_DIRNAME}/join6/temp.txt,v
10919 retrieving revision 1\.3
10920 diff -r1\.3 temp\.txt
10923 dotest join6-12
"${testcvs} update -j1.2 -j1.3 temp.txt" \
10925 RCS file: ${CVSROOT_DIRNAME}/join6/temp\.txt,v
10926 retrieving revision 1\.2
10927 retrieving revision 1\.3
10928 Merging differences between 1\.2 and 1\.3 into temp\.txt"
10929 dotest join6-13
"${testcvs} diff temp.txt" ""
10931 # The case where the merge target wasn't created until after the
10932 # first tag was applied
10933 rm temp2.txt temp3.txt
10934 dotest join6-20
"${testcvs} -q tag -r1.1 t1" \
10936 echo xxx
>temp2.txt
10937 dotest join6-21
"${testcvs} -Q add temp2.txt"
10938 dotest join6-22
"${testcvs} -q ci -m." \
10939 "$CVSROOT_DIRNAME/join6/temp2\.txt,v <-- temp2\.txt
10940 initial revision: 1\.1"
10941 dotest join6-23
"${testcvs} -q tag t2" \
10944 echo xxx
>>temp.txt
10945 dotest join6-24
"${testcvs} -q ci -m." \
10946 "$CVSROOT_DIRNAME/join6/temp.txt,v <-- temp\.txt
10947 new revision: 1\.4; previous revision: 1\.3"
10948 dotest join6-25
"${testcvs} -q up -jt1 -jt2" \
10949 "RCS file: ${CVSROOT_DIRNAME}/join6/temp.txt,v
10950 retrieving revision 1\.1
10951 retrieving revision 1\.3
10952 Merging differences between 1\.1 and 1\.3 into temp.txt
10953 temp.txt already contains the differences between 1\.1 and 1\.3
10954 temp2.txt already contains the differences between creation and 1\.1"
10956 # Now for my next trick: delete the file, recreate it, and
10958 dotest join6-30
"${testcvs} -q rm -f temp2.txt" \
10959 "${SPROG} remove: use .${SPROG} commit. to remove this file permanently"
10960 dotest join6-31
"${testcvs} -q ci -m. temp2.txt" \
10961 "$CVSROOT_DIRNAME/join6/temp2\.txt,v <-- temp2\.txt
10962 new revision: delete; previous revision: 1\.1"
10963 echo new
>temp2.txt
10964 # FIXCVS: Local and remote really shouldn't be different and there
10965 # really shouldn't be two different status lines for temp2.txt
10967 dotest_fail join6-32
"${testcvs} -q up -jt1 -jt2" \
10969 RCS file: ${CVSROOT_DIRNAME}/join6/temp.txt,v
10970 retrieving revision 1\.1
10971 retrieving revision 1\.3
10972 Merging differences between 1\.1 and 1\.3 into temp.txt
10973 temp.txt already contains the differences between 1\.1 and 1\.3
10974 $CPROG update: move away .\./temp2\.txt.; it is in the way
10977 dotest join6-32
"${testcvs} -q up -jt1 -jt2" \
10978 "RCS file: ${CVSROOT_DIRNAME}/join6/temp.txt,v
10979 retrieving revision 1\.1
10980 retrieving revision 1\.3
10981 Merging differences between 1\.1 and 1\.3 into temp.txt
10982 temp.txt already contains the differences between 1\.1 and 1\.3
10983 ${SPROG} update: use .${SPROG} add. to create an entry for .temp2\.txt.
10991 modify_repo
rm -rf $CVSROOT_DIRNAME/join6
10997 # This test deals with joins that happen with the -n switch
10998 mkdir join7
; cd join7
10999 mkdir impdir
; cd impdir
11001 echo bbb
>>temp.txt
11002 echo ccc
>>temp.txt
11004 "${testcvs} -Q import -minitial join7 vendor vers-1" \
11007 dotest join7-2
"${testcvs} -Q co join7" ""
11009 echo ddd
>> temp.txt
11010 dotest join7-3
"${testcvs} -Q ci -madded-line temp.txt" ""
11012 echo aaaa
>temp.txt
11013 echo bbbb
>>temp.txt
11014 echo ccc
>>temp.txt
11015 echo eee
>>temp.txt
11017 "${testcvs} -Q import -minitial join7 vendor vers-2" \
11021 "${testcvs} -n update -jvers-1 -jvers-2 temp.txt" \
11022 "RCS file: $CVSROOT_DIRNAME/join7/temp.txt,v
11023 retrieving revision 1\.1\.1\.1
11024 retrieving revision 1\.1\.1\.2
11025 Merging differences between 1\.1\.1\.1 and 1\.1\.1\.2 into temp.txt
11026 rcsmerge: warning: conflicts during merge"
11028 dotest join7-6
"${testcvs} -n update -jvers-1 -jvers-2 temp.txt" \
11029 "RCS file: $CVSROOT_DIRNAME/join7/temp.txt,v
11030 retrieving revision 1\.1\.1\.1
11031 retrieving revision 1\.1\.1\.2
11032 Merging differences between 1\.1\.1\.1 and 1\.1\.1\.2 into temp.txt
11033 rcsmerge: warning: conflicts during merge" \
11034 "RCS file: $CVSROOT_DIRNAME/join7/temp.txt,v
11035 retrieving revision 1\.1\.1\.1
11036 retrieving revision 1\.1\.1\.2
11037 Merging differences between 1\.1\.1\.1 and 1\.1\.1\.2 into temp.txt
11038 rcsmerge: warning: conflicts during merge"
11043 modify_repo
rm -rf $CVSROOT_DIRNAME/join7
11048 join-readonly-conflict
)
11049 # Previously, only tests 1 & 11 were being tested. I added the
11050 # intermediate dotest's to try and diagnose a different failure
11052 # Demonstrate that cvs-1.9.29 can fail on 2nd and subsequent
11053 # conflict-evoking join attempts.
11054 # Even with that version of CVS, This test failed only in
11055 # client-server mode, and would have been noticed in normal
11056 # operation only for files that were read-only (either due to
11057 # use of cvs' global -r option, setting the CVSREAD envvar,
11058 # or use of watch lists).
11059 mkdir join-readonly-conflict
; cd join-readonly-conflict
11060 dotest join-readonly-conflict-1
"$testcvs -q co -l ." ''
11061 module
=join-readonly-conflict
11063 $testcvs -q add
$module >>$LOGFILE 2>&1
11068 dotest join-readonly-conflict-2
"$testcvs -Q add $file" ''
11070 dotest join-readonly-conflict-3
"$testcvs -q ci -m . $file" \
11071 "$CVSROOT_DIRNAME/$module/$file,v <-- $file
11072 initial revision: 1\.1"
11074 dotest join-readonly-conflict-4
"$testcvs tag -b B $file" "T $file"
11075 dotest join-readonly-conflict-5
"$testcvs -q update -rB $file" ''
11076 echo branch B
> $file
11077 dotest join-readonly-conflict-6
"$testcvs -q ci -m . $file" \
11078 "$CVSROOT_DIRNAME/$module/$file,v <-- $file
11079 new revision: 1\.1\.2\.1; previous revision: 1\.1"
11082 dotest join-readonly-conflict-7
"$testcvs -Q update -A $file" ''
11083 # Make sure $file is read-only. This can happen more realistically
11084 # via patch -- which could be used to apply a delta, yet would
11085 # preserve a file's read-only permissions.
11086 echo conflict
> $file; chmod u-w
$file
11087 dotest join-readonly-conflict-8
"$testcvs update -r B $file" \
11088 "RCS file: $CVSROOT_DIRNAME/$module/$file,v
11089 retrieving revision 1\.1
11090 retrieving revision 1\.1\.2\.1
11091 Merging differences between 1\.1 and 1\.1\.2\.1 into $file
11092 rcsmerge: warning: conflicts during merge
11093 ${SPROG} update: conflicts found in $file
11096 # restore to the trunk
11098 dotest join-readonly-conflict-9
"$testcvs -Q update -A $file" ''
11100 # This one would fail because cvs couldn't open the existing
11101 # (and read-only) .# file for writing.
11102 echo conflict
> $file
11104 # verify that the backup file is not writable
11105 if test -w ".#$file.1.1"; then
11106 fail
"join-readonly-conflict-10 : .#$file.1.1 is writable"
11108 pass
"join-readonly-conflict-10"
11110 dotest join-readonly-conflict-11
"$testcvs update -r B $file" \
11111 "RCS file: $CVSROOT_DIRNAME/$module/$file,v
11112 retrieving revision 1\.1
11113 retrieving revision 1\.1\.2\.1
11114 Merging differences between 1\.1 and 1\.1\.2\.1 into $file
11115 rcsmerge: warning: conflicts during merge
11116 ${SPROG} update: conflicts found in $file
11121 rm -r join-readonly-conflict
11122 modify_repo
rm -rf $CVSROOT_DIRNAME/$module
11129 dotest join-admin-0-1
"$testcvs -q co -l ."
11132 dotest join-admin-0-2
"$testcvs -q add $module" \
11133 "Directory $CVSROOT_DIRNAME/$module added to the repository"
11136 # Create a file so applying the first tag works.
11138 dotest join-admin-0-3
"$testcvs -Q add a" ''
11139 dotest join-admin-0-4
"$testcvs -Q ci -m. a" ''
11141 dotest join-admin-0-5
"$testcvs -Q tag -b B" ''
11142 dotest join-admin-0-6
"$testcvs -Q tag -b M1" ''
11144 dotest join-admin-0-7
"$testcvs -Q add b" ''
11145 dotest join-admin-0-8
"$testcvs -Q ci -m. b" ''
11146 dotest join-admin-0-9
"$testcvs -Q tag -b M2" ''
11148 dotest join-admin-0-10
"$testcvs -Q update -r B" ''
11149 dotest join-admin-0-11
"$testcvs -Q update -kk -jM1 -jM2" ''
11150 dotest join-admin-0-12
"$testcvs -Q ci -m. b" ''
11152 dotest join-admin-0-13
"$testcvs -Q update -A" ''
11154 # Verify that the -kk flag from the update did not
11155 # propagate to the repository.
11156 dotest join-admin-1
"$testcvs status b" \
11157 "===================================================================
11158 File: b Status: Up-to-date
11160 Working revision: 1\.1.*
11161 Repository revision: 1\.1 ${CVSROOT_DIRNAME}/x/b,v
11162 Commit Identifier: ${commitid}
11164 Sticky Date: (none)
11165 Sticky Options: (none)"
11170 modify_repo
rm -rf $CVSROOT_DIRNAME/$module
11176 # Show that when a merge (via update -kk -jtag1 -jtag2) first
11177 # removes a file, then modifies another containing an $Id...$ line,
11178 # the resulting file contains the unexpanded `$Id.$' string, as
11181 dotest join-admin-2-1
"$testcvs -q co -l ." ''
11184 dotest join-admin-2-2
"$testcvs -q add $module" \
11185 "Directory ${CVSROOT_DIRNAME}/x added to the repository"
11188 # Create a file so applying the first tag works.
11191 dotest join-admin-2-3
"$testcvs -Q add e"
11192 dotest join-admin-2-4
"$testcvs -Q ci -m. e"
11194 dotest join-admin-2-5
"$testcvs -Q tag -b T" '' "${QUESTION} e0"
11195 dotest join-admin-2-6
"$testcvs -Q update -r T" '' "${QUESTION} e0"
11197 dotest join-admin-2-7
"$testcvs -Q ci -m. e"
11199 dotest join-admin-2-8
"$testcvs -Q update -A" '' "${QUESTION} e0"
11200 dotest join-admin-2-9
"$testcvs -Q tag -b M1" '' "${QUESTION} e0"
11203 dotest join-admin-2-10
"$testcvs -Q add b" ''
11205 dotest join-admin-2-11
"$testcvs -Q ci -m. b e"
11207 dotest join-admin-2-12
"$testcvs -Q tag -b M2" '' "${QUESTION} e0"
11209 dotest join-admin-2-13
"$testcvs -Q update -r T" '' "${QUESTION} e0"
11210 dotest join-admin-2-14
"$testcvs update -kk -jM1 -jM2" \
11211 "${SPROG} update: Updating .
11214 RCS file: ${CVSROOT_DIRNAME}/x/e,v
11215 retrieving revision 1\.1
11216 retrieving revision 1\.2
11217 Merging differences between 1\.1 and 1\.2 into e
11218 e already contains the differences between 1\.1 and 1\.2
11221 ${SPROG} update: Updating .
11224 RCS file: ${CVSROOT_DIRNAME}/x/e,v
11225 retrieving revision 1\.1
11226 retrieving revision 1\.2
11227 Merging differences between 1\.1 and 1\.2 into e
11228 e already contains the differences between 1\.1 and 1\.2"
11230 # Verify that the $Id.$ string is not expanded.
11231 dotest join-admin-2-15
"cat e" '$''Id$'
11236 modify_repo
rm -rf $CVSROOT_DIRNAME/$module
11242 # This first half of this test checks that a single-argument merge
11243 # from a branch is capable of removing files.
11245 # The second half verifies that an update to another location with an
11246 # uncommitted removal will transfer the destination branch of the
11250 mkdir
$module; cd $module
11252 dotest join-rm-init-1
"$testcvs -q co -l ." ''
11254 dotest join-rm-init-2
"$testcvs -q add $module" \
11255 "Directory $CVSROOT_DIRNAME/$module added to the repository"
11259 touch a b c d e f g
11260 dotest join-rm-init-3
"$testcvs -Q add a b c d e f g"
11261 dotest join-rm-init-4
"$testcvs -Q ci -m add-em"
11263 # create the branch and update to it
11264 dotest join-rm-init-5
"$testcvs -Q tag -b br"
11265 dotest join-rm-init-6
"$testcvs -Q up -rbr"
11267 # remove a few files from the branch
11268 dotest join-rm-init-7
"$testcvs -Q rm -f b d g"
11269 dotest join-rm-init-8
"$testcvs -Q ci -mrm"
11271 # update to the trunk
11272 dotest join-rm-init-9
"$testcvs -Q up -A"
11274 # now for the test - try and merge the removals.
11275 dotest join-rm-1
"$testcvs -q up -jbr" \
11276 "$SPROG update: scheduling \`b' for removal
11277 $SPROG update: scheduling \`d' for removal
11278 $SPROG update: scheduling \`g' for removal"
11280 # And make sure the merge took
11281 dotest join-rm-2
"$testcvs -qn up" \
11286 dotest join-rm-3
"$testcvs -q ci -m 'save the merge'" \
11287 "$CVSROOT_DIRNAME/join-rm/b,v <-- b
11288 new revision: delete; previous revision: 1\.1
11289 $CVSROOT_DIRNAME/join-rm/d,v <-- d
11290 new revision: delete; previous revision: 1\.1
11291 $CVSROOT_DIRNAME/join-rm/g,v <-- g
11292 new revision: delete; previous revision: 1\.1"
11294 # and verify that it was the head revision which was removed.
11295 dotest join-rm-4
"$testcvs -q log b" "
11296 RCS file: $CVSROOT_DIRNAME/join-rm/Attic/b,v
11304 keyword substitution: kv
11305 total revisions: 3; selected revisions: 3
11307 ----------------------------
11309 date: ${ISO8601DATE}; author: $username; state: dead; lines: ${PLUS}0 -0; commitid: ${commitid};
11311 ----------------------------
11313 date: ${ISO8601DATE}; author: $username; state: Exp; commitid: ${commitid};
11316 ----------------------------
11317 revision 1\.1\.2\.1
11318 date: ${ISO8601DATE}; author: $username; state: dead; lines: ${PLUS}0 -0; commitid: ${commitid};
11320 ============================================================================="
11322 # go back to the branch to set up for the second set of tests
11323 dotest join-rm-init-10
"$testcvs -Q up -rbr"
11324 dotest join-rm-init-11
"$testcvs -Q rm -f a"
11325 dotest join-rm-init-12
"$testcvs -Q ci -m rma"
11327 # now the test: update to the trunk
11329 # FIXCVS: This update should merge the removal to the trunk. It does
11331 dotest join-rm-5
"$testcvs -q up -A" "U a"
11333 # and verify that there is no sticky tag
11334 dotest join-rm-6
"$testcvs status a" \
11335 "===================================================================
11336 File: a Status: Up-to-date
11338 Working revision: 1\.1.*
11339 Repository revision: 1\.1 $CVSROOT_DIRNAME/join-rm/a,v
11340 Commit Identifier: ${commitid}
11342 Sticky Date: (none)
11343 Sticky Options: (none)"
11347 modify_repo
rm -rf $CVSROOT_DIRNAME/$module
11353 new
) # look for stray "no longer pertinent" messages.
11354 modify_repo mkdir
$CVSROOT_DIRNAME/first-dir
11355 dotest new-init-1
"$testcvs -Q co first-dir"
11360 dotest new-1
"$testcvs -Q add a"
11362 dotest new-2
"$testcvs -Q ci -m added"
11365 dotest new-3
"$testcvs -Q rm a"
11366 dotest new-4
"$testcvs -Q ci -m removed"
11367 dotest new-5
"$testcvs -Q update -A"
11368 dotest new-6
"$testcvs -Q update -rHEAD"
11373 modify_repo
rm -rf $CVSROOT_DIRNAME/first-dir
11379 # Test removing a file on a branch and then checking it out.
11381 # We call this "newb" only because it, like the "new" tests,
11382 # has something to do with "no longer pertinent" messages.
11383 # Not necessarily the most brilliant nomenclature.
11386 modify_repo mkdir
$CVSROOT_DIRNAME/first-dir
11387 dotest newb-123a
"${testcvs} -q co first-dir" ''
11390 dotest newb-123b
"${testcvs} add a" \
11391 "${SPROG} add: scheduling file .a. for addition
11392 ${SPROG} add: use .${SPROG} commit. to add this file permanently"
11393 dotest newb-123c
"${testcvs} -q ci -m added" \
11394 "$CVSROOT_DIRNAME/first-dir/a,v <-- a
11395 initial revision: 1\.1"
11398 dotest newb-123d
"${testcvs} -q tag -b branch" "T a"
11400 # Check out the branch.
11405 dotest newb-123e
"${testcvs} -q co -r branch first-dir" \
11408 # Remove 'a' on another copy of the branch.
11412 dotest newb-123f
"${testcvs} -q co -r branch first-dir" \
11416 dotest newb-123g
"${testcvs} rm a" \
11417 "${SPROG} remove: scheduling .a. for removal
11418 ${SPROG} remove: use .${SPROG} commit. to remove this file permanently"
11419 dotest newb-123h
"${testcvs} -q ci -m removed" \
11420 "$CVSROOT_DIRNAME/first-dir/a,v <-- a
11421 new revision: delete; previous revision: 1\.1"
11423 # Check out the file on the branch. This should report
11424 # that the file is not pertinent, but it should not
11425 # say anything else.
11428 dotest newb-123i
"${testcvs} -q co -r branch first-dir/a" \
11429 "${SPROG} checkout: warning: \`first-dir/a' is not (any longer) pertinent"
11431 # Update the other copy, and make sure that a is removed.
11433 # "Entry Invalid" is a rather strange output here. Something like
11434 # "Removed in Repository" would make more sense.
11435 dotest newb-123j0
"${testcvs} status a" \
11436 "${SPROG} status: \`a' is no longer in the repository
11437 ===================================================================
11438 File: a Status: Entry Invalid
11440 Working revision: 1\.1.*
11441 Repository revision: 1\.1\.2\.1 ${CVSROOT_DIRNAME}/first-dir/a,v
11442 Commit Identifier: ${commitid}
11443 Sticky Tag: branch (branch: 1\.1\.2)
11444 Sticky Date: (none)
11445 Sticky Options: (none)${DOTSTAR}"
11446 dotest newb-123j
"${testcvs} -q update" \
11447 "${SPROG} update: \`a' is no longer in the repository"
11458 modify_repo
rm -rf $CVSROOT_DIRNAME/first-dir
11464 modify_repo mkdir
$CVSROOT_DIRNAME/first-dir
11469 dotest conflicts-124
"${testcvs} -q co first-dir" ''
11474 dotest conflicts-125
"${testcvs} add a" \
11475 "${SPROG} add: scheduling file .a. for addition
11476 ${SPROG} add: use .${SPROG} commit. to add this file permanently"
11477 dotest conflicts-126
"${testcvs} -q ci -m added" \
11478 "$CVSROOT_DIRNAME/first-dir/a,v <-- a
11479 initial revision: 1\.1"
11485 dotest conflicts-126.5
"${testcvs} co -p first-dir" \
11486 "${SPROG} checkout: Updating first-dir
11487 ===================================================================
11488 Checking out first-dir/a
11489 RCS: ${CVSROOT_DIRNAME}/first-dir/a,v
11491 \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*"
11492 dotest conflicts-127
"${testcvs} -Q co first-dir" ''
11494 dotest conflicts-127a
"test -f a" ''
11496 cd ..
/..
/1/first-dir
11497 echo add a line
>>a
11499 dotest conflicts-127b
"${testcvs} add dir1" \
11500 "Directory ${CVSROOT_DIRNAME}/first-dir/dir1 added to the repository"
11501 dotest conflicts-128
"${testcvs} -q ci -m changed" \
11502 "$CVSROOT_DIRNAME/first-dir/a,v <-- a
11503 new revision: 1\.2; previous revision: 1\.1"
11506 # Similar to conflicts-126.5, but now the file has nonempty
11510 dotest conflicts-128.5
"${testcvs} co -p -l first-dir" \
11511 "${SPROG} checkout: Updating first-dir
11512 ===================================================================
11513 Checking out first-dir/a
11514 RCS: ${CVSROOT_DIRNAME}/first-dir/a,v
11516 \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*
11521 # Now go over the to the other working directory and
11522 # start testing conflicts
11524 echo add a conflicting line
>>a
11525 dotest_fail conflicts-129
"${testcvs} -q ci -m changed" \
11526 "${SPROG}"' commit: Up-to-date check failed for `a'\''
11527 '"${SPROG}"' \[commit aborted\]: correct above errors first!'
11530 dotest conflicts-status-0
"${testcvs} status a" \
11531 "===================================================================
11532 File: a Status: Needs Merge
11534 Working revision: 1\.1.*
11535 Repository revision: 1\.2 ${CVSROOT_DIRNAME}/first-dir/a,v
11536 Commit Identifier: ${commitid}
11538 Sticky Date: (none)
11539 Sticky Options: (none)"
11540 dotest conflicts-129a
"${testcvs} -nq update a" \
11541 "RCS file: ${CVSROOT_DIRNAME}/first-dir/a,v
11542 retrieving revision 1\.1
11543 retrieving revision 1\.2
11544 Merging differences between 1\.1 and 1\.2 into a
11545 rcsmerge: warning: conflicts during merge
11546 ${SPROG} update: conflicts found in a
11548 dotest conflicts-130
"${testcvs} -q update" \
11549 "RCS file: ${CVSROOT_DIRNAME}/first-dir/a,v
11550 retrieving revision 1\.1
11551 retrieving revision 1\.2
11552 Merging differences between 1\.1 and 1\.2 into a
11553 rcsmerge: warning: conflicts during merge
11554 ${SPROG} update: conflicts found in a
11557 ${QUESTION} sdir" \
11560 RCS file: ${CVSROOT_DIRNAME}/first-dir/a,v
11561 retrieving revision 1\.1
11562 retrieving revision 1\.2
11563 Merging differences between 1\.1 and 1\.2 into a
11564 rcsmerge: warning: conflicts during merge
11565 ${SPROG} update: conflicts found in a
11569 dotest conflicts-status-1
"${testcvs} status a" \
11570 "===================================================================
11571 File: a Status: Unresolved Conflict
11573 Working revision: 1\.2.*
11574 Repository revision: 1\.2 ${CVSROOT_DIRNAME}/first-dir/a,v
11575 Commit Identifier: ${commitid}
11577 Sticky Date: (none)
11578 Sticky Options: (none)"
11579 dotest_fail conflicts-131
"${testcvs} -q ci -m try" \
11580 "${SPROG} commit: file .a. had a conflict and has not been modified
11581 ${SPROG} \[commit aborted\]: correct above errors first!"
11583 # Try to check in the file with the conflict markers in it.
11584 # Make sure we detect any one of the three conflict markers
11586 grep '^<<<<<<<' aa >a
11587 dotest conflicts-status-2 "${testcvs} -nq ci -m try a" \
11588 "${SPROG} commit: warning: file .a. seems to still contain conflict indicators"
11590 grep '^
=======' aa >a
11591 dotest conflicts-status-3 "${testcvs} -nq ci -m try a" \
11592 "${SPROG} commit: warning: file .a. seems to still contain conflict indicators"
11594 grep '^
>>>>>>>' aa >a
11595 dotest conflicts-status-4 "${testcvs} -qn ci -m try a" \
11596 "${SPROG} commit: warning: file .a. seems to still contain conflict indicators"
11599 echo lame attempt at resolving it >>a
11600 dotest conflicts-status-5 "${testcvs} status a" \
11601 "===================================================================
11602 File: a Status: File had conflicts on merge
11604 Working revision: 1\.2.*
11605 Repository revision: 1\.2 ${CVSROOT_DIRNAME}/first-dir/a,v
11606 Commit Identifier: ${commitid}
11608 Sticky Date: (none)
11609 Sticky Options: (none)"
11610 dotest conflicts-132 "$testcvs -q ci -m try" \
11611 "$SPROG commit: warning: file .a. seems to still contain conflict indicators
11612 $CVSROOT_DIRNAME/first-dir/a,v <-- a
11613 new revision: 1\.3; previous revision: 1\.2"
11615 # OK, the user saw the warning (good user), and now
11616 # resolves it for real.
11617 echo resolve conflict >a
11618 dotest conflicts-status-6 "${testcvs} status a" \
11619 "===================================================================
11620 File: a Status: Locally Modified
11622 Working revision: 1\.3.*
11623 Repository revision: 1\.3 ${CVSROOT_DIRNAME}/first-dir/a,v
11624 Commit Identifier: ${commitid}
11626 Sticky Date: (none)
11627 Sticky Options: (none)"
11628 dotest conflicts-133 "${testcvs} -q ci -m resolved" \
11629 "$CVSROOT_DIRNAME/first-dir/a,v <-- a
11630 new revision: 1\.4; previous revision: 1\.3"
11631 dotest conflicts-status-7 "${testcvs} status a" \
11632 "===================================================================
11633 File: a Status: Up-to-date
11635 Working revision: 1\.4.*
11636 Repository revision: 1\.4 ${CVSROOT_DIRNAME}/first-dir/a,v
11637 Commit Identifier: ${commitid}
11639 Sticky Date: (none)
11640 Sticky Options: (none)"
11642 # Now test that we can add a file in one working directory
11643 # and have an update in another get it.
11644 cd ../../1/first-dir
11646 if ${testcvs} add abc >>${LOGFILE} 2>&1; then
11651 if ${testcvs} ci -m 'add abc
' abc >>${LOGFILE} 2>&1; then
11657 mkdir first-dir/dir1 first-dir/sdir
11658 dotest conflicts-136 "${testcvs} -q update first-dir" \
11659 '[UP
] first-dir
/abc
11660 '"${QUESTION}"' first-dir
/dir1
11661 '"${QUESTION}"' first-dir
/sdir
' \
11662 ''"${QUESTION}"' first-dir
/dir1
11663 '"${QUESTION}"' first-dir
/sdir
11664 [UP
] first-dir
/abc
'
11665 dotest conflicts-137 'test -f first-dir
/abc
' ''
11666 rmdir first-dir/dir1 first-dir/sdir
11668 # Now test something similar, but in which the parent directory
11669 # (not the directory in question) has the Entries.Static flag
11673 dotest conflicts-138 "${testcvs} add subdir" "${DOTSTAR}"
11677 dotest conflicts-139 \
11678 "${testcvs} -q co first-dir/abc first-dir/subdir" "${DOTSTAR}"
11679 cd ../1/first-dir/subdir
11681 dotest conflicts-140 "${testcvs} add sss" "${DOTSTAR}"
11682 dotest conflicts-140a "${testcvs} ci -m adding sss" \
11684 cd ../../../3/first-dir
11685 dotest conflicts-141 "${testcvs} -q update" "${DOTSTAR}"
11686 dotest conflicts-142 "test -f subdir/sss"
11691 modify_repo rm -rf $CVSROOT_DIRNAME/first-dir
11698 # More conflicts tests; separate from conflicts to keep each
11699 # test a manageable size.
11700 modify_repo mkdir $CVSROOT_DIRNAME/first-dir
11705 dotest conflicts2-142a1 "${testcvs} -q co first-dir" ''
11710 dotest conflicts2-142a2 "${testcvs} add a abc" \
11711 "${SPROG} add: scheduling file .a. for addition
11712 ${SPROG} add: scheduling file .abc. for addition
11713 ${SPROG} add: use .${SPROG} commit. to add these files permanently"
11714 dotest conflicts2-142a3 "${testcvs} -q ci -m added" \
11715 "$CVSROOT_DIRNAME/first-dir/a,v <-- a
11716 initial revision: 1\.1
11717 ${CVSROOT_DIRNAME}/first-dir/abc,v <-- abc
11718 initial revision: 1\.1"
11724 dotest conflicts2-142a4 "${testcvs} -q co first-dir" 'U first-dir
/a
11728 # BEGIN TESTS USING THE FILE A
11729 # FIXME: would be cleaner to separate them out into their own
11730 # tests; conflicts2 is getting long.
11731 # Now test that if one person modifies and commits a
11732 # file and a second person removes it, it is a
11736 dotest conflicts2-142b2 "${testcvs} -q ci -m modify-a" \
11737 "$CVSROOT_DIRNAME/first-dir/a,v <-- a
11738 new revision: 1\.2; previous revision: 1\.1"
11739 cd ../../2/first-dir
11741 dotest conflicts2-142b3 "${testcvs} rm a" \
11742 "${SPROG} remove: scheduling .a. for removal
11743 ${SPROG} remove: use .${SPROG} commit. to remove this file permanently"
11744 dotest_fail conflicts2-142b4 "${testcvs} -q update" \
11745 "${SPROG} update: conflict: removed \`a' was modified by second party
11747 # Resolve the conflict by deciding not to remove the file
11749 dotest_sort conflicts2-142b5 "$testcvs add a
" "U a
11750 ${SPROG} add
: \
`a', version 1\.1, resurrected"
11751 dotest conflicts2-142b5b1 "$testcvs status a" \
11752 "===================================================================
11753 File: a Status: Needs Patch
11755 Working revision: 1\.1.*
11756 Repository revision: 1\.2 $CVSROOT_DIRNAME/first-dir/a,v
11757 Commit Identifier: ${commitid}
11759 Sticky Date: (none)
11760 Sticky Options: (none)"
11761 dotest conflicts2-142b6 "$testcvs -q update" 'U a'
11763 # Now one level up.
11765 dotest conflicts2-142b7 "${testcvs} rm -f first-dir/a" \
11766 "${SPROG} remove: scheduling \`first-dir
/a
' for removal
11767 ${SPROG} remove: use \`${SPROG} commit' to remove this
file permanently
"
11770 # Haven't investigated this one.
11771 dotest_fail conflicts2-142b8r "$testcvs add first-dir
/a
" \
11772 "${CPROG} add
: in directory \
`\.':
11773 ${CPROG} \[add aborted\]: there is no version here; do \`${CPROG} checkout
' first"
11776 dotest conflicts2-142b8 "${testcvs} add first-dir/a" \
11778 $SPROG add: \`first-dir/a', version
1\
.2, resurrected
"
11780 # Now recover from the damage that the 142b8 test did.
11781 dotest conflicts2-142b9 "${testcvs} rm -f a
" \
11782 "${SPROG} remove
: scheduling \
`a' for removal
11783 ${SPROG} remove: use \`${SPROG} commit
' to remove this file permanently"
11786 # As before, 1.2 instead of 1.1 is a bug.
11787 dotest_sort conflicts2-142b10 "$testcvs add a" "U a
11788 ${SPROG} add: \`a', version
1\
.2, resurrected
"
11789 # As with conflicts2-142b6, check that things are normal again.
11790 dotest conflicts2-142b11 "${testcvs} -q update
" ''
11792 # END TESTS USING THE FILE A
11794 # Now test that if one person removes a file and
11795 # commits it, and a second person removes it, is it
11799 dotest conflicts2-142c0 "${testcvs} rm abc
" \
11800 "${SPROG} remove
: scheduling \
`abc' for removal
11801 ${SPROG} remove: use \`${SPROG} commit
' to remove this file permanently"
11802 dotest conflicts2-142c1 "${testcvs} -q ci -m remove-abc" \
11803 "$CVSROOT_DIRNAME/first-dir/abc,v <-- abc
11804 new revision: delete; previous revision: 1\.1"
11805 cd ../../2/first-dir
11807 dotest conflicts2-142c2 "${testcvs} rm abc" \
11808 "${SPROG} remove: scheduling \`abc' for removal
11809 ${SPROG} remove
: use \
`${SPROG} commit' to remove this file permanently"
11810 dotest conflicts2-142c3 "${testcvs} update" \
11811 "${SPROG} update: Updating \."
11814 # conflicts2-142d*: test that if one party adds a file, and another
11815 # party has a file of the same name, cvs notices
11818 echo 'contents unchanged' >same.c
11819 dotest conflicts2-142d0 "${testcvs} add aa.c same.c" \
11820 "${SPROG} add: scheduling file .aa\.c. for addition
11821 ${SPROG} add: scheduling file .same\.c. for addition
11822 ${SPROG} add: use .${SPROG} commit. to add these files permanently"
11823 dotest conflicts2-142d1 "${testcvs} -q ci -m added" \
11824 "$CVSROOT_DIRNAME/first-dir/aa\.c,v <-- aa\.c
11825 initial revision: 1\.1
11826 $CVSROOT_DIRNAME/first-dir/same\.c,v <-- same\.c
11827 initial revision: 1\.1"
11829 # Test the case where the second user manages the add before the
11832 dotest conflicts2-142d1a "$testcvs add bb.c" \
11833 "$SPROG add: scheduling file .bb\.c. for addition
11834 $SPROG add: use .$SPROG commit. to add this file permanently"
11835 cd ../../2/first-dir
11836 echo "don't you dare obliterate this text" >bb.c
11837 dotest conflicts2-142d1b "$testcvs add bb.c" \
11838 "$SPROG add: scheduling file .bb\.c. for addition
11839 $SPROG add: use .$SPROG commit. to add this file permanently"
11840 cd ../../1/first-dir
11841 dotest conflicts2-142d1c "$testcvs -q ci -m added" \
11842 "$CVSROOT_DIRNAME/first-dir/bb\.c,v <-- bb\.c
11843 initial revision: 1\.1"
11845 cd ../../2/first-dir
11846 echo "don't you dare obliterate this text either" >aa.c
11847 echo 'contents unchanged' >same.c
11848 # Note the discrepancy between local and remote in the handling
11849 # of same.c. I kind
11850 # of suspect that the local CVS behavior is the more useful one
11851 # although I do sort of wonder whether we should make people run
11852 # cvs add just to get them in that habit (also, trying to implement
11853 # the local CVS behavior for remote without the cvs add seems
11854 # pretty difficult).
11856 dotest_fail conflicts2-142d2r "${testcvs} -q update" \
11858 ${QUESTION} same\.c
11859 ${CPROG} update: move away \`\.
/aa\.c
'; it is in the way
11861 ${SPROG} update: conflict: \`bb\.c' created independently by second party
11863 ${CPROG} update
: move away \
`\./same\.c'; it is in the way
11866 dotest_fail conflicts2-142d2 "${testcvs} -q update" \
11867 "${CPROG} update: move away \`aa\.c
'; it is in the way
11869 ${CPROG} update: conflict: \`bb\.c' created independently by second party
11873 dotest conflicts2-142d3 "${testcvs} -q status aa.c
" \
11874 "${SPROG} status
: move away \
`aa\.c'; it is in the way
11875 ===================================================================
11876 File: aa\.c Status: Unresolved Conflict
11878 Working revision: No entry for aa\.c
11879 Repository revision: 1\.1 ${CVSROOT_DIRNAME}/first-dir/aa\.c,v
11880 Commit Identifier: ${commitid}"
11881 dotest conflicts2-142d3a "${testcvs} -q status bb.c" \
11882 "${SPROG} status: conflict: \`bb\.c
' created independently by second party
11883 ===================================================================
11884 File: bb\.c Status: Unresolved Conflict
11886 Working revision: New file!
11887 Repository revision: 1\.1 ${CVSROOT_DIRNAME}/first-dir/bb\.c,v
11888 Commit Identifier: ${commitid}
11890 Sticky Date: (none)
11891 Sticky Options: (none)"
11894 # This message seems somewhat bogus. I mean, parallel development
11895 # means that we get to work in parallel if we choose, right? And
11896 # then at commit time it would be a conflict.
11898 # Well, the status is "Unresolved conflict" before _and_ after
11899 # the update/merge (when conflicts happen, not at commit time).
11900 # It is possible that this message could be changed to something
11901 # more infomrative to novice users, like "File of same name exists
11902 # in repository", or "File of same name committed independantly by
11903 # second party", but these two messages look too long for the Status
11904 # field and the move away & added independantly error messages _are_
11905 # displayed. Still, we get a lot of questions about this on the
11906 # email lists. Somehow we need to get more information to users
11907 # via these messages and the ones generated by update. -DRP
11908 dotest_fail conflicts2-142d4 "${testcvs} -q add aa.c" \
11909 "${SPROG} add: \`aa.c' added independently by second party
"
11911 # The user might want to see just what the conflict is.
11912 # Don't bother, diff seems to kind of lose its mind, with or
11913 # without -N. This is a CVS bug(s).
11914 #dotest conflicts2-142d5 \
11915 #"${testcvs} -q diff -r HEAD
-N aa.c
" FIXCVS THEN FIXME
11917 # Now: "how can the user resolve this conflict
", I hear you cry.
11918 # Well, one way is to forget about the file in the working
11920 # Since it didn't let us do the add in conflicts2-142d4, there
11921 # is no need to run cvs rm here.
11922 #dotest conflicts2-142d6 "${testcvs} -q rm -f aa.c
" fixme
11923 dotest conflicts2-142d6 "rm aa.c
" ''
11924 dotest conflicts2-142d7 "${testcvs} -q update aa.c
" "U aa\.c
"
11925 dotest conflicts2-142d8 "cat aa.c
" ''
11927 # The other way is to use the version from the working directory
11928 # instead of the version from the repository. Unfortunately,
11929 # there doesn't seem to be any particularly clear way to do
11935 modify_repo rm -rf $CVSROOT_DIRNAME/first-dir
11941 # More tests of conflicts and/or multiple working directories
11945 dotest conflicts3-1 "$testcvs -q co
-l .
"
11947 dotest conflicts3-2 "${testcvs} add first-dir
" \
11948 "Directory
${CVSROOT_DIRNAME}/first-dir added to the repository
"
11951 dotest conflicts3-3 "${testcvs} -q co
-l first-dir
" ''
11954 dotest conflicts3-4 "${testcvs} add file1 file2
" \
11955 "${SPROG} add
: scheduling
file .file1.
for addition
11956 ${SPROG} add
: scheduling
file .file2.
for addition
11957 ${SPROG} add
: use .
${SPROG} commit. to add these files permanently
"
11958 dotest conflicts3-5 "${testcvs} -q ci
-m add-them
" \
11959 "$CVSROOT_DIRNAME/first-dir
/file1
,v
<-- file1
11960 initial revision
: 1\
.1
11961 $CVSROOT_DIRNAME/first-dir
/file2
,v
<-- file2
11962 initial revision
: 1\
.1"
11963 cd ../../2/first-dir
11964 # Check that -n doesn't make CVS lose its mind as it creates
11965 # (or rather, doesn't) a new file.
11966 dotest conflicts3-6 "${testcvs} -nq update
" \
11969 dotest_fail conflicts3-7 "test -f file1
" ''
11970 dotest conflicts3-8 "${testcvs} -q update
" \
11973 dotest conflicts3-9 "test -f file2
" ''
11975 # OK, now remove two files at once
11976 dotest conflicts3-10 "${testcvs} rm -f file1 file2
" \
11977 "${SPROG} remove
: scheduling .file1.
for removal
11978 ${SPROG} remove
: scheduling .file2.
for removal
11979 ${SPROG} remove
: use .
${SPROG} commit. to remove these files permanently
"
11980 dotest conflicts3-11 "${testcvs} -q ci
-m remove-them
" \
11981 "$CVSROOT_DIRNAME/first-dir
/file1
,v
<-- file1
11982 new revision
: delete
; previous revision
: 1\
.1
11983 $CVSROOT_DIRNAME/first-dir
/file2
,v
<-- file2
11984 new revision
: delete
; previous revision
: 1\
.1"
11985 cd ../../1/first-dir
11986 dotest conflicts3-12 "${testcvs} -n -q update
" \
11987 "${SPROG} update
: \
`file1' is no longer in the repository
11988 ${SPROG} update: \`file2
' is no longer in the repository"
11989 dotest conflicts3-13 "${testcvs} -q update" \
11990 "${SPROG} update: \`file1' is no longer
in the repository
11991 ${SPROG} update
: \
`file2' is no longer in the repository"
11993 # OK, now add a directory to both working directories
11994 # and see that CVS doesn't lose its mind.
11996 dotest conflicts3-14 "${testcvs} add sdir" \
11997 "Directory ${CVSROOT_DIRNAME}/first-dir/sdir added to the repository"
11999 dotest conflicts3-14a "${testcvs} add sdir/sfile" \
12000 "${SPROG} add: scheduling file .sdir/sfile. for addition
12001 ${SPROG} add: use .${SPROG} commit. to add this file permanently"
12002 dotest conflicts3-14b "${testcvs} -q ci -m add" \
12003 "$CVSROOT_DIRNAME/first-dir/sdir/sfile,v <-- sdir/sfile
12004 initial revision: 1\.1"
12006 cd ../../2/first-dir
12008 # Create a CVS directory without the proper administrative
12009 # files in it. This can happen for example if you hit ^C
12010 # in the middle of a checkout.
12013 # OK, in the local case CVS sees that the directory exists
12014 # in the repository and recurses into it. In the remote case
12015 # CVS can't see the repository and has no way of knowing
12016 # that sdir is even a directory (stat'ing everything would be
12017 # too slow). The remote behavior makes more sense to me (but
12018 # would this affect other cases?).
12020 dotest conflicts3-15 "${testcvs} -q update" \
12023 dotest conflicts3-15 "${testcvs} -q update" \
12025 ${SPROG} update: ignoring sdir (CVS/Repository missing)"
12026 touch sdir/CVS/Repository
12027 dotest conflicts3-16 "${testcvs} -q update" \
12029 ${SPROG} update: ignoring sdir (CVS/Entries missing)"
12031 dotest conflicts3-16a "${testcvs} -q update first-dir" \
12032 "${QUESTION} first-dir/sdir
12033 ${SPROG} update: ignoring first-dir/sdir (CVS/Entries missing)"
12038 # OK, now the same thing, but the directory doesn't exist
12039 # in the repository.
12042 dotest conflicts3-17 "${testcvs} -q update" "${QUESTION} newdir"
12043 echo "D/newdir////" >> CVS/Entries
12044 dotest conflicts3-18 "${testcvs} -q update" \
12045 "${CPROG} update: ignoring newdir (CVS/Repository missing)"
12046 touch newdir/CVS/Repository
12047 dotest conflicts3-19 "${testcvs} -q update" \
12048 "${CPROG} update: ignoring newdir (CVS/Entries missing)"
12050 dotest conflicts3-20 "${testcvs} -q update first-dir" \
12051 "${CPROG} update: ignoring first-dir/newdir (CVS/Entries missing)"
12055 # The previous tests have left CVS/Entries in something of a mess.
12056 # While we "should" be able to deal with that (maybe), for now
12057 # we just start over.
12060 dotest conflicts3-20a "${testcvs} -q co -l first-dir" ''
12063 dotest conflicts3-21 "${testcvs} -q update -d sdir" "U sdir/sfile"
12065 dotest conflicts3-22 "${testcvs} -q update" "${QUESTION} sdir"
12067 dotest_fail conflicts3-23 "${testcvs} -q update -PdA" \
12069 ${CPROG} update: move away \`sdir
/sfile
'; it is in the way
12072 dotest conflicts3-23 "${testcvs} -q update -PdA" \
12076 # Not that it should really affect much, but let's
do the
case
12077 # where sfile has been removed. For example, suppose that sdir
12078 # had been a CVS-controlled directory which was then removed
12079 # by removing each file (and using update -P or some such). Then
12080 # suppose that the build process creates an sdir directory which
12081 # is not supposed to be under CVS.
12083 dotest conflicts3-24
"${testcvs} -q update -d sdir" "U sdir/sfile"
12085 dotest conflicts3-25
"${testcvs} rm sdir/sfile" \
12086 "${SPROG} remove: scheduling .sdir/sfile. for removal
12087 ${SPROG} remove: use .${SPROG} commit. to remove this file permanently"
12088 dotest conflicts3-26
"${testcvs} ci -m remove sdir/sfile" \
12089 "${CVSROOT_DIRNAME}/first-dir/sdir/sfile,v <-- sdir/sfile
12090 new revision: delete; previous revision: 1\.1"
12092 dotest conflicts3-27
"${testcvs} -q update" "${QUESTION} sdir"
12093 dotest conflicts3-28
"${testcvs} -q update -PdA" \
12099 modify_repo
rm -rf $CVSROOT_DIRNAME/first-dir
12105 # Test update -C (overwrite local mods w/ repository copies)
12107 dotest clean-1
"${testcvs} -q co -l ." ''
12109 dotest clean-2
"${testcvs} add first-dir" \
12110 "Directory ${CVSROOT_DIRNAME}/first-dir added to the repository"
12112 echo "The usual boring test text." > cleanme.txt
12113 dotest clean-3
"${testcvs} add cleanme.txt" \
12114 "${SPROG} add: scheduling file .cleanme\.txt. for addition
12115 ${SPROG} add: use .${SPROG} commit. to add this file permanently"
12116 dotest clean-4
"${testcvs} -q ci -m clean-3" \
12117 "$CVSROOT_DIRNAME/first-dir/cleanme\.txt,v <-- cleanme\.txt
12118 initial revision: 1\.1"
12119 # Okay, preparation is done, now test.
12120 # Check that updating an unmodified copy works.
12121 dotest clean-5
"${testcvs} -q update" ''
12122 # Check that updating -C an unmodified copy works.
12123 dotest clean-6
"${testcvs} -q update -C" ''
12124 # Check that updating a modified copy works.
12125 echo "fish" >> cleanme.txt
12126 dotest clean-7
"${testcvs} -q update" 'M cleanme\.txt'
12127 # Check that updating -C a modified copy works.
12128 dotest clean-8
"${testcvs} -q update -C" \
12129 "(Locally modified cleanme\.txt moved to \.#cleanme\.txt\.1\.1)
12131 # And check that the backup copy really was made.
12132 dotest clean-9
"cat .#cleanme.txt.1.1" \
12133 "The usual boring test text\.
12136 # Do it all again, this time naming the file explicitly.
12137 rm .
#cleanme.txt.1.1
12138 dotest clean-10
"${testcvs} -q update cleanme.txt" ''
12139 dotest clean-11
"${testcvs} -q update -C cleanme.txt" ''
12140 echo "bluegill" >> cleanme.txt
12141 dotest clean-12
"${testcvs} -q update cleanme.txt" 'M cleanme\.txt'
12142 dotest clean-13
"${testcvs} -q update -C cleanme.txt" \
12143 "(Locally modified cleanme\.txt moved to \.#cleanme\.txt\.1\.1)
12145 # And check that the backup copy really was made.
12146 dotest clean-14
"cat .#cleanme.txt.1.1" \
12147 "The usual boring test text\.
12150 # Now try with conflicts
12152 dotest clean-15
"${testcvs} -q co -d second-dir first-dir" \
12153 'U second-dir/cleanme\.txt'
12155 echo "conflict test" >> cleanme.txt
12156 dotest clean-16
"${testcvs} -q ci -m." \
12157 "$CVSROOT_DIRNAME/first-dir/cleanme\.txt,v <-- cleanme\.txt
12158 new revision: 1\.2; previous revision: 1\.1"
12160 echo "fish" >> cleanme.txt
12161 dotest clean-17
"${testcvs} -nq update" \
12162 "RCS file: ${CVSROOT_DIRNAME}/first-dir/cleanme\.txt,v
12163 retrieving revision 1\.1
12164 retrieving revision 1\.2
12165 Merging differences between 1\.1 and 1\.2 into cleanme\.txt
12166 rcsmerge: warning: conflicts during merge
12167 ${SPROG} update: conflicts found in cleanme\.txt
12169 dotest clean-18
"${testcvs} -q update -C" \
12170 "(Locally modified cleanme\.txt moved to \.#cleanme\.txt\.1\.1)
12172 dotest clean-19
"cat .#cleanme.txt.1.1" \
12173 "The usual boring test text\.
12180 modify_repo
rm -rf $CVSROOT_DIRNAME/first-dir
12186 # Tests of the original *BSD tag= and keywordexpand= features
12187 # are done via the LocalKeyword= and KeywordExpand features.
12189 # Skip this in noredirect mode because it is too easy for the primary
12190 # and secondary error messages to get out of sync when the
12191 # CVSROOT/config files are broken. This is intentional, since it is
12192 # possible and even likely that an administrator might want to set up
12193 # different configurations on the two servers and the paths to the
12194 # config files on the secondary and primary were intentionally left
12195 # intact even though they might be different.
12196 if $noredirect; then
12197 notnoredirect keywordexpand
12201 mkdir keywordexpand
; cd keywordexpand
12203 dotest keywordexpand-1
"${testcvs} -q co CVSROOT" \
12204 'U CVSROOT/checkoutlist
12205 U CVSROOT/commitinfo
12207 U CVSROOT/cvswrappers
12211 U CVSROOT/postadmin
12212 U CVSROOT/postproxy
12214 U CVSROOT/postwatch
12218 U CVSROOT/verifymsg'
12220 echo LocalKeyword
=MyBSD
=CVSHeader
>> config
12221 # First do not expand any keywords
12222 echo KeywordExpand
=i
>> config
12223 dotest keywordexpand-2
"${testcvs} -Q ci -mkeywordexpand config"
12227 mkdir testimport
; cd testimport
12228 echo '$''Author$' > file1
12229 echo '$''Date$' >> file1
12230 echo '$''CVSHeader$' >> file1
12231 echo '$''Header$' >> file1
12232 echo '$''Id$' >> file1
12233 echo '$''Locker$' >> file1
12234 echo '$''Log$' >> file1
12235 echo '$''Name$' >> file1
12236 echo '$''RCSfile$' >> file1
12237 echo '$''Revision$' >> file1
12238 echo '$''Source$' >> file1
12239 echo '$''State$' >> file1
12240 echo '$''MyBSD$' >> file1
12241 dotest keywordexpand-3 \
12242 "${testcvs} -Q import -I ! -m test-import-with-bsd-keyword keywordexpand vendor v1" \
12246 dotest keywordexpand-4
"${testcvs} -Q checkout keywordexpand" ''
12248 dotest keywordexpand-5
"cat file1" \
12263 # Now expand just the MyBSD and Id keywords
12264 mv config config.old
12265 sed -e 's/KeywordExpand=i/KeywordExpand=iMyBSD,Id/' < config.old
> config
12267 dotest keywordexpand-6
"${testcvs} -Q ci -mkeywordexpand config"
12268 cd ..
/keywordexpand
12269 echo 'a change' >> file1
12270 dotest keywordexpand-7
"${testcvs} -Q ci -madd"
12271 dotest keywordexpand-8
"cat file1" \
12276 \$""Id: file1,v 1\.2 [0-9/]* [0-9:]* ${username} Exp \$
12284 \$MyBSD: keywordexpand/file1,v 1\.2 [0-9/]* [0-9:]* ${username} Exp \$
12288 mv config config.old
12289 sed -e 's/LocalKeyword=MyBSD/LocalKeyword=My_BSD/' \
12290 <config.old
>config
12291 dotest keywordexpand-9
"$testcvs -Q ci -minvalidlocalkeyword config"
12292 dotest keywordexpand-10
"$testcvs -Q update config" \
12293 "$SPROG [a-z]*: $SECONDARY_CVSROOT_DIRNAME/CVSROOT/config \[[1-9][0-9]*\]: LocalKeyword ignored: Bad character \`_' in key \`My_BSD'"
12294 cp config.old config
12295 dotest keywordexpand-11
"$testcvs -Q ci -mfixit config" \
12296 "$SPROG [a-z]*: $SECONDARY_CVSROOT_DIRNAME/CVSROOT/config \[[1-9][0-9]*\]: LocalKeyword ignored: Bad character \`_' in key \`My_BSD'" \
12297 "$SPROG [a-z]*: $SECONDARY_CVSROOT_DIRNAME/CVSROOT/config \[[1-9][0-9]*\]: LocalKeyword ignored: Bad character \`_' in key \`My_BSD'
12298 $SPROG [a-z]*: $CVSROOT_DIRNAME/CVSROOT/config \[[1-9][0-9]*\]: LocalKeyword ignored: Bad character \`_' in key \`My_BSD'"
12299 dotest keywordexpand-12
"$testcvs -Q update config"
12300 sed -e 's/LocalKeyword=MyBSD=CVSHeader/LocalKeyword=MyBSD=Name/' \
12301 <config.old
>config
12302 dotest keywordexpand-13 \
12303 "$testcvs -Q ci -minvalidlocalkeyword2 config"
12304 dotest keywordexpand-14
"$testcvs -Q update config" \
12305 "$SPROG [a-z]*: $SECONDARY_CVSROOT_DIRNAME/CVSROOT/config \[[1-9][0-9]*\]: LocalKeyword ignored: Unknown LocalId mode: \`Name'"
12306 cp config.old config
12307 dotest keywordexpand-15
"$testcvs -Q ci -mfixit2 config" \
12308 "$SPROG [a-z]*: $SECONDARY_CVSROOT_DIRNAME/CVSROOT/config \[[1-9][0-9]*\]: LocalKeyword ignored: Unknown LocalId mode: \`Name'" \
12309 "$SPROG [a-z]*: $SECONDARY_CVSROOT_DIRNAME/CVSROOT/config \[[1-9][0-9]*\]: LocalKeyword ignored: Unknown LocalId mode: \`Name'
12310 $SPROG [a-z]*: $CVSROOT_DIRNAME/CVSROOT/config \[[1-9][0-9]*\]: LocalKeyword ignored: Unknown LocalId mode: \`Name'"
12311 dotest keywordexpand-16
"$testcvs -Q update config"
12316 rm -rf $TESTDIR/keywordexpand
12317 modify_repo
rm -rf $CVSROOT_DIRNAME/keywordexpand
12324 # Tests of various ways to define and use modules.
12325 # Roadmap to various modules tests:
12327 # error on incorrect placement: modules
12328 # error combining with other options: modules2-a*
12329 # infinite loops: modules148a1.1 - modules148a1.2
12330 # use to specify a file more than once: modules3
12331 # use with ! feature: modules4
12332 # regular modules: modules, modules2, cvsadm
12333 # ampersand modules: modules2
12335 # -d: modules, modules3, cvsadm
12336 # -i, -o, -u, -e, -t: modules5
12337 # slashes in module names: modules3
12338 # invalid module definitions: modules6
12340 ############################################################
12341 # These tests are to make sure that administrative files get
12342 # rebuilt, regardless of how and where files are checked
12344 ############################################################
12345 # Check out the whole repository
12347 dotest modules-1
"${testcvs} -q co ." 'U CVSROOT/checkoutlist
12348 U CVSROOT/commitinfo
12350 U CVSROOT/cvswrappers
12354 U CVSROOT/postadmin
12355 U CVSROOT/postproxy
12357 U CVSROOT/postwatch
12361 U CVSROOT/verifymsg'
12362 echo "# made a change" >>CVSROOT
/modules
12363 dotest modules-1d
"${testcvs} -q ci -m add-modules" \
12364 "$CVSROOT_DIRNAME/CVSROOT/modules,v <-- CVSROOT/modules
12365 new revision: 1\.[0-9]*; previous revision: 1\.[0-9]*
12366 $SPROG commit: Rebuilding administrative file database"
12370 ############################################################
12371 # Check out CVSROOT
12373 dotest modules-2
"${testcvs} -q co CVSROOT" 'U CVSROOT/checkoutlist
12374 U CVSROOT/commitinfo
12376 U CVSROOT/cvswrappers
12380 U CVSROOT/postadmin
12381 U CVSROOT/postproxy
12383 U CVSROOT/postwatch
12387 U CVSROOT/verifymsg'
12388 echo "# made a change" >>CVSROOT
/modules
12389 dotest modules-2d
"${testcvs} -q ci -m add-modules" \
12390 "$CVSROOT_DIRNAME/CVSROOT/modules,v <-- CVSROOT/modules
12391 new revision: 1\.[0-9]*; previous revision: 1\.[0-9]*
12392 $SPROG commit: Rebuilding administrative file database"
12396 ############################################################
12397 # Check out CVSROOT in some other directory
12398 modify_repo mkdir
$CVSROOT_DIRNAME/somedir
12400 dotest modules-3
"${testcvs} -q co somedir" ''
12402 dotest modules-3d
"${testcvs} -q co CVSROOT" 'U CVSROOT/checkoutlist
12403 U CVSROOT/commitinfo
12405 U CVSROOT/cvswrappers
12409 U CVSROOT/postadmin
12410 U CVSROOT/postproxy
12412 U CVSROOT/postwatch
12416 U CVSROOT/verifymsg'
12417 echo "# made a change" >>CVSROOT
/modules
12418 dotest modules-3g
"${testcvs} -q ci -m add-modules" \
12419 "$CVSROOT_DIRNAME/CVSROOT/modules,v <-- CVSROOT/modules
12420 new revision: 1\.[0-9]*; previous revision: 1\.[0-9]*
12421 $SPROG commit: Rebuilding administrative file database"
12424 modify_repo
rm -rf $CVSROOT_DIRNAME/somedir
12425 ############################################################
12426 # end rebuild tests
12427 ############################################################
12430 modify_repo mkdir
$CVSROOT_DIRNAME/first-dir
12435 dotest modules-143
"${testcvs} -q co first-dir" ""
12439 dotest modules-143a
"${testcvs} add subdir" \
12440 "Directory ${CVSROOT_DIRNAME}/first-dir/subdir added to the repository"
12444 dotest modules-143b
"${testcvs} add ssdir" \
12445 "Directory ${CVSROOT_DIRNAME}/first-dir/subdir/ssdir added to the repository"
12449 dotest modules-144
"${testcvs} add a b" \
12450 "${SPROG} add: scheduling file .a. for addition
12451 ${SPROG} add: scheduling file .b. for addition
12452 ${SPROG} add: use .${SPROG} commit. to add these files permanently"
12454 dotest modules-145
"$testcvs ci -m added" \
12455 "$CPROG commit: Examining .
12456 $CPROG commit: Examining ssdir
12457 $CVSROOT_DIRNAME/first-dir/subdir/a,v <-- a
12458 initial revision: 1\.1
12459 $CVSROOT_DIRNAME/first-dir/subdir/b,v <-- b
12460 initial revision: 1\.1"
12463 dotest modules-146
"$testcvs -q co CVSROOT" \
12464 "U CVSROOT/checkoutlist
12465 U CVSROOT/commitinfo
12467 U CVSROOT/cvswrappers
12471 U CVSROOT/postadmin
12472 U CVSROOT/postproxy
12474 U CVSROOT/postwatch
12478 U CVSROOT/verifymsg"
12480 # Here we test that CVS can deal with CVSROOT (whose repository
12481 # is at top level) in the same directory as subdir (whose repository
12482 # is a subdirectory of first-dir). TODO: Might want to check that
12483 # files can actually get updated in this state.
12484 dotest modules-147
"$testcvs -q update"
12486 cat >CVSROOT
/modules
<<EOF
12487 realmodule first-dir/subdir a
12488 dirmodule first-dir/subdir
12489 namedmodule -d nameddir first-dir/subdir
12490 aliasmodule -a first-dir/subdir/a
12491 aliasnested -a first-dir/subdir/ssdir
12492 topfiles -a first-dir/file1 first-dir/file2
12494 statusmod -s Mungeable
12495 # Check for ability to block infinite loops.
12496 infinitealias -a infinitealias
12497 # Prior to 1.11.12 & 1.12.6, the infinite alias loop check didn't strip
12498 # slashes or work if a module called a module which then called itself
12499 # (A -> A was blocked, but not A -> B -> A or deeper).
12500 infinitealias2 -a infinitealias2/
12501 infinitealias3 -a infinitealias4/
12502 infinitealias4 -a aliasmodule infinitealias5
12503 infinitealias5 -a infinitealias3/
12504 # Options must come before arguments. It is possible this should
12505 # be relaxed at some point (though the result would be bizarre for
12506 # -a); for now test the current behavior.
12507 bogusalias first-dir/subdir/a -a
12509 dotest modules-148
"$testcvs ci -m 'add modules' CVSROOT/modules" \
12510 "$CVSROOT_DIRNAME/CVSROOT/modules,v <-- CVSROOT/modules
12511 new revision: 1\.[0-9]*; previous revision: 1\.[0-9]*
12512 $SPROG commit: Rebuilding administrative file database"
12515 # The "statusmod" module contains an error; trying to use it
12516 # will produce "modules file missing directory" I think.
12517 # However, that shouldn't affect the ability of "cvs co -c" or
12518 # "cvs co -s" to do something reasonable with it.
12519 dotest modules-148a0
"$testcvs co -c" \
12520 'aliasmodule -a first-dir/subdir/a
12521 aliasnested -a first-dir/subdir/ssdir
12522 bogusalias first-dir/subdir/a -a
12523 dirmodule first-dir/subdir
12524 infinitealias -a infinitealias
12525 infinitealias2 -a infinitealias2/
12526 infinitealias3 -a infinitealias4/
12527 infinitealias4 -a aliasmodule infinitealias5
12528 infinitealias5 -a infinitealias3/
12529 namedmodule -d nameddir first-dir/subdir
12530 realmodule first-dir/subdir a
12531 statusmod -s Mungeable
12532 topfiles -a first-dir/file1 first-dir/file2
12534 # There is code in modules.c:save_d which explicitly skips
12535 # modules defined with -a, which is why aliasmodule is not
12537 dotest modules-148a1
"${testcvs} co -s" \
12538 'statusmod Mungeable
12539 bogusalias NONE first-dir/subdir/a -a
12540 dirmodule NONE first-dir/subdir
12541 namedmodule NONE first-dir/subdir
12542 realmodule NONE first-dir/subdir a'
12544 # Check that infinite loops are avoided
12545 dotest modules-148a1.1
"${testcvs} co infinitealias" \
12546 "$CPROG checkout: module \`infinitealias' in modules file contains infinite loop" \
12547 "$SPROG server: module \`infinitealias' in modules file contains infinite loop
12548 $SPROG checkout: module \`infinitealias' in modules file contains infinite loop"
12549 # Prior to 1.11.12 & 1.12.6, the inifinte alias loop check did not
12551 dotest modules-148a1.2
"${testcvs} co infinitealias2" \
12552 "$CPROG checkout: module \`infinitealias2' in modules file contains infinite loop" \
12553 "$SPROG server: module \`infinitealias2' in modules file contains infinite loop
12554 $SPROG checkout: module \`infinitealias2' in modules file contains infinite loop"
12555 # Prior to 1.11.12 & 1.12.6, the inifinte alias loop check did not
12556 # notice when A -> B -> A, it only noticed A -> A.
12557 dotest modules-148a1.3
"${testcvs} co infinitealias3/" \
12558 "$CPROG checkout: module \`infinitealias3' in modules file contains infinite loop" \
12559 "$SPROG server: module \`infinitealias3' in modules file contains infinite loop
12560 $SPROG checkout: module \`infinitealias3' in modules file contains infinite loop"
12562 # Test that real modules check out to realmodule/a, not subdir/a.
12563 dotest modules-149a1
"${testcvs} co realmodule" "U realmodule/a"
12564 dotest modules-149a2
"test -d realmodule && test -f realmodule/a" ""
12565 dotest_fail modules-149a3
"test -f realmodule/b" ""
12566 dotest modules-149a4
"${testcvs} -q co realmodule" ""
12567 dotest modules-149a5
"echo yes | ${testcvs} release -d realmodule" \
12568 "You have \[0\] altered files in this repository\.
12569 Are you sure you want to release (and delete) directory .realmodule.: "
12571 dotest_fail modules-149b1
"${testcvs} co realmodule/a" \
12572 "${SPROG}"' checkout: module `realmodule/a'\'' is a request for a file in a module which is not a directory' \
12573 "${SPROG}"' server: module `realmodule/a'\'' is a request for a file in a module which is not a directory
12574 '"${CPROG}"' \[checkout aborted\]: cannot expand modules'
12576 # Now test the ability to check out a single file from a directory
12577 dotest modules-150c
"${testcvs} co dirmodule/a" "U dirmodule/a"
12578 dotest modules-150d
"test -d dirmodule && test -f dirmodule/a" ""
12579 dotest_fail modules-150e
"test -f dirmodule/b" ""
12580 dotest modules-150f
"echo yes | ${testcvs} release -d dirmodule" \
12581 "You have \[0\] altered files in this repository\.
12582 Are you sure you want to release (and delete) directory .dirmodule.: "
12583 # Now test the ability to correctly reject a non-existent filename.
12584 # For maximum studliness we would check that an error message is
12586 # We accept a zero exit status because it is what CVS does
12587 # (Dec 95). Probably the exit status should be nonzero,
12589 dotest modules-150g1
"${testcvs} co dirmodule/nonexist" \
12590 "${SPROG} checkout: warning: new-born \`dirmodule/nonexist' has disappeared"
12591 # We tolerate the creation of the dirmodule directory, since that
12592 # is what CVS does, not because we view that as preferable to not
12594 dotest_fail modules-150g2
"test -f dirmodule/a || test -f dirmodule/b" ""
12597 # Now test that a module using -d checks out to the specified
12599 dotest modules-150h1
"${testcvs} -q co namedmodule" \
12602 dotest modules-150h2
"test -f nameddir/a && test -f nameddir/b" ""
12603 echo add line
>>nameddir
/a
12604 dotest modules-150h3
"${testcvs} -q co namedmodule" 'M nameddir/a'
12606 dotest modules-150h4
"${testcvs} -q co namedmodule" 'U nameddir/a'
12607 dotest modules-150h99
"echo yes | ${testcvs} release -d nameddir" \
12608 "You have \[0\] altered files in this repository\.
12609 Are you sure you want to release (and delete) directory .nameddir.: "
12611 # Now test that alias modules check out to subdir/a, not
12613 dotest modules-151
"${testcvs} co aliasmodule" ""
12614 dotest_fail modules-152
"test -d aliasmodule" ""
12615 echo abc
>>first-dir
/subdir
/a
12616 dotest modules-153
"${testcvs} -q co aliasmodule" "M first-dir/subdir/a"
12623 dotest modules-155a0
"${testcvs} co aliasnested" \
12624 "${SPROG} checkout: Updating first-dir/subdir/ssdir"
12625 dotest modules-155a1
"test -d first-dir" ''
12626 dotest modules-155a2
"test -d first-dir/subdir" ''
12627 dotest modules-155a3
"test -d first-dir/subdir/ssdir" ''
12628 # Test that nothing extraneous got created.
12629 dotest modules-155a4
"ls" "first-dir" \
12635 # Test checking out everything.
12638 dotest modules-155b
"${testcvs} -q co world" \
12639 "U CVSROOT/${DOTSTAR}
12640 U first-dir/subdir/a
12641 U first-dir/subdir/b"
12645 # Test checking out a module which lists at least two
12646 # specific files twice. At one time, this failed over
12650 dotest modules-155c1
"${testcvs} -q co first-dir" \
12651 "U first-dir/subdir/a
12652 U first-dir/subdir/b"
12655 echo 'first revision' > file1
12656 echo 'first revision' > file2
12657 dotest modules-155c2
"${testcvs} add file1 file2" \
12658 "${SPROG}"' add: scheduling file `file1'\'' for addition
12659 '"${SPROG}"' add: scheduling file `file2'\'' for addition
12660 '"${SPROG}"' add: use .'"${SPROG}"' commit. to add these files permanently'
12661 dotest modules-155c3
"${testcvs} -q ci -m add-it" \
12662 "$CVSROOT_DIRNAME/first-dir/file1,v <-- file1
12663 initial revision: 1\.1
12664 $CVSROOT_DIRNAME/first-dir/file2,v <-- file2
12665 initial revision: 1\.1"
12669 dotest modules-155c4
"${testcvs} -q co topfiles" \
12672 dotest modules-155c5
"${testcvs} -q co topfiles" ""
12674 # Make sure the right thing happens if we remove a file.
12676 dotest modules-155c6
"${testcvs} -q rm -f file1" \
12677 "${SPROG} remove: use .${SPROG} commit. to remove this file permanently"
12678 dotest modules-155c7
"${testcvs} -q ci -m remove-it" \
12679 "$CVSROOT_DIRNAME/first-dir/file1,v <-- file1
12680 new revision: delete; previous revision: 1\.1"
12683 dotest modules-155c8
"${testcvs} -q co topfiles" \
12684 "${SPROG} checkout: warning: \`first-dir/file1' is not (any longer) pertinent
12690 modify_repo
rm -rf $CVSROOT_DIRNAME/first-dir
12696 # More tests of modules, in particular the & feature.
12698 dotest modules2-setup-1
"${testcvs} -q co -l ." ''
12699 mkdir first-dir second-dir third-dir
12700 dotest modules2-setup-2 \
12701 "${testcvs} add first-dir second-dir third-dir" \
12702 "Directory ${CVSROOT_DIRNAME}/first-dir added to the repository
12703 Directory ${CVSROOT_DIRNAME}/second-dir added to the repository
12704 Directory ${CVSROOT_DIRNAME}/third-dir added to the repository"
12707 dotest modules2-setup-3
"${testcvs} add file3" \
12708 "${SPROG} add: scheduling file .file3. for addition
12709 ${SPROG} add: use .${SPROG} commit. to add this file permanently"
12710 dotest modules2-setup-4
"${testcvs} -q ci -m add file3" \
12711 "$CVSROOT_DIRNAME/third-dir/file3,v <-- file3
12712 initial revision: 1\.1"
12719 dotest modules2-1
"${testcvs} -q co CVSROOT/modules" \
12720 'U CVSROOT/modules'
12722 cat >> modules
<< EOF
12723 ampermodule &first-dir &second-dir
12724 combmodule third-dir file3 &first-dir
12725 ampdirmod -d newdir &first-dir &second-dir
12727 messymod first-dir &messymodchild
12728 messymodchild -d sdir/child second-dir
12730 # Depending on whether the user also ran the modules test
12731 # we will be checking in revision 1.2 or 1.3.
12732 dotest modules2-2
"${testcvs} -q ci -m add-modules" \
12733 "$CVSROOT_DIRNAME/CVSROOT/modules,v <-- modules
12734 new revision: 1\.[0-9]*; previous revision: 1\.[0-9]*
12735 $SPROG commit: Rebuilding administrative file database"
12739 dotest modules2-3
"${testcvs} -q co ampermodule" ''
12740 dotest modules2-4
"test -d ampermodule/first-dir" ''
12741 dotest modules2-5
"test -d ampermodule/second-dir" ''
12743 # Test ability of cvs release to handle multiple arguments
12744 # See comment at "release" for list of other cvs release tests.
12746 if ${testcvs} release
-d first-dir second-dir
<<EOF >>${LOGFILE}
12755 dotest_fail modules2-7
"test -d first-dir" ''
12756 dotest_fail modules2-8
"test -d second-dir" ''
12760 # There used to be a nasty-hack that made CVS skip creation of the
12761 # module dir (in this case ampermodule) when -n was specified
12762 dotest modules2-ampermod-1
"${testcvs} -q co -n ampermodule" ''
12763 dotest modules2-ampermod-2
"test -d ampermodule/first-dir" ''
12764 dotest modules2-ampermod-3
"test -d ampermodule/second-dir" ''
12766 # Test release of a module
12767 if echo yes |
${testcvs} release
-d ampermodule
>>${LOGFILE}; then
12768 pass modules2-ampermod-release-1
12770 fail modules2-ampermod-release-1
12772 dotest_fail modules2-ampermod-release-2
"test -d ampermodule" ''
12774 # and the '-n' test again, but in conjunction with '-d'
12775 dotest modules2-ampermod-4
"${testcvs} -q co -n -d newname ampermodule" ''
12776 dotest modules2-ampermod-5
"test -d newname/first-dir" ''
12777 dotest modules2-ampermod-6
"test -d newname/second-dir" ''
12780 # Now we create another directory named first-dir and make
12781 # sure that CVS doesn't get them mixed up.
12783 # Note that this message should say "Updating ampermodule/first-dir"
12784 # I suspect. This is a long-standing behavior/bug....
12785 dotest modules2-9
"${testcvs} co ampermodule" \
12786 "${SPROG} checkout: Updating first-dir
12787 ${SPROG} checkout: Updating second-dir"
12788 touch ampermodule
/first-dir
/amper1
12790 dotest modules2-10
"${testcvs} add first-dir/amper1" \
12791 "${SPROG} add: scheduling file .first-dir/amper1. for addition
12792 ${SPROG} add: use .${SPROG} commit. to add this file permanently"
12795 # As with the "Updating xxx" message, the "U first-dir/amper1"
12796 # message (instead of "U ampermodule/first-dir/amper1") is
12798 dotest modules2-12
"${testcvs} co ampermodule" \
12799 "${SPROG} checkout: Updating first-dir
12801 ${SPROG} checkout: Updating second-dir"
12804 dotest modules2-13r
"$testcvs -q ci -m add-it ampermodule" \
12805 "$CVSROOT_DIRNAME/first-dir/amper1,v <-- ampermodule/first-dir/amper1
12806 initial revision: 1\.1"
12808 # Trying this as above led to a "protocol error" message.
12809 # Work around this bug.
12811 dotest modules2-13
"$testcvs -q ci -m add-it" \
12812 "$CVSROOT_DIRNAME/first-dir/amper1,v <-- first-dir/amper1
12813 initial revision: 1\.1"
12819 # Now test the "combmodule" module (combining regular modules
12820 # and ampersand modules in the same module definition).
12822 dotest modules2-14
"${testcvs} co combmodule" \
12823 "U combmodule/file3
12824 ${SPROG} checkout: Updating first-dir
12825 U first-dir/amper1"
12826 dotest modules2-15
"test -f combmodule/file3" ""
12827 dotest modules2-16
"test -f combmodule/first-dir/amper1" ""
12830 # At least for now there is no way to tell CVS that
12831 # some files/subdirectories come from one repository directory,
12832 # and others from another.
12833 # This seems like a pretty sensible behavior to me, in the
12834 # sense that first-dir doesn't "really" exist within
12835 # third-dir, so CVS just acts as if there is nothing there
12837 dotest modules2-17
"${testcvs} update -d" \
12838 "${SPROG} update: Updating \."
12841 dotest modules2-18
"${testcvs} -q co combmodule" \
12842 "U first-dir/amper1"
12843 dotest modules2-19
"test -f combmodule/first-dir/amper1" ""
12847 # Now test the "ampdirmod" and "badmod" modules to be sure that
12848 # options work with ampersand modules but don't prevent the
12849 # "missing directory" error message.
12851 dotest modules2-20
"${testcvs} co ampdirmod" \
12852 "${SPROG} checkout: Updating first-dir
12854 ${SPROG} checkout: Updating second-dir"
12855 dotest modules2-21
"test -f newdir/first-dir/amper1" ""
12856 dotest modules2-22
"test -d newdir/second-dir" ""
12857 dotest_fail modules2-23
"${testcvs} co badmod" \
12858 "${SPROG} checkout: modules file missing directory for module badmod" \
12859 "${SPROG} server: modules file missing directory for module badmod
12860 ${CPROG} \[checkout aborted\]: cannot expand modules"
12864 # Confirm that a rename with added depth nested in an ampersand
12867 dotest modules2-nestedrename-1
"${testcvs} -q co messymod" \
12868 "U messymod/amper1"
12869 dotest modules2-nestedrename-2
"test -d messymod/sdir" ''
12870 dotest modules2-nestedrename-3
"test -d messymod/sdir/CVS" ''
12871 dotest modules2-nestedrename-4
"test -d messymod/sdir/child" ''
12872 dotest modules2-nestedrename-5
"test -d messymod/sdir/child/CVS" ''
12875 # FIXME: client/server has a bug. It should be working like a local
12876 # repository in this case, but fails to check out the second module
12877 # in the list when a branch is specified.
12879 dotest modules2-ampertag-setup-1 \
12880 "${testcvs} -Q rtag tag first-dir second-dir third-dir" \
12882 dotest modules2-ampertag-1
"${testcvs} -q co -rtag ampermodule" \
12883 "U first-dir/amper1"
12885 dotest_fail modules2-ampertag-2
"test -d ampermodule/second-dir" ''
12886 dotest_fail modules2-ampertag-3
"test -d ampermodule/second-dir/CVS" ''
12888 dotest modules2-ampertag-2
"test -d ampermodule/second-dir" ''
12889 dotest modules2-ampertag-3
"test -d ampermodule/second-dir/CVS" ''
12893 # Test for tag files when an ampermod is renamed with more path
12894 # elements than it started with.
12896 # FIXME: This is currently broken in the remote case, possibly only
12897 # because the messymodchild isn't being checked out at all.
12899 # dotest modules2-tagfiles-setup-1 \
12900 #"${testcvs} -Q rtag -b branch first-dir second-dir" \
12902 dotest modules2-tagfiles-1
"${testcvs} -q co -rtag messymod" \
12903 "U messymod/amper1"
12905 dotest_fail modules2-tagfiles-2r
"test -d messymod/sdir" ''
12907 dotest modules2-tagfiles-2
"cat messymod/sdir/CVS/Tag" 'Ttag'
12911 # Test that CVS gives an error if one combines -a with
12913 # Probably would be better to break this out into a separate
12914 # test. Although it is short, it shares no files/state with
12915 # the rest of the modules2 tests.
12917 dotest modules2-a0.5
"${testcvs} -q co CVSROOT/modules" \
12918 'U CVSROOT/modules'
12920 echo 'aliasopt -a -d onedir first-dir' >modules
12921 dotest modules2-a0
"${testcvs} -q ci -m add-modules" \
12922 "$CVSROOT_DIRNAME/CVSROOT/modules,v <-- modules
12923 new revision: 1\.[0-9]*; previous revision: 1\.[0-9]*
12924 $SPROG commit: Rebuilding administrative file database"
12926 dotest_fail modules2-a1
"${testcvs} -q co aliasopt" \
12927 "${SPROG} checkout: -a cannot be specified in the modules file along with other options" \
12928 "${SPROG} server: -a cannot be specified in the modules file along with other options
12929 ${CPROG} \[checkout aborted\]: cannot expand modules"
12933 modify_repo
rm -rf $CVSROOT_DIRNAME/first-dir \
12934 $CVSROOT_DIRNAME/second-dir \
12935 $CVSROOT_DIRNAME/third-dir
12941 # More tests of modules, in particular what happens if several
12942 # modules point to the same file.
12944 # First just set up a directory first-dir and a file file1 in it.
12947 dotest modules3-0
"$testcvs -q co -l ."
12949 dotest modules3-1
"${testcvs} add first-dir" \
12950 "Directory ${CVSROOT_DIRNAME}/first-dir added to the repository"
12954 dotest modules3-2
"${testcvs} add file1" \
12955 "${SPROG} add: scheduling file \`file1' for addition
12956 ${SPROG} add: use \`${SPROG} commit' to add this file permanently"
12957 dotest modules3-3
"${testcvs} -q ci -m add-it" \
12958 "$CVSROOT_DIRNAME/first-dir/file1,v <-- file1
12959 initial revision: 1\.1"
12962 dotest modules3-4
"${testcvs} -q update -d CVSROOT" \
12963 "U CVSROOT${DOTSTAR}"
12966 mod1 -a first-dir/file1
12967 bigmod -a mod1 first-dir/file1
12968 namednest -d src/sub/dir first-dir
12969 nestdeeper -d src/sub1/sub2/sub3/dir first-dir
12970 nestshallow -d src/dir second-dir/suba/subb
12971 path/in/modules &mod1
12972 another/path/test -d another/path/test first-dir
12974 dotest modules3-5
"${testcvs} -q ci -m add-modules" \
12975 "$CVSROOT_DIRNAME/CVSROOT/modules,v <-- modules
12976 new revision: 1\.[0-9]*; previous revision: 1\.[0-9]*
12977 $SPROG commit: Rebuilding administrative file database"
12980 dotest modules3-6
"${testcvs} -q co bigmod" ''
12982 dotest modules3-7
"${testcvs} -q co bigmod" 'U first-dir/file1'
12989 # This fails to work remote (it doesn't notice the directories,
12990 # I suppose because they contain no files). Bummer, especially
12991 # considering this is a documented technique and everything.
12992 dotest modules3-7a \
12993 "${testcvs} import -m add-dirs second-dir tag1 tag2" \
12994 "${SPROG} import: Importing ${CVSROOT_DIRNAME}/second-dir/suba
12995 ${SPROG} import: Importing ${CVSROOT_DIRNAME}/second-dir/suba/subb
12997 No conflicts created by this import" "
12998 No conflicts created by this import"
13001 dotest modules3-7b
"${testcvs} co second-dir" \
13002 "${SPROG} checkout: Updating second-dir
13003 ${SPROG} checkout: Updating second-dir/suba
13004 ${SPROG} checkout: Updating second-dir/suba/subb" \
13005 "${SPROG} checkout: Updating second-dir"
13010 dotest modules3-7-workaround1
"${testcvs} add suba" \
13011 "Directory ${CVSROOT_DIRNAME}/second-dir/suba added to the repository"
13014 dotest modules3-7-workaround2
"${testcvs} add subb" \
13015 "Directory ${CVSROOT_DIRNAME}/second-dir/suba/subb added to the repository"
13019 cd second-dir
/suba
/subb
13021 dotest modules3-7c
"${testcvs} add fileb" \
13022 "${SPROG} add: scheduling file .fileb. for addition
13023 ${SPROG} add: use .${SPROG} commit. to add this file permanently"
13024 dotest modules3-7d
"${testcvs} -q ci -m add-it" \
13025 "$CVSROOT_DIRNAME/second-dir/suba/subb/fileb,v <-- fileb
13026 initial revision: 1\.1"
13032 dotest modules3-8
"${testcvs} -q co namednest" \
13033 'U src/sub/dir/file1'
13034 dotest modules3-9
"test -f src/sub/dir/file1" ''
13038 # Try the same thing, but with the directories nested even
13039 # deeper (deeply enough so they are nested more deeply than
13040 # the number of directories from / to ${TESTDIR}).
13043 dotest modules3-10
"${testcvs} -q co nestdeeper" \
13044 'U src/sub1/sub2/sub3/dir/file1'
13045 dotest modules3-11
"test -f src/sub1/sub2/sub3/dir/file1" ''
13047 # While we are doing things like twisted uses of '/' (e.g.
13048 # modules3-12), try this one.
13050 dotest_fail modules3-11b \
13051 "${testcvs} -q update ${TESTDIR}/1/src/sub1/sub2/sub3/dir/file1" \
13052 "absolute pathnames invalid for server (specified .${TESTDIR}/1/src/sub1/sub2/sub3/dir.)"
13053 fi # end of remote-only tests
13058 # This one is almost too twisted for words. The pathname output
13059 # in the message from "co" doesn't include the "path/in/modules",
13060 # but those directories do get created (with no CVSADM except
13061 # in "modules" which has a CVSNULLREPOS).
13062 # I'm not sure anyone is relying on this nonsense or whether we
13063 # need to keep doing it, but it is what CVS currently does...
13064 # Skip it for remote; the remote code has the good sense to
13065 # not deal with it (on the minus side it gives
13066 # "internal error: repository string too short." (CVS 1.9) or
13067 # "warning: server is not creating directories one at a time" (now)
13068 # instead of a real error).
13069 # I'm tempted to just make it a fatal error to have '/' in a
13070 # module name. But see comments at modules3-16.
13071 if $remote; then :; else
13073 dotest modules3-12
"${testcvs} -q co path/in/modules" \
13074 "U first-dir/file1"
13075 dotest modules3-13
"test -f path/in/modules/first-dir/file1" ''
13077 fi # end of tests skipped for remote
13079 # Now here is where it used to get seriously bogus.
13081 dotest modules3-14 \
13082 "${testcvs} -q rtag tag1 path/in/modules" ''
13083 # CVS used to create this even though rtag should *never* affect
13084 # the directory current when it is called!
13085 dotest_fail modules3-15
"test -d path/in/modules" ''
13086 # Just for trivia's sake, rdiff was not similarly vulnerable
13087 # because it passed 0 for run_module_prog to do_module.
13090 # Some people seem to want this to work. I still suspect there
13091 # are dark corners in slashes in module names. This probably wants
13092 # more thought before we start hacking on CVS (one way or the other)
13093 # or documenting this.
13095 dotest modules3-16
"${testcvs} -q co another/path/test" \
13096 "U another/path/test/file1"
13097 dotest modules3-17
"cat another/path/test/file1" 'file1'
13101 modify_repo
rm -rf $CVSROOT_DIRNAME/first-dir \
13102 $CVSROOT_DIRNAME/second-dir
13108 # Some tests using the modules file with aliases that
13109 # exclude particular directories.
13113 dotest modules4-1
"${testcvs} -q co -l ." ''
13115 dotest modules4-2
"${testcvs} add first-dir" \
13116 "Directory ${CVSROOT_DIRNAME}/first-dir added to the repository"
13119 mkdir subdir subdir_long
13120 dotest modules4-3
"${testcvs} add subdir subdir_long" \
13121 "Directory ${CVSROOT_DIRNAME}/first-dir/subdir added to the repository
13122 Directory ${CVSROOT_DIRNAME}/first-dir/subdir_long added to the repository"
13125 dotest modules4-4
"${testcvs} add file1" \
13126 "${SPROG}"' add: scheduling file `file1'\'' for addition
13127 '"${SPROG}"' add: use .'"${SPROG}"' commit. to add this file permanently'
13129 echo file2
> subdir
/file2
13130 dotest modules4-5
"${testcvs} add subdir/file2" \
13131 "${SPROG}"' add: scheduling file `subdir/file2'\'' for addition
13132 '"${SPROG}"' add: use .'"${SPROG}"' commit. to add this file permanently'
13134 echo file3
> subdir_long
/file3
13135 dotest modules4-6
"${testcvs} add subdir_long/file3" \
13136 "${SPROG}"' add: scheduling file `subdir_long/file3'\'' for addition
13137 '"${SPROG}"' add: use .'"${SPROG}"' commit. to add this file permanently'
13139 dotest modules4-7
"${testcvs} -q ci -m add-it" \
13140 "$CVSROOT_DIRNAME/first-dir/file1,v <-- file1
13141 initial revision: 1\.1
13142 $CVSROOT_DIRNAME/first-dir/subdir/file2,v <-- subdir/file2
13143 initial revision: 1\.1
13144 $CVSROOT_DIRNAME/first-dir/subdir_long/file3,v <-- subdir_long/file3
13145 initial revision: 1\.1"
13149 dotest modules4-8
"${testcvs} -q update -d CVSROOT" \
13150 "U CVSROOT${DOTSTAR}"
13154 some -a !first-dir/subdir first-dir
13155 other -a !first-dir/subdir !first-dir/subdir_long first-dir
13156 somewhat -a first-dir !first-dir/subdir
13158 dotest modules4-9
"${testcvs} -q ci -m add-modules" \
13159 "$CVSROOT_DIRNAME/CVSROOT/modules,v <-- modules
13160 new revision: 1\.[0-9]*; previous revision: 1\.[0-9]*
13161 $SPROG commit: Rebuilding administrative file database"
13167 dotest modules4-10
"${testcvs} -q co all" \
13169 U first-dir/subdir/file2
13170 U first-dir/subdir_long/file3"
13173 dotest modules4-11
"${testcvs} -q co some" \
13175 U first-dir/subdir_long/file3"
13176 dotest_fail modules4-12
"test -d first-dir/subdir" ''
13177 dotest modules4-13
"test -d first-dir/subdir_long" ''
13181 # But remote seems to do it the other way.
13182 dotest modules4-14r-1
"${testcvs} -q co somewhat" \
13184 U first-dir/subdir_long/file3"
13185 dotest_fail modules4-14r-2
"test -d first-dir/subdir" ''
13186 dotest modules4-14r-3
"test -d first-dir/subdir_long" ''
13188 # This is strange behavior, in that the order of the
13189 # "!first-dir/subdir" and "first-dir" matter, and it isn't
13190 # clear that they should. I suspect it is long-standing
13191 # strange behavior but I haven't verified that.
13192 dotest modules4-14-1
"${testcvs} -q co somewhat" \
13194 U first-dir/subdir/file2
13195 U first-dir/subdir_long/file3"
13196 dotest modules4-14-2
"test -d first-dir/subdir" ''
13197 dotest modules4-14-3
"test -d first-dir/subdir_long" ''
13201 dotest modules4-15
"${testcvs} -q co other" \
13202 "U first-dir/file1"
13203 dotest_fail modules4-16
"test -d first-dir/subdir" ''
13204 dotest_fail modules4-17
"test -d first-dir/subdir_long" ''
13210 dotest modules4-18
"${testcvs} rtag tag some" \
13211 "${SPROG} rtag: Tagging first-dir
13212 ${SPROG} rtag: Ignoring first-dir/subdir
13213 ${SPROG} rtag: Tagging first-dir/subdir_long"
13215 cd 1/first-dir
/subdir
13216 dotest modules4-19
"${testcvs} log file2" "
13217 RCS file: ${CVSROOT_DIRNAME}/first-dir/subdir/file2,v
13218 Working file: file2
13224 keyword substitution: kv
13225 total revisions: 1; selected revisions: 1
13227 ----------------------------
13229 date: ${ISO8601DATE}; author: ${username}; state: Exp; commitid: ${commitid};
13231 ============================================================================="
13236 modify_repo
rm -rf $CVSROOT_DIRNAME/first-dir
13242 # Test module programs
13244 modify_repo mkdir
$CVSROOT_DIRNAME/first-dir
13247 dotest modules5-1
"$testcvs -q co first-dir"
13250 dotest modules5-2
"${testcvs} add subdir" \
13251 "Directory ${CVSROOT_DIRNAME}/first-dir/subdir added to the repository"
13254 dotest modules5-3
"${testcvs} add ssdir" \
13255 "Directory ${CVSROOT_DIRNAME}/first-dir/subdir/ssdir added to the repository"
13257 dotest modules5-4
"${testcvs} add a b" \
13258 "${SPROG} add: scheduling file .a. for addition
13259 ${SPROG} add: scheduling file .b. for addition
13260 ${SPROG} add: use .${SPROG} commit. to add these files permanently"
13262 dotest modules5-5
"${testcvs} ci -m added" \
13263 "${CPROG} commit: Examining .
13264 ${CPROG} commit: Examining ssdir
13265 ${CVSROOT_DIRNAME}/first-dir/subdir/a,v <-- a
13266 initial revision: 1\.1
13267 ${CVSROOT_DIRNAME}/first-dir/subdir/b,v <-- b
13268 initial revision: 1\.1"
13271 dotest modules5-6
"${testcvs} -q co CVSROOT" \
13272 "U CVSROOT/checkoutlist
13273 U CVSROOT/commitinfo
13275 U CVSROOT/cvswrappers
13279 U CVSROOT/postadmin
13280 U CVSROOT/postproxy
13282 U CVSROOT/postwatch
13286 U CVSROOT/verifymsg"
13288 # FIXCVS: The sleep in the following script helps avoid out of
13289 # order messages, but we really need to figure out how to fix
13290 # cvs to prevent them in the first place.
13291 for i
in checkout
export tag
; do
13292 cat >> ${CVSROOT_DIRNAME}/$i.sh
<<EOF
13295 echo "$i script invoked in \`pwd\`"
13298 # Cygwin doesn't set premissions correctly over the Samba share.
13299 if test -n "$remotehost"; then
13300 $CVS_RSH $remotehost "chmod +x ${CVSROOT_DIRNAME}/$i.sh"
13302 chmod +x
${CVSROOT_DIRNAME}/$i.sh
13306 OPTS
="-o${CVSROOT_DIRNAME}/checkout.sh -e ${CVSROOT_DIRNAME}/export.sh -t${CVSROOT_DIRNAME}/tag.sh"
13307 cat >CVSROOT
/modules
<<EOF
13308 realmodule ${OPTS} first-dir/subdir a
13309 dirmodule ${OPTS} first-dir/subdir
13310 namedmodule -d nameddir ${OPTS} first-dir/subdir
13313 dotest modules5-7
"$testcvs -Q ci -m 'add modules' CVSROOT/modules"
13318 # Test that real modules check out to realmodule/a, not subdir/a.
13321 # Mac OSX 10.3 (Darwin ppc-osx1 5.5) fails here when $TMPDIR
13322 # contains a symlink (it does not fail the local modules5-8).
13323 # Since no other platforms are exhibiting the same problem, I
13324 # suspect an issue with OSX and fork() or the like dereferencing
13325 # the symlink, but it is possible it is something that could be
13326 # fixed or worked around in CVS.
13327 dotest modules5-8r
"$testcvs co realmodule" \
13329 ${SPROG} checkout: Executing ..${CVSROOT_DIRNAME}/checkout\.sh. .realmodule..
13330 checkout script invoked in ${TMPDIR}/cvs-serv[0-9a-z]*
13333 dotest modules5-8
"${testcvs} co realmodule" \
13335 ${SPROG} checkout: Executing ..${CVSROOT_DIRNAME}/checkout\.sh. .realmodule..
13336 checkout script invoked in ${TESTDIR}/1
13339 dotest modules5-9
"test -d realmodule && test -f realmodule/a" ""
13340 dotest_fail modules5-10
"test -f realmodule/b" ""
13342 dotest modules5-11
"${testcvs} -q co realmodule" \
13343 "checkout script invoked in ${TMPDIR}/cvs-serv[0-9a-z]*
13345 dotest modules5-12
"${testcvs} -q update" ''
13346 echo "change" >>realmodule
/a
13347 dotest modules5-13
"${testcvs} -q ci -m." \
13348 "$CVSROOT_DIRNAME/first-dir/subdir/a,v <-- realmodule/a
13349 new revision: 1\.2; previous revision: 1\.1"
13351 dotest modules5-11
"${testcvs} -q co realmodule" \
13352 "checkout script invoked in ${TESTDIR}/1
13354 dotest modules5-12
"${testcvs} -q update" ''
13355 echo "change" >>realmodule
/a
13356 dotest modules5-13
"${testcvs} -q ci -m." \
13357 "$CVSROOT_DIRNAME/first-dir/subdir/a,v <-- realmodule/a
13358 new revision: 1\.2; previous revision: 1\.1"
13360 dotest modules5-14
"echo yes | ${testcvs} release -d realmodule" \
13361 "You have \[0\] altered files in this repository\.
13362 Are you sure you want to release (and delete) directory .realmodule.: "
13363 dotest modules5-15
"${testcvs} -q rtag -Dnow MYTAG realmodule" \
13364 "tag script invoked in ${TESTDIR}/1
13365 args: realmodule MYTAG" \
13366 "tag script invoked in ${TMPDIR}/cvs-serv[0-9a-z]*
13367 args: realmodule MYTAG"
13369 dotest modules5-16
"${testcvs} -q export -r MYTAG realmodule" \
13371 export script invoked in ${TMPDIR}/cvs-serv[0-9a-z]*
13374 dotest modules5-16
"${testcvs} -q export -r MYTAG realmodule" \
13376 export script invoked in ${TESTDIR}/1
13381 dotest_fail modules5-17
"${testcvs} co realmodule/a" \
13382 "${SPROG}"' checkout: module `realmodule/a'\'' is a request for a file in a module which is not a directory' \
13383 "${SPROG}"' server: module `realmodule/a'\'' is a request for a file in a module which is not a directory
13384 '"${CPROG}"' \[checkout aborted\]: cannot expand modules'
13386 # Now test the ability to check out a single file from a directory
13388 dotest modules5-18
"${testcvs} co dirmodule/a" \
13390 ${SPROG} checkout: Executing ..${CVSROOT_DIRNAME}/checkout\.sh. .dirmodule..
13391 checkout script invoked in ${TMPDIR}/cvs-serv[0-9a-z]*
13394 dotest modules5-18
"${testcvs} co dirmodule/a" \
13396 ${SPROG} checkout: Executing ..${CVSROOT_DIRNAME}/checkout\.sh. .dirmodule..
13397 checkout script invoked in ${TESTDIR}/1
13400 dotest modules5-19
"test -d dirmodule && test -f dirmodule/a" ""
13401 dotest_fail modules5-20
"test -f dirmodule/b" ""
13402 dotest modules5-21
"echo yes | ${testcvs} release -d dirmodule" \
13403 "You have \[0\] altered files in this repository\.
13404 Are you sure you want to release (and delete) directory .dirmodule.: "
13406 # Now test the ability to correctly reject a non-existent filename.
13407 # For maximum studliness we would check that an error message is
13409 # We accept a zero exit status because it is what CVS does
13410 # (Dec 95). Probably the exit status should be nonzero,
13413 dotest modules5-22
"${testcvs} co dirmodule/nonexist" \
13414 "${SPROG} checkout: warning: new-born \`dirmodule/nonexist' has disappeared
13415 ${SPROG} checkout: Executing ..${CVSROOT_DIRNAME}/checkout\.sh. .dirmodule..
13416 checkout script invoked in ${TMPDIR}/cvs-serv[0-9a-z]*
13419 dotest modules5-22
"${testcvs} co dirmodule/nonexist" \
13420 "${SPROG} checkout: warning: new-born \`dirmodule/nonexist' has disappeared
13421 ${SPROG} checkout: Executing ..${CVSROOT_DIRNAME}/checkout\.sh. .dirmodule..
13422 checkout script invoked in ${TESTDIR}/1
13425 # We tolerate the creation of the dirmodule directory, since that
13426 # is what CVS does, not because we view that as preferable to not
13428 dotest_fail modules5-23
"test -f dirmodule/a || test -f dirmodule/b" ""
13431 # Now test that a module using -d checks out to the specified
13434 dotest modules5-24
"${testcvs} -q co namedmodule" \
13437 checkout script invoked in ${TMPDIR}/cvs-serv[0-9a-z]*
13440 dotest modules5-24
"${testcvs} -q co namedmodule" \
13443 checkout script invoked in ${TESTDIR}/1
13446 dotest modules5-25
"test -f nameddir/a && test -f nameddir/b" ""
13447 echo add line
>>nameddir
/a
13448 # This seems suspicious: when we checkout an existing directory,
13449 # the checkout script gets executed in addition to the update
13450 # script. Is that by design or accident?
13452 dotest modules5-26
"${testcvs} -q co namedmodule" \
13454 checkout script invoked in ${TMPDIR}/cvs-serv[0-9a-z]*
13457 dotest modules5-26
"${testcvs} -q co namedmodule" \
13459 checkout script invoked in ${TESTDIR}/1
13465 dotest modules5-27
"${testcvs} -q co namedmodule" \
13467 checkout script invoked in ${TMPDIR}/cvs-serv[0-9a-z]*
13470 dotest modules5-27
"${testcvs} -q co namedmodule" \
13472 checkout script invoked in ${TESTDIR}/1
13475 dotest modules5-28
"echo yes | ${testcvs} release -d nameddir" \
13476 "You have \[0\] altered files in this repository\.
13477 Are you sure you want to release (and delete) directory .nameddir.: "
13479 # Now try the same tests with -d on command line
13480 # FIXCVS? The manual says the modules programs get the module name,
13481 # but they really get the directory name.
13483 dotest modules5-29
"${testcvs} co -d mydir realmodule" \
13485 ${SPROG} checkout: Executing ..${CVSROOT_DIRNAME}/checkout\.sh. .mydir..
13486 checkout script invoked in ${TMPDIR}/cvs-serv[0-9a-z]*
13489 dotest modules5-29
"${testcvs} co -d mydir realmodule" \
13491 ${SPROG} checkout: Executing ..${CVSROOT_DIRNAME}/checkout\.sh. .mydir..
13492 checkout script invoked in ${TESTDIR}/1
13495 dotest modules5-30
"test -d mydir && test -f mydir/a" ""
13496 dotest_fail modules5-31
"test -d realmodule || test -f mydir/b" ""
13498 dotest modules5-32
"${testcvs} -q co -d mydir realmodule" \
13499 "checkout script invoked in ${TMPDIR}/cvs-serv[0-9a-z]*
13501 dotest modules5-33
"${testcvs} -q update" ''
13502 echo "change" >>mydir
/a
13503 dotest modules5-34
"${testcvs} -q ci -m." \
13504 "$CVSROOT_DIRNAME/first-dir/subdir/a,v <-- mydir/a
13505 new revision: 1\.3; previous revision: 1\.2"
13507 dotest modules5-32
"${testcvs} -q co -d mydir realmodule" \
13508 "checkout script invoked in ${TESTDIR}/1
13510 dotest modules5-33
"${testcvs} -q update" ''
13511 echo "change" >>mydir
/a
13512 dotest modules5-34
"${testcvs} -q ci -m." \
13513 "$CVSROOT_DIRNAME/first-dir/subdir/a,v <-- mydir/a
13514 new revision: 1\.3; previous revision: 1\.2"
13516 dotest modules5-35
"echo yes | ${testcvs} release -d mydir" \
13517 "You have \[0\] altered files in this repository\.
13518 Are you sure you want to release (and delete) directory .mydir.: "
13520 dotest modules5-36
"${testcvs} -q rtag -Dnow MYTAG2 realmodule" \
13521 "tag script invoked in ${TMPDIR}/cvs-serv[0-9a-z]*
13522 args: realmodule MYTAG2"
13523 dotest modules5-37
"${testcvs} -q export -r MYTAG2 -d mydir realmodule" \
13525 export script invoked in ${TMPDIR}/cvs-serv[0-9a-z]*
13528 dotest modules5-36
"${testcvs} -q rtag -Dnow MYTAG2 realmodule" \
13529 "tag script invoked in ${TESTDIR}/1
13530 args: realmodule MYTAG2"
13531 dotest modules5-37
"${testcvs} -q export -r MYTAG2 -d mydir realmodule" \
13533 export script invoked in ${TESTDIR}/1
13538 # Now test the ability to check out a single file from a directory
13540 dotest modules5-38
"${testcvs} co -d mydir dirmodule/a" \
13542 ${SPROG} checkout: Executing ..${CVSROOT_DIRNAME}/checkout\.sh. .mydir..
13543 checkout script invoked in ${TMPDIR}/cvs-serv[0-9a-z]*
13546 dotest modules5-38
"${testcvs} co -d mydir dirmodule/a" \
13548 ${SPROG} checkout: Executing ..${CVSROOT_DIRNAME}/checkout\.sh. .mydir..
13549 checkout script invoked in ${TESTDIR}/1
13552 dotest modules5-39
"test -d mydir && test -f mydir/a" ""
13553 dotest_fail modules5-40
"test -d dirmodule || test -f mydir/b" ""
13554 dotest modules5-41
"echo yes | ${testcvs} release -d mydir" \
13555 "You have \[0\] altered files in this repository\.
13556 Are you sure you want to release (and delete) directory .mydir.: "
13558 # Now test the ability to correctly reject a non-existent filename.
13559 # For maximum studliness we would check that an error message is
13561 # We accept a zero exit status because it is what CVS does
13562 # (Dec 95). Probably the exit status should be nonzero,
13565 dotest modules5-42
"${testcvs} co -d mydir dirmodule/nonexist" \
13566 "${SPROG} checkout: warning: new-born \`mydir/nonexist' has disappeared
13567 ${SPROG} checkout: Executing ..${CVSROOT_DIRNAME}/checkout\.sh. .mydir..
13568 checkout script invoked in ${TMPDIR}/cvs-serv[0-9a-z]*
13571 dotest modules5-42
"${testcvs} co -d mydir dirmodule/nonexist" \
13572 "${SPROG} checkout: warning: new-born \`mydir/nonexist' has disappeared
13573 ${SPROG} checkout: Executing ..${CVSROOT_DIRNAME}/checkout\.sh. .mydir..
13574 checkout script invoked in ${TESTDIR}/1
13577 # We tolerate the creation of the mydir directory, since that
13578 # is what CVS does, not because we view that as preferable to not
13580 dotest_fail modules5-43
"test -f mydir/a || test -f mydir/b" ""
13584 dotest modules5-44
"${testcvs} -q co -d mydir namedmodule" \
13587 checkout script invoked in ${TMPDIR}/cvs-serv[0-9a-z]*
13590 dotest modules5-44
"${testcvs} -q co -d mydir namedmodule" \
13593 checkout script invoked in ${TESTDIR}/1
13596 dotest modules5-45
"test -f mydir/a && test -f mydir/b" ""
13597 dotest_fail modules5-46
"test -d namedir"
13598 echo add line
>>mydir
/a
13599 # This seems suspicious: when we checkout an existing directory,
13600 # the checkout script gets executed in addition to the update
13601 # script. Is that by design or accident?
13603 dotest modules5-47
"${testcvs} -q co -d mydir namedmodule" \
13605 checkout script invoked in ${TMPDIR}/cvs-serv[0-9a-z]*
13608 dotest modules5-47
"${testcvs} -q co -d mydir namedmodule" \
13610 checkout script invoked in ${TESTDIR}/1
13616 dotest modules5-48
"${testcvs} -q co -d mydir namedmodule" \
13618 checkout script invoked in ${TMPDIR}/cvs-serv[0-9a-z]*
13621 dotest modules5-48
"${testcvs} -q co -d mydir namedmodule" \
13623 checkout script invoked in ${TESTDIR}/1
13626 dotest modules5-49
"echo yes | ${testcvs} release -d mydir" \
13627 "You have \[0\] altered files in this repository\.
13628 Are you sure you want to release (and delete) directory .mydir.: "
13633 modify_repo
rm -rf $CVSROOT_DIRNAME/first-dir \
13634 $CVSROOT_DIRNAME/*.sh
13641 # Test invalid module definitions
13643 # See the header comment for the `modules' test for an index of
13644 # the complete suite of modules tests.
13648 # There was a bug in CVS through 1.11.1p1 where a bad module name
13649 # would cause the previous line to be parsed as the module
13650 # definition. This test proves this doesn't happen anymore.
13654 dotest module6-setup-1
"${testcvs} -Q co CVSROOT" ""
13656 echo "longmodulename who cares" >modules
13657 echo "badname" >>modules
13658 # This test almost isn't setup since it generates the error message
13659 # we are looking for if `-Q' isn't specified, but I want to test the
13660 # filename in the message later.
13661 dotest modules6-setup-2
"$testcvs -Q ci -mbad-modules"
13663 # Here's where CVS would report not being able to find `lename'
13665 dotest_fail modules6-1
"${testcvs} -q co badname" \
13666 "${SPROG} checkout: warning: NULL value for key .badname. at line 2 of .${CVSROOT_DIRNAME}/CVSROOT/modules.
13667 ${SPROG} checkout: cannot find module .badname. - ignored" \
13668 "${SPROG} server: warning: NULL value for key .badname. at line 2 of .${CVSROOT_DIRNAME}/CVSROOT/modules.
13669 ${SPROG} server: cannot find module .badname. - ignored
13670 ${CPROG} \[checkout aborted\]: cannot expand modules"
13682 # Test tag problems vs an empty CVSROOT/val-tags file
13684 # See the header comment for the `modules' test for an index of
13685 # the complete suite of modules tests.
13689 dotest modules7-1
"$testcvs -Q co -d top ."
13692 dotest modules7-2
"$testcvs -Q add zero one"
13694 echo 'file1 contents' > file1
13695 dotest modules7-2
"$testcvs -Q add file1"
13696 dotest modules7-3
"$testcvs -Q ci -mnew file1"
13697 dotest modules7-4
"$testcvs -Q tag mytag file1"
13699 echo 'all -a zero one' > modules
13700 dotest modules7-5
"$testcvs -Q ci -mall-module"
13705 # This failed prior to CVS version 1.12.10.
13706 dotest modules7-7
"$testcvs export -rmytag all" \
13707 "$SPROG export: Updating zero
13708 $SPROG export: Updating one
13710 dotest modules7-8
'cat one/file1' 'file1 contents'
13718 rm -rf $CVSROOT_DIRNAME/zero
$CVSROOT_DIRNAME/one
13724 # When a file listed in checkoutlist doesn't exist, cvs-1.10.4
13725 # would fail to remove the CVSROOT/.#[0-9]* temporary file it
13726 # creates while mkmodules is in the process of trying to check
13727 # out the missing file.
13730 dotest mkmodules-temp-file-removal-1
"${testcvs} -Q co CVSROOT" ''
13732 echo no-such-file
>> checkoutlist
13733 dotest mkmodules-temp-file-removal-2
"$testcvs -Q ci -m. checkoutlist"
13735 dotest mkmodules-temp-file-removal-3 \
13736 "echo $CVSROOT_DIRNAME/CVSROOT/.#[0-9]*" \
13737 "$CVSROOT_DIRNAME/CVSROOT/\.#\[0-9\]\*"
13739 # Versions 1.11.6 & 1.12.1 and earlier of CVS printed most of the
13740 # white space included before error messages in checkoutlist.
13741 echo "no-such-file Failed to update no-such-file." >checkoutlist
13742 dotest mkmodules-error-message-1
"$testcvs -Q ci -m. checkoutlist" \
13743 "$SPROG commit: Failed to update no-such-file\."
13745 # Versions 1.11.6 & 1.12.1 and earlier of CVS used the error string
13746 # from the checkoutlist file as the format string passed to error()'s
13747 # printf. Check that this is no longer the case by verifying that
13748 # printf format patterns remain unchanged.
13749 echo "no-such-file Failed to update %s %lx times because %s happened %d times." >checkoutlist
13750 dotest mkmodules-error-message-2
"$testcvs -Q ci -m. checkoutlist" \
13751 "$SPROG commit: Failed to update %s %lx times because %s happened %d times\."
13753 dotest mkmodules-cleanup-1 \
13754 "$testcvs -Q up -pr1.1 checkoutlist >checkoutlist"
13755 dotest mkmodules-cleanup-2
"$testcvs -Q ci -m. checkoutlist"
13765 # Some tests of various permutations of co-d when directories exist
13766 # and checkouts lengthen.
13768 # Interestingly enough, these same tests pass when the directory
13769 # lengthening happens via the modules file. Go figure.
13771 mkdir
$module; cd $module
13773 dotest co-d-init-1
"$testcvs -Q co -l ."
13775 dotest co-d-init-2
"$testcvs -Q add $module"
13777 echo content
>file1
13778 echo different content
>file2
13779 dotest co-d-init-3
"$testcvs -Q add file1 file2"
13780 dotest co-d-init-4
"$testcvs -Q ci -madd-em"
13784 dotest co-d-1
"$testcvs -q co -d dir $module" \
13787 dotest co-d-1.2
"cat dir/CVS/Repository" "$module"
13789 dotest co-d-2
"$testcvs -q co -d dir2/sdir $module" \
13792 dotest co-d-2.2
"cat dir2/CVS/Repository" "."
13793 dotest co-d-2.3
"cat dir2/sdir/CVS/Repository" "$module"
13795 dotest co-d-2.4
"$testcvs -q co -d dir2.4/sdir/sdir2 $module" \
13796 "U dir2.4/sdir/sdir2/file1
13797 U dir2.4/sdir/sdir2/file2"
13798 dotest co-d-2.4
.2 "cat dir2.4/CVS/Repository" "CVSROOT/Emptydir"
13799 dotest co-d-2.4
.3 "cat dir2.4/sdir/CVS/Repository" "."
13800 dotest co-d-2.4
.3 "cat dir2.4/sdir/sdir2/CVS/Repository" "$module"
13803 dotest co-d-3
"$testcvs -q co -d dir3 $module" \
13806 dotest co-d-3.2
"cat dir3/CVS/Repository" "$module"
13809 dotest co-d-4
"$testcvs -q co -d dir4/sdir $module" \
13813 # CVS is only supposed to create administration directories in
13814 # directories it also creates, and in the directory specified by
13815 # the last portion of the path passed to -d regardless. This is
13818 # This is broken in client/server mode because the server does not
13819 # know the client's directory structure and has to create
13822 dotest co-d-4.2r
"cat dir4/CVS/Repository" "."
13824 dotest_fail co-d-4.2
"test -d dir4/CVS"
13827 dotest co-d-4.3
"cat dir4/sdir/CVS/Repository" "$module"
13831 dotest co-d-5
"$testcvs -q co -d dir5/sdir $module" \
13834 # FIXCVS as for co-d-4.2r.
13836 dotest co-d-5.2
"cat dir5/CVS/Repository" "."
13838 dotest_fail co-d-5.2
"test -d dir5/CVS"
13841 dotest co-d-5.3
"cat dir5/sdir/CVS/Repository" "$module"
13846 modify_repo
rm -rf $CVSROOT_DIRNAME/$module
13853 # These test check the content of CVS' administrative
13854 # files as they are checked out in various configurations.
13855 # (As a side note, I'm not using the "-q" flag in any of
13856 # this code, which should provide some extra checking for
13857 # those messages which don't seem to be checked thoroughly
13858 # anywhere else.) To do a thorough test, we need to make
13859 # a bunch of modules in various configurations.
13861 # <1mod> is a directory at the top level of cvsroot
13863 # <2mod> is a directory at the second level of cvsroot
13865 # <1d1mod> is a directory at the top level which is
13866 # checked out into another directory
13867 # ``foo -d bar baz''
13868 # <1d2mod> is a directory at the second level which is
13869 # checked out into another directory
13870 # ``foo -d bar baz/quux''
13871 # <2d1mod> is a directory at the top level which is
13872 # checked out into a directory that is two deep
13873 # ``foo -d bar/baz quux''
13874 # <2d2mod> is a directory at the second level which is
13875 # checked out into a directory that is two deep
13876 # ``foo -d bar/baz quux''
13878 # The tests do each of these types separately and in twos.
13879 # We also repeat each test -d flag for 1-deep and 2-deep
13882 # Each test should check the output for the Repository
13883 # file, since that is the one which varies depending on
13884 # the directory and how it was checked out.
13886 # Yes, this is verbose, but at least it's very thorough.
13888 # convenience variables
13891 # First, set TopLevelAdmin=yes so we're sure to get
13892 # top-level CVS directories.
13894 dotest cvsadm-setup-1
"${testcvs} -q co CVSROOT/config" \
13897 echo "TopLevelAdmin=yes" >>config
13898 dotest cvsadm-setup-2
"${testcvs} -q ci -m yes-top-level" \
13899 "$CVSROOT_DIRNAME/CVSROOT/config,v <-- config
13900 new revision: 1\.[0-9]*; previous revision: 1\.[0-9]*
13901 $SPROG commit: Rebuilding administrative file database"
13905 # Second, check out the modules file and edit it.
13907 dotest cvsadm-1
"${testcvs} co CVSROOT/modules" \
13908 "U CVSROOT/modules"
13910 # Test CVS/Root once. Since there is only one part of
13911 # the code which writes CVS/Root files (Create_Admin),
13912 # there is no point in testing this every time.
13913 dotest cvsadm-1a
"cat CVS/Root" ${REP}
13914 dotest cvsadm-1b
"cat CVS/Repository" "\."
13915 dotest cvsadm-1c
"cat CVSROOT/CVS/Root" ${REP}
13916 dotest cvsadm-1d
"cat CVSROOT/CVS/Repository" "CVSROOT"
13917 # All of the defined module names begin with a number.
13918 # All of the top-level directory names begin with "dir".
13919 # All of the subdirectory names begin with "sub".
13920 # All of the top-level modules begin with "mod".
13921 echo "# Module defs for cvsadm tests" > CVSROOT
/modules
13922 echo "1mod mod1" >> CVSROOT
/modules
13923 echo "1mod-2 mod1-2" >> CVSROOT
/modules
13924 echo "2mod mod2/sub2" >> CVSROOT
/modules
13925 echo "2mod-2 mod2-2/sub2-2" >> CVSROOT
/modules
13926 echo "1d1mod -d dir1d1 mod1" >> CVSROOT
/modules
13927 echo "1d1mod-2 -d dir1d1-2 mod1-2" >> CVSROOT
/modules
13928 echo "1d2mod -d dir1d2 mod2/sub2" >> CVSROOT
/modules
13929 echo "1d2mod-2 -d dir1d2-2 mod2-2/sub2-2" >> CVSROOT
/modules
13930 echo "2d1mod -d dir2d1/sub2d1 mod1" >> CVSROOT
/modules
13931 echo "2d1mod-2 -d dir2d1-2/sub2d1-2 mod1-2" >> CVSROOT
/modules
13932 echo "2d2mod -d dir2d2/sub2d2 mod2/sub2" >> CVSROOT
/modules
13933 echo "2d2mod-2 -d dir2d2-2/sub2d2-2 mod2-2/sub2-2" >> CVSROOT
/modules
13934 dotest cvsadm-1e
"${testcvs} ci -m add-modules" \
13935 "${CPROG} commit: Examining .
13936 ${CPROG} commit: Examining CVSROOT
13937 ${CVSROOT_DIRNAME}/CVSROOT/modules,v <-- CVSROOT/modules
13938 new revision: 1\.[0-9]*; previous revision: 1\.[0-9]*
13939 ${SPROG} commit: Rebuilding administrative file database" \
13940 "${CPROG} commit: Examining .
13941 ${CPROG} commit: Examining CVSROOT"
13942 rm -rf CVS CVSROOT
;
13944 # Create the various modules
13945 dotest cvsadm-2
"${testcvs} -q co -l ." ''
13951 mkdir mod2-
2/sub2-2
13952 dotest cvsadm-2a
"${testcvs} add mod1 mod1-2 mod2 mod2/sub2 mod2-2 mod2-2/sub2-2" \
13953 "Directory ${CVSROOT_DIRNAME}/mod1 added to the repository
13954 Directory ${CVSROOT_DIRNAME}/mod1-2 added to the repository
13955 Directory ${CVSROOT_DIRNAME}/mod2 added to the repository
13956 Directory ${CVSROOT_DIRNAME}/mod2/sub2 added to the repository
13957 Directory ${CVSROOT_DIRNAME}/mod2-2 added to the repository
13958 Directory ${CVSROOT_DIRNAME}/mod2-2/sub2-2 added to the repository"
13960 # Populate the directories for the halibut
13961 echo "file1" > mod
1/file1
13962 echo "file1-2" > mod1-
2/file1-2
13963 echo "file2" > mod
2/sub
2/file2
13964 echo "file2-2" > mod2-
2/sub2-
2/file2-2
13965 dotest cvsadm-2aa
"${testcvs} add mod1/file1 mod1-2/file1-2 mod2/sub2/file2 mod2-2/sub2-2/file2-2" \
13966 "${SPROG} add: scheduling file .mod1/file1. for addition
13967 ${SPROG} add: scheduling file .mod1-2/file1-2. for addition
13968 ${SPROG} add: scheduling file .mod2/sub2/file2. for addition
13969 ${SPROG} add: scheduling file .mod2-2/sub2-2/file2-2. for addition
13970 ${SPROG} add: use \`${SPROG} commit' to add these files permanently"
13972 dotest cvsadm-2b
"${testcvs} ci -m yup mod1 mod1-2 mod2 mod2-2" \
13973 "${CPROG} commit: Examining mod1
13974 ${CPROG} commit: Examining mod1-2
13975 ${CPROG} commit: Examining mod2
13976 ${CPROG} commit: Examining mod2/sub2
13977 ${CPROG} commit: Examining mod2-2
13978 ${CPROG} commit: Examining mod2-2/sub2-2
13979 ${CVSROOT_DIRNAME}/mod1/file1,v <-- mod1/file1
13980 initial revision: 1.1
13981 ${CVSROOT_DIRNAME}/mod1-2/file1-2,v <-- mod1-2/file1-2
13982 initial revision: 1.1
13983 ${CVSROOT_DIRNAME}/mod2/sub2/file2,v <-- mod2/sub2/file2
13984 initial revision: 1.1
13985 ${CVSROOT_DIRNAME}/mod2-2/sub2-2/file2-2,v <-- mod2-2/sub2-2/file2-2
13986 initial revision: 1.1"
13987 # Finished creating the modules -- clean up.
13988 rm -rf CVS mod1 mod1-2 mod2 mod2-2
13991 ##################################################
13992 ## Start the dizzying array of possibilities.
13993 ## Begin with each module type separately.
13994 ##################################################
13996 # Pattern -- after each checkout, first check the top-level
13997 # CVS directory. Then, check the directories in numerical
14000 dotest cvsadm-3
"${testcvs} co 1mod" \
14001 "${SPROG} checkout: Updating 1mod
14003 dotest cvsadm-3b
"cat CVS/Repository" "\."
14004 dotest cvsadm-3d
"cat 1mod/CVS/Repository" "mod1"
14007 dotest cvsadm-4
"${testcvs} co 2mod" \
14008 "${SPROG} checkout: Updating 2mod
14010 dotest cvsadm-4b
"cat CVS/Repository" "\."
14011 dotest cvsadm-4d
"cat 2mod/CVS/Repository" "mod2/sub2"
14014 dotest cvsadm-5
"${testcvs} co 1d1mod" \
14015 "${SPROG} checkout: Updating dir1d1
14017 dotest cvsadm-5b
"cat CVS/Repository" "\."
14018 dotest cvsadm-5d
"cat dir1d1/CVS/Repository" "mod1"
14021 dotest cvsadm-6
"${testcvs} co 1d2mod" \
14022 "${SPROG} checkout: Updating dir1d2
14024 dotest cvsadm-6b
"cat CVS/Repository" "\."
14025 dotest cvsadm-6d
"cat dir1d2/CVS/Repository" "mod2/sub2"
14028 dotest cvsadm-7
"${testcvs} co 2d1mod" \
14029 "${SPROG} checkout: Updating dir2d1/sub2d1
14030 U dir2d1/sub2d1/file1"
14031 dotest cvsadm-7b
"cat CVS/Repository" "\."
14032 dotest cvsadm-7d
"cat dir2d1/CVS/Repository" "\."
14033 dotest cvsadm-7f
"cat dir2d1/sub2d1/CVS/Repository" "mod1"
14036 dotest cvsadm-8
"${testcvs} co 2d2mod" \
14037 "${SPROG} checkout: Updating dir2d2/sub2d2
14038 U dir2d2/sub2d2/file2"
14039 dotest cvsadm-8b
"cat CVS/Repository" "\."
14040 dotest cvsadm-8d
"cat dir2d2/CVS/Repository" "mod2"
14041 dotest cvsadm-8f
"cat dir2d2/sub2d2/CVS/Repository" "mod2/sub2"
14044 ##################################################
14045 ## You are in a shell script of twisted little
14046 ## module combination statements, all alike.
14047 ##################################################
14051 dotest cvsadm-9
"${testcvs} co 1mod 1mod-2" \
14052 "${SPROG} checkout: Updating 1mod
14054 ${SPROG} checkout: Updating 1mod-2
14056 # the usual for the top level
14057 dotest cvsadm-9b
"cat CVS/Repository" "\."
14058 # the usual for 1mod
14059 dotest cvsadm-9d
"cat 1mod/CVS/Repository" "mod1"
14060 # the usual for 1mod copy
14061 dotest cvsadm-9f
"cat 1mod-2/CVS/Repository" "mod1-2"
14062 rm -rf CVS
1mod
1mod-2
14064 # 1mod 2mod redmod bluemod
14065 dotest cvsadm-10
"${testcvs} co 1mod 2mod" \
14066 "${SPROG} checkout: Updating 1mod
14068 ${SPROG} checkout: Updating 2mod
14070 # the usual for the top level
14071 dotest cvsadm-10b
"cat CVS/Repository" "\."
14072 # the usual for 1mod
14073 dotest cvsadm-10d
"cat 1mod/CVS/Repository" "mod1"
14074 # the usual for 2dmod
14075 dotest cvsadm-10f
"cat 2mod/CVS/Repository" "mod2/sub2"
14076 rm -rf CVS
1mod
2mod
14078 dotest cvsadm-11
"${testcvs} co 1mod 1d1mod" \
14079 "${SPROG} checkout: Updating 1mod
14081 ${SPROG} checkout: Updating dir1d1
14083 # the usual for the top level
14084 dotest cvsadm-11b
"cat CVS/Repository" "\."
14085 # the usual for 1mod
14086 dotest cvsadm-11d
"cat 1mod/CVS/Repository" "mod1"
14087 # the usual for 1d1mod
14088 dotest cvsadm-11f
"cat dir1d1/CVS/Repository" "mod1"
14089 rm -rf CVS
1mod dir1d1
14091 dotest cvsadm-12
"${testcvs} co 1mod 1d2mod" \
14092 "${SPROG} checkout: Updating 1mod
14094 ${SPROG} checkout: Updating dir1d2
14096 # the usual for the top level
14097 dotest cvsadm-12b
"cat CVS/Repository" "\."
14098 # the usual for 1mod
14099 dotest cvsadm-12d
"cat 1mod/CVS/Repository" "mod1"
14100 # the usual for 1d2mod
14101 dotest cvsadm-12f
"cat dir1d2/CVS/Repository" "mod2/sub2"
14102 rm -rf CVS
1mod dir1d2
14104 dotest cvsadm-13
"${testcvs} co 1mod 2d1mod" \
14105 "${SPROG} checkout: Updating 1mod
14107 ${SPROG} checkout: Updating dir2d1/sub2d1
14108 U dir2d1/sub2d1/file1"
14109 # the usual for the top level
14110 dotest cvsadm-13b
"cat CVS/Repository" "\."
14111 # the usual for 1mod
14112 dotest cvsadm-13d
"cat 1mod/CVS/Repository" "mod1"
14113 # the usual for 2d1mod
14114 dotest cvsadm-13f
"cat dir2d1/CVS/Repository" "\."
14115 dotest cvsadm-13h
"cat dir2d1/sub2d1/CVS/Repository" "mod1"
14116 rm -rf CVS
1mod dir2d1
14118 dotest cvsadm-14
"${testcvs} co 1mod 2d2mod" \
14119 "${SPROG} checkout: Updating 1mod
14121 ${SPROG} checkout: Updating dir2d2/sub2d2
14122 U dir2d2/sub2d2/file2"
14123 # the usual for the top level
14124 dotest cvsadm-14b
"cat CVS/Repository" "\."
14125 # the usual for 1mod
14126 dotest cvsadm-14d
"cat 1mod/CVS/Repository" "mod1"
14127 # the usual for 2d2mod
14128 dotest cvsadm-14f
"cat dir2d2/CVS/Repository" "mod2"
14129 dotest cvsadm-14h
"cat dir2d2/sub2d2/CVS/Repository" "mod2/sub2"
14130 rm -rf CVS
1mod dir2d2
14135 dotest cvsadm-15
"${testcvs} co 2mod 2mod-2" \
14136 "${SPROG} checkout: Updating 2mod
14138 ${SPROG} checkout: Updating 2mod-2
14140 # the usual for the top level
14141 dotest cvsadm-15b
"cat CVS/Repository" "\."
14142 # the usual for 2mod
14143 dotest cvsadm-15d
"cat 2mod/CVS/Repository" "mod2/sub2"
14144 # the usual for 2mod copy
14145 dotest cvsadm-15f
"cat 2mod-2/CVS/Repository" "mod2-2/sub2-2"
14146 rm -rf CVS
2mod
2mod-2
14149 dotest cvsadm-16
"${testcvs} co 2mod 1d1mod" \
14150 "${SPROG} checkout: Updating 2mod
14152 ${SPROG} checkout: Updating dir1d1
14154 # the usual for the top level
14155 dotest cvsadm-16b
"cat CVS/Repository" "\."
14156 # the usual for 2mod
14157 dotest cvsadm-16d
"cat 2mod/CVS/Repository" "mod2/sub2"
14158 # the usual for 1d1mod
14159 dotest cvsadm-16f
"cat dir1d1/CVS/Repository" "mod1"
14160 rm -rf CVS
2mod dir1d1
14162 dotest cvsadm-17
"${testcvs} co 2mod 1d2mod" \
14163 "${SPROG} checkout: Updating 2mod
14165 ${SPROG} checkout: Updating dir1d2
14167 # the usual for the top level
14168 dotest cvsadm-17b
"cat CVS/Repository" "\."
14169 # the usual for 2mod
14170 dotest cvsadm-17d
"cat 2mod/CVS/Repository" "mod2/sub2"
14171 # the usual for 1d2mod
14172 dotest cvsadm-17f
"cat dir1d2/CVS/Repository" "mod2/sub2"
14173 rm -rf CVS
2mod dir1d2
14175 dotest cvsadm-18
"${testcvs} co 2mod 2d1mod" \
14176 "${SPROG} checkout: Updating 2mod
14178 ${SPROG} checkout: Updating dir2d1/sub2d1
14179 U dir2d1/sub2d1/file1"
14180 # the usual for the top level
14181 dotest cvsadm-18b
"cat CVS/Repository" "\."
14182 # the usual for 2mod
14183 dotest cvsadm-18d
"cat 2mod/CVS/Repository" "mod2/sub2"
14184 # the usual for 2d1mod
14185 dotest cvsadm-18f
"cat dir2d1/CVS/Repository" "\."
14186 dotest cvsadm-18h
"cat dir2d1/sub2d1/CVS/Repository" "mod1"
14187 rm -rf CVS
2mod dir2d1
14189 dotest cvsadm-19
"${testcvs} co 2mod 2d2mod" \
14190 "${SPROG} checkout: Updating 2mod
14192 ${SPROG} checkout: Updating dir2d2/sub2d2
14193 U dir2d2/sub2d2/file2"
14194 # the usual for the top level
14195 dotest cvsadm-19b
"cat CVS/Repository" "\."
14196 # the usual for 2mod
14197 dotest cvsadm-19d
"cat 2mod/CVS/Repository" "mod2/sub2"
14198 # the usual for 2d2mod
14199 dotest cvsadm-19f
"cat dir2d2/CVS/Repository" "mod2"
14200 dotest cvsadm-19h
"cat dir2d2/sub2d2/CVS/Repository" "mod2/sub2"
14201 rm -rf CVS
2mod dir2d2
14206 dotest cvsadm-20
"${testcvs} co 1d1mod 1d1mod-2" \
14207 "${SPROG} checkout: Updating dir1d1
14209 ${SPROG} checkout: Updating dir1d1-2
14210 U dir1d1-2/file1-2"
14211 # the usual for the top level
14212 dotest cvsadm-20b
"cat CVS/Repository" "\."
14213 # the usual for 1d1mod
14214 dotest cvsadm-20d
"cat dir1d1/CVS/Repository" "mod1"
14215 # the usual for 1d1mod copy
14216 dotest cvsadm-20f
"cat dir1d1-2/CVS/Repository" "mod1-2"
14217 rm -rf CVS dir1d1 dir1d1-2
14219 dotest cvsadm-21
"${testcvs} co 1d1mod 1d2mod" \
14220 "${SPROG} checkout: Updating dir1d1
14222 ${SPROG} checkout: Updating dir1d2
14224 # the usual for the top level
14225 dotest cvsadm-21b
"cat CVS/Repository" "\."
14226 # the usual for 1d1mod
14227 dotest cvsadm-21d
"cat dir1d1/CVS/Repository" "mod1"
14228 # the usual for 1d2mod
14229 dotest cvsadm-21f
"cat dir1d2/CVS/Repository" "mod2/sub2"
14230 rm -rf CVS dir1d1 dir1d2
14232 dotest cvsadm-22
"${testcvs} co 1d1mod 2d1mod" \
14233 "${SPROG} checkout: Updating dir1d1
14235 ${SPROG} checkout: Updating dir2d1/sub2d1
14236 U dir2d1/sub2d1/file1"
14237 # the usual for the top level
14238 dotest cvsadm-22b
"cat CVS/Repository" "\."
14239 # the usual for 1d1mod
14240 dotest cvsadm-22d
"cat dir1d1/CVS/Repository" "mod1"
14241 # the usual for 2d1mod
14242 dotest cvsadm-22f
"cat dir2d1/CVS/Repository" "\."
14243 dotest cvsadm-22h
"cat dir2d1/sub2d1/CVS/Repository" "mod1"
14244 rm -rf CVS dir1d1 dir2d1
14246 dotest cvsadm-23
"${testcvs} co 1d1mod 2d2mod" \
14247 "${SPROG} checkout: Updating dir1d1
14249 ${SPROG} checkout: Updating dir2d2/sub2d2
14250 U dir2d2/sub2d2/file2"
14251 # the usual for the top level
14252 dotest cvsadm-23b
"cat CVS/Repository" "\."
14253 # the usual for 1d1mod
14254 dotest cvsadm-23d
"cat dir1d1/CVS/Repository" "mod1"
14255 # the usual for 2d2mod
14256 dotest cvsadm-23f
"cat dir2d2/CVS/Repository" "mod2"
14257 dotest cvsadm-23h
"cat dir2d2/sub2d2/CVS/Repository" "mod2/sub2"
14258 rm -rf CVS dir1d1 dir2d2
14263 dotest cvsadm-24
"${testcvs} co 1d2mod 1d2mod-2" \
14264 "${SPROG} checkout: Updating dir1d2
14266 ${SPROG} checkout: Updating dir1d2-2
14267 U dir1d2-2/file2-2"
14268 # the usual for the top level
14269 dotest cvsadm-24b
"cat CVS/Repository" "\."
14270 # the usual for 1d2mod
14271 dotest cvsadm-24d
"cat dir1d2/CVS/Repository" "mod2/sub2"
14272 # the usual for 1d2mod copy
14273 dotest cvsadm-24f
"cat dir1d2-2/CVS/Repository" "mod2-2/sub2-2"
14274 rm -rf CVS dir1d2 dir1d2-2
14276 dotest cvsadm-25
"${testcvs} co 1d2mod 2d1mod" \
14277 "${SPROG} checkout: Updating dir1d2
14279 ${SPROG} checkout: Updating dir2d1/sub2d1
14280 U dir2d1/sub2d1/file1"
14281 # the usual for the top level
14282 dotest cvsadm-25b
"cat CVS/Repository" "\."
14283 # the usual for 1d2mod
14284 dotest cvsadm-25d
"cat dir1d2/CVS/Repository" "mod2/sub2"
14285 # the usual for 2d1mod
14286 dotest cvsadm-25f
"cat dir2d1/CVS/Repository" "\."
14287 dotest cvsadm-25h
"cat dir2d1/sub2d1/CVS/Repository" "mod1"
14288 rm -rf CVS dir1d2 dir2d1
14290 dotest cvsadm-26
"${testcvs} co 1d2mod 2d2mod" \
14291 "${SPROG} checkout: Updating dir1d2
14293 ${SPROG} checkout: Updating dir2d2/sub2d2
14294 U dir2d2/sub2d2/file2"
14295 # the usual for the top level
14296 dotest cvsadm-26b
"cat CVS/Repository" "\."
14297 # the usual for 1d2mod
14298 dotest cvsadm-26d
"cat dir1d2/CVS/Repository" "mod2/sub2"
14299 # the usual for 2d2mod
14300 dotest cvsadm-26f
"cat dir2d2/CVS/Repository" "mod2"
14301 dotest cvsadm-26h
"cat dir2d2/sub2d2/CVS/Repository" "mod2/sub2"
14302 rm -rf CVS dir1d2 dir2d2
14307 dotest cvsadm-27
"${testcvs} co 2d1mod 2d1mod-2" \
14308 "${SPROG} checkout: Updating dir2d1/sub2d1
14309 U dir2d1/sub2d1/file1
14310 ${SPROG} checkout: Updating dir2d1-2/sub2d1-2
14311 U dir2d1-2/sub2d1-2/file1-2"
14312 # the usual for the top level
14313 dotest cvsadm-27b
"cat CVS/Repository" "\."
14314 # the usual for 2d1mod
14315 dotest cvsadm-27d
"cat dir2d1/CVS/Repository" "\."
14316 dotest cvsadm-27f
"cat dir2d1/sub2d1/CVS/Repository" "mod1"
14317 # the usual for 2d1mod
14318 dotest cvsadm-27h
"cat dir2d1-2/CVS/Repository" "\."
14319 dotest cvsadm-27j
"cat dir2d1-2/sub2d1-2/CVS/Repository" "mod1-2"
14320 rm -rf CVS dir2d1 dir2d1-2
14322 dotest cvsadm-28
"${testcvs} co 2d1mod 2d2mod" \
14323 "${SPROG} checkout: Updating dir2d1/sub2d1
14324 U dir2d1/sub2d1/file1
14325 ${SPROG} checkout: Updating dir2d2/sub2d2
14326 U dir2d2/sub2d2/file2"
14327 # the usual for the top level
14328 dotest cvsadm-28b
"cat CVS/Repository" "\."
14329 # the usual for 2d1mod
14330 dotest cvsadm-28d
"cat dir2d1/CVS/Repository" "\."
14331 dotest cvsadm-28f
"cat dir2d1/sub2d1/CVS/Repository" "mod1"
14332 # the usual for 2d2mod
14333 dotest cvsadm-28h
"cat dir2d2/CVS/Repository" "mod2"
14334 dotest cvsadm-28j
"cat dir2d2/sub2d2/CVS/Repository" "mod2/sub2"
14335 rm -rf CVS dir2d1 dir2d2
14340 dotest cvsadm-29
"${testcvs} co 2d2mod 2d2mod-2" \
14341 "${SPROG} checkout: Updating dir2d2/sub2d2
14342 U dir2d2/sub2d2/file2
14343 ${SPROG} checkout: Updating dir2d2-2/sub2d2-2
14344 U dir2d2-2/sub2d2-2/file2-2"
14345 # the usual for the top level
14346 dotest cvsadm-29b
"cat CVS/Repository" "\."
14347 # the usual for 2d2mod
14348 dotest cvsadm-29d
"cat dir2d2/CVS/Repository" "mod2"
14349 dotest cvsadm-29f
"cat dir2d2/sub2d2/CVS/Repository" "mod2/sub2"
14350 # the usual for 2d2mod
14351 dotest cvsadm-29h
"cat dir2d2-2/CVS/Repository" "mod2-2"
14352 dotest cvsadm-29j
"cat dir2d2-2/sub2d2-2/CVS/Repository" \
14354 rm -rf CVS dir2d2 dir2d2-2
14356 ##################################################
14357 ## And now, all of that again using the "-d" flag
14358 ## on the command line.
14359 ##################################################
14361 dotest cvsadm-1d3
"${testcvs} co -d dir 1mod" \
14362 "${SPROG} checkout: Updating dir
14364 dotest cvsadm-1d3b
"cat CVS/Repository" "\."
14365 dotest cvsadm-1d3d
"cat dir/CVS/Repository" "mod1"
14368 dotest cvsadm-1d4
"${testcvs} co -d dir 2mod" \
14369 "${SPROG} checkout: Updating dir
14371 dotest cvsadm-1d4b
"cat CVS/Repository" "\."
14372 dotest cvsadm-1d4d
"cat dir/CVS/Repository" "mod2/sub2"
14375 dotest cvsadm-1d5
"${testcvs} co -d dir 1d1mod" \
14376 "${SPROG} checkout: Updating dir
14378 dotest cvsadm-1d5b
"cat CVS/Repository" "\."
14379 dotest cvsadm-1d5d
"cat dir/CVS/Repository" "mod1"
14382 dotest cvsadm-1d6
"${testcvs} co -d dir 1d2mod" \
14383 "${SPROG} checkout: Updating dir
14385 dotest cvsadm-1d6b
"cat CVS/Repository" "\."
14386 dotest cvsadm-1d6d
"cat dir/CVS/Repository" "mod2/sub2"
14389 dotest cvsadm-1d7
"${testcvs} co -d dir 2d1mod" \
14390 "${SPROG} checkout: Updating dir
14392 dotest cvsadm-1d7b
"cat CVS/Repository" "\."
14393 dotest cvsadm-1d7d
"cat dir/CVS/Repository" "mod1"
14396 dotest cvsadm-1d8
"${testcvs} co -d dir 2d2mod" \
14397 "${SPROG} checkout: Updating dir
14399 dotest cvsadm-1d8b
"cat CVS/Repository" "\."
14400 dotest cvsadm-1d8d
"cat dir/CVS/Repository" "mod2/sub2"
14403 ##################################################
14404 ## Los Combonaciones
14405 ##################################################
14409 dotest cvsadm-1d9
"${testcvs} co -d dir 1mod 1mod-2" \
14410 "${SPROG} checkout: Updating dir/1mod
14412 ${SPROG} checkout: Updating dir/1mod-2
14413 U dir/1mod-2/file1-2"
14414 # the usual for the top level
14415 dotest cvsadm-1d9b
"cat CVS/Repository" "\."
14416 # the usual for the dir level
14417 dotest cvsadm-1d9d
"cat dir/CVS/Repository" "\."
14418 # the usual for 1mod
14419 dotest cvsadm-1d9f
"cat dir/1mod/CVS/Repository" "mod1"
14420 # the usual for 1mod copy
14421 dotest cvsadm-1d9h
"cat dir/1mod-2/CVS/Repository" "mod1-2"
14424 # 1mod 2mod redmod bluemod
14425 dotest cvsadm-1d10
"${testcvs} co -d dir 1mod 2mod" \
14426 "${SPROG} checkout: Updating dir/1mod
14428 ${SPROG} checkout: Updating dir/2mod
14430 dotest cvsadm-1d10b
"cat CVS/Repository" "\."
14431 # the usual for the dir level
14432 dotest cvsadm-1d10d
"cat dir/CVS/Repository" "\."
14433 # the usual for 1mod
14434 dotest cvsadm-1d10f
"cat dir/1mod/CVS/Repository" "mod1"
14435 # the usual for 2dmod
14436 dotest cvsadm-1d10h
"cat dir/2mod/CVS/Repository" "mod2/sub2"
14439 dotest cvsadm-1d11
"${testcvs} co -d dir 1mod 1d1mod" \
14440 "${SPROG} checkout: Updating dir/1mod
14442 ${SPROG} checkout: Updating dir/dir1d1
14443 U dir/dir1d1/file1"
14444 dotest cvsadm-1d11b
"cat CVS/Repository" "\."
14445 # the usual for the dir level
14446 dotest cvsadm-1d11d
"cat dir/CVS/Repository" "\."
14447 # the usual for 1mod
14448 dotest cvsadm-1d11f
"cat dir/1mod/CVS/Repository" "mod1"
14449 # the usual for 1d1mod
14450 dotest cvsadm-1d11h
"cat dir/dir1d1/CVS/Repository" "mod1"
14453 dotest cvsadm-1d12
"${testcvs} co -d dir 1mod 1d2mod" \
14454 "${SPROG} checkout: Updating dir/1mod
14456 ${SPROG} checkout: Updating dir/dir1d2
14457 U dir/dir1d2/file2"
14458 dotest cvsadm-1d12b
"cat CVS/Repository" "\."
14459 # the usual for the dir level
14460 dotest cvsadm-1d12d
"cat dir/CVS/Repository" "\."
14461 # the usual for 1mod
14462 dotest cvsadm-1d12f
"cat dir/1mod/CVS/Repository" "mod1"
14463 # the usual for 1d2mod
14464 dotest cvsadm-1d12h
"cat dir/dir1d2/CVS/Repository" "mod2/sub2"
14467 dotest cvsadm-1d13
"${testcvs} co -d dir 1mod 2d1mod" \
14468 "${SPROG} checkout: Updating dir/1mod
14470 ${SPROG} checkout: Updating dir/dir2d1/sub2d1
14471 U dir/dir2d1/sub2d1/file1"
14472 dotest cvsadm-1d13b
"cat CVS/Repository" "\."
14473 # the usual for the dir level
14474 dotest cvsadm-1d13d
"cat dir/CVS/Repository" "\."
14475 # the usual for 1mod
14476 dotest cvsadm-1d13f
"cat dir/1mod/CVS/Repository" "mod1"
14477 # the usual for 2d1mod
14478 dotest cvsadm-1d13h
"cat dir/dir2d1/CVS/Repository" "\."
14479 dotest cvsadm-1d13j
"cat dir/dir2d1/sub2d1/CVS/Repository" "mod1"
14482 dotest cvsadm-1d14
"${testcvs} co -d dir 1mod 2d2mod" \
14483 "${SPROG} checkout: Updating dir/1mod
14485 ${SPROG} checkout: Updating dir/dir2d2/sub2d2
14486 U dir/dir2d2/sub2d2/file2"
14487 dotest cvsadm-1d14b
"cat CVS/Repository" "\."
14488 # the usual for the dir level
14489 dotest cvsadm-1d14d
"cat dir/CVS/Repository" "\."
14490 # the usual for 1mod
14491 dotest cvsadm-1d14f
"cat dir/1mod/CVS/Repository" "mod1"
14492 # the usual for 2d2mod
14493 dotest cvsadm-1d14h
"cat dir/dir2d2/CVS/Repository" "mod2"
14494 dotest cvsadm-1d14j
"cat dir/dir2d2/sub2d2/CVS/Repository" "mod2/sub2"
14500 dotest cvsadm-1d15
"${testcvs} co -d dir 2mod 2mod-2" \
14501 "${SPROG} checkout: Updating dir/2mod
14503 ${SPROG} checkout: Updating dir/2mod-2
14504 U dir/2mod-2/file2-2"
14505 dotest cvsadm-1d15b
"cat CVS/Repository" "\."
14506 # the usual for the dir level
14507 dotest cvsadm-1d15d
"cat dir/CVS/Repository" "mod2"
14508 # the usual for 2mod
14509 dotest cvsadm-1d15f
"cat dir/2mod/CVS/Repository" "mod2/sub2"
14510 # the usual for 2mod copy
14511 dotest cvsadm-1d15h
"cat dir/2mod-2/CVS/Repository" "mod2-2/sub2-2"
14514 dotest cvsadm-1d16
"${testcvs} co -d dir 2mod 1d1mod" \
14515 "${SPROG} checkout: Updating dir/2mod
14517 ${SPROG} checkout: Updating dir/dir1d1
14518 U dir/dir1d1/file1"
14519 dotest cvsadm-1d16b
"cat CVS/Repository" "\."
14520 # the usual for the dir level
14521 dotest cvsadm-1d16d
"cat dir/CVS/Repository" "mod2"
14522 # the usual for 2mod
14523 dotest cvsadm-1d16f
"cat dir/2mod/CVS/Repository" "mod2/sub2"
14524 # the usual for 1d1mod
14525 dotest cvsadm-1d16h
"cat dir/dir1d1/CVS/Repository" "mod1"
14528 dotest cvsadm-1d17
"${testcvs} co -d dir 2mod 1d2mod" \
14529 "${SPROG} checkout: Updating dir/2mod
14531 ${SPROG} checkout: Updating dir/dir1d2
14532 U dir/dir1d2/file2"
14533 dotest cvsadm-1d17b
"cat CVS/Repository" "\."
14534 # the usual for the dir level
14535 dotest cvsadm-1d17d
"cat dir/CVS/Repository" "mod2"
14536 # the usual for 2mod
14537 dotest cvsadm-1d17f
"cat dir/2mod/CVS/Repository" "mod2/sub2"
14538 # the usual for 1d2mod
14539 dotest cvsadm-1d17h
"cat dir/dir1d2/CVS/Repository" "mod2/sub2"
14542 dotest cvsadm-1d18
"${testcvs} co -d dir 2mod 2d1mod" \
14543 "${SPROG} checkout: Updating dir/2mod
14545 ${SPROG} checkout: Updating dir/dir2d1/sub2d1
14546 U dir/dir2d1/sub2d1/file1"
14547 dotest cvsadm-1d18b
"cat CVS/Repository" "\."
14548 # the usual for the dir level
14549 dotest cvsadm-1d18d
"cat dir/CVS/Repository" "mod2"
14550 # the usual for 2mod
14551 dotest cvsadm-1d18f
"cat dir/2mod/CVS/Repository" "mod2/sub2"
14552 # the usual for 2d1mod
14553 dotest cvsadm-1d18h
"cat dir/dir2d1/CVS/Repository" "\."
14554 dotest cvsadm-1d18j
"cat dir/dir2d1/sub2d1/CVS/Repository" "mod1"
14557 dotest cvsadm-1d19
"${testcvs} co -d dir 2mod 2d2mod" \
14558 "${SPROG} checkout: Updating dir/2mod
14560 ${SPROG} checkout: Updating dir/dir2d2/sub2d2
14561 U dir/dir2d2/sub2d2/file2"
14562 dotest cvsadm-1d19b
"cat CVS/Repository" "\."
14563 # the usual for the dir level
14564 dotest cvsadm-1d19d
"cat dir/CVS/Repository" "mod2"
14565 # the usual for 2mod
14566 dotest cvsadm-1d19f
"cat dir/2mod/CVS/Repository" "mod2/sub2"
14567 # the usual for 2d2mod
14568 dotest cvsadm-1d19h
"cat dir/dir2d2/CVS/Repository" "mod2"
14569 dotest cvsadm-1d19j
"cat dir/dir2d2/sub2d2/CVS/Repository" "mod2/sub2"
14575 dotest cvsadm-1d20
"${testcvs} co -d dir 1d1mod 1d1mod-2" \
14576 "${SPROG} checkout: Updating dir/dir1d1
14578 ${SPROG} checkout: Updating dir/dir1d1-2
14579 U dir/dir1d1-2/file1-2"
14580 dotest cvsadm-1d20b
"cat CVS/Repository" "\."
14581 # the usual for the dir level
14582 dotest cvsadm-1d20d
"cat dir/CVS/Repository" "\."
14583 # the usual for 1d1mod
14584 dotest cvsadm-1d20f
"cat dir/dir1d1/CVS/Repository" "mod1"
14585 # the usual for 1d1mod copy
14586 dotest cvsadm-1d20h
"cat dir/dir1d1-2/CVS/Repository" "mod1-2"
14589 dotest cvsadm-1d21
"${testcvs} co -d dir 1d1mod 1d2mod" \
14590 "${SPROG} checkout: Updating dir/dir1d1
14592 ${SPROG} checkout: Updating dir/dir1d2
14593 U dir/dir1d2/file2"
14594 dotest cvsadm-1d21b
"cat CVS/Repository" "\."
14595 # the usual for the dir level
14596 dotest cvsadm-1d21d
"cat dir/CVS/Repository" "\."
14597 # the usual for 1d1mod
14598 dotest cvsadm-1d21f
"cat dir/dir1d1/CVS/Repository" "mod1"
14599 # the usual for 1d2mod
14600 dotest cvsadm-1d21h
"cat dir/dir1d2/CVS/Repository" "mod2/sub2"
14603 dotest cvsadm-1d22
"${testcvs} co -d dir 1d1mod 2d1mod" \
14604 "${SPROG} checkout: Updating dir/dir1d1
14606 ${SPROG} checkout: Updating dir/dir2d1/sub2d1
14607 U dir/dir2d1/sub2d1/file1"
14608 dotest cvsadm-1d22b
"cat CVS/Repository" "\."
14609 # the usual for the dir level
14610 dotest cvsadm-1d22d
"cat dir/CVS/Repository" "\."
14611 # the usual for 1d1mod
14612 dotest cvsadm-1d22f
"cat dir/dir1d1/CVS/Repository" "mod1"
14613 # the usual for 2d1mod
14614 dotest cvsadm-1d22h
"cat dir/dir2d1/CVS/Repository" "\."
14615 dotest cvsadm-1d22j
"cat dir/dir2d1/sub2d1/CVS/Repository" "mod1"
14618 dotest cvsadm-1d23
"${testcvs} co -d dir 1d1mod 2d2mod" \
14619 "${SPROG} checkout: Updating dir/dir1d1
14621 ${SPROG} checkout: Updating dir/dir2d2/sub2d2
14622 U dir/dir2d2/sub2d2/file2"
14623 dotest cvsadm-1d23b
"cat CVS/Repository" "\."
14624 # the usual for the dir level
14625 dotest cvsadm-1d23d
"cat dir/CVS/Repository" "\."
14626 # the usual for 1d1mod
14627 dotest cvsadm-1d23f
"cat dir/dir1d1/CVS/Repository" "mod1"
14628 # the usual for 2d2mod
14629 dotest cvsadm-1d23h
"cat dir/dir2d2/CVS/Repository" "mod2"
14630 dotest cvsadm-1d23j
"cat dir/dir2d2/sub2d2/CVS/Repository" "mod2/sub2"
14636 dotest cvsadm-1d24
"${testcvs} co -d dir 1d2mod 1d2mod-2" \
14637 "${SPROG} checkout: Updating dir/dir1d2
14639 ${SPROG} checkout: Updating dir/dir1d2-2
14640 U dir/dir1d2-2/file2-2"
14641 dotest cvsadm-1d24b
"cat CVS/Repository" "\."
14642 # the usual for the dir level
14643 dotest cvsadm-1d24d
"cat dir/CVS/Repository" "mod2"
14644 # the usual for 1d2mod
14645 dotest cvsadm-1d24f
"cat dir/dir1d2/CVS/Repository" "mod2/sub2"
14646 # the usual for 1d2mod copy
14647 dotest cvsadm-1d24h
"cat dir/dir1d2-2/CVS/Repository" "mod2-2/sub2-2"
14650 dotest cvsadm-1d25
"${testcvs} co -d dir 1d2mod 2d1mod" \
14651 "${SPROG} checkout: Updating dir/dir1d2
14653 ${SPROG} checkout: Updating dir/dir2d1/sub2d1
14654 U dir/dir2d1/sub2d1/file1"
14655 dotest cvsadm-1d25b
"cat CVS/Repository" "\."
14656 # the usual for the dir level
14657 dotest cvsadm-1d25d
"cat dir/CVS/Repository" "mod2"
14658 # the usual for 1d2mod
14659 dotest cvsadm-1d25f
"cat dir/dir1d2/CVS/Repository" "mod2/sub2"
14660 # the usual for 2d1mod
14661 dotest cvsadm-1d25h
"cat dir/dir2d1/CVS/Repository" "\."
14662 dotest cvsadm-1d25j
"cat dir/dir2d1/sub2d1/CVS/Repository" "mod1"
14665 dotest cvsadm-1d26
"${testcvs} co -d dir 1d2mod 2d2mod" \
14666 "${SPROG} checkout: Updating dir/dir1d2
14668 ${SPROG} checkout: Updating dir/dir2d2/sub2d2
14669 U dir/dir2d2/sub2d2/file2"
14670 dotest cvsadm-1d26b
"cat CVS/Repository" "\."
14671 # the usual for the dir level
14672 dotest cvsadm-1d26d
"cat dir/CVS/Repository" "mod2"
14673 # the usual for 1d2mod
14674 dotest cvsadm-1d26f
"cat dir/dir1d2/CVS/Repository" "mod2/sub2"
14675 # the usual for 2d2mod
14676 dotest cvsadm-1d26h
"cat dir/dir2d2/CVS/Repository" "mod2"
14677 dotest cvsadm-1d26j
"cat dir/dir2d2/sub2d2/CVS/Repository" "mod2/sub2"
14683 dotest cvsadm-1d27
"${testcvs} co -d dir 2d1mod 2d1mod-2" \
14684 "${SPROG} checkout: Updating dir/dir2d1/sub2d1
14685 U dir/dir2d1/sub2d1/file1
14686 ${SPROG} checkout: Updating dir/dir2d1-2/sub2d1-2
14687 U dir/dir2d1-2/sub2d1-2/file1-2"
14688 dotest cvsadm-1d27b
"cat CVS/Repository" "\."
14689 # the usual for the dir level
14690 dotest cvsadm-1d27d
"cat dir/CVS/Repository" "CVSROOT/Emptydir"
14691 # the usual for 2d1mod
14692 dotest cvsadm-1d27f
"cat dir/dir2d1/CVS/Repository" "\."
14693 dotest cvsadm-1d27h
"cat dir/dir2d1/sub2d1/CVS/Repository" "mod1"
14694 # the usual for 2d1mod
14695 dotest cvsadm-1d27j
"cat dir/dir2d1-2/CVS/Repository" "\."
14696 dotest cvsadm-1d27l
"cat dir/dir2d1-2/sub2d1-2/CVS/Repository" \
14700 dotest cvsadm-1d28
"${testcvs} co -d dir 2d1mod 2d2mod" \
14701 "${SPROG} checkout: Updating dir/dir2d1/sub2d1
14702 U dir/dir2d1/sub2d1/file1
14703 ${SPROG} checkout: Updating dir/dir2d2/sub2d2
14704 U dir/dir2d2/sub2d2/file2"
14705 dotest cvsadm-1d28b
"cat CVS/Repository" "\."
14706 # the usual for the dir level
14707 dotest cvsadm-1d28d
"cat dir/CVS/Repository" "CVSROOT/Emptydir"
14708 # the usual for 2d1mod
14709 dotest cvsadm-1d28f
"cat dir/dir2d1/CVS/Repository" "\."
14710 dotest cvsadm-1d28h
"cat dir/dir2d1/sub2d1/CVS/Repository" "mod1"
14711 # the usual for 2d2mod
14712 dotest cvsadm-1d28j
"cat dir/dir2d2/CVS/Repository" "mod2"
14713 dotest cvsadm-1d28l
"cat dir/dir2d2/sub2d2/CVS/Repository" "mod2/sub2"
14719 dotest cvsadm-1d29
"${testcvs} co -d dir 2d2mod 2d2mod-2" \
14720 "${SPROG} checkout: Updating dir/dir2d2/sub2d2
14721 U dir/dir2d2/sub2d2/file2
14722 ${SPROG} checkout: Updating dir/dir2d2-2/sub2d2-2
14723 U dir/dir2d2-2/sub2d2-2/file2-2"
14724 dotest cvsadm-1d29b
"cat CVS/Repository" "\."
14725 # the usual for the dir level
14726 dotest cvsadm-1d29d
"cat dir/CVS/Repository" "\."
14727 # the usual for 2d2mod
14728 dotest cvsadm-1d29f
"cat dir/dir2d2/CVS/Repository" "mod2"
14729 dotest cvsadm-1d29h
"cat dir/dir2d2/sub2d2/CVS/Repository" "mod2/sub2"
14730 # the usual for 2d2mod
14731 dotest cvsadm-1d29j
"cat dir/dir2d2-2/CVS/Repository" "mod2-2"
14732 dotest cvsadm-1d29l
"cat dir/dir2d2-2/sub2d2-2/CVS/Repository" \
14736 ##################################################
14737 ## And now, some of that again using the "-d" flag
14738 ## on the command line, but use a longer path.
14739 ##################################################
14741 dotest cvsadm-2d3-1
"$testcvs co -d dir/dir2 1mod" \
14742 "$SPROG checkout: Updating dir/dir2
14745 # Remote couldn't handle this, even with the "mkdir dir", before
14747 dotest cvsadm-2d3b
"cat CVS/Repository" "\."
14748 dotest cvsadm-2d3d
"cat dir/CVS/Repository" "."
14749 dotest cvsadm-2d3f
"cat dir/dir2/CVS/Repository" "mod1"
14753 dotest cvsadm-2d4
"$testcvs co -d dir/dir2 2mod" \
14754 "$SPROG checkout: Updating dir/dir2
14756 dotest cvsadm-2d4b
"cat CVS/Repository" "\."
14757 dotest cvsadm-2d4f
"cat dir/dir2/CVS/Repository" "mod2/sub2"
14761 dotest cvsadm-2d5
"$testcvs co -d dir/dir2 1d1mod" \
14762 "$SPROG checkout: Updating dir/dir2
14764 dotest cvsadm-2d5b
"cat CVS/Repository" "\."
14765 dotest cvsadm-2d5f
"cat dir/dir2/CVS/Repository" "mod1"
14769 dotest cvsadm-2d6
"$testcvs co -d dir/dir2 1d2mod" \
14770 "$SPROG checkout: Updating dir/dir2
14772 dotest cvsadm-2d6b
"cat CVS/Repository" "\."
14773 dotest cvsadm-2d6f
"cat dir/dir2/CVS/Repository" "mod2/sub2"
14777 dotest cvsadm-2d7
"$testcvs co -d dir/dir2 2d1mod" \
14778 "$SPROG checkout: Updating dir/dir2
14780 dotest cvsadm-2d7b
"cat CVS/Repository" "\."
14781 dotest cvsadm-2d7f
"cat dir/dir2/CVS/Repository" "mod1"
14785 dotest cvsadm-2d8
"$testcvs co -d dir/dir2 2d2mod" \
14786 "$SPROG checkout: Updating dir/dir2
14788 dotest cvsadm-2d8b
"cat CVS/Repository" "\."
14789 dotest cvsadm-2d8f
"cat dir/dir2/CVS/Repository" "mod2/sub2"
14792 ##################################################
14793 ## And now, a few of those tests revisited to
14794 ## test the behavior of the -N flag.
14795 ##################################################
14797 dotest cvsadm-N3
"$testcvs co -N 1mod" \
14798 "$SPROG checkout: Updating 1mod
14800 dotest cvsadm-N3b
"cat CVS/Repository" "\."
14801 dotest cvsadm-N3d
"cat 1mod/CVS/Repository" "mod1"
14804 dotest cvsadm-N4
"$testcvs co -N 2mod" \
14805 "$SPROG checkout: Updating 2mod
14807 dotest cvsadm-N4b
"cat CVS/Repository" "\."
14808 dotest cvsadm-N4d
"cat 2mod/CVS/Repository" "mod2/sub2"
14811 dotest cvsadm-N5
"$testcvs co -N 1d1mod" \
14812 "$SPROG checkout: Updating dir1d1
14814 dotest cvsadm-N5b
"cat CVS/Repository" "\."
14815 dotest cvsadm-N5d
"cat dir1d1/CVS/Repository" "mod1"
14818 dotest cvsadm-N6
"$testcvs co -N 1d2mod" \
14819 "$SPROG checkout: Updating dir1d2
14821 dotest cvsadm-N6b
"cat CVS/Repository" "\."
14822 dotest cvsadm-N6d
"cat dir1d2/CVS/Repository" "mod2/sub2"
14825 dotest cvsadm-N7
"$testcvs co -N 2d1mod" \
14826 "$SPROG checkout: Updating dir2d1/sub2d1
14827 U dir2d1/sub2d1/file1"
14828 dotest cvsadm-N7b
"cat CVS/Repository" "\."
14829 dotest cvsadm-N7d
"cat dir2d1/CVS/Repository" "\."
14830 dotest cvsadm-N7f
"cat dir2d1/sub2d1/CVS/Repository" "mod1"
14833 dotest cvsadm-N8
"$testcvs co -N 2d2mod" \
14834 "$SPROG checkout: Updating dir2d2/sub2d2
14835 U dir2d2/sub2d2/file2"
14836 dotest cvsadm-N8b
"cat CVS/Repository" "\."
14837 dotest cvsadm-N8d
"cat dir2d2/CVS/Repository" "mod2"
14838 dotest cvsadm-N8f
"cat dir2d2/sub2d2/CVS/Repository" "mod2/sub2"
14841 ## the ones in one-deep directories
14843 dotest cvsadm-N1d3
"$testcvs co -N -d dir 1mod" \
14844 "$SPROG checkout: Updating dir/1mod
14846 dotest cvsadm-N1d3b
"cat CVS/Repository" "\."
14847 dotest cvsadm-N1d3d
"cat dir/CVS/Repository" "\."
14848 dotest cvsadm-N1d3f
"cat dir/1mod/CVS/Repository" "mod1"
14851 dotest cvsadm-N1d4
"$testcvs co -N -d dir 2mod" \
14852 "$SPROG checkout: Updating dir/2mod
14854 dotest cvsadm-N1d4b
"cat CVS/Repository" "\."
14855 dotest cvsadm-N1d4d
"cat dir/CVS/Repository" "mod2"
14856 dotest cvsadm-N1d4f
"cat dir/2mod/CVS/Repository" "mod2/sub2"
14859 dotest cvsadm-N1d5
"$testcvs co -N -d dir 1d1mod" \
14860 "$SPROG checkout: Updating dir/dir1d1
14861 U dir/dir1d1/file1"
14862 dotest cvsadm-N1d5b
"cat CVS/Repository" "\."
14863 dotest cvsadm-N1d5d
"cat dir/CVS/Repository" "\."
14864 dotest cvsadm-N1d5d
"cat dir/dir1d1/CVS/Repository" "mod1"
14867 dotest cvsadm-N1d6
"$testcvs co -N -d dir 1d2mod" \
14868 "$SPROG checkout: Updating dir/dir1d2
14869 U dir/dir1d2/file2"
14870 dotest cvsadm-N1d6b
"cat CVS/Repository" "\."
14871 dotest cvsadm-N1d6d
"cat dir/CVS/Repository" "mod2"
14872 dotest cvsadm-N1d6f
"cat dir/dir1d2/CVS/Repository" "mod2/sub2"
14875 dotest cvsadm-N1d7
"$testcvs co -N -d dir 2d1mod" \
14876 "$SPROG checkout: Updating dir/dir2d1/sub2d1
14877 U dir/dir2d1/sub2d1/file1"
14878 dotest cvsadm-N1d7b
"cat CVS/Repository" "\."
14879 dotest cvsadm-N1d7d
"cat dir/CVS/Repository" "CVSROOT/Emptydir"
14880 dotest cvsadm-N1d7f
"cat dir/dir2d1/CVS/Repository" "\."
14881 dotest cvsadm-N1d7h
"cat dir/dir2d1/sub2d1/CVS/Repository" "mod1"
14884 dotest cvsadm-N1d8
"$testcvs co -N -d dir 2d2mod" \
14885 "$SPROG checkout: Updating dir/dir2d2/sub2d2
14886 U dir/dir2d2/sub2d2/file2"
14887 dotest cvsadm-N1d8b
"cat CVS/Repository" "\."
14888 dotest cvsadm-N1d8d
"cat dir/CVS/Repository" "\."
14889 dotest cvsadm-N1d8d
"cat dir/dir2d2/CVS/Repository" "mod2"
14890 dotest cvsadm-N1d8d
"cat dir/dir2d2/sub2d2/CVS/Repository" \
14894 ## the ones in two-deep directories
14897 dotest cvsadm-N2d3
"$testcvs co -N -d dir/dir2 1mod" \
14898 "$SPROG checkout: Updating dir/dir2/1mod
14899 U dir/dir2/1mod/file1"
14900 dotest cvsadm-N2d3b
"cat CVS/Repository" "\."
14901 dotest cvsadm-N2d3f
"cat dir/dir2/CVS/Repository" "\."
14902 dotest cvsadm-N2d3h
"cat dir/dir2/1mod/CVS/Repository" "mod1"
14906 dotest cvsadm-N2d4
"$testcvs co -N -d dir/dir2 2mod" \
14907 "$SPROG checkout: Updating dir/dir2/2mod
14908 U dir/dir2/2mod/file2"
14909 dotest cvsadm-N2d4b
"cat CVS/Repository" "\."
14910 dotest cvsadm-N2d4f
"cat dir/dir2/CVS/Repository" "mod2"
14911 dotest cvsadm-N2d4h
"cat dir/dir2/2mod/CVS/Repository" "mod2/sub2"
14915 dotest cvsadm-N2d5
"$testcvs co -N -d dir/dir2 1d1mod" \
14916 "$SPROG checkout: Updating dir/dir2/dir1d1
14917 U dir/dir2/dir1d1/file1"
14918 dotest cvsadm-N2d5b
"cat CVS/Repository" "\."
14919 dotest cvsadm-N2d5f
"cat dir/dir2/CVS/Repository" "\."
14920 dotest cvsadm-N2d5h
"cat dir/dir2/dir1d1/CVS/Repository" "mod1"
14924 dotest cvsadm-N2d6
"$testcvs co -N -d dir/dir2 1d2mod" \
14925 "$SPROG checkout: Updating dir/dir2/dir1d2
14926 U dir/dir2/dir1d2/file2"
14927 dotest cvsadm-N2d6b
"cat CVS/Repository" "\."
14928 dotest cvsadm-N2d6f
"cat dir/dir2/CVS/Repository" "mod2"
14929 dotest cvsadm-N2d6h
"cat dir/dir2/dir1d2/CVS/Repository" "mod2/sub2"
14933 dotest cvsadm-N2d7
"$testcvs co -N -d dir/dir2 2d1mod" \
14934 "$SPROG checkout: Updating dir/dir2/dir2d1/sub2d1
14935 U dir/dir2/dir2d1/sub2d1/file1"
14936 dotest cvsadm-N2d7b
"cat CVS/Repository" "\."
14937 dotest cvsadm-N2d7f
"cat dir/dir2/CVS/Repository" "CVSROOT/Emptydir"
14938 dotest cvsadm-N2d7g
"cat dir/dir2/dir2d1/CVS/Repository" "\."
14939 dotest cvsadm-N2d7h
"cat dir/dir2/dir2d1/sub2d1/CVS/Repository" \
14944 dotest cvsadm-N2d8
"$testcvs co -N -d dir/dir2 2d2mod" \
14945 "$SPROG checkout: Updating dir/dir2/dir2d2/sub2d2
14946 U dir/dir2/dir2d2/sub2d2/file2"
14947 dotest cvsadm-N2d8b
"cat CVS/Repository" "\."
14948 dotest cvsadm-N2d8f
"cat dir/dir2/CVS/Repository" "\."
14949 dotest cvsadm-N2d8h
"cat dir/dir2/dir2d2/CVS/Repository" "mod2"
14950 dotest cvsadm-N2d8j
"cat dir/dir2/dir2d2/sub2d2/CVS/Repository" \
14953 # End of test that didn't work for remote prior to CVS 1.11.14.
14955 ##################################################
14956 ## That's enough of that, thank you very much.
14957 ##################################################
14965 modify_repo
rm -rf $CVSROOT_DIRNAME/1mod
$CVSROOT_DIRNAME/1mod-2 \
14966 $CVSROOT_DIRNAME/2mod
$CVSROOT_DIRNAME/2mod-2 \
14967 $CVSROOT_DIRNAME/mod1
$CVSROOT_DIRNAME/mod1-2 \
14968 $CVSROOT_DIRNAME/mod2
$CVSROOT_DIRNAME/mod2-2
14974 # Various tests of the Emptydir (CVSNULLREPOS) code. See also:
14975 # cvsadm: tests of Emptydir in various module definitions
14976 # basicb: Test that "Emptydir" is non-special in ordinary contexts
14979 dotest emptydir-1
"${testcvs} co CVSROOT/modules" \
14980 "U CVSROOT/modules"
14981 echo "# Module defs for emptydir tests" > CVSROOT
/modules
14982 echo "2d1mod -d dir2d1/sub/sub2d1 mod1" >> CVSROOT
/modules
14983 echo "2d1moda -d dir2d1/suba moda/modasub" >> CVSROOT
/modules
14984 echo "2d1modb -d dir2d1/suba mod1" >> CVSROOT
/modules
14985 echo "comb -a 2d1modb 2d1moda" >> CVSROOT
/modules
14987 dotest emptydir-2
"${testcvs} ci -m add-modules" \
14988 "${CPROG} commit: Examining CVSROOT
14989 ${CVSROOT_DIRNAME}/CVSROOT/modules,v <-- CVSROOT/modules
14990 new revision: 1\.[0-9]*; previous revision: 1\.[0-9]*
14991 ${SPROG} commit: Rebuilding administrative file database" \
14992 "${CPROG} commit: Examining CVSROOT"
14995 modify_repo mkdir
$CVSROOT_DIRNAME/mod1
$CVSROOT_DIRNAME/moda
14996 # Populate. Not sure we really need to do this.
14997 dotest emptydir-3
"$testcvs -q co -l ."
14998 dotest emptydir-3a
"${testcvs} co mod1 moda" \
14999 "${SPROG} checkout: Updating mod1
15000 ${SPROG} checkout: Updating moda"
15001 echo "file1" > mod
1/file1
15003 dotest emptydir-3b
"${testcvs} add moda/modasub" \
15004 "Directory ${CVSROOT_DIRNAME}/moda/modasub added to the repository"
15005 echo "filea" > moda
/modasub
/filea
15006 dotest emptydir-4
"${testcvs} add mod1/file1 moda/modasub/filea" \
15007 "${SPROG} add: scheduling file .mod1/file1. for addition
15008 ${SPROG} add: scheduling file .moda/modasub/filea. for addition
15009 ${SPROG} add: use \`${SPROG} commit' to add these files permanently"
15010 dotest emptydir-5
"${testcvs} -q ci -m yup" \
15011 "$CVSROOT_DIRNAME/mod1/file1,v <-- mod1/file1
15012 initial revision: 1\.1
15013 ${CVSROOT_DIRNAME}/moda/modasub/filea,v <-- moda/modasub/filea
15014 initial revision: 1\.1"
15015 rm -rf mod1 moda CVS
15018 dotest emptydir-6
"${testcvs} co 2d1mod" \
15019 "${SPROG} checkout: Updating dir2d1/sub/sub2d1
15020 U dir2d1/sub/sub2d1/file1"
15023 # It doesn't make any sense to add a file (or do much of anything
15024 # else) in Emptydir; Emptydir is a placeholder indicating that
15025 # the working directory doesn't correspond to anything in
15027 dotest_fail emptydir-7
"${testcvs} add emptyfile" \
15028 "${SPROG} \[add aborted]: cannot add to \`${CVSROOT_DIRNAME}/CVSROOT/Emptydir'"
15030 dotest_fail emptydir-8
"${testcvs} add emptydir" \
15031 "${CPROG} \[add aborted]: cannot add to \`${CVSROOT_DIRNAME}/CVSROOT/Emptydir'"
15035 # OK, while we have an Emptydir around, test a few obscure
15037 mkdir edir
; cd edir
15038 dotest emptydir-9
"${testcvs} -q co -l CVSROOT" \
15039 "U CVSROOT${DOTSTAR}"
15041 dotest_fail emptydir-10
"test -d Emptydir" ''
15042 # This tests the code in find_dirs which skips Emptydir.
15043 dotest emptydir-11
"${testcvs} -q -n update -d -P" ''
15048 # Now start playing with moda.
15050 dotest emptydir-12
"${testcvs} -q co 2d1moda" \
15051 "U dir2d1/suba/filea"
15052 # OK, this is the crux of the matter. This used to show "Emptydir",
15053 # but everyone seemed to think it should show "moda". This
15054 # usually works better, but not always as shown by the following
15056 dotest emptydir-13
"cat dir2d1/CVS/Repository" "moda"
15057 dotest_fail emptydir-14
"${testcvs} co comb" \
15058 "${SPROG} checkout: existing repository ${CVSROOT_DIRNAME}/moda/modasub does not match ${CVSROOT_DIRNAME}/mod1
15059 ${SPROG} checkout: ignoring module 2d1modb
15060 ${SPROG} checkout: Updating dir2d1/suba"
15061 dotest emptydir-15
"cat dir2d1/CVS/Repository" "moda"
15064 # Test the effect of a non-cvs directory already existing with the
15065 # same name as one in the modules file.
15068 dotest emptydir-16
"${testcvs} co 2d1mod" \
15069 "${SPROG} checkout: Updating dir2d1/sub/sub2d1
15070 U dir2d1/sub/sub2d1/file1"
15073 dotest emptydir-17
"cat dir2d1/CVS/Repository" "CVSROOT/Emptydir"
15075 dotest_fail emptydir-17
"test -d dir2d1/CVS"
15081 modify_repo
rm -rf $CVSROOT_DIRNAME/mod1
$CVSROOT_DIRNAME/moda
15082 # I guess for the moment the convention is going to be
15083 # that we don't need to remove $CVSROOT_DIRNAME/CVSROOT/Emptydir
15090 # These tests test the thituations thin thwitch thoo theck
15091 # things thout twith thabsolute thaths. Threally.
15097 # Create a few modules to use
15098 modify_repo mkdir
$CVSROOT_DIRNAME/mod1
$CVSROOT_DIRNAME/mod2
15099 dotest abspath-1a
"${testcvs} co mod1 mod2" \
15100 "${SPROG} checkout: Updating mod1
15101 ${SPROG} checkout: Updating mod2"
15103 # Populate the module
15104 echo "file1" > mod
1/file1
15105 echo "file2" > mod
2/file2
15107 dotest abspath-1ba
"${testcvs} add file1" \
15108 "${SPROG} add: scheduling file .file1. for addition
15109 ${SPROG} add: use \`${SPROG} commit' to add this file permanently"
15112 dotest abspath-1bb
"${testcvs} add file2" \
15113 "${SPROG} add: scheduling file .file2. for addition
15114 ${SPROG} add: use \`${SPROG} commit' to add this file permanently"
15117 dotest abspath-1c
"${testcvs} ci -m yup mod1 mod2" \
15118 "${CPROG} commit: Examining mod1
15119 ${CPROG} commit: Examining mod2
15120 ${CVSROOT_DIRNAME}/mod1/file1,v <-- mod1/file1
15121 initial revision: 1.1
15122 ${CVSROOT_DIRNAME}/mod2/file2,v <-- mod2/file2
15123 initial revision: 1.1"
15124 # Finished creating the module -- clean up.
15125 rm -rf CVS mod1 mod2
15128 # Try checking out the module in a local directory
15130 dotest_fail abspath-2a
"${testcvs} co -d ${TESTDIR}/1 mod1" \
15131 "${SPROG} \[checkout aborted\]: absolute pathnames invalid for server (specified .${TESTDIR}/1.)"
15132 dotest abspath-2a-try2
"${testcvs} co -d 1 mod1" \
15133 "${SPROG} checkout: Updating 1
15136 dotest abspath-2a
"${testcvs} co -d ${TESTDIR}/1 mod1" \
15137 "${SPROG} checkout: Updating ${TESTDIR}/1
15138 U ${TESTDIR}/1/file1"
15139 fi # remote workaround
15141 dotest abspath-2b
"cat ${TESTDIR}/1/CVS/Repository" "mod1"
15147 # Now try in a subdirectory. We're not covering any more
15148 # code here, but we might catch a future error if someone
15149 # changes the checkout code.
15151 # Since CVS 1.11.14, CVS will create leading directories specified
15153 # I am unsure that this wasn't the behavior prior to CVS 1.9, but the
15154 # comment that used to be here leads me to believe it was not.
15155 if $remote; then :; else
15156 dotest abspath-3.1
"$testcvs -q co -d $TESTDIR/1/2 mod1" \
15157 "U $TESTDIR/1/2/file1"
15160 dotest abspath-3.2
"$testcvs -q co -d 1/2 mod1" \
15164 # We don't to mess with an existing directory just to traverse it,
15165 # for example by creating a CVS directory, but currently we can't
15166 # avoid this in client/server mode.
15169 dotest abspath-3ar
"$testcvs co -d 1/2 mod1" \
15170 "$SPROG checkout: Updating 1/2
15172 dotest abspath-3br
"cat 1/CVS/Repository" .
15174 dotest abspath-3a
"$testcvs co -d $TESTDIR/1/2 mod1" \
15175 "$SPROG checkout: Updating $TESTDIR/1/2
15176 U $TESTDIR/1/2/file1"
15177 dotest_fail abspath-3b
"test -d ${TESTDIR}/1/CVS"
15180 dotest abspath-3c
"cat ${TESTDIR}/1/2/CVS/Repository" mod1
15184 rm -rf ${TESTDIR}/1
15187 # Now try someplace where we don't have permission.
15188 mkdir
${TESTDIR}/barf
15189 chmod -w ${TESTDIR}/barf
15190 dotest_fail abspath-4r
"${testcvs} co -d ${TESTDIR}/barf/sub mod1" \
15191 "${SPROG} \[checkout aborted\]: cannot make directory sub: Permission denied" \
15192 "${SPROG} \[checkout aborted\]: absolute pathnames invalid for server (specified .${TESTDIR}/barf/sub.)"
15193 chmod +w
${TESTDIR}/barf
15194 rmdir ${TESTDIR}/barf
15195 # Done. Nothing to clean up.
15198 # Try checking out two modules into the same directory.
15200 dotest abspath-5ar
"${testcvs} co -d 1 mod1 mod2" \
15201 "${SPROG} checkout: Updating 1/mod1
15203 ${SPROG} checkout: Updating 1/mod2
15206 dotest abspath-5a
"${testcvs} co -d ${TESTDIR}/1 mod1 mod2" \
15207 "${SPROG} checkout: Updating ${TESTDIR}/1/mod1
15208 U ${TESTDIR}/1/mod1/file1
15209 ${SPROG} checkout: Updating ${TESTDIR}/1/mod2
15210 U ${TESTDIR}/1/mod2/file2"
15211 fi # end remote workaround
15212 dotest abspath-5b
"cat ${TESTDIR}/1/CVS/Repository" "\."
15213 dotest abspath-5c
"cat ${TESTDIR}/1/mod1/CVS/Repository" "mod1"
15214 dotest abspath-5d
"cat ${TESTDIR}/1/mod2/CVS/Repository" "mod2"
15219 # Try checking out the top-level module.
15221 dotest abspath-6ar
"$testcvs co -d 1 ." \
15222 "$SPROG checkout: Updating 1
15223 $SPROG checkout: Updating 1/CVSROOT
15225 $SPROG checkout: Updating 1/mod1
15227 $SPROG checkout: Updating 1/mod2
15230 dotest abspath-6a
"${testcvs} co -d ${TESTDIR}/1 ." \
15231 "${SPROG} checkout: Updating ${TESTDIR}/1
15232 ${SPROG} checkout: Updating ${TESTDIR}/1/CVSROOT
15234 ${SPROG} checkout: Updating ${TESTDIR}/1/mod1
15235 U ${TESTDIR}/1/mod1/file1
15236 ${SPROG} checkout: Updating ${TESTDIR}/1/mod2
15237 U ${TESTDIR}/1/mod2/file2"
15238 fi # end of remote workaround
15239 dotest abspath-6b
"cat ${TESTDIR}/1/CVS/Repository" "\."
15240 dotest abspath-6c
"cat ${TESTDIR}/1/CVSROOT/CVS/Repository" "CVSROOT"
15241 dotest abspath-6c
"cat ${TESTDIR}/1/mod1/CVS/Repository" "mod1"
15242 dotest abspath-6d
"cat ${TESTDIR}/1/mod2/CVS/Repository" "mod2"
15244 rm -rf ${TESTDIR}/1
15246 # Test that an absolute pathname to some other directory
15247 # doesn't mess with the current working directory.
15251 dotest_fail abspath-7ar
"${testcvs} -q co -d ../2 mod2" \
15252 "${SPROG} checkout: protocol error: .\.\./2. contains more leading \.\.
15253 ${SPROG} \[checkout aborted\]: than the 0 which Max-dotdot specified"
15255 dotest abspath-7a-try2r
"${testcvs} -q co -d 2 mod2" \
15259 dotest abspath-7a
"${testcvs} -q co -d ${TESTDIR}/2 mod2" \
15260 "U ${TESTDIR}/2/file2"
15261 fi # remote workaround
15262 dotest abspath-7b
"ls" ""
15263 dotest abspath-7c
"${testcvs} -q co mod1" \
15268 dotest abspath-7dr
"${testcvs} -q co -d 3 mod2" \
15272 dotest abspath-7d
"${testcvs} -q co -d ${TESTDIR}/3 mod2" \
15273 "U ${TESTDIR}/3/file2"
15274 fi # remote workaround
15275 dotest abspath-7e
"${testcvs} -q update -d"
15278 # FIXME: do other functions here (e.g. update /tmp/foo)
15281 # Finished with all tests. Cleanup.
15285 modify_repo
rm -rf $CVSROOT_DIRNAME/mod1
$CVSROOT_DIRNAME/mod2
15291 # More absolute path checks. The following used to attempt to create
15292 # directories in /:
15294 # $ cvs -d:fork:/cvsroot co /foo
15295 # cvs checkout: warning: cannot make directory CVS in /: Permission denied
15296 # cvs [checkout aborted]: cannot make directory /foo: Permission denied
15299 # The -z9 in this test also checks for an old server bug where the
15300 # server would block indefinitely attempting to read an EOF from the
15301 # client in the compression buffer shutdown routine.
15302 dotest_fail abspath2-1
"$testcvs -z9 co /foo" \
15303 "$CPROG \[checkout aborted\]: Absolute module reference invalid: \`/foo'" \
15304 "$SPROG \[server aborted\]: Absolute module reference invalid: \`/foo'
15305 $CPROG \[checkout aborted\]: end of file from server (consult above messages if any)"
15311 # test the feature that cvs creates a CVS subdir also for
15312 # the toplevel directory
15314 # First set the TopLevelAdmin setting.
15316 dotest toplevel-1a
"${testcvs} -q co CVSROOT/config" \
15319 echo "TopLevelAdmin=yes" >>config
15320 dotest toplevel-1b
"${testcvs} -q ci -m yes-top-level" \
15321 "$CVSROOT_DIRNAME/CVSROOT/config,v <-- config
15322 new revision: 1\.[0-9]*; previous revision: 1\.[0-9]*
15323 $SPROG commit: Rebuilding administrative file database"
15328 dotest toplevel-1
"${testcvs} -q co -l ." ''
15329 mkdir top-dir second-dir
15330 dotest toplevel-2
"${testcvs} add top-dir second-dir" \
15331 "Directory ${CVSROOT_DIRNAME}/top-dir added to the repository
15332 Directory ${CVSROOT_DIRNAME}/second-dir added to the repository"
15336 dotest toplevel-3
"${testcvs} add file1" \
15337 "${SPROG} add: scheduling file .file1. for addition
15338 ${SPROG} add: use .${SPROG} commit. to add this file permanently"
15339 dotest toplevel-4
"${testcvs} -q ci -m add" \
15340 "$CVSROOT_DIRNAME/top-dir/file1,v <-- file1
15341 initial revision: 1\.1"
15346 dotest toplevel-3s
"${testcvs} add file2" \
15347 "${SPROG} add: scheduling file .file2. for addition
15348 ${SPROG} add: use .${SPROG} commit. to add this file permanently"
15349 dotest toplevel-4s
"${testcvs} -q ci -m add" \
15350 "$CVSROOT_DIRNAME/second-dir/file2,v <-- file2
15351 initial revision: 1\.1"
15354 rm -r 1; mkdir
1; cd 1
15355 dotest toplevel-5
"${testcvs} co top-dir" \
15356 "${SPROG} checkout: Updating top-dir
15359 dotest toplevel-6
"${testcvs} update top-dir" \
15360 "${SPROG} update: Updating top-dir"
15361 dotest toplevel-7
"${testcvs} update" \
15362 "${SPROG} update: Updating \.
15363 ${SPROG} update: Updating top-dir"
15365 dotest toplevel-8
"${testcvs} update -d top-dir" \
15366 "${SPROG} update: Updating top-dir"
15367 # There is some sentiment that
15368 # "${SPROG} update: Updating \.
15369 # ${SPROG} update: Updating top-dir"
15370 # is correct but it isn't clear why that would be correct instead
15371 # of the remote CVS behavior (which also updates CVSROOT).
15373 # The DOTSTAR matches of a bunch of lines like
15374 # "U CVSROOT/checkoutlist". Trying to match them more precisely
15375 # seemed to cause trouble. For example CVSROOT/cvsignore will
15376 # be present or absent depending on whether we ran the "ignore"
15378 dotest toplevel-9
"${testcvs} update -d" \
15379 "${SPROG} update: Updating \.
15380 ${SPROG} update: Updating CVSROOT
15382 ${SPROG} update: Updating top-dir"
15385 rm -r 1; mkdir
1; cd 1
15386 dotest toplevel-10
"${testcvs} co top-dir" \
15387 "${SPROG} checkout: Updating top-dir
15390 # This tests more or less the same thing, in a particularly
15391 # "real life" example.
15392 dotest toplevel-11
"${testcvs} -q update -d second-dir" \
15393 "U second-dir/file2"
15395 # Now remove the CVS directory (people may do this manually,
15396 # especially if they formed their habits with CVS
15397 # 1.9 and older, which didn't create it. Or perhaps the working
15398 # directory itself was created with 1.9 or older).
15400 # Now set the permissions so we can't recreate it.
15401 if test -n "$remotehost"; then
15403 $CVS_RSH $remotehost "chmod -w $TESTDIR/1"
15407 # Now see whether CVS has trouble because it can't create CVS.
15408 # First string is for local, second is for remote.
15409 dotest toplevel-12
"${testcvs} co top-dir" \
15410 "${SPROG} checkout: warning: cannot make directory CVS in \.: Permission denied
15411 ${SPROG} checkout: Updating top-dir" \
15412 "${CPROG} checkout: warning: cannot make directory CVS in \.: Permission denied
15413 ${CPROG} checkout: in directory \.:
15414 ${CPROG} checkout: cannot open CVS/Entries for reading: No such file or directory
15415 ${SPROG} checkout: Updating top-dir"
15423 modify_repo
rm -rf $CVSROOT_DIRNAME/top-dir \
15424 $CVSROOT_DIRNAME/second-dir
15430 # Similar to toplevel, but test the case where TopLevelAdmin=no.
15432 # First set the TopLevelAdmin setting.
15434 dotest toplevel2-1a
"${testcvs} -q co CVSROOT/config" \
15437 echo "TopLevelAdmin=no" >>config
15438 dotest toplevel2-1b
"$testcvs -q ci -m no-top-level" \
15439 "$CVSROOT_DIRNAME/CVSROOT/config,v <-- config
15440 new revision: 1\.[0-9]*; previous revision: 1\.[0-9]*
15441 $SPROG commit: Rebuilding administrative file database"
15445 # Now set up some directories and subdirectories
15447 dotest toplevel2-1
"${testcvs} -q co -l ." ''
15448 mkdir top-dir second-dir
15449 dotest toplevel2-2
"${testcvs} add top-dir second-dir" \
15450 "Directory ${CVSROOT_DIRNAME}/top-dir added to the repository
15451 Directory ${CVSROOT_DIRNAME}/second-dir added to the repository"
15455 dotest toplevel2-3
"${testcvs} add file1" \
15456 "${SPROG} add: scheduling file .file1. for addition
15457 ${SPROG} add: use .${SPROG} commit. to add this file permanently"
15458 dotest toplevel2-4
"${testcvs} -q ci -m add" \
15459 "$CVSROOT_DIRNAME/top-dir/file1,v <-- file1
15460 initial revision: 1\.1"
15465 dotest toplevel2-3s
"${testcvs} add file2" \
15466 "${SPROG} add: scheduling file .file2. for addition
15467 ${SPROG} add: use .${SPROG} commit. to add this file permanently"
15468 dotest toplevel2-4s
"${testcvs} -q ci -m add" \
15469 "$CVSROOT_DIRNAME/second-dir/file2,v <-- file2
15470 initial revision: 1\.1"
15473 rm -r 1; mkdir
1; cd 1
15474 dotest toplevel2-5
"${testcvs} co top-dir" \
15475 "${SPROG} checkout: Updating top-dir
15478 dotest toplevel2-6
"${testcvs} update top-dir" \
15479 "${SPROG} update: Updating top-dir"
15480 dotest toplevel2-7
"${testcvs} update" \
15481 "${SPROG} update: Updating top-dir"
15483 dotest toplevel2-8
"${testcvs} update -d top-dir" \
15484 "${SPROG} update: Updating top-dir"
15485 # Contrast this with toplevel-9, which has TopLevelAdmin=yes.
15486 dotest toplevel2-9
"${testcvs} update -d" \
15487 "${SPROG} update: Updating top-dir"
15490 rm -r 1; mkdir
1; cd 1
15491 dotest toplevel2-10
"${testcvs} co top-dir" \
15492 "${SPROG} checkout: Updating top-dir
15494 # This tests more or less the same thing, in a particularly
15495 # "real life" example. With TopLevelAdmin=yes, this command
15496 # would give us second-dir and CVSROOT directories too.
15497 dotest toplevel2-11
"${testcvs} -q update -d" ""
15503 modify_repo
rm -rf $CVSROOT_DIRNAME/top-dir \
15504 $CVSROOT_DIRNAME/second-dir
15510 # This test used to confirm a bug that existed in the r* commands
15511 # run against the top-level project prior to CVS 1.11.18 & 1.12.10.
15513 # The assertion failure was something like:
15514 # do_recursion: Assertion \`strstr (repository, \"/\./\") == ((void \*)0)' failed\..*"
15515 dotest rstar-toplevel-1
"$testcvs -q rlog ." \
15517 RCS file: $CVSROOT_DIRNAME/CVSROOT$DOTSTAR"
15525 # Some tests of CVS's reactions to path specifications containing
15526 # trailing slashes.
15527 mkdir trailingslashes
; cd trailingslashes
15528 dotest trailingslashes-init-1
"$testcvs -Q co -ldt ."
15529 dotest trailingslashes-init-2
"$testcvs -Q co -dt2 ."
15531 echo "Ahh'll be baaack." >topfile
15532 dotest trailingslashes-init-3
"$testcvs -Q add topfile"
15533 dotest trailingslashes-init-4
"$testcvs -Q ci -mto-top"
15535 # First, demonstrate the usual case.
15537 dotest trailingslashes-1
"$testcvs -q up CVSROOT"
15538 dotest_fail trailingslashes-1a
"test -f topfile"
15541 # Now the one that fails in remote mode.
15542 # This highlights one of the failure cases mentioned in TODO item
15545 dotest trailingslashes-2
"$testcvs -q up CVSROOT/" \
15547 dotest trailingslashes-2a
"test -f topfile"
15549 dotest trailingslashes-2
"$testcvs -q up CVSROOT/"
15550 dotest_fail trailingslashes-2a
"test -f topfile"
15555 rm -rf trailingslashes
15556 modify_repo
rm -rf $CVSROOT_DIRNAME/topfile
,v
15561 checkout_repository
)
15562 dotest_fail checkout_repository-1 \
15563 "${testcvs} co -d ${CVSROOT_DIRNAME} CVSROOT" \
15564 "${CPROG} \[checkout aborted\]: Cannot check out files into the repository itself" \
15565 "${SPROG} \[checkout aborted\]: absolute pathnames invalid for server (specified \`${CVSROOT_DIRNAME}')"
15567 # The behavior of the client/server test below should be correct.
15568 # The CVS client currently has no way of knowing that the client and
15569 # server are the same machine and thus skips the $CVSROOT checks.
15570 # I think checking for this case in CVS would be bloat since this
15571 # should be a fairly rare occurance.
15572 cd ${CVSROOT_DIRNAME}
15573 dotest_fail checkout_repository-2
"${testcvs} co CVSROOT" \
15574 "${CPROG} \[checkout aborted\]: Cannot check out files into the repository itself" \
15575 "${SPROG} checkout: Updating CVSROOT
15576 ${CPROG} checkout: move away \`CVSROOT/checkoutlist'; it is in the way
15577 C CVSROOT/checkoutlist
15578 ${CPROG} checkout: move away \`CVSROOT/commitinfo'; it is in the way
15579 C CVSROOT/commitinfo
15580 ${CPROG} checkout: move away \`CVSROOT/config'; it is in the way
15582 ${CPROG} checkout: move away \`CVSROOT/cvswrappers'; it is in the way
15583 C CVSROOT/cvswrappers
15584 ${CPROG} checkout: move away \`CVSROOT/loginfo'; it is in the way
15586 ${CPROG} checkout: move away \`CVSROOT/modules'; it is in the way
15588 ${CPROG} checkout: move away \`CVSROOT/notify'; it is in the way
15590 ${CPROG} checkout: move away \`CVSROOT/postadmin'; it is in the way
15591 C CVSROOT/postadmin
15592 ${CPROG} checkout: move away \`CVSROOT/postproxy'; it is in the way
15593 C CVSROOT/postproxy
15594 ${CPROG} checkout: move away \`CVSROOT/posttag'; it is in the way
15596 ${CPROG} checkout: move away \`CVSROOT/postwatch'; it is in the way
15597 C CVSROOT/postwatch
15598 ${CPROG} checkout: move away \`CVSROOT/preproxy'; it is in the way
15600 ${CPROG} checkout: move away \`CVSROOT/rcsinfo'; it is in the way
15602 ${CPROG} checkout: move away \`CVSROOT/taginfo'; it is in the way
15604 ${CPROG} checkout: move away \`CVSROOT/verifymsg'; it is in the way
15605 C CVSROOT/verifymsg"
15607 dotest checkout_repository-3 \
15608 "${testcvs} co -p CVSROOT/modules >/dev/null" \
15609 "===================================================================
15610 Checking out CVSROOT/modules
15611 RCS: ${CVSROOT_DIRNAME}/CVSROOT/modules,v
15613 \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*"
15622 for message
in '' ' ' '
15625 mkdir a-dir
; cd a-dir
15626 # Test handling of -m during import
15628 if ${testcvs} import
-m "$message" a-dir A A1
>>${LOGFILE} 2>&1;then
15633 # Must import twice since the first time uses inline code that
15636 if ${testcvs} import
-m "$message" a-dir A A2
>>${LOGFILE} 2>&1;then
15641 # Test handling of -m during ci
15643 if ${testcvs} co a-dir
>>${LOGFILE} 2>&1; then
15650 if ${testcvs} ci
-m "$message" >>${LOGFILE} 2>&1; then
15655 # Test handling of -m during rm/ci
15657 if ${testcvs} rm test >>${LOGFILE} 2>&1; then
15662 if ${testcvs} ci
-m "$message" >>${LOGFILE} 2>&1; then
15672 modify_repo
rm -rf $CVSROOT_DIRNAME/a-dir
15679 # More tests of log messages, in this case the ability to
15680 # run an external editor.
15682 # * also test $EDITOR, $CVSEDITOR, &c.
15683 # * test what happens if up-to-date check fails.
15685 # Our "editor" puts "x" at the start of each line, so we
15686 # can see the "CVS:" lines.
15687 cat >${TESTDIR}/editme
<<EOF
15690 sed <\$1 -e 's/^/x/' >${TESTDIR}/edit.new
15691 mv ${TESTDIR}/edit.new \$1
15694 chmod +x
${TESTDIR}/editme
15697 dotest editor-1
"${testcvs} -q co -l ." ''
15699 dotest editor-2
"${testcvs} add first-dir" \
15700 "Directory ${CVSROOT_DIRNAME}/first-dir added to the repository"
15703 dotest editor-3
"${testcvs} add file1 file2" \
15704 "${SPROG} add: scheduling file .file1. for addition
15705 ${SPROG} add: scheduling file .file2. for addition
15706 ${SPROG} add: use .${SPROG} commit. to add these files permanently"
15707 dotest editor-4
"${testcvs} -e ${TESTDIR}/editme -q ci" \
15708 "$CVSROOT_DIRNAME/first-dir/file1,v <-- file1
15709 initial revision: 1\.1
15710 $CVSROOT_DIRNAME/first-dir/file2,v <-- file2
15711 initial revision: 1\.1"
15712 dotest editor-5
"${testcvs} -q tag -b br" "T file1
15714 dotest editor-6
"${testcvs} -q update -r br" ''
15715 echo modify
>>file1
15716 dotest editor-7
"${testcvs} -e ${TESTDIR}/editme -q ci" \
15717 "$CVSROOT_DIRNAME/first-dir/file1,v <-- file1
15718 new revision: 1\.1\.2\.1; previous revision: 1\.1"
15719 # OK, now we want to make sure "ci -r" puts in the branch
15720 # where appropriate. Note that we can check in on the branch
15721 # without being on the branch, because there is not a revision
15722 # already on the branch. If there were a revision on the branch,
15723 # CVS would correctly give an up-to-date check failed.
15724 dotest editor-8
"${testcvs} -q update -A" "U file1"
15725 echo add a line
>>file2
15726 dotest editor-9
"${testcvs} -q -e ${TESTDIR}/editme ci -rbr file2" \
15727 "$CVSROOT_DIRNAME/first-dir/file2,v <-- file2
15728 new revision: 1\.1\.2\.1; previous revision: 1\.1"
15730 dotest editor-log-file1
"${testcvs} log -N file1" "
15731 RCS file: ${CVSROOT_DIRNAME}/first-dir/file1,v
15732 Working file: file1
15737 keyword substitution: kv
15738 total revisions: 2; selected revisions: 2
15740 ----------------------------
15742 date: ${ISO8601DATE}; author: ${username}; state: Exp; commitid: ${commitid};
15744 xCVS: ----------------------------------------------------------------------
15745 xCVS: Enter Log. Lines beginning with .CVS:. are removed automatically
15747 xCVS: Committing in .
15751 xCVS: ----------------------------------------------------------------------
15752 ----------------------------
15753 revision 1\.1\.2\.1
15754 date: ${ISO8601DATE}; author: ${username}; state: Exp; lines: ${PLUS}1 -0; commitid: ${commitid};
15755 xCVS: ----------------------------------------------------------------------
15756 xCVS: Enter Log. Lines beginning with .CVS:. are removed automatically
15758 xCVS: Committing in .
15760 xCVS: Modified Files:
15763 xCVS: ----------------------------------------------------------------------
15764 ============================================================================="
15766 # The only difference between the two expect strings is the
15767 # presence or absence of "Committing in ." for 1.1.2.1.
15768 dotest editor-log-file2
"${testcvs} log -N file2" "
15769 RCS file: ${CVSROOT_DIRNAME}/first-dir/file2,v
15770 Working file: file2
15775 keyword substitution: kv
15776 total revisions: 2; selected revisions: 2
15778 ----------------------------
15780 date: ${ISO8601DATE}; author: ${username}; state: Exp; commitid: ${commitid};
15782 xCVS: ----------------------------------------------------------------------
15783 xCVS: Enter Log. Lines beginning with .CVS:. are removed automatically
15785 xCVS: Committing in .
15789 xCVS: ----------------------------------------------------------------------
15790 ----------------------------
15791 revision 1\.1\.2\.1
15792 date: ${ISO8601DATE}; author: ${username}; state: Exp; lines: ${PLUS}1 -0; commitid: ${commitid};
15793 xCVS: ----------------------------------------------------------------------
15794 xCVS: Enter Log. Lines beginning with .CVS:. are removed automatically
15796 xCVS: Modified Files:
15799 xCVS: ----------------------------------------------------------------------
15800 =============================================================================" "
15801 RCS file: ${CVSROOT_DIRNAME}/first-dir/file2,v
15802 Working file: file2
15807 keyword substitution: kv
15808 total revisions: 2; selected revisions: 2
15810 ----------------------------
15812 date: ${ISO8601DATE}; author: ${username}; state: Exp; commitid: ${commitid};
15814 xCVS: ----------------------------------------------------------------------
15815 xCVS: Enter Log. Lines beginning with .CVS:. are removed automatically
15817 xCVS: Committing in .
15821 xCVS: ----------------------------------------------------------------------
15822 ----------------------------
15823 revision 1\.1\.2\.1
15824 date: ${ISO8601DATE}; author: ${username}; state: Exp; lines: ${PLUS}1 -0; commitid: ${commitid};
15825 xCVS: ----------------------------------------------------------------------
15826 xCVS: Enter Log. Lines beginning with .CVS:. are removed automatically
15828 xCVS: Committing in .
15830 xCVS: Modified Files:
15833 xCVS: ----------------------------------------------------------------------
15834 ============================================================================="
15836 # Test CVS's response to an unchanged log message
15837 cat >${TESTDIR}/editme
<<EOF
15842 chmod +x
${TESTDIR}/editme
15843 dotest_fail editor-emptylog-1
"echo a |${testcvs} -e ${TESTDIR}/editme ci -f file1" \
15845 Log message unchanged or not specified
15846 a)bort, c)ontinue, e)dit, !)reuse this message unchanged for remaining dirs
15847 Action: (continue) ${CPROG} \[commit aborted\]: aborted by user"
15849 # Test CVS's response to an empty log message
15850 cat >${TESTDIR}/editme
<<EOF
15856 chmod +x
${TESTDIR}/editme
15857 dotest_fail editor-emptylog-1a
"echo a |${testcvs} -e ${TESTDIR}/editme ci -f file1" \
15859 Log message unchanged or not specified
15860 a)bort, c)ontinue, e)dit, !)reuse this message unchanged for remaining dirs
15861 Action: (continue) ${CPROG} \[commit aborted\]: aborted by user"
15863 # Test CVS's response to a log message with one blank line
15864 cat >${TESTDIR}/editme
<<EOF
15870 chmod +x
${TESTDIR}/editme
15871 dotest_fail editor-emptylog-1b
"echo a |${testcvs} -e ${TESTDIR}/editme ci -f file1" \
15873 Log message unchanged or not specified
15874 a)bort, c)ontinue, e)dit, !)reuse this message unchanged for remaining dirs
15875 Action: (continue) ${CPROG} \[commit aborted\]: aborted by user"
15877 # Test CVS's response to a log message with only comments
15878 cat >${TESTDIR}/editme
<<EOF
15881 cat \$1 >${TESTDIR}/edit.new
15882 mv ${TESTDIR}/edit.new \$1
15885 chmod +x
${TESTDIR}/editme
15886 dotest_fail editor-emptylog-1c
"echo a |${testcvs} -e ${TESTDIR}/editme ci -f file1" \
15888 Log message unchanged or not specified
15889 a)bort, c)ontinue, e)dit, !)reuse this message unchanged for remaining dirs
15890 Action: (continue) ${CPROG} \[commit aborted\]: aborted by user"
15892 # Test CVS's response to a log message that is zero bytes
15893 # in length. This caused core dumps in cvs 1.11.5 on Solaris
15896 dotest editor-emptylog-continue-1
"${testcvs} -q co CVSROOT/loginfo" \
15897 "U CVSROOT/loginfo"
15900 cat <<\EOF
>>loginfo
15901 DEFAULT
(echo Start-Log
;cat;echo End-Log
) >> $CVSROOT/CVSROOT
/commitlog
15903 dotest editor-emptylog-continue-2
"$testcvs -Q ci -mloggem"
15906 cat >${TESTDIR}/editme
<<EOF
15912 chmod +x
${TESTDIR}/editme
15913 dotest editor-emptylog-continue-3
"echo c |${testcvs} -e ${TESTDIR}/editme ci -f file1" \
15914 "${CPROG} commit: warning: editor session failed
15916 Log message unchanged or not specified
15917 a)bort, c)ontinue, e)dit, !)reuse this message unchanged for remaining dirs
15918 Action: (continue) ${CVSROOT_DIRNAME}/first-dir/file1,v <-- file1
15919 new revision: 1\.2; previous revision: 1\.1"
15920 # The loginfo Log message should be an empty line and not "(null)"
15921 # which is what some fprintf() implementations do with "%s"
15922 # format and a NULL pointer...
15924 dotest editor-emptylog-continue-4r \
15925 "cat $CVSROOT_DIRNAME/CVSROOT/commitlog" \
15927 Update of $CVSROOT_DIRNAME/CVSROOT
15928 In directory $hostname:$TMPDIR/cvs-serv[0-9a-z]*
15936 Update of $CVSROOT_DIRNAME/first-dir
15937 In directory $hostname:$TMPDIR/cvs-serv[0-9a-z]*
15945 dotest editor-emptylog-continue-4 \
15946 "cat $CVSROOT_DIRNAME/CVSROOT/commitlog" \
15948 Update of $CVSROOT_DIRNAME/CVSROOT
15949 In directory $hostname:$TESTDIR/1/CVSROOT
15957 Update of $CVSROOT_DIRNAME/first-dir
15958 In directory $hostname:$TESTDIR/1/first-dir
15966 # There should have an empty log message at this point
15967 dotest editor-emptylog-continue-5
"${testcvs} log -N -r1.2 file1" \
15969 RCS file: ${CVSROOT_DIRNAME}/first-dir/file1,v
15970 Working file: file1
15975 keyword substitution: kv
15976 total revisions: 3; selected revisions: 1
15978 ----------------------------
15980 date: ${ISO8601DATE}; author: ${username}; state: Exp; lines: +0 -0; commitid: ${commitid};
15981 \*\*\* empty log message \*\*\*
15982 ============================================================================="
15986 # restore the default loginfo script
15991 modify_repo
rm -rf $CVSROOT_DIRNAME/first-dir
15997 # Test to see if the CVS_PID environment variable is being set
15998 mkdir
${TESTDIR}/env
16000 dotest env-1
"${testcvs} -Q co . >>${LOGFILE}" ''
16002 cat > ${TESTDIR}/env
/test-cvs-pid
<<EOF
16004 if test "x\$CVS_PID" != "x"; then
16005 # In local mode, there is no directory with the pid in it for use.
16006 # In remote mode the CVS_PID will be the parent process of the
16007 # cvs process that runs the commitinfo script.
16008 if test "x$remote" = "x:" ; then
16009 ppid=\`pwd | sed -e 's,.*/cvs-serv,,'\`
16011 # This assumes that the -l switch puts PPID in the banner and does
16012 # not run the elements together such that whitespace surrounds the
16013 # pid and ppid in the output. This could be made slightly simpler
16014 # if all hosts had a 'ps' command that supported the -p switch,
16015 # but Solaris 7 /usr/ucb/ps does not and that may be the one we use.
16016 # It is because this is so messy that the CVS_PID feature exists.
16018 pidcmd="ps -o pid,ppid -p \$pid || ps -el || ps -al"
16019 if echo \$pidcmd | sh >pid.stdout 2> pid.stderr; then
16020 ppid=\`cat pid.stdout |\\
16021 awk '/PPID/ { for (i=1; i <= NF; i++) {
16022 if (\$i == "PPID") ppidx = i;
16023 if (\$i == "PID") pidx = i;
16027 { print \$pidx " " \$ppidx }' |\\
16029 awk '{ print \$NF }'\`
16034 if test "x\$ppid" = "x\${CVS_PID}"; then
16035 # The PID looks okay to me
16036 # Clean up any temporary files
16037 rm -f pid.stdout pid.stderr
16040 echo The environment variable CVS_PID is not properly set.
16041 echo It should have been set to \'\$ppid\' but instead was \'\$CVS_PID\'
16042 echo It is possible that this test is broken for your host.
16043 echo Current pid: \$pid
16044 [ -n "\$pidcmd" ] && echo "Command: \$pidcmd"
16045 [ -s pid.stdout ] && echo Standard Out: && cat pid.stdout
16046 [ -s pid.stderr ] && echo Standard Error: && cat pid.stderr
16050 echo The environment variable CVS_PID is not set.
16054 if test -n "$remotehost"; then
16055 $CVS_RSH $remotehost "chmod +x ${TESTDIR}/env/test-cvs-pid"
16057 chmod +x
${TESTDIR}/env
/test-cvs-pid
16060 echo "^env ${TESTDIR}/env/test-cvs-pid %r/%p %s" >>commitinfo
16061 dotest env-2
"${testcvs} -q ci -m test-pid commitinfo" \
16062 "${CVSROOT_DIRNAME}/CVSROOT/commitinfo,v <-- commitinfo
16063 new revision: 1\.2; previous revision: 1\.1
16064 ${SPROG} commit: Rebuilding administrative file database"
16067 dotest env-3
"${testcvs} -q add env" \
16068 "Directory ${CVSROOT_DIRNAME}/env added to the repository"
16070 echo testing
>file1
16071 dotest env-4
"${testcvs} add file1" \
16072 "${SPROG} add: scheduling file .file1. for addition
16073 ${SPROG} add: use .${SPROG} commit. to add this file permanently"
16074 dotest env-5
"${testcvs} -q commit -m test-pid" \
16075 "${CVSROOT_DIRNAME}/env/file1,v <-- file1
16076 initial revision: 1\.1"
16079 # undo commitinfo changes
16082 rm -fr $TESTDIR/env
16083 modify_repo
rm -rf $CVSROOT_DIRNAME/env
16089 modify_repo mkdir
$CVSROOT_DIRNAME/1dir
16092 dotest errmsg1-init-1
"$testcvs -Q co 1dir"
16095 dotest errmsg-init-2
"$testcvs -Q add foo"
16096 if ${testcvs} ci
-m added
>>${LOGFILE} 2>&1; then
16104 if ${testcvs} -q co
1dir
>>${LOGFILE}; then
16112 if ${testcvs} rm foo
>>${LOGFILE} 2>&1; then
16117 if ${testcvs} ci
-m removed
>>${LOGFILE} 2>&1; then
16124 # The second case in the local and remote versions of errmsg1-168
16125 # below happens on Cygwin under Windows, where write privileges
16126 # aren't enforced properly.
16128 dotest errmsg1-168r
"${testcvs} -q update" \
16129 "${SPROG} update: \`foo' is no longer in the repository
16130 $CPROG update: unable to remove \./foo: Permission denied" \
16131 "${SPROG} update: \`foo' is no longer in the repository"
16133 dotest errmsg1-168
"${testcvs} -q update" \
16134 "${SPROG} update: \`foo' is no longer in the repository
16135 ${SPROG} update: unable to remove foo: Permission denied" \
16136 "${SPROG} update: \`foo' is no longer in the repository"
16144 modify_repo
rm -rf $CVSROOT_DIRNAME/1dir
16150 # More tests of various miscellaneous error handling,
16151 # and cvs add behavior in general.
16152 # See also test basicb-4a, concerning "cvs ci CVS".
16153 # Too many tests to mention test the simple cases of
16154 # adding files and directories.
16155 # Test basicb-2a10 tests cvs -n add.
16157 # First the usual setup; create a directory first-dir.
16159 dotest errmsg2-1
"$testcvs -q co -l ."
16161 dotest errmsg2-2
"${testcvs} add first-dir" \
16162 "Directory ${CVSROOT_DIRNAME}/first-dir added to the repository"
16164 dotest_fail errmsg2-3
"${testcvs} add CVS" \
16165 "${CPROG} add: cannot add special file .CVS.; skipping"
16167 # For the most part add returns a failure exitstatus if
16168 # there are any errors, even if the remaining files are
16169 # processed without incident. The "cannot add
16170 # special file" message fits this pattern, at
16172 dotest_fail errmsg2-4
"${testcvs} add CVS file1" \
16173 "${CPROG} add: cannot add special file .CVS.; skipping
16174 ${SPROG} add: scheduling file .file1. for addition
16175 ${SPROG} add: use .${SPROG} commit. to add this file permanently"
16176 # I'm not sure these tests completely convey the various strange
16177 # behaviors that CVS had before it specially checked for "." and
16178 # "..". Suffice it to say that these are unlikely to work right
16179 # without a special case.
16180 dotest_fail errmsg2-5
"${testcvs} add ." \
16181 "${CPROG} add: cannot add special file .\..; skipping"
16182 dotest_fail errmsg2-6
"${testcvs} add .." \
16183 "${CPROG} add: cannot add special file .\.\..; skipping"
16184 # Make sure that none of the error messages left droppings
16185 # which interfere with normal operation.
16186 dotest errmsg2-7
"${testcvs} -q ci -m add-file1" \
16187 "$CVSROOT_DIRNAME/first-dir/file1,v <-- file1
16188 initial revision: 1\.1"
16191 dotest errmsg2-8
"${testcvs} add first-dir/sdir" \
16192 "Directory ${CVSROOT_DIRNAME}/first-dir/sdir added to the repository"
16193 # while we're here... check commit with no CVS directory
16194 dotest_fail errmsg2-8a
"${testcvs} -q ci first-dir nonexistant" \
16195 "${CPROG} commit: nothing known about .nonexistant'
16196 ${CPROG} \[commit aborted\]: correct above errors first!"
16197 dotest_fail errmsg2-8b
"$testcvs -q ci nonexistant first-dir" \
16198 "$CPROG commit: nothing known about .nonexistant'
16199 $CPROG \[commit aborted\]: correct above errors first!"
16200 dotest errmsg2-8c
"$testcvs -q ci first-dir"
16206 dotest errmsg2-10
"${testcvs} add file10 sdir10" \
16207 "${SPROG} add: scheduling file .file10. for addition
16208 Directory ${CVSROOT_DIRNAME}/first-dir/sdir10 added to the repository
16209 ${SPROG} add: use .${SPROG} commit. to add this file permanently"
16210 dotest errmsg2-11
"${testcvs} -q ci -m add-file10" \
16211 "$CVSROOT_DIRNAME/first-dir/file10,v <-- file10
16212 initial revision: 1\.1"
16213 # Try to see that there are no droppings left by
16214 # any of the previous tests.
16215 dotest errmsg2-12
"${testcvs} -q update" ""
16217 # Now test adding files with '/' in the name, both one level
16218 # down and more than one level down.
16220 mkdir first-dir
/sdir10
/ssdir
16221 dotest errmsg2-13
"${testcvs} add first-dir/sdir10/ssdir" \
16222 "Directory ${CVSROOT_DIRNAME}/first-dir/sdir10/ssdir added to the repository"
16224 touch first-dir
/sdir10
/ssdir
/ssfile
16225 dotest errmsg2-14 \
16226 "${testcvs} add first-dir/sdir10/ssdir/ssfile" \
16227 "${SPROG} add: scheduling file .first-dir/sdir10/ssdir/ssfile. for addition
16228 ${SPROG} add: use .${SPROG} commit. to add this file permanently"
16229 touch first-dir
/file15
16230 dotest errmsg2-15
"${testcvs} add first-dir/file15" \
16231 "${SPROG} add: scheduling file .first-dir/file15. for addition
16232 ${SPROG} add: use .${SPROG} commit. to add this file permanently"
16234 # Now the case where we try to give it a directory which is not
16235 # under CVS control.
16237 touch bogus-dir
/file16
16238 # FIXCVS: The first message, from local CVS, is nice. The second one
16239 # is not nice; would be good to fix remote CVS to give a clearer
16240 # message (e.g. the one from local CVS). But at least it is an
16242 dotest_fail errmsg2-16
"${testcvs} add bogus-dir/file16" \
16243 "${SPROG} add: in directory \`bogus-dir':
16244 ${SPROG} \[add aborted\]: there is no version here; do .${SPROG} checkout. first" \
16245 "${CPROG} add: cannot open CVS/Entries for reading: No such file or directory
16246 ${CPROG} \[add aborted\]: no repository"
16249 # One error condition we don't test for is trying to add a file
16250 # or directory which already is there.
16252 dotest errmsg2-17
"${testcvs} -q ci -m checkin" \
16253 "$CVSROOT_DIRNAME/first-dir/file15,v <-- first-dir/file15
16254 initial revision: 1\.1
16255 $CVSROOT_DIRNAME/first-dir/sdir10/ssdir/ssfile,v <-- first-dir/sdir10/ssdir/ssfile
16256 initial revision: 1\.1"
16257 dotest errmsg2-18
"${testcvs} -Q tag test" ''
16259 # trying to import the repository
16261 if $remote; then :; else
16262 cd ${CVSROOT_DIRNAME}
16263 dotest_fail errmsg2-20
"${testcvs} import -mtest . A B" \
16264 "${SPROG} \[import aborted\]: attempt to import the repository"
16265 dotest_fail errmsg2-21
"${testcvs} import -mtest first-dir A B" \
16266 "${SPROG} \[import aborted\]: attempt to import the repository"
16272 modify_repo
rm -rf $CVSROOT_DIRNAME/first-dir
16278 # Test the *PANIC* message caused by missing administration files
16282 dotest_fail errmsg3-1
"${testcvs} -q up" \
16283 "${CPROG} update: in directory \`.':
16284 ${CPROG} update: CVS directory found without administrative files\.
16285 ${CPROG} update: Use CVS to create the CVS directory, or rename the
16286 ${CPROG} update: directory if it is intended to store something
16287 ${CPROG} update: besides CVS administrative files\.
16288 ${CPROG} \[update aborted\]: \*PANIC\* administration files missing!"
16298 # Ensure that cvs update -p FILE > /dev/full fails
16299 # Perform this test IFF /dev/full is a writable character device.
16300 if test -w /dev
/full
&& test -c /dev
/full
; then
16304 dotest close-stdout-1
"$testcvs -Q import -m. closeout X Y" ''
16305 dotest close-stdout-2
"$testcvs -Q co closeout" ''
16306 # Match either a bare `write error' or
16307 # `write error: No space left on device',
16308 # since closeout.c can produce both.
16309 dotest_fail close-stdout-3 \
16310 "${testcvs} -Q update -p closeout/file > /dev/full" \
16311 "${CPROG} \[update aborted\]: write error.*"
16316 modify_repo
rm -rf $CVSROOT_DIRNAME/closeout
16318 skip close-stdout
'/dev/full is not available'
16324 debug-log-nonfatal
)
16325 # Once upon a time, failure to create the debug log could be fatal.
16326 if $remote; then :; else
16327 remoteonly debug-log-nonfatal
16331 mkdir
$TESTDIR/unwritable
16332 chmod a-w
$TESTDIR/unwritable
16333 if test -n "$CVS_CLIENT_LOG"; then
16334 save_CVS_CLIENT_LOG
=$CVS_CLIENT_LOG
16336 CVS_CLIENT_LOG
=$TESTDIR/unwritable
/cvsclientlog
16337 export CVS_CLIENT_LOG
16339 dotest debug-log-nonfatal-1 \
16340 "$testcvs -Q co -p CVSROOT/config >/dev/null" \
16341 "$CPROG checkout: opening to-server logfile $TESTDIR/unwritable/cvsclientlog.in: Permission denied
16342 $CPROG checkout: opening from-server logfile $TESTDIR/unwritable/cvsclientlog.out: Permission denied"
16345 rm -rf $TESTDIR/unwritable
16346 unset CVS_CLIENT_LOG
16347 if test -n "$save_CVS_CLIENT_LOG"; then
16348 CVS_CLIENT_LOG
=$save_CVS_CLIENT_LOG
16355 # Test some of the error messages the 'add' command can return and
16356 # their reactions to '-q'.
16358 # First the usual setup; create a directory first-dir.
16360 dotest adderrmsg-init1
"${testcvs} -q co -l ." ''
16361 mkdir adderrmsg-dir
16362 dotest adderrmsg-init2
"${testcvs} add adderrmsg-dir" \
16363 "Directory ${CVSROOT_DIRNAME}/adderrmsg-dir added to the repository"
16366 # try to add the admin dir
16367 dotest_fail adderrmsg-1
"${testcvs} add CVS" \
16368 "${CPROG} add: cannot add special file .CVS.; skipping"
16369 # might not want to see this message when you 'cvs add *'
16370 dotest_fail adderrmsg-2
"${testcvs} -q add CVS" ""
16372 # to test some other messages
16374 dotest adderrmsg-3
"${testcvs} add file1" \
16375 "${SPROG} add: scheduling file .file1. for addition
16376 ${SPROG} add: use .${SPROG} commit. to add this file permanently"
16379 dotest_fail adderrmsg-4
"${testcvs} add file1" \
16380 "${SPROG} add: \`file1' has already been entered"
16381 dotest_fail adderrmsg-5
"${testcvs} -q add file1" ""
16383 dotest adderrmsg-6
"${testcvs} -q ci -madd" \
16384 "$CVSROOT_DIRNAME/adderrmsg-dir/file1,v <-- file1
16385 initial revision: 1\.1"
16387 # file in Entries & repository
16388 dotest_fail adderrmsg-7
"${testcvs} add file1" \
16389 "${SPROG} add: \`file1' already exists, with version number 1\.1"
16390 dotest_fail adderrmsg-8
"${testcvs} -q add file1" ""
16396 modify_repo
rm -rf $CVSROOT_DIRNAME/adderrmsg-dir
16402 # Test some option parsing error messages
16404 # No init is necessary since these error messages are printed b4
16405 # CVS looks for a sandbox or repository
16407 # -z used to accept non-numeric arguments. This bit someone who
16408 # attempted `cvs -z -n up' when the -n was read as the argument to
16410 dotest_fail opterrmsg-1
"${testcvs} -z -n up" \
16411 "${CPROG}: gzip compression level must be between 0 and 9"
16413 # Some general -z checks
16414 dotest_fail opterrmsg-2
"${testcvs} -z -1 up" \
16415 "${CPROG}: gzip compression level must be between 0 and 9"
16416 dotest_fail opterrmsg-3
"${testcvs} -z10 up" \
16417 "${CPROG}: gzip compression level must be between 0 and 9"
16423 modify_repo mkdir
$CVSROOT_DIRNAME/first-dir
16426 dotest devcom-1
"$testcvs -q co first-dir"
16430 dotest devcom-2
"$testcvs add abb" \
16431 "$SPROG add: scheduling file \`abb' for addition
16432 $SPROG add: use \`$SPROG commit' to add this file permanently"
16434 dotest devcom-3
"$testcvs -q ci -m added" \
16435 "$CVSROOT_DIRNAME/first-dir/abb,v <-- abb
16436 initial revision: 1\.1"
16438 dotest_fail devcom-4
"$testcvs watch" "Usage$DOTSTAR"
16440 dotest devcom-5
"$testcvs watch on"
16443 dotest devcom-6
"$testcvs add abc" \
16444 "$SPROG add: scheduling file \`abc' for addition
16445 $SPROG add: use \`$SPROG commit' to add this file permanently"
16447 dotest devcom-7
"$testcvs -q ci -m added" \
16448 "$CVSROOT_DIRNAME/first-dir/abc,v <-- abc
16449 initial revision: 1\.1"
16455 dotest devcom-8
"$testcvs -q co first-dir" \
16460 dotest_fail devcom-9
"test -w abb"
16461 dotest_fail devcom-9b
"test -w abc"
16463 dotest devcom-10
"$testcvs editors"
16464 dotest devcom-11
"$testcvs edit abb"
16466 # Here we test for the traditional ISO C ctime() date format.
16467 # We assume the C locale; I guess that works provided we set
16468 # LC_ALL at the start of this script but whether these
16469 # strings should vary based on locale does not strike me as
16471 dotest devcom-12
"$testcvs editors" \
16472 "abb ${username} [SMTWF][uoehra][neduit] [JFAMSOND][aepuco][nbrylgptvc] [0-9 ][0-9] [0-9:]* [0-9][0-9][0-9][0-9] -0000 [-a-zA-Z_.0-9]* ${TESTDIR}/2/first-dir"
16475 dotest devcom-13
"$testcvs ci -m modify abb" \
16476 "${CVSROOT_DIRNAME}/first-dir/abb,v <-- abb
16477 new revision: 1\.2; previous revision: 1\.1"
16479 # Unedit of a file not being edited should be a noop.
16480 dotest devcom-14
"$testcvs unedit abb" ''
16482 dotest devcom-15
"$testcvs editors" ""
16484 dotest_fail devcom-16
"test -w abb"
16486 dotest devcom-17
"$testcvs edit abc"
16488 # Unedit of an unmodified file.
16489 dotest devcom-18
"$testcvs unedit abc"
16490 dotest devcom-19
"$testcvs edit abc"
16492 echo changedabc
>abc
16493 # Try to unedit a modified file; cvs should ask for confirmation
16494 dotest devcom-20
"echo no | $testcvs unedit abc" \
16495 "abc has been modified; revert changes? "
16497 dotest devcom-21
"echo changedabc | cmp - abc"
16499 # OK, now confirm the unedit
16500 dotest devcom-22
"echo yes |$testcvs unedit abc" \
16501 "abc has been modified; revert changes? "
16503 dotest devcom-23
"echo abc |cmp - abc"
16505 dotest devcom-24
"$testcvs watchers" ''
16507 # FIXME: This probably should be an error message instead
16508 # of silently succeeding and printing nothing.
16509 dotest devcom-a-nonexist
"$testcvs watchers nonexist" ''
16511 dotest devcom-a1
"$testcvs watch add" ''
16512 dotest devcom-a2
"$testcvs watchers" \
16513 "abb $username edit unedit commit
16514 abc $username edit unedit commit"
16515 dotest devcom-a3
"$testcvs watch remove -a unedit abb" ''
16516 dotest devcom-a4
"$testcvs watchers abb" \
16517 "abb $username edit commit"
16519 # Check tagging and checking out while we have a CVS
16520 # directory in the repository.
16521 dotest devcom-t0
"${testcvs} -q tag tag" \
16528 # Test commented out because the bug it tests for is not fixed
16530 # cvs watchers: cannot open CVS/Entries for reading: No such file or directory
16531 # cvs: ../../work/ccvs/src/fileattr.c:75: fileattr_read: Assertion `fileattr_stored_repos != ((void *)0)' failed.
16532 : dotest devcom-t-nonexist
"${testcvs} watchers nonexist" fixme
16534 dotest devcom-t1
"${testcvs} -q co -rtag first-dir/abb" \
16537 # Since first-dir/abb is readonly, use -f.
16540 # Test checking out the directory rather than the file.
16543 dotest devcom-t2
"${testcvs} -q co -rtag first-dir" \
16547 # Since the files are readonly, use -f.
16550 # Now do it again, after removing the val-tags file created
16551 # by devcom-t1 to force CVS to search the repository
16552 # containing CVS directories.
16553 rm ${CVSROOT_DIRNAME}/CVSROOT
/val-tags
16556 dotest devcom-t3
"${testcvs} -q co -rtag first-dir" \
16560 # Since the files are readonly, use -f.
16563 # Now remove all the file attributes
16565 dotest devcom-b0
"${testcvs} watch off" ''
16566 dotest devcom-b1
"${testcvs} watch remove" ''
16567 # Test that CVS 1.6 and earlier can handle the repository.
16568 dotest_fail devcom-b2
"test -d ${CVSROOT_DIRNAME}/first-dir/CVS"
16570 # Now test watching just some, not all, files.
16571 dotest devcom-some0
"${testcvs} watch on abc" ''
16575 dotest devcom-some1
"${testcvs} -q co first-dir" 'U first-dir/abb
16577 dotest devcom-some2
"test -w first-dir/abb" ''
16578 dotest_fail devcom-some3
"test -w first-dir/abc" ''
16582 # Use -f because of the readonly files.
16584 modify_repo
rm -rf $CVSROOT_DIRNAME/first-dir
16590 # More watch tests, most notably setting watches on
16591 # files in various different states.
16592 modify_repo mkdir
$CVSROOT_DIRNAME/first-dir
16595 dotest devcom2-1
"${testcvs} -q co first-dir" ''
16598 # This should probably be an error; setting a watch on a totally
16599 # unknown file is more likely to be a typo than intentional.
16600 # But that isn't the currently implemented behavior.
16601 dotest devcom2-2
"${testcvs} watch on w1" ''
16604 dotest devcom2-3
"${testcvs} add w1 w2 w3 nw1" "${DOTSTAR}"
16605 # Letting the user set the watch here probably can be considered
16606 # a feature--although it leads to a few potentially strange
16607 # consequences like one user can set the watch and another actually
16609 dotest devcom2-4
"${testcvs} watch on w2" ''
16610 dotest devcom2-5
"${testcvs} -Q ci -m add-them"
16612 # Note that this test differs in a subtle way from devcom-some0;
16613 # in devcom-some0 the watch is creating a new fileattr file, and
16614 # here we are modifying an existing one.
16615 dotest devcom2-6
"${testcvs} watch on w3" ''
16617 # Now test that all the watches got set on the correct files
16618 # FIXME: CVS should have a way to report whether watches are
16619 # set, I think. The "check it out and see if it read-only" is
16620 # sort of OK, but is complicated by CVSREAD and doesn't help
16621 # if the file is added and not yet committed or some such.
16622 # Probably "cvs status" should report "watch: on" if watch is on
16623 # (and nothing if watch is off, so existing behavior is preserved).
16627 dotest devcom2-7
"${testcvs} -q co first-dir" 'U first-dir/nw1
16631 dotest devcom2-8
"test -w first-dir/nw1" ''
16632 dotest_fail devcom2-9
"test -w first-dir/w1" ''
16633 dotest_fail devcom2-10
"test -w first-dir/w2" ''
16634 dotest_fail devcom2-11
"test -w first-dir/w3" ''
16637 # OK, now we want to try files in various states with cvs edit.
16638 dotest_fail devcom2-12
"$testcvs edit w4" \
16639 "${CPROG} edit: no such file w4; ignored"
16640 # Try the same thing with a per-directory watch set.
16641 dotest devcom2-13
"${testcvs} watch on" ''
16642 dotest_fail devcom2-14
"$testcvs edit w5" \
16643 "${CPROG} edit: no such file w5; ignored"
16644 dotest devcom2-15
"${testcvs} editors" ''
16645 dotest devcom2-16
"${testcvs} editors w4" ''
16646 # Make sure there are no droppings lying around
16647 dotest devcom2-17
"cat ${CVSROOT_DIRNAME}/first-dir/CVS/fileattr" \
16655 # Do a little error testing
16656 dotest devcom2-18
"${testcvs} -q co -d first+dir first-dir" \
16657 "U first${PLUS}dir/nw1
16658 U first${PLUS}dir/w1
16659 U first${PLUS}dir/w2
16660 U first${PLUS}dir/w3"
16662 dotest_fail devcom2-19
"${testcvs} edit" \
16663 "${CPROG} \[edit aborted\]: current directory (${TESTDIR}/2/first${PLUS}dir) contains an invalid character (${PLUS},>;=\\\\t\\\\n)"
16665 # Make sure there are no droppings lying around
16666 dotest devcom2-20
"cat ${CVSROOT_DIRNAME}/first-dir/CVS/fileattr" \
16675 # Use -f because of the readonly files.
16677 modify_repo
rm -rf $CVSROOT_DIRNAME/first-dir
16683 # More watch tests, most notably handling of features designed
16684 # for future expansion.
16685 modify_repo mkdir
$CVSROOT_DIRNAME/first-dir
16689 # Set up logging via the postwatch script hook. See the `info' test
16690 # for a list of tests where other script hooks are tested.
16691 dotest devcom3-init-1
"$testcvs -Q co CVSROOT"
16693 echo "ALL $TESTDIR/1/loggit %r %p %c" >>postwatch
16694 dotest devcom3-init-2
"$testcvs -Q ci -mlog-watch"
16699 echo \${1+"\$@"} >>$TESTDIR/1/watch-log
16702 if test -n "$remotehost"; then
16703 $CVS_RSH $remotehost "chmod +x $TESTDIR/1/loggit"
16710 dotest devcom3-1
"$testcvs -q co first-dir"
16714 dotest devcom3-2
"${testcvs} add w1 w2" "${DOTSTAR}"
16715 dotest devcom3-3
"${testcvs} watch on w1 w2" ''
16716 dotest devcom3-4
"${testcvs} -Q ci -m add-them"
16718 # OK, since we are about to delve into CVS's internals, make
16719 # sure that we seem to be correct about how they work.
16720 dotest devcom3-5
"cat ${CVSROOT_DIRNAME}/first-dir/CVS/fileattr" \
16723 # Now write a few more lines, just as if we were a newer version
16724 # of CVS implementing some new feature.
16725 cat <<'EOF' >>${CVSROOT_DIRNAME}/first-dir/CVS/fileattr
16729 # Now get CVS to write to the fileattr file....
16730 dotest devcom3-6
"${testcvs} watch off w1" ''
16731 # ...and make sure that it hasn't clobbered our new lines.
16732 # Note that writing these lines in another order would be OK
16734 dotest devcom3-7
"cat ${CVSROOT_DIRNAME}/first-dir/CVS/fileattr" \
16739 # See what CVS does when a file name is duplicated. The
16740 # behavior of all versions of CVS since file attributes were
16741 # implemented is that it nukes the duplications. This seems
16742 # reasonable enough, although it means it isn't clear how
16743 # useful duplicates would be for purposes of future
16744 # expansion. But in the interests of keeping behaviors
16745 # predictable, might as well test for it, I guess.
16746 echo 'Fw2 duplicate=' >>${CVSROOT_DIRNAME}/first-dir
/CVS
/fileattr
16747 dotest devcom3-8
"${testcvs} watch on w1" ''
16748 dotest devcom3-9
"cat ${CVSROOT_DIRNAME}/first-dir/CVS/fileattr" \
16754 # Now test disconnected "cvs edit" and the format of the
16757 CVS_SERVER_save
=$CVS_SERVER
16758 CVS_SERVER
=$TESTDIR/cvs-none
; export CVS_SERVER
16760 # The ${DOTSTAR} below matches the exact CVS server error message,
16761 # which in :fork: mode is:
16762 # "$SPROG \[edit aborted\]: cannot exec $TESTDIR/cvs-none: ${DOTSTAR}",
16764 # "bash2: line 1: $TESTDIR/cvs-none: No such file or directory"
16765 # when testing across an :ext:/ssh link to my Linux 2.4 box.
16767 # I can't even test for the second part of the error message,
16768 # from the client, which varies more consistently, usually either
16769 # "end of file from server" (if the process doing the exec exits
16770 # before the parent gets around to sending data to it) or
16771 # "received broken pipe signal" (if it is the other way around),
16772 # since HP-UX fails to output it.
16773 dotest_fail devcom3-9ar
"$testcvs edit w1 2>/dev/null"
16774 dotest devcom3-9br
"test -w w1"
16775 dotest devcom3-9cr
"cat CVS/Notify" \
16776 "Ew1 [SMTWF][uoehra][neduit] [JFAMSOND][aepuco][nbrylgptvc] [0-9 ][0-9] [0-9:]* [0-9][0-9][0-9][0-9] -0000 [-a-zA-Z_.0-9]* ${TESTDIR}/1/first-dir EUC"
16777 CVS_SERVER
=${CVS_SERVER_save}; export CVS_SERVER
16779 dotest_fail devcom3-9dp
"$testcvs -q update" \
16780 "This CVS server does not support disconnected \`cvs edit'\. For now, remove all \`CVS/Notify' files in your workspace and try your command again\."
16781 dotest devcom3-9ep
"test -f CVS/Notify"
16783 dotest devcom3-9hp
"$testcvs watchers w1"
16785 dotest devcom3-9dr
"$testcvs -q update"
16786 dotest_fail devcom3-9er
"test -f CVS/Notify"
16787 dotest devcom3-9fr
"$testcvs watchers w1" \
16788 "w1 $username tedit tunedit tcommit"
16790 dotest devcom3-9gr
"$testcvs unedit w1"
16791 dotest devcom3-9hr
"$testcvs watchers w1"
16795 # OK, now change the tab to a space, and see that CVS gives
16796 # a reasonable error (this is database corruption but CVS should
16797 # not lose its mind).
16798 sed -e 's/Fw2 /Fw2 /' <$CVSROOT_DIRNAME/first-dir
/CVS
/fileattr \
16799 >$CVSROOT_DIRNAME/first-dir
/CVS
/fileattr.new
16800 modify_repo
mv $CVSROOT_DIRNAME/first-dir
/CVS
/fileattr.new \
16801 $CVSROOT_DIRNAME/first-dir
/CVS
/fileattr
16803 dotest_fail devcom3-10
"${testcvs} -Q co ." \
16804 "${SPROG} \[checkout aborted\]: file attribute database corruption: tab missing in ${CVSROOT_DIRNAME}/first-dir/CVS/fileattr"
16808 if $proxy; then :; else
16812 if $notifyworks; then
16813 dotest devcom3-postwatch-examine-1r
"cat $TESTDIR/1/watch-log" \
16814 "$CVSROOT_DIRNAME first-dir watch
16815 $CVSROOT_DIRNAME first-dir watch
16816 $CVSROOT_DIRNAME first-dir watch
16817 $CVSROOT_DIRNAME first-dir update
16818 $CVSROOT_DIRNAME first-dir server"
16820 dotest devcom3-postwatch-examine-1
"cat $TESTDIR/1/watch-log" \
16821 "$CVSROOT_DIRNAME first-dir watch
16822 $CVSROOT_DIRNAME first-dir watch
16823 $CVSROOT_DIRNAME first-dir watch"
16829 # Use -f because of the readonly files.
16831 modify_repo
rm -rf $CVSROOT_DIRNAME/first-dir
16837 # More watch tests, including adding directories.
16839 dotest watch4-0a
"${testcvs} -q co -l ." ''
16841 dotest watch4-0b
"${testcvs} add first-dir" \
16842 "Directory ${CVSROOT_DIRNAME}/first-dir added to the repository"
16845 dotest watch4-1
"${testcvs} watch on" ''
16846 # This is just like the 173 test
16848 dotest watch4-2
"$testcvs add file1" \
16849 "$SPROG add: scheduling file .file1. for addition
16850 $SPROG add: use .$SPROG commit. to add this file permanently"
16851 dotest watch4-3
"$testcvs -q ci -m add" \
16852 "$CVSROOT_DIRNAME/first-dir/file1,v <-- file1
16853 initial revision: 1\.1"
16854 # Now test the analogous behavior for directories.
16856 dotest watch4-4
"${testcvs} add subdir" \
16857 "Directory ${CVSROOT_DIRNAME}/first-dir/subdir added to the repository"
16860 dotest watch4-5
"${testcvs} add sfile" \
16861 "${SPROG} add: scheduling file .sfile. for addition
16862 ${SPROG} add: use .${SPROG} commit. to add this file permanently"
16863 dotest watch4-6
"${testcvs} -q ci -m add" \
16864 "$CVSROOT_DIRNAME/first-dir/subdir/sfile,v <-- sfile
16865 initial revision: 1\.1"
16868 dotest watch4-7
"${testcvs} -q co first-dir" "U first-dir/file1
16869 U first-dir/subdir/sfile"
16870 dotest_fail watch4-8
"test -w first-dir/file1" ''
16871 dotest_fail watch4-9
"test -w first-dir/subdir/sfile" ''
16873 dotest watch4-10
"${testcvs} edit file1" ''
16874 echo 'edited in 2' >file1
16879 # NOTE: I'm leaving in '' as acceptable
16880 # to maintain partial compatibility with CVS versions
16881 # prior to the edit check patch.
16882 editorsLineRE
="file1 $username [SMTWF][uoehra][neduit] [JFAMSOND][aepuco][nbrylgptvc] [0-9 ][0-9] [0-9:]* [0-9][0-9][0-9][0-9] -0000 $hostname $TESTDIR/2/first-dir"
16883 dotest watch4-11
"$testcvs edit file1" "$editorsLineRE"
16885 echo 'edited in 1' >file1
16886 dotest watch4-12
"${testcvs} -q ci -m edit-in-1" \
16887 "$CVSROOT_DIRNAME/first-dir/file1,v <-- file1
16888 new revision: 1\.2; previous revision: 1\.1"
16891 dotest watch4-13
"${testcvs} -q update" \
16892 "RCS file: ${CVSROOT_DIRNAME}/first-dir/file1,v
16893 retrieving revision 1\.1
16894 retrieving revision 1\.2
16895 Merging differences between 1\.1 and 1\.2 into file1
16896 rcsmerge: warning: conflicts during merge
16897 ${SPROG} update: conflicts found in file1
16899 if (echo yes |
${testcvs} unedit file1
) >>${LOGFILE}; then
16904 # This could plausibly be defined to either go back to the revision
16905 # which was cvs edit'd (the status quo), or back to revision 1.2
16906 # (that is, the merge could update CVS/Base/file1). We pick the
16907 # former because it is easier to implement, not because we have
16908 # thought much about which is better.
16909 dotest watch4-16
"cat file1" ''
16910 # Make sure CVS really thinks we are at 1.1.
16911 dotest watch4-17
"${testcvs} -q update" "U file1"
16912 dotest watch4-18
"cat file1" "edited in 1"
16915 # As a sanity check, make sure we are in the right place.
16916 dotest watch4-cleanup-1
"test -d 1"
16917 dotest watch4-cleanup-1
"test -d 2"
16920 # Specify -f because of the readonly files.
16922 modify_repo
rm -rf $CVSROOT_DIRNAME/first-dir
16928 # This test was designed to catch a problem in server
16929 # mode where an 'cvs edit'd file disappeared from the
16930 # CVS/Base directory when 'cvs status' or 'cvs update'
16931 # was called on the file after the file was touched.
16933 # This test is still here to prevent the bug from
16934 # being reintroduced.
16936 # The rationale for having CVS/Base stay around is that
16937 # CVS/Base should be there if "cvs edit" has been run (this
16938 # may be helpful as a "cvs editors" analogue, it is
16939 # client-side and based on working directory not username;
16940 # but more importantly, it isn't clear why a "cvs status"
16941 # would act like an unedit, and even if it does, it would
16942 # need to make the file read-only again).
16944 mkdir watch5
; cd watch5
16945 dotest watch5-0a
"${testcvs} -q co -l ." ''
16947 dotest watch5-0b
"${testcvs} add first-dir" \
16948 "Directory ${CVSROOT_DIRNAME}/first-dir added to the repository"
16951 dotest watch5-1
"${testcvs} watch on" ''
16952 # This is just like the 173 test
16954 dotest watch5-2
"${testcvs} add file1" \
16955 "${SPROG} add: scheduling file .file1. for addition
16956 ${SPROG} add: use .${SPROG} commit. to add this file permanently"
16957 dotest watch5-3
"${testcvs} -q ci -m add" \
16958 "$CVSROOT_DIRNAME/first-dir/file1,v <-- file1
16959 initial revision: 1\.1"
16960 dotest watch5-4
"${testcvs} edit file1" ''
16961 dotest watch5-5
"test -f CVS/Base/file1" ''
16962 if ${testcvs} status file1
>>${LOGFILE} 2>&1; then
16967 dotest watch5-7
"test -f CVS/Base/file1" ''
16969 # Here's where the file used to dissappear
16971 if ${testcvs} status file1
>>${LOGFILE} 2>&1; then
16976 dotest watch5-10
"test -f CVS/Base/file1" ''
16978 # Make sure update won't remove the file either
16980 dotest watch5-11
"${testcvs} -q up" ''
16981 dotest watch5-12
"test -f CVS/Base/file1" ''
16986 modify_repo
rm -rf $CVSROOT_DIRNAME/first-dir
16993 # Make sure that default attributes are being set properly.
16994 # Specifying a directory has, it seems, never worked,
16995 # and 1.12.10 broke it completely.
16996 mkdir watch6-0
; cd watch6-0
16998 dotest watch6-0-setup-1
"$testcvs -Q co -ldtop ."
17001 dotest watch6-0-setup-2
"$testcvs -Q add watch6-0"
17003 dotest watch6-0-1
"$testcvs watch add"
17004 dotest watch6-0-2
"grep -qE '^D' $CVSROOT_DIRNAME/watch6-0/CVS/fileattr"
17005 dotest watch6-0-3
"$testcvs watch remove"
17006 dotest_fail watch6-0-4
"grep -qE '^D' $CVSROOT_DIRNAME/watch6-0/CVS/fileattr 2>/dev/null"
17008 dotest watch6-0-5
"$testcvs watch add ."
17009 dotest watch6-0-6
"grep -qE '^D' $CVSROOT_DIRNAME/watch6-0/CVS/fileattr"
17010 dotest watch6-0-7
"$testcvs watch remove ."
17011 dotest_fail watch6-0-8
"grep -qE '^D' $CVSROOT_DIRNAME/watch6-0/CVS/fileattr 2>/dev/null"
17013 # OK, basic add/remove work. Now, make sure it works with named directories
17018 $testcvs -Q add afile dir1 dir2 dir3
17019 $testcvs -Q ci
-m "Adding test files"
17021 # Current directory should not be watched, but there should be a watch on the file,
17022 # and on dir1 & dir2, but not on dir3.
17023 dotest watch6-0-9
"$testcvs -Q watch add afile dir1 dir2"
17024 dotest_fail watch6-0-10
"grep -qE '^D' $CVSROOT_DIRNAME/watch6-0/CVS/fileattr 2>/dev/null"
17025 dotest watch6-0-11
"grep -qE '^Fafile' $CVSROOT_DIRNAME/watch6-0/CVS/fileattr"
17026 dotest watch6-0-12
"grep -qE '^D' $CVSROOT_DIRNAME/watch6-0/dir1/CVS/fileattr"
17027 dotest watch6-0-13
"grep -qE '^D' $CVSROOT_DIRNAME/watch6-0/dir2/CVS/fileattr"
17028 dotest_fail watch6-0-12
"grep -qE '^D' $CVSROOT_DIRNAME/watch6-0/dir3/CVS/fileattr 2>/dev/null"
17033 modify_repo
rm -rf $CVSROOT_DIRNAME/watch6-0
17039 # Check that `cvs watch on' does not reset the fileattr file.
17040 mkdir watch6
; cd watch6
17042 dotest watch6-setup-1
"$testcvs -Q co -ldtop ."
17045 dotest watch6-setup-2
"$testcvs -Q add watch6"
17047 # I don't recall why I had these next 3 lines.
17049 dotest watch6-setup-3
"$testcvs -Q co watch6"
17053 dotest watch6-setup-4
"$testcvs -Q add subdir"
17056 # START watch add/remove sequence
17057 dotest watch6-1
"$testcvs -Q watch add"
17059 "grep '_watchers' $CVSROOT_DIRNAME/watch6/subdir/CVS/fileattr >/dev/null"
17061 dotest watch6-3
"$testcvs watch on"
17063 "grep '_watchers' $CVSROOT_DIRNAME/watch6/subdir/CVS/fileattr >/dev/null"
17065 "grep '_watched' $CVSROOT_DIRNAME/watch6/subdir/CVS/fileattr >/dev/null"
17067 dotest watch6-6
"$testcvs watch off"
17069 "grep '_watchers' $CVSROOT_DIRNAME/watch6/subdir/CVS/fileattr >/dev/null"
17070 dotest_fail watch6-8 \
17071 "grep '_watched' $CVSROOT_DIRNAME/watch6/subdir/CVS/fileattr >/dev/null"
17073 dotest watch6-9
"$testcvs watch remove"
17074 dotest_fail watch6-10 \
17075 "test -d $CVSROOT_DIRNAME/test-directory/subdir/CVS"
17076 dotest_fail watch6-11 \
17077 "test -f $CVSROOT_DIRNAME/test-directory/subdir/CVS/fileattr"
17078 # END watch add/remove sequence
17080 echo Hi there
>afile
17081 dotest watch6-12
"$testcvs -Q add afile"
17082 dotest watch6-13
"$testcvs ci -m 'A file' afile" \
17083 "$CVSROOT_DIRNAME/watch6/subdir/afile,v <-- afile
17084 initial revision: 1.1"
17086 # START watch add/remove sequence
17087 dotest watch6-14
"$testcvs -Q watch add"
17089 "grep '_watchers' $CVSROOT_DIRNAME/watch6/subdir/CVS/fileattr >/dev/null"
17091 dotest watch6-16
"$testcvs watch on"
17093 "grep '_watchers' $CVSROOT_DIRNAME/watch6/subdir/CVS/fileattr >/dev/null"
17095 "grep '_watched' $CVSROOT_DIRNAME/watch6/subdir/CVS/fileattr >/dev/null"
17097 dotest watch6-19
"$testcvs watch off"
17099 "grep '_watchers' $CVSROOT_DIRNAME/watch6/subdir/CVS/fileattr >/dev/null"
17100 dotest_fail watch6-21 \
17101 "grep '_watched' $CVSROOT_DIRNAME/watch6/subdir/CVS/fileattr >/dev/null"
17103 dotest watch6-22
"$testcvs watch remove"
17104 dotest_fail watch6-23 \
17105 "test -d $CVSROOT_DIRNAME/test-directory/subdir/CVS"
17106 dotest_fail watch6-24 \
17107 "test -f $CVSROOT_DIRNAME/test-directory/subdir/CVS/fileattr"
17108 # END watch add/remove sequence
17111 echo Keeping
$TESTDIR and exiting due to
--keep
17116 modify_repo
rm -rf $CVSROOT_DIRNAME/watch6
17122 # This tests the edit -c/-f and related features.
17124 mkdir edit-check
; cd edit-check
17125 dotest edit-check-0a
"$testcvs -q co -l ."
17127 dotest edit-check-0b
"$testcvs add first-dir" \
17128 "Directory $CVSROOT_DIRNAME/first-dir added to the repository"
17131 dotest edit-check-1
"$testcvs watch on"
17134 dotest edit-check-2a
"$testcvs add -minitial file1" \
17135 "$SPROG [a-z]*: scheduling file .file1. for addition
17136 $SPROG [a-z]*: use .$SPROG commit. to add this file permanently"
17138 dotest edit-check-2b
"$testcvs commit -m 'c1' file1" \
17139 "$CVSROOT_DIRNAME/first-dir/file1,v <-- file1
17140 initial revision: 1\.1"
17142 editorsLineRE
="file1 $username [SMTWF][uoehra][neduit] [JFAMSOND][aepuco][nbrylgptvc] [0-9 ][0-9] [0-9:]* [0-9][0-9][0-9][0-9] -0000 $hostname $TESTDIR/edit-check/first-dir"
17144 R_editorsLineRE
="first-dir/file1 $username [SMTWF][uoehra][neduit] [JFAMSOND][aepuco][nbrylgptvc] [0-9 ][0-9] [0-9:]* [0-9][0-9][0-9][0-9] -0000 $hostname $TESTDIR/edit-check"
17145 F3_editorsLineRE
="second-dir/file3 $username [SMTWF][uoehra][neduit] [JFAMSOND][aepuco][nbrylgptvc] [0-9 ][0-9] [0-9:]* [0-9][0-9][0-9][0-9] -0000 $hostname $TESTDIR/edit-check/first-dir"
17147 A_editorsLineRE
="file1 [-a-zA-Z0-9_]* [SMTWF][uoehra][neduit] [JFAMSOND][aepuco][nbrylgptvc] [0-9 ][0-9] [0-9:]* [0-9][0-9][0-9][0-9] -0000 $hostname $TESTDIR[0-9]*/edit-check/first-dir"
17149 AF_editorsLineRE
="file[12] [-a-zA-Z0-9_]* [SMTWF][uoehra][neduit] [JFAMSOND][aepuco][nbrylgptvc] [0-9 ][0-9] [0-9:]* [0-9][0-9][0-9][0-9] -0000 $hostname $TESTDIR/edit-check/first-dir"
17151 NF_editorsLineRE
=" [-a-zA-Z0-9_]* [SMTWF][uoehra][neduit] [JFAMSOND][aepuco][nbrylgptvc] [0-9 ][0-9] [0-9:]* [0-9][0-9][0-9][0-9] -0000 $hostname $TESTDIR/edit-check/first-dir"
17153 dotest edit-check-3
"$testcvs edit file1"
17154 dotest edit-check-4
"$testcvs edit file1" "$editorsLineRE"
17156 dotest_fail edit-check-5a
"$testcvs edit -c file1" \
17158 $SPROG edit: Skipping file \`file1' due to existing editors\."
17160 dotest edit-check-5b
"$testcvs editors" "$editorsLineRE"
17162 dotest edit-check-6a
"$testcvs edit -c -f file1" "$editorsLineRE"
17163 dotest edit-check-6b
"$testcvs editors" "$editorsLineRE"
17165 dotest edit-check-7a
"cat file1" "foo"
17167 dotest_fail edit-check-7b
"$testcvs edit -c file1" \
17169 $SPROG edit: Skipping file \`file1' due to existing editors\."
17170 dotest edit-check-7c
"cat file1" "bar"
17172 # edit-check-8a has issues. It copies the current (modified)
17173 # version of the file into CVS/Base, so that edit-check-9a and
17174 # edit-check-9b don't get the expected results.
17175 # Maybe unedit is *supposed* to return it to the state
17176 # it was in before the edit (even if it was modified),
17177 # but while that has a certain symetry, it doesn't seem
17178 # to pass the intuitive-usability test.
17179 # This aspect of the general problem could
17180 # be fixed by not overwriting pre-existing Base versions,
17181 # but it still wouldn't fix it if the user manually
17182 # modified the file before doing the first edit.
17183 # Because of the possibility that this is working as
17184 # intended, I'm just commenting out the test, not fixing
17186 #dotest edit-check-8a "${testcvs} edit -c -f file1" \
17187 # "${editorsLineRE}"
17188 dotest edit-check-8b
"$testcvs editors" "$editorsLineRE"
17190 dotest edit-check-9a
"echo yes | $testcvs unedit file1" \
17191 "file1 has been modified; revert changes? "
17192 dotest edit-check-9b
"$testcvs editors"
17193 dotest edit-check-9c
"cat file1" "foo"
17195 dotest edit-check-10
"$testcvs edit -c file1"
17196 dotest_fail edit-check-11
"$testcvs edit -c file1" \
17198 $SPROG edit: Skipping file \`file1' due to existing editors\."
17200 echo "morefoo" > file1
17201 dotest edit-check-12a
"$testcvs commit -m 'c2' -c file1" \
17202 "$CVSROOT_DIRNAME/first-dir/file1,v <-- file1
17203 new revision: 1\.2; previous revision: 1\.1"
17204 dotest edit-check-12b
"$testcvs editors file1"
17207 echo "morebar" > file1
17208 dotest_fail edit-check-13a
"$testcvs commit -m 'c3' -c file1" \
17209 "$SPROG [a-z]*: Valid edit does not exist for file1
17210 $SPROG \[[a-z]* aborted\]: correct above errors first!"
17211 dotest edit-check-13b
"$testcvs editors file1"
17213 dotest edit-check-14a
"$testcvs commit -m 'c4' -c -f file1" \
17214 "$CVSROOT_DIRNAME/first-dir/file1,v <-- file1
17215 new revision: 1\.3; previous revision: 1\.2"
17216 dotest edit-check-14b
"$testcvs editors file1"
17218 dotest edit-check-15
"$testcvs edit -c file1"
17221 dotest edit-check-16a
"echo yes | $testcvs release -d first-dir" \
17222 "You have \[0\] altered files in this repository.
17223 Are you sure you want to release (and delete) directory \`first-dir': "
17224 dotest edit-check-16b
"$testcvs -q update -d first-dir" \
17225 "U first-dir/file1"
17227 dotest edit-check-16c
"$testcvs editors file1"
17230 dotest edit-check-17a
"$testcvs edit -c"
17231 dotest_fail edit-check-17b
"$testcvs edit -c" \
17233 $SPROG edit: Skipping file \`first-dir/file1' due to existing editors\."
17234 dotest edit-check-17c
"$testcvs edit -c -f" "$R_editorsLineRE"
17236 echo "more changes" > first-dir
/file1
17237 dotest edit-check-18a
"$testcvs -q commit -m 'c5' -c" \
17238 "$CVSROOT_DIRNAME/first-dir/file1,v <-- first-dir/file1
17239 new revision: 1\.4; previous revision: 1\.3"
17240 dotest edit-check-18b
"$testcvs editors"
17244 # Manually fake another editor:
17246 # Try to gaurantee a seperate name for an "other" user editting
17248 otherUser
="dummyUser"
17249 if [ x
"$USER" = x
"$otherUser" ] ; then
17250 otherUser
="dummyUser2"
17252 if [ x
"$LOGNAME" = x
"$otherUser" ] ; then
17253 otherUser
="dummyUser3"
17257 backupFileattrName
="$CVSROOT_DIRNAME/first-dir/CVS/bak.fileattr.$$"
17258 mv $CVSROOT_DIRNAME/first-dir
/CVS
/fileattr
$backupFileattrName
17260 otherDir
="`pwd | sed 's%/edit-check/%2/edit-check/%'`"
17262 "Ffile1${tabChar}_watched=;_editors=$otherUser>Sat Oct 6 04:25:00 2001 -0000+`hostname`+$otherDir;_watchers=$otherUser>tedit+tunedit+tcommit
17263 D${tabChar}_watched=" > $CVSROOT_DIRNAME/first-dir
/CVS
/fileattr
17265 editFileattrName
="$CVSROOT_DIRNAME/first-dir/CVS/edit.fileattr.$$"
17266 cp $CVSROOT_DIRNAME/first-dir
/CVS
/fileattr
$editFileattrName
17268 O_editorsLineRE
="file1 $otherUser [SMTWF][uoehra][neduit] [JFAMSOND][aepuco][nbrylgptvc] [0-9 ][0-9] [0-9:]* [0-9][0-9][0-9][0-9] -0000 $hostname $TESTDIR[0-9]/edit-check/first-dir"
17270 dotest edit-check-19a
"$testcvs edit file1" "$O_editorsLineRE"
17271 dotest edit-check-19b
"$testcvs editors" \
17275 dotest edit-check-20a
"$testcvs unedit file1"
17276 dotest edit-check-20b
"$testcvs editors" "$O_editorsLineRE"
17278 dotest_fail edit-check-21a
"$testcvs edit -c file1" \
17280 $SPROG edit: Skipping file \`file1' due to existing editors\."
17281 dotest edit-check-21b
"$testcvs editors" "$O_editorsLineRE"
17283 dotest edit-check-22a
"$testcvs edit -c -f file1" "$O_editorsLineRE"
17284 dotest edit-check-22b
"$testcvs editors" \
17288 echo "Yet another change" >file1
17290 dotest_fail edit-check-23a
"$testcvs edit -c" \
17293 $SPROG edit: Skipping file \`file1' due to existing editors\."
17295 dotest edit-check-23b
"$testcvs editors" \
17299 dotest edit-check-24a
"echo y | $testcvs unedit" \
17300 "file1 has been modified; revert changes? "
17301 dotest edit-check-24b
"$testcvs editors" "$O_editorsLineRE"
17302 dotest edit-check-24c
"cat file1" "more changes"
17304 dotest edit-check-25a
"$testcvs unedit"
17305 dotest edit-check-25b
"$testcvs editors" "$O_editorsLineRE"
17306 dotest_fail edit-check-25c
"test -w file1"
17308 dotest edit-check-26a
"$testcvs edit file1" "$O_editorsLineRE"
17309 dotest edit-check-26b
"$testcvs editors file1" \
17312 dotest edit-check-26c
"test -w file1"
17314 echo "Yet more changes" >file1
17315 dotest edit-check-27a
"$testcvs -q commit -mmsg -c file1" \
17316 "$CVSROOT_DIRNAME/first-dir/file1,v <-- file1
17317 new revision: 1\.5; previous revision: 1\.4"
17318 dotest edit-check-27b
"$testcvs editors" "$O_editorsLineRE"
17321 echo "unofficial change" >file1
17323 dotest_fail edit-check-28a
"$testcvs -q commit -mmsg -c" \
17324 "$SPROG commit: Valid edit does not exist for file1
17325 $SPROG \[commit aborted\]: correct above errors first!"
17326 dotest edit-check-28b
"$testcvs editors" "$O_editorsLineRE"
17328 dotest edit-check-29a
"$testcvs -q commit -mmsg -c -f" \
17329 "$CVSROOT_DIRNAME/first-dir/file1,v <-- file1
17330 new revision: 1\.6; previous revision: 1\.5"
17331 dotest edit-check-29b
"$testcvs editors" "$O_editorsLineRE"
17332 dotest edit-check-29c
"cat file1" "unofficial change"
17334 modify_repo
cp "$backupFileattrName" \
17335 $CVSROOT_DIRNAME/first-dir
/CVS
/fileattr
17336 dotest edit-check-30
"$testcvs editors"
17338 # Make sure earlier unreported editors are reported properly
17339 # with the edit-check code running.
17341 CVS_SERVER_SAVED
=$CVS_SERVER
17342 CVS_SERVER
=$TESTDIR/cvs-none
; export CVS_SERVER
17344 # The $DOTSTAR matches the exact exec error message
17345 # (which varies) and either "end of file from server"
17346 # (if the process doing the exec exits before the parent
17347 # gets around to sending data to it) or "broken pipe" (if it
17348 # is the other way around).
17349 dotest_fail edit-check-31ar
"$testcvs edit file1" \
17350 "$SPROG \[edit aborted\]: cannot exec $TESTDIR/cvs-none: $DOTSTAR"
17351 dotest edit-check-31br
"test -w file1"
17352 dotest edit-check-31cr
"cat CVS/Notify" \
17353 "Efile1 [SMTWF][uoehra][neduit] [JFAMSOND][aepuco][nbrylgptvc] [0-9 ][0-9] [0-9:]* [0-9][0-9][0-9][0-9] -0000 [-a-zA-Z_.0-9]* $TESTDIR/edit-check/first-dir EUC"
17354 CVS_SERVER
=$CVS_SERVER_SAVED; export CVS_SERVER
17356 dotest_fail edit-check-31dr
"$testcvs edit -c file1" \
17358 $SPROG edit: Skipping file \`file1' due to existing editors\."
17359 dotest edit-check-31er
"$testcvs editors file1" "$editorsLineRE"
17360 dotest edit-check-31fr
"$testcvs unedit file1"
17363 # Make sure it isn't confused by handling multiple files at
17365 echo file2Data
>file2
17367 dotest edit-check-32a
"$testcvs add file2" \
17368 "$SPROG [a-z]*: scheduling file .file2. for addition
17369 $SPROG [a-z]*: use .$SPROG commit. to add this file permanently"
17371 dotest edit-check-32b
"$testcvs commit -m 'c1' file2" \
17372 "$CVSROOT_DIRNAME/first-dir/file2,v <-- file2
17373 initial revision: 1\.1"
17376 dotest edit-check-32c
"$testcvs add second-dir" \
17377 "Directory $CVSROOT_DIRNAME/first-dir/second-dir added to the repository"
17379 echo ThirdFile
>file3
17381 dotest edit-check-32d
"$testcvs add file3" \
17382 "$SPROG [a-z]*: scheduling file .file3. for addition
17383 $SPROG [a-z]*: use .$SPROG commit. to add this file permanently"
17385 dotest edit-check-32f
"$testcvs commit -m 'c1' file3" \
17386 "$CVSROOT_DIRNAME/first-dir/second-dir/file3,v <-- file3
17387 initial revision: 1\.1"
17388 dotest_fail edit-check-32g
"test -w file3"
17392 dotest edit-check-33a
"$testcvs edit -c"
17394 dotest edit-check-33b
"$testcvs editors" \
17398 dotest edit-check-33c
"test -w second-dir/file3"
17400 dotest_fail edit-check-34a
"$testcvs edit -c file1 file2" \
17402 $SPROG edit: Skipping file \`file1' due to existing editors\.
17404 $SPROG edit: Skipping file \`file2' due to existing editors\."
17406 dotest edit-check-34b
"$testcvs editors file1 file2" \
17410 dotest edit-check-35a
"$testcvs unedit file1"
17411 dotest edit-check-35b
"$testcvs editors" \
17414 dotest edit-check-35c
"test -w second-dir/file3"
17416 dotest edit-check-36a
"$testcvs unedit"
17417 dotest edit-check-36b
"$testcvs editors"
17418 dotest_fail edit-check-36c
"test -w second-dir/file3"
17423 rm -rf $CVSROOT_DIRNAME/first-dir
17428 unedit-without-baserev
)
17434 dotest unedit-without-baserev-1 \
17435 "$testcvs -Q import -m . $module X Y" ''
17436 dotest unedit-without-baserev-2
"$testcvs -Q co $module" ''
17439 dotest unedit-without-baserev-3
"$testcvs -Q edit $file" ''
17441 echo add a line
>> $file
17444 # This will fail on most systems.
17445 dotest unedit-without-baserev-4
"echo yes |${testcvs} -Q unedit $file" \
17446 "m has been modified; revert changes${QUESTION} ${CPROG} unedit: m not mentioned in CVS/Baserev
17447 ${CPROG} unedit: run update to complete the unedit"
17449 # SunOS4.1.4 systems make it this far, but with a corrupted
17450 # CVS/Entries file. Demonstrate the corruption!
17451 dotest unedit-without-baserev-5
"cat CVS/Entries" \
17452 "/$file/1\.1\.1\.1/${DOTSTAR}"
17454 dotest unedit-without-baserev-6
"${testcvs} -q update" \
17455 "$SPROG update: warning: \`m' was lost
17458 # OK, those were the easy cases. Now tackle the hard one
17459 # (the reason that CVS/Baserev was invented rather than just
17460 # getting the revision from CVS/Entries). This is very
17461 # similar to watch4-10 through watch4-18 but with Baserev
17465 dotest unedit-without-baserev-7
"${testcvs} -Q co x" ''
17468 dotest unedit-without-baserev-10
"${testcvs} edit m" ''
17469 echo 'edited in 2' >m
17474 editorsLineRE
="m $username [SMTWF][uoehra][neduit] [JFAMSOND][aepuco][nbrylgptvc] [0-9 ][0-9] [0-9:]* [0-9][0-9][0-9][0-9] -0000 $hostname $TESTDIR/2/x"
17475 dotest unedit-without-baserev-11
"$testcvs edit m" "$editorsLineRE"
17477 echo 'edited in 1' >m
17478 dotest unedit-without-baserev-12
"${testcvs} -q ci -m edit-in-1" \
17479 "$CVSROOT_DIRNAME/x/m,v <-- m
17480 new revision: 1\.2; previous revision: 1\.1"
17483 dotest unedit-without-baserev-13
"${testcvs} -q update" \
17484 "RCS file: ${CVSROOT_DIRNAME}/x/m,v
17485 retrieving revision 1\.1\.1\.1
17486 retrieving revision 1\.2
17487 Merging differences between 1\.1\.1\.1 and 1\.2 into m
17488 rcsmerge: warning: conflicts during merge
17489 ${SPROG} update: conflicts found in m
17492 dotest unedit-without-baserev-14
"echo yes |${testcvs} unedit m" \
17493 "m has been modified; revert changes${QUESTION} ${CPROG} unedit: m not mentioned in CVS/Baserev
17494 ${CPROG} unedit: run update to complete the unedit"
17495 dotest unedit-without-baserev-15
"${testcvs} -q update" \
17496 "$SPROG update: warning: \`m' was lost
17498 # The following tests are kind of degenerate compared with
17499 # watch4-16 through watch4-18 but might as well make sure that
17500 # nothing seriously wrong has happened to the working directory.
17501 dotest unedit-without-baserev-16
"cat m" 'edited in 1'
17502 # Make sure CVS really thinks we are at 1.2.
17503 dotest unedit-without-baserev-17
"${testcvs} -q update" ""
17504 dotest unedit-without-baserev-18
"cat m" "edited in 1"
17510 modify_repo
rm -rf $CVSROOT_DIRNAME/$module
17516 # On Windows, we can't check out CVSROOT, because the case
17517 # insensitivity means that this conflicts with cvsroot.
17521 dotest ignore-1
"${testcvs} -q co CVSROOT" "U CVSROOT/${DOTSTAR}"
17523 echo rootig.c
>cvsignore
17524 dotest ignore-2
"${testcvs} add cvsignore" "${SPROG}"' add: scheduling file `cvsignore'"'"' for addition
17525 '"${SPROG}"' add: use .'"${SPROG}"' commit. to add this file permanently'
17527 dotest ignore-3
" ${testcvs} ci -m added" \
17528 "${CPROG} commit: Examining \.
17529 ${CVSROOT_DIRNAME}/CVSROOT/cvsignore,v <-- cvsignore
17530 initial revision: 1\.1
17531 ${SPROG} commit: Rebuilding administrative file database"
17534 if echo "yes" |
${testcvs} release
-d CVSROOT
>>${LOGFILE} ; then
17540 # CVS looks at the home dir from getpwuid, not HOME (is that correct
17541 # behavior?), so this is hard to test and we won't try.
17542 # echo foobar.c >${HOME}/.cvsignore
17543 CVSIGNORE
=envig.c
; export CVSIGNORE
17544 mkdir dir-to-import
17546 touch foobar.c bar.c rootig.c defig.o envig.c optig.c
17547 # We use sort because we can't predict the order in which
17548 # the files will be listed.
17549 dotest_sort ignore-5
"${testcvs} import -m m -I optig.c ignore/first-dir tag1 tag2" \
17552 I ignore/first-dir/defig.o
17553 I ignore/first-dir/envig.c
17554 I ignore/first-dir/optig.c
17555 I ignore/first-dir/rootig.c
17556 N ignore/first-dir/bar.c
17557 N ignore/first-dir/foobar.c
17558 No conflicts created by this import'
17559 dotest_sort ignore-6
"${testcvs} import -m m -I ! ignore/second-dir tag3 tag4" \
17562 N ignore/second-dir/bar.c
17563 N ignore/second-dir/defig.o
17564 N ignore/second-dir/envig.c
17565 N ignore/second-dir/foobar.c
17566 N ignore/second-dir/optig.c
17567 N ignore/second-dir/rootig.c
17568 No conflicts created by this import'
17570 rm -r dir-to-import
17574 dotest ignore-7
"${testcvs} -q co -dsecond-dir ignore/second-dir" \
17575 'U second-dir/bar.c
17576 U second-dir/defig.o
17577 U second-dir/envig.c
17578 U second-dir/foobar.c
17579 U second-dir/optig.c
17580 U second-dir/rootig.c'
17581 dotest ignore-8
"${testcvs} -q co -dfirst-dir ignore/first-dir" 'U first-dir/bar.c
17582 U first-dir/foobar.c'
17584 touch rootig.c defig.o envig.c optig.c notig.c
17585 dotest ignore-9
"${testcvs} -q update -I optig.c" "${QUESTION} notig.c"
17586 # The fact that CVS requires us to specify -I CVS here strikes me
17588 dotest_sort ignore-10
"${testcvs} -q update -I ! -I CVS" \
17589 "${QUESTION} defig.o
17590 ${QUESTION} envig.c
17591 ${QUESTION} notig.c
17592 ${QUESTION} optig.c
17593 ${QUESTION} rootig.c"
17595 # Now test that commands other than update also print "? notig.c"
17596 # where appropriate. Only test this for remote, because local
17597 # CVS only prints it on update.
17600 dotest ignore-11r
"$testcvs -q diff" "$QUESTION notig.c"
17602 # Force the server to be contacted. Ugh. Having CVS
17603 # contact the server for the sole purpose of checking
17604 # the CVSROOT/cvsignore file does not seem like such a
17605 # good idea, so I imagine this will continue to be
17606 # necessary. Oh well, at least we test CVS's ablity to
17607 # handle a file with a modified timestamp but unmodified
17611 dotest ignore-11ar
"$testcvs -q ci -m commit-it" \
17612 "$QUESTION notig.c"
17615 # now test .cvsignore files
17617 echo notig.c
>first-dir
/.cvsignore
17618 echo foobar.c
>second-dir
/.cvsignore
17619 touch first-dir
/notig.c second-dir
/notig.c second-dir
/foobar.c
17620 dotest_sort ignore-12
"${testcvs} -qn update" \
17621 "${QUESTION} first-dir/.cvsignore
17622 ${QUESTION} second-dir/.cvsignore
17623 ${QUESTION} second-dir/notig.c"
17624 dotest_sort ignore-13
"${testcvs} -qn update -I! -I CVS" \
17625 "${QUESTION} first-dir/.cvsignore
17626 ${QUESTION} first-dir/defig.o
17627 ${QUESTION} first-dir/envig.c
17628 ${QUESTION} first-dir/rootig.c
17629 ${QUESTION} second-dir/.cvsignore
17630 ${QUESTION} second-dir/notig.c"
17632 echo yes | dotest ignore-14
"${testcvs} release -d first-dir" \
17633 "${QUESTION} \.cvsignore
17634 You have \[0\] altered files in this repository.
17635 Are you sure you want to release (and delete) directory .first-dir': "
17637 echo add a line
>>second-dir
/foobar.c
17638 rm second-dir
/notig.c second-dir
/.cvsignore
17639 echo yes | dotest ignore-15
"${testcvs} release -d second-dir" \
17641 You have \[1\] altered files in this repository.
17642 Are you sure you want to release (and delete) directory .second-dir': "
17647 modify_repo
rm -rf $CVSROOT_DIRNAME/ignore
17653 # Test that CVS _doesn't_ ignore files on branches because they were
17654 # added to the trunk.
17655 mkdir ignore-on-branch
; cd ignore-on-branch
17656 modify_repo mkdir
$CVSROOT_DIRNAME/ignore-on-branch
17658 # create file1 & file2 on trunk
17659 dotest ignore-on-branch-setup-1
"$testcvs -q co -dsetup ignore-on-branch" ''
17662 dotest ignore-on-branch-setup-2
"$testcvs -q add file1" \
17663 "${SPROG} add: use .${SPROG} commit. to add this file permanently"
17664 dotest ignore-on-branch-setup-3
"$testcvs -q ci -mfile1 file1" \
17665 "$CVSROOT_DIRNAME/ignore-on-branch/file1,v <-- file1
17666 initial revision: 1\.1"
17667 dotest ignore-on-branch-setup-4
"$testcvs -q tag -b branch" 'T file1'
17669 dotest ignore-on-branch-setup-5
"$testcvs -q add file2" \
17670 "${SPROG} add: use .${SPROG} commit. to add this file permanently"
17671 dotest ignore-on-branch-setup-6
"$testcvs -q ci -mtrunk file2" \
17672 "$CVSROOT_DIRNAME/ignore-on-branch/file2,v <-- file2
17673 initial revision: 1\.1"
17677 # Check out branch.
17679 # - This was the original failure case - file2 would not be flagged
17681 dotest ignore-on-branch-1
"$testcvs -q co -rbranch ignore-on-branch" \
17682 'U ignore-on-branch/file1'
17683 cd ignore-on-branch
17684 echo file2 on branch
>file2
17685 dotest ignore-on-branch-2
"$testcvs -nq update" '? file2'
17687 # Now set up for a join. One of the original fixes for this would
17688 # print out a 'U' and a '?' during a join which added a file.
17690 dotest ignore-on-branch-3
"$testcvs -q tag -b branch2" \
17694 dotest ignore-on-branch-3
"$testcvs -q tag -b branch2" 'T file1'
17696 dotest ignore-on-branch-4
"$testcvs -q add file2" \
17697 "${SPROG} add: use .${SPROG} commit. to add this file permanently"
17698 dotest ignore-on-branch-5
"$testcvs -q ci -mbranch file2" \
17699 "$CVSROOT_DIRNAME/ignore-on-branch/file2,v <-- file2
17700 new revision: 1\.1\.2\.2; previous revision: 1\.1\.2\.1"
17701 dotest ignore-on-branch-6
"$testcvs -q up -rbranch2" \
17702 "${SPROG} update: \`file2' is no longer in the repository"
17703 dotest ignore-on-branch-7
"$testcvs -q up -jbranch" 'U file2'
17707 rm -r ignore-on-branch
17708 modify_repo
rm -rf $CVSROOT_DIRNAME/ignore-on-branch
17714 # Test cvs's ability to handle binary files.
17715 # List of binary file tests:
17716 # * conflicts, "cvs admin": binfiles
17717 # * branching and joining: binfiles2
17718 # * adding and removing files: binfiles3
17719 # * -k wrappers: binwrap, binwrap2, binwrap3
17720 # * "cvs import" and wrappers: binwrap, binwrap2, binwrap3
17721 # * -k option to "cvs import": none yet, as far as I know.
17722 modify_repo mkdir
$CVSROOT_DIRNAME/first-dir
17724 dotest binfiles-1
"${testcvs} -q co first-dir" ''
17725 ${AWK} 'BEGIN { printf "%c%c%c@%c%c", 2, 10, 137, 13, 10 }' \
17726 </dev
/null |
${TR} '@' '\000' >binfile.dat
17727 cat binfile.dat binfile.dat
>binfile2.dat
17729 cp ..
/binfile.dat binfile
17730 dotest binfiles-2
"${testcvs} add -kb binfile" \
17731 "${SPROG}"' add: scheduling file `binfile'\'' for addition
17732 '"${SPROG}"' add: use .'"${SPROG}"' commit. to add this file permanently'
17733 dotest binfiles-3
"${testcvs} -q ci -m add-it" \
17734 "$CVSROOT_DIRNAME/first-dir/binfile,v <-- binfile
17735 initial revision: 1\.1"
17738 dotest binfiles-4
"${testcvs} -q co first-dir" 'U first-dir/binfile'
17740 dotest binfiles-5
"cmp ../../1/binfile.dat binfile" ''
17741 # Testing that sticky options is -kb is the closest thing we have
17742 # to testing that binary files work right on non-unix machines
17743 # (until there is automated testing for such machines, of course).
17744 dotest binfiles-5.5
"${testcvs} status binfile" \
17745 "===================================================================
17746 File: binfile Status: Up-to-date
17748 Working revision: 1\.1.*
17749 Repository revision: 1\.1 ${CVSROOT_DIRNAME}/first-dir/binfile,v
17750 Commit Identifier: ${commitid}
17752 Sticky Date: (none)
17753 Sticky Options: -kb"
17755 # Test that "-kk" does not override "-kb"
17758 dotest binfiles-4
"${testcvs} -q co -kk first-dir" 'U first-dir/binfile'
17760 # Testing that sticky options is -kb is the closest thing we have
17761 # to testing that binary files work right on non-unix machines
17762 # (until there is automated testing for such machines, of course).
17763 dotest binfiles-5.5
"${testcvs} status binfile" \
17764 "===================================================================
17765 File: binfile Status: Up-to-date
17767 Working revision: 1\.1.*
17768 Repository revision: 1\.1 ${CVSROOT_DIRNAME}/first-dir/binfile,v
17769 Commit Identifier: ${commitid}
17771 Sticky Date: (none)
17772 Sticky Options: -kb"
17774 # Test whether the default options from the RCS file are
17775 # also used when operating on files instead of whole
17780 dotest binfiles-5.5b0
"${testcvs} -q co first-dir/binfile" \
17781 'U first-dir/binfile'
17783 dotest binfiles-5.5b1
"${testcvs} status binfile" \
17784 "===================================================================
17785 File: binfile Status: Up-to-date
17787 Working revision: 1\.1.*
17788 Repository revision: 1\.1 ${CVSROOT_DIRNAME}/first-dir/binfile,v
17789 Commit Identifier: ${commitid}
17791 Sticky Date: (none)
17792 Sticky Options: -kb"
17795 # test that "-kk" does not override "-kb"
17797 dotest binfiles-5.5b0
"${testcvs} -q co -kk first-dir/binfile" \
17798 'U first-dir/binfile'
17800 dotest binfiles-5.5b1
"${testcvs} status binfile" \
17801 "===================================================================
17802 File: binfile Status: Up-to-date
17804 Working revision: 1\.1.*
17805 Repository revision: 1\.1 ${CVSROOT_DIRNAME}/first-dir/binfile,v
17806 Commit Identifier: ${commitid}
17808 Sticky Date: (none)
17809 Sticky Options: -kb"
17814 cp ..
/..
/1/binfile2.dat binfile
17815 dotest binfiles-6
"${testcvs} -q ci -m modify-it" \
17816 "$CVSROOT_DIRNAME/first-dir/binfile,v <-- binfile
17817 new revision: 1\.2; previous revision: 1\.1"
17818 cd ..
/..
/1/first-dir
17819 dotest binfiles-7
"${testcvs} -q update" '[UP] binfile'
17820 dotest binfiles-8
"cmp ../binfile2.dat binfile" ''
17822 # Now test handling of conflicts with binary files.
17823 cp ..
/binfile.dat binfile
17824 dotest binfiles-con0
"${testcvs} -q ci -m modify-it" \
17825 "$CVSROOT_DIRNAME/first-dir/binfile,v <-- binfile
17826 new revision: 1\.3; previous revision: 1\.2"
17827 cd ..
/..
/2/first-dir
17828 echo 'edits in dir 2' >binfile
17829 dotest binfiles-con1
"${testcvs} -q update" \
17830 "$SPROG update: nonmergeable file needs merge
17831 $SPROG update: revision 1\.3 from repository is now in binfile
17832 $SPROG update: file from working directory is now in \.#binfile\.1\.2
17835 dotest_fail binfiles-con1b
"$testcvs -q up" "C binfile"
17837 dotest binfiles-con2
"cmp binfile ../../1/binfile.dat" ''
17838 dotest binfiles-con3
"cat .#binfile.1.2" 'edits in dir 2'
17840 cp ..
/..
/1/binfile2.dat binfile
17841 dotest binfiles-con4
"$testcvs -q ci -m resolve-it" \
17842 "$CVSROOT_DIRNAME/first-dir/binfile,v <-- binfile
17843 new revision: 1\.4; previous revision: 1\.3"
17844 cd ..
/..
/1/first-dir
17845 dotest binfiles-con5
"${testcvs} -q update" '[UP] binfile'
17847 dotest binfiles-9
"${testcvs} -q update -A" ''
17848 # "-kk" no longer does anything with "-kb"
17849 dotest binfiles-10
"${testcvs} -q update -kk" ''
17850 dotest binfiles-11
"${testcvs} -q update" ''
17851 # "-kk" no longer does anything with "-kb"
17852 dotest binfiles-12
"${testcvs} -q update -A" ''
17853 dotest binfiles-13
"${testcvs} -q update -A" ''
17859 dotest binfiles-13a0
"${testcvs} -q co -r HEAD first-dir" \
17860 'U first-dir/binfile'
17862 dotest binfiles-13a1
"${testcvs} status binfile" \
17863 "===================================================================
17864 File: binfile Status: Up-to-date
17866 Working revision: 1\.4.*
17867 Repository revision: 1\.4 ${CVSROOT_DIRNAME}/first-dir/binfile,v
17868 Commit Identifier: ${commitid}
17869 Sticky Tag: HEAD (revision: 1\.4)
17870 Sticky Date: (none)
17871 Sticky Options: -kb"
17876 echo 'this file is $''RCSfile$' >binfile
17877 dotest binfiles-14a
"${testcvs} -q ci -m modify-it" \
17878 "$CVSROOT_DIRNAME/first-dir/binfile,v <-- binfile
17879 new revision: 1\.5; previous revision: 1\.4"
17880 dotest binfiles-14b
"cat binfile" 'this file is $''RCSfile$'
17881 # See binfiles-5.5 for discussion of -kb.
17882 dotest binfiles-14c
"${testcvs} status binfile" \
17883 "===================================================================
17884 File: binfile Status: Up-to-date
17886 Working revision: 1\.5.*
17887 Repository revision: 1\.5 ${CVSROOT_DIRNAME}/first-dir/binfile,v
17888 Commit Identifier: ${commitid}
17890 Sticky Date: (none)
17891 Sticky Options: -kb"
17892 dotest binfiles-14d
"${testcvs} admin -kv binfile" \
17893 "RCS file: ${CVSROOT_DIRNAME}/first-dir/binfile,v
17895 # cvs admin doesn't change the checked-out file or its sticky
17896 # kopts. There probably should be a way which does (but
17897 # what if the file is modified? And do we try to version
17898 # control the kopt setting?)
17899 dotest binfiles-14e
"cat binfile" 'this file is $''RCSfile$'
17900 dotest binfiles-14f
"${testcvs} status binfile" \
17901 "===================================================================
17902 File: binfile Status: Up-to-date
17904 Working revision: 1\.5.*
17905 Repository revision: 1\.5 ${CVSROOT_DIRNAME}/first-dir/binfile,v
17906 Commit Identifier: ${commitid}
17908 Sticky Date: (none)
17909 Sticky Options: -kb"
17910 dotest binfiles-14g
"${testcvs} -q update -A" '[UP] binfile'
17911 dotest binfiles-14h
"cat binfile" 'this file is binfile,v'
17912 dotest binfiles-14i
"${testcvs} status binfile" \
17913 "===================================================================
17914 File: binfile Status: Up-to-date
17916 Working revision: 1\.5.*
17917 Repository revision: 1\.5 ${CVSROOT_DIRNAME}/first-dir/binfile,v
17918 Commit Identifier: ${commitid}
17920 Sticky Date: (none)
17921 Sticky Options: -kv"
17923 # Do sticky options work when used with 'cvs update'?
17924 echo "Not a binary file." > nibfile
17925 dotest binfiles-sticky1
"${testcvs} -q add nibfile" \
17926 "${SPROG} add: use .${SPROG} commit. to add this file permanently"
17927 dotest binfiles-sticky2
"${testcvs} -q ci -m add-it nibfile" \
17928 "$CVSROOT_DIRNAME/first-dir/nibfile,v <-- nibfile
17929 initial revision: 1\.1"
17930 dotest binfiles-sticky3
"${testcvs} -q update -kb nibfile" \
17932 dotest binfiles-sticky4
"${testcvs} -q status nibfile" \
17933 "===================================================================
17934 File: nibfile Status: Up-to-date
17936 Working revision: 1\.1.*
17937 Repository revision: 1\.1 ${CVSROOT_DIRNAME}/first-dir/nibfile,v
17938 Commit Identifier: ${commitid}
17940 Sticky Date: (none)
17941 Sticky Options: -kb"
17943 # Now test that -A can clear the sticky option.
17944 dotest binfiles-sticky5
"${testcvs} -q update -A nibfile" \
17946 dotest binfiles-sticky6
"${testcvs} -q status nibfile" \
17947 "===================================================================
17948 File: nibfile Status: Up-to-date
17950 Working revision: 1\.1.*
17951 Repository revision: 1\.1 ${CVSROOT_DIRNAME}/first-dir/nibfile,v
17952 Commit Identifier: ${commitid}
17954 Sticky Date: (none)
17955 Sticky Options: (none)"
17956 dotest binfiles-15
"${testcvs} -q admin -kb nibfile" \
17957 "RCS file: ${CVSROOT_DIRNAME}/first-dir/nibfile,v
17959 dotest binfiles-16
"${testcvs} -q update nibfile" "[UP] nibfile"
17960 dotest binfiles-17
"${testcvs} -q status nibfile" \
17961 "===================================================================
17962 File: nibfile Status: Up-to-date
17964 Working revision: 1\.1.*
17965 Repository revision: 1\.1 ${CVSROOT_DIRNAME}/first-dir/nibfile,v
17966 Commit Identifier: ${commitid}
17968 Sticky Date: (none)
17969 Sticky Options: -kb"
17971 dotest binfiles-o1
"${testcvs} admin -o1.3:: binfile" \
17972 "RCS file: ${CVSROOT_DIRNAME}/first-dir/binfile,v
17973 deleting revision 1\.5
17974 deleting revision 1\.4
17976 dotest binfiles-o2
"${testcvs} admin -o::1.3 binfile" \
17977 "RCS file: ${CVSROOT_DIRNAME}/first-dir/binfile,v
17978 deleting revision 1\.2
17979 deleting revision 1\.1
17981 dotest binfiles-o3
"${testcvs} -q log -h -N binfile" "
17982 RCS file: ${CVSROOT_DIRNAME}/first-dir/binfile,v
17983 Working file: binfile
17988 keyword substitution: v
17990 ============================================================================="
17992 # Check that the contents were right. This isn't the hard case
17993 # (in which RCS_delete_revs does a diff), but might as well.
17994 dotest binfiles-o4
"${testcvs} -q update binfile" "U binfile"
17995 dotest binfiles-o5
"cmp binfile ../../1/binfile.dat" ""
17999 modify_repo
rm -rf $CVSROOT_DIRNAME/first-dir
18006 # Test cvs's ability to handle binary files, particularly branching
18007 # and joining. The key thing we are worrying about is that CVS
18008 # doesn't print "cannot merge binary files" or some such, in
18009 # situations where no merging is required.
18010 # See also "join" which does this with non-binary files.
18012 # Cases (we are merging from the branch to the trunk):
18013 # binfile.dat) File added on branch, not on trunk.
18014 # File should be marked for addition.
18015 # brmod) File modified on branch, not on trunk.
18016 # File should be copied over to trunk (no merging is needed).
18017 # brmod-trmod) File modified on branch, also on trunk.
18018 # This is a conflict. Present the user with both files and
18019 # let them figure it out.
18020 # brmod-wdmod) File modified on branch, not modified in the trunk
18021 # repository, but modified in the (trunk) working directory.
18022 # This is also a conflict.
18024 modify_repo mkdir
${CVSROOT_DIRNAME}/first-dir
18026 dotest binfiles2-1
"${testcvs} -q co first-dir" ''
18029 # The most important thing here is that binfile, binfile2, &c
18030 # each be distinct from each other. We also make sure to include
18031 # a few likely end-of-line patterns to make sure nothing is
18032 # being munged as if in text mode.
18033 ${AWK} 'BEGIN { printf "%c%c%c@%c%c", 2, 10, 137, 13, 10 }' \
18034 </dev
/null |
${TR} '@' '\000' >..
/binfile
18035 # Use binfl2 rather than binfile2 because of a problem with Cygwin
18036 # and Samba. that causes cat to report that the input and output file
18037 # are the same when outputting to binfile3. Why? I don't know, but
18038 # it is consistently reproducible.
18039 cat ..
/binfile ..
/binfile
>..
/binfl2
18040 cat ..
/binfl2 ..
/binfile
>..
/binfile3
18042 # FIXCVS: unless a branch has at least one file on it,
18043 # tag_check_valid won't know it exists. So if brmod didn't
18044 # exist, we would have to invent it.
18045 cp ..
/binfile brmod
18046 cp ..
/binfile brmod-trmod
18047 cp ..
/binfile brmod-wdmod
18048 dotest binfiles2-1a \
18049 "${testcvs} add -kb brmod brmod-trmod brmod-wdmod" \
18050 "${SPROG} add: scheduling file .brmod. for addition
18051 ${SPROG} add: scheduling file .brmod-trmod. for addition
18052 ${SPROG} add: scheduling file .brmod-wdmod. for addition
18053 ${SPROG} add: use .${SPROG} commit. to add these files permanently"
18054 dotest binfiles2-1b
"${testcvs} -q ci -m add" \
18055 "$CVSROOT_DIRNAME/first-dir/brmod,v <-- brmod
18056 initial revision: 1\.1
18057 $CVSROOT_DIRNAME/first-dir/brmod-trmod,v <-- brmod-trmod
18058 initial revision: 1\.1
18059 $CVSROOT_DIRNAME/first-dir/brmod-wdmod,v <-- brmod-wdmod
18060 initial revision: 1\.1"
18061 dotest binfiles2-2
"${testcvs} -q tag -b br" 'T brmod
18064 dotest binfiles2-3
"${testcvs} -q update -r br" ''
18065 cp ..
/binfile binfile.dat
18066 dotest binfiles2-4
"${testcvs} add -kb binfile.dat" \
18067 "${SPROG} add: scheduling file .binfile\.dat. for addition on branch .br.
18068 ${SPROG} add: use .${SPROG} commit. to add this file permanently"
18070 cp ..
/binfl2 brmod-trmod
18071 cp ..
/binfl2 brmod-wdmod
18072 dotest binfiles2-5
"${testcvs} -q ci -m br-changes" \
18073 "$CVSROOT_DIRNAME/first-dir/Attic/binfile\.dat,v <-- binfile\.dat
18074 new revision: 1\.1\.2\.1; previous revision: 1\.1
18075 $CVSROOT_DIRNAME/first-dir/brmod,v <-- brmod
18076 new revision: 1\.1\.2\.1; previous revision: 1\.1
18077 $CVSROOT_DIRNAME/first-dir/brmod-trmod,v <-- brmod-trmod
18078 new revision: 1\.1\.2\.1; previous revision: 1\.1
18079 $CVSROOT_DIRNAME/first-dir/brmod-wdmod,v <-- brmod-wdmod
18080 new revision: 1\.1\.2\.1; previous revision: 1\.1"
18081 dotest binfiles2-6
"${testcvs} -q update -A" \
18082 "${SPROG} update: \`binfile\.dat' is no longer in the repository
18086 dotest_fail binfiles2-7
"test -f binfile.dat" ''
18087 dotest binfiles2-7-brmod
"cmp ../binfile brmod"
18088 cp ..
/binfile3 brmod-trmod
18089 dotest binfiles2-7a
"${testcvs} -q ci -m tr-modify" \
18090 "$CVSROOT_DIRNAME/first-dir/brmod-trmod,v <-- brmod-trmod
18091 new revision: 1\.2; previous revision: 1\.1"
18092 cp ..
/binfile3 brmod-wdmod
18094 dotest binfiles2-8
"${testcvs} -q update -j br" \
18097 ${SPROG} update: nonmergeable file needs merge
18098 ${SPROG} update: revision 1.1.2.1 from repository is now in brmod-trmod
18099 ${SPROG} update: file from working directory is now in .#brmod-trmod.1.2
18102 ${SPROG} update: nonmergeable file needs merge
18103 ${SPROG} update: revision 1.1.2.1 from repository is now in brmod-wdmod
18104 ${SPROG} update: file from working directory is now in .#brmod-wdmod.1.1
18107 dotest binfiles2-9
"cmp ../binfile binfile.dat"
18108 dotest binfiles2-9-brmod
"cmp ../binfl2 brmod"
18109 dotest binfiles2-9-brmod-trmod
"cmp ../binfl2 brmod-trmod"
18110 dotest binfiles2-9-brmod-trmod
"cmp ../binfl2 brmod-wdmod"
18111 dotest binfiles2-9a-brmod-trmod
"cmp ../binfile3 .#brmod-trmod.1.2"
18112 dotest binfiles2-9a-brmod-wdmod
"cmp ../binfile3 .#brmod-wdmod.1.1"
18114 # Test that everything was properly scheduled.
18115 dotest binfiles2-10
"${testcvs} -q ci -m checkin" \
18116 "$CVSROOT_DIRNAME/first-dir/binfile\.dat,v <-- binfile\.dat
18117 new revision: 1\.2; previous revision: 1\.1
18118 $CVSROOT_DIRNAME/first-dir/brmod,v <-- brmod
18119 new revision: 1\.2; previous revision: 1\.1
18120 $CVSROOT_DIRNAME/first-dir/brmod-trmod,v <-- brmod-trmod
18121 new revision: 1\.3; previous revision: 1\.2
18122 $CVSROOT_DIRNAME/first-dir/brmod-wdmod,v <-- brmod-wdmod
18123 new revision: 1\.2; previous revision: 1\.1"
18125 dotest_fail binfiles2-o1
"${testcvs} -q admin -o :1.2 brmod-trmod" \
18126 "RCS file: ${CVSROOT_DIRNAME}/first-dir/brmod-trmod,v
18127 deleting revision 1\.2
18128 ${SPROG} admin: ${CVSROOT_DIRNAME}/first-dir/brmod-trmod,v: can't remove branch point 1\.1
18129 ${SPROG} admin: RCS file for .brmod-trmod. not modified\."
18130 dotest binfiles2-o2
"${testcvs} -q admin -o 1.1.2.1: brmod-trmod" \
18131 "RCS file: ${CVSROOT_DIRNAME}/first-dir/brmod-trmod,v
18132 deleting revision 1\.1\.2\.1
18134 dotest binfiles2-o3
"${testcvs} -q admin -o :1.2 brmod-trmod" \
18135 "RCS file: ${CVSROOT_DIRNAME}/first-dir/brmod-trmod,v
18136 deleting revision 1\.2
18137 deleting revision 1\.1
18139 dotest binfiles2-o4
"${testcvs} -q log -N brmod-trmod" "
18140 RCS file: ${CVSROOT_DIRNAME}/first-dir/brmod-trmod,v
18141 Working file: brmod-trmod
18146 keyword substitution: b
18147 total revisions: 1; selected revisions: 1
18149 ----------------------------
18151 date: ${ISO8601DATE}; author: ${username}; state: Exp; commitid: ${commitid};
18153 ============================================================================="
18157 modify_repo
rm -rf $CVSROOT_DIRNAME/first-dir
18164 # More binary file tests, especially removing, adding, &c.
18165 # See "binfiles" for a list of binary file tests.
18166 modify_repo mkdir
$CVSROOT_DIRNAME/first-dir
18168 dotest binfiles3-1
"${testcvs} -q co first-dir" ''
18169 ${AWK} 'BEGIN { printf "%c%c%c@%c%c", 2, 10, 137, 13, 10 }' \
18170 </dev
/null |
${TR} '@' '\000' >binfile.dat
18173 dotest binfiles3-2
"${testcvs} add file1" \
18174 "${SPROG} add: scheduling file .file1. for addition
18175 ${SPROG} add: use .${SPROG} commit. to add this file permanently"
18176 dotest binfiles3-3
"${testcvs} -q ci -m add-it" \
18177 "$CVSROOT_DIRNAME/first-dir/file1,v <-- file1
18178 initial revision: 1\.1"
18180 dotest binfiles3-4
"${testcvs} rm file1" \
18181 "${SPROG} remove: scheduling .file1. for removal
18182 ${SPROG} remove: use .${SPROG} commit. to remove this file permanently"
18183 dotest binfiles3-5
"${testcvs} -q ci -m remove-it" \
18184 "$CVSROOT_DIRNAME/first-dir/file1,v <-- file1
18185 new revision: delete; previous revision: 1\.1"
18186 cp ..
/binfile.dat file1
18187 dotest binfiles3-6
"${testcvs} add -kb file1" \
18188 "$SPROG add: Re-adding file .file1. after dead revision 1\.2\.
18189 ${SPROG} add: use .${SPROG} commit. to add this file permanently"
18190 # The idea behind this test is to make sure that the file
18191 # gets opened in binary mode to send to "cvs ci".
18192 dotest binfiles3-6a
"cat CVS/Entries" \
18193 "/file1/0/[A-Za-z0-9 :]*/-kb/
18195 # TODO: This just tests the case where the old keyword
18196 # expansion mode is the default (RCS_getexpand == NULL
18197 # in checkaddfile()); should also test the case in which
18198 # we are changing it from one non-default value to another.
18199 dotest binfiles3-7
"$testcvs -q ci -m readd-it" \
18200 "$SPROG commit: changing keyword expansion mode to -kb
18201 $CVSROOT_DIRNAME/first-dir/file1,v <-- file1
18202 new revision: 1\.3; previous revision: 1\.2"
18203 dotest binfiles3-8
"${testcvs} -q log -h -N file1" "
18204 RCS file: ${CVSROOT_DIRNAME}/first-dir/file1,v
18205 Working file: file1
18210 keyword substitution: b
18212 ============================================================================="
18214 # OK, now test admin -o on a binary file. See "admin"
18215 # test for a more complete list of admin -o tests.
18216 cp ${TESTDIR}/1/binfile.dat
${TESTDIR}/1/binfile4.dat
18217 echo '%%$$##@@!!jjiiuull' |
${TR} j
'\000' >>${TESTDIR}/1/binfile4.dat
18218 cp ${TESTDIR}/1/binfile4.dat
${TESTDIR}/1/binfile5.dat
18219 echo 'aawwee%$$##@@!!jjil' |
${TR} w
'\000' >>${TESTDIR}/1/binfile5.dat
18221 cp ..
/binfile4.dat file1
18222 dotest binfiles3-9
"${testcvs} -q ci -m change" \
18223 "$CVSROOT_DIRNAME/first-dir/file1,v <-- file1
18224 new revision: 1\.4; previous revision: 1\.3"
18225 cp ..
/binfile5.dat file1
18226 dotest binfiles3-10
"${testcvs} -q ci -m change" \
18227 "$CVSROOT_DIRNAME/first-dir/file1,v <-- file1
18228 new revision: 1\.5; previous revision: 1\.4"
18229 dotest binfiles3-11
"${testcvs} admin -o 1.3::1.5 file1" \
18230 "RCS file: ${CVSROOT_DIRNAME}/first-dir/file1,v
18231 deleting revision 1\.4
18233 dotest binfiles3-12
"${testcvs} -q update -r 1.3 file1" "U file1"
18234 dotest binfiles3-13
"cmp file1 ${TESTDIR}/1/binfile.dat" ""
18239 modify_repo
rm -rf $CVSROOT_DIRNAME/first-dir
18245 # See comment at "mwrap" test for list of other wrappers tests.
18246 # Test cvs's ability to handle nonmergeable files specified with
18247 # -m 'COPY' in wrappers. Similar to the binfiles2 test,
18248 # which tests the same thing for binary files
18249 # (which are non-mergeable in the same sense).
18251 # Cases (we are merging from the branch to the trunk):
18252 # brmod) File modified on branch, not on trunk.
18253 # File should be copied over to trunk (no merging is needed).
18254 # brmod-trmod) File modified on branch, also on trunk.
18255 # This is a conflict. Present the user with both files and
18256 # let them figure it out.
18257 # brmod-wdmod) File modified on branch, not modified in the trunk
18258 # repository, but modified in the (trunk) working directory.
18259 # This is also a conflict.
18261 # For the moment, remote CVS can't pass wrappers from CVSWRAPPERS
18262 # (see wrap_send). So skip these tests for remote.
18263 if $remote; then :; else
18265 mkdir
${CVSROOT_DIRNAME}/first-dir
18267 dotest mcopy-1
"${testcvs} -q co first-dir" ''
18270 # FIXCVS: unless a branch has at least one file on it,
18271 # tag_check_valid won't know it exists. So if brmod didn't
18272 # exist, we would have to invent it.
18273 echo 'brmod initial contents' >brmod
18274 echo 'brmod-trmod initial contents' >brmod-trmod
18275 echo 'brmod-wdmod initial contents' >brmod-wdmod
18276 echo "* -m 'COPY'" >.cvswrappers
18278 "${testcvs} add .cvswrappers brmod brmod-trmod brmod-wdmod" \
18279 "${SPROG} add: scheduling file .\.cvswrappers. for addition
18280 ${SPROG} add: scheduling file .brmod. for addition
18281 ${SPROG} add: scheduling file .brmod-trmod. for addition
18282 ${SPROG} add: scheduling file .brmod-wdmod. for addition
18283 ${SPROG} add: use .${SPROG} commit. to add these files permanently"
18284 dotest mcopy-1b
"${testcvs} -q ci -m add" \
18285 "$CVSROOT_DIRNAME/first-dir/\.cvswrappers,v <-- \.cvswrappers
18286 initial revision: 1\.1
18287 $CVSROOT_DIRNAME/first-dir/brmod,v <-- brmod
18288 initial revision: 1\.1
18289 $CVSROOT_DIRNAME/first-dir/brmod-trmod,v <-- brmod-trmod
18290 initial revision: 1\.1
18291 $CVSROOT_DIRNAME/first-dir/brmod-wdmod,v <-- brmod-wdmod
18292 initial revision: 1\.1"
18294 # NOTE: .cvswrappers files are broken (see comment in
18295 # src/wrapper.c). So doing everything via the environment
18296 # variable is a workaround. Better would be to test them
18298 CVSWRAPPERS
="* -m 'COPY'"
18300 dotest mcopy-2
"${testcvs} -q tag -b br" 'T \.cvswrappers
18304 dotest mcopy-3
"${testcvs} -q update -r br" ''
18305 echo 'modify brmod on br' >brmod
18306 echo 'modify brmod-trmod on br' >brmod-trmod
18307 echo 'modify brmod-wdmod on br' >brmod-wdmod
18308 dotest mcopy-5
"${testcvs} -q ci -m br-changes" \
18309 "$CVSROOT_DIRNAME/first-dir/brmod,v <-- brmod
18310 new revision: 1\.1\.2\.1; previous revision: 1\.1
18311 $CVSROOT_DIRNAME/first-dir/brmod-trmod,v <-- brmod-trmod
18312 new revision: 1\.1\.2\.1; previous revision: 1\.1
18313 $CVSROOT_DIRNAME/first-dir/brmod-wdmod,v <-- brmod-wdmod
18314 new revision: 1\.1\.2\.1; previous revision: 1\.1"
18315 dotest mcopy-6
"${testcvs} -q update -A" \
18319 dotest mcopy-7
"cat brmod brmod-trmod brmod-wdmod" \
18320 "brmod initial contents
18321 brmod-trmod initial contents
18322 brmod-wdmod initial contents"
18324 echo 'modify brmod-trmod again on trunk' >brmod-trmod
18325 dotest mcopy-7a
"${testcvs} -q ci -m tr-modify" \
18326 "$CVSROOT_DIRNAME/first-dir/brmod-trmod,v <-- brmod-trmod
18327 new revision: 1\.2; previous revision: 1\.1"
18328 echo 'modify brmod-wdmod in working dir' >brmod-wdmod
18330 dotest mcopy-8
"${testcvs} -q update -j br" \
18332 ${SPROG} update: nonmergeable file needs merge
18333 ${SPROG} update: revision 1.1.2.1 from repository is now in brmod-trmod
18334 ${SPROG} update: file from working directory is now in .#brmod-trmod.1.2
18337 ${SPROG} update: nonmergeable file needs merge
18338 ${SPROG} update: revision 1.1.2.1 from repository is now in brmod-wdmod
18339 ${SPROG} update: file from working directory is now in .#brmod-wdmod.1.1
18342 dotest mcopy-9
"cat brmod brmod-trmod brmod-wdmod" \
18343 "modify brmod on br
18344 modify brmod-trmod on br
18345 modify brmod-wdmod on br"
18346 dotest mcopy-9a
"cat .#brmod-trmod.1.2 .#brmod-wdmod.1.1" \
18347 "modify brmod-trmod again on trunk
18348 modify brmod-wdmod in working dir"
18350 # Test that everything was properly scheduled.
18351 dotest mcopy-10
"${testcvs} -q ci -m checkin" \
18352 "$CVSROOT_DIRNAME/first-dir/brmod,v <-- brmod
18353 new revision: 1\.2; previous revision: 1\.1
18354 $CVSROOT_DIRNAME/first-dir/brmod-trmod,v <-- brmod-trmod
18355 new revision: 1\.3; previous revision: 1\.2
18356 $CVSROOT_DIRNAME/first-dir/brmod-wdmod,v <-- brmod-wdmod
18357 new revision: 1\.2; previous revision: 1\.1"
18361 modify_repo
rm -rf $CVSROOT_DIRNAME/first-dir
18364 fi # end of tests to be skipped for remote
18370 # Test the ability to specify binary-ness based on file name.
18371 # See "mwrap" for a list of other wrappers tests.
18373 mkdir dir-to-import
18375 touch foo.c foo.exe
18377 # While we're here, test for rejection of duplicate tag names.
18378 dotest_fail binwrap-0 \
18379 "${testcvs} import -m msg -I ! first-dir dup dup" \
18380 "${CPROG} \[import aborted\]: tag .dup. was specified more than once"
18382 if ${testcvs} import
-m message
-I ! -W "*.exe -k 'b'" \
18383 first-dir tag1 tag2
>>${LOGFILE}; then
18389 rm -r dir-to-import
18390 dotest binwrap-2
"${testcvs} -q co first-dir" 'U first-dir/foo.c
18391 U first-dir/foo.exe'
18392 dotest binwrap-3
"${testcvs} -q status first-dir" \
18393 "===================================================================
18394 File: foo\.c Status: Up-to-date
18396 Working revision: 1\.1\.1\.1.*
18397 Repository revision: 1\.1\.1\.1 ${CVSROOT_DIRNAME}/first-dir/foo\.c,v
18398 Commit Identifier: ${commitid}
18400 Sticky Date: (none)
18401 Sticky Options: (none)
18403 ===================================================================
18404 File: foo\.exe Status: Up-to-date
18406 Working revision: 1\.1\.1\.1.*
18407 Repository revision: 1\.1\.1\.1 ${CVSROOT_DIRNAME}/first-dir/foo\.exe,v
18408 Commit Identifier: ${commitid}
18410 Sticky Date: (none)
18411 Sticky Options: -kb"
18415 modify_repo
rm -rf $CVSROOT_DIRNAME/first-dir
18421 # Test the ability to specify binary-ness based on file name.
18422 # See "mwrap" for a list of other wrappers tests.
18424 mkdir dir-to-import
18426 touch foo.c foo.exe
18428 # Specify that all files are binary except *.c.
18429 # The order seems to matter, with the earlier rules taking
18430 # precedence. I'm not sure whether that is good or not,
18431 # but it is the current behavior.
18432 if ${testcvs} import
-m message
-I ! \
18433 -W "*.c -k 'o'" -W "* -k 'b'" \
18434 first-dir tag1 tag2
>>${LOGFILE}; then
18440 rm -r dir-to-import
18441 dotest binwrap2-2
"${testcvs} -q co first-dir" 'U first-dir/foo.c
18442 U first-dir/foo.exe'
18443 dotest binwrap2-3
"${testcvs} -q status first-dir" \
18444 "===================================================================
18445 File: foo\.c Status: Up-to-date
18447 Working revision: 1\.1\.1\.1.*
18448 Repository revision: 1\.1\.1\.1 ${CVSROOT_DIRNAME}/first-dir/foo\.c,v
18449 Commit Identifier: ${commitid}
18451 Sticky Date: (none)
18452 Sticky Options: -ko
18454 ===================================================================
18455 File: foo\.exe Status: Up-to-date
18457 Working revision: 1\.1\.1\.1.*
18458 Repository revision: 1\.1\.1\.1 ${CVSROOT_DIRNAME}/first-dir/foo\.exe,v
18459 Commit Identifier: ${commitid}
18461 Sticky Date: (none)
18462 Sticky Options: -kb"
18466 modify_repo
rm -rf $CVSROOT_DIRNAME/first-dir
18472 # Test communication of file-specified -k wrappers between
18473 # client and server, in `import':
18475 # 1. Set up a directory tree, populate it with files.
18476 # 2. Give each directory a different .cvswrappers file.
18477 # 3. Give the server its own .cvswrappers file.
18478 # 4. Import the whole tree, see if the right files got set
18481 # The tree has a top ("0th") level, and two subdirs, sub1/
18482 # and sub2/; sub2/ contains directory subsub/. Every
18483 # directory has a .cvswrappers file as well as regular
18486 # In the file names, "foo-b.*" should end up binary, and
18487 # "foo-t.*" should end up text. Don't worry about the two
18488 # letter extensions; they're just there to help me keep
18491 # Here's the directory tree:
18501 # .cvswrappers .cvswrappers
18502 # foo-b.c1 foo-b.sb
18503 # foo-b.sb foo-b.st
18504 # foo-t.c0 foo-t.c0
18505 # foo-t.st foo-t.c1
18518 binwrap3_line1
="This is a test file "
18519 binwrap3_line2
="containing little of use "
18520 binwrap3_line3
="except this non-haiku"
18522 binwrap3_text
="${binwrap3_line1}${binwrap3_line2}${binwrap3_line3}"
18526 # On Windows, we can't check out CVSROOT, because the case
18527 # insensitivity means that this conflicts with cvsroot.
18531 mkdir binwrap3
# the 0th dir
18532 mkdir binwrap
3/sub1
18533 mkdir binwrap
3/sub2
18534 mkdir binwrap
3/sub
2/subsub
18536 echo "bar*" > binwrap
3/.cvswrappers
18537 echo "*.c0 -k 'b'" >> binwrap
3/.cvswrappers
18538 echo "whatever -k 'b'" >> binwrap
3/.cvswrappers
18539 echo ${binwrap3_text} > binwrap
3/foo-b.c0
18540 echo ${binwrap3_text} > binwrap
3/bar-t.c0
18541 echo ${binwrap3_text} > binwrap
3/foo-b.sb
18542 echo ${binwrap3_text} > binwrap
3/foo-t.sb
18543 echo ${binwrap3_text} > binwrap
3/foo-t.c1
18544 echo ${binwrap3_text} > binwrap
3/foo-t.st
18546 echo "bar* -k 'kv'" > binwrap
3/sub
1/.cvswrappers
18547 echo "*.c1 -k 'b'" >> binwrap
3/sub
1/.cvswrappers
18548 echo "whatever -k 'b'" >> binwrap
3/sub
1/.cvswrappers
18549 echo ${binwrap3_text} > binwrap
3/sub
1/foo-b.c1
18550 echo ${binwrap3_text} > binwrap
3/sub
1/bar-t.c1
18551 echo ${binwrap3_text} > binwrap
3/sub
1/foo-b.sb
18552 echo ${binwrap3_text} > binwrap
3/sub
1/foo-t.sb
18553 echo ${binwrap3_text} > binwrap
3/sub
1/foo-t.c0
18554 echo ${binwrap3_text} > binwrap
3/sub
1/foo-t.st
18556 echo "bar*" > binwrap
3/sub
2/.cvswrappers
18557 echo "*.st -k 'b'" >> binwrap
3/sub
2/.cvswrappers
18558 echo ${binwrap3_text} > binwrap
3/sub
2/foo-b.sb
18559 echo ${binwrap3_text} > binwrap
3/sub
2/foo-t.sb
18560 echo ${binwrap3_text} > binwrap
3/sub
2/foo-b.st
18561 echo ${binwrap3_text} > binwrap
3/sub
2/bar-t.st
18562 echo ${binwrap3_text} > binwrap
3/sub
2/foo-t.c0
18563 echo ${binwrap3_text} > binwrap
3/sub
2/foo-t.c1
18564 echo ${binwrap3_text} > binwrap
3/sub
2/foo-t.c2
18565 echo ${binwrap3_text} > binwrap
3/sub
2/foo-t.c3
18567 echo "bar* -k 'kv'" > binwrap
3/sub
2/subsub
/.cvswrappers
18568 echo "*.c3 -k 'b'" >> binwrap
3/sub
2/subsub
/.cvswrappers
18569 echo "foo -k 'b'" >> binwrap
3/sub
2/subsub
/.cvswrappers
18570 echo "c0* -k 'b'" >> binwrap
3/sub
2/subsub
/.cvswrappers
18571 echo ${binwrap3_text} > binwrap
3/sub
2/subsub
/foo-b.c3
18572 echo ${binwrap3_text} > binwrap
3/sub
2/subsub
/bar-t.c3
18573 echo ${binwrap3_text} > binwrap
3/sub
2/subsub
/foo-b.sb
18574 echo ${binwrap3_text} > binwrap
3/sub
2/subsub
/foo-t.sb
18575 echo ${binwrap3_text} > binwrap
3/sub
2/subsub
/foo-t.c0
18576 echo ${binwrap3_text} > binwrap
3/sub
2/subsub
/foo-t.c1
18577 echo ${binwrap3_text} > binwrap
3/sub
2/subsub
/foo-t.c2
18578 echo ${binwrap3_text} > binwrap
3/sub
2/subsub
/foo-t.st
18580 # Now set up CVSROOT/cvswrappers, the easy way:
18581 dotest binwrap3-1
"${testcvs} -q co CVSROOT" "[UP] CVSROOT${DOTSTAR}"
18583 # This destroys anything currently in cvswrappers, but
18584 # presumably other tests will take care of it themselves if
18585 # they use cvswrappers:
18586 echo "foo-t.sb" > cvswrappers
18587 echo "foo*.sb -k 'b'" >> cvswrappers
18588 dotest binwrap3-2
"${testcvs} -q ci -m cvswrappers-mod" \
18589 "$CVSROOT_DIRNAME/CVSROOT/cvswrappers,v <-- cvswrappers
18590 new revision: 1\.[0-9]*; previous revision: 1\.[0-9]*
18591 $SPROG commit: Rebuilding administrative file database"
18594 # Avoid environmental interference
18595 CVSWRAPPERS_save
=${CVSWRAPPERS}
18600 # Not importing .cvswrappers tests whether the client is really
18601 # letting the server know "honestly" whether the file is binary,
18602 # rather than just letting the server see the .cvswrappers file.
18603 dotest binwrap3-2a \
18604 "${testcvs} import -m . -I .cvswrappers binwrap3 tag1 tag2" \
18607 # OK, now test "cvs add".
18610 dotest binwrap3-2b
"${testcvs} co binwrap3" "${DOTSTAR}"
18613 echo "*.newbin -k 'b'" > .cvswrappers
18614 echo .cvswrappers
>.cvsignore
18615 echo .cvsignore
>>.cvsignore
18616 touch file1.newbin file1.txt
18617 dotest binwrap3-2c
"${testcvs} add file1.newbin file1.txt" \
18618 "${SPROG} add: scheduling file .file1\.newbin. for addition
18619 ${SPROG} add: scheduling file .file1\.txt. for addition
18620 ${SPROG} add: use .${SPROG} commit. to add these files permanently"
18621 dotest binwrap3-2d
"${testcvs} -q ci -m add" \
18622 "$CVSROOT_DIRNAME/binwrap3/sub2/file1\.newbin,v <-- file1\.newbin
18623 initial revision: 1\.1
18624 $CVSROOT_DIRNAME/binwrap3/sub2/file1\.txt,v <-- file1\.txt
18625 initial revision: 1\.1"
18628 # Now check out the module and see which files are binary.
18631 dotest binwrap3-3
"${testcvs} co binwrap3" "${DOTSTAR}"
18634 # Running "cvs status" and matching output is too
18635 # error-prone, too likely to falsely fail. Instead, we'll
18636 # just grep the Entries lines:
18638 dotest binwrap3-top1
"grep foo-b.c0 ./CVS/Entries" \
18639 "/foo-b.c0/1.1.1.1/[A-Za-z0-9 :]*/-kb/"
18641 dotest binwrap3-top2
"grep foo-b.sb ./CVS/Entries" \
18642 "/foo-b.sb/1.1.1.1/[A-Za-z0-9 :]*/-kb/"
18644 dotest binwrap3-top3
"grep foo-t.c1 ./CVS/Entries" \
18645 "/foo-t.c1/1.1.1.1/[A-Za-z0-9 :]*//"
18647 dotest binwrap3-top4
"grep foo-t.st ./CVS/Entries" \
18648 "/foo-t.st/1.1.1.1/[A-Za-z0-9 :]*//"
18650 dotest binwrap3-top5
"grep foo-t.sb ./CVS/Entries" \
18651 "/foo-t.sb/1.1.1.1/[A-Za-z0-9 :]*//"
18653 dotest binwrap3-top6
"grep bar-t.c0 ./CVS/Entries" \
18654 "/bar-t.c0/1.1.1.1/[A-Za-z0-9 :]*//"
18656 dotest binwrap3-sub1-1
"grep foo-b.c1 sub1/CVS/Entries" \
18657 "/foo-b.c1/1.1.1.1/[A-Za-z0-9 :]*/-kb/"
18659 dotest binwrap3-sub1-2
"grep foo-b.sb sub1/CVS/Entries" \
18660 "/foo-b.sb/1.1.1.1/[A-Za-z0-9 :]*/-kb/"
18662 dotest binwrap3-sub1-3
"grep foo-t.c0 sub1/CVS/Entries" \
18663 "/foo-t.c0/1.1.1.1/[A-Za-z0-9 :]*//"
18665 dotest binwrap3-sub1-4
"grep foo-t.st sub1/CVS/Entries" \
18666 "/foo-t.st/1.1.1.1/[A-Za-z0-9 :]*//"
18668 dotest binwrap3-sub1-5
"grep foo-t.sb sub1/CVS/Entries" \
18669 "/foo-t.sb/1.1.1.1/[A-Za-z0-9 :]*//"
18671 dotest binwrap3-sub1-6
"grep bar-t.c1 sub1/CVS/Entries" \
18672 "/bar-t.c1/1.1.1.1/[A-Za-z0-9 :]*//"
18674 dotest binwrap3-sub2-1
"grep foo-b.sb sub2/CVS/Entries" \
18675 "/foo-b.sb/1.1.1.1/[A-Za-z0-9 :]*/-kb/"
18677 dotest binwrap3-sub2-2
"grep foo-b.st sub2/CVS/Entries" \
18678 "/foo-b.st/1.1.1.1/[A-Za-z0-9 :]*/-kb/"
18680 dotest binwrap3-sub2-3
"grep foo-t.c0 sub2/CVS/Entries" \
18681 "/foo-t.c0/1.1.1.1/[A-Za-z0-9 :]*//"
18683 dotest binwrap3-sub2-4
"grep foo-t.c1 sub2/CVS/Entries" \
18684 "/foo-t.c1/1.1.1.1/[A-Za-z0-9 :]*//"
18686 dotest binwrap3-sub2-5
"grep foo-t.c2 sub2/CVS/Entries" \
18687 "/foo-t.c2/1.1.1.1/[A-Za-z0-9 :]*//"
18689 dotest binwrap3-sub2-6
"grep foo-t.c3 sub2/CVS/Entries" \
18690 "/foo-t.c3/1.1.1.1/[A-Za-z0-9 :]*//"
18692 dotest binwrap3-sub2-7
"grep foo-t.sb sub2/CVS/Entries" \
18693 "/foo-t.sb/1.1.1.1/[A-Za-z0-9 :]*//"
18695 dotest binwrap3-sub2-8
"grep bar-t.st sub2/CVS/Entries" \
18696 "/bar-t.st/1.1.1.1/[A-Za-z0-9 :]*//"
18698 dotest binwrap3-subsub1
"grep foo-b.c3 sub2/subsub/CVS/Entries" \
18699 "/foo-b.c3/1.1.1.1/[A-Za-z0-9 :]*/-kb/"
18701 dotest binwrap3-subsub2
"grep foo-b.sb sub2/subsub/CVS/Entries" \
18702 "/foo-b.sb/1.1.1.1/[A-Za-z0-9 :]*/-kb/"
18704 dotest binwrap3-subsub3
"grep foo-t.c0 sub2/subsub/CVS/Entries" \
18705 "/foo-t.c0/1.1.1.1/[A-Za-z0-9 :]*//"
18707 dotest binwrap3-subsub4
"grep foo-t.c1 sub2/subsub/CVS/Entries" \
18708 "/foo-t.c1/1.1.1.1/[A-Za-z0-9 :]*//"
18710 dotest binwrap3-subsub5
"grep foo-t.c2 sub2/subsub/CVS/Entries" \
18711 "/foo-t.c2/1.1.1.1/[A-Za-z0-9 :]*//"
18713 dotest binwrap3-subsub6
"grep foo-t.st sub2/subsub/CVS/Entries" \
18714 "/foo-t.st/1.1.1.1/[A-Za-z0-9 :]*//"
18716 dotest binwrap3-subsub7
"grep foo-t.sb sub2/subsub/CVS/Entries" \
18717 "/foo-t.sb/1.1.1.1/[A-Za-z0-9 :]*//"
18719 dotest binwrap3-subsub8
"grep bar-t.c3 sub2/subsub/CVS/Entries" \
18720 "/bar-t.c3/1.1.1.1/[A-Za-z0-9 :]*//"
18722 dotest binwrap3-sub2-add1
"grep file1.newbin sub2/CVS/Entries" \
18723 "/file1.newbin/1.1/[A-Za-z0-9 :]*/-kb/"
18724 dotest binwrap3-sub2-add2
"grep file1.txt sub2/CVS/Entries" \
18725 "/file1.txt/1.1/[A-Za-z0-9 :]*//"
18727 # Restore and clean up
18730 rm -r binwrap3 CVSROOT
18733 modify_repo
rm -rf $CVSROOT_DIRNAME/binwrap3
18734 CVSWRAPPERS
=${CVSWRAPPERS_save}
18740 # Tests of various wrappers features:
18741 # -m 'COPY' and cvs update: mwrap
18742 # -m 'COPY' and joining: mcopy
18743 # -k: binwrap, binwrap2
18744 # -t/-f: hasn't been written yet.
18746 # Tests of different ways of specifying wrappers:
18747 # CVSROOT/cvswrappers: mwrap
18748 # -W: binwrap, binwrap2
18749 # .cvswrappers in working directory, local: mcopy
18750 # CVSROOT/cvswrappers, .cvswrappers remote: binwrap3
18751 # CVSWRAPPERS environment variable: mcopy
18753 # This test is similar to binfiles-con1; -m 'COPY' specifies
18754 # non-mergeableness the same way that -kb does.
18756 # On Windows, we can't check out CVSROOT, because the case
18757 # insensitivity means that this conflicts with cvsroot.
18761 dotest mwrap-c1
"${testcvs} -q co CVSROOT" "[UP] CVSROOT${DOTSTAR}"
18763 echo "* -m 'COPY'" >>cvswrappers
18764 dotest mwrap-c2
"${testcvs} -q ci -m wrapper-mod" \
18765 "$CVSROOT_DIRNAME/CVSROOT/cvswrappers,v <-- cvswrappers
18766 new revision: 1\.[0-9]*; previous revision: 1\.[0-9]*
18767 $SPROG commit: Rebuilding administrative file database"
18770 dotest mwrap-1
"${testcvs} -q co -l ." ''
18772 dotest mwrap-2
"${testcvs} add first-dir" \
18773 "Directory ${CVSROOT_DIRNAME}/first-dir added to the repository"
18776 dotest mwrap-3
"${testcvs} add aa" \
18777 "${SPROG} add: scheduling file .aa. for addition
18778 ${SPROG} add: use .${SPROG} commit. to add this file permanently"
18779 dotest mwrap-4
"${testcvs} -q ci -m add" \
18780 "$CVSROOT_DIRNAME/first-dir/aa,v <-- aa
18781 initial revision: 1\.1"
18784 dotest mwrap-5
"${testcvs} -q co first-dir" "U first-dir/aa"
18786 echo "changed in m2" >aa
18787 dotest mwrap-6
"${testcvs} -q ci -m m2-mod" \
18788 "$CVSROOT_DIRNAME/first-dir/aa,v <-- aa
18789 new revision: 1\.2; previous revision: 1\.1"
18792 echo "changed in m1" >aa
18793 dotest mwrap-7
"$testcvs -nq update" \
18794 "$SPROG update: nonmergeable file needs merge
18795 $SPROG update: revision 1\.2 from repository is now in aa
18796 $SPROG update: file from working directory is now in \.#aa\.1\.1
18798 dotest mwrap-8
"$testcvs -q update" \
18799 "$SPROG update: nonmergeable file needs merge
18800 $SPROG update: revision 1\.2 from repository is now in aa
18801 $SPROG update: file from working directory is now in \.#aa\.1\.1
18803 dotest mwrap-9
"cat aa" "changed in m2"
18804 dotest mwrap-10
"cat .#aa.1.1" "changed in m1"
18813 modify_repo
rm -rf $CVSROOT_DIRNAME/first-dir
18819 # Administrative file tests.
18820 # Here is a list of where each administrative file is tested:
18822 # modules: modules, modules2, modules3
18823 # cvsignore: ignore
18825 # cvswrappers: mwrap
18829 # postwatch: devcom3
18831 # config2: MinCompressionLevel and MaxCompressionLevel in config
18833 # On Windows, we can't check out CVSROOT, because the case
18834 # insensitivity means that this conflicts with cvsroot.
18838 dotest info-1
"$testcvs -q co CVSROOT" "[UP] CVSROOT${DOTSTAR}"
18840 dotest info-2
"$testcvs -Q tag info-start"
18841 sed -e's/%p/ALL/' <loginfo
>tmploginfo
18842 mv tmploginfo loginfo
18843 echo "ALL sh -c \"echo x\${=MYENV}\${=OTHER}y\${=ZEE}=\$USER=\$COMMITID=\$SESSIONID=\$CVSROOT= >>$TESTDIR/testlog; cat >/dev/null\"" >> loginfo
18844 # The following cases test the format string substitution
18845 echo "ALL echo %{} >>$TESTDIR/testlog2; cat >/dev/null" >> loginfo
18846 echo "ALL echo %x >>$TESTDIR/testlog2; cat >/dev/null" >> loginfo
18847 echo "ALL echo % >>$TESTDIR/testlog2; cat >/dev/null" >> loginfo
18848 echo "ALL echo %{sxVv} >>$TESTDIR/testlog2; cat >/dev/null" >> loginfo
18849 echo "ALL echo %{v} >>$TESTDIR/testlog2; cat >/dev/null" >> loginfo
18850 echo "ALL echo %s %s >>$TESTDIR/testlog2; cat >/dev/null" >> loginfo
18851 echo "ALL echo %{V}AX >>$TESTDIR/testlog2; cat >/dev/null" >> loginfo
18852 echo "first-dir echo %sux >>$TESTDIR/testlog2; cat >/dev/null" \
18854 sed -e's/^UseNewInfoFmtStrings=yes$/#&/' <config
>tmpconfig
18855 mv tmpconfig config
18857 # Might be nice to move this to crerepos tests; it should
18858 # work to create a loginfo file if you didn't create one
18860 : dotest info-2
"$testcvs add loginfo" \
18861 "$SPROG add: scheduling file \`loginfo' for addition
18862 $SPROG add: use \`$SPROG commit' to add this file permanently"
18864 dotest_fail info-3
"$testcvs -q ci -m new-loginfo" \
18865 "$TESTDIR/cvsroot/CVSROOT/config,v <-- config
18866 new revision: 1\.[0-9]*; previous revision: 1\.[0-9]*
18867 $CVSROOT_DIRNAME/CVSROOT/loginfo,v <-- loginfo
18868 new revision: 1\.[0-9]*; previous revision: 1\.[0-9]*
18869 $SPROG commit: Rebuilding administrative file database
18870 $SPROG commit: loginfo:[0-9]*: no such user variable \${=MYENV}
18871 $SPROG \[commit aborted\]: Unknown format character in info file ('').
18872 Info files are the hook files, verifymsg, taginfo, commitinfo, etc\."
18875 modify_repo mkdir
$CVSROOT_DIRNAME/first-dir
18876 dotest info-5
"$testcvs -q co first-dir" ''
18879 dotest info-6
"$testcvs add file1" \
18880 "$SPROG add: scheduling file \`file1' for addition
18881 $SPROG add: use \`$SPROG commit' to add this file permanently"
18882 echo "cvs -s OTHER=not-this -s MYENV=env-" >>$HOME/.cvsrc
18883 dotest info-6b
"$testcvs -q -s OTHER=value ci -m add-it" \
18884 "$CVSROOT_DIRNAME/first-dir/file1,v <-- file1
18885 initial revision: 1\.1
18886 $SPROG commit: loginfo:[0-9]*: no such user variable \${=ZEE}
18887 $SPROG commit: warning: Set to use deprecated info format strings\. Establish
18888 compatibility with the new info file format strings (add a temporary .1. in
18889 all info files after each .%. which doesn.t represent a literal percent)
18890 and set UseNewInfoFmtStrings=yes in CVSROOT/config\. After that, convert
18891 individual command lines and scripts to handle the new format at your
18893 "$CVSROOT_DIRNAME/first-dir/file1,v <-- file1
18894 initial revision: 1\.1
18895 $SPROG commit: warning: Set to use deprecated info format strings\. Establish
18896 compatibility with the new info file format strings (add a temporary .1. in
18897 all info files after each .%. which doesn.t represent a literal percent)
18898 and set UseNewInfoFmtStrings=yes in CVSROOT/config\. After that, convert
18899 individual command lines and scripts to handle the new format at your
18901 $SPROG commit: loginfo:[0-9]*: no such user variable \${=ZEE}"
18903 dotest info-6c
"$testcvs -q -sOTHER=foo ci -m mod-it" \
18904 "$CVSROOT_DIRNAME/first-dir/file1,v <-- file1
18905 new revision: 1\.2; previous revision: 1\.1
18906 $SPROG commit: loginfo:[0-9]*: no such user variable \${=ZEE}
18907 $SPROG commit: warning: Set to use deprecated info format strings\. Establish
18908 compatibility with the new info file format strings (add a temporary .1. in
18909 all info files after each .%. which doesn.t represent a literal percent)
18910 and set UseNewInfoFmtStrings=yes in CVSROOT/config\. After that, convert
18911 individual command lines and scripts to handle the new format at your
18913 "$CVSROOT_DIRNAME/first-dir/file1,v <-- file1
18914 new revision: 1\.2; previous revision: 1\.1
18915 $SPROG commit: warning: Set to use deprecated info format strings\. Establish
18916 compatibility with the new info file format strings (add a temporary .1. in
18917 all info files after each .%. which doesn.t represent a literal percent)
18918 and set UseNewInfoFmtStrings=yes in CVSROOT/config\. After that, convert
18919 individual command lines and scripts to handle the new format at your
18921 $SPROG commit: loginfo:[0-9]*: no such user variable \${=ZEE}"
18923 dotest info-7
"${testcvs} -q -s OTHER=value -s ZEE=z ci -m mod-it" \
18924 "$CVSROOT_DIRNAME/first-dir/file1,v <-- file1
18925 new revision: 1\.3; previous revision: 1\.2
18926 $SPROG commit: warning: Set to use deprecated info format strings\. Establish
18927 compatibility with the new info file format strings (add a temporary .1. in
18928 all info files after each .%. which doesn.t represent a literal percent)
18929 and set UseNewInfoFmtStrings=yes in CVSROOT/config\. After that, convert
18930 individual command lines and scripts to handle the new format at your
18934 dotest info-9
"cat $TESTDIR/testlog" \
18935 "xenv-valueyz=${username}=${commitid}=${commitid}=${CVSROOT_DIRNAME}="
18936 dotest info-10
"cat $TESTDIR/testlog2" \
18940 first-dir file1,,NONE,1.1
18948 first-dir file1,,1.1,1.2
18956 first-dir file1,,1.2,1.3
18962 # and make sure adding a '1' in the format strings really does ensure
18963 # ensure backwards compatibility.
18965 # these tests are identical to the above except for the loginfo setup
18966 # and the project name
18968 dotest info-setup-intfmt-1
"$testcvs -q up -prinfo-start config >config"
18969 dotest info-setup-intfmt-2
"$testcvs -q up -prinfo-start loginfo >loginfo"
18970 sed -e's/%p/ALL/' <loginfo
>tmploginfo
18971 mv tmploginfo loginfo
18972 echo "ALL sh -c \"echo x\${=MYENV}\${=OTHER}y\${=ZEE}=\$USER=\$CVSROOT= >>$TESTDIR/testlog; cat >/dev/null\"" >> loginfo
18973 # The following cases test the format string substitution
18974 echo "ALL echo %1{} >>$TESTDIR/testlog2; cat >/dev/null" >> loginfo
18975 echo "ALL echo %1x >>$TESTDIR/testlog2; cat >/dev/null" >> loginfo
18976 echo "ALL echo %1 >>$TESTDIR/testlog2; cat >/dev/null" >> loginfo
18977 echo "ALL echo %1{sxVv} >>$TESTDIR/testlog2; cat >/dev/null" >> loginfo
18978 echo "ALL echo %1{v} >>$TESTDIR/testlog2; cat >/dev/null" >> loginfo
18979 echo "ALL echo %1s %%s >>$TESTDIR/testlog2; cat >/dev/null" >> loginfo
18980 echo "ALL echo %1{V}AX >>$TESTDIR/testlog2; cat >/dev/null" >> loginfo
18981 echo "third-dir echo %1sux >>$TESTDIR/testlog2; cat >/dev/null" \
18984 dotest info-setup-intfmt-2
"${testcvs} -q -s ZEE=garbage ci -m nuke-admin-for-info-intfmt" \
18985 "$TESTDIR/cvsroot/CVSROOT/config,v <-- config
18986 new revision: 1\.[0-9]*; previous revision: 1\.[0-9]*
18987 $TESTDIR/cvsroot/CVSROOT/loginfo,v <-- loginfo
18988 new revision: 1\.[0-9]*; previous revision: 1\.[0-9]*
18989 $SPROG commit: Rebuilding administrative file database
18990 $SPROG commit: warning: Set to use deprecated info format strings\. Establish
18991 compatibility with the new info file format strings (add a temporary .1. in
18992 all info files after each .%. which doesn.t represent a literal percent)
18993 and set UseNewInfoFmtStrings=yes in CVSROOT/config\. After that, convert
18994 individual command lines and scripts to handle the new format at your
18998 # delete the logs now so the results look more like the last tests
18999 # (they won't include the config file update)
19000 rm ${TESTDIR}/testlog
${TESTDIR}/testlog2
19002 modify_repo mkdir
$CVSROOT_DIRNAME/third-dir
19003 dotest info-intfmt-5
"${testcvs} -q co third-dir" ''
19006 dotest info-intfmt-6
"${testcvs} add file1" \
19007 "${SPROG}"' add: scheduling file `file1'\'' for addition
19008 '"${SPROG}"' add: use .'"${SPROG}"' commit. to add this file permanently'
19009 echo "cvs -s OTHER=not-this -s MYENV=env-" >>$HOME/.cvsrc
19010 dotest info-intfmt-6b
"${testcvs} -q -s OTHER=value ci -m add-it" \
19011 "${TESTDIR}/cvsroot/third-dir/file1,v <-- file1
19012 initial revision: 1\.1
19013 ${SPROG} commit: loginfo:[0-9]*: no such user variable \${=ZEE}
19014 ${SPROG} commit: Using deprecated info format strings\. Convert your scripts to use
19015 the new argument format and remove '1's from your info file format strings\.
19016 ${SPROG} commit: Using deprecated info format strings\. Convert your scripts to use
19017 the new argument format and remove '1's from your info file format strings\.
19018 ${SPROG} commit: Using deprecated info format strings\. Convert your scripts to use
19019 the new argument format and remove '1's from your info file format strings\.
19020 ${SPROG} commit: Using deprecated info format strings\. Convert your scripts to use
19021 the new argument format and remove '1's from your info file format strings\.
19022 ${SPROG} commit: Using deprecated info format strings\. Convert your scripts to use
19023 the new argument format and remove '1's from your info file format strings\.
19024 ${SPROG} commit: Using deprecated info format strings\. Convert your scripts to use
19025 the new argument format and remove '1's from your info file format strings\.
19026 ${SPROG} commit: Using deprecated info format strings\. Convert your scripts to use
19027 the new argument format and remove '1's from your info file format strings\.
19028 ${SPROG} commit: Using deprecated info format strings\. Convert your scripts to use
19029 the new argument format and remove '1's from your info file format strings\."
19031 dotest info-intfmt-6c
"${testcvs} -q -sOTHER=foo ci -m mod-it" \
19032 "${TESTDIR}/cvsroot/third-dir/file1,v <-- file1
19033 new revision: 1\.2; previous revision: 1\.1
19034 ${SPROG} commit: loginfo:[0-9]*: no such user variable \${=ZEE}
19035 ${SPROG} commit: Using deprecated info format strings\. Convert your scripts to use
19036 the new argument format and remove '1's from your info file format strings\.
19037 ${SPROG} commit: Using deprecated info format strings\. Convert your scripts to use
19038 the new argument format and remove '1's from your info file format strings\.
19039 ${SPROG} commit: Using deprecated info format strings\. Convert your scripts to use
19040 the new argument format and remove '1's from your info file format strings\.
19041 ${SPROG} commit: Using deprecated info format strings\. Convert your scripts to use
19042 the new argument format and remove '1's from your info file format strings\.
19043 ${SPROG} commit: Using deprecated info format strings\. Convert your scripts to use
19044 the new argument format and remove '1's from your info file format strings\.
19045 ${SPROG} commit: Using deprecated info format strings\. Convert your scripts to use
19046 the new argument format and remove '1's from your info file format strings\.
19047 ${SPROG} commit: Using deprecated info format strings\. Convert your scripts to use
19048 the new argument format and remove '1's from your info file format strings\.
19049 ${SPROG} commit: Using deprecated info format strings\. Convert your scripts to use
19050 the new argument format and remove '1's from your info file format strings\."
19052 dotest info-intfmt-7
"${testcvs} -q -s OTHER=value -s ZEE=z ci -m mod-it" \
19053 "${TESTDIR}/cvsroot/third-dir/file1,v <-- file1
19054 new revision: 1\.3; previous revision: 1\.2
19055 ${SPROG} commit: Using deprecated info format strings\. Convert your scripts to use
19056 the new argument format and remove '1's from your info file format strings\.
19057 ${SPROG} commit: Using deprecated info format strings\. Convert your scripts to use
19058 the new argument format and remove '1's from your info file format strings\.
19059 ${SPROG} commit: Using deprecated info format strings\. Convert your scripts to use
19060 the new argument format and remove '1's from your info file format strings\.
19061 ${SPROG} commit: Using deprecated info format strings\. Convert your scripts to use
19062 the new argument format and remove '1's from your info file format strings\.
19063 ${SPROG} commit: Using deprecated info format strings\. Convert your scripts to use
19064 the new argument format and remove '1's from your info file format strings\.
19065 ${SPROG} commit: Using deprecated info format strings\. Convert your scripts to use
19066 the new argument format and remove '1's from your info file format strings\.
19067 ${SPROG} commit: Using deprecated info format strings\. Convert your scripts to use
19068 the new argument format and remove '1's from your info file format strings\.
19069 ${SPROG} commit: Using deprecated info format strings\. Convert your scripts to use
19070 the new argument format and remove '1's from your info file format strings\."
19073 dotest info-intfmt-9
"cat $TESTDIR/testlog" "xenv-valueyz=${username}=${TESTDIR}/cvsroot="
19074 dotest info-intfmt-10
"cat $TESTDIR/testlog2" \
19078 third-dir file1,,NONE,1.1
19086 third-dir file1,,1.1,1.2
19094 third-dir file1,,1.2,1.3
19100 rm ${TESTDIR}/testlog
${TESTDIR}/testlog2
19102 # test the new format strings too
19104 dotest info-setup-newfmt-1
"$testcvs -q up -prinfo-start loginfo >loginfo"
19105 echo "ALL sh -c \"echo x\${=MYENV}\${=OTHER}y\${=ZEE}=\$USER=\$CVSROOT= >>$TESTDIR/testlog; cat >/dev/null\" %{sVv}" >> loginfo
19106 # The following cases test the format string substitution
19107 echo "ALL echo %p \"%{sTVv}\" >>$TESTDIR/testlog2; cat >/dev/null" >> loginfo
19108 echo "ALL echo %{v} >>$TESTDIR/testlog2; cat >/dev/null" >> loginfo
19109 echo "ALL echo %s >>$TESTDIR/testlog2; cat >/dev/null" >> loginfo
19110 echo "ALL echo %{V}AX >>$TESTDIR/testlog2; cat >/dev/null" >> loginfo
19111 echo "second-dir echo %sux >>$TESTDIR/testlog2; cat >/dev/null" >> loginfo
19112 dotest info-setup-newfmt-2
"$testcvs -q -s ZEE=garbage ci -m nuke-admin-for-info-newfmt" \
19113 "${CVSROOT_DIRNAME}/CVSROOT/loginfo,v <-- loginfo
19114 new revision: 1\.[0-9]*; previous revision: 1\.[0-9]*
19115 ${SPROG} commit: Rebuilding administrative file database"
19118 # delete the logs now so the results look more like the last tests
19119 # (they won't include the config file update)
19120 rm ${TESTDIR}/testlog
${TESTDIR}/testlog2
19122 modify_repo mkdir
$CVSROOT_DIRNAME/fourth-dir
19123 dotest info-newfmt-1
"${testcvs} -q co fourth-dir" ''
19126 dotest info-newfmt-2
"${testcvs} add file1" \
19127 "${SPROG}"' add: scheduling file `file1'\'' for addition
19128 '"${SPROG}"' add: use .'"${SPROG}"' commit. to add this file permanently'
19129 echo "cvs -s OTHER=not-this -s MYENV=env-" >>$HOME/.cvsrc
19130 dotest info-newfmt-3
"$testcvs -q -s OTHER=value ci -m add-it" \
19131 "$TESTDIR/cvsroot/fourth-dir/file1,v <-- file1
19132 initial revision: 1\.1
19133 $SPROG commit: loginfo:[0-9]*: no such user variable \${=ZEE}"
19135 dotest info-newfmt-4
"$testcvs -q -sOTHER=foo ci -m mod-it" \
19136 "$TESTDIR/cvsroot/fourth-dir/file1,v <-- file1
19137 new revision: 1\.2; previous revision: 1\.1
19138 $SPROG commit: loginfo:[0-9]*: no such user variable \${=ZEE}"
19140 dotest info-newfmt-5
"${testcvs} -q -s OTHER=value -s ZEE=z ci -m mod-it" \
19141 "${TESTDIR}/cvsroot/fourth-dir/file1,v <-- file1
19142 new revision: 1\.3; previous revision: 1\.2"
19145 dotest info-newfmt-6
"cat $TESTDIR/testlog" \
19146 "xenv-valueyz=${username}=${TESTDIR}/cvsroot="
19147 dotest info-newfmt-7
"cat $TESTDIR/testlog2" \
19148 'fourth-dir file1 NONE 1\.1
19152 fourth-dir file1 1\.1 1\.2
19156 fourth-dir file1 1\.2 1\.3
19161 # clean up after newfmt tests
19163 dotest info-cleanup-newfmt-1
"$testcvs -q up -prinfo-start loginfo >loginfo"
19164 dotest info-cleanup-newfmt-2
"$testcvs -q ci -m nuke-loginfo" \
19165 "$CVSROOT_DIRNAME/CVSROOT/loginfo,v <-- loginfo
19166 new revision: 1\.[0-9]*; previous revision: 1\.[0-9]*
19167 $SPROG commit: Rebuilding administrative file database"
19169 # clean up the logs
19170 rm ${TESTDIR}/testlog
${TESTDIR}/testlog2
19172 # Now test verifymsg
19173 cat >${TESTDIR}/vscript
<<EOF
19176 if sed 1q < \$1 | grep '^BugId:[ ]*[0-9][0-9]*$' > /dev/null; then
19178 elif sed 1q < \$1 | grep '^BugId:[ ]*new$' > /dev/null; then
19179 echo A new bugid was found. >> \$1
19182 echo "No BugId found."
19187 cat >${TESTDIR}/vscript2
<<EOF
19189 echo vscript2 "\$@"
19190 if test -f CVS/Repository; then
19191 repo=\`cat CVS/Repository\`
19196 if echo "\$repo" |grep yet-another/ >/dev/null 2>&1; then
19202 # Grumble, grumble, mumble, search for "Cygwin".
19203 if test -n "$remotehost"; then
19204 $CVS_RSH $remotehost "chmod +x ${TESTDIR}/vscript*"
19206 chmod +x
${TESTDIR}/vscript
*
19208 echo "^first-dir/yet-another\\(/\\|\$\\) ${TESTDIR}/vscript2 %l %{sV}" >verifymsg
19209 echo "^first-dir\\(/\\|\$\\) ${TESTDIR}/vscript %l %{sV}" >>verifymsg
19210 echo "^missing-script\$ ${TESTDIR}/bogus %l" >>verifymsg
19211 echo "^missing-var\$ ${TESTDIR}/vscript %l \${=Bogus}" >>verifymsg
19212 # first test the directory independant verifymsg
19213 dotest info-v1
"${testcvs} -q ci -m add-verification" \
19214 "$CVSROOT_DIRNAME/CVSROOT/verifymsg,v <-- verifymsg
19215 new revision: 1\.[0-9]*; previous revision: 1\.[0-9]*
19216 $SPROG commit: Rebuilding administrative file database"
19220 dotest_fail info-v2
"${testcvs} -q ci -m bogus" \
19221 "vscript $tempname file1 1\.3
19223 ${SPROG} \[commit aborted\]: Message verification failed"
19225 cat >${TESTDIR}/comment.tmp
<<EOF
19227 and many more lines after it
19229 dotest info-v3
"${testcvs} -q ci -F ${TESTDIR}/comment.tmp" \
19230 "vscript $tempname file1 1\.3
19231 $CVSROOT_DIRNAME/first-dir/file1,v <-- file1
19232 new revision: 1\.4; previous revision: 1\.3"
19233 rm ${TESTDIR}/comment.tmp
19239 dotest_fail info-v4 \
19240 "${testcvs} import -m bogus first-dir/another x y" \
19241 "vscript $tempname - Imported sources NONE
19243 ${SPROG} \[import aborted\]: Message verification failed"
19245 # now verify that directory dependent verifymsgs work
19247 "${testcvs} import -m bogus first-dir/yet-another x y" \
19248 "vscript2 $tempname - Imported sources NONE
19249 $TESTDIR/wnt/another-dir
19250 N first-dir/yet-another/file2
19252 No conflicts created by this import" \
19253 "vscript2 $tempname - Imported sources NONE
19254 $CVSROOT_DIRNAME/first-dir/yet-another
19255 N first-dir/yet-another/file2
19257 No conflicts created by this import"
19261 # note that in the local case the error message is the same as
19264 # This means that the verifymsg scripts cannot reliably and
19265 # consistantly obtain information on which directory is being
19266 # committed to. Thus it is currently useless for them to be
19267 # running in every dir. They should either be run once or
19268 # directory information should be passed.
19270 dotest_fail info-v6r \
19271 "${testcvs} import -m bogus first-dir/yet-another/and-another x y" \
19272 "vscript2 $tempname - Imported sources NONE
19273 $CVSROOT_DIRNAME/first-dir/yet-another/and-another
19274 $SPROG \[import aborted\]: Message verification failed"
19277 "${testcvs} import -m bogus first-dir/yet-another/and-another x y" \
19278 "vscript2 $tempname - Imported sources NONE
19279 $TESTDIR/wnt/another-dir
19280 N first-dir/yet-another/and-another/file2
19282 No conflicts created by this import"
19285 # check that errors invoking the script cause verification failure
19287 # The second text below occurs on Cygwin, where I assume execvp
19288 # does not return to let CVS print the error message when its
19289 # argument does not exist.
19290 dotest_fail info-v7
"${testcvs} import -m bogus missing-script x y" \
19291 "${SPROG} import: cannot exec ${TESTDIR}/bogus: No such file or directory
19292 ${SPROG} \[import aborted\]: Message verification failed" \
19293 "${SPROG} \[import aborted\]: Message verification failed"
19295 dotest_fail info-v8
"${testcvs} import -m bogus missing-var x y" \
19296 "${SPROG} import: verifymsg:4: no such user variable \${=Bogus}
19297 ${SPROG} \[import aborted\]: Message verification failed"
19304 echo "RereadLogAfterVerify=always" >>config
19305 dotest info-rereadlog-1
"${testcvs} -q ci -m add-RereadLogAfterVerify=always" \
19306 "$CVSROOT_DIRNAME/CVSROOT/config,v <-- config
19307 new revision: 1\.[0-9]*; previous revision: 1\.[0-9]*
19308 $SPROG commit: Rebuilding administrative file database"
19311 cat >${TESTDIR}/comment.tmp
<<EOF
19313 See what happens next.
19315 dotest info-reread-2
"${testcvs} -q ci -F ${TESTDIR}/comment.tmp" \
19316 "vscript $tempname file1 1\.4
19317 $CVSROOT_DIRNAME/first-dir/file1,v <-- file1
19318 new revision: 1\.5; previous revision: 1\.4"
19319 dotest info-reread-3
"${testcvs} -q log -N -r1.5 file1" "
19322 See what happens next.
19323 A new bugid was found.
19324 ============================================================================="
19327 grep -v "RereadLogAfterVerify" config
> config.new
19328 mv config.new config
19329 echo "RereadLogAfterVerify=stat" >>config
19330 dotest info-reread-4 \
19331 "$testcvs -q ci -m add-RereadLogAfterVerify=stat" \
19332 "$CVSROOT_DIRNAME/CVSROOT/config,v <-- config
19333 new revision: 1\.[0-9]*; previous revision: 1\.[0-9]*
19334 $SPROG commit: Rebuilding administrative file database"
19337 cat >${TESTDIR}/comment.tmp
<<EOF
19339 See what happens next with stat.
19341 dotest info-reread-5
"${testcvs} -q ci -F ${TESTDIR}/comment.tmp" \
19342 "vscript $tempname file1 1\.5
19343 $CVSROOT_DIRNAME/first-dir/file1,v <-- file1
19344 new revision: 1\.6; previous revision: 1\.5"
19345 dotest info-reread-6
"${testcvs} -q log -N -r1.6 file1" "
19348 See what happens next with stat.
19349 A new bugid was found.
19350 ============================================================================="
19353 grep -v "RereadLogAfterVerify" config
> config.new
19354 mv config.new config
19355 echo "RereadLogAfterVerify=never" >>config
19356 dotest info-reread-7 \
19357 "$testcvs -q ci -m add-RereadLogAfterVerify=never" \
19358 "$CVSROOT_DIRNAME/CVSROOT/config,v <-- config
19359 new revision: 1\.[0-9]*; previous revision: 1\.[0-9]*
19360 $SPROG commit: Rebuilding administrative file database"
19363 cat >${TESTDIR}/comment.tmp
<<EOF
19365 See what happens next.
19367 dotest info-reread-8
"${testcvs} -q ci -F ${TESTDIR}/comment.tmp" \
19368 "vscript $tempname file1 1\.6
19369 $CVSROOT_DIRNAME/first-dir/file1,v <-- file1
19370 new revision: 1\.7; previous revision: 1\.6"
19371 dotest info-reread-6
"${testcvs} -q log -N -r1.7 file1" "
19374 See what happens next.
19375 ============================================================================="
19378 dotest info-reread-cleanup-1
"$testcvs -q up -prinfo-start config >config"
19379 # Append the NULL format string until we remove the deprecation
19380 # warning for lack of format strings.
19381 echo 'DEFAULT false %n' >verifymsg
19382 echo 'DEFAULT true %n' >>verifymsg
19383 dotest info-multdef
"${testcvs} -q ci -m multdef" \
19384 "$CVSROOT_DIRNAME/CVSROOT/config,v <-- config
19385 new revision: 1\.[0-9]*; previous revision: 1\.[0-9]*
19386 $CVSROOT_DIRNAME/CVSROOT/verifymsg,v <-- verifymsg
19387 new revision: 1\.[0-9]*; previous revision: 1\.[0-9]*
19388 $SPROG commit: Rebuilding administrative file database"
19391 dotest info-reread--cleanup-1 \
19392 "$testcvs -q up -prinfo-start verifymsg >verifymsg"
19393 dotest info-cleanup-verifymsg
"$testcvs -q ci -m nuke-verifymsg" \
19394 "$SPROG commit: Multiple .DEFAULT. lines (1 and 2) in verifymsg file
19395 $CVSROOT_DIRNAME/CVSROOT/verifymsg,v <-- verifymsg
19396 new revision: 1\.[0-9]*; previous revision: 1\.[0-9]*
19397 $SPROG commit: Rebuilding administrative file database"
19400 rm ${TESTDIR}/vscript
*
19403 dotest info-cleanup-0
"$testcvs -n release -d CVSROOT" \
19404 "You have \[0\] altered files in this repository\."
19406 dotest info-cleanup-1 \
19407 "echo yes |${testcvs} -q release -d CVSROOT >/dev/null"
19408 dotest info-cleanup-2 \
19409 "echo yes |${testcvs} -q release -d first-dir >/dev/null"
19410 dotest info-cleanup-3 \
19411 "echo yes |${testcvs} -q release -d third-dir >/dev/null"
19412 dotest info-cleanup-4 \
19413 "echo yes |${testcvs} -q release -d fourth-dir >/dev/null"
19419 modify_repo
rm -rf $CVSROOT_DIRNAME/first-dir \
19420 $CVSROOT_DIRNAME/third-dir \
19421 $CVSROOT_DIRNAME/fourth-dir
19427 # Tests of the CVSROOT/taginfo file. See the comment at the
19428 # "info" tests for a full list of administrative file tests.
19430 # all the oldfmt stuff can come out once we finish deprecating
19431 # the old info file command line format stuff.
19433 # grep the code for SUPPORT_OLD_INFO_FMT_STRINGS and see the stuff
19434 # in configure.in about oldinfoformatsupport
19437 dotest taginfo-init-1
"$testcvs -q co CVSROOT" "U CVSROOT/$DOTSTAR"
19439 dotest taginfo-init-2
"$testcvs -Q tag taginfo-start"
19440 cat >$TESTDIR/1/loggit
<<EOF
19442 if test "\$1" = rejectme; then
19445 echo "\$@" >>$TESTDIR/1/taglog
19450 if test -n "$remotehost"; then
19451 $CVS_RSH $remotehost "chmod +x ${TESTDIR}/1/loggit"
19453 chmod +x
${TESTDIR}/1/loggit
19455 echo "ALL ${TESTDIR}/1/loggit" >>taginfo
19456 sed -e's/^UseNewInfoFmtStrings=yes$/#&/' <config
>tmpconfig
19457 mv tmpconfig config
19458 sed -e's/%p/ALL/' <loginfo
>tmploginfo
19459 mv tmploginfo loginfo
19460 dotest taginfo-2
"${testcvs} -q ci -m check-in-taginfo" \
19461 "$TESTDIR/cvsroot/CVSROOT/config,v <-- config
19462 new revision: 1\.[0-9]*; previous revision: 1\.[0-9]*
19463 $CVSROOT_DIRNAME/CVSROOT/loginfo,v <-- loginfo
19464 new revision: 1\.[0-9]*; previous revision: 1\.[0-9]*
19465 $CVSROOT_DIRNAME/CVSROOT/taginfo,v <-- taginfo
19466 new revision: 1\.[0-9]*; previous revision: 1\.[0-9]*
19467 $SPROG commit: Rebuilding administrative file database"
19470 # taginfo-3 used to rely on the top-level CVS directory
19471 # being created to add "first-dir" to the repository. Since
19472 # that won't happen anymore, we create the directory in the
19474 modify_repo mkdir
$CVSROOT_DIRNAME/first-dir
19475 dotest taginfo-3
"$testcvs -q co first-dir"
19479 dotest taginfo-4
"${testcvs} add file1" \
19480 "${SPROG} add: scheduling file .file1. for addition
19481 ${SPROG} add: use .${SPROG} commit. to add this file permanently"
19482 dotest taginfo-5
"${testcvs} -q ci -m add-it" \
19483 "$CVSROOT_DIRNAME/first-dir/file1,v <-- file1
19484 initial revision: 1\.1" \
19485 "$CVSROOT_DIRNAME/first-dir/file1,v <-- file1
19486 initial revision: 1\.1
19487 $SPROG commit: warning: Set to use deprecated info format strings\. Establish
19488 compatibility with the new info file format strings (add a temporary '1' in
19489 all info files after each '%' which doesn't represent a literal percent)
19490 and set UseNewInfoFmtStrings=yes in CVSROOT/config\. After that, convert
19491 individual command lines and scripts to handle the new format at your
19493 dotest taginfo-6
"${testcvs} -q tag tag1" \
19494 "${SPROG} tag: warning: taginfo line contains no format strings:
19495 \"${TESTDIR}/1/loggit\"
19496 Filling in old defaults ('%t %o %p %{sv}'), but please be aware that this
19497 usage is deprecated\.
19499 dotest taginfo-7
"${testcvs} -q tag -b br" \
19500 "${SPROG} tag: warning: taginfo line contains no format strings:
19501 \"${TESTDIR}/1/loggit\"
19502 Filling in old defaults ('%t %o %p %{sv}'), but please be aware that this
19503 usage is deprecated\.
19505 dotest taginfo-8
"$testcvs -q update -r br"
19506 echo add text on branch
>>file1
19507 dotest taginfo-9
"${testcvs} -q ci -m modify-on-br" \
19508 "$CVSROOT_DIRNAME/first-dir/file1,v <-- file1
19509 new revision: 1\.1\.2\.1; previous revision: 1\.1" \
19510 "$CVSROOT_DIRNAME/first-dir/file1,v <-- file1
19511 new revision: 1\.1\.2\.1; previous revision: 1\.1
19512 $SPROG commit: warning: Set to use deprecated info format strings\. Establish
19513 compatibility with the new info file format strings (add a temporary '1' in
19514 all info files after each '%' which doesn't represent a literal percent)
19515 and set UseNewInfoFmtStrings=yes in CVSROOT/config\. After that, convert
19516 individual command lines and scripts to handle the new format at your
19518 dotest taginfo-10
"${testcvs} -q tag -F -c brtag" \
19519 "${SPROG} tag: warning: taginfo line contains no format strings:
19520 \"${TESTDIR}/1/loggit\"
19521 Filling in old defaults ('%t %o %p %{sv}'), but please be aware that this
19522 usage is deprecated\.
19525 dotest_fail taginfo-11
"${testcvs} -q tag rejectme" \
19526 "${SPROG} tag: warning: taginfo line contains no format strings:
19527 \"${TESTDIR}/1/loggit\"
19528 Filling in old defaults ('%t %o %p %{sv}'), but please be aware that this
19529 usage is deprecated\.
19530 ${SPROG} tag: Pre-tag check failed
19531 ${SPROG} \[tag aborted\]: correct the above errors first!"
19533 # When we are using taginfo to allow/disallow, it would be
19534 # convenient to be able to use "cvs -n tag" to test whether
19535 # the allow/disallow functionality is working as expected.
19536 dotest taginfo-12
"${testcvs} -nq tag rejectme" \
19537 "${SPROG} tag: warning: taginfo line contains no format strings:
19538 \"${TESTDIR}/1/loggit\"
19539 Filling in old defaults ('%t %o %p %{sv}'), but please be aware that this
19540 usage is deprecated\.
19543 # But when taginfo is used for logging, it is a pain for -n
19544 # to call taginfo, since taginfo doesn't know whether -n was
19545 # specified or not.
19546 dotest taginfo-13
"${testcvs} -nq tag would-be-tag" \
19547 "${SPROG} tag: warning: taginfo line contains no format strings:
19548 \"${TESTDIR}/1/loggit\"
19549 Filling in old defaults ('%t %o %p %{sv}'), but please be aware that this
19550 usage is deprecated\.
19553 # Deleting: the cases are basically either the tag existed,
19554 # or it didn't exist.
19555 dotest taginfo-14
"${testcvs} -q tag -d tag1" \
19556 "${SPROG} tag: warning: taginfo line contains no format strings:
19557 \"${TESTDIR}/1/loggit\"
19558 Filling in old defaults ('%t %o %p %{sv}'), but please be aware that this
19559 usage is deprecated\.
19561 dotest taginfo-15
"${testcvs} -q tag -d tag1" \
19562 "${SPROG} tag: warning: taginfo line contains no format strings:
19563 \"${TESTDIR}/1/loggit\"
19564 Filling in old defaults ('%t %o %p %{sv}'), but please be aware that this
19565 usage is deprecated\."
19567 # Likewise with rtag.
19568 dotest taginfo-16
"${testcvs} -q rtag tag1 first-dir" \
19569 "${SPROG} rtag: warning: taginfo line contains no format strings:
19570 \"${TESTDIR}/1/loggit\"
19571 Filling in old defaults ('%t %o %p %{sv}'), but please be aware that this
19572 usage is deprecated\."
19573 dotest taginfo-17
"${testcvs} -q rtag -d tag1 first-dir" \
19574 "${SPROG} rtag: warning: taginfo line contains no format strings:
19575 \"${TESTDIR}/1/loggit\"
19576 Filling in old defaults ('%t %o %p %{sv}'), but please be aware that this
19577 usage is deprecated\."
19578 dotest taginfo-18
"${testcvs} -q rtag -d tag1 first-dir" \
19579 "${SPROG} rtag: warning: taginfo line contains no format strings:
19580 \"${TESTDIR}/1/loggit\"
19581 Filling in old defaults ('%t %o %p %{sv}'), but please be aware that this
19582 usage is deprecated\."
19584 # The "br" example should be passing 1.1.2 or 1.1.0.2.
19585 # But it turns out that is very hard to implement, since
19586 # check_fileproc doesn't know what branch number it will
19587 # get. Probably the whole thing should be re-architected
19588 # so that taginfo only allows/denies tagging, and a new
19589 # hook, which is done from tag_fileproc, does logging.
19590 # That would solve this, some more subtle races, and also
19591 # the fact that it is nice for users to run "-n tag foo" to
19592 # see whether a tag would be allowed. Failing that,
19593 # I suppose passing "1.1.branch" or "branch" for "br"
19594 # would be an improvement.
19595 dotest taginfo-examine-1
"cat ${TESTDIR}/1/taglog" \
19596 "tag1 add first-dir file1 1\.1
19597 br add first-dir file1 1\.1
19598 brtag mov first-dir file1 1\.1\.2\.1
19599 tag1 del first-dir file1 1\.1
19601 tag1 add first-dir file1 1\.1
19602 tag1 del first-dir file1 1\.1
19603 tag1 del first-dir"
19605 # now that we've tested the default operation, try a new
19606 # style fmt string.
19607 rm $TESTDIR/1/taglog
19610 dotest taginfo-newfmt-init-1 \
19611 "$testcvs -q up -prtaginfo-start taginfo >taginfo"
19612 echo "ALL $TESTDIR/1/loggit %r %t %o %b %p %{sTVv}" >>taginfo
19613 dotest taginfo-newfmt-init-2
"$testcvs -q ci -m check-in-taginfo" \
19614 "$TESTDIR/cvsroot/CVSROOT/taginfo,v <-- taginfo
19615 new revision: 1\.[0-9]*; previous revision: 1\.[0-9]*
19616 $SPROG commit: Rebuilding administrative file database" \
19617 "$TESTDIR/cvsroot/CVSROOT/taginfo,v <-- taginfo
19618 new revision: 1\.[0-9]*; previous revision: 1\.[0-9]*
19619 $SPROG commit: Rebuilding administrative file database
19620 $SPROG commit: warning: Set to use deprecated info format strings\. Establish
19621 compatibility with the new info file format strings (add a temporary '1' in
19622 all info files after each '%' which doesn't represent a literal percent)
19623 and set UseNewInfoFmtStrings=yes in CVSROOT/config\. After that, convert
19624 individual command lines and scripts to handle the new format at your
19627 cat >${TESTDIR}/1/loggit
<<EOF
19629 if test "\$1" = rejectme; then
19632 while test "\$#" -gt 0; do
19633 echo "\$1" >>${TESTDIR}/1/taglog
19642 dotest taginfo-newfmt-2
"${testcvs} -q update -A" "[UP] file1"
19643 echo "bull pucky" >'file 2'
19644 dotest taginfo-newfmt-2b
"${testcvs} add 'file 2'" \
19645 "${SPROG} add: scheduling file .file 2. for addition
19646 ${SPROG} add: use .${SPROG} commit. to add this file permanently"
19647 dotest taginfo-newfmt-2c
"$testcvs -q ci -m add-it" \
19648 "$TESTDIR/cvsroot/first-dir/file 2,v <-- file 2
19649 initial revision: 1\.1" \
19650 "$TESTDIR/cvsroot/first-dir/file 2,v <-- file 2
19651 initial revision: 1\.1
19652 $SPROG commit: warning: Set to use deprecated info format strings\. Establish
19653 compatibility with the new info file format strings (add a temporary '1' in
19654 all info files after each '%' which doesn't represent a literal percent)
19655 and set UseNewInfoFmtStrings=yes in CVSROOT/config\. After that, convert
19656 individual command lines and scripts to handle the new format at your
19659 dotest taginfo-newfmt-3
"${testcvs} -q tag tag1" \
19662 dotest taginfo-newfmt-4
"${testcvs} -q tag tag3" \
19665 dotest taginfo-newfmt-5
"$testcvs -q tag -rtag1 tag4" \
19669 dotest taginfo-newfmt-examine-1
"cat ${TESTDIR}/1/taglog" \
19710 # now update to use the new format strings (really, disable support
19711 # of the old format) and run the whole gamut of tests again.
19712 rm ${TESTDIR}/1/taglog
19715 cat >${TESTDIR}/1/loggit
<<EOF
19717 if test "\$1" = rejectme; then
19720 echo "\$@" >>${TESTDIR}/1/taglog
19724 dotest taginfo-newfmt-init-7 \
19725 "$testcvs -q up -prtaginfo-start taginfo >taginfo"
19726 echo "ALL ${TESTDIR}/1/loggit %{t} %b %{o} %p %{sTVv}" >>taginfo
19727 echo "UseNewInfoFmtStrings=yes" >>config
19728 dotest taginfo-newfmt-7
"$testcvs -q ci -m check-in-taginfo" \
19729 "$TESTDIR/cvsroot/CVSROOT/config,v <-- config
19730 new revision: 1\.[0-9]*; previous revision: 1\.[0-9]*
19731 $TESTDIR/cvsroot/CVSROOT/taginfo,v <-- taginfo
19732 new revision: 1\.[0-9]*; previous revision: 1\.[0-9]*
19733 $SPROG commit: Rebuilding administrative file database" \
19734 "$TESTDIR/cvsroot/CVSROOT/config,v <-- config
19735 new revision: 1\.[0-9]*; previous revision: 1\.[0-9]*
19736 $TESTDIR/cvsroot/CVSROOT/taginfo,v <-- taginfo
19737 new revision: 1\.[0-9]*; previous revision: 1\.[0-9]*
19738 $SPROG commit: Rebuilding administrative file database
19739 $SPROG commit: warning: Set to use deprecated info format strings\. Establish
19740 compatibility with the new info file format strings (add a temporary '1' in
19741 all info files after each '%' which doesn't represent a literal percent)
19742 and set UseNewInfoFmtStrings=yes in CVSROOT/config\. After that, convert
19743 individual command lines and scripts to handle the new format at your
19747 dotest taginfo-newfmt-8
"${testcvs} -q tag tag1" ""
19749 dotest taginfo-newfmt-8b
"${testcvs} -q add sdir" \
19750 "Directory ${TESTDIR}/cvsroot/first-dir/sdir added to the repository"
19752 dotest taginfo-newfmt-8c
"${testcvs} -q add sdir/file3" \
19753 "${SPROG} add: use .${SPROG} commit. to add this file permanently"
19754 dotest taginfo-newfmt-8d
"${testcvs} -q ci -m added-sdir" \
19755 "${TESTDIR}/cvsroot/first-dir/sdir/file3,v <-- sdir/file3
19756 initial revision: 1\.1"
19757 dotest taginfo-newfmt-9
"${testcvs} -q tag -b br" \
19759 W file1 : br already exists on branch 1\.1\.2\.1 : NOT MOVING tag to branch 1\.1\.0\.4
19761 dotest taginfo-newfmt-10
"${testcvs} -q update -r br" "[UP] file1"
19762 echo add
more text on branch
>>file1
19763 dotest taginfo-newfmt-11
"${testcvs} -q ci -m modify-on-br" \
19764 "${TESTDIR}/cvsroot/first-dir/file1,v <-- file1
19765 new revision: 1\.1\.2\.2; previous revision: 1\.1\.2\.1"
19766 dotest taginfo-newfmt-12
"${testcvs} -q tag -F -c brtag" \
19771 # we are being called once for each directory. I'm not sure
19772 # I like this, but I'm also not sure how hard it would be to change,
19773 # It seems like it would be more trouble than it is really worth
19774 # to let a partial tag go through...
19775 dotest_fail taginfo-newfmt-13
"${testcvs} -q tag rejectme" \
19776 "${SPROG} tag: Pre-tag check failed
19777 ${SPROG} tag: Pre-tag check failed
19778 ${SPROG} \[tag aborted\]: correct the above errors first!"
19780 # When we are using taginfo to allow/disallow, it would be
19781 # convenient to be able to use "cvs -n tag" to test whether
19782 # the allow/disallow functionality is working as expected.
19783 # see the comment before taginfo-newfmt-15 for notes on
19784 # pretag and posttag proc
19785 dotest taginfo-newfmt-14
"${testcvs} -nq tag rejectme" \
19790 # But when taginfo is used for logging, it is a pain for -n
19791 # to call taginfo, since taginfo doesn't know whether -n was
19792 # specified or not. (this could be fixed pretty easily now
19793 # with a new fmt string. i suppose it would be better to
19794 # have a pretag proc and a posttag proc, though.)
19795 dotest taginfo-newfmt-15
"${testcvs} -nq tag would-be-tag" \
19800 # Deleting: the cases are basically either the tag existed,
19801 # or it didn't exist.
19802 dotest taginfo-newfmt-16
"${testcvs} -q tag -d tag1" \
19805 dotest taginfo-newfmt-17
"${testcvs} -q tag -d tag1" ""
19807 # Likewise with rtag.
19808 dotest taginfo-newfmt-18
"${testcvs} -q rtag tag1 first-dir" ""
19809 dotest taginfo-newfmt-19
"${testcvs} -q rtag -d tag1 first-dir" ""
19810 dotest taginfo-newfmt-20
"${testcvs} -q rtag -d tag1 first-dir" ""
19812 # The "br" example should be passing 1.1.2 or 1.1.0.2.
19813 # But it turns out that is very hard to implement, since
19814 # check_fileproc doesn't know what branch number it will
19815 # get. Probably the whole thing should be re-architected
19816 # so that taginfo only allows/denies tagging, and a new
19817 # hook, which is done from tag_fileproc, does logging.
19818 # That would solve this, some more subtle races, and also
19819 # the fact that it is nice for users to run "-n tag foo" to
19820 # see whether a tag would be allowed. Failing that,
19821 # I suppose passing "1.1.branch" or "branch" for "br"
19822 # would be an improvement.
19823 dotest taginfo-newfmt-examine-2
"cat ${TESTDIR}/1/taglog" \
19824 "tag1 N add first-dir
19825 br T add first-dir file 2 NONE 1\.1
19826 br T add first-dir/sdir file3 NONE 1\.1
19827 brtag N mov first-dir file 2 br NONE 1\.1 file1 br 1\.1\.2\.1 1\.1\.2\.2
19828 brtag N mov first-dir/sdir file3 br NONE 1\.1
19829 tag1 ? del first-dir file 2 br 1\.1 1\.1 file1 br 1\.1 1\.1
19830 tag1 ? del first-dir/sdir
19831 tag1 ? del first-dir
19832 tag1 ? del first-dir/sdir
19833 tag1 N add first-dir file 2 NONE 1\.1 file1 NONE 1\.1
19834 tag1 N add first-dir/sdir file3 NONE 1\.1
19835 tag1 ? del first-dir file 2 1\.1 1\.1 file1 1\.1 1\.1
19836 tag1 ? del first-dir/sdir file3 1\.1 1\.1
19837 tag1 ? del first-dir
19838 tag1 ? del first-dir/sdir"
19844 modify_repo
rm -rf $CVSROOT_DIRNAME/first-dir
19850 # Tests of the CVSROOT/taginfo file. See the comment at the
19851 # "info" tests for a full list of administrative file tests.
19855 dotest posttag-init-1
"$testcvs -q co CVSROOT" "U CVSROOT/$DOTSTAR"
19857 # now that we've tested the default operation, try a new
19858 # style fmt string.
19860 echo "ALL $TESTDIR/1/loggit %r %t %o %b %p %{sVv}" >posttag
19861 dotest posttag-init-2
"$testcvs -q ci -m check-in-taginfo" \
19862 "$TESTDIR/cvsroot/CVSROOT/posttag,v <-- posttag
19863 new revision: 1\.[0-9]*; previous revision: 1\.[0-9]*
19864 $SPROG commit: Rebuilding administrative file database"
19867 cat >$TESTDIR/1/loggit
<<EOF
19869 if test "\$1" = rejectme; then
19875 while [ -n "\$1" ]; do
19876 echo "\$1" >>$TESTDIR/1/taglog
19886 if test -n "$remotehost"; then
19887 $CVS_RSH $remotehost "chmod +x $TESTDIR/1/loggit"
19889 chmod +x
$TESTDIR/1/loggit
19892 modify_repo mkdir
$CVSROOT_DIRNAME/first-dir
19893 dotest posttag-init-3
"$testcvs -q co first-dir"
19897 echo "bull pucky" >'file 2'
19898 dotest posttag-init-4
"$testcvs add file1 'file 2'" \
19899 "$SPROG add: scheduling file \`file1' for addition
19900 $SPROG add: scheduling file \`file 2' for addition
19901 $SPROG add: use \`$SPROG commit' to add these files permanently"
19902 dotest posttag-init-5
"$testcvs -q ci -m add-it" \
19903 "$CVSROOT_DIRNAME/first-dir/file 2,v <-- file 2
19904 initial revision: 1\.1
19905 $CVSROOT_DIRNAME/first-dir/file1,v <-- file1
19906 initial revision: 1\.1"
19908 dotest posttag-1
"$testcvs -q tag tag1" \
19911 dotest posttag-2
"$testcvs -q tag tag3" \
19915 dotest posttag-3
"$testcvs -q tag rejectme" \
19919 dotest posttag-4
"$testcvs -q tag -d rejectme" \
19923 dotest posttag-examine-1
"cat $TESTDIR/1/taglog" \
19973 modify_repo
rm -rf $CVSROOT_DIRNAME/first-dir
19979 # Tests of the CVSROOT/config file. See the comment at the
19980 # "info" tests for a full list of administrative file tests.
19982 # See note in keywordexpand about config errors from a proxied
19984 if $noredirect; then
19985 notnoredirect config
19989 # On Windows, we can't check out CVSROOT, because the case
19990 # insensitivity means that this conflicts with cvsroot.
19994 dotest config-init-1
"$testcvs -q co CVSROOT" "U CVSROOT/$DOTSTAR"
19996 dotest config-init-2
"$testcvs -Q tag config-start"
19997 echo 'bogus line' >>config
19998 dotest config-3
"$testcvs -q ci -m change-to-bogus-line" \
19999 "$CVSROOT_DIRNAME/CVSROOT/config,v <-- config
20000 new revision: 1\.[0-9]*; previous revision: 1\.[0-9]*
20001 $SPROG commit: Rebuilding administrative file database"
20002 dotest config-3a
"$testcvs -Q update -jHEAD -jconfig-start" \
20003 "$SPROG [a-z]*: $SECONDARY_CVSROOT_DIRNAME/CVSROOT/config \[[1-9][0-9]*\]: syntax error: missing \`=' between keyword and value
20004 RCS file: $CVSROOT_DIRNAME/CVSROOT/config,v
20005 retrieving revision 1.[0-9]*
20006 retrieving revision 1.[0-9]*
20007 Merging differences between 1.[0-9]* and 1.[0-9]* into config"
20008 echo 'BogusOption=yes' >>config
20010 dotest config-4p
"$testcvs -q ci -m change-to-bogus-opt" \
20011 "$SPROG [a-z]*: $SECONDARY_CVSROOT_DIRNAME/CVSROOT/config \[99\]: syntax error: missing \`=' between keyword and value
20012 $SPROG [a-z]*: $CVSROOT_DIRNAME/CVSROOT/config \[99\]: syntax error: missing \`=' between keyword and value
20013 $CVSROOT_DIRNAME/CVSROOT/config,v <-- config
20014 new revision: 1\.[0-9]*; previous revision: 1\.[0-9]*
20015 $SPROG commit: Rebuilding administrative file database"
20017 dotest config-4
"$testcvs -q ci -m change-to-bogus-opt" \
20018 "$SPROG [a-z]*: $SECONDARY_CVSROOT_DIRNAME/CVSROOT/config \[[1-9][0-9]*\]: syntax error: missing \`=' between keyword and value
20019 $CVSROOT_DIRNAME/CVSROOT/config,v <-- config
20020 new revision: 1\.[0-9]*; previous revision: 1\.[0-9]*
20021 $SPROG commit: Rebuilding administrative file database"
20025 : # FIXME: don't try in proxy mode
20027 # Now test the HistoryLogPath and HistorySearchPath options.
20028 mkdir
$TESTDIR/historylogs
20030 'HistoryLogPath=$CVSROOT/../historylogs/%Y-%m-%d-%H-%M-%S'
20031 echo 'HistorySearchPath=$CVSROOT/../historylogs/*' >>config
20033 # The warning is left over from the previous test.
20034 dotest config-5
"$testcvs -q ci -m set-HistoryLogPath" \
20035 "$SPROG [a-z]*: $CVSROOT_DIRNAME/CVSROOT/config \[98\]: unrecognized keyword \`BogusOption'
20036 $CVSROOT_DIRNAME/CVSROOT/config,v <-- config
20037 new revision: 1\.[0-9]*; previous revision: 1\.[0-9]*
20038 $SPROG commit: Rebuilding administrative file database"
20040 echo '# noop' >> config
20041 dotest config-6
"$testcvs -q ci -mlog-commit" \
20042 "$CVSROOT_DIRNAME/CVSROOT/config,v <-- config
20043 new revision: 1\.[0-9]*; previous revision: 1\.[0-9]*
20044 $SPROG commit: Rebuilding administrative file database"
20047 echo '# noop' >> config
20048 dotest config-7
"$testcvs -q ci -mlog-commit" \
20049 "$CVSROOT_DIRNAME/CVSROOT/config,v <-- config
20050 new revision: 1\.[0-9]*; previous revision: 1\.[0-9]*
20051 $SPROG commit: Rebuilding administrative file database"
20053 # The log entry was intentionally split across multiple files.
20054 dotest config-8
"ls -l $TESTDIR/historylogs/*" \
20055 "-rw-rw-r--.*$TESTDIR/historylogs/2[0-9][0-9][0-9]-[01][0-9]-[0-3][0-9]-[0-2][0-9]-[0-5][0-9]-[0-5][0-9]
20056 -rw-rw-r--.*$TESTDIR/historylogs/2[0-9][0-9][0-9]-[01][0-9]-[0-3][0-9]-[0-2][0-9]-[0-5][0-9]-[0-5][0-9]"
20058 # Should still see both commits.
20060 dotest config-9r
"$testcvs history -ea" \
20061 "M [0-9-]* [0-9:]* ${PLUS}0000 $username 1\.[0-9]* config CVSROOT == <remote>
20062 M [0-9-]* [0-9:]* ${PLUS}0000 $username 1\.[0-9]* config CVSROOT == <remote>"
20064 dotest config-9
"$testcvs history -ea" \
20065 "M [0-9-]* [0-9:]* ${PLUS}0000 $username 1\.[0-9]* config CVSROOT == $TESTDIR/wnt/CVSROOT
20066 M [0-9-]* [0-9:]* ${PLUS}0000 $username 1\.[0-9]* config CVSROOT == $TESTDIR/wnt/CVSROOT"
20069 # Remove this now to see what kind of error messages we get.
20070 rm -r $TESTDIR/historylogs
20082 # Tests of the CVSROOT/config file. See the comment at the
20083 # "info" tests for a full list of administrative file tests.
20085 # No point in testing compression effects in local mode.
20086 if $remote; then :; else
20091 # On Windows, we can't check out CVSROOT, because the case
20092 # insensitivity means that this conflicts with cvsroot.
20096 # Set MinCompressionLevel and MaxCompressionLevel in config.
20097 dotest config2-init-1
"$testcvs -q co CVSROOT" "U CVSROOT/$DOTSTAR"
20098 dotest config2-init-1b
"$testcvs -Q tag initial"
20100 cat << EOF >> config
20101 MinCompressionLevel=5
20102 MaxCompressionLevel=6
20104 dotest config2-init-2 \
20105 "$testcvs -q ci -m set-compression-constraints" \
20106 "$CVSROOT_DIRNAME/CVSROOT/config,v <-- config
20107 new revision: 1\.[0-9]*; previous revision: 1\.[0-9]*
20108 $SPROG commit: Rebuilding administrative file database"
20110 # Verify that the server reports forcing compression to an allowed
20114 dotest config2-1
"$testcvs -z9 update" \
20115 "$SPROG server: Forcing compression level 6 (allowed: 5 <= z <= 6)\.
20116 $SPROG update: Updating \."
20118 dotest config2-2
"$testcvs -z1 update" \
20119 "$SPROG server: Forcing compression level 5 (allowed: 5 <= z <= 6)\.
20120 $SPROG update: Updating \."
20122 dotest config2-3
"$testcvs update" \
20123 "$SPROG server: Forcing compression level 5 (allowed: 5 <= z <= 6)\.
20124 $SPROG update: Updating \."
20126 dotest config2-3
"$testcvs -z5 update" \
20127 "$SPROG update: Updating \."
20129 # Check that compression may be forced to 0.
20130 dotest config2-init-2b
"$testcvs -z5 up -jHEAD -jinitial" "$DOTSTAR"
20131 cat << EOF >> config
20132 MaxCompressionLevel=0
20134 dotest config2-init-3
"$testcvs -qz5 ci -m no-compression" \
20135 "$CVSROOT_DIRNAME/CVSROOT/config,v <-- config
20136 new revision: 1\.[0-9]*; previous revision: 1\.[0-9]*
20137 $SPROG commit: Rebuilding administrative file database"
20140 dotest config2-5
"$testcvs -z9 update" \
20141 "$SPROG server: Forcing compression level 0 (allowed: 0 <= z <= 0)\.
20142 $SPROG update: Updating \."
20144 dotest config2-6
"$testcvs update" \
20145 "$SPROG update: Updating \."
20147 # And verify effect without restrictions.
20148 dotest config2-init-3b
"$testcvs up -jHEAD -jinitial" "$DOTSTAR"
20149 dotest config2-init-4
"$testcvs -q ci -m change-to-comment" \
20150 "$CVSROOT_DIRNAME/CVSROOT/config,v <-- config
20151 new revision: 1\.[0-9]*; previous revision: 1\.[0-9]*
20152 $SPROG commit: Rebuilding administrative file database"
20153 dotest config2-7
"$testcvs update" \
20154 "$SPROG update: Updating \."
20163 # Verify comments, white space, & [rootspecs] in CVSROOT/config
20165 # `cvs server' `-c' option tested in `server' test
20166 modify_repo mkdir
$CVSROOT_DIRNAME/config3
20170 dotest config3-init-1
"$testcvs -q co CVSROOT" "U CVSROOT/$DOTSTAR"
20173 # I break the usual sanity.sh indentation standard for here-docs
20174 # mostly to test that leading white-space is now ignored.
20175 dotest config3-init-1b
"$testcvs -Q tag initial-config"
20178 # Ignore a comment with leading spaces.
20179 GLOBAL-BAD-OPTION=WWW
20181 [/ignore/this/root]
20183 IGNORED-BAD-OPTION=YYY
20185 dotest config3-init-2 \
20186 "$testcvs -q ci -m test-root-specs" \
20187 "$CVSROOT_DIRNAME/CVSROOT/config,v <-- config
20188 new revision: 1\.[0-9]*; previous revision: 1\.[0-9]*
20189 $SPROG commit: Rebuilding administrative file database"
20192 dotest config3-1
"$testcvs co config3" \
20193 "$SPROG [a-z]*: $SECONDARY_CVSROOT_DIRNAME/CVSROOT/config \[[0-9]*\]: unrecognized keyword \`GLOBAL-BAD-OPTION'
20194 $SPROG checkout: Updating config3"
20197 dotest config3-init-2a
"$testcvs -Q up -jHEAD -jinitial-config" \
20199 Merging differences between 1\.[0-9]* and 1\.[0-9]* into config"
20202 # Ignore a comment with leading spaces.
20204 [/ignore/this/root]
20206 IGNORED-BAD-OPTION=YYY
20207 # Ignore a comment with leading spaces.
20211 # Comments and blank lines do not affect fall-through behavior.
20214 [$SECONDARY_CVSROOT_DIRNAME]
20216 # Comments and blank lines do not affect fall-through behavior.
20218 [/yet/another/root]
20219 # Ignore a comment with leading spaces.
20220 PROCESS-BAD-OPTION=XXX
20222 dotest config3-init-3 \
20223 "$testcvs -q ci -m test-root-specs" \
20224 "$SPROG [a-z]*: $CVSROOT_DIRNAME/CVSROOT/config \[[0-9]*\]: unrecognized keyword \`GLOBAL-BAD-OPTION'
20225 $CVSROOT_DIRNAME/CVSROOT/config,v <-- config
20226 new revision: 1\.[0-9]*; previous revision: 1\.[0-9]*
20227 $SPROG commit: Rebuilding administrative file database" \
20228 "$SPROG [a-z]*: $SECONDARY_CVSROOT_DIRNAME/CVSROOT/config \[[0-9]*\]: unrecognized keyword \`GLOBAL-BAD-OPTION'
20229 $SPROG [a-z]*: $CVSROOT_DIRNAME/CVSROOT/config \[[0-9]*\]: unrecognized keyword \`GLOBAL-BAD-OPTION'
20230 $CVSROOT_DIRNAME/CVSROOT/config,v <-- config
20231 new revision: 1\.[0-9]*; previous revision: 1\.[0-9]*
20232 $SPROG commit: Rebuilding administrative file database"
20235 dotest config3-2
"$testcvs co config3" \
20236 "$SPROG [a-z]*: $SECONDARY_CVSROOT_DIRNAME/CVSROOT/config \[[0-9]*\]: unrecognized keyword \`PROCESS-BAD-OPTION'
20237 $SPROG checkout: Updating config3"
20239 # The next few tests make sure both global options and root
20240 # specific options are processed by setting the history log and
20241 # search paths in different locations and then verifying that
20242 # both registered. It also verifies that a key for a different
20245 dotest config3-init-3a
"$testcvs -Q up -jHEAD -jinitial-config" \
20247 Merging differences between 1\.[0-9]* and 1\.[0-9]* into config"
20250 HistoryLogPath=$TESTDIR/historylog
20252 [/ignore/this/root]
20254 IGNORED-BAD-OPTION=YYY
20258 [$SECONDARY_CVSROOT_DIRNAME]
20259 [/yet/another/root]
20260 HistorySearchPath=$TESTDIR/historylog
20262 [/ignore/another/root]
20263 [/and/this/one/too]
20264 ANOTHER-IGNORED-BAD-OPTION=ZZZ
20267 [$SECONDARY_CVSROOT_DIRNAME]
20270 dotest config3-init-4 \
20271 "$testcvs -q ci -m test-root-specs" \
20272 "$SPROG [a-z]*: $CVSROOT_DIRNAME/CVSROOT/config \[[0-9]*\]: unrecognized keyword \`PROCESS-BAD-OPTION'
20273 $CVSROOT_DIRNAME/CVSROOT/config,v <-- config
20274 new revision: 1\.[0-9]*; previous revision: 1\.[0-9]*
20275 $SPROG commit: Rebuilding administrative file database" \
20276 "$SPROG [a-z]*: $SECONDARY_CVSROOT_DIRNAME/CVSROOT/config \[[0-9]*\]: unrecognized keyword \`PROCESS-BAD-OPTION'
20277 $SPROG [a-z]*: $CVSROOT_DIRNAME/CVSROOT/config \[[0-9]*\]: unrecognized keyword \`PROCESS-BAD-OPTION'
20278 $CVSROOT_DIRNAME/CVSROOT/config,v <-- config
20279 new revision: 1\.[0-9]*; previous revision: 1\.[0-9]*
20280 $SPROG commit: Rebuilding administrative file database"
20283 dotest config3-3
"$testcvs co -d config3-2 config3" \
20284 "$SPROG checkout: Updating config3-2"
20288 dotest config3-4
"$testcvs -Q add newfile"
20289 dotest config3-5
"$testcvs -q ci -madd-file" \
20290 "$CVSROOT_DIRNAME/config3/newfile,v <-- newfile
20291 initial revision: 1\.1"
20293 dotest config3-6
"$testcvs rtag testtag config3" \
20294 "$SPROG rtag: Tagging config3"
20297 dotest config3-7
"$testcvs history -ea" \
20298 "A [0-9-]* [0-9:]* ${PLUS}0000 $username 1\.1 newfile config3 == [-_/a-zA-Z0-9<>]*
20299 T [0-9-]* [0-9:]* ${PLUS}0000 $username config3 \[testtag:A\]"
20305 modify_repo
rm -rf $CVSROOT_DIRNAME/config3
20315 dotest config4-init-1
"$testcvs -q co CVSROOT" "U CVSROOT/$DOTSTAR"
20317 mkdir
$TESTDIR/config
4/tmp
20318 echo "TmpDir=$TESTDIR/config4/tmp" >>config
20319 echo "DEFAULT $TESTDIR/config4/verify %l" >>verifymsg
20320 dotest config4-init-2
"$testcvs -q ci -m change-tmpdir" \
20321 "$CVSROOT_DIRNAME/CVSROOT/config,v <-- config
20322 new revision: 1\.[0-9]*; previous revision: 1\.[0-9]*
20323 $CVSROOT_DIRNAME/CVSROOT/verifymsg,v <-- verifymsg
20324 new revision: 1\.[0-9]*; previous revision: 1\.[0-9]*
20325 $SPROG commit: Rebuilding administrative file database"
20327 cat >$TESTDIR/config
4/verify
<<EOF
20332 chmod a
+x
$TESTDIR/config
4/verify
20334 "$testcvs -q ci -fmtest-tmpdir config" \
20335 "$TESTDIR/config4/tmp/$tempfile
20336 $CVSROOT_DIRNAME/CVSROOT/config,v <-- config
20337 new revision: 1\.[0-9]*; previous revision: 1\.[0-9]*
20338 $SPROG commit: Rebuilding administrative file database"
20344 modify_repo
rm -rf $CVSROOT_DIRNAME/config4
20350 # Test remote CVS handling of unpatchable files. This isn't
20351 # much of a test for local CVS.
20352 # We test this with some keyword expansion games, but the situation
20353 # also arises if the user modifies the file while CVS is running.
20354 modify_repo mkdir
$CVSROOT_DIRNAME/first-dir
20357 dotest serverpatch-1
"$testcvs -q co first-dir"
20361 # Add a file with an RCS keyword.
20362 echo '$''Name$' > file1
20364 dotest serverpatch-2
"$testcvs add file1" \
20365 "$SPROG add: scheduling file \`file1' for addition
20366 $SPROG add: use \`$SPROG commit' to add this file permanently"
20368 dotest serverpatch-3
"${testcvs} -q commit -m add" \
20369 "$CVSROOT_DIRNAME/first-dir/file1,v <-- file1
20370 initial revision: 1\.1"
20373 dotest serverpatch-4
"${testcvs} -q tag tag file1" 'T file1'
20375 # Check out a tagged copy of the file.
20379 dotest serverpatch-5
"${testcvs} -q co -r tag first-dir" \
20380 'U first-dir/file1'
20382 # Remove the tag. This will leave the tag string in the
20383 # expansion of the Name keyword.
20384 dotest serverpatch-6
"${testcvs} -q update -A first-dir" ''
20386 # Modify and check in the first copy.
20389 dotest serverpatch-7
"${testcvs} -q ci -mx file1" \
20390 "$CVSROOT_DIRNAME/first-dir/file1,v <-- file1
20391 new revision: 1\.2; previous revision: 1\.1"
20393 # Now update the second copy. When using remote CVS, the
20394 # patch will fail, forcing the file to be refetched.
20395 cd ..
/..
/2/first-dir
20396 dotest serverpatch-8
"${testcvs} -q update" \
20399 ${CPROG} update: checksum failure after patch to \./file1; will refetch
20400 ${CPROG} client: refetching unpatchable files
20401 $SPROG update: warning: \`file1' was lost
20407 modify_repo
rm -rf $CVSROOT_DIRNAME/first-dir
20413 # Test selecting revisions with cvs log.
20414 # See also log2 tests for more tests.
20415 # See also branches-14.3 for logging with a branch off of a branch.
20416 # See also multibranch-14 for logging with several branches off the
20417 # same branchpoint.
20418 # Tests of each option to cvs log:
20419 # -h: admin-19a-log
20420 # -N: log, log2, admin-19a-log
20425 # -w, -t: not tested yet (TODO)
20427 # Check in a file with a few revisions and branches.
20428 modify_repo mkdir
$CVSROOT_DIRNAME/first-dir
20429 dotest log-1
"$testcvs -q co first-dir"
20431 echo 'first revision' > file1
20432 echo 'first revision' > file2
20433 dotest log-2
"${testcvs} add file1 file2" \
20434 "${SPROG} add: scheduling file .file1. for addition
20435 ${SPROG} add: scheduling file .file2. for addition
20436 ${SPROG} add: use .${SPROG} commit. to add these files permanently"
20438 # While we're at it, check multi-line comments, input from file,
20439 # and trailing whitespace trimming
20440 echo 'line 1 ' >${TESTDIR}/comment.tmp
20441 echo ' ' >>${TESTDIR}/comment.tmp
20442 echo 'line 2 ' >>${TESTDIR}/comment.tmp
20443 echo ' ' >>${TESTDIR}/comment.tmp
20444 echo ' ' >>${TESTDIR}/comment.tmp
20445 dotest log-3
"${testcvs} -q commit -F ${TESTDIR}/comment.tmp" \
20446 "$CVSROOT_DIRNAME/first-dir/file1,v <-- file1
20447 initial revision: 1\.1
20448 $CVSROOT_DIRNAME/first-dir/file2,v <-- file2
20449 initial revision: 1\.1"
20450 rm -f ${TESTDIR}/comment.tmp
20452 echo 'second revision' > file1
20453 echo 'second revision' > file2
20454 dotest log-4
"${testcvs} -q ci -m2 file1 file2" \
20455 "$CVSROOT_DIRNAME/first-dir/file1,v <-- file1
20456 new revision: 1\.2; previous revision: 1\.1
20457 $CVSROOT_DIRNAME/first-dir/file2,v <-- file2
20458 new revision: 1\.2; previous revision: 1\.1"
20460 dotest log-5
"${testcvs} -q tag -b branch file1" 'T file1'
20461 dotest log-5a
"${testcvs} -q tag tag1 file2" 'T file2'
20463 echo 'third revision' > file1
20464 echo 'third revision' > file2
20465 dotest log-6
"${testcvs} -q ci -m3 file1 file2" \
20466 "$CVSROOT_DIRNAME/first-dir/file1,v <-- file1
20467 new revision: 1\.3; previous revision: 1\.2
20468 $CVSROOT_DIRNAME/first-dir/file2,v <-- file2
20469 new revision: 1\.3; previous revision: 1\.2"
20471 dotest log-6a
"${testcvs} -q tag tag2 file2" 'T file2'
20473 dotest log-7
"${testcvs} -q update -r branch" \
20475 ${SPROG} update: \`file2' is no longer in the repository"
20477 echo 'first branch revision' > file1
20478 dotest log-8
"${testcvs} -q ci -m1b file1" \
20479 "$CVSROOT_DIRNAME/first-dir/file1,v <-- file1
20480 new revision: 1\.2\.2\.1; previous revision: 1\.2"
20482 dotest log-9
"${testcvs} -q tag tag file1" 'T file1'
20484 echo 'second branch revision' > file1
20485 dotest log-10
"${testcvs} -q ci -m2b file1" \
20486 "$CVSROOT_DIRNAME/first-dir/file1,v <-- file1
20487 new revision: 1\.2\.2\.2; previous revision: 1\.2\.2\.1"
20489 # Set up a bunch of shell variables to make the later tests
20490 # easier to describe.=
20492 RCS file: ${CVSROOT_DIRNAME}/first-dir/file1,v
20493 Working file: file1
20499 RCS file: ${CVSROOT_DIRNAME}/first-dir/file1,v
20504 log_tags1
='symbolic names:
20506 branch: 1\.2\.0\.2'
20507 log_keyword
='keyword substitution: kv'
20508 log_dash
='----------------------------
20510 log_date
="date: ${ISO8601DATE}; author: ${username}; state: Exp;"
20511 log_lines
=" lines: ${PLUS}1 -1;"
20512 log_commitid
=" commitid: ${commitid};"
20513 log_rev1
="${log_dash} 1\.1
20514 ${log_date}${log_commitid}
20518 log_rev2
="${log_dash} 1\.2
20519 ${log_date}${log_lines}${log_commitid}
20522 log_rev3
="${log_dash} 1\.3
20523 ${log_date}${log_lines}${log_commitid}
20525 log_rev1b
="${log_dash} 1\.2\.2\.1
20526 ${log_date}${log_lines}${log_commitid}
20528 log_rev2b
="${log_dash} 1\.2\.2\.2
20529 ${log_date}${log_lines}${log_commitid}
20531 log_trailer
='============================================================================='
20533 # Now, finally, test the log output.
20535 dotest log-11
"${testcvs} log file1" \
20539 total revisions: 5; selected revisions: 5
20548 dotest log-12
"${testcvs} log -N file1" \
20551 total revisions: 5; selected revisions: 5
20560 dotest log-13
"${testcvs} log -b file1" \
20564 total revisions: 5; selected revisions: 3
20571 dotest log-14
"${testcvs} log -r file1" \
20575 total revisions: 5; selected revisions: 1
20580 dotest log-14a
"${testcvs} log -rHEAD file1" \
20584 total revisions: 5; selected revisions: 1
20589 # The user might not realize that "-r" must not take a space.
20590 # In the error message, HEAD is a file name, not a tag name (which
20591 # might be confusing itself).
20592 dotest_fail log-14b
"${testcvs} log -r HEAD file1" \
20593 "${SPROG} log: nothing known about HEAD
20597 total revisions: 5; selected revisions: 1
20602 # Check that unusual syntax works correctly.
20604 dotest log-14c
"${testcvs} log -r: file1" \
20608 total revisions: 5; selected revisions: 1
20612 dotest log-14d
"${testcvs} log -r, file1" \
20616 total revisions: 5; selected revisions: 1
20620 dotest log-14e
"${testcvs} log -r. file1" \
20624 total revisions: 5; selected revisions: 1
20628 dotest log-14f
"${testcvs} log -r:: file1" \
20632 total revisions: 5; selected revisions: 0
20636 dotest log-15
"${testcvs} log -r1.2 file1" \
20640 total revisions: 5; selected revisions: 1
20645 dotest log-16
"${testcvs} log -r1.2.2 file1" \
20649 total revisions: 5; selected revisions: 2
20655 # This test would fail with the old invocation of rlog, but it
20656 # works with the builtin log support.
20657 dotest log-17
"${testcvs} log -rbranch file1" \
20661 total revisions: 5; selected revisions: 2
20667 dotest log-18
"${testcvs} log -r1.2.2. file1" \
20671 total revisions: 5; selected revisions: 1
20676 # Multiple -r options are undocumented; see comments in
20677 # cvs.texinfo about whether they should be deprecated.
20678 dotest log-18a
"${testcvs} log -r1.2.2.2 -r1.3:1.3 file1" \
20682 total revisions: 5; selected revisions: 2
20688 # This test would fail with the old invocation of rlog, but it
20689 # works with the builtin log support.
20690 dotest log-19
"${testcvs} log -rbranch. file1" \
20694 total revisions: 5; selected revisions: 1
20699 dotest log-20
"${testcvs} log -r1.2: file1" \
20703 total revisions: 5; selected revisions: 2
20709 dotest log-20a
"${testcvs} log -r1.2:: file1" \
20713 total revisions: 5; selected revisions: 1
20718 dotest log-21
"${testcvs} log -r:1.2 file1" \
20722 total revisions: 5; selected revisions: 2
20728 dotest log-21a
"${testcvs} log -r::1.2 file1" \
20732 total revisions: 5; selected revisions: 2
20738 dotest log-22
"${testcvs} log -r1.1:1.2 file1" \
20742 total revisions: 5; selected revisions: 2
20748 dotest log-22a
"${testcvs} log -r1.1::1.2 file1" \
20752 total revisions: 5; selected revisions: 1
20757 dotest log-22b
"${testcvs} log -r1.1::1.3 file1" \
20761 total revisions: 5; selected revisions: 2
20767 dotest log-23
"${testcvs} log -rfoo:: file1" \
20768 "${SPROG} log: warning: no revision .foo. in .${CVSROOT_DIRNAME}/first-dir/file1,v.
20772 total revisions: 5; selected revisions: 0
20776 dotest log-24
"${testcvs} log -rfoo::1.3 file1" \
20777 "${SPROG} log: warning: no revision .foo. in .${CVSROOT_DIRNAME}/first-dir/file1,v.
20781 total revisions: 5; selected revisions: 0
20785 dotest log-25
"${testcvs} log -r::foo file1" \
20786 "${SPROG} log: warning: no revision .foo. in .${CVSROOT_DIRNAME}/first-dir/file1,v.
20790 total revisions: 5; selected revisions: 0
20794 dotest log-26
"${testcvs} log -r1.1::foo file1" \
20795 "${SPROG} log: warning: no revision .foo. in .${CVSROOT_DIRNAME}/first-dir/file1,v.
20799 total revisions: 5; selected revisions: 0
20803 # Test BASE pseudotag
20804 dotest log-27
"${testcvs} log -rBASE file1" \
20808 total revisions: 5; selected revisions: 1
20813 dotest log-28
"${testcvs} -q up -r1.2 file1" "[UP] file1"
20814 dotest log-29
"${testcvs} log -rBASE file1" \
20818 total revisions: 5; selected revisions: 1
20823 dotest log-30
"${testcvs} -q up -rbranch file1" "[UP] file1"
20825 # Now the same tests but with rlog
20827 dotest log-r11
"${testcvs} rlog first-dir/file1" \
20831 total revisions: 5; selected revisions: 5
20840 dotest log-r12
"${testcvs} rlog -N first-dir/file1" \
20843 total revisions: 5; selected revisions: 5
20852 dotest log-r13
"${testcvs} rlog -b first-dir/file1" \
20856 total revisions: 5; selected revisions: 3
20863 dotest log-r14
"${testcvs} rlog -r first-dir/file1" \
20867 total revisions: 5; selected revisions: 1
20872 dotest log-r14a
"${testcvs} rlog -rHEAD first-dir/file1" \
20876 total revisions: 5; selected revisions: 1
20881 dotest_fail log-r14b
"${testcvs} rlog -r HEAD first-dir/file1" \
20882 "${SPROG} rlog: cannot find module .HEAD. - ignored
20886 total revisions: 5; selected revisions: 1
20891 dotest log-r14c
"${testcvs} rlog -r: first-dir/file1" \
20895 total revisions: 5; selected revisions: 1
20899 dotest log-r14d
"${testcvs} rlog -r, first-dir/file1" \
20903 total revisions: 5; selected revisions: 1
20907 dotest log-r14e
"${testcvs} rlog -r. first-dir/file1" \
20911 total revisions: 5; selected revisions: 1
20915 dotest log-r14f
"${testcvs} rlog -r:: first-dir/file1" \
20919 total revisions: 5; selected revisions: 0
20923 dotest log-r15
"${testcvs} rlog -r1.2 first-dir/file1" \
20927 total revisions: 5; selected revisions: 1
20932 dotest log-r16
"${testcvs} rlog -r1.2.2 first-dir/file1" \
20936 total revisions: 5; selected revisions: 2
20942 dotest log-r17
"${testcvs} rlog -rbranch first-dir/file1" \
20946 total revisions: 5; selected revisions: 2
20952 dotest log-r18
"${testcvs} rlog -r1.2.2. first-dir/file1" \
20956 total revisions: 5; selected revisions: 1
20961 dotest log-r18a
"${testcvs} rlog -r1.2.2.2 -r1.3:1.3 first-dir/file1" \
20965 total revisions: 5; selected revisions: 2
20971 dotest log-r19
"${testcvs} rlog -rbranch. first-dir/file1" \
20975 total revisions: 5; selected revisions: 1
20980 dotest log-r20
"${testcvs} rlog -r1.2: first-dir/file1" \
20984 total revisions: 5; selected revisions: 2
20990 dotest log-r20a
"${testcvs} rlog -r1.2:: first-dir/file1" \
20994 total revisions: 5; selected revisions: 1
20999 dotest log-r21
"${testcvs} rlog -r:1.2 first-dir/file1" \
21003 total revisions: 5; selected revisions: 2
21009 dotest log-r21a
"${testcvs} rlog -r::1.2 first-dir/file1" \
21013 total revisions: 5; selected revisions: 2
21019 dotest log-r22
"${testcvs} rlog -r1.1:1.2 first-dir/file1" \
21023 total revisions: 5; selected revisions: 2
21029 dotest log-r22a
"${testcvs} rlog -r1.1::1.2 first-dir/file1" \
21033 total revisions: 5; selected revisions: 1
21038 dotest log-r22b
"${testcvs} rlog -r1.1::1.3 first-dir/file1" \
21042 total revisions: 5; selected revisions: 2
21048 dotest log-r23
"${testcvs} rlog -rfoo:: first-dir/file1" \
21049 "${SPROG} rlog: warning: no revision .foo. in .${CVSROOT_DIRNAME}/first-dir/file1,v.
21053 total revisions: 5; selected revisions: 0
21057 dotest log-r24
"${testcvs} rlog -rfoo::1.3 first-dir/file1" \
21058 "${SPROG} rlog: warning: no revision .foo. in .${CVSROOT_DIRNAME}/first-dir/file1,v.
21062 total revisions: 5; selected revisions: 0
21066 dotest log-r25
"${testcvs} rlog -r::foo first-dir/file1" \
21067 "${SPROG} rlog: warning: no revision .foo. in .${CVSROOT_DIRNAME}/first-dir/file1,v.
21071 total revisions: 5; selected revisions: 0
21075 dotest log-r26
"${testcvs} rlog -r1.1::foo first-dir/file1" \
21076 "${SPROG} rlog: warning: no revision .foo. in .${CVSROOT_DIRNAME}/first-dir/file1,v.
21080 total revisions: 5; selected revisions: 0
21084 # Test BASE pseudotag
21085 dotest log-r27
"${testcvs} rlog -rBASE first-dir/file1" \
21086 "${SPROG} rlog: warning: no revision .BASE. in .${CVSROOT_DIRNAME}/first-dir/file1,v.
21090 total revisions: 5; selected revisions: 0
21094 dotest log-r28
"${testcvs} -q up -r1.2 file1" "[UP] file1"
21095 dotest log-r29
"${testcvs} rlog -rBASE first-dir/file1" \
21096 "${SPROG} rlog: warning: no revision .BASE. in .${CVSROOT_DIRNAME}/first-dir/file1,v.
21100 total revisions: 5; selected revisions: 0
21104 # Test when head is dead
21106 dotest log-d0
"${testcvs} -q up -A" \
21109 dotest log-d1
"${testcvs} -q rm -f file1" \
21110 "${SPROG} remove: use .${SPROG} commit. to remove this file permanently"
21111 dotest log-d2
"${testcvs} -q ci -m4" \
21112 "$CVSROOT_DIRNAME/first-dir/file1,v <-- file1
21113 new revision: delete; previous revision: 1\.3"
21116 RCS file: ${CVSROOT_DIRNAME}/first-dir/Attic/file1,v
21117 Working file: file1
21123 RCS file: ${CVSROOT_DIRNAME}/first-dir/Attic/file1,v
21129 RCS file: ${CVSROOT_DIRNAME}/first-dir/file2,v
21130 Working file: file2
21136 RCS file: ${CVSROOT_DIRNAME}/first-dir/file2,v
21141 log_tags2
='symbolic names:
21144 log_rev4
="${log_dash} 1\.4
21145 date: ${ISO8601DATE}; author: ${username}; state: dead; lines: ${PLUS}0 -0; commitid: ${commitid};
21147 log_rev22
="${log_dash} 1\.2
21148 ${log_date}${log_lines}${log_commitid}
21151 dotest log-d3
"${testcvs} log -rbranch file1" \
21155 total revisions: 6; selected revisions: 2
21160 dotest log-rd3
"${testcvs} rlog -rbranch first-dir/file1" \
21164 total revisions: 6; selected revisions: 2
21169 dotest log-d4
"${testcvs} -q log -rbranch" \
21173 total revisions: 6; selected revisions: 2
21178 ${SPROG} log: warning: no revision .branch. in .${CVSROOT_DIRNAME}/first-dir/file2,v.
21182 total revisions: 3; selected revisions: 0
21185 dotest log-d4a
"${testcvs} -q log -t -rbranch" \
21192 ${SPROG} log: warning: no revision .branch. in .${CVSROOT_DIRNAME}/first-dir/file2,v.
21199 dotest log-d4b
"${testcvs} -q log -tS -rbranch" \
21203 total revisions: 6; selected revisions: 2
21206 ${SPROG} log: warning: no revision .branch. in .${CVSROOT_DIRNAME}/first-dir/file2,v."
21207 dotest log-d4c
"${testcvs} -q log -h -rbranch" \
21213 ${SPROG} log: warning: no revision .branch. in .${CVSROOT_DIRNAME}/first-dir/file2,v.
21219 dotest log-d4d
"${testcvs} -q log -hS -rbranch" \
21223 total revisions: 6; selected revisions: 2
21225 ${SPROG} log: warning: no revision .branch. in .${CVSROOT_DIRNAME}/first-dir/file2,v."
21226 dotest log-d4e
"$testcvs -q log -R -rbranch" \
21227 "$CVSROOT_DIRNAME/first-dir/Attic/file1,v
21228 $CVSROOT_DIRNAME/first-dir/file2,v"
21229 dotest log-d4f
"${testcvs} -q log -R -S -rbranch" \
21230 "${CVSROOT_DIRNAME}/first-dir/Attic/file1,v
21231 ${SPROG} log: warning: no revision .branch. in .${CVSROOT_DIRNAME}/first-dir/file2,v."
21232 dotest log-rd4
"${testcvs} -q rlog -rbranch first-dir" \
21236 total revisions: 6; selected revisions: 2
21241 ${SPROG} rlog: warning: no revision .branch. in .${CVSROOT_DIRNAME}/first-dir/file2,v.
21245 total revisions: 3; selected revisions: 0
21248 dotest log-rd4a
"${testcvs} -q rlog -t -rbranch first-dir" \
21255 ${SPROG} rlog: warning: no revision .branch. in .${CVSROOT_DIRNAME}/first-dir/file2,v.
21262 dotest log-rd4b
"${testcvs} -q rlog -St -rbranch first-dir" \
21266 total revisions: 6; selected revisions: 2
21269 ${SPROG} rlog: warning: no revision .branch. in .${CVSROOT_DIRNAME}/first-dir/file2,v."
21270 dotest log-rd4c
"${testcvs} -q rlog -h -rbranch first-dir" \
21276 ${SPROG} rlog: warning: no revision .branch. in .${CVSROOT_DIRNAME}/first-dir/file2,v.
21282 dotest log-rd4d
"${testcvs} -q rlog -Sh -rbranch first-dir" \
21286 total revisions: 6; selected revisions: 2
21288 ${SPROG} rlog: warning: no revision .branch. in .${CVSROOT_DIRNAME}/first-dir/file2,v."
21289 dotest log-rd4e
"${testcvs} -q rlog -R -rbranch first-dir" \
21290 "${CVSROOT_DIRNAME}/first-dir/Attic/file1,v
21291 ${CVSROOT_DIRNAME}/first-dir/file2,v"
21292 dotest log-rd4f
"${testcvs} -q rlog -R -S -rbranch first-dir" \
21293 "${CVSROOT_DIRNAME}/first-dir/Attic/file1,v
21294 ${SPROG} rlog: warning: no revision .branch. in .${CVSROOT_DIRNAME}/first-dir/file2,v."
21295 dotest log-d5
"${testcvs} log -r1.2.2.1:1.2.2.2 file1" \
21299 total revisions: 6; selected revisions: 2
21304 dotest log-rd5
"${testcvs} rlog -r1.2.2.1:1.2.2.2 first-dir/file1" \
21308 total revisions: 6; selected revisions: 2
21313 dotest log-d6
"${testcvs} -q log -r1.2.2.1:1.2.2.2" \
21317 total revisions: 6; selected revisions: 2
21325 total revisions: 3; selected revisions: 0
21328 dotest log-rd6
"${testcvs} -q rlog -r1.2.2.1:1.2.2.2 first-dir" \
21332 total revisions: 6; selected revisions: 2
21340 total revisions: 3; selected revisions: 0
21343 dotest log-d7
"${testcvs} log -r1.2:1.3 file1" \
21347 total revisions: 6; selected revisions: 2
21352 dotest log-rd7
"${testcvs} -q rlog -r1.2:1.3 first-dir/file1" \
21356 total revisions: 6; selected revisions: 2
21361 dotest log-d8
"${testcvs} -q log -rtag1:tag2" \
21362 "${SPROG} log: warning: no revision .tag1. in .${CVSROOT_DIRNAME}/first-dir/Attic/file1,v.
21363 ${SPROG} log: warning: no revision .tag2. in .${CVSROOT_DIRNAME}/first-dir/Attic/file1,v.
21367 total revisions: 6; selected revisions: 0
21373 total revisions: 3; selected revisions: 2
21378 dotest log-d8a
"${testcvs} -q log -rtag1:tag2 -S" \
21379 "${SPROG} log: warning: no revision .tag1. in .${CVSROOT_DIRNAME}/first-dir/Attic/file1,v.
21380 ${SPROG} log: warning: no revision .tag2. in .${CVSROOT_DIRNAME}/first-dir/Attic/file1,v.
21384 total revisions: 3; selected revisions: 2
21389 dotest log-rd8
"${testcvs} -q rlog -rtag1:tag2 first-dir" \
21390 "${SPROG} rlog: warning: no revision .tag1. in .${CVSROOT_DIRNAME}/first-dir/Attic/file1,v.
21391 ${SPROG} rlog: warning: no revision .tag2. in .${CVSROOT_DIRNAME}/first-dir/Attic/file1,v.
21395 total revisions: 6; selected revisions: 0
21401 total revisions: 3; selected revisions: 2
21406 dotest log-rd8a
"${testcvs} -q rlog -rtag1:tag2 -S first-dir" \
21407 "${SPROG} rlog: warning: no revision .tag1. in .${CVSROOT_DIRNAME}/first-dir/Attic/file1,v.
21408 ${SPROG} rlog: warning: no revision .tag2. in .${CVSROOT_DIRNAME}/first-dir/Attic/file1,v.
21412 total revisions: 3; selected revisions: 2
21418 dotest log-d99
"${testcvs} -q up -rbranch" \
21420 ${SPROG} update: \`file2' is no longer in the repository"
21422 # Now test outdating revisions
21424 dotest log-o0
"${testcvs} admin -o 1.2.2.2:: file1" \
21425 "RCS file: ${CVSROOT_DIRNAME}/first-dir/Attic/file1,v
21427 dotest log-o1
"${testcvs} admin -o ::1.2.2.1 file1" \
21428 "RCS file: ${CVSROOT_DIRNAME}/first-dir/Attic/file1,v
21430 dotest log-o2
"${testcvs} admin -o 1.2.2.1:: file1" \
21431 "RCS file: ${CVSROOT_DIRNAME}/first-dir/Attic/file1,v
21432 deleting revision 1\.2\.2\.2
21434 dotest log-o3
"${testcvs} log file1" \
21438 total revisions: 5; selected revisions: 5
21446 dotest log-ro3
"${testcvs} rlog first-dir/file1" \
21450 total revisions: 5; selected revisions: 5
21458 dotest log-o4
"${testcvs} -q update -p -r 1.2.2.1 file1" \
21459 "first branch revision"
21464 modify_repo
rm -rf $CVSROOT_DIRNAME/first-dir
21470 # More "cvs log" tests, for example the file description.
21473 modify_repo mkdir
$CVSROOT_DIRNAME/first-dir
21474 dotest log2-1
"$testcvs -q co first-dir"
21476 echo 'first revision' > file1
21477 dotest log2-2
"${testcvs} add -m file1-is-for-testing file1" \
21478 "${SPROG}"' add: scheduling file `file1'\'' for addition
21479 '"${SPROG}"' add: use .'"${SPROG}"' commit. to add this file permanently'
21480 dotest log2-3
"${testcvs} -q commit -m 1" \
21481 "$CVSROOT_DIRNAME/first-dir/file1,v <-- file1
21482 initial revision: 1\.1"
21483 # Setting the file description with add -m doesn't yet work
21484 # client/server, so skip log2-4 for remote.
21485 if $remote; then :; else
21487 dotest log2-4
"${testcvs} log -N file1" "
21488 RCS file: ${CVSROOT_DIRNAME}/first-dir/file1,v
21489 Working file: file1
21494 keyword substitution: kv
21495 total revisions: 1; selected revisions: 1
21497 file1-is-for-testing
21498 ----------------------------
21500 date: ${ISO8601DATE}; author: ${username}; state: Exp; commitid: ${commitid};
21502 ============================================================================="
21504 fi # end of tests skipped for remote
21506 dotest log2-5
"${testcvs} admin -t-change-description file1" \
21507 "RCS file: ${CVSROOT_DIRNAME}/first-dir/file1,v
21509 dotest log2-6
"${testcvs} log -N file1" "
21510 RCS file: ${CVSROOT_DIRNAME}/first-dir/file1,v
21511 Working file: file1
21516 keyword substitution: kv
21517 total revisions: 1; selected revisions: 1
21520 ----------------------------
21522 date: ${ISO8601DATE}; author: ${username}; state: Exp; commitid: ${commitid};
21524 ============================================================================="
21526 echo 'longer description' >${TESTDIR}/descrip
21527 echo 'with two lines' >>${TESTDIR}/descrip
21528 dotest log2-7
"${testcvs} admin -t${TESTDIR}/descrip file1" \
21529 "RCS file: ${CVSROOT_DIRNAME}/first-dir/file1,v
21531 dotest_fail log2-7a
"${testcvs} admin -t${TESTDIR}/nonexist file1" \
21532 "${CPROG} \[admin aborted\]: can't stat ${TESTDIR}/nonexist: No such file or directory"
21533 dotest log2-8
"${testcvs} log -N file1" "
21534 RCS file: ${CVSROOT_DIRNAME}/first-dir/file1,v
21535 Working file: file1
21540 keyword substitution: kv
21541 total revisions: 1; selected revisions: 1
21545 ----------------------------
21547 date: ${ISO8601DATE}; author: ${username}; state: Exp; commitid: ${commitid};
21549 ============================================================================="
21551 # TODO: `cvs admin -t "my message" file1' is a request to
21552 # read the message from stdin and to operate on two files.
21553 # Should test that there is an error because "my message"
21556 dotest log2-9
"echo change from stdin | ${testcvs} admin -t -q file1" ""
21557 dotest log2-10
"${testcvs} log -N file1" "
21558 RCS file: ${CVSROOT_DIRNAME}/first-dir/file1,v
21559 Working file: file1
21564 keyword substitution: kv
21565 total revisions: 1; selected revisions: 1
21568 ----------------------------
21570 date: ${ISO8601DATE}; author: ${username}; state: Exp; commitid: ${commitid};
21572 ============================================================================="
21576 rm $TESTDIR/descrip
21578 modify_repo
rm -rf $CVSROOT_DIRNAME/first-dir
21584 # Some tests of log.c's option parsing and such things.
21586 dotest logopt-1
"$testcvs -q co -l ." ''
21588 dotest logopt-2
"$testcvs add first-dir" \
21589 "Directory $CVSROOT_DIRNAME/first-dir added to the repository"
21592 dotest logopt-3
"${testcvs} add file1" \
21593 "${SPROG} add: scheduling file .file1. for addition
21594 ${SPROG} add: use .${SPROG} commit. to add this file permanently"
21595 dotest logopt-4
"${testcvs} -q ci -m add file1" \
21596 "$CVSROOT_DIRNAME/first-dir/file1,v <-- file1
21597 initial revision: 1\.1"
21600 dotest logopt-5
"${testcvs} log -R -d 2038-01-01" \
21601 "${SPROG} log: Logging \.
21602 ${SPROG} log: Logging first-dir
21603 ${CVSROOT_DIRNAME}/first-dir/file1,v"
21604 dotest logopt-6
"${testcvs} log -d 2038-01-01 -R" \
21605 "${SPROG} log: Logging \.
21606 ${SPROG} log: Logging first-dir
21607 ${CVSROOT_DIRNAME}/first-dir/file1,v"
21608 dotest logopt-6a
"${testcvs} log -Rd 2038-01-01" \
21609 "${SPROG} log: Logging \.
21610 ${SPROG} log: Logging first-dir
21611 ${CVSROOT_DIRNAME}/first-dir/file1,v"
21612 dotest logopt-7
"${testcvs} log -s Exp -R" \
21613 "${SPROG} log: Logging \.
21614 ${SPROG} log: Logging first-dir
21615 ${CVSROOT_DIRNAME}/first-dir/file1,v"
21620 modify_repo
rm -rf $CVSROOT_DIRNAME/first-dir
21626 # Tests of "cvs annotate". See also:
21627 # basica-10 A simple annotate test
21628 # rcs Annotate and the year 2000
21629 # keywordlog Annotate and $Log.
21631 dotest ann-1
"$testcvs -q co -l ."
21633 dotest ann-2
"${testcvs} add first-dir" \
21634 "Directory ${CVSROOT_DIRNAME}/first-dir added to the repository"
21643 dotest ann-3
"${testcvs} add file1" \
21644 "${SPROG} add: scheduling file .file1. for addition
21645 ${SPROG} add: use .${SPROG} commit. to add this file permanently"
21646 dotest ann-4
"${testcvs} -q ci -m add file1" \
21647 "$CVSROOT_DIRNAME/first-dir/file1,v <-- file1
21648 initial revision: 1\.1"
21660 dotest ann-5
"${testcvs} -q ci -m modify file1" \
21661 "$CVSROOT_DIRNAME/first-dir/file1,v <-- file1
21662 new revision: 1\.2; previous revision: 1\.1"
21663 dotest ann-6
"${testcvs} -q tag -b br" "T file1"
21675 dotest ann-7
"${testcvs} -q ci -m modify file1" \
21676 "$CVSROOT_DIRNAME/first-dir/file1,v <-- file1
21677 new revision: 1\.3; previous revision: 1\.2"
21678 dotest ann-8
"${testcvs} -q update -r br" "[UP] file1"
21692 dotest ann-9
"${testcvs} -q ci -m modify" \
21693 "$CVSROOT_DIRNAME/first-dir/file1,v <-- file1
21694 new revision: 1\.2\.2\.1; previous revision: 1\.2"
21695 # Note that this annotates the trunk despite the presence
21696 # of a sticky tag in the current directory. This is
21697 # fairly bogus, but it is the longstanding behavior for
21698 # whatever that is worth.
21699 dotest ann-10
"${testcvs} ann" \
21701 Annotations for file1
21702 \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*
21703 1\.1 ($username8 *[0-9a-zA-Z-]*): this
21704 1\.1 ($username8 *[0-9a-zA-Z-]*): is
21705 1\.2 ($username8 *[0-9a-zA-Z-]*): a
21706 1\.3 ($username8 *[0-9a-zA-Z-]*): trunk file
21707 1\.2 ($username8 *[0-9a-zA-Z-]*):
21708 1\.2 ($username8 *[0-9a-zA-Z-]*): with
21709 1\.2 ($username8 *[0-9a-zA-Z-]*): a
21710 1\.2 ($username8 *[0-9a-zA-Z-]*): blank
21711 1\.2 ($username8 *[0-9a-zA-Z-]*): line"
21712 dotest ann-11
"${testcvs} ann -r br" \
21714 Annotations for file1
21715 \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*
21716 1\.1 ($username8 *[0-9a-zA-Z-]*): this
21717 1\.1 ($username8 *[0-9a-zA-Z-]*): is
21718 1\.2 ($username8 *[0-9a-zA-Z-]*): a
21719 1\.1 ($username8 *[0-9a-zA-Z-]*): file
21720 1\.2 ($username8 *[0-9a-zA-Z-]*):
21721 1\.2 ($username8 *[0-9a-zA-Z-]*): with
21722 1\.2 ($username8 *[0-9a-zA-Z-]*): a
21723 1\.2 ($username8 *[0-9a-zA-Z-]*): blank
21724 1\.2 ($username8 *[0-9a-zA-Z-]*): line
21725 1\.2\.2\.1 ($username8 *[0-9a-zA-Z-]*): and some
21726 1\.2\.2\.1 ($username8 *[0-9a-zA-Z-]*): branched content"
21727 # FIXCVS: shouldn't "-r 1.2.0.2" be the same as "-r br"?
21728 dotest ann-12
"${testcvs} ann -r 1.2.0.2 file1" ""
21729 dotest ann-13
"${testcvs} ann -r 1.2.2 file1" \
21731 Annotations for file1
21732 \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*
21733 1\.1 ($username8 *[0-9a-zA-Z-]*): this
21734 1\.1 ($username8 *[0-9a-zA-Z-]*): is
21735 1\.2 ($username8 *[0-9a-zA-Z-]*): a
21736 1\.1 ($username8 *[0-9a-zA-Z-]*): file
21737 1\.2 ($username8 *[0-9a-zA-Z-]*):
21738 1\.2 ($username8 *[0-9a-zA-Z-]*): with
21739 1\.2 ($username8 *[0-9a-zA-Z-]*): a
21740 1\.2 ($username8 *[0-9a-zA-Z-]*): blank
21741 1\.2 ($username8 *[0-9a-zA-Z-]*): line
21742 1\.2\.2\.1 ($username8 *[0-9a-zA-Z-]*): and some
21743 1\.2\.2\.1 ($username8 *[0-9a-zA-Z-]*): branched content"
21744 dotest_fail ann-14
"$testcvs ann -r bill-clintons-chastity file1" \
21745 "$SPROG \[annotate aborted\]: no such tag \`bill-clintons-chastity'"
21747 # Now get rid of the working directory and test rannotate
21751 dotest ann-r10
"${testcvs} rann first-dir" \
21753 Annotations for first-dir/file1
21754 \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*
21755 1\.1 ($username8 *[0-9a-zA-Z-]*): this
21756 1\.1 ($username8 *[0-9a-zA-Z-]*): is
21757 1\.2 ($username8 *[0-9a-zA-Z-]*): a
21758 1\.3 ($username8 *[0-9a-zA-Z-]*): trunk file
21759 1\.2 ($username8 *[0-9a-zA-Z-]*):
21760 1\.2 ($username8 *[0-9a-zA-Z-]*): with
21761 1\.2 ($username8 *[0-9a-zA-Z-]*): a
21762 1\.2 ($username8 *[0-9a-zA-Z-]*): blank
21763 1\.2 ($username8 *[0-9a-zA-Z-]*): line"
21764 dotest ann-r11
"${testcvs} rann -r br first-dir" \
21766 Annotations for first-dir/file1
21767 \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*
21768 1\.1 ($username8 *[0-9a-zA-Z-]*): this
21769 1\.1 ($username8 *[0-9a-zA-Z-]*): is
21770 1\.2 ($username8 *[0-9a-zA-Z-]*): a
21771 1\.1 ($username8 *[0-9a-zA-Z-]*): file
21772 1\.2 ($username8 *[0-9a-zA-Z-]*):
21773 1\.2 ($username8 *[0-9a-zA-Z-]*): with
21774 1\.2 ($username8 *[0-9a-zA-Z-]*): a
21775 1\.2 ($username8 *[0-9a-zA-Z-]*): blank
21776 1\.2 ($username8 *[0-9a-zA-Z-]*): line
21777 1\.2\.2\.1 ($username8 *[0-9a-zA-Z-]*): and some
21778 1\.2\.2\.1 ($username8 *[0-9a-zA-Z-]*): branched content"
21779 dotest ann-r12
"${testcvs} rann -r 1.2.0.2 first-dir/file1" ""
21780 dotest ann-r13
"${testcvs} rann -r 1.2.2 first-dir/file1" \
21782 Annotations for first-dir/file1
21783 \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*
21784 1\.1 ($username8 *[0-9a-zA-Z-]*): this
21785 1\.1 ($username8 *[0-9a-zA-Z-]*): is
21786 1\.2 ($username8 *[0-9a-zA-Z-]*): a
21787 1\.1 ($username8 *[0-9a-zA-Z-]*): file
21788 1\.2 ($username8 *[0-9a-zA-Z-]*):
21789 1\.2 ($username8 *[0-9a-zA-Z-]*): with
21790 1\.2 ($username8 *[0-9a-zA-Z-]*): a
21791 1\.2 ($username8 *[0-9a-zA-Z-]*): blank
21792 1\.2 ($username8 *[0-9a-zA-Z-]*): line
21793 1\.2\.2\.1 ($username8 *[0-9a-zA-Z-]*): and some
21794 1\.2\.2\.1 ($username8 *[0-9a-zA-Z-]*): branched content"
21795 dotest_fail ann-r14
"$testcvs rann -r bill-clintons-chastity first-dir/file1" \
21796 "$SPROG \[rannotate aborted\]: no such tag \`bill-clintons-chastity'"
21799 modify_repo
rm -rf $CVSROOT_DIRNAME/first-dir
21805 # Demonstrate that cvs-1.9.28.1 improperly expands rcs keywords in
21806 # the output of `cvs annotate' -- it uses values from the previous
21807 # delta. In this case, `1.1' instead of `1.2', even though it puts
21808 # the proper version number on the prefix to each line of output.
21810 dotest ann-id-1
"$testcvs -q co -l ."
21813 dotest ann-id-2
"${testcvs} add $module" \
21814 "Directory ${CVSROOT_DIRNAME}/$module added to the repository"
21818 echo '$Id''$' > $file
21820 dotest ann-id-3
"$testcvs add $file" \
21821 "$SPROG add: scheduling file .$file. for addition
21822 $SPROG add: use .$SPROG commit. to add this file permanently"
21823 dotest ann-id-4
"$testcvs -Q ci -m . $file"
21825 echo line2
>> $file
21826 dotest ann-id-5
"$testcvs -Q ci -m . $file"
21828 # The version number after $file,v should be `1.2'.
21829 # 1.9.28.1 puts `1.1' there.
21830 dotest ann-id-6
"$testcvs -Q ann $file" \
21832 Annotations for $file
21833 \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*
21834 1.2 ($username8 *[0-9a-zA-Z-]*): "'\$'"Id: $file,v 1.1 [0-9/]* [0-9:]* $username Exp "'\$'"
21835 1.2 ($username8 *[0-9a-zA-Z-]*): line2"
21840 modify_repo
rm -rf $CVSROOT_DIRNAME/$module
21846 # Various tests relating to creating repositories, operating
21847 # on repositories created with old versions of CVS, etc.
21849 CVS_SERVER_save
=$CVS_SERVER
21851 # Because this test is all about -d options and such, it
21852 # at least to some extent needs to be different for remote vs.
21856 # Use :ext: rather than :fork:. Most of the tests use :fork:,
21857 # so we want to make sure that we test :ext: _somewhere_.
21858 # Make sure 'rsh' works first.
21859 require_rsh
"$CVS_RSH"
21860 if test $?
-eq 77; then
21861 skip crerepos
"$skipreason"
21865 # Make sure server ignores real $HOME/.cvsrc:
21866 cat >$TESTDIR/cvs-setHome
<<EOF
21870 exec $CVS_SERVER "\$@"
21872 chmod a
+x
$TESTDIR/cvs-setHome
21874 # Note that we set CVS_SERVER at the beginning.
21875 CVS_SERVER
=$TESTDIR/cvs-setHome
; export CVS_SERVER
21876 CREREPOS_ROOT
=:ext
:$host$TESTDIR/crerepos
21878 CREREPOS_ROOT
=$TESTDIR/crerepos
21881 # First, if the repository doesn't exist at all...
21882 dotest_fail crerepos-1 \
21883 "${testcvs} -d ${TESTDIR}/crerepos co cvs-sanity" \
21884 "${SPROG} \[checkout aborted\]: ${TESTDIR}/crerepos/CVSROOT: .*"
21887 # The repository exists but CVSROOT doesn't.
21888 dotest_fail crerepos-2 \
21889 "${testcvs} -d ${TESTDIR}/crerepos co cvs-sanity" \
21890 "${SPROG} \[checkout aborted\]: ${TESTDIR}/crerepos/CVSROOT: .*"
21891 mkdir crerepos
/CVSROOT
21893 # Checkout of nonexistent module
21894 dotest_fail crerepos-3 \
21895 "${testcvs} -d ${TESTDIR}/crerepos co cvs-sanity" \
21896 "${SPROG} checkout: cannot find module .cvs-sanity. - ignored"
21898 # Now test that CVS works correctly without a modules file
21899 # or any of that other stuff. In particular, it *must*
21900 # function if administrative files added to CVS recently (since
21901 # CVS 1.3) do not exist, because the repository might have
21902 # been created with an old version of CVS.
21904 dotest crerepos-4 \
21905 "${testcvs} -q -d ${TESTDIR}/crerepos co CVSROOT" \
21907 dotest crerepos-5 \
21908 "echo yes | $testcvs -d $TESTDIR/crerepos release -d CVSROOT" \
21909 "You have \[0\] altered files in this repository\.
21910 Are you sure you want to release (and delete) directory \`CVSROOT': "
21913 # The directory 1 should be empty
21914 dotest crerepos-6
"rmdir 1"
21917 # Test that CVS rejects a relative path in CVSROOT.
21919 # Note that having the client reject the pathname (as :fork:
21920 # does), does _not_ test for the bugs we are trying to catch
21921 # here. The point is that malicious clients might send all
21922 # manner of things and the server better protect itself.
21923 dotest_fail crerepos-6a-r \
21924 "${testcvs} -q -d :ext:`hostname`:../crerepos get ." \
21925 "${CPROG} checkout: CVSROOT may only specify a positive, non-zero, integer port (not .\.\..)\.
21926 ${CPROG} checkout: Perhaps you entered a relative pathname${QUESTION}
21927 ${CPROG} \[checkout aborted\]: Bad CVSROOT: .:ext:${hostname}:\.\./crerepos.\."
21932 dotest_fail crerepos-6b-r \
21933 "${testcvs} -d :ext:`hostname`:crerepos init" \
21934 "${CPROG} init: CVSROOT requires a path spec:
21935 ${CPROG} init: :(gserver|kserver|pserver):\[\[user\]\[:password\]@\]host\[:\[port\]\]/path
21936 ${CPROG} init: \[:(ext|server):\]\[\[user\]@\]host\[:\]/path
21937 ${CPROG} \[init aborted\]: Bad CVSROOT: .:ext:${hostname}:crerepos.\."
21941 # Test that CVS rejects a relative path in CVSROOT.
21944 # Set CVS_RSH=false since ocassionally (e.g. when CVS_RSH=ssh on
21945 # some systems) some rsh implementations will block because they
21946 # can look up '..' and want to ask the user about the unknown host
21947 # key or somesuch. Which error message we get depends on whether
21948 # false finishes running before we try to talk to it or not.
21949 dotest_fail crerepos-6a
"CVS_RSH=false ${testcvs} -q -d ../crerepos get ." \
21950 "${SPROG} \[checkout aborted\]: end of file from server (consult above messages if any)" \
21951 "${SPROG} \[checkout aborted\]: received broken pipe signal"
21956 dotest_fail crerepos-6b
"${testcvs} -d crerepos init" \
21957 "${SPROG} init: CVSROOT must be an absolute pathname (not .crerepos.)
21958 ${SPROG} init: when using local access method\.
21959 ${SPROG} \[init aborted\]: Bad CVSROOT: .crerepos.\."
21962 fi # end of tests to be skipped for remote
21964 # CVS should have created a history file. If the administrator
21965 # doesn't need it and wants to save on disk space, they just
21966 # delete it and set LogHistory = the empty string in config.
21967 dotest crerepos-7
"test -f $TESTDIR/crerepos/CVSROOT/history"
21969 # Now test mixing repositories. This kind of thing tends to
21970 # happen accidentally when people work with several repositories.
21972 dotest crerepos-8
"${testcvs} -q co -l ." ''
21974 dotest crerepos-9
"${testcvs} add first-dir" \
21975 "Directory ${CVSROOT_DIRNAME}/first-dir added to the repository"
21978 dotest crerepos-10
"${testcvs} add file1" \
21979 "${SPROG} add: scheduling file .file1. for addition
21980 ${SPROG} add: use .${SPROG} commit. to add this file permanently"
21981 dotest crerepos-11
"${testcvs} -q ci -m add-it" \
21982 "$CVSROOT_DIRNAME/first-dir/file1,v <-- file1
21983 initial revision: 1\.1"
21988 dotest crerepos-12
"$testcvs -d $CREREPOS_ROOT -q co -l ."
21990 dotest crerepos-13
"$testcvs add crerepos-dir" \
21991 "Directory $TESTDIR/crerepos/crerepos-dir added to the repository"
21994 dotest crerepos-14
"${testcvs} add cfile" \
21995 "${SPROG} add: scheduling file .cfile. for addition
21996 ${SPROG} add: use .${SPROG} commit. to add this file permanently"
21997 dotest crerepos-15
"${testcvs} -q ci -m add-it" \
21998 "$TESTDIR/crerepos/crerepos-dir/cfile,v <-- cfile
21999 initial revision: 1\.1"
22004 dotest crerepos-16
"${testcvs} co first-dir" \
22005 "${SPROG} checkout: Updating first-dir
22007 dotest crerepos-17
"${testcvs} -d ${CREREPOS_ROOT} co crerepos-dir" \
22008 "${SPROG} checkout: Updating crerepos-dir
22009 U crerepos-dir/cfile"
22010 dotest crerepos-18
"${testcvs} update" \
22011 "${SPROG} update: Updating first-dir
22012 ${SPROG} update: Updating crerepos-dir"
22016 CVS_SERVER
=$CVS_SERVER_save; export CVS_SERVER
22019 echo Keeping
${TESTDIR} and exiting due to
--keep
22024 rm -f $TESTDIR/cvs-setHome
22026 modify_repo
rm -rf $CVSROOT_DIRNAME/first-dir
22027 rm -rf $TESTDIR/crerepos
22033 # Test ability to import an RCS file. Note that this format
22034 # is fixed--files written by RCS5, and other software which
22035 # implements this format, will be out there "forever" and
22036 # CVS must always be able to import such files.
22038 # See tests admin-13, admin-25 and rcs-8a for exporting RCS files.
22040 # Save the timezone and set it to UTC for these tests to make the
22041 # value more predicatable.
22045 modify_repo mkdir
$CVSROOT_DIRNAME/first-dir
22047 # Currently the way to import an RCS file is to copy it
22048 # directly into the repository.
22050 # This file was written by RCS 5.7, and then the dates were
22051 # hacked so that we test year 2000 stuff. Note also that
22052 # "author" names are just strings, as far as importing
22053 # RCS files is concerned--they need not correspond to user
22054 # IDs on any particular system.
22056 # I also tried writing a file with the RCS supplied with
22057 # HPUX A.09.05. According to "man rcsintro" this is
22058 # "Revision Number: 3.0; Release Date: 83/05/11". There
22059 # were a few minor differences like whitespace but at least
22060 # in simple cases like this everything else seemed the same
22061 # as the file written by RCS 5.7 (so I won't try to make it
22062 # a separate test case).
22064 cat <<EOF >$TESTDIR/file1,v
22073 date ${RAWRCSDATE2000A}; author kingdon; state Exp;
22078 date ${RAWRCSDATE1996A}; author kingdon; state Exp;
22083 date ${RAWRCSDATE1996B}; author kingdon; state Exp;
22089 @file1 is for testing CVS
22095 @delete second line; modify twelfth line
22098 @This is the first line
22099 This is the third line
22100 This is the fourth line
22101 This is the fifth line
22102 This is the sixth line
22103 This is the seventh line
22104 This is the eighth line
22105 This is the ninth line
22106 This is the tenth line
22107 This is the eleventh line
22108 This is the twelfth line (and what a line it is)
22109 This is the thirteenth line
22119 This is the second line
22122 This is the twelfth line
22134 modify_repo
mv $TESTDIR/file1
,v
$CVSROOT_DIRNAME/first-dir
/file1
,v
22136 dotest rcs-1
"$testcvs -q co first-dir" 'U first-dir/file1'
22138 dotest rcs-2
"$testcvs -q log" "
22139 RCS file: $CVSROOT_DIRNAME/first-dir/file1,v
22140 Working file: file1
22146 keyword substitution: kv
22147 total revisions: 3; selected revisions: 3
22149 file1 is for testing CVS
22150 ----------------------------
22152 date: ${ISO8601DATE2000A}; author: kingdon; state: Exp; lines: ${PLUS}1 -2;
22153 delete second line; modify twelfth line
22154 ----------------------------
22156 date: ${ISO8601DATE1996A}; author: kingdon; state: Exp; lines: ${PLUS}12 -0;
22158 ----------------------------
22160 date: ${ISO8601DATE1996B}; author: kingdon; state: Exp;
22162 ============================================================================="
22164 # Note that the dates here are chosen so that (a) we test
22165 # at least one date after 2000, (b) we will notice if the
22166 # month and day are getting mixed up with each other.
22167 # TODO: also test that year isn't getting mixed up with month
22168 # or day, for example 01-02-03.
22170 # ISO8601 format. There are many, many, other variations
22171 # specified by ISO8601 which we should be testing too.
22172 dotest rcs-3
"${testcvs} -q log -d '1996-12-11<'" "
22173 RCS file: ${CVSROOT_DIRNAME}/first-dir/file1,v
22174 Working file: file1
22180 keyword substitution: kv
22181 total revisions: 3; selected revisions: 1
22183 file1 is for testing CVS
22184 ----------------------------
22186 date: ${ISO8601DATE2000A}; author: kingdon; state: Exp; lines: ${PLUS}1 -2;
22187 delete second line; modify twelfth line
22188 ============================================================================="
22190 # RFC822 format (as amended by RFC1123).
22191 dotest rcs-4
"${testcvs} -q log -d '<3 Apr 2000 00:00'" \
22193 RCS file: ${CVSROOT_DIRNAME}/first-dir/file1,v
22194 Working file: file1
22200 keyword substitution: kv
22201 total revisions: 3; selected revisions: 2
22203 file1 is for testing CVS
22204 ----------------------------
22206 date: ${ISO8601DATE1996A}; author: kingdon; state: Exp; lines: ${PLUS}12 -0;
22208 ----------------------------
22210 date: ${ISO8601DATE1996B}; author: kingdon; state: Exp;
22212 ============================================================================="
22214 # Intended behavior for "cvs annotate" is that it displays the
22215 # last two digits of the year. Make sure it does that rather
22216 # than some bogosity like "100".
22217 dotest rcs-4a
"${testcvs} annotate file1" \
22219 Annotations for file1
22220 \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*
22221 1\.1 (kingdon 24-Nov-96): This is the first line
22222 1\.2 (kingdon 24-Nov-96): This is the third line
22223 1\.2 (kingdon 24-Nov-96): This is the fourth line
22224 1\.2 (kingdon 24-Nov-96): This is the fifth line
22225 1\.2 (kingdon 24-Nov-96): This is the sixth line
22226 1\.2 (kingdon 24-Nov-96): This is the seventh line
22227 1\.2 (kingdon 24-Nov-96): This is the eighth line
22228 1\.2 (kingdon 24-Nov-96): This is the ninth line
22229 1\.2 (kingdon 24-Nov-96): This is the tenth line
22230 1\.2 (kingdon 24-Nov-96): This is the eleventh line
22231 1\.3 (kingdon 24-Nov-00): This is the twelfth line (and what a line it is)
22232 1\.2 (kingdon 24-Nov-96): This is the thirteenth line"
22234 # Probably should split this test into two at this point (file1
22235 # above this line and file2 below), as the two share little
22238 # OK, here is another one. This one was written by hand based on
22239 # doc/RCSFILES and friends. One subtle point is that none of
22240 # the lines end with newlines; that is a feature which we
22241 # should be testing.
22242 cat <<EOF >$TESTDIR/file2,v
22246 symbols branch:1.2.6;
22248 testofanewphrase @without newphrase we'd have trouble extending @@ all@ ;
22249 1.5 date 71.01.01.01.00.00; author joe; state bogus; branches; next 1.4;
22250 1.4 date 71.01.01.00.00.05; author joe; state bogus; branches; next 1.3;
22251 1.3 date 70.12.31.15.00.05; author joe; state bogus; branches; next 1.2;
22252 1.2 date 70.12.31.12.15.05; author me; state bogus; branches 1.2.6.1; next 1.1;
22253 1.1 date 70.12.31.11.00.05; author joe; state bogus; branches; next; newph;
22254 1.2.6.1 date 71.01.01.08.00.05; author joe; state Exp; branches; next;
22256 1.5 log @@ newphrase1; newphrase2 42; text @head revision@
22257 1.4 log @@ text @d1 1
22260 1.3 log @@ text @d1 1
22263 1.2 log @@ text @d1 1
22270 1.2.6.1 log @@ text @d1 1
22274 modify_repo
mv $TESTDIR/file2
,v
$CVSROOT_DIRNAME/first-dir
/file2
,v
22275 # ' Match the single quote in above here doc -- for font-lock mode.
22277 # First test the default branch.
22278 dotest rcs-5
"${testcvs} -q update file2" "U file2"
22279 dotest rcs-6
"cat file2" "branch revision"
22281 # Check in a revision on the branch to force CVS to
22282 # interpret every revision in the file.
22283 dotest rcs-6a
"${testcvs} -q update -r branch file2" ""
22284 echo "next branch revision" > file2
22285 dotest rcs-6b
"${testcvs} -q ci -m mod file2" \
22286 "$CVSROOT_DIRNAME/first-dir/file2,v <-- file2
22287 new revision: 1\.2\.6\.2; previous revision: 1\.2\.6\.1"
22289 # Now get rid of the default branch, it will get in the way.
22290 dotest rcs-7
"${testcvs} admin -b file2" \
22291 "RCS file: ${CVSROOT_DIRNAME}/first-dir/file2,v
22293 # But we do want to make sure that "cvs admin" leaves the newphrases
22295 # The extra whitespace regexps are for the RCS library, which does
22296 # not preserve whitespace in the dogmatic manner of RCS 5.7. -twp
22298 "grep testofanewphrase ${CVSROOT_DIRNAME}/first-dir/file2,v" \
22299 "testofanewphrase[ ][ ]*@without newphrase we'd have trouble extending @@ all@[ ]*;"
22300 # The easiest way to test for newphrases in deltas and deltatexts
22301 # is to just look at the whole file, I guess.
22302 dotest rcs-8a
"cat ${CVSROOT_DIRNAME}/first-dir/file2,v" \
22309 testofanewphrase @without newphrase we'd have trouble extending @@ all@;
22312 date 71\.01\.01\.01\.00\.00; author joe; state bogus;
22317 date 71\.01\.01\.00\.00\.05; author joe; state bogus;
22322 date 70\.12\.31\.15\.00\.05; author joe; state bogus;
22327 date 70\.12\.31\.12\.15\.05; author me; state bogus;
22333 date 70\.12\.31\.11\.00\.05; author joe; state bogus;
22339 date 71\.01\.01\.08\.00\.05; author joe; state Exp;
22344 date [0-9.]*; author ${username}; state Exp;
22347 commitid ${commitid};
22415 next branch revision
22418 dotest rcs-9
"${testcvs} -q update -p -D '1970-12-31 11:30 UT' file2" \
22421 dotest rcs-10
"${testcvs} -q update -p -D '1970-12-31 12:30 UT' file2" \
22424 dotest rcs-11
"${testcvs} -q update -p -D '1971-01-01 00:30 UT' file2" \
22425 "new year revision"
22427 # Same test as rcs-10, but with am/pm.
22428 dotest rcs-12
"${testcvs} -q update -p -D 'December 31, 1970 12:30pm UT' file2" \
22431 # Same test as rcs-11, but with am/pm.
22432 dotest rcs-13
"${testcvs} -q update -p -D 'January 1, 1971 12:30am UT' file2" \
22433 "new year revision"
22435 # OK, now make sure cvs log doesn't have any trouble with the
22436 # newphrases and such.
22437 dotest rcs-14
"${testcvs} -q log file2" "
22438 RCS file: ${CVSROOT_DIRNAME}/first-dir/file2,v
22439 Working file: file2
22446 keyword substitution: kv
22447 total revisions: 7; selected revisions: 7
22449 ----------------------------
22451 date: 1971-01-01 01:00:00 [+-]0000; author: joe; state: bogus; lines: ${PLUS}1 -1;
22452 \*\*\* empty log message \*\*\*
22453 ----------------------------
22455 date: 1971-01-01 00:00:05 [+-]0000; author: joe; state: bogus; lines: ${PLUS}1 -1;
22456 \*\*\* empty log message \*\*\*
22457 ----------------------------
22459 date: 1970-12-31 15:00:05 [+-]0000; author: joe; state: bogus; lines: ${PLUS}1 -1;
22460 \*\*\* empty log message \*\*\*
22461 ----------------------------
22463 date: 1970-12-31 12:15:05 [+-]0000; author: me; state: bogus; lines: ${PLUS}1 -1;
22465 \*\*\* empty log message \*\*\*
22466 ----------------------------
22468 date: 1970-12-31 11:00:05 [+-]0000; author: joe; state: bogus;
22469 \*\*\* empty log message \*\*\*
22470 ----------------------------
22471 revision 1\.2\.6\.2
22472 date: ${ISO8601DATE}; author: ${username}; state: Exp; lines: ${PLUS}1 -1; commitid: ${commitid};
22474 ----------------------------
22475 revision 1\.2\.6\.1
22476 date: 1971-01-01 08:00:05 [+-]0000; author: joe; state: Exp; lines: ${PLUS}1 -1;
22477 \*\*\* empty log message \*\*\*
22478 ============================================================================="
22479 # Now test each date format for "cvs log -d".
22480 # Earlier than 1971-01-01
22481 dotest rcs-15
"${testcvs} -q log -d '<1971-01-01 00:00 GMT' file2 \
22483 "total revisions: 7; selected revisions: 3
22487 # Later than 1971-01-01
22488 dotest rcs-16
"${testcvs} -q log -d '1971-01-01 00:00 GMT<' file2 \
22490 "total revisions: 7; selected revisions: 4
22493 revision 1\.2\.6\.2
22494 revision 1\.2\.6\.1"
22495 # Alternate syntaxes for later and earlier; multiple -d options
22496 dotest rcs-17
"${testcvs} -q log -d '>1971-01-01 00:00 GMT' \
22497 -d '1970-12-31 12:15 GMT>' file2 | grep revision" \
22498 "total revisions: 7; selected revisions: 5
22502 revision 1\.2\.6\.2
22503 revision 1\.2\.6\.1"
22504 # Range, and single date
22505 dotest rcs-18
"${testcvs} -q log -d '1970-12-31 11:30 GMT' \
22506 -d '1971-01-01 00:00:05 GMT<1971-01-01 01:00:01 GMT' \
22507 file2 | grep revision" \
22508 "total revisions: 7; selected revisions: 2
22511 # Alternate range syntax; equality
22512 dotest rcs-19
"${testcvs} -q log \
22513 -d '1971-01-01 01:00:01 GMT>=1971-01-01 00:00:05 GMT' \
22514 file2 | grep revision" \
22515 "total revisions: 7; selected revisions: 2
22523 modify_repo
rm -rf $CVSROOT_DIRNAME/first-dir
22529 # More date tests. Might as well do this as a separate
22530 # test from "rcs", so that we don't need to perturb the
22531 # "written by RCS 5.7" RCS file.
22532 modify_repo mkdir
$CVSROOT_DIRNAME/first-dir
22533 # Significance of various dates:
22534 # * At least one Y2K standard refers to recognizing 9 Sep 1999
22535 # (as an example of a pre-2000 date, I guess).
22536 # * At least one Y2K standard refers to recognizing 1 Jan 2001
22537 # (as an example of a post-2000 date, I guess).
22538 # * Many Y2K standards refer to 2000 being a leap year.
22539 cat <<EOF >$TESTDIR/file1,v
22540 head 1.7; access; symbols; locks; strict;
22541 1.7 date 2004.08.31.01.01.01; author sue; state; branches; next 1.6;
22542 1.6 date 2004.02.29.01.01.01; author sue; state; branches; next 1.5;
22543 1.5 date 2003.02.28.01.01.01; author sue; state; branches; next 1.4;
22544 1.4 date 2001.01.01.01.01.01; author sue; state; branches; next 1.3;
22545 1.3 date 2000.02.29.01.01.01; author sue; state; branches; next 1.2;
22546 1.2 date 99.09.09.01.01.01; author sue; state; branches; next 1.1;
22547 1.1 date 98.09.10.01.01.01; author sue; state; branches; next;
22549 1.7 log @@ text @head revision@
22550 1.6 log @@ text @d1 1
22552 2004 was a great year for leaping@
22553 1.5 log @@ text @d1 1
22556 1.4 log @@ text @d1 1
22559 1.3 log @@ text @d1 1
22561 2000 is also a good year for leaping@
22562 1.2 log @@ text @d1 1
22564 Tonight we're going to party like it's a certain year@
22565 1.1 log @@ text @d1 1
22567 Need to start somewhere@
22569 modify_repo
mv $TESTDIR/file1
,v
$CVSROOT_DIRNAME/first-dir
/file1
,v
22570 # ' Match the 3rd single quote in the here doc -- for font-lock mode.
22572 dotest rcs2-1
"${testcvs} -q co first-dir" 'U first-dir/file1'
22576 dotest rcs2-2
"${testcvs} -q update -p -D '1999-09-09 11:30 UT' file1" \
22577 "Tonight we're going to party like it's a certain year"
22579 dotest rcs2-3
"${testcvs} -q update -p -D '2001-01-01 11:30 UT' file1" \
22582 dotest rcs2-4
"${testcvs} -q update -p -D '2000-02-29 11:30 UT' file1" \
22583 "2000 is also a good year for leaping"
22584 # 29 Feb 2003 is invalid
22585 dotest_fail rcs2-5
"${testcvs} -q update -p -D '2003-02-29 11:30 UT' file1" \
22586 "$CPROG \[update aborted\]: Can't parse date/time: \`2003-02-29 11:30 UT'"
22588 dotest rcs2-6
"${testcvs} -q update -p -D 2007-01-07 file1" \
22590 # This assumes that the clock of the machine running the tests
22591 # is set to at least the year 1998 or so. There don't seem
22592 # to be a lot of ways to test the relative date code (short
22593 # of something like LD_LIBRARY_PRELOAD'ing in our own
22594 # getttimeofday, or hacking the CVS source with testing
22595 # features, which always seems to be problematic since then
22596 # someone feels like documenting them and things go downhill
22599 # These tests can be expected to fail 3 times every 400 years
22600 # starting Feb. 29, 2096 (because 8 years from that date would
22601 # be Feb. 29, 2100, which is an invalid date -- 2100 isn't a
22602 # leap year because it's divisible by 100 but not by 400).
22604 dotest rcs2-7
"${testcvs} -q update -p -D '96 months' file1" \
22606 dotest rcs2-8
"${testcvs} -q update -p -D '8 years' file1" \
22612 modify_repo
rm -rf $CVSROOT_DIRNAME/first-dir
22618 # More RCS file tests, in particular at least some of the
22619 # error handling issues.
22620 mkdir
${CVSROOT_DIRNAME}/first-dir
22621 cat <<EOF >$TESTDIR/file1,v
22622 head 1.1; access; symbols; locks; expand o; 1.1 date 2007.03.20.04.03.02
22623 ; author jeremiah ;state ; branches; next;desc@@1.1log@@text@head@
22625 modify_repo
mv $TESTDIR/file1
,v
$CVSROOT_DIRNAME/first-dir
/file1
,v
22627 # CVS requires whitespace between "desc" and its value.
22628 # The rcsfile(5) manpage doesn't really seem to answer the
22629 # question one way or the other (it has a grammar but almost
22630 # nothing about lexical analysis).
22631 dotest_fail rcs3-1
"${testcvs} -q co first-dir" \
22632 "${SPROG} \[checkout aborted\]: EOF while looking for value in RCS file ${CVSROOT_DIRNAME}/first-dir/file1,v"
22633 cat <<EOF >$TESTDIR/file1,v
22634 head 1.1; access; symbols; locks; expand o; 1.1 date 2007.03.20.04.03.02
22635 ; author jeremiah ;state ; branches; next;desc @@1.1log@@text@head@
22637 modify_repo
mv $TESTDIR/file1
,v
$CVSROOT_DIRNAME/first-dir
/file1
,v
22638 # Whitespace issues, likewise.
22639 dotest_fail rcs3-2
"${testcvs} -q co first-dir" \
22640 "${SPROG} \[checkout aborted\]: unexpected '.x6c' reading revision number in RCS file ${CVSROOT_DIRNAME}/first-dir/file1,v"
22641 cat <<EOF >$TESTDIR/file1,v
22642 head 1.1; access; symbols; locks; expand o; 1.1 date 2007.03.20.04.03.02
22643 ; author jeremiah ;state ; branches; next;desc @@1.1 log@@text@head@
22645 modify_repo
mv $TESTDIR/file1
,v
$CVSROOT_DIRNAME/first-dir
/file1
,v
22646 # Charming array of different messages for similar
22647 # whitespace issues (depending on where the whitespace is).
22648 dotest_fail rcs3-3
"${testcvs} -q co first-dir" \
22649 "${SPROG} \[checkout aborted\]: EOF while looking for value in RCS file ${CVSROOT_DIRNAME}/first-dir/file1,v"
22650 cat <<EOF >$TESTDIR/file1,v
22651 head 1.1; access; symbols; locks; expand o; 1.1 date 2007.03.20.04.03.02
22652 ; author jeremiah ;state ; branches; next;desc @@1.1 log @@text @head@
22654 modify_repo
mv $TESTDIR/file1
,v
$CVSROOT_DIRNAME/first-dir
/file1
,v
22655 dotest rcs3-4
"${testcvs} -q co first-dir" 'U first-dir/file1'
22657 # Ouch, didn't expect this one. FIXCVS. Or maybe just remove
22658 # the feature, if this is a -s problem?
22659 dotest_fail rcs3-5
"${testcvs} log -s nostate first-dir/file1" \
22660 "${DOTSTAR}ssertion.*failed${DOTSTAR}" "${DOTSTAR}failed assertion${DOTSTAR}"
22662 dotest_fail rcs3-5a
"${testcvs} log -s nostate file1" \
22663 "${DOTSTAR}ssertion.*failed${DOTSTAR}" "${DOTSTAR}failed assertion${DOTSTAR}"
22666 # See remote code above for rationale for cd.
22668 dotest rcs3-6
"${testcvs} log -R file1" \
22669 "${CVSROOT_DIRNAME}/first-dir/file1,v"
22671 # OK, now put an extraneous '\0' at the end.
22672 mv $CVSROOT_DIRNAME/first-dir
/file1
,v
$TESTDIR/file1
,v
22673 ${AWK} </dev
/null
'BEGIN { printf "@%c", 10 }' |
${TR} '@' '\000' \
22675 modify_repo
mv $TESTDIR/file1
,v
$CVSROOT_DIRNAME/first-dir
/file1
,v
22676 dotest_fail rcs3-7
"${testcvs} log -s nostate file1" \
22677 "${SPROG} \[log aborted\]: unexpected '.x0' reading revision number in RCS file ${CVSROOT_DIRNAME}/first-dir/file1,v"
22682 modify_repo
rm -rf $CVSROOT_DIRNAME/first-dir
22688 # Fix a bug that shows up when checking out files by date with the
22689 # "-D date" command line option. There is code in the original to
22690 # handle a special case. If the date search finds revision 1.1 it
22691 # is supposed to check whether revision 1.1.1.1 has the same date
22692 # stamp, which would indicate that the file was originally brought
22693 # in with "cvs import". In that case it is supposed to return the
22694 # vendor branch version 1.1.1.1.
22696 # However, there is a bug in the code. It actually compares
22697 # the date of revision 1.1 for equality with the date given
22698 # on the command line -- clearly wrong. This commit fixes
22701 # There is an additional bug which is _not_ fixed yet.
22702 # The date comparison should not be a strict
22703 # equality test. It should allow a fudge factor of, say, 2-3
22704 # seconds. Old versions of CVS created the two revisions
22705 # with two separate invocations of the RCS "ci" command. We
22706 # have many old files in the tree in which the dates of
22707 # revisions 1.1 and 1.1.1.1 differ by 1 second.
22709 # Need a predictable time zone.
22718 echo 'OpenMunger sources' >file1
22720 # choose a time in the past to demonstrate the problem
22721 touch -t 200012010123 file1
22723 dotest_sort rcs4-1 \
22724 "${testcvs} import -d -m add rcs4-dir openmunger openmunger-1_0" \
22728 No conflicts created by this import'
22729 echo 'OpenMunger sources release 1.1 extras' >>file1
22730 touch -t 200112011234 file1
22731 dotest_sort rcs4-2 \
22732 "${testcvs} import -d -m add rcs4-dir openmunger openmunger-1_1" \
22735 No conflicts created by this import
22738 # Next checkout the new module
22740 "${testcvs} -q co rcs4-dir" \
22743 echo 'local change' >> file1
22745 # commit a local change
22746 dotest rcs4-4
"${testcvs} -q commit -m hack file1" \
22747 "$CVSROOT_DIRNAME/rcs4-dir/file1,v <-- file1
22748 new revision: 1\.2; previous revision: 1\.1"
22749 # now see if we get version 1.1 or 1.1.1.1 when we ask for
22750 # a checkout by time... it really should be 1.1.1.1 as
22751 # that was indeed the version that was visible at the target
22754 "${testcvs} -q update -D 'October 1, 2001 UTC' file1" \
22757 "${testcvs} -q status file1" \
22758 '===================================================================
22759 File: file1 Status: Up-to-date
22761 Working revision: 1\.1\.1\.1.*
22762 Repository revision: 1\.1\.1\.1 '${CVSROOT_DIRNAME}'/rcs4-dir/file1,v
22763 Commit Identifier: '${commitid}'
22765 Sticky Date: 2001\.10\.01\.00\.00\.00
22766 Sticky Options: (none)'
22772 modify_repo
rm -rf $CVSROOT_DIRNAME/rcs4-dir
22778 # Some tests of the $Log keyword and log message without a trailing
22779 # EOL. This used to look ugly and, in the worst case, could cause
22780 # a seg fault due to a buffer overflow.
22782 # Note that it should not be possible to create this situation via a
22783 # CVS server (and any client), since the server itself inserts the
22784 # trailing EOL onto log messages that are missing one. Still, we
22785 # shouldn't segfault due to a corrupt RCS file and I think that a log
22786 # message without the trailing EOL doesn't actually violate the RCS
22787 # spec, though it doesn't appear to be possible to create such a log
22788 # message using RCS 5.7.
22790 modify_repo mkdir
$CVSROOT_DIRNAME/rcs5
22791 cat <<\EOF
>$TESTDIR/file1
,v
22798 1.1 date 2007.03.20.04.03.02; author jeremiah
; state Ext
; branches
; next
;
22805 @he always had very fine wine@
22810 echo ' * History: $''Log$' >>$TESTDIR/file1
,v
22811 cat <<\EOF
>>$TESTDIR/file1
,v
22816 modify_repo
mv $TESTDIR/file1
,v
$CVSROOT_DIRNAME/rcs
5/file1
,v
22820 dotest rcs5-1
"$testcvs -Q co rcs5"
22821 dotest rcs5-2
"cat rcs5/file1" \
22824 \\* History: "'\$'"Log: file1,v "'\$'"
22825 \\* History: Revision 1\.1 2007/03/20 04:03:02 jeremiah
22826 \\* History: he always had very fine wine
22833 modify_repo
rm -rf $CVSROOT_DIRNAME/rcs5
22839 # Tests of CVS lock files.
22840 # TODO-maybe: Add a test where we arrange for a loginfo
22841 # script (or some such) to ensure that locks are in place
22842 # so then we can see how they are behaving.
22852 echo file >sdir
/ssdir
/file1
22853 dotest lockfiles-1 \
22854 "${testcvs} -Q import -m import-it first-dir bar baz" ""
22858 dotest lockfiles-2
"${testcvs} -q co first-dir" \
22859 "U first-dir/sdir/ssdir/file1"
22860 dotest lockfiles-3
"${testcvs} -Q co CVSROOT" ""
22862 echo "LockDir=${TESTDIR}/locks" >>config
22863 dotest lockfiles-4
"${testcvs} -q ci -m config-it" \
22864 "$CVSROOT_DIRNAME/CVSROOT/config,v <-- config
22865 new revision: 1\.[0-9]*; previous revision: 1\.[0-9]*
22866 $SPROG commit: Rebuilding administrative file database"
22867 cd ..
/first-dir
/sdir
/ssdir
22868 # The error message appears twice because Lock_Cleanup only
22869 # stops recursing after the first attempt.
22870 dotest_fail lockfiles-5
"${testcvs} -q update" \
22871 "${SPROG} \[update aborted\]: cannot stat ${TESTDIR}/locks: No such file or directory"
22872 mkdir
${TESTDIR}/locks
22873 # Grumble, mumble. Cygwin.
22874 if test -n "$remotehost"; then
22875 $CVS_RSH $remotehost "chmod u=rwx,g=r,o= ${TESTDIR}/locks"
22877 chmod u
=rwx
,g
=r
,o
= ${TESTDIR}/locks
22881 CVSUMASK
=0077; export CVSUMASK
22882 dotest lockfiles-6
"${testcvs} -q update" ""
22883 # TODO: should also be testing that CVS continues to honor the
22884 # umask and CVSUMASK normally. In the case of the umask, CVS
22885 # doesn't seem to use it for much (although it perhaps should).
22886 dotest lockfiles-7
"ls ${TESTDIR}/locks/first-dir/sdir/ssdir" ""
22888 # The policy is that when CVS creates new lock directories, they
22889 # inherit the permissions from the parent directory. CVSUMASK
22890 # isn't right, because typically the reason for LockDir is to
22891 # use a different set of permissions.
22894 if test -n "$remotehost"; then
22895 dotest lockfiles-7a
"$CVS_RSH $remotehost 'ls -ld ${TESTDIR}/locks/first-dir'" \
22896 "drwxr-----.*first-dir"
22897 dotest lockfiles-7b
"$CVS_RSH $remotehost 'ls -ld ${TESTDIR}/locks/first-dir/sdir/ssdir'" \
22898 "drwxr-----.*first-dir/sdir/ssdir"
22900 dotest lockfiles-7a
"ls -ld ${TESTDIR}/locks/first-dir" \
22901 "drwxr-----.*first-dir"
22902 dotest lockfiles-7b
"ls -ld ${TESTDIR}/locks/first-dir/sdir/ssdir" \
22903 "drwxr-----.*first-dir/sdir/ssdir"
22907 dotest lockfiles-8
"${testcvs} -q update" ""
22908 dotest lockfiles-9
"${testcvs} -q co -l ." ""
22911 ### There are race conditions in the following tests, but hopefully
22912 ### the 5 seconds the first process waits to remove the lockdir and
22913 ### the 30 seconds CVS waits betweens checks will be significant
22914 ### enough to render the case moot.
22916 # Considers the following cases:
22919 # Operation Allowed (case #)
22921 # Read Promotable Write
22922 # _______ __________ ______
22923 # Read |Yes (1) Yes (2) No (3)
22924 # Promotable Read |Yes (4) No (5) No (6)
22925 # Write |No (7) No (8) No (9)
22927 # Tests do not appear in same ordering as table:
22928 # 1. Read when read locks are present...
22929 # 2. Read when promotable locks are present...
22930 # 3. Don't read when write locks present...
22931 # 4. Read but don't write when read locks are present... (fail
22932 # commit up-to-date check with promotable lock present).
22933 # 5. Don't allow promotable read when promotable locks are present...
22934 # (fail to perform commit up-to-date check with promotable lock
22936 # 6. Don't allow promotable read when write locks are present...
22937 # (fail to perform commit up-to-date check with promotable lock
22939 # 7. Don't write when read locks are present...
22940 # 8. Don't write when promotable locks are present...
22941 # 9. Don't write when write locks are present...
22943 # 3. Don't read when write locks present...
22944 mkdir
"$TESTDIR/locks/first-dir/#cvs.lock"
22945 (sleep 5; rmdir "$TESTDIR/locks/first-dir/#cvs.lock")&
22946 dotest lockfiles-10
"$testcvs -q co -l first-dir" \
22947 "$SPROG checkout: \[[0-9:]*\] waiting for $username's lock in $CVSROOT_DIRNAME/first-dir
22948 $SPROG checkout: \[[0-9:]*\] obtained lock in $CVSROOT_DIRNAME/first-dir"
22950 # 1. Read when read locks are present...
22951 touch "$TESTDIR/locks/first-dir/#cvs.rfl.test.lock"
22952 dotest lockfiles-11
"$testcvs -q co -l first-dir"
22953 rm "$TESTDIR/locks/first-dir/#cvs.rfl.test.lock"
22955 # 2. Read when promotable locks are present...
22958 touch "$TESTDIR/locks/first-dir/sdir/ssdir/#cvs.pfl.test.lock"
22959 dotest lockfiles-12
"$testcvs -q co first-dir" \
22960 "U first-dir/sdir/ssdir/file1"
22961 rm "$TESTDIR/locks/first-dir/sdir/ssdir/#cvs.pfl.test.lock"
22963 # 7. Don't write when read locks are present...
22964 echo I always have trouble coming up with witty text
for the
test files
>>first-dir
/sdir
/ssdir
/file1
22965 touch "$TESTDIR/locks/first-dir/sdir/ssdir/#cvs.rfl.test.lock"
22966 (sleep 5; rm "$TESTDIR/locks/first-dir/sdir/ssdir/#cvs.rfl.test.lock")&
22967 dotest lockfiles-13
"$testcvs -q ci -mconflict first-dir" \
22968 "$SPROG commit: \[[0-9:]*\] waiting for $username's lock in $CVSROOT_DIRNAME/first-dir/sdir/ssdir
22969 $SPROG commit: \[[0-9:]*\] obtained lock in $CVSROOT_DIRNAME/first-dir/sdir/ssdir
22970 $CVSROOT_DIRNAME/first-dir/sdir/ssdir/file1,v <-- first-dir/sdir/ssdir/file1
22971 new revision: 1\.2; previous revision: 1\.1"
22973 # 4. Read but don't write when read locks are present... (fail
22974 # commit up-to-date check with promotable lock present).
22976 echo something that would render readers all full of smiles
>>first-dir
/sdir
/ssdir
/file1
22977 touch "$TESTDIR/locks/first-dir/sdir/ssdir/#cvs.rfl.test.lock"
22978 dotest_fail lockfiles-14
"$testcvs -q ci -mnot-up-to-date first-dir" \
22979 "$SPROG commit: Up-to-date check failed for \`first-dir/sdir/ssdir/file1'
22980 $SPROG \[commit aborted\]: correct above errors first!"
22981 rm "$TESTDIR/locks/first-dir/sdir/ssdir/#cvs.rfl.test.lock"
22983 # 5. Don't allow promotable read when promotable locks are present...
22984 # (fail to perform commit up-to-date check with promotable lock
22986 touch "$TESTDIR/locks/first-dir/sdir/ssdir/#cvs.pfl.test.lock"
22987 (sleep 5; rm "$TESTDIR/locks/first-dir/sdir/ssdir/#cvs.pfl.test.lock")&
22988 dotest_fail lockfiles-15
"$testcvs -q ci -mnot-up-to-date first-dir" \
22989 "$SPROG commit: \[[0-9:]*\] waiting for $username's lock in $CVSROOT_DIRNAME/first-dir/sdir/ssdir
22990 $SPROG commit: \[[0-9:]*\] obtained lock in $CVSROOT_DIRNAME/first-dir/sdir/ssdir
22991 $SPROG commit: Up-to-date check failed for \`first-dir/sdir/ssdir/file1'
22992 $SPROG \[commit aborted\]: correct above errors first!"
22994 # 6. Don't allow promotable read when write locks are present...
22995 # (fail to perform commit up-to-date check with promotable lock
22997 mkdir
"$TESTDIR/locks/first-dir/sdir/ssdir/#cvs.lock"
22998 (sleep 5; rmdir "$TESTDIR/locks/first-dir/sdir/ssdir/#cvs.lock")&
22999 dotest_fail lockfiles-16
"$testcvs -q ci -mnot-up-to-date first-dir" \
23000 "$SPROG commit: \[[0-9:]*\] waiting for $username's lock in $CVSROOT_DIRNAME/first-dir/sdir/ssdir
23001 $SPROG commit: \[[0-9:]*\] obtained lock in $CVSROOT_DIRNAME/first-dir/sdir/ssdir
23002 $SPROG commit: Up-to-date check failed for \`first-dir/sdir/ssdir/file1'
23003 $SPROG \[commit aborted\]: correct above errors first!"
23005 # 8. Don't write when promotable locks are present...
23006 dotest lockfiles-17
"$testcvs -Q up -C first-dir/sdir/ssdir"
23007 echo the kinds of smiles that light faces
for miles
>>first-dir
/sdir
/ssdir
/file1
23008 touch "$TESTDIR/locks/first-dir/sdir/ssdir/#cvs.pfl.test.lock"
23009 (sleep 5; rm "$TESTDIR/locks/first-dir/sdir/ssdir/#cvs.pfl.test.lock")&
23010 dotest lockfiles-18
"$testcvs -q ci -mnot-up-to-date first-dir" \
23011 "$SPROG commit: \[[0-9:]*\] waiting for $username's lock in $CVSROOT_DIRNAME/first-dir/sdir/ssdir
23012 $SPROG commit: \[[0-9:]*\] obtained lock in $CVSROOT_DIRNAME/first-dir/sdir/ssdir
23013 $CVSROOT_DIRNAME/first-dir/sdir/ssdir/file1,v <-- first-dir/sdir/ssdir/file1
23014 new revision: 1\.3; previous revision: 1\.2"
23016 # 9. Don't write when write locks are present...
23017 echo yet this poem would probably only give longfellow bile
>>first-dir
/sdir
/ssdir
/file1
23018 mkdir
"$TESTDIR/locks/first-dir/sdir/ssdir/#cvs.lock"
23019 (sleep 5; rmdir "$TESTDIR/locks/first-dir/sdir/ssdir/#cvs.lock")&
23020 dotest lockfiles-19
"$testcvs -q ci -mnot-up-to-date first-dir" \
23021 "$SPROG commit: \[[0-9:]*\] waiting for $username's lock in $CVSROOT_DIRNAME/first-dir/sdir/ssdir
23022 $SPROG commit: \[[0-9:]*\] obtained lock in $CVSROOT_DIRNAME/first-dir/sdir/ssdir
23023 $CVSROOT_DIRNAME/first-dir/sdir/ssdir/file1,v <-- first-dir/sdir/ssdir/file1
23024 new revision: 1\.4; previous revision: 1\.3"
23026 # 10. Don't write when history locks are present...
23027 echo have you ever heard a poem quite so vile
\? >>first-dir
/sdir
/ssdir
/file1
23028 mkdir
"$TESTDIR/locks/CVSROOT/#cvs.history.lock"
23029 (sleep 5; rmdir "$TESTDIR/locks/CVSROOT/#cvs.history.lock")&
23030 dotest lockfiles-20
"$testcvs -q ci -mnot-up-to-date first-dir" \
23031 "$CVSROOT_DIRNAME/first-dir/sdir/ssdir/file1,v <-- first-dir/sdir/ssdir/file1
23032 new revision: 1\.5; previous revision: 1\.4
23033 $SPROG commit: \[[0-9:]*\] waiting for $username's lock in $CVSROOT_DIRNAME/CVSROOT
23034 $SPROG commit: \[[0-9:]*\] obtained lock in $CVSROOT_DIRNAME/CVSROOT"
23036 dotest lockfiles-21
"$testcvs -Q tag newtag first-dir"
23038 rm $CVSROOT_DIRNAME/CVSROOT
/val-tags
23039 mkdir
"$TESTDIR/locks/CVSROOT/#cvs.val-tags.lock"
23040 (sleep 5; rmdir "$TESTDIR/locks/CVSROOT/#cvs.val-tags.lock")&
23041 dotest lockfiles-22
"$testcvs -q up -r newtag first-dir" \
23042 "$SPROG update: \[[0-9:]*\] waiting for $username's lock in $CVSROOT_DIRNAME/CVSROOT
23043 $SPROG update: \[[0-9:]*\] obtained lock in $CVSROOT_DIRNAME/CVSROOT"
23046 dotest lockfiles-cleanup-1
"$testcvs -q up -pr1.1 config >config" ""
23047 dotest lockfiles-cleanup-2
"$testcvs -q ci -m config-it" \
23048 "$CVSROOT_DIRNAME/CVSROOT/config,v <-- config
23049 new revision: 1\.[0-9]*; previous revision: 1\.[0-9]*
23050 $SPROG commit: Rebuilding administrative file database"
23057 rm -r $TESTDIR/locks
23059 modify_repo
rm -rf $CVSROOT_DIRNAME/first-dir
23065 # Tests to make sure we get the expected behavior
23066 # when we recover a repository from an old backup
23069 # Backup will be older than some developer's workspaces
23070 # This means the first attempt at an update will fail
23071 # The workaround for this is to replace the CVS
23072 # directories with those from a "new" checkout from
23073 # the recovered repository. Due to this, multiple
23074 # merges should cause conflicts (the same data
23075 # will be merged more than once).
23076 # A workspace updated before the date of the recovered
23077 # copy will not need any extra attention
23079 # Note that backuprecover-15 is probably a failure case
23080 # If nobody else had a more recent update, the data would be lost
23082 # Granted, the developer should have been notified not to do this
23083 # by now, but still...
23085 mkdir backuprecover
; cd backuprecover
23087 dotest backuprecover-1
"$testcvs -q co -l ."
23089 dotest backuprecover-2
"${testcvs} add first-dir" \
23090 "Directory ${CVSROOT_DIRNAME}/first-dir added to the repository"
23093 dotest backuprecover-3
"${testcvs} add dir" \
23094 "Directory ${CVSROOT_DIRNAME}/first-dir/dir added to the repository"
23095 touch file1 dir
/file2
23096 dotest backuprecover-4
"${testcvs} -q add file1 dir/file2" \
23097 "${SPROG} add: use \`${SPROG} commit' to add these files permanently"
23098 dotest backuprecover-5
"${testcvs} -q ci -mtest" \
23099 "$CVSROOT_DIRNAME/first-dir/file1,v <-- file1
23100 initial revision: 1\.1
23101 $CVSROOT_DIRNAME/first-dir/dir/file2,v <-- dir/file2
23102 initial revision: 1\.1"
23103 echo "Line one" >>file1
23104 echo " is the place" >>file1
23105 echo " we like to begin" >>file1
23106 echo "Anything else" >>file1
23107 echo " looks like" >>file1
23108 echo " a sin" >>file1
23109 echo "File 2" >>dir
/file2
23110 echo " is the place" >>dir
/file2
23111 echo " the rest of it goes" >>dir
/file2
23112 echo "Why I don't use" >>dir
/file2
23113 echo " something like 'foo'" >>dir
/file2
23114 echo " God only knows" >>dir
/file2
23115 dotest backuprecover-6
"${testcvs} -q ci -mtest" \
23116 "$CVSROOT_DIRNAME/first-dir/file1,v <-- file1
23117 new revision: 1\.2; previous revision: 1\.1
23118 $CVSROOT_DIRNAME/first-dir/dir/file2,v <-- dir/file2
23119 new revision: 1\.2; previous revision: 1\.1"
23121 # Simulate the lazy developer
23122 # (he did some work but didn't check it in...)
23125 dotest backuprecover-7
"${testcvs} -Q co first-dir" ''
23127 sed -e "s/looks like/just looks like/" file1
>tmp
; mv tmp file1
23128 sed -e "s/don't use/don't just use/" dir
/file2
>tmp
; mv tmp dir
/file2
23130 # developer 1 is on a roll
23131 cd ..
/..
/1/first-dir
23132 echo "I need some more words" >>file1
23133 echo " to fill up this space" >>file1
23134 echo " anything else would be a disgrace" >>file1
23135 echo "My rhymes cross many boundries" >>dir
/file2
23136 echo " this time it's files" >>dir
/file2
23137 echo " a word that fits here would be something like dials" >>dir
/file2
23138 dotest backuprecover-8
"${testcvs} -q ci -mtest" \
23139 "$CVSROOT_DIRNAME/first-dir/file1,v <-- file1
23140 new revision: 1\.3; previous revision: 1\.2
23141 $CVSROOT_DIRNAME/first-dir/dir/file2,v <-- dir/file2
23142 new revision: 1\.3; previous revision: 1\.2"
23144 # Save a backup copy
23145 cp -R $CVSROOT_DIRNAME/first-dir
$TESTDIR/backup
23147 # Simulate developer 3
23150 dotest backuprecover-9a
"${testcvs} -Q co first-dir" ''
23154 echo "Developer 1 makes very lame rhymes" >>file1
23155 echo " I think he should quit and become a mime" >>file1
23156 echo "What the %*^# kind of rhyme crosses a boundry?" >>dir
/file2
23157 echo " I think you should quit and get a job in the foundry" >>dir
/file2
23158 dotest backuprecover-9b
"${testcvs} -q ci -mtest" \
23159 "$CVSROOT_DIRNAME/first-dir/file1,v <-- file1
23160 new revision: 1\.4; previous revision: 1\.3
23161 $CVSROOT_DIRNAME/first-dir/dir/file2,v <-- dir/file2
23162 new revision: 1\.4; previous revision: 1\.3"
23164 # Developer 4 so we can simulate a conflict later...
23167 dotest backuprecover-10
"${testcvs} -Q co first-dir" ''
23169 sed -e "s/quit and/be fired so he can/" dir
/file2
>tmp
; mv tmp dir
/file2
23171 # And back to developer 1
23172 cd ..
/..
/1/first-dir
23173 dotest backuprecover-11
"${testcvs} -Q update" ''
23176 echo "Oh yeah, well rhyme this" >>file1
23177 echo " developer three" >>file1
23178 echo " you want opposition" >>file1
23179 echo " you found some in me!" >>file1
23180 echo "I'll give you mimes" >>dir
/file2
23181 echo " and foundries galore!" >>dir
/file2
23182 echo " your head will spin" >>dir
/file2
23183 echo " once you find what's in store!" >>dir
/file2
23184 dotest backuprecover-12
"${testcvs} -q ci -mtest" \
23185 "$CVSROOT_DIRNAME/first-dir/file1,v <-- file1
23186 new revision: 1\.5; previous revision: 1\.4
23187 $CVSROOT_DIRNAME/first-dir/dir/file2,v <-- dir/file2
23188 new revision: 1\.5; previous revision: 1\.4"
23190 # developer 3'll do a bit of work that never gets checked in
23191 cd ..
/..
/3/first-dir
23192 dotest backuprecover-13
"${testcvs} -Q update" ''
23193 sed -e "s/very/some extremely/" file1
>tmp
; mv tmp file1
23194 dotest backuprecover-14
"${testcvs} -q ci -mtest" \
23195 "$CVSROOT_DIRNAME/first-dir/file1,v <-- file1
23196 new revision: 1\.6; previous revision: 1\.5"
23198 echo "Tee hee hee hee" >>file1
23200 echo "Find what's in store?" >>dir
/file2
23201 echo " Oh, I'm so sure!" >>dir
/file2
23202 echo " You've got an ill, and I have the cure!" >>dir
/file2
23204 # Slag the original and restore it a few revisions back
23205 modify_repo
rm -rf $CVSROOT_DIRNAME/first-dir
23206 modify_repo
mv $TESTDIR/backup
$CVSROOT_DIRNAME/first-dir
23208 # Have developer 1 try an update and lose some data
23210 # Feel free to imagine the horrific scream of despair
23211 cd ..
/..
/1/first-dir
23212 dotest backuprecover-15
"${testcvs} update" \
23213 "${SPROG} update: Updating .
23215 ${SPROG} update: Updating dir
23218 # Developer 3 tries the same thing (he has an office)
23219 # but fails without losing data since all of his files have
23220 # uncommitted changes
23221 cd ..
/..
/3/first-dir
23222 dotest_fail backuprecover-16
"${testcvs} update" \
23223 "${SPROG} update: Updating \.
23224 ${SPROG} \[update aborted\]: could not find desired version 1\.6 in ${CVSROOT_DIRNAME}/first-dir/file1,v"
23226 # create our workspace fixin' script
23231 # This script will copy the CVS database dirs from the checked out
23232 # version of a newly recovered repository and replace the CVS
23233 # database dirs in a workspace with later revisions than those in the
23234 # recovered repository
23236 DATADIRS=\`find . -name CVS -print\`
23238 find . -name CVS -print | xargs rm -rf
23239 for file in \${DATADIRS}; do
23240 cp -R ../repos-first-dir/\${file} \${file}
23243 # We only need to fix the workspaces of developers 3 and 4
23244 # (1 lost all her data and 2 has an update date from
23245 # before the date the backup was made)
23247 dotest backuprecover-17 \
23248 "${testcvs} -Q co -d repos-first-dir first-dir" ''
23250 dotest backuprecover-18 \
23251 "${testcvs} -Q co -d repos-first-dir first-dir" ''
23253 cd ..
/3; sh ..
/fixit
23255 # (re)commit developer 3's stuff
23257 dotest backuprecover-19
"${testcvs} -q ci -mrecover/merge" \
23258 "$CVSROOT_DIRNAME/first-dir/file1,v <-- file1
23259 new revision: 1\.4; previous revision: 1\.3
23260 $CVSROOT_DIRNAME/first-dir/dir/file2,v <-- dir/file2
23261 new revision: 1\.4; previous revision: 1\.3"
23263 # and we should get a conflict on developer 4's stuff
23264 cd ..
/..
/4/first-dir
23265 dotest backuprecover-20
"${testcvs} update" \
23266 "${SPROG} update: Updating \.
23267 RCS file: ${CVSROOT_DIRNAME}/first-dir/file1,v
23268 retrieving revision 1\.3
23269 retrieving revision 1\.4
23270 Merging differences between 1\.3 and 1\.4 into file1
23271 rcsmerge: warning: conflicts during merge
23272 ${SPROG} update: conflicts found in file1
23274 ${SPROG} update: Updating dir
23275 RCS file: ${CVSROOT_DIRNAME}/first-dir/dir/file2,v
23276 retrieving revision 1\.3
23277 retrieving revision 1\.4
23278 Merging differences between 1\.3 and 1\.4 into file2
23279 rcsmerge: warning: conflicts during merge
23280 ${SPROG} update: conflicts found in dir/file2
23283 "/^<<<<<<</,/^=======/d
23284 /^>>>>>>>/d" file1
>tmp
; mv tmp file1
23286 "/^<<<<<<</,/^=======/d
23288 s/quit and/be fired so he can/" dir
/file2
>tmp
; mv tmp dir
/file2
23289 dotest backuprecover-21
"${testcvs} -q ci -mrecover/merge" \
23290 "$CVSROOT_DIRNAME/first-dir/dir/file2,v <-- dir/file2
23291 new revision: 1\.5; previous revision: 1\.4"
23293 # go back and commit developer 2's stuff to prove it can still be done
23294 cd ..
/..
/2/first-dir
23295 dotest backuprecover-22
"${testcvs} -Q update" \
23296 "RCS file: ${CVSROOT_DIRNAME}/first-dir/file1,v
23297 retrieving revision 1\.2
23298 retrieving revision 1\.4
23299 Merging differences between 1\.2 and 1\.4 into file1
23300 RCS file: ${CVSROOT_DIRNAME}/first-dir/dir/file2,v
23301 retrieving revision 1\.2
23302 retrieving revision 1\.5
23303 Merging differences between 1\.2 and 1\.5 into file2"
23304 dotest backuprecover-23
"${testcvs} -q ci -mtest" \
23305 "$CVSROOT_DIRNAME/first-dir/file1,v <-- file1
23306 new revision: 1\.5; previous revision: 1\.4
23307 $CVSROOT_DIRNAME/first-dir/dir/file2,v <-- dir/file2
23308 new revision: 1\.6; previous revision: 1\.5"
23310 # and restore the data to developer 1
23311 cd ..
/..
/1/first-dir
23312 dotest backuprecover-24
"${testcvs} -Q update" ''
23316 rm -r backuprecover
23317 modify_repo
rm -rf $CVSROOT_DIRNAME/first-dir
23323 # CVS_RSH=ssh can have a problem with a non-blocking stdio
23324 # in some cases. So, this test is all about testing :ext:
23325 # with CVS_RSH=ssh. The problem is that not all machines
23326 # will necessarily have ssh available, so be prepared to
23334 if $remote; then :; else
23335 remoteonly sshstdio
23340 if test $?
-eq 77; then
23341 skip sshstdio
"$skipreason"
23345 SSHSTDIO_ROOT
=:ext
:$host$CVSROOT_DIRNAME
23347 mkdir sshstdio
; cd sshstdio
23348 dotest sshstdio-1
"$testcvs -d $SSHSTDIO_ROOT -q co -l ."
23350 dotest sshstdio-2
"$testcvs add first-dir" \
23351 "Directory $CVSROOT_DIRNAME/first-dir added to the repository"
23353 a
='aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa'
23354 c
='aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaacaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa'
23355 # Generate 1024 lines of $a
23358 while [ $cnt -lt 5 ] ; do
23359 cnt
=`expr $cnt + 1` ;
23361 cat aaa.old aaa.old aaa.old aaa.old
> aaa
23363 dotest sshstdio-3
"$testcvs -q add aaa" \
23364 "$SPROG add: use .$SPROG commit. to add this file permanently"
23365 dotest sshstdio-4
"$testcvs -q ci -mcreate aaa" \
23366 "$CVSROOT_DIRNAME/first-dir/aaa,v <-- aaa
23367 initial revision: 1\.1"
23368 # replace lines 1, 512, 513, 1024 with $c
23369 sed 510q
< aaa
> aaa.old
23370 (echo $c; cat aaa.old
; echo $c; \
23371 echo $c; cat aaa.old
; echo $c) > aaa
23372 dotest sshstdio-5
"$testcvs -q ci -mmodify-it aaa" \
23373 "$CVSROOT_DIRNAME/first-dir/aaa,v <-- aaa
23374 new revision: 1\.2; previous revision: 1\.1"
23375 cat > wrapper.sh
<<EOF
23377 exec "\$@" 2>&1 < /dev/null | cat
23379 chmod +x wrapper.sh
23381 $testcvs -z5 -Q diff --side-by-side -W 500 -r 1.1 -r 1.2 \
23384 $testcvs -z5 -Q diff --side-by-side -W 500 -r 1.1 -r 1.2 \
23387 dotest sshstdio-6
"cmp wrapper.dif good.dif"
23391 CVS_RSH
=$save_CVS_RSH; export CVS_RSH
23393 rm -rf $CVSROOT_DIRNAME/first-dir
23399 # Test some :ext: roots for consistancy.
23400 if $remote; then :; else
23401 remoteonly parseroot2
23405 require_rsh
"$CVS_RSH"
23406 if test $?
-eq 77; then
23407 skip parseroot2
"$skipreason"
23411 # Test checking out and subsequently updating with some different
23414 # A standard case, hostname:dirname.
23415 mkdir parseroot2
; cd parseroot2
23416 save_CVSROOT
=$CVSROOT
23417 CVSROOT
=$host:$CVSROOT_DIRNAME
23418 dotest parseroot2-1
"$testcvs -Q co CVSROOT"
23420 dotest parseroot2-2
"$testcvs -Q up"
23423 # A degenerate remote case, just the server name and the directory
23424 # name, with no :'s to help parsing. It can be mistaken for a
23425 # relative directory name.
23427 CVSROOT
=$host$CVSROOT_DIRNAME
23428 dotest parseroot2-3
"$testcvs -Q co CVSROOT"
23430 dotest parseroot2-4
"$testcvs -Q up"
23434 CVSROOT
=$save_CVSROOT
23441 # Test some :ext: roots for consistancy.
23442 if $remote; then :; else
23443 remoteonly parseroot3
23447 require_rsh
"$CVS_RSH"
23448 if test $?
-eq 77; then
23449 skip parseroot3
"$skipreason"
23453 # Test checking out and subsequently updating with some different
23456 # A standard case, hostname:dirname.
23457 mkdir parseroot3
; cd parseroot3
23458 save_CVSROOT
=$CVSROOT
23459 save_CVS_RSH
=$CVS_RSH
23460 save_CVS_SERVER
=$CVS_SERVER
23463 CVSROOT
=":ext;CVS_RSH=$save_CVS_RSH;CVS_SERVER=$save_CVS_SERVER:$host:$CVSROOT_DIRNAME"
23464 dotest parseroot3-1
"$testcvs -Q co CVSROOT"
23466 dotest parseroot3-2
"$testcvs -Q up"
23469 # Initial checkout.
23471 CVSROOT
=":ext;cvs_RSH=$save_CVS_RSH;CVS_Server=$save_CVS_SERVER:$host$CVSROOT_DIRNAME"
23472 dotest parseroot3-3
"$testcvs -Q co CVSROOT"
23474 dotest parseroot3-4
"$testcvs -Q up"
23477 # Checkout bogus values for Redirect
23479 CVSROOT
=":ext;Redirect=bogus;CVS_RSH=$save_CVS_RSH;CVS_SERVER=$save_CVS_SERVER:$host$CVSROOT_DIRNAME"
23480 dotest parseroot3-5
"$testcvs -Q co CVSROOT" \
23481 "$SPROG checkout: CVSROOT: unrecognized value \`bogus' for \`Redirect'"
23483 # FIXCVS: parse_cvsroot is called more often that is
23485 dotest parseroot3-6
"$testcvs -Q up" \
23486 "$SPROG update: CVSROOT: unrecognized value \`bogus' for \`Redirect'"
23489 # Checkout good values for Redirect
23491 CVSROOT
=":EXT;Redirect=no;CVS_RSH=$save_CVS_RSH;CVS_SERVER=$save_CVS_SERVER:$host$CVSROOT_DIRNAME"
23492 dotest parseroot3-7
"$testcvs -Q co CVSROOT"
23494 dotest parseroot3-8
"$testcvs -Q up"
23497 dotest parseroot3-9
"$testcvs -Q co -ldtop ."
23498 dotest parseroot3-10
"test -d top"
23499 dotest parseroot3-11
"test -d top/CVS"
23500 dotest parseroot3-10
"cat top/CVS/Root" "$CVSROOT"
23504 CVSROOT
=$save_CVSROOT
23505 CVS_RSH
=$save_CVS_RSH
23506 CVS_SERVER
=$save_CVS_SERVER
23507 export CVS_RSH CVS_SERVER
23514 # CVSROOT/history tests:
23515 # history: various "cvs history" invocations
23516 # basic2: Generating the CVSROOT/history file via CVS commands.
23518 # Put in some data for the history file (discarding what was
23519 # there before). Note that this file format is fixed; the
23520 # user may wish to analyze data from a previous version of
23521 # CVS. If we phase out this format, it should be done
23522 # slowly and carefully.
23529 cat <<EOF >$CVSROOT_DIRNAME/CVSROOT/history
23530 O3395c677|anonymous|<remote>/*0|ccvs||ccvs
23531 O3396c677|anonymous|<remote>/src|ccvs||src
23532 O3397c677|kingdon|<remote>/*0|ccvs||ccvs
23533 M339cafae|nk|<remote>|ccvs/src|1.229|sanity.sh
23534 M339cafff|anonymous|<remote>|ccvs/src|1.23|Makefile
23535 M339dc339|kingdon|~/work/*0|ccvs/src|1.231|sanity.sh
23536 W33a6eada|anonymous|<remote>*4|ccvs/emx||Makefile.in
23537 C3b235f50|kingdon|<remote>|ccvs/emx|1.3|README
23538 M3b23af50|kingdon|~/work/*0|ccvs/doc|1.281|cvs.texinfo
23541 dotest history-1
"${testcvs} history -e -a" \
23542 "O 1997-06-04 19:48 ${PLUS}0000 anonymous ccvs =ccvs= <remote>/\*
23543 O 1997-06-05 14:00 ${PLUS}0000 anonymous ccvs =src= <remote>/\*
23544 M 1997-06-10 01:38 ${PLUS}0000 anonymous 1\.23 Makefile ccvs/src == <remote>
23545 W 1997-06-17 19:51 ${PLUS}0000 anonymous Makefile\.in ccvs/emx == <remote>/emx
23546 O 1997-06-06 08:12 ${PLUS}0000 kingdon ccvs =ccvs= <remote>/\*
23547 M 1997-06-10 21:12 ${PLUS}0000 kingdon 1\.231 sanity\.sh ccvs/src == ~/work/ccvs/src
23548 C 2001-06-10 11:51 ${PLUS}0000 kingdon 1\.3 README ccvs/emx == <remote>
23549 M 2001-06-10 17:33 ${PLUS}0000 kingdon 1\.281 cvs\.texinfo ccvs/doc == ~/work/ccvs/doc
23550 M 1997-06-10 01:36 ${PLUS}0000 nk 1\.229 sanity\.sh ccvs/src == <remote>"
23552 dotest history-2
"${testcvs} history -e -a -D '10 Jun 1997 13:00 UT'" \
23553 "W 1997-06-17 19:51 ${PLUS}0000 anonymous Makefile\.in ccvs/emx == <remote>/emx
23554 M 1997-06-10 21:12 ${PLUS}0000 kingdon 1\.231 sanity\.sh ccvs/src == ~/work/ccvs/src
23555 C 2001-06-10 11:51 ${PLUS}0000 kingdon 1\.3 README ccvs/emx == <remote>
23556 M 2001-06-10 17:33 ${PLUS}0000 kingdon 1\.281 cvs\.texinfo ccvs/doc == ~/work/ccvs/doc"
23558 dotest history-3
"${testcvs} history -e -a -D '10 Jun 2001 13:00 UT'" \
23559 "M 2001-06-10 17:33 ${PLUS}0000 kingdon 1\.281 cvs\.texinfo ccvs/doc == ~/work/ccvs/doc"
23561 dotest history-4
"${testcvs} history -ac sanity.sh" \
23562 "M 1997-06-10 21:12 ${PLUS}0000 kingdon 1\.231 sanity\.sh ccvs/src == ~/work/ccvs/src
23563 M 1997-06-10 01:36 ${PLUS}0000 nk 1\.229 sanity\.sh ccvs/src == <remote>"
23565 dotest history-5
"${testcvs} history -a -xCGUWAMR README sanity.sh" \
23566 "M 1997-06-10 21:12 ${PLUS}0000 kingdon 1\.231 sanity\.sh ccvs/src == ~/work/ccvs/src
23567 C 2001-06-10 11:51 ${PLUS}0000 kingdon 1\.3 README ccvs/emx == <remote>
23568 M 1997-06-10 01:36 ${PLUS}0000 nk 1\.229 sanity\.sh ccvs/src == <remote>"
23570 dotest history-6
"${testcvs} history -xCGUWAMR -a -f README -f sanity.sh" \
23571 "M 1997-06-10 21:12 ${PLUS}0000 kingdon 1\.231 sanity\.sh ccvs/src == ~/work/ccvs/src
23572 C 2001-06-10 11:51 ${PLUS}0000 kingdon 1\.3 README ccvs/emx == <remote>
23573 M 1997-06-10 01:36 ${PLUS}0000 nk 1\.229 sanity\.sh ccvs/src == <remote>"
23575 dotest history-7
"${testcvs} history -xCGUWAMR -a -f sanity.sh README" \
23576 "M 1997-06-10 21:12 ${PLUS}0000 kingdon 1\.231 sanity\.sh ccvs/src == ~/work/ccvs/src
23577 C 2001-06-10 11:51 ${PLUS}0000 kingdon 1\.3 README ccvs/emx == <remote>
23578 M 1997-06-10 01:36 ${PLUS}0000 nk 1\.229 sanity\.sh ccvs/src == <remote>"
23580 dotest history-8
"${testcvs} history -ca -D '1970-01-01 00:00 UT'" \
23581 "M 1997-06-10 01:36 ${PLUS}0000 nk 1\.229 sanity.sh ccvs/src == <remote>
23582 M 1997-06-10 01:38 ${PLUS}0000 anonymous 1\.23 Makefile ccvs/src == <remote>
23583 M 1997-06-10 21:12 ${PLUS}0000 kingdon 1\.231 sanity.sh ccvs/src == ~/work/ccvs/src
23584 M 2001-06-10 17:33 ${PLUS}0000 kingdon 1\.281 cvs.texinfo ccvs/doc == ~/work/ccvs/doc"
23586 dotest history-9
"${testcvs} history -acl" \
23587 "M 2001-06-10 17:33 ${PLUS}0000 kingdon 1\.281 cvs.texinfo ccvs/doc == ~/work/ccvs/doc
23588 M 1997-06-10 01:38 ${PLUS}0000 anonymous 1\.23 Makefile ccvs/src == <remote>
23589 M 1997-06-10 21:12 ${PLUS}0000 kingdon 1\.231 sanity.sh ccvs/src == ~/work/ccvs/src"
23591 dotest history-10
"${testcvs} history -lca -D '1970-01-01 00:00 UT'" \
23592 "M 2001-06-10 17:33 ${PLUS}0000 kingdon 1\.281 cvs.texinfo ccvs/doc == ~/work/ccvs/doc
23593 M 1997-06-10 01:38 ${PLUS}0000 anonymous 1\.23 Makefile ccvs/src == <remote>
23594 M 1997-06-10 21:12 ${PLUS}0000 kingdon 1\.231 sanity.sh ccvs/src == ~/work/ccvs/src"
23596 dotest history-11
"${testcvs} history -aw" \
23597 "O 1997-06-04 19:48 ${PLUS}0000 anonymous ccvs =ccvs= <remote>/\*
23598 O 1997-06-05 14:00 ${PLUS}0000 anonymous ccvs =src= <remote>/\*
23599 O 1997-06-06 08:12 ${PLUS}0000 kingdon ccvs =ccvs= <remote>/\*"
23601 dotest history-12
"${testcvs} history -aw -D'1970-01-01 00:00 UT'" \
23602 "O 1997-06-04 19:48 ${PLUS}0000 anonymous ccvs =ccvs= <remote>/\*
23603 O 1997-06-05 14:00 ${PLUS}0000 anonymous ccvs =src= <remote>/\*
23604 O 1997-06-06 08:12 ${PLUS}0000 kingdon ccvs =ccvs= <remote>/\*"
23611 # Test ability to operate on big files. Intention is to
23612 # test various realloc'ing code in RCS_deltas, rcsgetkey,
23613 # etc. "big" is currently defined to be 1000 lines (64000
23614 # bytes), which in terms of files that users will use is not
23615 # large, merely average, but my reasoning is that this
23616 # should be big enough to make sure realloc'ing is going on
23617 # and that raising it a lot would start to stress resources
23618 # on machines which run the tests, without any significant
23621 modify_repo mkdir
$CVSROOT_DIRNAME/first-dir
23622 dotest big-1
"$testcvs -q co first-dir"
23624 for i
in 0 1 2 3 4 5 6 7 8 9; do
23625 for j
in 0 1 2 3 4 5 6 7 8 9; do
23626 for k
in 0 1 2 3 4 5 6 7 8 9; do
23628 "This is line ($i,$j,$k) which goes into the file file1 for testing" >>file1
23632 dotest big-2
"$testcvs add file1" \
23633 "$SPROG add: scheduling file .file1. for addition
23634 $SPROG add: use .$SPROG commit. to add this file permanently"
23635 dotest big-3
"$testcvs -q ci -m add" \
23636 "$CVSROOT_DIRNAME/first-dir/file1,v <-- file1
23637 initial revision: 1\.1"
23641 dotest big-4
"$testcvs -q get first-dir" "U first-dir/file1"
23643 echo "add a line to the end" >>file1
23645 dotest_fail big-4b
"$testcvs -q diff -u" \
23647 ===================================================================
23648 RCS file: $CVSROOT_DIRNAME/first-dir/file1,v
23649 retrieving revision 1\.1
23650 diff -u -r1\.1 file1
23651 --- file1 $RFCDATE 1\.1
23652 $PLUS$PLUS$PLUS file1 $RFCDATE
23653 @@ -998,3 ${PLUS}998,4 @@
23654 This is line (9,9,7) which goes into the file file1 for testing
23655 This is line (9,9,8) which goes into the file file1 for testing
23656 This is line (9,9,9) which goes into the file file1 for testing
23657 ${PLUS}add a line to the end"
23659 dotest big-5
"$testcvs -q ci -m modify" \
23660 "$CVSROOT_DIRNAME/first-dir/file1,v <-- file1
23661 new revision: 1\.2; previous revision: 1\.1"
23663 # The idea here is particularly to test the Rcs-diff response
23664 # and the reallocing thereof, for remote.
23665 dotest big-6
"$testcvs -q update" "[UP] file1"
23670 modify_repo
rm -rf $CVSROOT_DIRNAME/first-dir
23676 # Test repository permissions (CVSUMASK and so on).
23677 # Although the tests in this section "cheat" by testing
23678 # repository permissions, which are sort of not a user-visible
23679 # sort of thing, the modes do have user-visible consequences,
23680 # such as whether a second user can check out the files. But
23681 # it would be awkward to test the consequences, so we don't.
23683 # Solaris /bin/sh doesn't support export -n. I'm not sure
23684 # what we can do about this, other than hope that whoever
23685 # is running the tests doesn't have CVSUMASK set.
23686 #export -n CVSUMASK # if unset, defaults to 002
23691 dotest modes-1
"${testcvs} -q co -l ." ''
23693 dotest modes-2
"${testcvs} add first-dir" \
23694 "Directory ${CVSROOT_DIRNAME}/first-dir added to the repository"
23697 dotest modes-3
"${testcvs} add aa" \
23698 "${SPROG} add: scheduling file .aa. for addition
23699 ${SPROG} add: use .${SPROG} commit. to add this file permanently"
23700 dotest modes-4
"${testcvs} -q ci -m add" \
23701 "$CVSROOT_DIRNAME/first-dir/aa,v <-- aa
23702 initial revision: 1\.1"
23704 if test -n "$remotehost"; then
23705 dotest modes-5remotehost
"$CVS_RSH $remotehost 'ls -l ${CVSROOT_DIRNAME}/first-dir/aa,v'" \
23708 dotest modes-5
"ls -l ${CVSROOT_DIRNAME}/first-dir/aa,v" \
23712 # Test for whether we can set the execute bit.
23714 echo change it
>>aa
23715 dotest modes-6
"${testcvs} -q ci -m set-execute-bit" \
23716 "$CVSROOT_DIRNAME/first-dir/aa,v <-- aa
23717 new revision: 1\.2; previous revision: 1\.1"
23718 # If CVS let us update the execute bit, it would be set here.
23719 # But it doesn't, and as far as I know that is longstanding
23722 # Yeah, yeah. Search for "Cygwin".
23723 if test -n "$remotehost"; then
23724 dotest modes-7remotehost
"$CVS_RSH $remotehost 'ls -l ${CVSROOT_DIRNAME}/first-dir/aa,v'" \
23727 dotest modes-7
"ls -l ${CVSROOT_DIRNAME}/first-dir/aa,v" \
23731 # OK, now manually change the modes and see what happens.
23734 if test -n "$remotehost"; then
23735 $CVS_RSH $remotehost "chmod g=r,o= ${CVSROOT_DIRNAME}/first-dir/aa,v"
23737 chmod g
=r
,o
= ${CVSROOT_DIRNAME}/first-dir
/aa
,v
23739 echo second line
>>aa
23740 dotest modes-7a
"${testcvs} -q ci -m set-execute-bit" \
23741 "$CVSROOT_DIRNAME/first-dir/aa,v <-- aa
23742 new revision: 1\.3; previous revision: 1\.2"
23744 if test -n "$remotehost"; then
23745 dotest modes-7bremotehost
"$CVS_RSH $remotehost 'ls -l ${CVSROOT_DIRNAME}/first-dir/aa,v'" \
23748 dotest modes-7b
"ls -l ${CVSROOT_DIRNAME}/first-dir/aa,v" \
23755 # Might as well test the execute bit too.
23757 dotest modes-8
"$testcvs add ab" \
23758 "$SPROG add: scheduling file .ab. for addition
23759 $SPROG add: use .$SPROG commit. to add this file permanently"
23760 dotest modes-9
"$testcvs -q ci -m add" \
23761 "$CVSROOT_DIRNAME/first-dir/ab,v <-- ab
23762 initial revision: 1\.1"
23764 # The ssh-wrapper script set up by this script forwards CVSUMASK to
23765 # the server. In practice it would be set on the server in some
23766 # other manner (for instance, by the `env' command, or as an option
23767 # in the xinted.conf file).
23769 # I don't recall why, but I used to look for:
23771 # dotest modes-10remotehost \
23772 # "$CVS_RSH $remotehost 'ls -l $CVSROOT_DIRNAME/first-dir/ab,v'" \
23775 # here when $remotehost was set. I'm not sure why. Maybe this was
23776 # one of the innumerable Cygwin issues?
23777 dotest modes-10
"ls -l $CVSROOT_DIRNAME/first-dir/ab,v" \
23780 # OK, now add a file on a branch. Check that the mode gets
23781 # set the same way (it is a different code path in CVS).
23782 dotest modes-11
"${testcvs} -q tag -b br" 'T aa
23784 dotest modes-12
"${testcvs} -q update -r br" ''
23786 dotest modes-13
"${testcvs} add ac" \
23787 "${SPROG} add: scheduling file .ac. for addition on branch .br.
23788 ${SPROG} add: use .${SPROG} commit. to add this file permanently"
23789 # Not sure it really makes sense to refer to a "previous revision"
23790 # when we are just now adding the file; as far as I know
23791 # that is longstanding CVS behavior, for what it's worth.
23792 dotest modes-14
"${testcvs} -q ci -m add" \
23793 "$CVSROOT_DIRNAME/first-dir/Attic/ac,v <-- ac
23794 new revision: 1\.1\.2\.1; previous revision: 1\.1"
23796 # ssh-wrapper forwards CVSUMASK. See modes-10 for notes.
23798 "ls -l ${CVSROOT_DIRNAME}/first-dir/Attic/ac,v" \
23806 modify_repo
rm -rf $CVSROOT_DIRNAME/first-dir
23812 # More tests of file permissions in the working directory
23813 # and that sort of thing.
23815 # The usual setup, file first-dir/aa with two revisions.
23817 dotest modes2-1
"${testcvs} -q co -l ." ''
23819 dotest modes2-2
"${testcvs} add first-dir" \
23820 "Directory ${CVSROOT_DIRNAME}/first-dir added to the repository"
23823 dotest modes2-3
"${testcvs} add aa" \
23824 "${SPROG} add: scheduling file .aa. for addition
23825 ${SPROG} add: use .${SPROG} commit. to add this file permanently"
23826 dotest modes2-4
"${testcvs} -q ci -m add" \
23827 "$CVSROOT_DIRNAME/first-dir/aa,v <-- aa
23828 initial revision: 1\.1"
23829 echo "more money" >> aa
23830 dotest modes2-5
"${testcvs} -q ci -m add" \
23831 "$CVSROOT_DIRNAME/first-dir/aa,v <-- aa
23832 new revision: 1\.2; previous revision: 1\.1"
23834 # OK, here is the test. The idea is to see what
23835 # No_Difference does if it can't open the file.
23836 # If we don't change the st_mtime, CVS doesn't even try to read
23837 # the file. Note that some versions of "touch" require that we
23838 # do this while the file is still writable.
23841 # Don't try this when permissions are broken, as with Cygwin.
23842 if ${LS} ${CVSROOT_DIRNAME}/first-dir
>/dev
/null
2>&1; then :; else
23843 dotest_fail modes2-6
"${testcvs} -q update -r 1.1 aa" \
23844 "${CPROG} \[update aborted\]: cannot open file aa for comparing: Permission denied" \
23845 "${CPROG} \[update aborted\]: reading aa: Permission denied"
23852 modify_repo
rm -rf $CVSROOT_DIRNAME/first-dir
23858 # Repository permissions. Particularly, what happens if we
23859 # can't read/write in the repository.
23860 # TODO: the case where we can access the repository, just not
23861 # the attic (may that one can remain a fatal error, seems less
23862 # useful for access control).
23864 dotest modes3-1
"$testcvs -q co -l ."
23865 mkdir first-dir second-dir
23866 dotest modes3-2
"${testcvs} add first-dir second-dir" \
23867 "Directory ${CVSROOT_DIRNAME}/first-dir added to the repository
23868 Directory ${CVSROOT_DIRNAME}/second-dir added to the repository"
23869 touch first-dir
/aa second-dir
/ab
23870 dotest modes3-3
"${testcvs} add first-dir/aa second-dir/ab" \
23871 "${SPROG} add: scheduling file .first-dir/aa. for addition
23872 ${SPROG} add: scheduling file .second-dir/ab. for addition
23873 ${SPROG} add: use .${SPROG} commit. to add these files permanently"
23874 dotest modes3-4
"${testcvs} -q ci -m add" \
23875 "$CVSROOT_DIRNAME/first-dir/aa,v <-- first-dir/aa
23876 initial revision: 1\.1
23877 $CVSROOT_DIRNAME/second-dir/ab,v <-- second-dir/ab
23878 initial revision: 1\.1"
23879 # quiet down this one as it will be noisy in proxy mode
23880 modify_repo
chmod a
= $CVSROOT_DIRNAME/first-dir
>/dev
/null
2>&1
23881 if ${LS} ${CVSROOT_DIRNAME}/first-dir
>/dev
/null
2>&1; then
23882 # Avoid this test under Cygwin since permissions work differently
23885 # This test also gets avoided under Mac OS X since the system `ls'
23886 # is broken and exits with a 0 status despite the permission
23888 if test -n "$remotehost"; then
23898 if $cygwin_hack; then :; else
23899 dotest modes3-5
"${testcvs} update" \
23900 "${SPROG} update: Updating \.
23901 ${SPROG} update: Updating first-dir
23902 ${SPROG} update: cannot open directory ${CVSROOT_DIRNAME}/first-dir: Permission denied
23903 ${SPROG} update: skipping directory first-dir
23904 ${SPROG} update: Updating second-dir"
23907 # OK, I can see why one might say the above case could be a
23908 # fatal error, because normally users without access to first-dir
23909 # won't have it in their working directory. But the next
23910 # one is more of a problem if it is fatal.
23912 # The second text string below is for Cygwin again, and again it
23913 # should really be XFAIL under Cygwin, but for now deal with the
23914 # passing opendir by accepting the alternate string.
23916 dotest modes3-6
"${testcvs} update -dP" \
23917 "${SPROG} update: Updating .
23918 ${SPROG} update: Updating CVSROOT
23920 ${SPROG} update: Updating first-dir
23921 ${SPROG} update: cannot open directory ${CVSROOT_DIRNAME}/first-dir: Permission denied
23922 ${SPROG} update: skipping directory first-dir
23923 ${SPROG} update: Updating second-dir" \
23924 "${SPROG} update: Updating .
23925 ${SPROG} update: Updating CVSROOT
23927 ${SPROG} update: Updating first-dir
23928 ${SPROG} update: Updating second-dir"
23933 # quiet down this one as it will be noisy in proxy mode
23934 modify_repo
chmod u
+rwx
$CVSROOT_DIRNAME/first-dir
2>/dev
/null
23935 modify_repo
rm -rf $CVSROOT_DIRNAME/first-dir \
23936 $CVSROOT_DIRNAME/second-dir
23944 dotest stamps-1
"${testcvs} -q co -l ." ''
23946 dotest stamps-2
"${testcvs} add first-dir" \
23947 "Directory ${CVSROOT_DIRNAME}/first-dir added to the repository"
23951 # Cygwin, *cough*, puts the year in the time column until the minute
23952 # is no longer the current minute. Sleep 60 seconds to avoid this
23955 ls -l aa
>${TESTDIR}/1/stamp.aa.
touch
23956 ls -l kw
>${TESTDIR}/1/stamp.kw.
touch
23957 # "sleep 1" would suffice if we could assume ls --full-time, but
23958 # that is as far as I know unique to GNU ls. Is there some POSIX.2
23959 # way to get the timestamp of a file, including the seconds?
23961 dotest stamps-3
"${testcvs} add aa kw" \
23962 "${SPROG} add: scheduling file .aa. for addition
23963 ${SPROG} add: scheduling file .kw. for addition
23964 ${SPROG} add: use .${SPROG} commit. to add these files permanently"
23965 ls -l aa
>${TESTDIR}/1/stamp.aa.add
23966 ls -l kw
>${TESTDIR}/1/stamp.kw.add
23967 # "cvs add" should not muck with the timestamp.
23968 dotest stamps-4aa \
23969 "cmp ${TESTDIR}/1/stamp.aa.touch ${TESTDIR}/1/stamp.aa.add" ''
23970 dotest stamps-4kw \
23971 "cmp ${TESTDIR}/1/stamp.kw.touch ${TESTDIR}/1/stamp.kw.add" ''
23973 dotest stamps-5
"${testcvs} -q ci -m add" \
23974 "$CVSROOT_DIRNAME/first-dir/aa,v <-- aa
23975 initial revision: 1\.1
23976 $CVSROOT_DIRNAME/first-dir/kw,v <-- kw
23977 initial revision: 1\.1"
23978 # Cygwin, *cough*, puts the year in the time column until the minute
23979 # is no longer the current minute. Sleep 60 seconds to avoid this
23982 ls -l aa
>${TESTDIR}/1/stamp.aa.ci
23983 ls -l kw
>${TESTDIR}/1/stamp.kw.ci
23984 # If there are no keywords, "cvs ci" leaves the timestamp alone
23985 # If there are, it sets the timestamp to the date of the commit.
23986 # I'm not sure how logical this is, but it is intentional.
23987 # If we wanted to get fancy we would make sure the time as
23988 # reported in "cvs log kw" matched stamp.kw.ci. But that would
23989 # be a lot of work.
23990 dotest stamps-6aa \
23991 "cmp ${TESTDIR}/1/stamp.aa.add ${TESTDIR}/1/stamp.aa.ci" ''
23992 if cmp ${TESTDIR}/1/stamp.kw.add
${TESTDIR}/1/stamp.kw.ci
>/dev
/null
24002 dotest stamps-7
"${testcvs} -q get first-dir" "U first-dir/aa
24005 ls -l aa
>${TESTDIR}/1/stamp.aa.get
24006 ls -l kw
>${TESTDIR}/1/stamp.kw.get
24007 # On checkout, CVS should set the timestamp to the date that the
24008 # file was committed. Could check that the time as reported in
24009 # "cvs log aa" matches stamp.aa.get, but that would be a lot of
24011 dotest_fail stamps-8aa \
24012 "cmp $TESTDIR/1/stamp.aa.ci $TESTDIR/1/stamp.aa.get >/dev/null"
24013 dotest stamps-8kw \
24014 "cmp $TESTDIR/1/stamp.kw.ci $TESTDIR/1/stamp.kw.get"
24016 # Now we want to see what "cvs update" does.
24018 echo add a line
>>aa
24019 echo add a line
>>kw
24020 dotest stamps-9
"${testcvs} -q ci -m change-them" \
24021 "$CVSROOT_DIRNAME/first-dir/aa,v <-- aa
24022 new revision: 1\.2; previous revision: 1\.1
24023 $CVSROOT_DIRNAME/first-dir/kw,v <-- kw
24024 new revision: 1\.2; previous revision: 1\.1"
24026 # Cygwin, *cough*, puts the year in the time column until the minute
24027 # is no longer the current minute. Sleep 60 seconds to avoid this
24030 ls -l aa
>${TESTDIR}/1/stamp.aa.ci2
24031 ls -l kw
>${TESTDIR}/1/stamp.kw.ci2
24035 dotest stamps-10
"${testcvs} -q update" '[UP] aa
24037 # this doesn't serve any function other than being able to
24038 # look at it manually, as we have no machinery for dates being
24039 # newer or older than other dates.
24040 date >$TESTDIR/1/stamp.debug.update
24041 ls -l aa
>$TESTDIR/1/stamp.aa.update
24042 ls -l kw
>$TESTDIR/1/stamp.kw.update
24043 # stamp.aa.update and stamp.kw.update should both be approximately
24044 # the same as stamp.debug.update. Perhaps we could be testing
24045 # this in a more fancy fashion by "touch stamp.before" before
24046 # stamps-10, "touch stamp.after" after, and then using ls -t
24047 # to check them. But for now we just make sure that the *.update
24048 # stamps differ from the *.ci2 ones.
24049 # As for the rationale, this is so that if one updates and gets
24050 # a new revision, then "make" will be sure to regard those files
24051 # as newer than .o files which may be sitting around.
24052 dotest_fail stamps-11aa \
24053 "cmp $TESTDIR/1/stamp.aa.update $TESTDIR/1/stamp.aa.ci2 >/dev/null"
24054 dotest_fail stamps-11kw \
24055 "cmp $TESTDIR/1/stamp.kw.update $TESTDIR/1/stamp.kw.ci2 >/dev/null"
24060 modify_repo
rm -rf $CVSROOT_DIRNAME/first-dir
24067 dotest perms-init-1
"$testcvs -Q co CVSROOT"
24069 echo 'PreservePermissions=yes' >> ${CVSROOT_DIRNAME}/CVSROOT
/config
24070 dotest perms-init-2
"$testcvs -Q ci -mperms"
24073 dotest perms-1
"$testcvs -q co -l ."
24075 dotest perms-2
"${testcvs} add first-dir" \
24076 "Directory ${CVSROOT_DIRNAME}/first-dir added to the repository"
24081 dotest perms-3
"${testcvs} add foo" \
24082 "${SPROG} add: scheduling file .foo. for addition
24083 ${SPROG} add: use .${SPROG} commit. to add this file permanently"
24084 dotest perms-4
"${testcvs} -q ci -m ''" \
24085 "$CVSROOT_DIRNAME/first-dir/foo,v <-- foo
24086 initial revision: 1\.1"
24088 # Test checking out files with different permissions.
24091 dotest perms-5
"${testcvs} -q co first-dir" "U first-dir/foo"
24093 if $remote; then :; else
24094 # PreservePermissions not yet implemented for remote.
24095 dotest perms-6
"ls -l foo" "-r---wx--x .* foo"
24103 modify_repo
rm -rf $CVSROOT_DIRNAME/first-dir
24109 # short cut around checking out and committing CVSROOT
24110 rm -f $CVSROOT_DIRNAME/CVSROOT
/config
24111 echo 'PreservePermissions=yes' >> $CVSROOT_DIRNAME/CVSROOT
/config
24112 chmod 444 $CVSROOT_DIRNAME/CVSROOT
/config
24115 dotest symlinks-1
"$testcvs -q co -l ."
24117 dotest symlinks-2
"$testcvs add first-dir" \
24118 "Directory $CVSROOT_DIRNAME/first-dir added to the repository"
24121 dotest symlinks-2.1
"ln -s $TESTDIR/fumble slink"
24122 dotest symlinks-3
"$testcvs add slink" \
24123 "$SPROG add: scheduling file .slink. for addition
24124 $SPROG add: use .$SPROG commit. to add this file permanently"
24126 # Remote doesn't implement PreservePermissions, and in its
24127 # absence the correct behavior is to follow the symlink.
24128 dotest_fail symlinks-4r
"$testcvs -q ci -m ''" \
24129 "$SPROG \[commit aborted\]: reading slink: No such file or directory"
24131 dotest symlinks-4
"$testcvs -q ci -m ''" \
24132 "$CVSROOT_DIRNAME/first-dir/slink,v <-- slink
24133 initial revision: 1\.1"
24135 # Test checking out symbolic links.
24138 dotest symlinks-5
"$testcvs -q co first-dir" "U first-dir/slink"
24140 dotest symlinks-6
"ls -l slink" \
24141 "l[rwx\-]* .* slink -> $TESTDIR/fumble"
24147 modify_repo
rm -rf $CVSROOT_DIRNAME/first-dir
24154 # Symlinks in working directory without PreservePermissions.
24155 # Also see: symlinks: with PreservePermissions
24156 # rcslib-symlink-*: symlinks in repository.
24158 dotest symlinks2-1
"${testcvs} -q co -l ." ''
24160 dotest symlinks2-2
"${testcvs} add first-dir" \
24161 "Directory ${CVSROOT_DIRNAME}/first-dir added to the repository"
24163 echo nonsymlink
> slink
24164 dotest symlinks2-3
"${testcvs} add slink" \
24165 "${SPROG} add: scheduling file .slink. for addition
24166 ${SPROG} add: use .${SPROG} commit. to add this file permanently"
24167 dotest symlinks2-4
"${testcvs} -q ci -m ''" \
24168 "$CVSROOT_DIRNAME/first-dir/slink,v <-- slink
24169 initial revision: 1\.1"
24171 # Choose name cvslog.* so it is in default ignore list.
24172 echo second
file >cvslog.file2
24173 dotest symlinks2-5
"ln -s cvslog.file2 slink" ""
24174 dotest symlinks2-6
"${testcvs} -q ci -m linkify" \
24175 "$CVSROOT_DIRNAME/first-dir/slink,v <-- slink
24176 new revision: 1\.2; previous revision: 1\.1"
24177 dotest symlinks2-7
"${testcvs} -q update -r 1.1 slink" "[UP] slink"
24178 dotest symlinks2-8
"cat slink" "nonsymlink"
24179 dotest symlinks2-9
"ls -l slink" "-[-rwx]* .* slink"
24184 modify_repo
rm -rf $CVSROOT_DIRNAME/first-dir
24190 # short cut around checking out and committing CVSROOT
24191 rm -f ${CVSROOT_DIRNAME}/CVSROOT
/config
24192 echo 'PreservePermissions=yes' > ${CVSROOT_DIRNAME}/CVSROOT
/config
24193 chmod 444 ${CVSROOT_DIRNAME}/CVSROOT
/config
24196 dotest hardlinks-1
"${testcvs} -q co -l ." ''
24198 dotest hardlinks-2
"${testcvs} add first-dir" \
24199 "Directory ${CVSROOT_DIRNAME}/first-dir added to the repository"
24202 # Make up some ugly filenames, to test that they get
24203 # encoded properly in the delta nodes. Note that `dotest' screws
24204 # up if some arguments have embedded spaces.
24219 if ln aaaa
'dd dd dd'
24226 dotest hardlinks-3
"${testcvs} add [abd]*" \
24227 "${SPROG} add: scheduling file .aaaa. for addition
24228 ${SPROG} add: scheduling file .b\.b\.b\.b. for addition
24229 ${SPROG} add: scheduling file .dd dd dd. for addition
24230 ${SPROG} add: use .${SPROG} commit. to add these files permanently"
24231 dotest hardlinks-4
"${testcvs} -q ci -m ''" \
24232 "$CVSROOT_DIRNAME/first-dir/aaaa,v <-- aaaa
24233 initial revision: 1\.1
24234 $CVSROOT_DIRNAME/first-dir/b\.b\.b\.b,v <-- b\.b\.b\.b
24235 initial revision: 1\.1
24236 $CVSROOT_DIRNAME/first-dir/dd dd dd,v <-- dd dd dd
24237 initial revision: 1\.1"
24238 # Test checking out hardlinked files.
24242 # Remote does not implement PreservePermissions.
24243 dotest hardlinks-5r
"${testcvs} -q co first-dir" \
24245 U first-dir/b\.b\.b\.b
24246 U first-dir/dd dd dd"
24248 dotest hardlinks-6r
"ls -l [abd]*" \
24249 "-[rwx\-]* *1 .* aaaa
24250 -[rwx\-]* *1 .* b\.b\.b\.b
24251 -[rwx\-]* *1 .* dd dd dd"
24253 dotest hardlinks-5
"${testcvs} -q co first-dir" \
24255 U first-dir/b\.b\.b\.b
24256 U first-dir/dd dd dd"
24258 # To make sure that the files are properly hardlinked, it
24259 # would be nice to do `ls -i' and make sure all the inodes
24260 # match. But I think that would require expr to support
24261 # tagged regexps, and I don't think we can rely on that.
24262 # So instead we just see that each file has the right
24263 # number of links. -twp
24264 dotest hardlinks-6
"ls -l [abd]*" \
24265 "-[rwx\-]* *3 .* aaaa
24266 -[rwx\-]* *3 .* b\.b\.b\.b
24267 -[rwx\-]* *3 .* dd dd dd"
24273 modify_repo
rm -rf $CVSROOT_DIRNAME/first-dir
24280 # More tests of sticky tags, particularly non-branch sticky tags.
24281 # See many tests (e.g. multibranch) for ordinary sticky tag
24282 # operations such as adding files on branches.
24283 # See "head" test for interaction between stick tags and HEAD.
24285 dotest sticky-1
"$testcvs -q co -l ."
24287 dotest sticky-2
"$testcvs add first-dir" \
24288 "Directory $CVSROOT_DIRNAME/first-dir added to the repository"
24292 dotest sticky-3
"$testcvs add file1" \
24293 "$SPROG add: scheduling file .file1. for addition
24294 $SPROG add: use .$SPROG commit. to add this file permanently"
24295 dotest sticky-4
"$testcvs -q ci -m add" \
24296 "$CVSROOT_DIRNAME/first-dir/file1,v <-- file1
24297 initial revision: 1\.1"
24298 dotest sticky-5
"$testcvs -q tag tag1" "T file1"
24299 echo add a line
>>file1
24300 dotest sticky-6
"$testcvs -q ci -m modify" \
24301 "$CVSROOT_DIRNAME/first-dir/file1,v <-- file1
24302 new revision: 1\.2; previous revision: 1\.1"
24303 dotest sticky-7
"$testcvs -q update -r tag1" "[UP] file1"
24304 dotest sticky-8
"cat file1" ''
24305 dotest sticky-9
"$testcvs -q update" ''
24306 dotest sticky-10
"cat file1" ''
24308 dotest_fail sticky-11
"$testcvs add file2" \
24309 "$SPROG add: cannot add file on non-branch tag \`tag1'"
24310 dotest sticky-12
"$testcvs -q update -A" "[UP] file1
24311 $QUESTION file2" "$QUESTION file2
24313 dotest sticky-13
"${testcvs} add file2" \
24314 "$SPROG add: scheduling file .file2. for addition
24315 $SPROG add: use .$SPROG commit. to add this file permanently"
24316 dotest sticky-14
"${testcvs} -q ci -m add" \
24317 "$CVSROOT_DIRNAME/first-dir/file2,v <-- file2
24318 initial revision: 1\.1"
24321 dotest sticky-15
"${testcvs} -q update -r tag1" "[UP] file1
24322 $SPROG update: \`file2' is no longer in the repository"
24325 dotest sticky-16
"${testcvs} rm file1" \
24326 "$SPROG remove: scheduling .file1. for removal
24327 $SPROG remove: use .$SPROG commit. to remove this file permanently"
24328 # Hmm, this command seems to silently remove the tag from
24329 # the file. This appears to be intentional.
24330 # The silently part especially strikes me as odd, though.
24331 dotest sticky-17
"$testcvs -q ci -m remove-it" ""
24332 dotest sticky-18
"$testcvs -q update -A" "U file1
24334 dotest sticky-19
"$testcvs -q update -r tag1" \
24335 "${SPROG} update: \`file1' is no longer in the repository
24336 ${SPROG} update: \`file2' is no longer in the repository"
24337 dotest sticky-20
"$testcvs -q update -A" "U file1
24340 # Now try with a numeric revision.
24341 dotest sticky-21
"$testcvs -q update -r 1.1 file1" "U file1"
24342 dotest sticky-22
"$testcvs rm -f file1" \
24343 "$SPROG remove: cannot remove file .file1. which has a numeric sticky tag of .1\.1."
24344 # The old behavior was that remove allowed this and then commit
24345 # gave an error, which was somewhat hard to clear. I mean, you
24346 # could get into a long elaborate discussion of this being a
24347 # conflict and two ways to resolve it, but I don't really see
24348 # why CVS should have a concept of conflict that arises, not from
24349 # parallel development, but from CVS's own sticky tags.
24351 # Ditto with a sticky date.
24353 # I'm kind of surprised that the "file1 was lost" doesn't crop
24354 # up elsewhere in the testsuite. It is a long-standing
24355 # discrepency between local and remote CVS and should probably
24356 # be cleaned up at some point.
24357 dotest sticky-23
"$testcvs -q update -Dnow file1" \
24358 "$SPROG update: warning: \`file1' was lost
24360 dotest sticky-24
"$testcvs rm -f file1" \
24361 "$SPROG remove: cannot remove file .file1. which has a sticky date of .[0-9.]*."
24363 dotest sticky-25
"$testcvs -q update -A" \
24364 "$SPROG update: warning: \`file1' was lost
24371 modify_repo
rm -rf $CVSROOT_DIRNAME/first-dir
24377 # Test keyword expansion.
24378 # Various other tests relate to our ability to correctly
24379 # set the keyword expansion mode.
24380 # "binfiles" tests "cvs admin -k".
24381 # "binfiles" and "binfiles2" test "cvs add -k".
24382 # "rdiff" tests "cvs co -k".
24383 # "binfiles" (and this test) test "cvs update -k".
24384 # "binwrap" tests setting the mode from wrappers.
24385 # "keyword2" tests "cvs update -kk -j" with text and binary files
24386 # I don't think any test is testing "cvs import -k".
24387 # Other keyword expansion tests:
24388 # keywordlog - $Log.
24390 dotest keyword-1
"${testcvs} -q co -l ." ''
24392 dotest keyword-2
"${testcvs} add first-dir" \
24393 "Directory ${CVSROOT_DIRNAME}/first-dir added to the repository"
24396 echo '$''Author$' > file1
24397 echo '$''Date$' >> file1
24398 echo '$''Header$' >> file1
24399 echo '$''Id$' >> file1
24400 echo '$''Locker$' >> file1
24401 echo '$''Name$' >> file1
24402 echo '$''RCSfile$' >> file1
24403 echo '$''Revision$' >> file1
24404 echo '$''Source$' >> file1
24405 echo '$''State$' >> file1
24406 echo '$''Nonkey$' >> file1
24407 # Omit the trailing dollar sign
24408 echo '$''Date' >> file1
24409 # Put two keywords on one line
24410 echo '$''State$' '$''State$' >> file1
24411 # Use a header for Log
24412 echo 'xx $''Log$' >> file1
24414 dotest keyword-3
"${testcvs} add file1" \
24415 "${SPROG} add: scheduling file .file1. for addition
24416 ${SPROG} add: use .${SPROG} commit. to add this file permanently"
24417 dotest keyword-4
"${testcvs} -q ci -m add" \
24418 "$CVSROOT_DIRNAME/first-dir/file1,v <-- file1
24419 initial revision: 1\.1"
24420 dotest keyword-5
"cat file1" \
24421 '\$'"Author: ${username} "'\$'"
24422 "'\$'"Date: [0-9][0-9][0-9][0-9]/[0-9][0-9]/[0-9][0-9] [0-9][0-9]:[0-9][0-9]:[0-9][0-9] "'\$'"
24423 "'\$'"Header: ${CVSROOT_DIRNAME}/first-dir/file1,v 1\.1 [0-9/]* [0-9:]* ${username} Exp "'\$'"
24424 "'\$'"Id: file1,v 1\.1 [0-9/]* [0-9:]* ${username} Exp "'\$'"
24425 "'\$'"Locker: "'\$'"
24427 "'\$'"RCSfile: file1,v "'\$'"
24428 "'\$'"Revision: 1\.1 "'\$'"
24429 "'\$'"Source: ${CVSROOT_DIRNAME}/first-dir/file1,v "'\$'"
24430 "'\$'"State: Exp "'\$'"
24433 "'\$'"State: Exp "'\$'" "'\$'"State: Exp "'\$'"
24434 xx "'\$'"Log: file1,v "'\$'"
24435 xx Revision 1\.1 [0-9/]* [0-9:]* ${username}
24439 # Use cvs admin to lock the RCS file in order to check -kkvl
24440 # vs. -kkv. CVS does not normally lock RCS files, but some
24441 # people use cvs admin to enforce reserved checkouts.
24442 dotest keyword-6
"${testcvs} admin -l file1" \
24443 "RCS file: ${CVSROOT_DIRNAME}/first-dir/file1,v
24447 dotest keyword-7
"${testcvs} update -kkv file1" "U file1"
24448 dotest keyword-8
"cat file1" \
24449 '\$'"Author: ${username} "'\$'"
24450 "'\$'"Date: [0-9][0-9][0-9][0-9]/[0-9][0-9]/[0-9][0-9] [0-9][0-9]:[0-9][0-9]:[0-9][0-9] "'\$'"
24451 "'\$'"Header: ${CVSROOT_DIRNAME}/first-dir/file1,v 1\.1 [0-9/]* [0-9:]* ${username} Exp "'\$'"
24452 "'\$'"Id: file1,v 1\.1 [0-9/]* [0-9:]* ${username} Exp "'\$'"
24453 "'\$'"Locker: "'\$'"
24455 "'\$'"RCSfile: file1,v "'\$'"
24456 "'\$'"Revision: 1\.1 "'\$'"
24457 "'\$'"Source: ${CVSROOT_DIRNAME}/first-dir/file1,v "'\$'"
24458 "'\$'"State: Exp "'\$'"
24461 "'\$'"State: Exp "'\$'" "'\$'"State: Exp "'\$'"
24462 xx "'\$'"Log: file1,v "'\$'"
24463 xx Revision 1\.1 [0-9/]* [0-9:]* ${username}
24467 dotest keyword-9
"${testcvs} update -kkvl file1" "U file1"
24468 dotest keyword-10
"cat file1" \
24469 '\$'"Author: ${username} "'\$'"
24470 "'\$'"Date: ${RCSKEYDATE} "'\$'"
24471 "'\$'"Header: ${CVSROOT_DIRNAME}/first-dir/file1,v 1\.1 ${RCSKEYDATE} ${username} Exp ${username} "'\$'"
24472 "'\$'"Id: file1,v 1\.1 ${RCSKEYDATE} ${username} Exp ${username} "'\$'"
24473 "'\$'"Locker: ${username} "'\$'"
24475 "'\$'"RCSfile: file1,v "'\$'"
24476 "'\$'"Revision: 1\.1 "'\$'"
24477 "'\$'"Source: ${CVSROOT_DIRNAME}/first-dir/file1,v "'\$'"
24478 "'\$'"State: Exp "'\$'"
24481 "'\$'"State: Exp "'\$'" "'\$'"State: Exp "'\$'"
24482 xx "'\$'"Log: file1,v "'\$'"
24483 xx Revision 1\.1 ${RCSKEYDATE} ${username}
24487 dotest keyword-11
"${testcvs} update -kk file1" "U file1"
24488 dotest keyword-12
"cat file1" \
24495 "'\$'"RCSfile"'\$'"
24496 "'\$'"Revision"'\$'"
24501 "'\$'"State"'\$'" "'\$'"State"'\$'"
24503 xx Revision 1\.1 ${RCSKEYDATE} ${username}
24507 dotest keyword-13
"${testcvs} update -kv file1" "U file1"
24508 dotest keyword-14
"cat file1" \
24511 ${CVSROOT_DIRNAME}/first-dir/file1,v 1\.1 ${RCSKEYDATE} ${username} Exp
24512 file1,v 1\.1 ${RCSKEYDATE} ${username} Exp
24517 ${CVSROOT_DIRNAME}/first-dir/file1,v
24523 xx Revision 1\.1 ${RCSKEYDATE} ${username}
24527 dotest keyword-15
"${testcvs} update -ko file1" "U file1"
24528 dotest keyword-16
"cat file1" \
24535 "'\$'"RCSfile"'\$'"
24536 "'\$'"Revision"'\$'"
24541 "'\$'"State"'\$'" "'\$'"State"'\$'"
24544 # Test the Name keyword. First go back to normal expansion.
24546 dotest keyword-17
"${testcvs} update -A file1" "U file1"
24548 echo '$''Name$' > file1
24549 dotest keyword-18
"${testcvs} ci -m modify file1" \
24550 "${CVSROOT_DIRNAME}/first-dir/file1,v <-- file1
24551 new revision: 1\.2; previous revision: 1\.1"
24552 dotest keyword-19
"${testcvs} -q tag tag1" "T file1"
24553 echo "change" >> file1
24554 dotest keyword-20
"${testcvs} -q ci -m mod2 file1" \
24555 "$CVSROOT_DIRNAME/first-dir/file1,v <-- file1
24556 new revision: 1\.3; previous revision: 1\.2"
24557 # FIXCVS - These unpatchable files are happening because the tag
24558 # associated with the current base version of the file in the
24559 # sandbox is not available in these cases. See the note in the
24560 # patch_file function in update.c.
24561 dotest keyword-21
"${testcvs} -q update -r tag1" "U file1" \
24563 ${CPROG} update: checksum failure after patch to \./file1; will refetch
24564 ${CPROG} client: refetching unpatchable files
24565 $SPROG update: warning: \`file1' was lost
24568 dotest keyword-22
"cat file1" '\$'"Name: tag1 "'\$'
24571 # Like serverpatch-8. Not sure there is anything much we
24572 # can or should do about this.
24573 dotest keyword-23r
"${testcvs} update -A file1" "P file1
24574 ${CPROG} update: checksum failure after patch to \./file1; will refetch
24575 ${CPROG} client: refetching unpatchable files
24576 $SPROG update: warning: \`file1' was lost
24579 dotest keyword-23
"${testcvs} update -A file1" "[UP] file1"
24581 dotest keyword-24
"cat file1" '\$'"Name: "'\$'"
24587 modify_repo
rm -rf $CVSROOT_DIRNAME/first-dir
24593 # Test the Log keyword.
24595 dotest keywordlog-1
"${testcvs} -q co -l ." ''
24597 dotest keywordlog-2
"${testcvs} add first-dir" \
24598 "Directory ${CVSROOT_DIRNAME}/first-dir added to the repository"
24600 echo initial
>file1
24601 dotest keywordlog-3
"${testcvs} add file1" \
24602 "${SPROG} add: scheduling file .file1. for addition
24603 ${SPROG} add: use .${SPROG} commit. to add this file permanently"
24605 # See "rmadd" for a list of other tests of cvs ci -r.
24606 dotest keywordlog-4
"${testcvs} -q ci -r 1.3 -m add file1" \
24607 "$CVSROOT_DIRNAME/first-dir/file1,v <-- file1
24608 initial revision: 1\.3"
24612 dotest keywordlog-4a
"${testcvs} -q co first-dir" "U first-dir/file1"
24615 echo 'xx $''Log$' >> file1
24616 cat >${TESTDIR}/comment.tmp
<<EOF
24620 # As with rmadd-25, "cvs ci -r" sets a sticky tag.
24621 dotest_fail keywordlog-4b \
24622 "${testcvs} ci -F ${TESTDIR}/comment.tmp file1" \
24623 "${SPROG} commit: sticky tag .1\.3. for file .file1. is not a branch
24624 ${SPROG} \[commit aborted\]: correct above errors first!"
24625 dotest keywordlog-4c
"${testcvs} -q update -A" "M file1"
24627 dotest keywordlog-5
"${testcvs} ci -F ${TESTDIR}/comment.tmp file1" \
24628 "${CVSROOT_DIRNAME}/first-dir/file1,v <-- file1
24629 new revision: 1\.4; previous revision: 1\.3"
24630 rm -f ${TESTDIR}/comment.tmp
24631 dotest keywordlog-6
"${testcvs} -q tag -b br" "T file1"
24632 dotest keywordlog-7
"cat file1" \
24634 xx "'\$'"Log: file1,v "'\$'"
24635 xx Revision 1\.4 ${RCSKEYDATE} ${username}
24640 cd ..
/..
/2/first-dir
24641 dotest keywordlog-8
"${testcvs} -q update" "[UP] file1"
24642 dotest keywordlog-9
"cat file1" \
24644 xx "'\$'"Log: file1,v "'\$'"
24645 xx Revision 1\.4 ${RCSKEYDATE} ${username}
24649 cd ..
/..
/1/first-dir
24651 echo "change" >> file1
24652 dotest keywordlog-10
"${testcvs} ci -m modify file1" \
24653 "${CVSROOT_DIRNAME}/first-dir/file1,v <-- file1
24654 new revision: 1\.5; previous revision: 1\.4"
24655 dotest keywordlog-11
"cat file1" \
24657 xx "'\$'"Log: file1,v "'\$'"
24658 xx Revision 1\.5 ${RCSKEYDATE} ${username}
24661 xx Revision 1\.4 ${RCSKEYDATE} ${username}
24667 cd ..
/..
/2/first-dir
24668 dotest keywordlog-12
"${testcvs} -q update" "[UP] file1"
24669 dotest keywordlog-13
"cat file1" \
24671 xx "'\$'"Log: file1,v "'\$'"
24672 xx Revision 1\.5 ${RCSKEYDATE} ${username}
24675 xx Revision 1\.4 ${RCSKEYDATE} ${username}
24681 cd ..
/..
/1/first-dir
24682 dotest keywordlog-14
"${testcvs} -q update -r br" "[UP] file1"
24683 echo br-change
>>file1
24684 dotest keywordlog-15
"${testcvs} -q ci -m br-modify" \
24685 "$CVSROOT_DIRNAME/first-dir/file1,v <-- file1
24686 new revision: 1\.4\.2\.1; previous revision: 1\.4"
24687 dotest keywordlog-16
"cat file1" \
24689 xx "'\$'"Log: file1,v "'\$'"
24690 xx Revision 1\.4\.2\.1 ${RCSKEYDATE} ${username}
24693 xx Revision 1\.4 ${RCSKEYDATE} ${username}
24698 cd ..
/..
/2/first-dir
24699 dotest keywordlog-17
"${testcvs} -q update -r br" "[UP] file1"
24700 dotest keywordlog-18
"cat file1" \
24702 xx "'\$'"Log: file1,v "'\$'"
24703 xx Revision 1\.4\.2\.1 ${RCSKEYDATE} ${username}
24706 xx Revision 1\.4 ${RCSKEYDATE} ${username}
24712 dotest keywordlog-19
"${testcvs} -q co -p -r br first-dir/file1" \
24714 xx "'\$'"Log: file1,v "'\$'"
24715 xx Revision 1\.4\.2\.1 ${RCSKEYDATE} ${username}
24718 xx Revision 1\.4 ${RCSKEYDATE} ${username}
24723 dotest keywordlog-20
"${testcvs} -q co -p first-dir/file1" \
24725 xx "'\$'"Log: file1,v "'\$'"
24726 xx Revision 1\.5 ${RCSKEYDATE} ${username}
24729 xx Revision 1\.4 ${RCSKEYDATE} ${username}
24734 dotest keywordlog-21
"${testcvs} -q co -p -r 1.4 first-dir/file1" \
24736 xx "'\$'"Log: file1,v "'\$'"
24737 xx Revision 1\.4 ${RCSKEYDATE} ${username}
24743 # OK, the basic rule for keyword expansion is that it
24744 # happens on checkout. And the rule for annotate is that
24745 # it annotates a checked-in revision, rather than a checked-out
24746 # file. So, although it is kind of confusing that the latest
24747 # revision does not appear in the annotated output, and the
24748 # annotated output does not quite match what you'd get with
24749 # update or checkout, the behavior is more or less logical.
24750 # The same issue occurs with annotate and other keywords,
24751 # I think, although it is particularly noticeable for $Log.
24752 dotest keywordlog-22
"${testcvs} ann -r br file1" \
24754 Annotations for file1
24755 \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*
24756 1\.3 ($username8 *[0-9a-zA-Z-]*): initial
24757 1\.4\.2\.1 ($username8 *[0-9a-zA-Z-]*): xx "'\$'"Log: file1,v "'\$'"
24758 1\.4\.2\.1 ($username8 *[0-9a-zA-Z-]*): xx Revision 1\.4 ${RCSKEYDATE} $username
24759 1\.4\.2\.1 ($username8 *[0-9a-zA-Z-]*): xx First log line
24760 1\.4\.2\.1 ($username8 *[0-9a-zA-Z-]*): xx Second log line
24761 1\.4\.2\.1 ($username8 *[0-9a-zA-Z-]*): xx
24762 1\.4\.2\.1 ($username8 *[0-9a-zA-Z-]*): br-change"
24763 dotest keywordlog-23
"${testcvs} ann -r HEAD file1" \
24765 Annotations for file1
24766 \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*
24767 1\.3 ($username8 *[0-9a-zA-Z-]*): initial
24768 1\.5 ($username8 *[0-9a-zA-Z-]*): xx "'\$'"Log: file1,v "'\$'"
24769 1\.5 ($username8 *[0-9a-zA-Z-]*): xx Revision 1\.4 ${RCSKEYDATE} $username
24770 1\.5 ($username8 *[0-9a-zA-Z-]*): xx First log line
24771 1\.5 ($username8 *[0-9a-zA-Z-]*): xx Second log line
24772 1\.5 ($username8 *[0-9a-zA-Z-]*): xx
24773 1\.5 ($username8 *[0-9a-zA-Z-]*): change"
24777 # test the operation of 'admin -o' in conjunction with keywords
24778 # (especially Log - this used to munge the RCS file for all time)
24781 dotest keywordlog-24 \
24782 "${testcvs} admin -oHEAD 1/first-dir/file1" \
24783 "RCS file: ${CVSROOT_DIRNAME}/first-dir/file1,v
24784 deleting revision 1\.5
24787 dotest keywordlog-25 \
24788 "${testcvs} -q co -p first-dir/file1" \
24790 xx "'\$'"Log: file1,v "'\$'"
24791 xx Revision 1\.4 ${RCSKEYDATE} ${username}
24796 # Now test the behavior when the comment leader exceeds the
24797 # configured maximum.
24799 dotest keywordlog-26
"$testcvs -Q co first-dir"
24802 sed 's/xx \$/1234567890123456789 $/' <file1
>tmp
24804 dotest keywordlog-27
"$testcvs -Q ci -mrevision-5"
24805 dotest keywordlog-28
"cat file1" \
24807 1234567890123456789 "'\$'"Log: file1,v "'\$'"
24808 1234567890123456789 Revision 1\.5 $RCSKEYDATE $username
24809 1234567890123456789 revision-5
24810 1234567890123456789
24811 xx Revision 1\.4 $RCSKEYDATE $username
24816 sed 's/1234567890123456789 \$/12345678901234567890 $/' <file1
>tmp
24818 dotest keywordlog-29
"$testcvs -Q ci -mrevision-6" \
24819 "$SPROG commit: Skipping "'`$''Log$'"' keyword due to excessive comment leader\."
24820 dotest keywordlog-30
"cat file1" \
24822 12345678901234567890 "'\$'"Log: file1,v "'\$'"
24823 1234567890123456789 Revision 1\.5 $RCSKEYDATE $username
24824 1234567890123456789 revision-5
24825 1234567890123456789
24826 xx Revision 1\.4 $RCSKEYDATE $username
24831 # Check that the Log-related config options work.
24833 dotest keywordlog-31
"$testcvs -Q co CVSROOT"
24835 echo "UseArchiveCommentLeader=TrUe" >>config
24836 dotest keywordlog-32
"$testcvs -Q ci -mset-UseArchiveCommentLeader"
24839 dotest keywordlog-33
"$testcvs -Q ci -fmrevision-7 file1"
24840 dotest keywordlog-34
"cat file1" \
24842 12345678901234567890 "'\$'"Log: file1,v "'\$'"
24843 # Revision 1\.7 $RCSKEYDATE $username
24846 1234567890123456789 Revision 1\.5 $RCSKEYDATE $username
24847 1234567890123456789 revision-5
24848 1234567890123456789
24849 xx Revision 1\.4 $RCSKEYDATE $username
24855 echo "MaxCommentLeaderLength=1k" >>config
24856 dotest keywordlog-35
"$testcvs -Q ci -mset-MaxCommentLeaderLength"
24859 dotest keywordlog-36
"$testcvs -Q ci -fmrevision-8 file1"
24860 dotest keywordlog-37
"cat file1" \
24862 12345678901234567890 "'\$'"Log: file1,v "'\$'"
24863 12345678901234567890 Revision 1\.8 $RCSKEYDATE $username
24864 12345678901234567890 revision-8
24865 12345678901234567890
24866 # Revision 1\.7 $RCSKEYDATE $username
24869 1234567890123456789 Revision 1\.5 $RCSKEYDATE $username
24870 1234567890123456789 revision-5
24871 1234567890123456789
24872 xx Revision 1\.4 $RCSKEYDATE $username
24881 modify_repo
rm -rf $CVSROOT_DIRNAME/first-dir
24887 # Test the Name keyword.
24888 # See the keyword test for a descriptions of some other tests that
24889 # test keyword expansion modes.
24890 mkdir keywordname
; cd keywordname
24892 dotest keywordname-init-1
"${testcvs} -q co -l ." ''
24894 dotest keywordname-init-2
"${testcvs} add first-dir" \
24895 "Directory ${CVSROOT_DIRNAME}/first-dir added to the repository"
24898 echo '$'"Name$" >file1
24899 echo '$'"Name$" >file2
24900 dotest keywordname-init-3
"${testcvs} add file1 file2" \
24901 "${SPROG} add: scheduling file .file1. for addition
24902 ${SPROG} add: scheduling file .file2. for addition
24903 ${SPROG} add: use .${SPROG} commit. to add these files permanently"
24905 # See "rmadd" for a list of other tests of cvs ci -r.
24906 dotest keywordname-init-4
"${testcvs} -q ci -r 1.3 -m add" \
24907 "$CVSROOT_DIRNAME/first-dir/file1,v <-- file1
24908 initial revision: 1\.3
24909 $CVSROOT_DIRNAME/first-dir/file2,v <-- file2
24910 initial revision: 1\.3"
24912 dotest keywordname-init-6
"${testcvs} -q up -A"
24913 dotest keywordname-init-7
"${testcvs} -q tag -b br" \
24917 echo new data
>>file1
24918 dotest keywordname-init-8
"${testcvs} -q ci -mchange" \
24919 "$CVSROOT_DIRNAME/first-dir/file1,v <-- file1
24920 new revision: 1\.4; previous revision: 1\.3"
24922 # First check out a branch.
24924 # There used to be a bug where static tags would be substituted for
24925 # Name keywords but not branch tags.
24928 # Why shouldn't the non-update case not cause a substitution?
24929 # An update -kk or -A will unsub and sub keywords without updates
24931 # FIXCVS - see note above keyword-21
24932 dotest keywordname-update-1
"${testcvs} -q up -rbr" "U file1" \
24934 ${CPROG} update: checksum failure after patch to \./file1; will refetch
24935 ${CPROG} client: refetching unpatchable files
24936 $SPROG update: warning: \`file1' was lost
24938 dotest keywordname-update-2
"cat file1" '\$'"Name: br "'\$'
24939 dotest keywordname-update-3
"cat file2" '\$'"Name: "'\$'
24941 # Now verify that updating to the trunk leaves no substitution for
24943 dotest keywordname-update-4
"${testcvs} -q tag firsttag" \
24946 # FIXCVS - see note above keyword-21
24947 dotest keywordname-update-5
"${testcvs} -q up -A" "U file1" \
24949 ${CPROG} update: checksum failure after patch to \./file1; will refetch
24950 ${CPROG} client: refetching unpatchable files
24951 $SPROG update: warning: \`file1' was lost
24953 dotest keywordname-update-6
"cat file1" \
24956 dotest keywordname-update-7
"cat file2" '\$'"Name: "'\$'
24958 # But updating to a static tag does cause a substitution
24959 # FIXCVS - see same note above
24960 dotest keywordname-update-8
"${testcvs} -q up -rfirsttag" "U file1" \
24962 ${CPROG} update: checksum failure after patch to \./file1; will refetch
24963 ${CPROG} client: refetching unpatchable files
24964 $SPROG update: warning: \`file1' was lost
24966 dotest keywordname-update-9
"cat file1" '\$'"Name: firsttag "'\$'
24967 dotest keywordname-update-10
"cat file2" '\$'"Name: "'\$'
24969 # And reverify the trunk update when the change is actually removed.
24970 dotest keywordname-update-11
"${testcvs} -q up -A" "[UP] file1" \
24972 ${CPROG} update: checksum failure after patch to ./file1; will refetch
24973 ${CPROG} client: refetching unpatchable files
24974 $SPROG update: warning: \`file1' was lost
24976 dotest keywordname-update-12
"cat file1" \
24979 dotest keywordname-update-13
"cat file2" '\$'"Name: "'\$'
24983 # now verify that a fresh checkout substitutes all the $Name fields
24985 dotest keywordname-checkout-1 \
24986 "${testcvs} -q co -rfirsttag first-dir" \
24990 dotest keywordname-checkout-2
"cat file1" '\$'"Name: firsttag "'\$'
24991 dotest keywordname-checkout-3
"cat file2" '\$'"Name: firsttag "'\$'
24996 modify_repo
rm -rf $CVSROOT_DIRNAME/first-dir
25002 # Test merging on files with keywords:
25007 # Note: This test assumes that CVS has already passed the binfiles
25009 # Note2: We are testing positive on binary corruption here
25010 # we probably really DON'T want to 'cvs update -kk' a binary file...
25012 dotest keyword2-1
"${testcvs} -q co -l ." ''
25014 dotest keyword2-2
"${testcvs} add first-dir" \
25015 "Directory ${CVSROOT_DIRNAME}/first-dir added to the repository"
25018 echo '$''Revision$' >> file1
25020 echo "like" >>file1
25021 echo "long" >>file1
25022 echo "files!" >>file1
25024 echo "a test line for our times" >>file1
25026 echo "They" >>file1
25027 echo "make" >>file1
25028 echo "diff" >>file1
25029 echo "look like it" >>file1
25030 echo "did a much better" >>file1
25031 echo "job." >>file1
25032 dotest keyword2-3
"${testcvs} add file1" \
25033 "${SPROG} add: scheduling file .file1. for addition
25034 ${SPROG} add: use .${SPROG} commit. to add this file permanently"
25036 ${AWK} 'BEGIN { printf "%c%c%c%sRevision: 1.1 $@%c%c", \
25037 2, 10, 137, "$", 13, 10 }' \
25038 </dev
/null |
${TR} '@' '\000' >..
/binfile.dat
25039 cp ..
/binfile.dat .
25040 dotest keyword2-5
"${testcvs} add -kb binfile.dat" \
25041 "${SPROG} add: scheduling file .binfile\.dat. for addition
25042 ${SPROG} add: use .${SPROG} commit. to add this file permanently"
25044 dotest keyword2-6
"${testcvs} -q ci -m add" \
25045 "$CVSROOT_DIRNAME/first-dir/binfile\.dat,v <-- binfile\.dat
25046 initial revision: 1\.1
25047 $CVSROOT_DIRNAME/first-dir/file1,v <-- file1
25048 initial revision: 1\.1"
25050 dotest keyword2-7
"${testcvs} -q tag -b branch" \
25054 sed -e 's/our/the best of and the worst of/' file1
>f
; mv f file1
25055 dotest keyword2-8
"${testcvs} -q ci -m change" \
25056 "$CVSROOT_DIRNAME/first-dir/file1,v <-- file1
25057 new revision: 1\.2; previous revision: 1\.1"
25059 dotest keyword2-9
"${testcvs} -q update -r branch" '[UP] file1'
25061 echo "what else do we have?" >>file1
25062 dotest keyword2-10
"${testcvs} -q ci -m change" \
25063 "$CVSROOT_DIRNAME/first-dir/file1,v <-- file1
25064 new revision: 1\.1\.2\.1; previous revision: 1\.1"
25066 # Okay, first a conflict in file1 - should be okay with binfile.dat
25067 dotest keyword2-11
"${testcvs} -q update -A -j branch" \
25069 RCS file: ${CVSROOT_DIRNAME}/first-dir/file1,v
25070 retrieving revision 1\.1
25071 retrieving revision 1\.1\.2\.1
25072 Merging differences between 1\.1 and 1\.1\.2\.1 into file1
25073 rcsmerge: warning: conflicts during merge"
25075 dotest_fail keyword2-12
"${testcvs} diff file1" \
25077 ===================================================================
25078 RCS file: ${CVSROOT_DIRNAME}/first-dir/file1,v
25079 retrieving revision 1\.2
25085 > \\\$""Revision: 1\.1\.2\.1 \\\$
25086 > >>>>>>> 1\.1\.2\.1
25088 > what else do we have${QUESTION}"
25090 # Here's the problem... shouldn't -kk a binary file...
25092 dotest keyword2-13
"${testcvs} -q update -A -kk -j branch" \
25093 "${SPROG} update: warning: \`file1' was lost
25095 RCS file: ${CVSROOT_DIRNAME}/first-dir/file1,v
25096 retrieving revision 1\.1
25097 retrieving revision 1\.1\.2\.1
25098 Merging differences between 1\.1 and 1\.1\.2\.1 into file1"
25100 # binfile won't get checked in, but it is now corrupt and could
25101 # have been checked in if it had changed on the branch...
25102 dotest keyword2-14
"${testcvs} -q ci -m change" \
25103 "$CVSROOT_DIRNAME/first-dir/file1,v <-- file1
25104 new revision: 1\.3; previous revision: 1\.2"
25106 # "-kk" no longer corrupts binary files
25107 dotest keyword2-15
"cmp binfile.dat ../binfile.dat" ''
25109 # Okay, restore everything and make CVS try and merge a binary file...
25110 # "-kk" no longer affects binary files
25111 dotest keyword2-16
"${testcvs} -q update -A" \
25113 dotest keyword2-17
"${testcvs} -q tag -b branch2" \
25116 dotest keyword2-18
"${testcvs} -q update -r branch2" ''
25118 ${AWK} 'BEGIN { printf "%c%c%c@%c%c", 2, 10, 137, 13, 10 }' \
25119 </dev
/null |
${TR} '@' '\000' >>binfile.dat
25120 dotest keyword2-19
"$testcvs -q ci -m badbadbad" \
25121 "$CVSROOT_DIRNAME/first-dir/binfile\.dat,v <-- binfile\.dat
25122 new revision: 1\.1\.4\.1; previous revision: 1\.1"
25123 # "-kk" no longer affects binary files
25125 # XXXX: do not ask, why we get the "U binfile.dat" line twice
25126 # looks like a bug!
25127 dotest keyword2-20
"${testcvs} -q update -A -kk -j branch2" \
25135 modify_repo
rm -rf $CVSROOT_DIRNAME/first-dir
25141 # Testing handling of the HEAD special tag.
25142 # There are many cases involving added and removed files
25143 # which we don't yet try to deal with.
25144 # TODO: We also could be paying much closer attention to
25145 # "head of the trunk" versus "head of the default branch".
25146 # That is what "cvs import" is doing here (but I didn't really
25147 # fully follow through on writing the tests for that case).
25150 echo 'imported contents' >file1
25151 # It may seem like we don't do much with file2, but do note that
25152 # the "cvs diff" invocations do also diff file2 (and come up empty).
25153 echo 'imported contents' >file2
25154 dotest_sort head-1
"${testcvs} import -m add first-dir tag1 tag2" \
25159 No conflicts created by this import"
25164 dotest head-2
"${testcvs} -q co first-dir" \
25168 echo 'add a line on trunk' >> file1
25169 dotest head-3
"${testcvs} -q ci -m modify" \
25170 "$CVSROOT_DIRNAME/first-dir/file1,v <-- file1
25171 new revision: 1\.2; previous revision: 1\.1"
25172 dotest head-4
"${testcvs} -q tag trunktag" "T file1
25174 echo 'add a line on trunk after trunktag' >> file1
25175 dotest head-5
"${testcvs} -q ci -m modify" \
25176 "$CVSROOT_DIRNAME/first-dir/file1,v <-- file1
25177 new revision: 1\.3; previous revision: 1\.2"
25178 dotest head-6
"${testcvs} -q tag -b br1" "T file1
25180 dotest head-7
"${testcvs} -q update -r br1" ""
25181 echo 'modify on branch' >>file1
25182 dotest head-8
"${testcvs} -q ci -m modify" \
25183 "$CVSROOT_DIRNAME/first-dir/file1,v <-- file1
25184 new revision: 1\.3\.2\.1; previous revision: 1\.3"
25185 dotest head-9
"${testcvs} -q tag brtag" "T file1
25187 echo 'modify on branch after brtag' >>file1
25188 dotest head-10
"${testcvs} -q ci -m modify" \
25189 "$CVSROOT_DIRNAME/first-dir/file1,v <-- file1
25190 new revision: 1\.3\.2\.2; previous revision: 1\.3\.2\.1"
25191 # With no sticky tags, HEAD is the head of the trunk.
25192 dotest head-trunk-setup
"${testcvs} -q update -A" "[UP] file1"
25193 dotest head-trunk-update
"${testcvs} -q update -r HEAD -p file1" \
25195 add a line on trunk
25196 add a line on trunk after trunktag"
25197 # and diff thinks so too. Case (a) from the comment in
25198 # cvs.texinfo (Common options).
25199 dotest_fail head-trunk-diff
"${testcvs} -q diff -c -r HEAD -r br1" \
25201 ===================================================================
25202 RCS file: ${CVSROOT_DIRNAME}/first-dir/file1,v
25203 retrieving revision 1\.3
25204 retrieving revision 1\.3\.2\.2
25205 diff -c -r1\.3 -r1\.3\.2\.2
25206 \*\*\* file1 ${RFCDATE} 1\.3
25207 --- file1 ${RFCDATE} 1\.3\.2\.2
25208 \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*
25209 \*\*\* 1,3 \*\*\*\*
25212 add a line on trunk
25213 add a line on trunk after trunktag
25214 ${PLUS} modify on branch
25215 ${PLUS} modify on branch after brtag"
25217 # With a branch sticky tag, HEAD is the head of the trunk.
25218 dotest head-br1-setup
"${testcvs} -q update -r br1" "[UP] file1"
25219 dotest head-br1-update
"${testcvs} -q update -r HEAD -p file1" \
25221 add a line on trunk
25222 add a line on trunk after trunktag"
25223 # But diff thinks that HEAD is "br1". Case (b) from cvs.texinfo.
25224 # Probably people are relying on it.
25225 dotest head-br1-diff
"${testcvs} -q diff -c -r HEAD -r br1" ""
25227 # With a nonbranch sticky tag on a branch,
25228 # HEAD is the head of the trunk
25229 dotest head-brtag-setup
"${testcvs} -q update -r brtag" "[UP] file1"
25230 dotest head-brtag-update
"${testcvs} -q update -r HEAD -p file1" \
25232 add a line on trunk
25233 add a line on trunk after trunktag"
25235 # CVS 1.9 and older thought that HEAD is "brtag" (this was
25236 # noted as "strange, maybe accidental"). But "br1" makes a
25237 # whole lot more sense.
25238 dotest head-brtag-diff
"${testcvs} -q diff -c -r HEAD -r br1" ""
25240 # With a nonbranch sticky tag on the trunk, HEAD is the head
25241 # of the trunk, I think.
25242 dotest head-trunktag-setup
"${testcvs} -q update -r trunktag" \
25244 dotest head-trunktag-check
"cat file1" "imported contents
25245 add a line on trunk"
25246 dotest head-trunktag-update
"${testcvs} -q update -r HEAD -p file1" \
25248 add a line on trunk
25249 add a line on trunk after trunktag"
25250 # Like head-brtag-diff, there is a non-branch sticky tag.
25251 dotest_fail head-trunktag-diff \
25252 "${testcvs} -q diff -c -r HEAD -r br1" \
25254 ===================================================================
25255 RCS file: ${CVSROOT_DIRNAME}/first-dir/file1,v
25256 retrieving revision 1\.3
25257 retrieving revision 1\.3\.2\.2
25258 diff -c -r1\.3 -r1\.3\.2\.2
25259 \*\*\* file1 ${RFCDATE} 1\.3
25260 --- file1 ${RFCDATE} 1\.3\.2\.2
25261 \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*
25262 \*\*\* 1,3 \*\*\*\*
25265 add a line on trunk
25266 add a line on trunk after trunktag
25267 ${PLUS} modify on branch
25268 ${PLUS} modify on branch after brtag"
25270 # Also might test what happens if we setup with update -r
25271 # HEAD. In general, if sticky tags matter, does the
25272 # behavior of "update -r <foo>" (without -p) depend on the
25273 # sticky tags before or after the update?
25275 # Note that we are testing both the case where this deletes
25276 # a revision (file1) and the case where it does not (file2)
25277 dotest_fail head-o0a
"${testcvs} admin -o ::br1" \
25278 "${SPROG} admin: Administrating \.
25279 RCS file: ${CVSROOT_DIRNAME}/first-dir/file1,v
25280 ${SPROG} admin: cannot remove revision 1\.3\.2\.1 because it has tags
25281 ${SPROG} admin: RCS file for .file1. not modified\.
25282 RCS file: ${CVSROOT_DIRNAME}/first-dir/file2,v
25284 dotest head-o0b
"${testcvs} tag -d brtag" \
25285 "${SPROG} tag: Untagging \.
25288 dotest head-o1
"${testcvs} admin -o ::br1" \
25289 "${SPROG} admin: Administrating \.
25290 RCS file: ${CVSROOT_DIRNAME}/first-dir/file1,v
25291 deleting revision 1\.3\.2\.1
25293 RCS file: ${CVSROOT_DIRNAME}/first-dir/file2,v
25299 modify_repo
rm -rf $CVSROOT_DIRNAME/first-dir
25305 # Test combining -r and -D.
25307 # Note that this is not a complete test. It relies on the fact
25308 # that update, checkout and export have a LOT of shared code.
25310 # 1) checkout is never tested at all with -r -D
25311 # 2) update never uses an argument to '-D' besides 'now'
25312 # (this test does not provide enough data to prove
25313 # that 'cvs update' with both a '-r' and a '-D'
25314 # specified does not ignore '-D': a 'cvs up
25315 # -r<branch> -Dnow' and a 'cvs up -r<branch>'
25316 # should specify the same file revision).
25317 # 3) export uses '-r<branch> -D<when there was a different
25318 # revision>', hopefully completing this behavior test
25319 # for checkout and update as well.
25324 dotest tagdate-1
"${testcvs} -q co -l ." ''
25326 dotest tagdate-2
"${testcvs} add first-dir" \
25327 "Directory ${CVSROOT_DIRNAME}/first-dir added to the repository"
25330 echo trunk-1
>file1
25331 dotest tagdate-3
"${testcvs} add file1" \
25332 "${SPROG} add: scheduling file .file1. for addition
25333 ${SPROG} add: use .${SPROG} commit. to add this file permanently"
25334 dotest tagdate-4
"${testcvs} -q ci -m add" \
25335 "$CVSROOT_DIRNAME/first-dir/file1,v <-- file1
25336 initial revision: 1\.1"
25337 date_T1
=`getrlogdate -r1.1 first-dir/file1`
25339 dotest tagdate-5
"${testcvs} -q tag -b br1" "T file1"
25340 dotest tagdate-6
"${testcvs} -q tag -b br2" "T file1"
25341 echo trunk-2
>file1
25342 dotest tagdate-7
"${testcvs} -q ci -m modify-on-trunk" \
25343 "$CVSROOT_DIRNAME/first-dir/file1,v <-- file1
25344 new revision: 1\.2; previous revision: 1\.1"
25345 date_T2
=`getrlogdate -r1.2 first-dir/file1`
25347 # We are testing -r -D where br1 is a (magic) branch without
25348 # any revisions. First the case where br2 doesn't have any
25349 # revisions either:
25350 dotest tagdate-8
"${testcvs} -q update -p -r br1 -D now" "trunk-1"
25351 dotest tagdate-9
"${testcvs} -q update -r br2" "[UP] file1"
25353 dotest tagdate-10
"${testcvs} -q ci -m modify-on-br2" \
25354 "$CVSROOT_DIRNAME/first-dir/file1,v <-- file1
25355 new revision: 1\.1\.4\.1; previous revision: 1\.1"
25356 date_T3
=`getrlogdate -r1.1.4.1 first-dir/file1`
25358 # Then the case where br2 does have revisions:
25359 dotest tagdate-11
"${testcvs} -q update -p -r br1 -D now" "trunk-1"
25361 # Joins from dates on the head used to be prohibited.
25362 dotest tagdate-12
"$testcvs -q update -j:yesterday -j:now"
25363 dotest tagdate-12b
"$testcvs -Q update -C"
25367 dotest tagdate-13
"${testcvs} -q ci -m modify-2-on-br2" \
25368 "$CVSROOT_DIRNAME/first-dir/file1,v <-- file1
25369 new revision: 1\.1\.4\.2; previous revision: 1\.1\.4\.1"
25370 date_T4
=`getrlogdate -r1.1.4.2 first-dir/file1`
25372 # Test diff -r<tag>:<date> with two revisions specified.
25373 dotest_fail tagdate-13b \
25374 "$testcvs -q diff -u -rbr2:'$date_T3' -rbr2:now file1" \
25376 ===================================================================
25377 RCS file: $CVSROOT_DIRNAME/first-dir/file1,v
25378 retrieving revision 1\.1\.4\.1
25379 retrieving revision 1\.1\.4\.2
25380 diff -u -r1\.1\.4\.1 -r1\.1\.4\.2
25381 --- file1 $RFCDATE 1\.1\.4\.1
25382 +++ file1 $RFCDATE 1\.1\.4\.2
25387 # Tag a date on a branch.
25388 dotest tagdate-13c
"$testcvs -q tag -rbr2:'$date_T3' tagdate" \
25390 dotest tagdate-13d
"$testcvs -q update -rtagdate" "[UP] file1"
25391 dotest tagdate-13e
"cat file1" "br2-1"
25393 # This one should fail, though currently without an error message,
25394 # since a date on a static tag is meaningless.
25395 dotest tagdate-13f
"$testcvs -q tag -rtagdate:'$date_T3' tagdate"
25397 # and restore to using the trunk for future tests.
25398 dotest tagdate-13g
"$testcvs -q up -rbr2" "[UP] file1"
25402 dotest tagdate-14 \
25403 "$testcvs -q export -r br2 -D'$date_T3' first-dir" \
25404 "[UP] first-dir/file1"
25405 dotest tagdate-14b
"cat first-dir/file1" "br2-1"
25406 dotest tagdate-15 \
25407 "$testcvs -q export -rbr2:'$date_T3' -dsecond-dir first-dir" \
25408 "[UP] second-dir/file1"
25409 dotest tagdate-15b
"cat second-dir/file1" "br2-1"
25413 dotest tagdate-16
"${testcvs} annotate -rbr2 -D'$date_T3'" \
25415 Annotations for file1
25416 \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*
25417 1\.1\.4\.1 ($username8 *[0-9a-zA-Z-]*): br2-1"
25419 dotest tagdate-17
"${testcvs} annotate -rbr2 -Dnow" \
25421 Annotations for file1
25422 \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*
25423 1\.1\.4\.2 ($username8 *[0-9a-zA-Z-]*): br2-2"
25425 # Now check to see what happens when we add files to br2 and trunk
25427 dotest tagdate-18
"${testcvs} add file3" \
25428 "${SPROG} add: scheduling file \`file3' for addition on branch \`br2'
25429 ${SPROG} add: use \`${SPROG} commit' to add this file permanently"
25430 dotest tagdate-19
"${testcvs} -q ci -m add file3" \
25431 "$CVSROOT_DIRNAME/first-dir/Attic/file3,v <-- file3
25432 new revision: 1\.1\.2\.1; previous revision: 1\.1"
25433 date_T5
=`getrlogdate -r1.1 first-dir/file3`
25434 date_T6
=`getrlogdate -r1.1.2.1 first-dir/file3`
25438 dotest tagdate-20
"${testcvs} -Q co first-dir" ''
25440 echo trunk-1
> file2
25441 dotest tagdate-21
"${testcvs} add file2" \
25442 "${SPROG} add: scheduling file .file2. for addition
25443 ${SPROG} add: use .${SPROG} commit. to add this file permanently"
25444 dotest tagdate-22
"${testcvs} -q ci -m add file2" \
25445 "$CVSROOT_DIRNAME/first-dir/file2,v <-- file2
25446 initial revision: 1\.1"
25447 date_T7
=`getrlogdate -r1.1 first-dir/file2`
25448 echo "trunk-2" >file2
25449 dotest tagdate-23
"${testcvs} -q ci -m update file2" \
25450 "$CVSROOT_DIRNAME/first-dir/file2,v <-- file2
25451 new revision: 1\.2; previous revision: 1\.1"
25452 date_T8
=`getrlogdate -r1.2 first-dir/file2`
25454 cd ..
/..
/1/first-dir
25456 dotest tagdate-24
"${testcvs} add file2" \
25457 "${SPROG} add: scheduling file \`file2' for addition on branch \`br2'
25458 ${SPROG} add: use \`${SPROG} commit' to add this file permanently"
25459 dotest tagdate-25
"${testcvs} -q ci -m add file2" \
25460 "$CVSROOT_DIRNAME/first-dir/file2,v <-- file2
25461 new revision: 1\.2\.2\.2; previous revision: 1\.2\.2\.1"
25462 date_T9
=`getrlogdate -r1.2.2.2 first-dir/file2`
25465 # Time Rev Branch Comments
25466 # T0 trunk first-dir created
25467 # T1 1.1 trunk first-dir/file1 committed "trunk-1"
25468 # br1 branch created
25469 # br2 branch created
25470 # T2 1.2 trunk first-dir/file1 committed "trunk-2"
25471 # T3 1.1.4.1 br2 first-dir/file1 committed "br2-1"
25473 # T4 1.1.4.2 br2 first-dir/file1 committed "br2-2"
25474 # T5 1.1 trunk first-dir/file3 dead
25475 # T6 1.1.2.1 br2 first-dir/file3 committed "br2-1"
25476 # T7 1.1 trunk first-dir/file2 committed "trunk-1"
25477 # T8 1.2 trunk first-dir/file2 committed "trunk-2"
25478 # T8 1.2.2.1 br2 first-dir/file2 dead
25479 # T9 1.2.2.2 br2 first-dir/file2 committed "br2-1"
25483 (echo Dates
for tagdate-26-
* are
:;\
25484 echo " date_T1='$date_T1'";\
25485 echo " date_T2='$date_T2'";\
25486 echo " date_T3='$date_T3'";\
25487 echo " date_T4='$date_T4'";\
25488 echo " date_T5='$date_T5'";\
25489 echo " date_T6='$date_T6'";\
25490 echo " date_T7='$date_T7'";\
25491 echo " date_T8='$date_T8'";\
25492 echo " date_T9='$date_T9'") >>$LOGFILE
25493 dotest tagdate-26-trunk-t1 \
25494 "${testcvs} co -D'$date_T1' -d first-dir-trunk-t1 first-dir" \
25495 "${SPROG} checkout: Updating first-dir-trunk-t1
25496 U first-dir-trunk-t1/file1"
25497 dotest tagdate-26-br2-t1 \
25498 "${testcvs} co -r br2 -D'$date_T1' -d first-dir-br2-t1 first-dir" \
25499 "${SPROG} checkout: Updating first-dir-br2-t1
25500 U first-dir-br2-t1/file1"
25501 dotest tagdate-26-trunk-t2 \
25502 "${testcvs} co -D'$date_T2' -d first-dir-trunk-t2 first-dir" \
25503 "${SPROG} checkout: Updating first-dir-trunk-t2
25504 U first-dir-trunk-t2/file1"
25505 dotest tagdate-26-br2-t2 \
25506 "${testcvs} co -r br2 -D'$date_T2' -d first-dir-br2-t2 first-dir" \
25507 "${SPROG} checkout: Updating first-dir-br2-t2
25508 U first-dir-br2-t2/file1"
25509 dotest tagdate-26-br2-t3 \
25510 "${testcvs} co -r br2 -D'$date_T3' -d first-dir-br2-t3 first-dir" \
25511 "${SPROG} checkout: Updating first-dir-br2-t3
25512 U first-dir-br2-t3/file1"
25513 dotest tagdate-26-br2-t4 \
25514 "${testcvs} co -r br2 -D'$date_T4' -d first-dir-br2-t4 first-dir" \
25515 "${SPROG} checkout: Updating first-dir-br2-t4
25516 U first-dir-br2-t4/file1"
25517 dotest tagdate-26-br2-t6 \
25518 "${testcvs} co -r br2 -D'$date_T6' -d first-dir-br2-t6 first-dir" \
25519 "${SPROG} checkout: Updating first-dir-br2-t6
25520 U first-dir-br2-t6/file1
25521 U first-dir-br2-t6/file3"
25522 dotest tagdate-26-trunk-t7 \
25523 "${testcvs} co -D'$date_T7' -d first-dir-trunk-t7 first-dir" \
25524 "${SPROG} checkout: Updating first-dir-trunk-t7
25525 U first-dir-trunk-t7/file1
25526 U first-dir-trunk-t7/file2"
25527 dotest tagdate-26-br2-t7 \
25528 "${testcvs} co -r br2 -D'$date_T7' -d first-dir-br2-t7 first-dir" \
25529 "${SPROG} checkout: Updating first-dir-br2-t7
25530 U first-dir-br2-t7/file1
25531 U first-dir-br2-t7/file3"
25532 dotest tagdate-26-trunk-t8 \
25533 "${testcvs} co -D'$date_T8' -d first-dir-trunk-t8 first-dir" \
25534 "${SPROG} checkout: Updating first-dir-trunk-t8
25535 U first-dir-trunk-t8/file1
25536 U first-dir-trunk-t8/file2"
25537 dotest tagdate-26-br2-t8 \
25538 "${testcvs} co -r br2 -D'$date_T8' -d first-dir-br2-t8 first-dir" \
25539 "${SPROG} checkout: Updating first-dir-br2-t8
25540 U first-dir-br2-t8/file1
25541 U first-dir-br2-t8/file3"
25542 dotest tagdate-26-br2-t9 \
25543 "${testcvs} co -r br2 -D'$date_T9' -d first-dir-br2-t9 first-dir" \
25544 "${SPROG} checkout: Updating first-dir-br2-t9
25545 U first-dir-br2-t9/file1
25546 U first-dir-br2-t9/file2
25547 U first-dir-br2-t9/file3"
25548 dotest tagdate-27-trunk-t1 \
25549 "${testcvs} status first-dir-trunk-t1" \
25550 "${SPROG} status: Examining first-dir-trunk-t1
25551 ===================================================================
25552 File: file1 Status: Up-to-date
25554 Working revision: 1\.1[^.]*
25555 Repository revision: 1\.1 ${CVSROOT_DIRNAME}/first-dir/file1,v
25556 Commit Identifier: ${commitid}
25558 Sticky Date: ${RCSDELTADATE}
25559 Sticky Options: (none)"
25560 dotest tagdate-27-br2-t1 \
25561 "${testcvs} status first-dir-br2-t1" \
25562 "${SPROG} status: Examining first-dir-br2-t1
25563 ===================================================================
25564 File: file1 Status: Needs Patch
25566 Working revision: 1\.1[^.]*
25567 Repository revision: 1\.1\.4\.2 ${CVSROOT_DIRNAME}/first-dir/file1,v
25568 Commit Identifier: ${commitid}
25569 Sticky Tag: br2 (branch: 1\.1\.4)
25570 Sticky Date: (none)
25571 Sticky Options: (none)"
25572 dotest tagdate-27-trunk-t2 \
25573 "${testcvs} status first-dir-trunk-t2" \
25574 "${SPROG} status: Examining first-dir-trunk-t2
25575 ===================================================================
25576 File: file1 Status: Up-to-date
25578 Working revision: 1\.2[^.]*
25579 Repository revision: 1\.2 ${CVSROOT_DIRNAME}/first-dir/file1,v
25580 Commit Identifier: ${commitid}
25582 Sticky Date: ${RCSDELTADATE}
25583 Sticky Options: (none)"
25584 dotest tagdate-27-br2-t2 \
25585 "${testcvs} status first-dir-br2-t2" \
25586 "${SPROG} status: Examining first-dir-br2-t2
25587 ===================================================================
25588 File: file1 Status: Needs Patch
25590 Working revision: 1\.1[^.]*
25591 Repository revision: 1\.1\.4\.2 ${CVSROOT_DIRNAME}/first-dir/file1,v
25592 Commit Identifier: ${commitid}
25593 Sticky Tag: br2 (branch: 1\.1\.4)
25594 Sticky Date: (none)
25595 Sticky Options: (none)"
25596 dotest tagdate-27-br2-t3 \
25597 "${testcvs} status first-dir-br2-t3" \
25598 "${SPROG} status: Examining first-dir-br2-t3
25599 ===================================================================
25600 File: file1 Status: Needs Patch
25602 Working revision: 1\.1\.4\.1[^.]*
25603 Repository revision: 1\.1\.4\.2 ${CVSROOT_DIRNAME}/first-dir/file1,v
25604 Commit Identifier: ${commitid}
25605 Sticky Tag: br2 (branch: 1\.1\.4)
25606 Sticky Date: (none)
25607 Sticky Options: (none)"
25608 dotest tagdate-27-br2-t4 \
25609 "${testcvs} status first-dir-br2-t4" \
25610 "${SPROG} status: Examining first-dir-br2-t4
25611 ===================================================================
25612 File: file1 Status: Up-to-date
25614 Working revision: 1\.1\.4\.2[^.]*
25615 Repository revision: 1\.1\.4\.2 ${CVSROOT_DIRNAME}/first-dir/file1,v
25616 Commit Identifier: ${commitid}
25617 Sticky Tag: br2 (branch: 1\.1\.4)
25618 Sticky Date: (none)
25619 Sticky Options: (none)"
25620 dotest tagdate-27-br2-t6 \
25621 "${testcvs} status first-dir-br2-t6" \
25622 "${SPROG} status: Examining first-dir-br2-t6
25623 ===================================================================
25624 File: file1 Status: Up-to-date
25626 Working revision: 1\.1\.4\.2[^.]*
25627 Repository revision: 1\.1\.4\.2 ${CVSROOT_DIRNAME}/first-dir/file1,v
25628 Commit Identifier: ${commitid}
25629 Sticky Tag: br2 (branch: 1\.1\.4)
25630 Sticky Date: (none)
25631 Sticky Options: (none)
25633 ===================================================================
25634 File: file3 Status: Up-to-date
25636 Working revision: 1\.1\.2\.1[^.]*
25637 Repository revision: 1\.1\.2\.1 ${CVSROOT_DIRNAME}/first-dir/Attic/file3,v
25638 Commit Identifier: ${commitid}
25639 Sticky Tag: br2 (branch: 1\.1\.2)
25640 Sticky Date: (none)
25641 Sticky Options: (none)"
25642 dotest tagdate-27-trunk-t7 \
25643 "${testcvs} status first-dir-trunk-t7" \
25644 "${SPROG} status: Examining first-dir-trunk-t7
25645 ===================================================================
25646 File: file1 Status: Up-to-date
25648 Working revision: 1\.2[^.]*
25649 Repository revision: 1\.2 ${CVSROOT_DIRNAME}/first-dir/file1,v
25650 Commit Identifier: ${commitid}
25652 Sticky Date: ${RCSDELTADATE}
25653 Sticky Options: (none)
25655 ===================================================================
25656 File: file2 Status: Up-to-date
25658 Working revision: 1\.1[^.]*
25659 Repository revision: 1\.1 ${CVSROOT_DIRNAME}/first-dir/file2,v
25660 Commit Identifier: ${commitid}
25662 Sticky Date: ${RCSDELTADATE}
25663 Sticky Options: (none)"
25664 dotest tagdate-27-br2-t7 \
25665 "${testcvs} status first-dir-br2-t7" \
25666 "${SPROG} status: Examining first-dir-br2-t7
25667 ===================================================================
25668 File: file1 Status: Up-to-date
25670 Working revision: 1\.1\.4\.2[^.]*
25671 Repository revision: 1\.1\.4\.2 ${CVSROOT_DIRNAME}/first-dir/file1,v
25672 Commit Identifier: ${commitid}
25673 Sticky Tag: br2 (branch: 1\.1\.4)
25674 Sticky Date: (none)
25675 Sticky Options: (none)
25677 ===================================================================
25678 File: file3 Status: Up-to-date
25680 Working revision: 1\.1\.2\.1[^.]*
25681 Repository revision: 1\.1\.2\.1 ${CVSROOT_DIRNAME}/first-dir/Attic/file3,v
25682 Commit Identifier: ${commitid}
25683 Sticky Tag: br2 (branch: 1\.1\.2)
25684 Sticky Date: (none)
25685 Sticky Options: (none)"
25686 dotest tagdate-27-trunk-t8 \
25687 "${testcvs} status first-dir-trunk-t8" \
25688 "${SPROG} status: Examining first-dir-trunk-t8
25689 ===================================================================
25690 File: file1 Status: Up-to-date
25692 Working revision: 1\.2[^.]*
25693 Repository revision: 1\.2 ${CVSROOT_DIRNAME}/first-dir/file1,v
25694 Commit Identifier: ${commitid}
25696 Sticky Date: ${RCSDELTADATE}
25697 Sticky Options: (none)
25699 ===================================================================
25700 File: file2 Status: Up-to-date
25702 Working revision: 1\.2[^.]*
25703 Repository revision: 1\.2 ${CVSROOT_DIRNAME}/first-dir/file2,v
25704 Commit Identifier: ${commitid}
25706 Sticky Date: ${RCSDELTADATE}
25707 Sticky Options: (none)"
25708 dotest tagdate-27-br2-t8 \
25709 "${testcvs} status first-dir-br2-t8" \
25710 "${SPROG} status: Examining first-dir-br2-t8
25711 ===================================================================
25712 File: file1 Status: Up-to-date
25714 Working revision: 1\.1\.4\.2[^.]*
25715 Repository revision: 1\.1\.4\.2 ${CVSROOT_DIRNAME}/first-dir/file1,v
25716 Commit Identifier: ${commitid}
25717 Sticky Tag: br2 (branch: 1\.1\.4)
25718 Sticky Date: (none)
25719 Sticky Options: (none)
25721 ===================================================================
25722 File: file3 Status: Up-to-date
25724 Working revision: 1\.1\.2\.1[^.]*
25725 Repository revision: 1\.1\.2\.1 ${CVSROOT_DIRNAME}/first-dir/Attic/file3,v
25726 Commit Identifier: ${commitid}
25727 Sticky Tag: br2 (branch: 1\.1\.2)
25728 Sticky Date: (none)
25729 Sticky Options: (none)"
25730 dotest tagdate-27-br2-t9 \
25731 "${testcvs} status first-dir-br2-t9" \
25732 "${SPROG} status: Examining first-dir-br2-t9
25733 ===================================================================
25734 File: file1 Status: Up-to-date
25736 Working revision: 1\.1\.4\.2[^.]*
25737 Repository revision: 1\.1\.4\.2 ${CVSROOT_DIRNAME}/first-dir/file1,v
25738 Commit Identifier: ${commitid}
25739 Sticky Tag: br2 (branch: 1\.1\.4)
25740 Sticky Date: (none)
25741 Sticky Options: (none)
25743 ===================================================================
25744 File: file2 Status: Up-to-date
25746 Working revision: 1\.2\.2\.2[^.]*
25747 Repository revision: 1\.2\.2\.2 ${CVSROOT_DIRNAME}/first-dir/file2,v
25748 Commit Identifier: ${commitid}
25749 Sticky Tag: br2 (branch: 1\.2\.2)
25750 Sticky Date: (none)
25751 Sticky Options: (none)
25753 ===================================================================
25754 File: file3 Status: Up-to-date
25756 Working revision: 1\.1\.2\.1[^.]*
25757 Repository revision: 1\.1\.2\.1 ${CVSROOT_DIRNAME}/first-dir/Attic/file3,v
25758 Commit Identifier: ${commitid}
25759 Sticky Tag: br2 (branch: 1\.1\.2)
25760 Sticky Date: (none)
25761 Sticky Options: (none)"
25763 # Now check the contents of the files
25764 dotest tagdate-28-trunk-t1
'cat first-dir-trunk-t1/file1' 'trunk-1'
25765 dotest tagdate-28-br2-t1
'cat first-dir-br2-t1/file1' 'trunk-1'
25766 dotest tagdate-28-trunk-t2
'cat first-dir-trunk-t2/file1' 'trunk-2'
25767 dotest tagdate-28-br2-t2
'cat first-dir-br2-t2/file1' 'trunk-1'
25768 dotest tagdate-28-br2-t3
'cat first-dir-br2-t3/file1' 'br2-1'
25769 dotest tagdate-28-br2-t4
'cat first-dir-br2-t4/file1' 'br2-2'
25770 dotest tagdate-28-br2-t6a
'cat first-dir-br2-t6/file1' "br2-2"
25771 dotest tagdate-28-br2-t6b
'cat first-dir-br2-t6/file3' "br2-1"
25772 dotest tagdate-28-trunk-t7a
'cat first-dir-trunk-t7/file1' "trunk-2"
25773 dotest tagdate-28-trunk-t7b
'cat first-dir-trunk-t7/file2' "trunk-1"
25774 dotest tagdate-28-br2-t7a
'cat first-dir-br2-t7/file1' "br2-2"
25775 dotest tagdate-28-br2-t7b
'cat first-dir-br2-t7/file3' "br2-1"
25776 dotest tagdate-28-trunk-t8a
'cat first-dir-trunk-t8/file1' "trunk-2"
25777 dotest tagdate-28-trunk-t8b
'cat first-dir-trunk-t8/file2' "trunk-2"
25778 dotest tagdate-28-br2-t8a
'cat first-dir-br2-t8/file1' "br2-2"
25779 dotest tagdate-28-br2-t8c
'cat first-dir-br2-t8/file3' "br2-1"
25780 dotest tagdate-28-br2-t9a
'cat first-dir-br2-t9/file1' "br2-2"
25781 dotest tagdate-28-br2-t9b
'cat first-dir-br2-t9/file2' "br2-1"
25782 dotest tagdate-28-br2-t9c
'cat first-dir-br2-t9/file3' "br2-1"
25785 unset date_T1 date_T2 date_T3 date_T4 date_T5
25786 unset date_T6 date_T7 date_T8 date_T9
25791 modify_repo
rm -rf $CVSROOT_DIRNAME/first-dir
25797 # Commit the first delta on branch A when there is an older
25798 # branch, B, that already has a delta. A and B come from the
25799 # same branch point. Then verify that branches A and B are
25800 # in the right order.
25802 dotest multibranch2-1
"${testcvs} -q co -l ." ''
25804 dotest multibranch2-2
"${testcvs} add first-dir" \
25805 "Directory ${CVSROOT_DIRNAME}/first-dir added to the repository"
25808 echo trunk-1
>file1
25809 echo trunk-1
>file2
25810 dotest multibranch2-3
"${testcvs} add file1 file2" \
25811 "${SPROG} add: scheduling file .file1. for addition
25812 ${SPROG} add: scheduling file .file2. for addition
25813 ${SPROG} add: use .${SPROG} commit. to add these files permanently"
25814 dotest multibranch2-4
"${testcvs} -q ci -m add" \
25815 "$CVSROOT_DIRNAME/first-dir/file1,v <-- file1
25816 initial revision: 1\.1
25817 $CVSROOT_DIRNAME/first-dir/file2,v <-- file2
25818 initial revision: 1\.1"
25819 dotest multibranch2-5
"${testcvs} -q tag -b A" "T file1
25821 dotest multibranch2-6
"${testcvs} -q tag -b B" "T file1
25824 dotest multibranch2-7
"${testcvs} -q update -r B" ''
25825 echo branch-B
>file1
25826 echo branch-B
>file2
25827 dotest multibranch2-8
"${testcvs} -q ci -m modify-on-B" \
25828 "$CVSROOT_DIRNAME/first-dir/file1,v <-- file1
25829 new revision: 1\.1\.4\.1; previous revision: 1\.1
25830 $CVSROOT_DIRNAME/first-dir/file2,v <-- file2
25831 new revision: 1\.1\.4\.1; previous revision: 1\.1"
25833 dotest multibranch2-9
"${testcvs} -q update -r A" '[UP] file1
25835 echo branch-A
>file1
25836 # When using cvs-1.9.20, this commit gets a failed assertion in rcs.c.
25837 dotest multibranch2-10
"${testcvs} -q ci -m modify-on-A" \
25838 "$CVSROOT_DIRNAME/first-dir/file1,v <-- file1
25839 new revision: 1\.1\.2\.1; previous revision: 1\.1"
25841 dotest multibranch2-11
"${testcvs} -q log file1" \
25843 RCS file: ${CVSROOT_DIRNAME}/first-dir/file1,v
25844 Working file: file1
25852 keyword substitution: kv
25853 total revisions: 3; selected revisions: 3
25855 ----------------------------
25857 date: ${ISO8601DATE}; author: $username; state: Exp; commitid: ${commitid};
25858 branches: 1\.1\.2; 1\.1\.4;
25860 ----------------------------
25861 revision 1\.1\.4\.1
25862 date: ${ISO8601DATE}; author: $username; state: Exp; lines: ${PLUS}1 -1; commitid: ${commitid};
25864 ----------------------------
25865 revision 1\.1\.2\.1
25866 date: ${ISO8601DATE}; author: $username; state: Exp; lines: ${PLUS}1 -1; commitid: ${commitid};
25868 ============================================================================="
25870 # This one is more concise.
25871 dotest multibranch2-12
"${testcvs} -q log -r1.1 file1" \
25873 RCS file: ${CVSROOT_DIRNAME}/first-dir/file1,v
25874 Working file: file1
25882 keyword substitution: kv
25883 total revisions: 3; selected revisions: 1
25885 ----------------------------
25887 date: ${ISO8601DATE}; author: $username; state: Exp; commitid: ${commitid};
25888 branches: 1\.1\.2; 1\.1\.4;
25890 ============================================================================="
25892 # OK, try very much the same thing except we run update -j to
25893 # bring the changes from B to A. Probably tests many of the
25894 # same code paths but might as well keep it separate, I guess.
25896 dotest multibranch2-13
"${testcvs} -q update -r B" "[UP] file1
25898 dotest multibranch2-14
"${testcvs} -q update -r A -j B file2" \
25900 RCS file: ${CVSROOT_DIRNAME}/first-dir/file2,v
25901 retrieving revision 1.1
25902 retrieving revision 1.1.4.1
25903 Merging differences between 1.1 and 1.1.4.1 into file2"
25904 dotest multibranch2-15
"${testcvs} -q ci -m commit-on-A file2" \
25905 "$CVSROOT_DIRNAME/first-dir/file2,v <-- file2
25906 new revision: 1\.1\.2\.1; previous revision: 1\.1"
25911 modify_repo
rm -rf $CVSROOT_DIRNAME/first-dir
25917 # In cvs-1.9.27, there is a bug that can cause an abort.
25918 # It happens when you commit a change to a ,v file that has
25919 # just the right amount of tag/branch info to align one of the
25920 # semicolons in the branch info to be on a 8k-byte boundary.
25921 # The result: rcsbuf_getkey got an abort. This failure doesn't
25922 # corrupt the ,v file -- that would be really serious. But it
25923 # does leave stale write locks that have to be removed manually.
25931 dotest tag8k-1
"$testcvs -Q import -m . $module X Y" ''
25932 dotest tag8k-2
"$testcvs -Q co $module" ''
25937 dotest tag8k-3
"$testcvs add $file" \
25938 "$SPROG add: scheduling file .$file. for addition
25939 $SPROG add: use .$SPROG commit. to add this file permanently"
25940 dotest tag8k-4
"$testcvs -Q ci -m . $file"
25942 # It seems there have to be at least two versions.
25944 dotest tag8k-5
"$testcvs -Q ci -m . $file"
25946 # Add just under 8K worth of tags.
25947 t
=TAG---------------------------------------------------------------------
25950 # Now $t is 720 bytes long.
25952 # Apply some tags with that long prefix.
25953 dotest tag8k-6
"$testcvs -Q tag $t-0 $file" ''
25954 dotest tag8k-7
"$testcvs -Q tag $t-1 $file" ''
25955 dotest tag8k-8
"$testcvs -Q tag $t-2 $file" ''
25956 dotest tag8k-9
"$testcvs -Q tag $t-3 $file" ''
25957 dotest tag8k-10
"$testcvs -Q tag $t-4 $file" ''
25958 dotest tag8k-11
"$testcvs -Q tag $t-5 $file" ''
25959 dotest tag8k-12
"$testcvs -Q tag $t-6 $file" ''
25960 dotest tag8k-13
"$testcvs -Q tag $t-7 $file" ''
25961 dotest tag8k-14
"$testcvs -Q tag $t-8 $file" ''
25962 dotest tag8k-15
"$testcvs -Q tag $t-9 $file" ''
25963 dotest tag8k-16
"$testcvs -Q tag $t-a $file" ''
25965 # Extract the author value.
25966 name
=`sed -n 's/.*; author \([^;]*\);.*/\1/p' ${CVSROOT_DIRNAME}/$module/$file,v|sed 1q`
25968 # Form a suffix string of length (16 - length($name)).
25969 # CAREFUL: this will lose if $name is longer than 16.
25970 sed_pattern
=`echo $name|sed s/././g`
25971 suffix
=`echo 1234567890123456|sed s/$sed_pattern//`
25973 # Add a final tag with length chosen so that it will push the
25974 # offset of the `;' in the 2nd occurrence of `;\tauthor' in the
25975 # ,v file to exactly 8192.
25976 dotest tag8k-17
"$testcvs -Q tag "x8bytes-
$suffix" $file" ''
25978 # This commit would fail with 1.9.27.
25980 dotest tag8k-18
"$testcvs -Q ci -m . $file"
25985 modify_repo
rm -rf $CVSROOT_DIRNAME/$module
25991 # More "cvs admin" tests.
25992 # The basicb-21 test tests rejecting an invalid option.
25993 # For -l and -u, see "reserved" and "keyword" tests.
25994 # "binfiles" test has a test of "cvs admin -k".
25995 # "log2" test has tests of -t and -q options to cvs admin.
25996 # "rcs" tests -b option also.
25998 # admin-22-o1 through admin-23 (various cases not involving ::)
25999 # binfiles2-o* (:rev, rev on trunk; rev:, deleting entire branch)
26000 # basicb-o* (attempt to delete all revisions)
26001 # basica-o1 through basica-o3 (basic :: usage)
26002 # head-o1 (::branch, where this deletes a revision or is noop)
26003 # branches-o1 (::branch, similar, with different branch topology)
26004 # log-o1 (1.3.2.1::)
26005 # binfiles-o1 (1.3:: and ::1.3; binary files)
26006 # binfiles3-9 (binary files)
26007 # Also could be testing:
26011 # 1.3::1.3.2.6 (error? or synonym for ::1.3.2.6?)
26012 # -n: admin, tagf tests.
26014 # Test the postadmin hook as a side effect of the rest of the tests.
26015 # See the `info' test for notes on where other script hooks are
26018 dotest admin-init-1
"$testcvs -Q co CVSROOT"
26020 echo "ALL $TESTDIR/2/loggit %r %p %c" >>postadmin
26021 dotest admin-init-2
"$testcvs -Q ci -mlog-admin"
26026 echo \${1+"\$@"} >>$TESTDIR/2/admin-log
26029 if test -n "$remotehost"; then
26030 $CVS_RSH $remotehost "chmod +x $TESTDIR/2/loggit"
26038 dotest admin-1
"${testcvs} -q co -l ." ''
26040 dotest admin-2
"${testcvs} add first-dir" \
26041 "Directory ${CVSROOT_DIRNAME}/first-dir added to the repository"
26044 dotest_fail admin-3
"${testcvs} -q admin -i file1" \
26045 "${CPROG} admin: the -i option to admin is not supported
26046 ${CPROG} admin: run add or import to create an RCS file
26047 ${CPROG} \[admin aborted\]: specify ${CPROG} -H admin for usage information"
26048 dotest_fail admin-4
"${testcvs} -q log file1" \
26049 "${SPROG} log: nothing known about file1"
26050 dotest_fail admin-4a
"${testcvs} -q admin file1" \
26051 "${SPROG} admin: nothing known about file1"
26053 # Set up some files, file2 a plain one and file1 with a revision
26056 dotest admin-5
"${testcvs} add file1 file2" \
26057 "${SPROG} add: scheduling file .file1. for addition
26058 ${SPROG} add: scheduling file .file2. for addition
26059 ${SPROG} add: use .${SPROG} commit. to add these files permanently"
26060 dotest admin-6
"${testcvs} -q ci -m add" \
26061 "$CVSROOT_DIRNAME/first-dir/file1,v <-- file1
26062 initial revision: 1\.1
26063 $CVSROOT_DIRNAME/first-dir/file2,v <-- file2
26064 initial revision: 1\.1"
26065 dotest admin-7
"${testcvs} -q tag -b br" "T file1
26067 dotest admin-8
"${testcvs} -q update -r br" ""
26068 echo 'add a line on the branch' >> file1
26069 echo 'add a file on the branch' >> file3
26070 dotest admin-9a
"${testcvs} -q add file3" \
26071 "${SPROG} add: use .${SPROG} commit. to add this file permanently"
26072 dotest admin-9b
"${testcvs} -q ci -m modify-on-branch" \
26073 "$CVSROOT_DIRNAME/first-dir/file1,v <-- file1
26074 new revision: 1\.1\.2\.1; previous revision: 1\.1
26075 $CVSROOT_DIRNAME/first-dir/Attic/file3,v <-- file3
26076 new revision: 1\.1\.2\.1; previous revision: 1\.1"
26077 dotest admin-10
"${testcvs} -q update -A" \
26079 ${SPROG} update: \`file3' is no longer in the repository"
26081 # Check that we can administer files in the repository that
26082 # aren't in the working directory.
26083 dotest admin-10-1
"${testcvs} admin ." \
26084 "${SPROG} admin: Administrating .
26085 RCS file: ${CVSROOT_DIRNAME}/first-dir/file1,v
26087 RCS file: ${CVSROOT_DIRNAME}/first-dir/file2,v
26089 dotest admin-10-2
"${testcvs} -q admin file3" \
26090 "RCS file: ${CVSROOT_DIRNAME}/first-dir/Attic/file3,v
26093 # Try to recurse with a numeric revision arg.
26094 # If we wanted to comprehensive about this, we would also test
26095 # this for -l, -u, and all the different -o syntaxes.
26096 dotest_fail admin-10a
"${testcvs} -q admin -b1.1.2" \
26097 "${CPROG} admin: while processing more than one file:
26098 ${CPROG} \[admin aborted\]: attempt to specify a numeric revision"
26099 dotest_fail admin-10b
"${testcvs} -q admin -m1.1:bogus file1 file2" \
26100 "${CPROG} admin: while processing more than one file:
26101 ${CPROG} \[admin aborted\]: attempt to specify a numeric revision"
26103 # try a bad symbolic revision
26104 dotest_fail admin-10c
"${testcvs} -q admin -bBOGUS" \
26105 "RCS file: ${CVSROOT_DIRNAME}/first-dir/file1,v
26106 ${SPROG} admin: ${CVSROOT_DIRNAME}/first-dir/file1,v: Symbolic name BOGUS is undefined.
26107 ${SPROG} admin: RCS file for .file1. not modified\.
26108 RCS file: ${CVSROOT_DIRNAME}/first-dir/file2,v
26109 ${SPROG} admin: ${CVSROOT_DIRNAME}/first-dir/file2,v: Symbolic name BOGUS is undefined.
26110 ${SPROG} admin: RCS file for .file2. not modified\."
26112 # Note that -s option applies to the new default branch, not
26114 # Also note that the implementation of -a via "rcs" requires
26115 # no space between -a and the argument. However, we expect
26116 # to change that once CVS parses options.
26117 dotest admin-11
"${testcvs} -q admin -afoo,bar -abaz \
26118 -b1.1.2 -cxx -U -sfoo file1" \
26119 "RCS file: ${CVSROOT_DIRNAME}/first-dir/file1,v
26121 dotest admin-11a
"${testcvs} log -N file1" "
26122 RCS file: ${CVSROOT_DIRNAME}/first-dir/file1,v
26123 Working file: file1
26131 keyword substitution: kv
26132 total revisions: 2; selected revisions: 2
26134 ----------------------------
26136 date: ${ISO8601DATE}; author: ${username}; state: Exp; commitid: ${commitid};
26139 ----------------------------
26140 revision 1\.1\.2\.1
26141 date: ${ISO8601DATE}; author: ${username}; state: foo; lines: ${PLUS}1 -0; commitid: ${commitid};
26143 ============================================================================="
26144 dotest admin-12
"${testcvs} -q admin -bbr file1" \
26145 "RCS file: ${CVSROOT_DIRNAME}/first-dir/file1,v
26147 dotest admin-12a
"${testcvs} log -N file1" "
26148 RCS file: ${CVSROOT_DIRNAME}/first-dir/file1,v
26149 Working file: file1
26157 keyword substitution: kv
26158 total revisions: 2; selected revisions: 2
26160 ----------------------------
26162 date: ${ISO8601DATE}; author: ${username}; state: Exp; commitid: ${commitid};
26165 ----------------------------
26166 revision 1\.1\.2\.1
26167 date: ${ISO8601DATE}; author: ${username}; state: foo; lines: ${PLUS}1 -0; commitid: ${commitid};
26169 ============================================================================="
26171 # "cvs log" doesn't print the comment leader. RCS 5.7 will print
26172 # the comment leader only if one specifies "-V4" to rlog. So it
26173 # seems like the only way to test it is by looking at the RCS file
26174 # directly. This also serves as a test of exporting RCS files
26175 # (analogous to the import tests in "rcs").
26176 # Rather than try to write a rigorous check for whether the
26177 # file CVS exports is valid, we just write a simpler
26178 # test for what CVS actually exports, and figure we can revise
26179 # the check as needed (within the confines of the RCS5 format as
26180 # documented in RCSFILES).
26181 # Note that we must accept either 2 or 4 digit year.
26182 dotest admin-13
"cat ${CVSROOT_DIRNAME}/first-dir/file1,v" \
26196 date ${RCSDELTADATE}; author ${username}; state Exp;
26200 commitid ${commitid};
26203 date ${RCSDELTADATE}; author ${username}; state foo;
26206 commitid ${commitid};
26227 add a line on the branch
26229 dotest_fail admin-14-1
"${testcvs} -q admin \
26230 -m1.1.1.1:changed-bogus-log-message file2" \
26231 "RCS file: ${CVSROOT_DIRNAME}/first-dir/file2,v
26232 $SPROG admin: $CVSROOT_DIRNAME/first-dir/file2,v: no such revision 1\.1\.1\.1
26233 $SPROG admin: RCS file for .file2. not modified."
26234 dotest admin-14-2
"${testcvs} -q log file2" "
26235 RCS file: ${CVSROOT_DIRNAME}/first-dir/file2,v
26236 Working file: file2
26243 keyword substitution: kv
26244 total revisions: 1; selected revisions: 1
26246 ----------------------------
26248 date: ${ISO8601DATE}; author: ${username}; state: Exp; commitid: ${commitid};
26250 ============================================================================="
26252 dotest admin-14-3
"${testcvs} -q admin -aauth3 -aauth2,foo \
26253 -soneone:1.1 -m1.1:changed-log-message -ntagone: file2" \
26254 "RCS file: ${CVSROOT_DIRNAME}/first-dir/file2,v
26256 dotest admin-15
"${testcvs} -q log file2" "
26257 RCS file: ${CVSROOT_DIRNAME}/first-dir/file2,v
26258 Working file: file2
26269 keyword substitution: kv
26270 total revisions: 1; selected revisions: 1
26272 ----------------------------
26274 date: ${ISO8601DATE}; author: ${username}; state: oneone; commitid: ${commitid};
26275 changed-log-message
26276 ============================================================================="
26278 dotest admin-16
"${testcvs} -q admin \
26279 -A${CVSROOT_DIRNAME}/first-dir/file2,v -b -L -Nbr:1.1 file1" \
26280 "RCS file: ${CVSROOT_DIRNAME}/first-dir/file1,v
26282 dotest admin-17
"${testcvs} -q log file1" "
26283 RCS file: ${CVSROOT_DIRNAME}/first-dir/file1,v
26284 Working file: file1
26296 keyword substitution: kv
26297 total revisions: 2; selected revisions: 2
26299 ----------------------------
26301 date: ${ISO8601DATE}; author: ${username}; state: Exp; commitid: ${commitid};
26304 ----------------------------
26305 revision 1\.1\.2\.1
26306 date: ${ISO8601DATE}; author: ${username}; state: foo; lines: ${PLUS}1 -0; commitid: ${commitid};
26308 ============================================================================="
26310 dotest_fail admin-18
"${testcvs} -q admin -nbr:1.1.2 file1" \
26311 "RCS file: ${CVSROOT_DIRNAME}/first-dir/file1,v
26312 ${SPROG} admin: ${CVSROOT_DIRNAME}/first-dir/file1,v: symbolic name br already bound to 1\.1
26313 ${SPROG} admin: RCS file for .file1. not modified\."
26314 dotest admin-19
"${testcvs} -q admin -ebaz -ebar,auth3 -nbr file1" \
26315 "RCS file: ${CVSROOT_DIRNAME}/first-dir/file1,v
26317 dotest admin-20
"${testcvs} -q log file1" "
26318 RCS file: ${CVSROOT_DIRNAME}/first-dir/file1,v
26319 Working file: file1
26327 keyword substitution: kv
26328 total revisions: 2; selected revisions: 2
26330 ----------------------------
26332 date: ${ISO8601DATE}; author: ${username}; state: Exp; commitid: ${commitid};
26335 ----------------------------
26337 date: ${ISO8601DATE}; author: ${username}; state: foo; lines: ${PLUS}1 -0; commitid: ${commitid};
26339 ============================================================================="
26341 # OK, this is starting to get ridiculous, in terms of
26342 # testing a feature (access lists) which doesn't do anything
26343 # useful, but what about nonexistent files and
26344 # relative pathnames in admin -A?
26345 dotest_fail admin-19a-nonexist \
26346 "${testcvs} -q admin -A${TESTDIR}/foo/bar file1" \
26347 "RCS file: ${CVSROOT_DIRNAME}/first-dir/file1,v
26348 ${SPROG} admin: Couldn't open rcs file .${TESTDIR}/foo/bar.: No such file or directory
26349 ${SPROG} \[admin aborted\]: cannot continue"
26351 # In the remote case, we are cd'd off into the temp directory
26352 # and so these tests give "No such file or directory" errors.
26353 if $remote; then :; else
26354 dotest admin-19a-admin
"${testcvs} -q admin -A../../cvsroot/first-dir/file2,v file1" \
26355 "RCS file: ${CVSROOT_DIRNAME}/first-dir/file1,v
26357 dotest admin-19a-log
"${testcvs} -q log -h -N file1" "
26358 RCS file: ${CVSROOT_DIRNAME}/first-dir/file1,v
26359 Working file: file1
26367 keyword substitution: kv
26369 ============================================================================="
26370 fi # end of tests skipped for remote
26372 # Now test that plain -e works right.
26373 dotest admin-19a-2
"${testcvs} -q admin -e file1" \
26374 "RCS file: ${CVSROOT_DIRNAME}/first-dir/file1,v
26376 dotest admin-19a-3
"${testcvs} -q log -h -N file1" "
26377 RCS file: ${CVSROOT_DIRNAME}/first-dir/file1,v
26378 Working file: file1
26383 keyword substitution: kv
26385 ============================================================================="
26387 # Put the access list back, to avoid special cases later.
26388 dotest admin-19a-4
"${testcvs} -q admin -afoo,auth2 file1" \
26389 "RCS file: ${CVSROOT_DIRNAME}/first-dir/file1,v
26392 # Add another revision to file2, so we can delete one.
26393 echo 'add a line' >> file2
26394 dotest admin-21
"${testcvs} -q ci -m modify file2" \
26395 "$CVSROOT_DIRNAME/first-dir/file2,v <-- file2
26396 new revision: 1\.2; previous revision: 1\.1"
26397 dotest admin-22
"${testcvs} -q admin -o1.1 file2" \
26398 "RCS file: ${CVSROOT_DIRNAME}/first-dir/file2,v
26399 deleting revision 1\.1
26401 # Test admin -o. More variants that we could be testing:
26402 # * REV: [on branch]
26403 # * REV1:REV2 [deleting whole branch]
26404 # * high branch numbers (e.g. 1.2.2.3.2.3)
26405 # ... and probably others. See RCS_delete_revs for ideas.
26407 echo first
rev > aaa
26408 dotest admin-22-o1
"${testcvs} add aaa" \
26409 "${SPROG} add: scheduling file .aaa. for addition
26410 ${SPROG} add: use .${SPROG} commit. to add this file permanently"
26411 dotest admin-22-o2
"${testcvs} -q ci -m first aaa" \
26412 "$CVSROOT_DIRNAME/first-dir/aaa,v <-- aaa
26413 initial revision: 1\.1"
26414 echo second
rev >> aaa
26415 dotest admin-22-o3
"${testcvs} -q ci -m second aaa" \
26416 "$CVSROOT_DIRNAME/first-dir/aaa,v <-- aaa
26417 new revision: 1\.2; previous revision: 1\.1"
26418 echo third
rev >> aaa
26419 dotest admin-22-o4
"${testcvs} -q ci -m third aaa" \
26420 "$CVSROOT_DIRNAME/first-dir/aaa,v <-- aaa
26421 new revision: 1\.3; previous revision: 1\.2"
26422 echo fourth
rev >> aaa
26423 dotest admin-22-o5
"${testcvs} -q ci -m fourth aaa" \
26424 "$CVSROOT_DIRNAME/first-dir/aaa,v <-- aaa
26425 new revision: 1\.4; previous revision: 1\.3"
26426 echo fifth
rev >>aaa
26427 dotest admin-22-o6
"${testcvs} -q ci -m fifth aaa" \
26428 "$CVSROOT_DIRNAME/first-dir/aaa,v <-- aaa
26429 new revision: 1\.5; previous revision: 1\.4"
26430 echo sixth
rev >> aaa
26431 dotest admin-22-o7
"${testcvs} -q ci -m sixth aaa" \
26432 "$CVSROOT_DIRNAME/first-dir/aaa,v <-- aaa
26433 new revision: 1\.6; previous revision: 1\.5"
26434 dotest admin-22-o8
"${testcvs} admin -l1.6 aaa" \
26435 "RCS file: ${CVSROOT_DIRNAME}/first-dir/aaa,v
26438 dotest admin-22-o9
"${testcvs} log -r1.6 aaa" "
26439 RCS file: ${CVSROOT_DIRNAME}/first-dir/aaa,v
26447 keyword substitution: kv
26448 total revisions: 6; selected revisions: 1
26450 ----------------------------
26451 revision 1\.6 locked by: ${username};
26452 date: ${ISO8601DATE}; author: ${username}; state: Exp; lines: ${PLUS}1 -0; commitid: ${commitid};
26454 ============================================================================="
26455 dotest_fail admin-22-o10
"${testcvs} admin -o1.5: aaa" \
26456 "RCS file: ${CVSROOT_DIRNAME}/first-dir/aaa,v
26457 ${SPROG} admin: ${CVSROOT_DIRNAME}/first-dir/aaa,v: can't remove locked revision 1\.6
26458 ${SPROG} admin: RCS file for .aaa. not modified\."
26459 dotest admin-22-o11
"${testcvs} admin -u aaa" \
26460 "RCS file: ${CVSROOT_DIRNAME}/first-dir/aaa,v
26463 dotest admin-22-o12
"${testcvs} admin -o1.5: aaa" \
26464 "RCS file: ${CVSROOT_DIRNAME}/first-dir/aaa,v
26465 deleting revision 1\.6
26466 deleting revision 1\.5
26468 dotest admin-22-o13
"${testcvs} log aaa" "
26469 RCS file: ${CVSROOT_DIRNAME}/first-dir/aaa,v
26476 keyword substitution: kv
26477 total revisions: 4; selected revisions: 4
26479 ----------------------------
26481 date: ${ISO8601DATE}; author: ${username}; state: Exp; lines: ${PLUS}1 -0; commitid: ${commitid};
26483 ----------------------------
26485 date: ${ISO8601DATE}; author: ${username}; state: Exp; lines: ${PLUS}1 -0; commitid: ${commitid};
26487 ----------------------------
26489 date: ${ISO8601DATE}; author: ${username}; state: Exp; lines: ${PLUS}1 -0; commitid: ${commitid};
26491 ----------------------------
26493 date: ${ISO8601DATE}; author: ${username}; state: Exp; commitid: ${commitid};
26495 ============================================================================="
26497 dotest admin-22-o14
"${testcvs} tag -b -r1.3 br1 aaa" "T aaa"
26498 dotest admin-22-o15
"${testcvs} update -rbr1 aaa" "U aaa"
26499 echo new branch
rev >> aaa
26500 dotest admin-22-o16
"${testcvs} ci -m new-branch aaa" \
26501 "$CVSROOT_DIRNAME/first-dir/aaa,v <-- aaa
26502 new revision: 1\.3\.2\.1; previous revision: 1\.3"
26503 dotest_fail admin-22-o17
"${testcvs} admin -o1.2:1.4 aaa" \
26504 "RCS file: ${CVSROOT_DIRNAME}/first-dir/aaa,v
26505 deleting revision 1\.4
26506 ${SPROG} admin: ${CVSROOT_DIRNAME}/first-dir/aaa,v: can't remove branch point 1\.3
26507 ${SPROG} admin: RCS file for .aaa. not modified\."
26508 dotest admin-22-o18
"${testcvs} update -p -r1.4 aaa" \
26509 "===================================================================
26511 RCS: ${CVSROOT_DIRNAME}/first-dir/aaa,v
26513 \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*
26518 echo second branch
rev >> aaa
26519 dotest admin-22-o19
"${testcvs} ci -m branch-two aaa" \
26520 "$CVSROOT_DIRNAME/first-dir/aaa,v <-- aaa
26521 new revision: 1\.3\.2\.2; previous revision: 1\.3\.2\.1"
26522 echo third branch
rev >> aaa
26523 dotest admin-22-o20
"${testcvs} ci -m branch-three aaa" \
26524 "$CVSROOT_DIRNAME/first-dir/aaa,v <-- aaa
26525 new revision: 1\.3\.2\.3; previous revision: 1\.3\.2\.2"
26526 echo fourth branch
rev >> aaa
26527 dotest admin-22-o21
"${testcvs} ci -m branch-four aaa" \
26528 "$CVSROOT_DIRNAME/first-dir/aaa,v <-- aaa
26529 new revision: 1\.3\.2\.4; previous revision: 1\.3\.2\.3"
26530 dotest admin-22-o22
"${testcvs} admin -o:1.3.2.3 aaa" \
26531 "RCS file: ${CVSROOT_DIRNAME}/first-dir/aaa,v
26532 deleting revision 1\.3\.2\.1
26533 deleting revision 1\.3\.2\.2
26534 deleting revision 1\.3\.2\.3
26536 dotest admin-22-o23
"${testcvs} log aaa" "
26537 RCS file: ${CVSROOT_DIRNAME}/first-dir/aaa,v
26545 keyword substitution: kv
26546 total revisions: 5; selected revisions: 5
26548 ----------------------------
26550 date: ${ISO8601DATE}; author: ${username}; state: Exp; lines: ${PLUS}1 -0; commitid: ${commitid};
26552 ----------------------------
26554 date: ${ISO8601DATE}; author: ${username}; state: Exp; lines: ${PLUS}1 -0; commitid: ${commitid};
26557 ----------------------------
26559 date: ${ISO8601DATE}; author: ${username}; state: Exp; lines: ${PLUS}1 -0; commitid: ${commitid};
26561 ----------------------------
26563 date: ${ISO8601DATE}; author: ${username}; state: Exp; commitid: ${commitid};
26565 ----------------------------
26566 revision 1\.3\.2\.4
26567 date: ${ISO8601DATE}; author: ${username}; state: Exp; lines: ${PLUS}4 -0; commitid: ${commitid};
26569 ============================================================================="
26571 dotest admin-22-o24
"${testcvs} -q update -p -r 1.3.2.4 aaa" \
26580 # The bit here about how there is a "tagone" tag pointing to
26581 # a nonexistent revision is documented by rcs. I dunno, I
26582 # wonder whether the "cvs admin -o" should give a warning in
26584 dotest admin-23
"${testcvs} -q log file2" "
26585 RCS file: ${CVSROOT_DIRNAME}/first-dir/file2,v
26586 Working file: file2
26597 keyword substitution: kv
26598 total revisions: 1; selected revisions: 1
26600 ----------------------------
26602 date: ${ISO8601DATE}; author: ${username}; state: Exp; commitid: ${commitid};
26604 ============================================================================="
26606 dotest admin-25
"cat ${CVSROOT_DIRNAME}/first-dir/file1,v" \
26617 date ${RCSDELTADATE}; author ${username}; state Exp;
26621 commitid ${commitid};
26624 date ${RCSDELTADATE}; author ${username}; state foo;
26627 commitid ${commitid};
26648 add a line on the branch
26651 # Tests of cvs admin -n. Make use of the results of
26652 # admin-1 through admin-25.
26653 # FIXME: We probably shouldn't make use of those results;
26654 # this test is way too long as it is.
26656 # tagtwo should be a revision
26658 dotest admin-26-1
"${testcvs} admin -ntagtwo:tagone file2" \
26659 "RCS file: ${CVSROOT_DIRNAME}/first-dir/file2,v
26662 # br1 should be a branch
26664 dotest admin-26-2
"${testcvs} admin -nbr1:br file2" \
26665 "RCS file: ${CVSROOT_DIRNAME}/first-dir/file2,v
26668 # Attach some tags using RCS versions
26670 dotest admin-26-3
"${testcvs} admin -ntagthree:1.1 file2" \
26671 "RCS file: ${CVSROOT_DIRNAME}/first-dir/file2,v
26674 dotest admin-26-4
"${testcvs} admin -nbr2:1.1.2 file2" \
26675 "RCS file: ${CVSROOT_DIRNAME}/first-dir/file2,v
26678 dotest admin-26-5
"${testcvs} admin -nbr4:1.1.0.2 file2" \
26679 "RCS file: ${CVSROOT_DIRNAME}/first-dir/file2,v
26682 # Check results so far
26684 dotest admin-26-6
"${testcvs} status -v file2" \
26685 "===================================================================
26686 File: file2 Status: Up-to-date
26688 Working revision: 1\.2.*
26689 Repository revision: 1\.2 ${CVSROOT_DIRNAME}/first-dir/file2,v
26690 Commit Identifier: ${commitid}
26692 Sticky Date: (none)
26693 Sticky Options: (none)
26696 br4 (branch: 1\.1\.2)
26697 br2 (branch: 1\.1\.2)
26698 tagthree (revision: 1\.1)
26699 br1 (branch: 1\.1\.2)
26700 tagtwo (revision: 1\.1)
26701 tagone (revision: 1\.1)
26702 br (branch: 1\.1\.2)"
26705 # Add a couple more revisions
26707 echo "nuthr_line" >> file2
26708 dotest admin-27-1
"${testcvs} commit -m nuthr_line file2" \
26709 "$CVSROOT_DIRNAME/first-dir/file2,v <-- file2
26710 new revision: 1\.3; previous revision: 1\.2"
26712 echo "yet_another" >> file2
26713 dotest admin-27-2
"${testcvs} commit -m yet_another file2" \
26714 "$CVSROOT_DIRNAME/first-dir/file2,v <-- file2
26715 new revision: 1\.4; previous revision: 1\.3"
26717 # Fail trying to reattach existing tag with -n
26719 dotest admin-27-3
"${testcvs} admin -ntagfour:1.1 file2" \
26720 "RCS file: ${CVSROOT_DIRNAME}/first-dir/file2,v
26723 dotest_fail admin-27-4
"${testcvs} admin -ntagfour:1.3 file2" \
26724 "RCS file: ${CVSROOT_DIRNAME}/first-dir/file2,v
26725 ${SPROG} admin: ${CVSROOT_DIRNAME}/first-dir/file2,v: symbolic name tagfour already bound to 1\.1
26726 ${SPROG} admin: RCS file for .file2. not modified\."
26728 # Succeed at reattaching existing tag, using -N
26730 dotest admin-27-5
"${testcvs} admin -Ntagfour:1.3 file2" \
26731 "RCS file: ${CVSROOT_DIRNAME}/first-dir/file2,v
26734 # Fail on some bogus operations
26735 # Try to attach to nonexistant tag
26737 dotest_fail admin-28-1
"${testcvs} admin -ntagsix:tagfive file2" \
26738 "RCS file: ${CVSROOT_DIRNAME}/first-dir/file2,v
26739 ${SPROG} admin: ${CVSROOT_DIRNAME}/first-dir/file2,v: Symbolic name or revision tagfive is undefined\.
26740 ${SPROG} admin: RCS file for .file2. not modified\."
26742 # Try a some nonexisting numeric target tags
26744 dotest_fail admin-28-2
"${testcvs} admin -ntagseven:2.1 file2" \
26745 "RCS file: ${CVSROOT_DIRNAME}/first-dir/file2,v
26746 ${SPROG} \[admin aborted\]: revision .2\.1. does not exist"
26748 dotest_fail admin-28-3
"${testcvs} admin -ntageight:2.1.2 file2" \
26749 "RCS file: ${CVSROOT_DIRNAME}/first-dir/file2,v
26750 ${SPROG} \[admin aborted\]: revision .2\.1\.2. does not exist"
26752 # Try some invalid targets
26754 dotest_fail admin-28-4
"${testcvs} admin -ntagnine:1.a.2 file2" \
26755 "RCS file: ${CVSROOT_DIRNAME}/first-dir/file2,v
26756 ${SPROG} \[admin aborted\]: tag .1\.a\.2. must start with a letter"
26758 # Confirm that a missing tag is not a fatal error.
26759 dotest admin-28-5.1
"${testcvs} -Q tag BO+GUS file1" ''
26760 dotest_fail admin-28-5.2
"${testcvs} admin -ntagten:BO+GUS file2 file1" \
26761 "RCS file: ${CVSROOT_DIRNAME}/first-dir/file2,v
26762 ${SPROG} admin: ${CVSROOT_DIRNAME}/first-dir/file2,v: Symbolic name or revision BO${PLUS}GUS is undefined\.
26763 ${SPROG} admin: RCS file for .file2. not modified\.
26764 RCS file: ${CVSROOT_DIRNAME}/first-dir/file1,v
26767 dotest_fail admin-28-6
"${testcvs} admin -nq.werty:tagfour file2" \
26768 "RCS file: ${CVSROOT_DIRNAME}/first-dir/file2,v
26769 ${SPROG} \[admin aborted\]: tag .q\.werty. must not contain the characters ..*"
26771 # Verify the archive
26773 dotest admin-29
"cat ${CVSROOT_DIRNAME}/first-dir/file2,v" \
26793 date ${RCSDELTADATE}; author ${username}; state Exp;
26796 commitid ${commitid};
26799 date ${RCSDELTADATE}; author ${username}; state Exp;
26802 commitid ${commitid};
26805 date ${RCSDELTADATE}; author ${username}; state Exp;
26808 commitid ${commitid};
26843 dotest_fail admin-30
"${testcvs} admin -mbr:another-log-message \
26845 "RCS file: ${CVSROOT_DIRNAME}/first-dir/file2,v
26846 ${SPROG} admin: ${CVSROOT_DIRNAME}/first-dir/file2,v: no such revision br: 1\.1
26847 ${SPROG} admin: RCS file for .file2. not modified.
26848 RCS file: ${CVSROOT_DIRNAME}/first-dir/aaa,v
26849 ${SPROG} admin: ${CVSROOT_DIRNAME}/first-dir/aaa,v: no such revision br
26850 ${SPROG} admin: RCS file for .aaa. not modified.
26851 RCS file: ${CVSROOT_DIRNAME}/first-dir/Attic/file3,v
26853 dotest admin-31
"${testcvs} log" \
26854 "${SPROG} log: Logging \.
26856 RCS file: ${CVSROOT_DIRNAME}/first-dir/aaa,v
26864 keyword substitution: kv
26865 total revisions: 5; selected revisions: 5
26867 ----------------------------
26869 date: ${ISO8601DATE}; author: ${username}; state: Exp; lines: ${PLUS}1 -0; commitid: ${commitid};
26871 ----------------------------
26873 date: ${ISO8601DATE}; author: ${username}; state: Exp; lines: ${PLUS}1 -0; commitid: ${commitid};
26876 ----------------------------
26878 date: ${ISO8601DATE}; author: ${username}; state: Exp; lines: ${PLUS}1 -0; commitid: ${commitid};
26880 ----------------------------
26882 date: ${ISO8601DATE}; author: ${username}; state: Exp; commitid: ${commitid};
26884 ----------------------------
26885 revision 1\.3\.2\.4
26886 date: ${ISO8601DATE}; author: ${username}; state: Exp; lines: ${PLUS}4 -0; commitid: ${commitid};
26888 =============================================================================
26890 RCS file: ${CVSROOT_DIRNAME}/first-dir/file1,v
26891 Working file: file1
26901 keyword substitution: kv
26902 total revisions: 2; selected revisions: 2
26904 ----------------------------
26906 date: ${ISO8601DATE}; author: ${username}; state: Exp; commitid: ${commitid};
26909 ----------------------------
26910 revision 1\.1\.2\.1
26911 date: ${ISO8601DATE}; author: ${username}; state: foo; lines: ${PLUS}1 -0; commitid: ${commitid};
26913 =============================================================================
26915 RCS file: ${CVSROOT_DIRNAME}/first-dir/file2,v
26916 Working file: file2
26933 keyword substitution: kv
26934 total revisions: 3; selected revisions: 3
26936 ----------------------------
26938 date: ${ISO8601DATE}; author: ${username}; state: Exp; lines: ${PLUS}1 -0; commitid: ${commitid};
26940 ----------------------------
26942 date: ${ISO8601DATE}; author: ${username}; state: Exp; lines: ${PLUS}1 -0; commitid: ${commitid};
26944 ----------------------------
26946 date: ${ISO8601DATE}; author: ${username}; state: Exp; commitid: ${commitid};
26948 =============================================================================
26950 RCS file: ${CVSROOT_DIRNAME}/first-dir/Attic/file3,v
26951 Working file: file3
26958 keyword substitution: kv
26959 total revisions: 2; selected revisions: 2
26961 ----------------------------
26963 date: ${ISO8601DATE}; author: ${username}; state: dead; commitid: ${commitid};
26965 file file3 was initially added on branch br\.
26966 ----------------------------
26967 revision 1\.1\.2\.1
26968 date: ${ISO8601DATE}; author: ${username}; state: Exp; lines: ${PLUS}1 -0; commitid: ${commitid};
26969 another-log-message
26970 ============================================================================="
26972 # Currently, this test outputs 36 identical lines, so I am just
26973 # checking $DOTSTAR for brevity.
26974 dotest admin-postadmin-examine-1
"cat $TESTDIR/2/admin-log" \
26975 "$CVSROOT_DIRNAME first-dir admin$DOTSTAR"
26979 # clean up our after ourselves
26983 modify_repo
rm -rf $CVSROOT_DIRNAME/first-dir
26989 # Tests of reserved checkouts. Eventually this will test
26990 # rcslock.pl (or equivalent) and all kinds of stuff. Right
26991 # now it just does some very basic checks on cvs admin -u
26992 # and cvs admin -l.
26993 # Also should test locking on a branch (and making sure that
26994 # locks from one branch don't get mixed up with those from
26995 # another. Both the case where one of the branches is the
26996 # main branch, and in which neither one is).
26997 # See also test keyword, which tests that keywords and -kkvl
26998 # do the right thing in the presence of locks.
27000 # The usual setup, directory first-dir containing file file1.
27002 dotest reserved-1
"${testcvs} -q co -l ." ''
27004 dotest reserved-2
"${testcvs} add first-dir" \
27005 "Directory ${CVSROOT_DIRNAME}/first-dir added to the repository"
27008 dotest reserved-3
"${testcvs} add file1" \
27009 "${SPROG} add: scheduling file .file1. for addition
27010 ${SPROG} add: use .${SPROG} commit. to add this file permanently"
27011 dotest reserved-4
"${testcvs} -q ci -m add" \
27012 "$CVSROOT_DIRNAME/first-dir/file1,v <-- file1
27013 initial revision: 1\.1"
27015 dotest reserved-5
"${testcvs} -q admin -l file1" \
27016 "RCS file: ${CVSROOT_DIRNAME}/first-dir/file1,v
27019 dotest reserved-6
"${testcvs} log -N file1" "
27020 RCS file: ${CVSROOT_DIRNAME}/first-dir/file1,v
27021 Working file: file1
27027 keyword substitution: kv
27028 total revisions: 1; selected revisions: 1
27030 ----------------------------
27031 revision 1\.1 locked by: ${username};
27032 date: ${ISO8601DATE}; author: ${username}; state: Exp; commitid: ${commitid};
27034 ============================================================================="
27036 # Note that this just tests the owner of the lock giving
27037 # it up. It doesn't test breaking a lock.
27038 dotest reserved-7
"${testcvs} -q admin -u file1" \
27039 "RCS file: ${CVSROOT_DIRNAME}/first-dir/file1,v
27043 dotest reserved-8
"${testcvs} log -N file1" "
27044 RCS file: ${CVSROOT_DIRNAME}/first-dir/file1,v
27045 Working file: file1
27050 keyword substitution: kv
27051 total revisions: 1; selected revisions: 1
27053 ----------------------------
27055 date: ${ISO8601DATE}; author: ${username}; state: Exp; commitid: ${commitid};
27057 ============================================================================="
27059 # rcslock.pl tests. Of course, the point isn't to test
27060 # rcslock.pl from the distribution but equivalent
27061 # functionality (for example, many sites may have an old
27062 # rcslock.pl). The functionality of this hook falls
27063 # short of the real rcslock.pl though.
27064 # Note that we can use rlog or look at the RCS file directly,
27065 # but we can't use "cvs log" because "cvs commit" has a lock.
27067 cat >${TESTDIR}/lockme
<<EOF
27069 line=\`grep <\$1/\$2,v 'locks $anyusername:1\.[0-9];'\`
27070 if test -z "\$line"; then
27074 user=\`echo \$line | sed -e 's/locks \\($anyusername\\):[0-9.]*;.*/\\1/'\`
27075 version=\`echo \$line | sed -e 's/locks $anyusername:\\([0-9.]*\\);.*/\\1/'\`
27076 echo "\$user has file a-lock locked for version \$version" >&2
27081 if test -n "$remotehost"; then
27082 $CVS_RSH $remotehost "chmod +x ${TESTDIR}/lockme"
27084 chmod +x
${TESTDIR}/lockme
27087 echo stuff
> a-lock
27088 dotest reserved-9
"${testcvs} add a-lock" \
27089 "${SPROG} add: scheduling file .a-lock. for addition
27090 ${SPROG} add: use .${SPROG} commit. to add this file permanently"
27091 dotest reserved-10
"${testcvs} -q ci -m new a-lock" \
27092 "$CVSROOT_DIRNAME/first-dir/a-lock,v <-- a-lock
27093 initial revision: 1\.1"
27094 # FIXME: the contents of CVSROOT fluctuate a lot
27095 # here. Maybe the expect pattern should just
27096 # confirm that commitinfo is one of the files checked out,
27097 # but for now we just check that CVS exited with success.
27099 if ${testcvs} -q co CVSROOT
>>${LOGFILE} ; then
27105 echo "DEFAULT ${TESTDIR}/lockme" >>commitinfo
27106 dotest reserved-12
"${testcvs} -q ci -m rcslock commitinfo" \
27107 "$CVSROOT_DIRNAME/CVSROOT/commitinfo,v <-- commitinfo
27108 new revision: 1\.2; previous revision: 1\.1
27109 $SPROG commit: Rebuilding administrative file database"
27110 cd ..
; cd first-dir
27112 # Simulate (approximately) what a-lock would look like
27113 # if someone else had locked revision 1.1.
27114 sed -e 's/locks; strict;/locks fred:1.1; strict;/' ${CVSROOT_DIRNAME}/first-dir
/a-lock
,v
> a-lock
,v
27116 if test -n "$remotehost"; then
27117 $CVS_RSH $remotehost "chmod 644 ${CVSROOT_DIRNAME}/first-dir/a-lock,v"
27119 chmod 644 ${CVSROOT_DIRNAME}/first-dir
/a-lock
,v
27121 dotest reserved-13
"mv a-lock,v ${CVSROOT_DIRNAME}/first-dir/a-lock,v"
27123 if test -n "$remotehost"; then
27124 $CVS_RSH $remotehost "chmod 444 ${CVSROOT_DIRNAME}/first-dir/a-lock,v"
27126 chmod 444 ${CVSROOT_DIRNAME}/first-dir
/a-lock
,v
27128 echo more stuff
>> a-lock
27129 dotest_fail_sort reserved-13b
"$testcvs ci -m '' a-lock" \
27130 " \"$TESTDIR/lockme\"
27131 Appending defaults (\" %r/%p %s\"), but please be aware that this usage is
27132 $SPROG \[commit aborted\]: correct above errors first!
27133 $SPROG commit: Pre-commit check failed
27134 $SPROG commit: warning: commitinfo line contains no format strings:
27136 fred has file a-lock locked for version 1\.1"
27137 # OK, now test "cvs admin -l" in the case where someone
27138 # else has the file locked.
27139 dotest_fail reserved-13c
"${testcvs} admin -l a-lock" \
27140 "RCS file: ${CVSROOT_DIRNAME}/first-dir/a-lock,v
27141 ${SPROG} \[admin aborted\]: Revision 1\.1 is already locked by fred"
27143 dotest reserved-14
"${testcvs} admin -u1.1 a-lock" \
27144 "RCS file: ${CVSROOT_DIRNAME}/first-dir/a-lock,v
27145 ${SPROG} admin: ${CVSROOT_DIRNAME}/first-dir/a-lock,v: revision 1\.1 locked by fred; breaking lock
27148 dotest reserved-15
"$testcvs -q ci -m success a-lock" \
27149 "$SPROG commit: warning: commitinfo line contains no format strings:
27150 \"$TESTDIR/lockme\"
27151 Appending defaults (\" %r/%p %s\"), but please be aware that this usage is
27153 $CVSROOT_DIRNAME/first-dir/a-lock,v <-- a-lock
27154 new revision: 1\.2; previous revision: 1\.1"
27156 # Now test for a bug involving branches and locks
27157 sed -e 's/locks; strict;/locks fred:1.2; strict;/' ${CVSROOT_DIRNAME}/first-dir
/a-lock
,v
> a-lock
,v
27158 chmod 644 ${CVSROOT_DIRNAME}/first-dir
/a-lock
,v
27159 dotest reserved-16 \
27160 "mv a-lock,v ${CVSROOT_DIRNAME}/first-dir/a-lock,v" ""
27161 chmod 444 ${CVSROOT_DIRNAME}/first-dir
/a-lock
,v
27162 dotest reserved-17
"${testcvs} -q tag -b br a-lock" "T a-lock"
27163 dotest reserved-18
"${testcvs} -q update -r br a-lock" ""
27164 echo edit it
>>a-lock
27165 dotest reserved-19
"${testcvs} -q ci -m modify a-lock" \
27166 "$SPROG commit: warning: commitinfo line contains no format strings:
27167 \"$TESTDIR/lockme\"
27168 Appending defaults (\" %r/%p %s\"), but please be aware that this usage is
27170 $CVSROOT_DIRNAME/first-dir/a-lock,v <-- a-lock
27171 new revision: 1\.2\.2\.1; previous revision: 1\.2"
27173 # undo commitinfo changes
27175 echo '# vanilla commitinfo' >commitinfo
27176 dotest reserved-cleanup-1
"${testcvs} -q ci -m back commitinfo" \
27177 "$SPROG commit: warning: commitinfo line contains no format strings:
27178 \"$TESTDIR/lockme\"
27179 Appending defaults (\" %r/%p %s\"), but please be aware that this usage is
27181 $CVSROOT_DIRNAME/CVSROOT/commitinfo,v <-- commitinfo
27182 new revision: 1\.3; previous revision: 1\.2
27183 $SPROG commit: Rebuilding administrative file database"
27186 cd ..
; rm -r CVSROOT
27190 modify_repo
rm -rf $CVSROOT_DIRNAME/first-dir
27196 # Make sure CVS can merge correctly in circumstances where it
27197 # used to mess up (due to a bug which existed in diffutils 2.7
27198 # and 2.6, but not 2.5, and which has been fixed in CVS's diff
27199 # lib by Paul Eggert, bless his bitty heart).
27201 # This first test involves two working copies, "mine" and
27202 # "yours", checked out from the same repository at the same
27203 # time. In yours, you remove some text from the end of the
27204 # file and check it in; meanwhile, "me" has commented out some
27205 # lines earlier in the file, and I go to check it in right
27206 # after you checked yours in. CVS naturally tells me the file
27207 # is not up-to-date, so I run cvs update, but it updates
27208 # incorrectly, leaving in the lines of text you just deleted.
27209 # Bad! I'm in too much of a hurry to actually look at the
27210 # file, so I check it in and go home, and so your changes have
27211 # been lost. Later you discover this, and you suspect me of
27212 # deliberately sabotaging your work, so you let all the air
27213 # out of my tires. Only after a series of expensive lawsuits
27214 # and countersuits do we discover that this was all CVS's
27217 # Luckily, this problem has been fixed now, as our test will
27218 # handily confirm, no doubt:
27220 # First make a repository containing the original text:
27222 # We should be here anyway, but cd to it just in case:
27228 # These are the files we both start out with:
27231 diffmerge_create_older_files
27233 dotest diffmerge1_import \
27234 "${testcvs} import -m import diffmerge1 tag1 tag2" \
27235 "${DOTSTAR}No conflicts created by this import"
27238 # Check out two working copies, one for "you" and one for
27239 # "me". If no branch is used and cvs detects that only one
27240 # of the two people made changes, then cvs does not run the
27241 # merge algorithm. But if a branch is used, then cvs does run
27242 # the merge algorithm (even in this case of only one of the two
27243 # people having made changes). CVS used to have a bug in this
27244 # case. Therefore, it is important to test this case by
27246 ${testcvs} rtag
-b tag diffmerge1
>/dev
/null
2>&1
27247 ${testcvs} checkout
-r tag diffmerge1
>/dev
/null
2>&1
27248 mv diffmerge1 yours
27249 ${testcvs} checkout diffmerge1
>/dev
/null
2>&1
27252 # In your working copy, you'll make changes, and
27253 # then check in your changes before I check in mine:
27255 diffmerge_create_your_files
27256 dotest diffmerge1_yours
"${testcvs} -q ci -m yours" \
27257 "$CVSROOT_DIRNAME/diffmerge1/testcase01,v <-- testcase01
27258 new revision: 1\.1\.1\.1\.2\.1; previous revision: 1\.1\.1\.1
27259 $CVSROOT_DIRNAME/diffmerge1/testcase02,v <-- testcase02
27260 new revision: 1\.1\.1\.1\.2\.1; previous revision: 1\.1\.1\.1
27261 $CVSROOT_DIRNAME/diffmerge1/testcase03,v <-- testcase03
27262 new revision: 1\.1\.1\.1\.2\.1; previous revision: 1\.1\.1\.1
27263 $CVSROOT_DIRNAME/diffmerge1/testcase04,v <-- testcase04
27264 new revision: 1\.1\.1\.1\.2\.1; previous revision: 1\.1\.1\.1
27265 $CVSROOT_DIRNAME/diffmerge1/testcase05,v <-- testcase05
27266 new revision: 1\.1\.1\.1\.2\.1; previous revision: 1\.1\.1\.1
27267 $CVSROOT_DIRNAME/diffmerge1/testcase06,v <-- testcase06
27268 new revision: 1\.1\.1\.1\.2\.1; previous revision: 1\.1\.1\.1
27269 $CVSROOT_DIRNAME/diffmerge1/testcase07,v <-- testcase07
27270 new revision: 1\.1\.1\.1\.2\.1; previous revision: 1\.1\.1\.1
27271 $CVSROOT_DIRNAME/diffmerge1/testcase08,v <-- testcase08
27272 new revision: 1\.1\.1\.1\.2\.1; previous revision: 1\.1\.1\.1
27273 $CVSROOT_DIRNAME/diffmerge1/testcase09,v <-- testcase09
27274 new revision: 1\.1\.1\.1\.2\.1; previous revision: 1\.1\.1\.1
27275 $CVSROOT_DIRNAME/diffmerge1/testcase10,v <-- testcase10
27276 new revision: 1\.1\.1\.1\.2\.1; previous revision: 1\.1\.1\.1"
27278 # Change my copy. Then I
27279 # update, after both my modifications and your checkin:
27281 diffmerge_create_my_files
27282 dotest diffmerge1_mine
"${testcvs} -q update -j tag" \
27284 RCS file: ${CVSROOT_DIRNAME}/diffmerge1/testcase01,v
27285 retrieving revision 1\.1\.1\.1
27286 retrieving revision 1\.1\.1\.1\.2\.1
27287 Merging differences between 1\.1\.1\.1 and 1\.1\.1\.1\.2\.1 into testcase01
27289 RCS file: ${CVSROOT_DIRNAME}/diffmerge1/testcase02,v
27290 retrieving revision 1\.1\.1\.1
27291 retrieving revision 1\.1\.1\.1\.2\.1
27292 Merging differences between 1\.1\.1\.1 and 1\.1\.1\.1\.2\.1 into testcase02
27294 RCS file: ${CVSROOT_DIRNAME}/diffmerge1/testcase03,v
27295 retrieving revision 1\.1\.1\.1
27296 retrieving revision 1\.1\.1\.1\.2\.1
27297 Merging differences between 1\.1\.1\.1 and 1\.1\.1\.1\.2\.1 into testcase03
27299 RCS file: ${CVSROOT_DIRNAME}/diffmerge1/testcase04,v
27300 retrieving revision 1\.1\.1\.1
27301 retrieving revision 1\.1\.1\.1\.2\.1
27302 Merging differences between 1\.1\.1\.1 and 1\.1\.1\.1\.2\.1 into testcase04
27303 RCS file: ${CVSROOT_DIRNAME}/diffmerge1/testcase05,v
27304 retrieving revision 1\.1\.1\.1
27305 retrieving revision 1\.1\.1\.1\.2\.1
27306 Merging differences between 1\.1\.1\.1 and 1\.1\.1\.1\.2\.1 into testcase05
27307 RCS file: ${CVSROOT_DIRNAME}/diffmerge1/testcase06,v
27308 retrieving revision 1\.1\.1\.1
27309 retrieving revision 1\.1\.1\.1\.2\.1
27310 Merging differences between 1\.1\.1\.1 and 1\.1\.1\.1\.2\.1 into testcase06
27312 RCS file: ${CVSROOT_DIRNAME}/diffmerge1/testcase07,v
27313 retrieving revision 1\.1\.1\.1
27314 retrieving revision 1\.1\.1\.1\.2\.1
27315 Merging differences between 1\.1\.1\.1 and 1\.1\.1\.1\.2\.1 into testcase07
27316 testcase07 already contains the differences between 1\.1\.1\.1 and 1\.1\.1\.1\.2\.1
27318 RCS file: ${CVSROOT_DIRNAME}/diffmerge1/testcase08,v
27319 retrieving revision 1\.1\.1\.1
27320 retrieving revision 1\.1\.1\.1\.2\.1
27321 Merging differences between 1\.1\.1\.1 and 1\.1\.1\.1\.2\.1 into testcase08
27323 RCS file: ${CVSROOT_DIRNAME}/diffmerge1/testcase09,v
27324 retrieving revision 1\.1\.1\.1
27325 retrieving revision 1\.1\.1\.1\.2\.1
27326 Merging differences between 1\.1\.1\.1 and 1\.1\.1\.1\.2\.1 into testcase09
27328 RCS file: ${CVSROOT_DIRNAME}/diffmerge1/testcase10,v
27329 retrieving revision 1\.1\.1\.1
27330 retrieving revision 1\.1\.1\.1\.2\.1
27331 Merging differences between 1\.1\.1\.1 and 1\.1\.1\.1\.2\.1 into testcase10"
27333 # So if your changes didn't make it into my working copy, or
27334 # in any case if the files do not look like the final text
27335 # in the files in directory comp_me, then the test flunks:
27339 diffmerge_create_expected_files
27343 # If you have GNU's version of diff, you may try
27344 # uncommenting the following line which will give more
27345 # fine-grained information about how cvs differed from the
27347 #dotest diffmerge1_cmp "diff -u --recursive --exclude=CVS comp_me mine" ''
27348 dotest diffmerge1_cmp
"directory_cmp comp_me mine"
27350 # Clean up after ourselves:
27354 modify_repo
rm -rf $CVSROOT_DIRNAME/diffmerge1
27361 # FIXME: This test should be rewritten to be much more concise.
27362 # It currently weighs in at something like 600 lines, but the
27363 # same thing could probably be tested in more like 50-100 lines.
27366 # This tests for another diffmerge bug reported by Martin
27367 # Tomes; actually, his bug was probably caused by an initial
27368 # fix for the bug in test diffmerge1, and likely wasn't ever
27369 # a problem in CVS as long as one was using a normal
27370 # distribution of diff or a version of CVS that has the diff
27373 # Nevertheless, once burned twice cautious, so we test for his
27376 # Here is his report, more or less verbatim:
27377 # ------------------------------------------
27379 # Put the attached file (sgrid.h,v) into your repository
27380 # somewhere, check out the module and do this:
27382 # cvs update -j Review_Phase_2_Enhancements sgrid.h
27383 # cvs diff -r Review_V1p3 sgrid.h
27385 # As there have been no changes made on the trunk there
27386 # should be no differences, however this is output:
27388 # % cvs diff -r Review_V1p3 sgrid.h
27390 # ===================================================================
27391 # RCS file: /usr/local/repository/play/fred/sgrid.h,v
27392 # retrieving revision 1.1.2.1
27393 # diff -r1.1.2.1 sgrid.h
27395 # > /*--------------------------------------------------------------
27396 # > INLINE FUNCTION : HORIZONTALLINES
27397 # > NOTES : Description at the end of the file
27398 # > ----------------------------------------------------------------*/
27399 # > uint16 horizontalLines( void );
27402 # I did a cvs diff -c -r 1.1 -r 1.1.2.1 sgrid.h and patched those
27403 # differences to sgrid.h version 1.1 and got the correct result
27404 # so it looks like the built in patch is faulty.
27405 # -------------------------------------------------------------------
27407 # This is the RCS file, sgrid.h,v, that he sent:
27412 Review_V1p3:1.1.2.1
27413 Review_V1p3C:1.1.2.1
27414 Review_1p3A:1.1.2.1
27415 Review_V1p3A:1.1.2.1
27416 Review_Phase_2_Enhancements:1.1.0.2
27427 date 97.04.02.11.20.05; author colinl; state Exp;
27433 date 97.06.09.10.00.07; author colinl; state Exp;
27446 Tested By: Colin Law
27448 Reason for Change: Initial Revision of all files
27450 Design Change Details:
27455 @/* \$""Header: L:/gpanels/dis/sgrid.h_v 1.1.1.0 24 Jan 1996 14:59:20 PAULT \$ */
27457 * \$""Log: L:/gpanels/dis/sgrid.h_v \$
27459 * Rev 1.1.1.0 24 Jan 1996 14:59:20 PAULT
27462 * Rev 1.1 24 Jan 1996 12:09:52 PAULT
27463 * Consolidated 4100 code merged to trunk
27465 * Rev 1.0.2.0 01 Jun 1995 14:18:58 DAVEH
27468 * Rev 1.0 19 Apr 1995 16:32:48 COLINL
27469 * Initial revision.
27471 /*****************************************************************************
27474 AUTHOR : Dave Hartley
27475 SYSTEM : Borland C++
27476 DESCRIPTION : The declaration of the scrolling grid class
27478 *****************************************************************************/
27479 #if !defined(__SGRID_H)
27482 #if !defined(__SCROLL_H)
27483 #include <scroll.h>
27486 #if !defined(__GKI_H)
27490 #if defined PRINTING_SUPPORT
27494 /*****************************************************************************
27495 CLASS : ScrollingGrid
27496 DESCRIPTION: This class inherits from a grid and a scrollable, and
27497 can therefore use all the PUBLIC services provided by these
27498 classes. A description of these can be found in
27499 GRID.H and SCROLL.H.
27500 A scrolling grid is a set of horizontal and vertical lines
27501 that scroll and continually update to provide a complete grid
27503 *****************************************************************************/
27505 class ScrollingGrid : public Scrollable
27508 #if defined _WINDOWS
27509 /*---------------------------------------------------------------------------
27510 FUNCTION : CONSTRUCTOR
27511 DESCRIPTION : sets up the details of the grid, ready for painting
27512 ARGUMENTS : name : sgColour
27513 - the colour of the grid
27517 - the total number of horizontal grid lines
27519 - the min distance between the vertical grid lines
27520 on the scrolling axis
27522 - timestamp value now
27524 - number of timestamp ticks per second
27526 - number of timestamp ticks per pixel required
27530 ---------------------------------------------------------------------------*/
27531 ScrollingGrid( GkiColour sgColour, GkiLineType sgLineType,
27532 uint16 sgHorizontalTotal,
27533 uint16 verticalSpacingMin, uint32 currentTimestamp,
27534 uint16 ticksPerSecond, uint32 ticksPerPixel );
27536 /*---------------------------------------------------------------------------
27537 FUNCTION : CONSTRUCTOR
27538 DESCRIPTION : sets up the details of the grid, ready for painting
27539 ARGUMENTS : name : sgColour
27540 - the colour of the grid
27543 sgHorizontalTotal ( THE MAX NUMBER OF LINES IS 100 )
27544 - the total number of horizontal grid lines
27546 - the distance between the vertical grid lines
27547 on the scrolling axis
27550 NOTES : If the caller does not get the total grid lines value, synced
27551 with the overall size of the viewport, the spacing between
27552 grid lines will not be consistent.
27554 ---------------------------------------------------------------------------*/
27555 ScrollingGrid( GkiColour sgColour, GkiLineType sgLineType
27556 , uint16 sgHorizontalTotal, uint16 sgVerticalSpacing );
27558 /*---------------------------------------------------------------------------
27559 FUNCTION : DESTRUCTOR
27560 DESCRIPTION : tidies it all up
27565 ---------------------------------------------------------------------------*/
27566 ~ScrollingGrid( void );
27568 /*---------------------------------------------------------------------------
27570 DESCRIPTION : This service overloads the base class service, as it does
27571 additional work at the time of attachment.
27573 ARGUMENTS : name : tDrawingArea
27574 - the scrolled viewport to attach this trend to
27578 ---------------------------------------------------------------------------*/
27579 void attach( SViewport *tDrawingArea );
27581 #if defined _WINDOWS
27582 /*---------------------------------------------------------------------------
27583 FUNCTION : calculateVerticalSpacing
27584 DESCRIPTION : determines optimum spacing along time axis
27588 ---------------------------------------------------------------------------*/
27589 void calculateVerticalSpacing();
27591 /*---------------------------------------------------------------------------
27592 FUNCTION : gridSpacingTicks
27593 DESCRIPTION : Provides the grid spacing in the time axis in ticks
27595 RETURN : Number of ticks
27597 ---------------------------------------------------------------------------*/
27598 uint32 gridSpacingTicks();
27602 /*---------------------------------------------------------------------------
27603 INLINE FUNCTION : HORIZONTALLINES
27604 NOTES : Description at the end of the file
27605 ---------------------------------------------------------------------------*/
27606 uint16 horizontalLines( void );
27608 #if defined _WINDOWS
27609 // In Windows the OnDraw() function replaces paint()
27610 /*---------------------------------------------------------------------------
27611 FUNCTION : ScrollingGrid OnDraw
27612 DESCRIPTION : Paints the given area of the grid.
27614 ARGUMENTS : pDC pointer to the device context to use for display
27615 Note that the device context operates in the coords
27616 of the window owning the viewport
27619 ---------------------------------------------------------------------------*/
27620 virtual void OnDraw( CDC *pDC );
27622 #else // not Windows
27624 /*---------------------------------------------------------------------------
27626 DESCRIPTION : This extends the standard grid paint method to paint the
27627 viewport relative to its current position.
27633 ---------------------------------------------------------------------------*/
27634 void paint( void );
27637 /*---------------------------------------------------------------------------
27638 FUNCTION : P A I N T T E X T M A R K E R S
27639 DESCRIPTION : this service allow the text markers to be painted seperatley
27640 from the grid lines
27646 ---------------------------------------------------------------------------*/
27647 void paintTextMarkers();
27649 #if defined PRINTING_SUPPORT
27650 /*---------------------------------------------------------------------------
27651 FUNCTION : P R I N T
27652 DESCRIPTION : This print service prints a grid marker ( being either a
27653 timestamp or a date, IF there is one at the plot position
27658 - Where in the log to look to see if there is an
27662 the printer to print to
27666 ---------------------------------------------------------------------------*/
27667 void print( uint16 currentPrintPos, Printer *printerPtr );
27670 /*---------------------------------------------------------------------------
27671 FUNCTION : S E T D R I V E D I R E C T I O N
27672 DESCRIPTION : Sets direction for update and scrolling forwards or backwards
27673 ARGUMENTS : direction - required direction
27676 ---------------------------------------------------------------------------*/
27677 void setDriveDirection( ScrollDirection direction );
27679 /*---------------------------------------------------------------------------
27680 FUNCTION : S E T U P
27681 DESCRIPTION : service that will setup the grid prior to a paint
27688 the number of ticks that represent a plot point on
27693 ---------------------------------------------------------------------------*/
27694 void setup( uint32 newTimestamp, uint32 newTimeBase );
27696 #if defined PRINTING_SUPPORT
27697 /*---------------------------------------------------------------------------
27698 FUNCTION : S E T U P F O R P R I N T
27699 DESCRIPTION : This service iis to be called prior to printing. It allows
27700 the grid to prepare its markers ready for the print
27707 ---------------------------------------------------------------------------*/
27708 void setupForPrint();
27711 /*---------------------------------------------------------------------------
27713 DESCRIPTION : When this service is called it will calculate what needs to
27714 be painted and fill in the display again.
27716 ARGUMENTS : name : timeStamp
27717 - the reference time of this update.
27721 ---------------------------------------------------------------------------*/
27722 void update( uint32 timeStamp );
27724 /*---------------------------------------------------------------------------
27725 FUNCTION : U P D A T E B U F F E R
27726 DESCRIPTION : When a display update is not required, use this method. It
27727 updates the internal data ready for a call to paint that
27728 will then show the grid in the right position
27734 ---------------------------------------------------------------------------*/
27735 void updateBuffer( void );
27739 /*---------------------------------------------------------------------------
27740 FUNCTION : M A K E G R I D M A R K E R
27741 DESCRIPTION : service that perpares a string for display. The string will
27742 either be a short date, or short time. this is determined
27743 by the current setting of the dateMarker flag
27745 ARGUMENTS : name : timestampVal
27746 - the value to convert
27749 - the place to put the string
27753 ---------------------------------------------------------------------------*/
27754 void makeGridMarker( uint32 timestampVal, char *storePtr );
27756 /*---------------------------------------------------------------------------
27757 FUNCTION : P A I N T G R I D M A R K E R
27758 DESCRIPTION : given a position will put the string on the display
27762 - were it goes on the Y-axis
27769 ---------------------------------------------------------------------------*/
27770 void paintGridMarker( uint16 yPos, char *gridMarkerPtr );
27772 #if defined _WINDOWS
27773 /*---------------------------------------------------------------------------
27774 FUNCTION : PAINTHORIZONTALLINES
27775 DESCRIPTION : responsible for painting the grids horizontal lines
27776 ARGUMENTS : pRectToDraw pointer to rectangle that needs refreshing.
27778 pDC pointer to device context to use
27782 ---------------------------------------------------------------------------*/
27783 void paintHorizontalLines(RectCoords* pRectToDraw, CDC* pDC );
27785 /*---------------------------------------------------------------------------
27786 FUNCTION : PAINTHORIZONTALLINES
27787 DESCRIPTION : responsible for painting the grids horizontal lines
27788 ARGUMENTS : name: xStart
27789 - the starting X co-ordinate for the horizontal line
27791 - the ending X co-ordinate for the horizontal line
27794 NOTES : Remember lines are drawn from origin. The origin in a
27795 horizontal viewport will be the top.
27796 ---------------------------------------------------------------------------*/
27797 void paintHorizontalLines( uint16 xStart, uint16 xEnd );
27800 #if defined _WINDOWS
27801 /*---------------------------------------------------------------------------
27802 FUNCTION : PAINTVERTICALLINES
27803 DESCRIPTION : responsible for painting the grids vertical lines
27804 ARGUMENTS : pRectToDraw pointer to rectangle that needs refreshing.
27806 offset offset from rhs that rightmost line would be
27807 drawn if rectangle included whole viewport
27808 pDC pointer to device context to use
27811 ---------------------------------------------------------------------------*/
27812 void paintVerticalLines( RectCoords* pRectToDraw, uint16 offset,
27815 /*---------------------------------------------------------------------------
27816 FUNCTION : PAINTVERTICALLINES
27817 DESCRIPTION : responsible for painting the grids vertical lines
27818 ARGUMENTS : name : yStart
27819 - the starting Y co-ordinate for the vertical line
27821 - the ending Y co-ordinate for the vertical line
27823 - a starting point offset that determines at what X
27824 position the first line will be drawn
27829 ---------------------------------------------------------------------------*/
27830 void paintVerticalLines( uint16 yStart, uint16 yEnd, uint16 offset );
27833 #if defined _WINDOWS
27834 /*---------------------------------------------------------------------------
27835 FUNCTION : PAINTVERTICALLINE
27836 DESCRIPTION : paints one line at the position specified, and length
27837 ARGUMENTS : name : yStart
27838 - the starting point on the y axis for the line
27840 - the end point on the y axis for the line
27842 - The horizontal offset from the start of the viewport
27843 pDC pointer to device context to use
27846 NOTES : There is not an equivalent horizontal method as yet. This
27847 is a seperate method because the service is useful to a
27848 derivation of this class
27849 ---------------------------------------------------------------------------*/
27850 void paintVerticalLine( uint16 yStart, uint16 yEnd
27851 , uint16 xPosition, CDC *pDC );
27853 /*---------------------------------------------------------------------------
27854 FUNCTION : PAINTVERTICALLINE
27855 DESCRIPTION : paints one line at the position specified, and length
27856 ARGUMENTS : name : yStart
27857 - the starting point on the y axis for the line
27859 - the end point on the y axis for the line
27861 - The horizontal offset from the start of the viewport
27864 NOTES : There is not an equivalent horizontal method as yet. This
27865 is a seperate method because the service is useful to a
27866 derivation of this class
27867 ---------------------------------------------------------------------------*/
27868 void paintVerticalLine( uint16 yStart, uint16 yEnd
27869 , uint16 xPosition );
27872 /*---------------------------------------------------------------------------
27873 INLINE FUNCTION : VERTICALSPACING
27874 NOTES : Description at the end of the file
27875 ---------------------------------------------------------------------------*/
27876 uint16 verticalSpacing( void );
27879 // Position in viewport that we are now writing to if going forwards
27880 // Note that if this is greater than viewport length then we have
27881 // just scrolled and value must be adjusted before use.
27882 sint16 forwardsOutputPosition;
27884 // Position in viewport that we are now writing to if going backwards
27885 // Note that if this is less than zero then we have
27886 // just scrolled and value must be adjusted before use.
27887 sint16 backwardsOutputPosition;
27889 // position in grid cycle of forwards output position.
27890 // if zero then it is time to output a grid line
27891 sint16 forwardsIntervalCount;
27893 // position in grid cycle of forwards output position.
27894 // if zero then it is time to output a grid line
27895 sint16 backwardsIntervalCount;
27897 uint32 lastUpdateTimestamp;
27898 uint32 timeBase; // ticks per pixel
27899 uint16 currentOutputPosition;
27900 uint16 gridTimestampSpacing;
27901 uint16 intervalCount;
27902 uint16 horizontalTotal;
27904 #if defined PRINTING_SUPPORT
27905 uint16 numberOfGridMarkersPrinted;
27907 bool firstTime; // indicates first time through
27910 GkiLineType lineType;
27911 GkiColour gridColour;
27913 #if defined _WINDOWS
27914 uint16 ticksPerSec; // number of time ticks per second
27915 uint16 vSpacingMin; // minimum pixels per division along time axis
27916 CPen *pPen; // the pen to use for drawing in windows
27922 /*****************************************************************************
27923 I N L I N E F U N C T I O N S
27924 *****************************************************************************/
27926 /*---------------------------------------------------------------------------
27927 FUNCTION : HORIZONTALLINES
27928 DESCRIPTION : supplies the number of horizontal lines in the grid
27933 ---------------------------------------------------------------------------*/
27934 inline uint16 ScrollingGrid::horizontalLines( void )
27936 return( horizontalTotal );
27938 /*---------------------------------------------------------------------------
27939 FUNCTION : VERTICALSPACING
27940 DESCRIPTION : returns the distance between adjacent vertical lines
27945 ---------------------------------------------------------------------------*/
27946 inline uint16 ScrollingGrid::verticalSpacing( void )
27948 return( vSpacing );
27957 @DEV1194:DS4 Provision of major and minor grid lines
27962 /* \$""Header: /usr/local/repository/cmnsrc/review/src/sgrid.h,v 1.1 1997/04/02 11:20:05 colinl Exp \$ */
27965 * \$""Log: sgrid.h,v \$
27966 * Revision 1.1 1997/04/02 11:20:05 colinl
27969 * Tested By: Colin Law
27971 * Reason for Change: Initial Revision of all files
27973 * Design Change Details:
27979 ARGUMENTS : name : majorColour colour for major grid lines
27980 minorColour colour for minor grid lines
27981 sgLineType line type for minor grid lines
27982 yMajorGridLines number of major y lines on grid
27983 yMinorGridLines number of major y lines on grid
27986 ScrollingGrid( GkiColour majorColour, GkiColour minorColour,
27987 GkiLineType sgLineType,
27988 uint16 yMajorGridLines, uint16 yMinorGridLines,
27990 FUNCTION : DrawHorizontalGridLines
27992 DESCRIPTION : Draws major or minor grid lines
27993 ARGUMENTS : pDC device context
27995 numLines total lines required
27996 yLow, yHigh, xLow, xHigh rectangle to draw in
28000 ---------------------------------------------------------------------------*/
28001 void DrawHorizontalGridLines( CDC* pDC, CPen* pPen,
28003 uint16 yLow, uint16 yHigh, uint16 xLow, uint16 xHigh,
28006 /*---------------------------------------------------------------------------
28010 uint16 m_yMajorGridLines;
28011 uint16 m_yMinorGridLines;
28014 GkiLineType lineType; // line type for minor grid lines
28015 GkiColour m_majorColour;
28016 GkiColour m_minorColour;
28019 CPen *pMajorPen; // pen to use for drawing major grid lines
28020 CPen *pMinorPen; // pen to use for drawing minor grid lines
28022 @" > diffmerge
2/sgrid.h
,v
28024 # We have to put the RCS file in the repository by hand for
28026 modify_repo mkdir
$CVSROOT_DIRNAME/diffmerge2
28027 modify_repo
cp diffmerge
2/sgrid.h
,v \
28028 $CVSROOT_DIRNAME/diffmerge
2/sgrid.h
,v
28030 dotest diffmerge2_co \
28031 "$testcvs co diffmerge2" "${DOTSTAR}U $DOTSTAR"
28033 dotest diffmerge2_update \
28034 "${testcvs} update -j Review_Phase_2_Enhancements sgrid.h" \
28035 "${DOTSTAR}erging ${DOTSTAR}"
28036 # This is the one that counts -- there should be no output:
28037 dotest diffmerge2_diff \
28038 "${testcvs} diff -r Review_V1p3 sgrid.h" ''
28043 modify_repo
rm -rf $CVSROOT_DIRNAME/diffmerge2
28049 # Tests of "cvs release", particularly multiple arguments.
28050 # Other CVS release tests:
28051 # info-cleanup-0 for "cvs -n release".
28052 # ignore-193 for the text of the question that cvs release asks.
28053 # Also for interactions with cvsignore.
28054 # basicc: "-d .", global -Q, no arguments (is a noop),
28055 # "cvs release" without -d, multiple arguments.
28056 # dirs-4: repository directory has been deleted.
28057 # modules2-6: multiple arguments.
28059 # First the usual setup; create a directory first-dir.
28061 dotest release-1
"${testcvs} -q co -l ." ''
28063 dotest release-2
"${testcvs} add first-dir" \
28064 "Directory ${CVSROOT_DIRNAME}/first-dir added to the repository"
28067 dotest release-3
"${testcvs} add dir1" \
28068 "Directory ${CVSROOT_DIRNAME}/first-dir/dir1 added to the repository"
28070 dotest release-4
"${testcvs} add dir2" \
28071 "Directory ${CVSROOT_DIRNAME}/first-dir/dir2 added to the repository"
28074 dotest release-5
"${testcvs} add dir3" \
28075 "Directory ${CVSROOT_DIRNAME}/first-dir/dir2/dir3 added to the repository"
28078 dotest release-6
"${testcvs} release -d first-dir/dir2/dir3 first-dir/dir1" \
28079 "You have .0. altered files in this repository.
28080 Are you sure you want to release (and delete) directory .first-dir/dir2/dir3.: \
28081 You have .0. altered files in this repository.
28082 Are you sure you want to release (and delete) directory .first-dir/dir1.: " <<EOF
28086 dotest_fail release-7
"test -d first-dir/dir1" ''
28087 dotest_fail release-8
"test -d first-dir/dir2/dir3" ''
28088 dotest release-9
"${testcvs} update" \
28089 "${SPROG} update: Updating \.
28090 ${SPROG} update: Updating first-dir
28091 ${SPROG} update: Updating first-dir/dir2"
28095 dotest release-10
"${testcvs} add dir1" \
28096 "Directory ${CVSROOT_DIRNAME}/first-dir/dir1 added to the repository"
28099 dotest release-11
"${testcvs} add dir3" \
28100 "Directory ${CVSROOT_DIRNAME}/first-dir/dir2/dir3 added to the repository"
28103 dotest release-12
"${testcvs} release first-dir/dir2/dir3 first-dir/dir1" \
28104 "You have .0. altered files in this repository.
28105 Are you sure you want to release directory .first-dir/dir2/dir3.: .. .release. aborted by user choice.
28106 You have .0. altered files in this repository.
28107 Are you sure you want to release directory .first-dir/dir1.: " <<EOF
28111 dotest release-13
"${testcvs} release first-dir/dir2/dir3 first-dir/dir2" \
28112 "You have .0. altered files in this repository.
28113 Are you sure you want to release directory .first-dir/dir2/dir3.: \
28114 You have .0. altered files in this repository.
28115 Are you sure you want to release directory .first-dir/dir2.: " <<EOF
28119 dotest release-14
"test -d first-dir/dir1" ''
28120 dotest release-15
"test -d first-dir/dir2/dir3" ''
28122 mkdir first-dir
/dir
1/dir4
28123 # FIXCVS: There should be a path showing in front of dir below,
28125 dotest release-unrecognized-dir-1 \
28126 "${testcvs} release -d first-dir/dir1" \
28128 You have .0. altered files in this repository.
28129 Are you sure you want to release (and delete) directory \`first-dir/dir1': " <<EOF
28133 rm -rf first-dir
/dir2
28135 dotest release-16
"${testcvs} update" \
28136 "$SPROG update: Updating \.
28137 $SPROG update: Updating first-dir"
28139 # Check to make sure release isn't overwriting a
28140 # CVS/Entries file in the current directory (using data
28141 # from the released directory).
28143 # cvs 1.11 (remote) fails on release-21 (a message about
28144 # chdir into the removed directory), although it seemingly
28145 # unedits and removes the directory correctly. If
28146 # you manually continue, it then fails on release-22 do
28147 # to the messed up CVS/Entries file from release-21.
28150 dotest release-18
"$testcvs add second-dir" \
28151 "Directory $CVSROOT_DIRNAME/first-dir/second-dir added to the repository"
28155 dotest release-19
"$testcvs -Q add file1"
28156 dotest release-20
'$testcvs -q ci -m add' \
28157 "$CVSROOT_DIRNAME/first-dir/second-dir/file1,v <-- file1
28158 initial revision: 1\.1"
28159 dotest release-21
"$testcvs edit file1"
28161 dotest release-22
"echo yes | $testcvs release -d second-dir" \
28162 "You have \[0\] altered files in this repository.
28163 Are you sure you want to release (and delete) directory \`second-dir': "
28164 dotest release-23
"$testcvs -q update -d" "U second-dir/file1"
28165 dotest release-24
"$testcvs edit"
28170 modify_repo
rm -rf 1 $CVSROOT_DIRNAME/first-dir
28177 # Some tests of behavior which broke at one time or another when run
28178 # from case insensitive clients against case sensitive servers.
28180 # These tests are namned according to the following convention:
28182 # ci Client (sandbox filesystem) case Insensitive
28183 # cs Client (sandbox filesystem) case Sensitive
28184 # si Server (repository filesystem) case Insensitive
28185 # ss Server (repository filesystem) case Sensitive
28190 # First, we will expect different results for a few of these tests
28191 # based on whether the repository is on a case sensitive filesystem
28192 # or not and whether the sandbox is on a case sensitive filesystem or
28193 # not, so determine which cases we are dealing with:
28196 if cmp file FiLe
>/dev
/null
; then
28197 client_sensitive
=false
28201 if test -n "$remotehost"; then
28202 $CVS_RSH $remotehost 'echo file >file'
28203 $CVS_RSH $remotehost 'echo FiLe >FiLe'
28204 if $CVS_RSH $remotehost 'cmp file FiLe >/dev/null'; then
28205 server_sensitive
=false
28210 server_sensitive
=$client_sensitive
28213 # The first test (recase-1 & recase-2) is for a remove of a file then
28214 # a readd in a different case.
28215 modify_repo mkdir
$CVSROOT_DIRNAME/first-dir
28216 dotest recase-init-1
"$testcvs -Q co first-dir"
28219 echo this
file has no content
>file
28220 dotest recase-init-2
"$testcvs -Q add file"
28221 dotest recase-init-3
"$testcvs -Q ci -madd"
28222 dotest recase-init-4
"$testcvs -Q tag first"
28224 # Now remove the file.
28225 dotest recase-init-5
"$testcvs -Q rm -f file"
28226 dotest recase-init-6
"$testcvs -Q ci -mrm"
28228 # Now the test - readd in a different case.
28229 echo this
file needs some content
>FiLe
28230 if $server_sensitive; then
28231 dotest recase-1ss
"$testcvs add FiLe" \
28232 "$SPROG add: scheduling file \`FiLe' for addition
28233 $SPROG add: use \`$SPROG commit' to add this file permanently"
28234 dotest recase-2ss
"$testcvs -q ci -mrecase" \
28235 "$CVSROOT_DIRNAME/first-dir/FiLe,v <-- FiLe
28236 initial revision: 1\.1"
28237 else # server insensitive
28238 dotest recase-1si
"$testcvs add FiLe" \
28239 "$SPROG add: Re-adding file \`FiLe' after dead revision 1\.2\.
28240 $SPROG add: use \`$SPROG commit' to add this file permanently"
28241 dotest recase-2si
"$testcvs -q ci -mrecase" \
28242 "$CVSROOT_DIRNAME/first-dir/FiLe,v <-- FiLe
28243 new revision: 1\.3; previous revision: 1\.2"
28246 # Now verify that a checkout will still work
28249 dotest recase-3
"$testcvs -q co first-dir" \
28253 # Prove that we can still get status and log information on
28254 # conflicting case files (1 in Attic, one in parent).
28256 if $client_sensitive; then
28259 else # client insensitive
28260 # Because FiLe is present on a case insensitive client, it is the
28261 # only one ever found and queried or altered.
28269 if $server_sensitive; then
28270 if $client_sensitive; then
28271 # Client finds Entry only for FiLe. Others returned by server.
28272 dotest recase-4sscs
"$testcvs status file" \
28273 "===================================================================
28274 File: no file file Status: Up-to-date
28276 Working revision: No entry for file
28277 Repository revision: 1\.2 $CVSROOT_DIRNAME/first-dir/Attic/file,v
28278 Commit Identifier: ${commitid}"
28279 dotest recase-5sscs
"$testcvs log file" \
28281 RCS file: $CVSROOT_DIRNAME/first-dir/Attic/file,v
28289 keyword substitution: kv
28290 total revisions: 2; selected revisions: 2
28292 ----------------------------
28294 date: ${ISO8601DATE}; author: $username; state: dead; lines: +0 -0; commitid: ${commitid};
28296 ----------------------------
28298 date: ${ISO8601DATE}; author: $username; state: Exp; commitid: ${commitid};
28300 ============================================================================="
28301 dotest recase-6sscs
"$testcvs status FiLe" \
28302 "===================================================================
28303 File: FiLe Status: Up-to-date
28305 Working revision: 1\.1.*
28306 Repository revision: 1\.1 $CVSROOT_DIRNAME/first-dir/FiLe,v
28307 Commit Identifier: ${commitid}
28309 Sticky Date: (none)
28310 Sticky Options: (none)"
28311 dotest recase-7sscs
"$testcvs log FiLe" \
28313 RCS file: $CVSROOT_DIRNAME/first-dir/FiLe,v
28320 keyword substitution: kv
28321 total revisions: 1; selected revisions: 1
28323 ----------------------------
28325 date: ${ISO8601DATE}; author: $username; state: Exp; commitid: ${commitid};
28327 ============================================================================="
28328 else # server sensitive && client insensitive
28329 # Client finds same Entry for file & FiLe.
28330 dotest recase-4ssci
"$testcvs status file" \
28331 "===================================================================
28332 File: FiLe Status: Up-to-date
28334 Working revision: 1\.1.*
28335 Repository revision: 1\.1 $CVSROOT_DIRNAME/first-dir/FiLe,v
28336 Commit Identifier: ${commitid}
28338 Sticky Date: (none)
28339 Sticky Options: (none)"
28340 dotest recase-5ssci
"$testcvs log file" \
28342 RCS file: $CVSROOT_DIRNAME/first-dir/FiLe,v
28349 keyword substitution: kv
28350 total revisions: 1; selected revisions: 1
28352 ----------------------------
28354 date: ${ISO8601DATE}; author: $username; state: Exp; commitid: ${commitid};
28356 ============================================================================="
28357 dotest recase-6ss
"$testcvs status FiLe" \
28358 "===================================================================
28359 File: FiLe Status: Up-to-date
28361 Working revision: 1\.1.*
28362 Repository revision: 1\.1 $CVSROOT_DIRNAME/first-dir/FiLe,v
28363 Commit Identifier: ${commitid}
28365 Sticky Date: (none)
28366 Sticky Options: (none)"
28367 dotest recase-7ss
"$testcvs log FiLe" \
28369 RCS file: $CVSROOT_DIRNAME/first-dir/FiLe,v
28376 keyword substitution: kv
28377 total revisions: 1; selected revisions: 1
28379 ----------------------------
28381 date: ${ISO8601DATE}; author: $username; state: Exp; commitid: ${commitid};
28383 ============================================================================="
28385 else # server insensitive
28386 # There is only one archive when the server is insensitive, but the
28387 # printed file/archive name can vary.
28388 dotest recase-4si
"$testcvs status file" \
28389 "===================================================================
28390 File: $file Status: Up-to-date
28392 Working revision: 1\.3.*
28393 Repository revision: 1\.3 $CVSROOT_DIRNAME/first-dir/$file,v
28394 Commit Identifier: ${commitid}
28396 Sticky Date: (none)
28397 Sticky Options: (none)"
28398 dotest recase-5si
"$testcvs log file" \
28400 RCS file: $CVSROOT_DIRNAME/first-dir/$file,v
28401 Working file: $file
28408 keyword substitution: kv
28409 total revisions: 3; selected revisions: 3
28411 ----------------------------
28413 date: ${ISO8601DATE}; author: $username; state: Exp; lines: +1 -1; commitid: ${commitid};
28415 ----------------------------
28417 date: ${ISO8601DATE}; author: $username; state: dead; lines: +0 -0; commitid: ${commitid};
28419 ----------------------------
28421 date: ${ISO8601DATE}; author: $username; state: Exp; commitid: ${commitid};
28423 ============================================================================="
28424 dotest recase-6si
"$testcvs status FiLe" \
28425 "===================================================================
28426 File: FiLe Status: Up-to-date
28428 Working revision: 1\.3.*
28429 Repository revision: 1\.3 $CVSROOT_DIRNAME/first-dir/FiLe,v
28430 Commit Identifier: ${commitid}
28432 Sticky Date: (none)
28433 Sticky Options: (none)"
28434 dotest recase-7si
"$testcvs log FiLe" \
28436 RCS file: $CVSROOT_DIRNAME/first-dir/FiLe,v
28444 keyword substitution: kv
28445 total revisions: 3; selected revisions: 3
28447 ----------------------------
28449 date: ${ISO8601DATE}; author: $username; state: Exp; lines: +1 -1; commitid: ${commitid};
28451 ----------------------------
28453 date: ${ISO8601DATE}; author: $username; state: dead; lines: +0 -0; commitid: ${commitid};
28455 ----------------------------
28457 date: ${ISO8601DATE}; author: $username; state: Exp; commitid: ${commitid};
28459 ============================================================================="
28462 # And when the file does not exist on the client, we go with the
28463 # client Entries match.
28464 if $client_sensitive && $server_sensitive; then
28465 dotest recase-8sscs
"$testcvs status fIlE" \
28466 "$SPROG status: nothing known about \`fIlE'
28467 ===================================================================
28468 File: no file fIlE Status: Unknown
28470 Working revision: No entry for fIlE
28471 Repository revision: No revision control file"
28472 else # !$client_sensitive || !$server_sensitive
28473 dotest recase-8anyi
"$testcvs status fIlE" \
28474 "===================================================================
28475 File: $fIlE Status: Up-to-date
28477 Working revision: 1\.[0-9]*.*
28478 Repository revision: 1\.[0-9]* $CVSROOT_DIRNAME/first-dir/$fIlE,v
28479 Commit Identifier: ${commitid}
28481 Sticky Date: (none)
28482 Sticky Options: (none)"
28486 if $server_sensitive; then
28487 dotest recase-9ss
"$testcvs -q up -rfirst" \
28488 "$SPROG update: \`FiLe' is no longer in the repository
28491 if $client_sensitive; then
28492 dotest recase-10sscs
"$testcvs -q up -A" \
28494 $SPROG update: \`file' is no longer in the repository"
28495 else # client insensitive
28496 # FIXCVS: This should remove the offending file first.
28497 dotest_fail recase-10ssci
"$testcvs -q up -A" \
28498 "$SPROG update: move away \`\./FiLe'; it is in the way
28500 $SPROG update: \`file' is no longer in the repository"
28504 dotest recase-11ssci
"$testcvs -q co first-dir" \
28510 # See what happens when cased names clash.
28514 if test -n "$remotehost"; then
28515 modify_repo
$CVS_RSH $remotehost \
28516 "cp $CVSROOT_DIRNAME/first-dir/FiLe,v \
28517 $CVSROOT_DIRNAME/first-dir/FILE,v"
28519 modify_repo
cp $CVSROOT_DIRNAME/first-dir
/FiLe
,v \
28520 $CVSROOT_DIRNAME/first-dir
/FILE
,v
28523 if $client_sensitive; then
28524 dotest recase-12sscs
"$testcvs -q up" "U FILE"
28525 else # client insensitive
28526 dotest_fail recase-12ssci
"$testcvs -q up" \
28527 "$SPROG update: move away \`\./FILE'; it is in the way
28530 else # server insensitive
28531 dotest recase-9si
"$testcvs -q up -rfirst" "U FiLe"
28532 dotest recase-10si
"$testcvs -q up -A" "U FiLe"
28535 # Prove that we can still get status and log information on
28536 # conflicting case files (1 in Attic, two in parent).
28537 if $server_sensitive; then
28538 if $client_sensitive; then
28539 # Client finds Entry only for FiLe. Others returned by server.
28540 dotest recase-13sscs
"$testcvs status file" \
28541 "===================================================================
28542 File: no file file Status: Up-to-date
28544 Working revision: No entry for file
28545 Repository revision: 1\.2 $CVSROOT_DIRNAME/first-dir/Attic/file,v
28546 Commit Identifier: ${commitid}"
28547 dotest recase-14sscs
"$testcvs log file" \
28549 RCS file: $CVSROOT_DIRNAME/first-dir/Attic/file,v
28557 keyword substitution: kv
28558 total revisions: 2; selected revisions: 2
28560 ----------------------------
28562 date: ${ISO8601DATE}; author: $username; state: dead; lines: +0 -0; commitid: ${commitid};
28564 ----------------------------
28566 date: ${ISO8601DATE}; author: $username; state: Exp; commitid: ${commitid};
28568 ============================================================================="
28569 dotest recase-15sscs
"$testcvs status FiLe" \
28570 "===================================================================
28571 File: FiLe Status: Up-to-date
28573 Working revision: 1\.1.*
28574 Repository revision: 1\.1 $CVSROOT_DIRNAME/first-dir/FiLe,v
28575 Commit Identifier: ${commitid}
28577 Sticky Date: (none)
28578 Sticky Options: (none)"
28579 dotest recase-16sscs
"$testcvs log FiLe" \
28581 RCS file: $CVSROOT_DIRNAME/first-dir/FiLe,v
28588 keyword substitution: kv
28589 total revisions: 1; selected revisions: 1
28591 ----------------------------
28593 date: ${ISO8601DATE}; author: $username; state: Exp; commitid: ${commitid};
28595 ============================================================================="
28596 dotest recase-17sscs
"$testcvs status FILE" \
28597 "===================================================================
28598 File: FILE Status: Up-to-date
28600 Working revision: 1.1.*
28601 Repository revision: 1.1 ${CVSROOT_DIRNAME}/first-dir/FILE,v
28602 Commit Identifier: ${commitid}
28604 Sticky Date: (none)
28605 Sticky Options: (none)"
28606 dotest recase-18sscs
"$testcvs log FILE" \
28608 RCS file: $CVSROOT_DIRNAME/first-dir/FILE,v
28615 keyword substitution: kv
28616 total revisions: 1; selected revisions: 1
28618 ----------------------------
28620 date: ${ISO8601DATE}; author: $username; state: Exp; commitid: ${commitid};
28622 ============================================================================="
28623 else # $server_sensitive && !$client_sensitive
28624 # Client finds same Entry for file & FiLe.
28625 dotest recase-13ssci
"$testcvs status file" \
28626 "===================================================================
28627 File: FiLe Status: Up-to-date
28629 Working revision: 1\.1.*
28630 Repository revision: 1\.1 $CVSROOT_DIRNAME/first-dir/FiLe,v
28631 Commit Identifier: ${commitid}
28633 Sticky Date: (none)
28634 Sticky Options: (none)"
28635 dotest recase-16ssci
"$testcvs log FiLe" \
28637 RCS file: $CVSROOT_DIRNAME/first-dir/FiLe,v
28644 keyword substitution: kv
28645 total revisions: 1; selected revisions: 1
28647 ----------------------------
28649 date: ${ISO8601DATE}; author: $username; state: Exp; commitid: ${commitid};
28651 ============================================================================="
28652 dotest recase-17ssci
"$testcvs status FILE" \
28653 "===================================================================
28654 File: FiLe Status: Up-to-date
28656 Working revision: 1\.1.*
28657 Repository revision: 1\.1 $CVSROOT_DIRNAME/first-dir/FiLe,v
28658 Commit Identifier: ${commitid}
28660 Sticky Date: (none)
28661 Sticky Options: (none)"
28662 dotest recase-18ssci
"$testcvs log FILE" \
28664 RCS file: $CVSROOT_DIRNAME/first-dir/FiLe,v
28671 keyword substitution: kv
28672 total revisions: 1; selected revisions: 1
28674 ----------------------------
28676 date: ${ISO8601DATE}; author: $username; state: Exp; commitid: ${commitid};
28678 ============================================================================="
28680 else # !$server_sensitive
28681 # Skip these when the server is case insensitive - nothing
28682 # has changed since recase-[4-7]si
28686 if $client_sensitive && $server_sensitive; then
28687 dotest recase-19sscs
"$testcvs status fIlE" \
28688 "$SPROG status: nothing known about \`fIlE'
28689 ===================================================================
28690 File: no file fIlE Status: Unknown
28692 Working revision: No entry for fIlE
28693 Repository revision: No revision control file"
28694 else # !$client_sensitive || !$server_sensitive
28695 dotest recase-19anyi
"$testcvs status fIlE" \
28696 "===================================================================
28697 File: $fIlE Status: Up-to-date
28699 Working revision: 1\.[0-9]*.*
28700 Repository revision: 1\.[0-9]* $CVSROOT_DIRNAME/first-dir/$fIlE,v
28701 Commit Identifier: ${commitid}
28703 Sticky Date: (none)
28704 Sticky Options: (none)"
28707 # And last but not least, prove that a checkout is still possible.
28710 if $server_sensitive; then
28711 if $client_sensitive; then
28712 dotest recase-20sscs
"$testcvs -q co first-dir" \
28715 else # $server_senstive && !$client_sensitive
28716 dotest_fail recase-20ssci
"$testcvs -q co first-dir" \
28718 $SPROG checkout: move away \`first-dir/FiLe'; it is in the way
28721 else # !$server_sensitive
28722 # Skip these since nothing has changed.
28729 if $server_sensitive && test -n "$remotehost"; then
28730 # It is necessary to remove one of the case-conflicted files before
28731 # recursively removing the rest under Cygwin on a Samba share or
28732 # Samba returns a permission denied error due to its case
28734 $CVS_RSH $remotehost "rm -f $CVSROOT_DIRNAME/first-dir/FILE,v"
28736 modify_repo
rm -rf $CVSROOT_DIRNAME/first-dir
28743 # set up two repositories
28751 CVSROOT1_DIRNAME
=${TESTDIR}/root
.1
28752 CVSROOT2_DIRNAME
=${TESTDIR}/root
.2
28753 CVSROOT1
=`newroot $CVSROOT1_DIRNAME`
28754 CVSROOT2
=`newroot $CVSROOT2_DIRNAME`
28755 testcvs1
="$testcvs -d '$CVSROOT1'"
28756 testcvs2
="$testcvs -d '$CVSROOT2'"
28758 dotest multiroot-setup-1
"mkdir $CVSROOT1_DIRNAME $CVSROOT2_DIRNAME"
28759 dotest multiroot-setup-2
"$testcvs1 init"
28760 dotest multiroot-setup-3
"$testcvs2 init"
28763 # create some directories in ${CVSROOT1_DIRNAME}
28766 dotest multiroot-setup-4
"${testcvs1} co -l ." "${SPROG} checkout: Updating ."
28767 mkdir mod1-1 mod1-2
28768 dotest multiroot-setup-5
"${testcvs1} add mod1-1 mod1-2" \
28769 "Directory ${CVSROOT1_DIRNAME}/mod1-1 added to the repository
28770 Directory ${CVSROOT1_DIRNAME}/mod1-2 added to the repository"
28771 echo file1-1
> mod1-
1/file1-1
28772 echo file1-2
> mod1-
2/file1-2
28773 dotest multiroot-setup-6
"${testcvs1} add mod1-1/file1-1 mod1-2/file1-2" \
28774 "${SPROG} add: scheduling file .mod1-1/file1-1. for addition
28775 ${SPROG} add: scheduling file .mod1-2/file1-2. for addition
28776 ${SPROG} add: use \`${SPROG} commit' to add these files permanently"
28777 dotest multiroot-setup-7
"${testcvs1} commit -m is" \
28778 "${CPROG} commit: Examining \.
28779 ${CPROG} commit: Examining mod1-1
28780 ${CPROG} commit: Examining mod1-2
28781 ${CVSROOT1_DIRNAME}/mod1-1/file1-1,v <-- mod1-1/file1-1
28782 initial revision: 1.1
28783 ${CVSROOT1_DIRNAME}/mod1-2/file1-2,v <-- mod1-2/file1-2
28784 initial revision: 1.1"
28789 # create some directories in ${CVSROOT2_DIRNAME}
28792 dotest multiroot-setup-8
"${testcvs2} co -l ." "${SPROG} checkout: Updating ."
28793 mkdir mod2-1 mod2-2
28794 dotest multiroot-setup-9
"${testcvs2} add mod2-1 mod2-2" \
28795 "Directory ${CVSROOT2_DIRNAME}/mod2-1 added to the repository
28796 Directory ${CVSROOT2_DIRNAME}/mod2-2 added to the repository"
28797 echo file2-1
> mod2-
1/file2-1
28798 echo file2-2
> mod2-
2/file2-2
28799 dotest multiroot-setup-6
"${testcvs2} add mod2-1/file2-1 mod2-2/file2-2" \
28800 "${SPROG} add: scheduling file .mod2-1/file2-1. for addition
28801 ${SPROG} add: scheduling file .mod2-2/file2-2. for addition
28802 ${SPROG} add: use \`${SPROG} commit' to add these files permanently"
28803 dotest multiroot-setup-10
"${testcvs2} commit -m anyone" \
28804 "${CPROG} commit: Examining \.
28805 ${CPROG} commit: Examining mod2-1
28806 ${CPROG} commit: Examining mod2-2
28807 ${CVSROOT2_DIRNAME}/mod2-1/file2-1,v <-- mod2-1/file2-1
28808 initial revision: 1.1
28809 ${CVSROOT2_DIRNAME}/mod2-2/file2-2,v <-- mod2-2/file2-2
28810 initial revision: 1.1"
28814 # check out a few directories, from simple/shallow to
28818 # OK, this case is kind of weird. If we just run things from
28819 # here, without CVS/Root, then CVS will contact the server
28820 # mentioned in CVSROOT (which is irrelevant) which will print
28821 # some messages. Our workaround is to make sure we have a
28822 # CVS/Root file at top level. In the future, it is possible
28823 # the best behavior will be to extend the existing behavior
28824 # ("being called from a directory without CVS administration
28825 # has always meant to process each of the sub-dirs") to also
28826 # do that if there is no CVSROOT, CVS/Root, or -d at top level.
28828 # The local case could stumble through the tests without creating
28829 # the top-level CVS/Root, but we create it for local and for
28830 # remote to reduce special cases later in the test.
28831 dotest multiroot-workaround
"${testcvs1} -q co -l ." ""
28833 dotest multiroot-setup-11
"${testcvs1} co mod1-1 mod1-2" \
28834 "${SPROG} checkout: Updating mod1-1
28836 ${SPROG} checkout: Updating mod1-2
28838 dotest multiroot-setup-12
"${testcvs2} co mod2-1 mod2-2" \
28839 "${SPROG} checkout: Updating mod2-1
28841 ${SPROG} checkout: Updating mod2-2
28844 dotest multiroot-setup-13
"${testcvs2} co mod2-2" \
28845 "${SPROG} checkout: Updating mod2-2
28849 dotest multiroot-setup-14
"${testcvs1} co mod1-2" \
28850 "${SPROG} checkout: Updating mod1-2
28855 # Make sure that the Root and Repository files contain the
28856 # correct information.
28858 dotest multiroot-cvsadm-1a
"cat mod1-1/CVS/Root" "${CVSROOT1}"
28859 dotest multiroot-cvsadm-1b
"cat mod1-1/CVS/Repository" "mod1-1"
28860 dotest multiroot-cvsadm-2a
"cat mod2-1/CVS/Root" "${CVSROOT2}"
28861 dotest multiroot-cvsadm-2b
"cat mod2-1/CVS/Repository" "mod2-1"
28862 dotest multiroot-cvsadm-3a
"cat mod1-2/CVS/Root" "${CVSROOT1}"
28863 dotest multiroot-cvsadm-3b
"cat mod1-2/CVS/Repository" "mod1-2"
28864 dotest multiroot-cvsadm-3c
"cat mod1-2/mod2-2/CVS/Root" "${CVSROOT2}"
28865 dotest multiroot-cvsadm-3d
"cat mod1-2/mod2-2/CVS/Repository" "mod2-2"
28866 dotest multiroot-cvsadm-4a
"cat mod2-2/CVS/Root" "${CVSROOT2}"
28867 dotest multiroot-cvsadm-4b
"cat mod2-2/CVS/Repository" "mod2-2"
28868 dotest multiroot-cvsadm-4c
"cat mod2-2/mod1-2/CVS/Root" "${CVSROOT1}"
28869 dotest multiroot-cvsadm-4d
"cat mod2-2/mod1-2/CVS/Repository" "mod1-2"
28872 # Start testing various cvs commands. Begin with commands
28873 # without extra arguments (e.g. "cvs update", "cvs diff",
28877 # Do at least one command with both CVSROOTs to make sure
28878 # that there's not some kind of unexpected dependency on the
28879 # choice of which CVSROOT is specified on the command line.
28881 dotest multiroot-update-1a
"${testcvs1} update" \
28882 "${SPROG} update: Updating \.
28883 ${SPROG} update: Updating mod1-1
28884 ${SPROG} update: Updating mod1-2
28885 ${SPROG} update: Updating mod1-2/mod2-2
28886 ${SPROG} update: cannot open directory ${CVSROOT1_DIRNAME}/mod2-2: No such file or directory
28887 ${SPROG} update: skipping directory mod1-2/mod2-2
28888 ${SPROG} update: Updating mod2-1
28889 ${SPROG} update: cannot open directory ${CVSROOT1_DIRNAME}/mod2-1: No such file or directory
28890 ${SPROG} update: skipping directory mod2-1
28891 ${SPROG} update: Updating mod2-2
28892 ${SPROG} update: cannot open directory ${CVSROOT1_DIRNAME}/mod2-2: No such file or directory
28893 ${SPROG} update: skipping directory mod2-2"
28895 # Same deal but with -d ${CVSROOT2}.
28896 dotest multiroot-update-1b
"${testcvs2} update" \
28897 "${SPROG} update: Updating \.
28898 ${SPROG} update: Updating mod1-1
28899 ${SPROG} update: cannot open directory ${CVSROOT2_DIRNAME}/mod1-1: No such file or directory
28900 ${SPROG} update: skipping directory mod1-1
28901 ${SPROG} update: Updating mod1-2
28902 ${SPROG} update: cannot open directory ${CVSROOT2_DIRNAME}/mod1-2: No such file or directory
28903 ${SPROG} update: skipping directory mod1-2
28904 ${SPROG} update: Updating mod2-1
28905 ${SPROG} update: Updating mod2-2
28906 ${SPROG} update: Updating mod2-2/mod1-2
28907 ${SPROG} update: cannot open directory ${CVSROOT2_DIRNAME}/mod1-2: No such file or directory
28908 ${SPROG} update: skipping directory mod2-2/mod1-2"
28910 # modify all files and do a diff
28912 echo bobby
>> mod1-
1/file1-1
28913 echo brown
>> mod1-
2/file1-2
28914 echo goes
>> mod2-
1/file2-1
28915 echo down
>> mod2-
2/file2-2
28917 dotest_fail multiroot-diff-1
"${testcvs} diff" \
28918 "${SPROG} diff: Diffing \.
28919 ${SPROG} diff: Diffing mod1-1
28920 Index: mod1-1/file1-1
28921 ===================================================================
28922 RCS file: ${CVSROOT1_DIRNAME}/mod1-1/file1-1,v
28923 retrieving revision 1\.1
28924 diff -r1\.1 file1-1
28927 ${SPROG} diff: Diffing mod1-2
28928 Index: mod1-2/file1-2
28929 ===================================================================
28930 RCS file: ${CVSROOT1_DIRNAME}/mod1-2/file1-2,v
28931 retrieving revision 1\.1
28932 diff -r1\.1 file1-2
28935 ${SPROG} diff: Diffing mod2-2/mod1-2
28936 ${SPROG} diff: Diffing mod1-2/mod2-2
28937 ${SPROG} diff: Diffing mod2-1
28938 Index: mod2-1/file2-1
28939 ===================================================================
28940 RCS file: ${CVSROOT2_DIRNAME}/mod2-1/file2-1,v
28941 retrieving revision 1\.1
28942 diff -r1\.1 file2-1
28945 ${SPROG} diff: Diffing mod2-2
28946 Index: mod2-2/file2-2
28947 ===================================================================
28948 RCS file: ${CVSROOT2_DIRNAME}/mod2-2/file2-2,v
28949 retrieving revision 1\.1
28950 diff -r1\.1 file2-2
28953 "${SPROG} diff: Diffing \.
28954 ${SPROG} diff: Diffing mod1-1
28955 Index: mod1-1/file1-1
28956 ===================================================================
28957 RCS file: ${CVSROOT1_DIRNAME}/mod1-1/file1-1,v
28958 retrieving revision 1\.1
28959 diff -r1\.1 file1-1
28962 ${SPROG} diff: Diffing mod1-2
28963 Index: mod1-2/file1-2
28964 ===================================================================
28965 RCS file: ${CVSROOT1_DIRNAME}/mod1-2/file1-2,v
28966 retrieving revision 1\.1
28967 diff -r1\.1 file1-2
28970 ${SPROG} diff: Diffing mod2-2
28971 ${SPROG} diff: Diffing mod2-2/mod1-2
28972 ${SPROG} diff: Diffing mod1-2
28973 ${SPROG} diff: Diffing mod1-2/mod2-2
28974 ${SPROG} diff: Diffing mod2-1
28975 Index: mod2-1/file2-1
28976 ===================================================================
28977 RCS file: ${CVSROOT2_DIRNAME}/mod2-1/file2-1,v
28978 retrieving revision 1\.1
28979 diff -r1\.1 file2-1
28982 ${SPROG} diff: Diffing mod2-2
28983 Index: mod2-2/file2-2
28984 ===================================================================
28985 RCS file: ${CVSROOT2_DIRNAME}/mod2-2/file2-2,v
28986 retrieving revision 1\.1
28987 diff -r1\.1 file2-2
28991 dotest multiroot-commit-1
"${testcvs} commit -m actually" \
28992 "${CPROG} commit: Examining \.
28993 ${CPROG} commit: Examining mod1-1
28994 ${CPROG} commit: Examining mod1-2
28995 ${CPROG} commit: Examining mod2-2/mod1-2
28996 ${CVSROOT1_DIRNAME}/mod1-1/file1-1,v <-- mod1-1/file1-1
28997 new revision: 1.2; previous revision: 1.1
28998 ${CVSROOT1_DIRNAME}/mod1-2/file1-2,v <-- mod1-2/file1-2
28999 new revision: 1.2; previous revision: 1.1
29000 ${CPROG} commit: Examining mod1-2/mod2-2
29001 ${CPROG} commit: Examining mod2-1
29002 ${CPROG} commit: Examining mod2-2
29003 ${CVSROOT2_DIRNAME}/mod2-1/file2-1,v <-- mod2-1/file2-1
29004 new revision: 1.2; previous revision: 1.1
29005 ${CVSROOT2_DIRNAME}/mod2-2/file2-2,v <-- mod2-2/file2-2
29006 new revision: 1.2; previous revision: 1.1"
29008 dotest multiroot-update-2
"${testcvs} update" \
29009 "${CPROG} update: Updating \.
29010 ${CPROG} update: Updating mod1-1
29011 ${CPROG} update: Updating mod1-2
29012 ${CPROG} update: Updating mod2-2/mod1-2
29013 U mod2-2/mod1-2/file1-2
29014 ${CPROG} update: Updating mod1-2/mod2-2
29015 U mod1-2/mod2-2/file2-2
29016 ${CPROG} update: Updating mod2-1
29017 ${CPROG} update: Updating mod2-2" \
29018 "${SPROG} update: Updating \.
29019 ${SPROG} update: Updating mod1-1
29020 ${SPROG} update: Updating mod1-2
29021 ${SPROG} update: Updating mod2-2
29022 ${SPROG} update: Updating mod2-2/mod1-2
29023 P mod2-2/mod1-2/file1-2
29024 ${SPROG} update: Updating mod1-2
29025 ${SPROG} update: Updating mod1-2/mod2-2
29026 P mod1-2/mod2-2/file2-2
29027 ${SPROG} update: Updating mod2-1
29028 ${SPROG} update: Updating mod2-2"
29030 dotest multiroot-tag-1
"${testcvs} tag cattle" \
29031 "${SPROG} tag: Tagging \.
29032 ${SPROG} tag: Tagging mod1-1
29034 ${SPROG} tag: Tagging mod1-2
29036 ${SPROG} tag: Tagging mod2-2/mod1-2
29037 ${SPROG} tag: Tagging mod1-2/mod2-2
29038 T mod1-2/mod2-2/file2-2
29039 ${SPROG} tag: Tagging mod2-1
29041 ${SPROG} tag: Tagging mod2-2" \
29042 "${SPROG} tag: Tagging \.
29043 ${SPROG} tag: Tagging mod1-1
29045 ${SPROG} tag: Tagging mod1-2
29047 ${SPROG} tag: Tagging mod2-2
29048 ${SPROG} tag: Tagging mod2-2/mod1-2
29049 ${SPROG} tag: Tagging mod1-2
29050 ${SPROG} tag: Tagging mod1-2/mod2-2
29051 T mod1-2/mod2-2/file2-2
29052 ${SPROG} tag: Tagging mod2-1
29054 ${SPROG} tag: Tagging mod2-2"
29056 echo anotherfile1-1
> mod1-
1/anotherfile1-1
29057 echo anotherfile2-1
> mod2-
1/anotherfile2-1
29058 echo anotherfile1-2
> mod2-
2/mod1-
2/anotherfile1-2
29059 echo anotherfile2-2
> mod1-
2/mod2-
2/anotherfile2-2
29063 dotest multiroot-add-1ar
"${testcvs} add anotherfile1-1" \
29064 "${SPROG} add: scheduling file .anotherfile1-1. for addition
29065 ${SPROG} add: use .${SPROG} commit. to add this file permanently"
29067 dotest multiroot-add-1br
"${testcvs} add anotherfile2-1" \
29068 "${SPROG} add: scheduling file .anotherfile2-1. for addition
29069 ${SPROG} add: use .${SPROG} commit. to add this file permanently"
29070 cd ..
/mod2-
2/mod1-2
29071 dotest multiroot-add-1cr
"${testcvs} add anotherfile1-2" \
29072 "${SPROG} add: scheduling file .anotherfile1-2. for addition
29073 ${SPROG} add: use .${SPROG} commit. to add this file permanently"
29074 cd ..
/..
/mod1-
2/mod2-2
29075 dotest multiroot-add-1dr
"${testcvs} add anotherfile2-2" \
29076 "${SPROG} add: scheduling file .anotherfile2-2. for addition
29077 ${SPROG} add: use .${SPROG} commit. to add this file permanently"
29080 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" \
29081 "${SPROG} add: scheduling file .mod1-1/anotherfile1-1. for addition
29082 ${SPROG} add: scheduling file .mod2-1/anotherfile2-1. for addition
29083 ${SPROG} add: scheduling file .mod2-2/mod1-2/anotherfile1-2. for addition
29084 ${SPROG} add: scheduling file .mod1-2/mod2-2/anotherfile2-2. for addition
29085 ${SPROG} add: use .${SPROG} commit. to add these files permanently"
29088 dotest multiroot-status-1
"${testcvs} status -v" \
29089 "${SPROG} status: Examining \.
29090 ${SPROG} status: Examining mod1-1
29091 ===================================================================
29092 File: anotherfile1-1 Status: Locally Added
29094 Working revision: New file!
29095 Repository revision: No revision control file
29097 Sticky Date: (none)
29098 Sticky Options: (none)
29100 ===================================================================
29101 File: file1-1 Status: Up-to-date
29103 Working revision: 1\.2.*
29104 Repository revision: 1\.2 ${CVSROOT1_DIRNAME}/mod1-1/file1-1,v
29105 Commit Identifier: ${commitid}
29107 Sticky Date: (none)
29108 Sticky Options: (none)
29111 cattle (revision: 1\.2)
29113 ${SPROG} status: Examining mod1-2
29114 ===================================================================
29115 File: file1-2 Status: Up-to-date
29117 Working revision: 1\.2.*
29118 Repository revision: 1\.2 ${CVSROOT1_DIRNAME}/mod1-2/file1-2,v
29119 Commit Identifier: ${commitid}
29121 Sticky Date: (none)
29122 Sticky Options: (none)
29125 cattle (revision: 1\.2)
29127 ${SPROG} status: Examining mod2-2/mod1-2
29128 ===================================================================
29129 File: anotherfile1-2 Status: Locally Added
29131 Working revision: New file!
29132 Repository revision: No revision control file
29134 Sticky Date: (none)
29135 Sticky Options: (none)
29137 ===================================================================
29138 File: file1-2 Status: Up-to-date
29140 Working revision: 1\.2.*
29141 Repository revision: 1\.2 ${CVSROOT1_DIRNAME}/mod1-2/file1-2,v
29142 Commit Identifier: ${commitid}
29144 Sticky Date: (none)
29145 Sticky Options: (none)
29148 cattle (revision: 1\.2)
29150 ${SPROG} status: Examining mod1-2/mod2-2
29151 ===================================================================
29152 File: anotherfile2-2 Status: Locally Added
29154 Working revision: New file!
29155 Repository revision: No revision control file
29157 Sticky Date: (none)
29158 Sticky Options: (none)
29160 ===================================================================
29161 File: file2-2 Status: Up-to-date
29163 Working revision: 1\.2.*
29164 Repository revision: 1\.2 ${CVSROOT2_DIRNAME}/mod2-2/file2-2,v
29165 Commit Identifier: ${commitid}
29167 Sticky Date: (none)
29168 Sticky Options: (none)
29171 cattle (revision: 1\.2)
29173 ${SPROG} status: Examining mod2-1
29174 ===================================================================
29175 File: anotherfile2-1 Status: Locally Added
29177 Working revision: New file!
29178 Repository revision: No revision control file
29180 Sticky Date: (none)
29181 Sticky Options: (none)
29183 ===================================================================
29184 File: file2-1 Status: Up-to-date
29186 Working revision: 1\.2.*
29187 Repository revision: 1\.2 ${CVSROOT2_DIRNAME}/mod2-1/file2-1,v
29188 Commit Identifier: ${commitid}
29190 Sticky Date: (none)
29191 Sticky Options: (none)
29194 cattle (revision: 1\.2)
29196 ${SPROG} status: Examining mod2-2
29197 ===================================================================
29198 File: file2-2 Status: Up-to-date
29200 Working revision: 1\.2.*
29201 Repository revision: 1\.2 ${CVSROOT2_DIRNAME}/mod2-2/file2-2,v
29202 Commit Identifier: ${commitid}
29204 Sticky Date: (none)
29205 Sticky Options: (none)
29208 cattle (revision: 1\.2)" \
29209 "${SPROG} status: Examining \.
29210 ${SPROG} status: Examining mod1-1
29211 ===================================================================
29212 File: anotherfile1-1 Status: Locally Added
29214 Working revision: New file!
29215 Repository revision: No revision control file
29217 Sticky Date: (none)
29218 Sticky Options: (none)
29220 ===================================================================
29221 File: file1-1 Status: Up-to-date
29223 Working revision: 1\.2.*
29224 Repository revision: 1\.2 ${CVSROOT1_DIRNAME}/mod1-1/file1-1,v
29225 Commit Identifier: ${commitid}
29227 Sticky Date: (none)
29228 Sticky Options: (none)
29231 cattle (revision: 1\.2)
29233 ${SPROG} status: Examining mod1-2
29234 ===================================================================
29235 File: file1-2 Status: Up-to-date
29237 Working revision: 1\.2.*
29238 Repository revision: 1\.2 ${CVSROOT1_DIRNAME}/mod1-2/file1-2,v
29239 Commit Identifier: ${commitid}
29241 Sticky Date: (none)
29242 Sticky Options: (none)
29245 cattle (revision: 1\.2)
29247 ${SPROG} status: Examining mod2-2
29248 ${SPROG} status: Examining mod2-2/mod1-2
29249 ===================================================================
29250 File: anotherfile1-2 Status: Locally Added
29252 Working revision: New file!
29253 Repository revision: No revision control file
29255 Sticky Date: (none)
29256 Sticky Options: (none)
29258 ===================================================================
29259 File: file1-2 Status: Up-to-date
29261 Working revision: 1\.2.*
29262 Repository revision: 1\.2 ${CVSROOT1_DIRNAME}/mod1-2/file1-2,v
29263 Commit Identifier: ${commitid}
29265 Sticky Date: (none)
29266 Sticky Options: (none)
29269 cattle (revision: 1\.2)
29271 ${SPROG} status: Examining mod1-2
29272 ${SPROG} status: Examining mod1-2/mod2-2
29273 ===================================================================
29274 File: anotherfile2-2 Status: Locally Added
29276 Working revision: New file!
29277 Repository revision: No revision control file
29279 Sticky Date: (none)
29280 Sticky Options: (none)
29282 ===================================================================
29283 File: file2-2 Status: Up-to-date
29285 Working revision: 1\.2.*
29286 Repository revision: 1\.2 ${CVSROOT2_DIRNAME}/mod2-2/file2-2,v
29287 Commit Identifier: ${commitid}
29289 Sticky Date: (none)
29290 Sticky Options: (none)
29293 cattle (revision: 1\.2)
29295 ${SPROG} status: Examining mod2-1
29296 ===================================================================
29297 File: anotherfile2-1 Status: Locally Added
29299 Working revision: New file!
29300 Repository revision: No revision control file
29302 Sticky Date: (none)
29303 Sticky Options: (none)
29305 ===================================================================
29306 File: file2-1 Status: Up-to-date
29308 Working revision: 1\.2.*
29309 Repository revision: 1\.2 ${CVSROOT2_DIRNAME}/mod2-1/file2-1,v
29310 Commit Identifier: ${commitid}
29312 Sticky Date: (none)
29313 Sticky Options: (none)
29316 cattle (revision: 1\.2)
29318 ${SPROG} status: Examining mod2-2
29319 ===================================================================
29320 File: file2-2 Status: Up-to-date
29322 Working revision: 1\.2.*
29323 Repository revision: 1\.2 ${CVSROOT2_DIRNAME}/mod2-2/file2-2,v
29324 Commit Identifier: ${commitid}
29326 Sticky Date: (none)
29327 Sticky Options: (none)
29330 cattle (revision: 1\.2)"
29332 dotest multiroot-commit-2
"${testcvs} commit -m reading" \
29333 "${CPROG} commit: Examining \.
29334 ${CPROG} commit: Examining mod1-1
29335 ${CPROG} commit: Examining mod1-2
29336 ${CPROG} commit: Examining mod2-2/mod1-2
29337 ${CVSROOT1_DIRNAME}/mod1-1/anotherfile1-1,v <-- mod1-1/anotherfile1-1
29338 initial revision: 1\.1
29339 ${CVSROOT1_DIRNAME}/mod1-2/anotherfile1-2,v <-- mod2-2/mod1-2/anotherfile1-2
29340 initial revision: 1\.1
29341 ${CPROG} commit: Examining mod1-2/mod2-2
29342 ${CPROG} commit: Examining mod2-1
29343 ${CPROG} commit: Examining mod2-2
29344 ${CVSROOT2_DIRNAME}/mod2-2/anotherfile2-2,v <-- mod1-2/mod2-2/anotherfile2-2
29345 initial revision: 1\.1
29346 ${CVSROOT2_DIRNAME}/mod2-1/anotherfile2-1,v <-- mod2-1/anotherfile2-1
29347 initial revision: 1\.1"
29349 dotest multiroot-update-3
"${testcvs} update" \
29350 "${CPROG} update: Updating \.
29351 ${CPROG} update: Updating mod1-1
29352 ${CPROG} update: Updating mod1-2
29353 U mod1-2/anotherfile1-2
29354 ${CPROG} update: Updating mod2-2/mod1-2
29355 ${CPROG} update: Updating mod1-2/mod2-2
29356 ${CPROG} update: Updating mod2-1
29357 ${CPROG} update: Updating mod2-2
29358 U mod2-2/anotherfile2-2" \
29359 "${SPROG} update: Updating \.
29360 ${SPROG} update: Updating mod1-1
29361 ${SPROG} update: Updating mod1-2
29362 U mod1-2/anotherfile1-2
29363 ${SPROG} update: Updating mod2-2
29364 ${SPROG} update: Updating mod2-2/mod1-2
29365 ${SPROG} update: Updating mod1-2
29366 ${SPROG} update: Updating mod1-2/mod2-2
29367 ${SPROG} update: Updating mod2-1
29368 ${SPROG} update: Updating mod2-2
29369 U mod2-2/anotherfile2-2"
29371 dotest multiroot-log-1
"${testcvs} log" \
29372 "${SPROG} log: Logging \.
29373 ${SPROG} log: Logging mod1-1
29375 RCS file: ${CVSROOT1_DIRNAME}/mod1-1/anotherfile1-1,v
29376 Working file: mod1-1/anotherfile1-1
29382 keyword substitution: kv
29383 total revisions: 1; selected revisions: 1
29385 ----------------------------
29387 date: ${ISO8601DATE}; author: ${username}; state: Exp; commitid: ${commitid};
29389 =============================================================================
29391 RCS file: ${CVSROOT1_DIRNAME}/mod1-1/file1-1,v
29392 Working file: mod1-1/file1-1
29399 keyword substitution: kv
29400 total revisions: 2; selected revisions: 2
29402 ----------------------------
29404 date: ${ISO8601DATE}; author: ${username}; state: Exp; lines: ${PLUS}1 -0; commitid: ${commitid};
29406 ----------------------------
29408 date: ${ISO8601DATE}; author: ${username}; state: Exp; commitid: ${commitid};
29410 =============================================================================
29411 ${SPROG} log: Logging mod1-2
29413 RCS file: ${CVSROOT1_DIRNAME}/mod1-2/anotherfile1-2,v
29414 Working file: mod1-2/anotherfile1-2
29420 keyword substitution: kv
29421 total revisions: 1; selected revisions: 1
29423 ----------------------------
29425 date: ${ISO8601DATE}; author: ${username}; state: Exp; commitid: ${commitid};
29427 =============================================================================
29429 RCS file: ${CVSROOT1_DIRNAME}/mod1-2/file1-2,v
29430 Working file: mod1-2/file1-2
29437 keyword substitution: kv
29438 total revisions: 2; selected revisions: 2
29440 ----------------------------
29442 date: ${ISO8601DATE}; author: ${username}; state: Exp; lines: ${PLUS}1 -0; commitid: ${commitid};
29444 ----------------------------
29446 date: ${ISO8601DATE}; author: ${username}; state: Exp; commitid: ${commitid};
29448 =============================================================================
29449 ${SPROG} log: Logging mod2-2/mod1-2
29451 RCS file: ${CVSROOT1_DIRNAME}/mod1-2/anotherfile1-2,v
29452 Working file: mod2-2/mod1-2/anotherfile1-2
29458 keyword substitution: kv
29459 total revisions: 1; selected revisions: 1
29461 ----------------------------
29463 date: ${ISO8601DATE}; author: ${username}; state: Exp; commitid: ${commitid};
29465 =============================================================================
29467 RCS file: ${CVSROOT1_DIRNAME}/mod1-2/file1-2,v
29468 Working file: mod2-2/mod1-2/file1-2
29475 keyword substitution: kv
29476 total revisions: 2; selected revisions: 2
29478 ----------------------------
29480 date: ${ISO8601DATE}; author: ${username}; state: Exp; lines: ${PLUS}1 -0; commitid: ${commitid};
29482 ----------------------------
29484 date: ${ISO8601DATE}; author: ${username}; state: Exp; commitid: ${commitid};
29486 =============================================================================
29487 ${SPROG} log: Logging mod1-2/mod2-2
29489 RCS file: ${CVSROOT2_DIRNAME}/mod2-2/anotherfile2-2,v
29490 Working file: mod1-2/mod2-2/anotherfile2-2
29496 keyword substitution: kv
29497 total revisions: 1; selected revisions: 1
29499 ----------------------------
29501 date: ${ISO8601DATE}; author: ${username}; state: Exp; commitid: ${commitid};
29503 =============================================================================
29505 RCS file: ${CVSROOT2_DIRNAME}/mod2-2/file2-2,v
29506 Working file: mod1-2/mod2-2/file2-2
29513 keyword substitution: kv
29514 total revisions: 2; selected revisions: 2
29516 ----------------------------
29518 date: ${ISO8601DATE}; author: ${username}; state: Exp; lines: ${PLUS}1 -0; commitid: ${commitid};
29520 ----------------------------
29522 date: ${ISO8601DATE}; author: ${username}; state: Exp; commitid: ${commitid};
29524 =============================================================================
29525 ${SPROG} log: Logging mod2-1
29527 RCS file: ${CVSROOT2_DIRNAME}/mod2-1/anotherfile2-1,v
29528 Working file: mod2-1/anotherfile2-1
29534 keyword substitution: kv
29535 total revisions: 1; selected revisions: 1
29537 ----------------------------
29539 date: ${ISO8601DATE}; author: ${username}; state: Exp; commitid: ${commitid};
29541 =============================================================================
29543 RCS file: ${CVSROOT2_DIRNAME}/mod2-1/file2-1,v
29544 Working file: mod2-1/file2-1
29551 keyword substitution: kv
29552 total revisions: 2; selected revisions: 2
29554 ----------------------------
29556 date: ${ISO8601DATE}; author: ${username}; state: Exp; lines: ${PLUS}1 -0; commitid: ${commitid};
29558 ----------------------------
29560 date: ${ISO8601DATE}; author: ${username}; state: Exp; commitid: ${commitid};
29562 =============================================================================
29563 ${SPROG} log: Logging mod2-2
29565 RCS file: ${CVSROOT2_DIRNAME}/mod2-2/anotherfile2-2,v
29566 Working file: mod2-2/anotherfile2-2
29572 keyword substitution: kv
29573 total revisions: 1; selected revisions: 1
29575 ----------------------------
29577 date: ${ISO8601DATE}; author: ${username}; state: Exp; commitid: ${commitid};
29579 =============================================================================
29581 RCS file: ${CVSROOT2_DIRNAME}/mod2-2/file2-2,v
29582 Working file: mod2-2/file2-2
29589 keyword substitution: kv
29590 total revisions: 2; selected revisions: 2
29592 ----------------------------
29594 date: ${ISO8601DATE}; author: ${username}; state: Exp; lines: ${PLUS}1 -0; commitid: ${commitid};
29596 ----------------------------
29598 date: ${ISO8601DATE}; author: ${username}; state: Exp; commitid: ${commitid};
29600 =============================================================================" \
29601 "${SPROG} log: Logging \.
29602 ${SPROG} log: Logging mod1-1
29604 RCS file: ${CVSROOT1_DIRNAME}/mod1-1/anotherfile1-1,v
29605 Working file: mod1-1/anotherfile1-1
29611 keyword substitution: kv
29612 total revisions: 1; selected revisions: 1
29614 ----------------------------
29616 date: ${ISO8601DATE}; author: ${username}; state: Exp; commitid: ${commitid};
29618 =============================================================================
29620 RCS file: ${CVSROOT1_DIRNAME}/mod1-1/file1-1,v
29621 Working file: mod1-1/file1-1
29628 keyword substitution: kv
29629 total revisions: 2; selected revisions: 2
29631 ----------------------------
29633 date: ${ISO8601DATE}; author: ${username}; state: Exp; lines: ${PLUS}1 -0; commitid: ${commitid};
29635 ----------------------------
29637 date: ${ISO8601DATE}; author: ${username}; state: Exp; commitid: ${commitid};
29639 =============================================================================
29640 ${SPROG} log: Logging mod1-2
29642 RCS file: ${CVSROOT1_DIRNAME}/mod1-2/anotherfile1-2,v
29643 Working file: mod1-2/anotherfile1-2
29649 keyword substitution: kv
29650 total revisions: 1; selected revisions: 1
29652 ----------------------------
29654 date: ${ISO8601DATE}; author: ${username}; state: Exp; commitid: ${commitid};
29656 =============================================================================
29658 RCS file: ${CVSROOT1_DIRNAME}/mod1-2/file1-2,v
29659 Working file: mod1-2/file1-2
29666 keyword substitution: kv
29667 total revisions: 2; selected revisions: 2
29669 ----------------------------
29671 date: ${ISO8601DATE}; author: ${username}; state: Exp; lines: ${PLUS}1 -0; commitid: ${commitid};
29673 ----------------------------
29675 date: ${ISO8601DATE}; author: ${username}; state: Exp; commitid: ${commitid};
29677 =============================================================================
29678 ${SPROG} log: Logging mod2-2
29679 ${SPROG} log: Logging mod2-2/mod1-2
29681 RCS file: ${CVSROOT1_DIRNAME}/mod1-2/anotherfile1-2,v
29682 Working file: mod2-2/mod1-2/anotherfile1-2
29688 keyword substitution: kv
29689 total revisions: 1; selected revisions: 1
29691 ----------------------------
29693 date: ${ISO8601DATE}; author: ${username}; state: Exp; commitid: ${commitid};
29695 =============================================================================
29697 RCS file: ${CVSROOT1_DIRNAME}/mod1-2/file1-2,v
29698 Working file: mod2-2/mod1-2/file1-2
29705 keyword substitution: kv
29706 total revisions: 2; selected revisions: 2
29708 ----------------------------
29710 date: ${ISO8601DATE}; author: ${username}; state: Exp; lines: ${PLUS}1 -0; commitid: ${commitid};
29712 ----------------------------
29714 date: ${ISO8601DATE}; author: ${username}; state: Exp; commitid: ${commitid};
29716 =============================================================================
29717 ${SPROG} log: Logging mod1-2
29718 ${SPROG} log: Logging mod1-2/mod2-2
29720 RCS file: ${CVSROOT2_DIRNAME}/mod2-2/anotherfile2-2,v
29721 Working file: mod1-2/mod2-2/anotherfile2-2
29727 keyword substitution: kv
29728 total revisions: 1; selected revisions: 1
29730 ----------------------------
29732 date: ${ISO8601DATE}; author: ${username}; state: Exp; commitid: ${commitid};
29734 =============================================================================
29736 RCS file: ${CVSROOT2_DIRNAME}/mod2-2/file2-2,v
29737 Working file: mod1-2/mod2-2/file2-2
29744 keyword substitution: kv
29745 total revisions: 2; selected revisions: 2
29747 ----------------------------
29749 date: ${ISO8601DATE}; author: ${username}; state: Exp; lines: ${PLUS}1 -0; commitid: ${commitid};
29751 ----------------------------
29753 date: ${ISO8601DATE}; author: ${username}; state: Exp; commitid: ${commitid};
29755 =============================================================================
29756 ${SPROG} log: Logging mod2-1
29758 RCS file: ${CVSROOT2_DIRNAME}/mod2-1/anotherfile2-1,v
29759 Working file: mod2-1/anotherfile2-1
29765 keyword substitution: kv
29766 total revisions: 1; selected revisions: 1
29768 ----------------------------
29770 date: ${ISO8601DATE}; author: ${username}; state: Exp; commitid: ${commitid};
29772 =============================================================================
29774 RCS file: ${CVSROOT2_DIRNAME}/mod2-1/file2-1,v
29775 Working file: mod2-1/file2-1
29782 keyword substitution: kv
29783 total revisions: 2; selected revisions: 2
29785 ----------------------------
29787 date: ${ISO8601DATE}; author: ${username}; state: Exp; lines: ${PLUS}1 -0; commitid: ${commitid};
29789 ----------------------------
29791 date: ${ISO8601DATE}; author: ${username}; state: Exp; commitid: ${commitid};
29793 =============================================================================
29794 ${SPROG} log: Logging mod2-2
29796 RCS file: ${CVSROOT2_DIRNAME}/mod2-2/anotherfile2-2,v
29797 Working file: mod2-2/anotherfile2-2
29803 keyword substitution: kv
29804 total revisions: 1; selected revisions: 1
29806 ----------------------------
29808 date: ${ISO8601DATE}; author: ${username}; state: Exp; commitid: ${commitid};
29810 =============================================================================
29812 RCS file: ${CVSROOT2_DIRNAME}/mod2-2/file2-2,v
29813 Working file: mod2-2/file2-2
29820 keyword substitution: kv
29821 total revisions: 2; selected revisions: 2
29823 ----------------------------
29825 date: ${ISO8601DATE}; author: ${username}; state: Exp; lines: ${PLUS}1 -0; commitid: ${commitid};
29827 ----------------------------
29829 date: ${ISO8601DATE}; author: ${username}; state: Exp; commitid: ${commitid};
29831 ============================================================================="
29834 # After the simple cases, let's execute some commands which
29835 # refer to parts of our checked-out tree (e.g. "cvs update
29840 # clean up after ourselves
29844 # clean up our repositories
29845 rm -rf ${CVSROOT1_DIRNAME} ${CVSROOT2_DIRNAME}
29851 # More multiroot tests. In particular, nested directories.
29858 CVSROOT1_DIRNAME
=${TESTDIR}/root1
29859 CVSROOT2_DIRNAME
=${TESTDIR}/root2
29860 CVSROOT1
=`newroot $CVSROOT1_DIRNAME`
29861 CVSROOT2
=`newroot $CVSROOT2_DIRNAME`
29863 dotest multiroot2-1
"${testcvs} -d ${CVSROOT1} init" ""
29864 dotest multiroot2-2
"${testcvs} -d ${CVSROOT2} init" ""
29866 mkdir imp-dir
; cd imp-dir
29869 echo sfile
>sdir
/sfile
29871 echo ssfile
>sdir
/ssdir
/ssfile
29872 dotest_sort multiroot2-3 \
29873 "${testcvs} -d ${CVSROOT1} import -m import-to-root1 dir1 vend rel" "
29877 N dir1/sdir/ssdir/ssfile
29878 No conflicts created by this import
29879 ${SPROG} import: Importing ${TESTDIR}/root1/dir1/sdir
29880 ${SPROG} import: Importing ${TESTDIR}/root1/dir1/sdir/ssdir"
29882 dotest_sort multiroot2-4 \
29883 "${testcvs} -d ${CVSROOT2} import -m import-to-root2 sdir vend2 rel2" "
29886 N sdir/ssdir/ssfile
29887 No conflicts created by this import
29888 ${SPROG} import: Importing ${TESTDIR}/root2/sdir/ssdir"
29892 # Get TopLevelAdmin-like behavior.
29893 dotest multiroot2-5
"${testcvs} -d ${CVSROOT1} -q co -l ."
29894 dotest multiroot2-5
"${testcvs} -d ${CVSROOT1} -q co dir1" \
29897 U dir1/sdir/ssdir/ssfile"
29899 dotest multiroot2-6
"${testcvs} -Q release -d sdir" ""
29900 dotest multiroot2-7
"${testcvs} -d ${CVSROOT2} -q co sdir" \
29902 U sdir/ssdir/ssfile"
29904 # This has one subtle effect - it deals with Entries.Log
29905 # so that the next test doesn't get trace messages for
29907 dotest multiroot2-8
"${testcvs} update" \
29908 "${CPROG} update: Updating \.
29909 ${CPROG} update: Updating dir1
29910 ${CPROG} update: Updating dir1/sdir
29911 ${CPROG} update: Updating dir1/sdir/ssdir" \
29912 "${SPROG} update: Updating \.
29913 ${SPROG} update: Updating dir1
29914 ${SPROG} update: Updating dir1
29915 ${SPROG} update: Updating dir1/sdir
29916 ${SPROG} update: Updating dir1/sdir/ssdir"
29917 # Two reasons we don't run this on the server: (1) the server
29918 # also prints some trace messages, and (2) the server trace
29919 # messages are subject to out-of-order bugs (this one is hard
29921 if $remote; then :; else
29922 dotest multiroot2-9a
"${testcvs} -t update" \
29923 " *-> main: Session ID is ${commitid}
29924 *-> main loop with CVSROOT=${TESTDIR}/root1
29925 *-> parse_config ($TESTDIR/root1)
29926 *-> do_update ((null), (null), (null), 1, 0, 0, 0, 0, 0, 3, (null), (null), (null), (null), (null), 1, (null))
29927 *-> Write_Template (\., ${TESTDIR}/root1)
29928 ${CPROG} update: Updating \.
29929 *-> Reader_Lock(${TESTDIR}/root1)
29930 *-> Simple_Lock_Cleanup()
29931 *-> Write_Template (dir1, ${TESTDIR}/root1/dir1)
29932 ${CPROG} update: Updating dir1
29933 *-> Reader_Lock(${TESTDIR}/root1/dir1)
29934 *-> Simple_Lock_Cleanup()
29935 *-> main loop with CVSROOT=${TESTDIR}/root2
29936 *-> parse_config ($TESTDIR/root2)
29937 *-> do_update ((null), (null), (null), 1, 0, 0, 0, 0, 0, 3, (null), (null), (null), (null), (null), 1, (null))
29938 *-> Write_Template (dir1/sdir, ${TESTDIR}/root2/dir1/sdir)
29939 ${CPROG} update: Updating dir1/sdir
29940 *-> Reader_Lock(${TESTDIR}/root2/sdir)
29941 *-> Simple_Lock_Cleanup()
29942 *-> Write_Template (dir1/sdir/ssdir, ${TESTDIR}/root2/sdir/ssdir)
29943 ${CPROG} update: Updating dir1/sdir/ssdir
29944 *-> Reader_Lock(${TESTDIR}/root2/sdir/ssdir)
29945 *-> Simple_Lock_Cleanup()
29947 *-> Simple_Lock_Cleanup()"
29950 dotest multiroot2-9
"${testcvs} -q tag tag1" \
29953 T dir1/sdir/ssdir/ssfile"
29954 echo "change it" >>dir
1/file1
29955 echo "change him too" >>dir
1/sdir
/sfile
29956 dotest multiroot2-10
"${testcvs} -q ci -m modify" \
29957 "$TESTDIR/root1/dir1/file1,v <-- dir1/file1
29958 new revision: 1\.2; previous revision: 1\.1
29959 $TESTDIR/root2/sdir/sfile,v <-- dir1/sdir/sfile
29960 new revision: 1\.2; previous revision: 1\.1"
29961 dotest multiroot2-11
"${testcvs} -q tag tag2" \
29964 T dir1/sdir/ssdir/ssfile"
29965 dotest_fail multiroot2-12 \
29966 "${testcvs} -q diff -u -r tag1 -r tag2" \
29968 ===================================================================
29969 RCS file: ${TESTDIR}/root1/dir1/file1,v
29970 retrieving revision 1\.1\.1\.1
29971 retrieving revision 1\.2
29972 diff -u -r1\.1\.1\.1 -r1\.2
29973 --- dir1/file1 ${RFCDATE} 1\.1\.1\.1
29974 ${PLUS}${PLUS}${PLUS} dir1/file1 ${RFCDATE} 1\.2
29975 @@ -1 ${PLUS}1,2 @@
29978 Index: dir1/sdir/sfile
29979 ===================================================================
29980 RCS file: ${TESTDIR}/root2/sdir/sfile,v
29981 retrieving revision 1\.1\.1\.1
29982 retrieving revision 1\.2
29983 diff -u -r1\.1\.1\.1 -r1\.2
29984 --- dir1/sdir/sfile ${RFCDATE} 1\.1\.1\.1
29985 ${PLUS}${PLUS}${PLUS} dir1/sdir/sfile ${RFCDATE} 1\.2
29986 @@ -1 ${PLUS}1,2 @@
29988 ${PLUS}change him too"
29991 echo Keeping
${TESTDIR} and exiting due to
--keep
29995 # clean up after ourselves
29999 # clean up our repositories
30006 # More multiroot tests. Directories are side-by-side, not nested.
30007 # Not drastically different from multiroot but it covers somewhat
30015 CVSROOT1
=`newroot ${TESTDIR}/root1`
30016 CVSROOT2
=`newroot ${TESTDIR}/root2`
30019 dotest multiroot3-1
"${testcvs} -d ${CVSROOT1} init" ""
30020 dotest multiroot3-2
"${testcvs} -d ${CVSROOT1} -q co -l ." ""
30022 dotest multiroot3-3
"${testcvs} add dir1" \
30023 "Directory ${TESTDIR}/root1/dir1 added to the repository"
30024 dotest multiroot3-4
"${testcvs} -d ${CVSROOT2} init" ""
30026 dotest multiroot3-5
"${testcvs} -d ${CVSROOT2} -q co -l ." ""
30029 # OK, the problem is that CVS/Entries doesn't look quite right,
30030 # I suppose because of the "rm -r". Then again, why *should* it
30031 # look right? CVS/Root can only point to a single location, but
30032 # we expect CVS/Entries to hold entries for two repositories? It
30033 # just plain isn't part of the filespec yet.
30035 # Use the quick and dirty fix.
30036 echo "D/dir1////" >CVS
/Entries
30037 echo "D/dir2////" >>CVS
/Entries
30039 dotest multiroot3-7
"${testcvs} add dir2" \
30040 "Directory ${TESTDIR}/root2/dir2 added to the repository"
30042 touch dir
1/file1 dir
2/file2
30044 # Trying to add them both in one command doesn't work,
30045 # because add.c doesn't do multiroot (it doesn't use recurse.c).
30046 # Furthermore, it can't deal with the parent directory
30047 # having a different root from the child, hence the cd.
30049 dotest multiroot3-8
"${testcvs} add file1" \
30050 "${SPROG} add: scheduling file .file1. for addition
30051 ${SPROG} add: use .${SPROG} commit. to add this file permanently"
30053 dotest multiroot3-8a
"${testcvs} add dir2/file2" \
30054 "${SPROG} add: scheduling file .dir2/file2. for addition
30055 ${SPROG} add: use .${SPROG} commit. to add this file permanently"
30057 dotest multiroot3-8
"${testcvs} add dir1/file1 dir2/file2" \
30058 "${SPROG} add: scheduling file .dir1/file1. for addition
30059 ${SPROG} add: scheduling file .dir2/file2. for addition
30060 ${SPROG} add: use .${SPROG} commit. to add these files permanently"
30063 dotest multiroot3-9
"${testcvs} -q ci -m add-them" \
30064 "$TESTDIR/root2/dir2/file2,v <-- dir2/file2
30065 initial revision: 1\.1
30066 $TESTDIR/root1/dir1/file1,v <-- dir1/file1
30067 initial revision: 1\.1"
30069 # That this is an error is good - we are asking CVS to do
30070 # something which doesn't make sense.
30071 dotest_fail multiroot3-10 \
30072 "${testcvs} -q -d ${CVSROOT1} diff dir1/file1 dir2/file2" \
30073 "${SPROG} diff: failed to create lock directory for .${TESTDIR}/root1/dir2' (${TESTDIR}/root1/dir2/#cvs.lock): No such file or directory
30074 ${SPROG} diff: failed to obtain dir lock in repository .${TESTDIR}/root1/dir2'
30075 ${SPROG} \[diff aborted\]: read lock failed - giving up"
30077 # This one is supposed to work.
30078 dotest multiroot3-11
"${testcvs} -q diff dir1/file1 dir2/file2" ""
30080 # make sure we can't access across repositories
30081 # FIXCVS: we probably shouldn't even create the local directories
30082 # in this case, but we do, so deal with it.
30085 dotest_fail multiroot3-12 \
30086 "$testcvs -d $CVSROOT1 -q co ../root2/dir2" \
30087 "$CPROG \[checkout aborted\]: up-level in module reference (\`..') invalid: \`\.\./root2/dir2'\." \
30088 "$SPROG \[server aborted\]: up-level in module reference (\`..') invalid: \`\.\./root2/dir2'\.
30089 $CPROG \[checkout aborted\]: end of file from server (consult above messages if any)"
30090 dotest_fail multiroot3-13 \
30091 "$testcvs -d $CVSROOT2 -q co ../root1/dir1" \
30092 "$CPROG \[checkout aborted\]: up-level in module reference (\`..') invalid: \`\.\./root1/dir1'\." \
30093 "$SPROG \[server aborted\]: up-level in module reference (\`..') invalid: \`\.\./root1/dir1'\.
30094 $CPROG \[checkout aborted\]: end of file from server (consult above messages if any)"
30095 dotest_fail multiroot3-14 \
30096 "$testcvs -d $CVSROOT1 -q co ./../root2/dir2" \
30097 "$CPROG \[checkout aborted\]: up-level in module reference (\`..') invalid: \`\./\.\./root2/dir2'\." \
30098 "$SPROG \[server aborted\]: up-level in module reference (\`..') invalid: \`\./\.\./root2/dir2'\.
30099 $CPROG \[checkout aborted\]: end of file from server (consult above messages if any)"
30100 dotest_fail multiroot3-15 \
30101 "$testcvs -d $CVSROOT2 -q co ./../root1/dir1" \
30102 "$CPROG \[checkout aborted\]: up-level in module reference (\`..') invalid: \`\./\.\./root1/dir1'\." \
30103 "$SPROG \[server aborted\]: up-level in module reference (\`..') invalid: \`\./\.\./root1/dir1'\.
30104 $CPROG \[checkout aborted\]: end of file from server (consult above messages if any)"
30105 dotest_fail multiroot3-16 \
30106 "$testcvs -d $CVSROOT1 -q co -p ../root2/dir2" \
30107 "$CPROG \[checkout aborted\]: up-level in module reference (\`..') invalid: \`\.\./root2/dir2'\." \
30108 "$SPROG \[server aborted\]: up-level in module reference (\`..') invalid: \`\.\./root2/dir2'\.
30109 $CPROG \[checkout aborted\]: end of file from server (consult above messages if any)"
30110 dotest_fail multiroot3-17 \
30111 "$testcvs -d $CVSROOT1 -q co -p ./../root1/dir1" \
30112 "$CPROG \[checkout aborted\]: up-level in module reference (\`..') invalid: \`\./\.\./root1/dir1'\." \
30113 "$SPROG \[server aborted\]: up-level in module reference (\`..') invalid: \`\./\.\./root1/dir1'\.
30114 $CPROG \[checkout aborted\]: end of file from server (consult above messages if any)"
30119 echo Keeping
${TESTDIR} and exiting due to
--keep
30124 rm -rf ${TESTDIR}/root1
${TESTDIR}/root2
30132 # More multiroot tests, in particular we have two roots with
30133 # similarly-named directories and we try to see that CVS can
30134 # keep them separate.
30141 CVSROOT1
=`newroot ${TESTDIR}/root1`
30142 CVSROOT2
=`newroot ${TESTDIR}/root2`
30145 dotest multiroot4-1
"${testcvs} -d ${CVSROOT1} init" ""
30146 dotest multiroot4-2
"${testcvs} -d ${CVSROOT1} -q co -l ." ""
30148 dotest multiroot4-3
"${testcvs} add dircom" \
30149 "Directory ${TESTDIR}/root1/dircom added to the repository"
30152 dotest multiroot4-4
"${testcvs} add file1" \
30153 "${SPROG} add: scheduling file .file1. for addition
30154 ${SPROG} add: use .${SPROG} commit. to add this file permanently"
30155 dotest multiroot4-5
"${testcvs} -q ci -m add" \
30156 "$TESTDIR/root1/dircom/file1,v <-- file1
30157 initial revision: 1\.1"
30160 dotest multiroot4-6
"${testcvs} -d ${CVSROOT2} init" ""
30161 dotest multiroot4-7
"${testcvs} -d ${CVSROOT2} -q co -l ." ""
30163 dotest multiroot4-8
"${testcvs} add dircom" \
30164 "Directory ${TESTDIR}/root2/dircom added to the repository"
30167 dotest multiroot4-9
"${testcvs} add file2" \
30168 "${SPROG} add: scheduling file .file2. for addition
30169 ${SPROG} add: use .${SPROG} commit. to add this file permanently"
30170 dotest multiroot4-10
"${testcvs} -q ci -m add" \
30171 "$TESTDIR/root2/dircom/file2,v <-- file2
30172 initial revision: 1\.1"
30176 # This may look contrived; the real world example which inspired
30177 # it was that a user was changing from local to remote. Cases
30178 # like switching servers (among those mounting the same
30179 # repository) and so on would also look the same.
30181 dotest multiroot4-11
"${testcvs} -d ${CVSROOT2} add sdir2" \
30182 "Directory ${TESTDIR}/root2/dircom/sdir2 added to the repository"
30184 dotest multiroot4-12
"${testcvs} -q update" ""
30186 dotest multiroot4-13
"${testcvs} -q update dircom" ""
30190 rm -rf ${TESTDIR}/root1
${TESTDIR}/root2
30198 # When the Entries/Root file is removed from an existing
30199 # workspace, CVS should assume $CVSROOT instead
30201 # Right now only checking that CVS exits normally on an
30202 # update once CVS/Root is deleted
30204 # There was a time when this would core dump when run in
30205 # client/server mode
30208 dotest rmroot-setup-1
"${testcvs} -q co -l ." ''
30210 dotest rmroot-setup-2
"${testcvs} add first-dir" \
30211 "Directory ${CVSROOT_DIRNAME}/first-dir added to the repository"
30214 dotest rmroot-setup-3
"${testcvs} add file1 file2" \
30215 "${SPROG} add: scheduling file .file1. for addition
30216 ${SPROG} add: scheduling file .file2. for addition
30217 ${SPROG} add: use .${SPROG} commit. to add these files permanently"
30218 dotest rmroot-setup-4
"${testcvs} -q commit -minit" \
30219 "$CVSROOT_DIRNAME/first-dir/file1,v <-- file1
30220 initial revision: 1\.1
30221 $CVSROOT_DIRNAME/first-dir/file2,v <-- file2
30222 initial revision: 1\.1"
30224 dotest rmroot-1
"${testcvs} -q update" ''
30229 modify_repo
rm -rf $CVSROOT_DIRNAME/first-dir
30235 # More tests of repositories and specifying them.
30236 # Similar to crerepos but that test is probably getting big
30244 CVSROOT1
=`newroot ${TESTDIR}/root1`
30245 CVSROOT_MOVED
=`newroot ${TESTDIR}/root-moved`
30247 dotest reposmv-setup-1
"${testcvs} -d ${CVSROOT1} init" ""
30248 mkdir imp-dir
; cd imp-dir
30250 dotest reposmv-setup-2 \
30251 "${testcvs} -d ${CVSROOT1} import -m add dir1 vendor release" \
30254 No conflicts created by this import"
30258 dotest reposmv-1
"${testcvs} -d ${CVSROOT1} -Q co dir1" ""
30259 mv ${TESTDIR}/root1
${TESTDIR}/root-moved
30262 # If we didn't have a relative repository, get one now.
30263 dotest reposmv-1a
"cat CVS/Repository" \
30264 "${TESTDIR}/root1/dir1" "dir1"
30265 echo dir1
>CVS
/Repository
30267 # There were some duplicated warnings and such; only test
30268 # for the part of the error message which makes sense.
30270 # FIXCVS then FIXME
30271 # Now the duplicated error messages only occur on some platforms,
30272 # including, apparently, NetBSD 1.6.1, RedHat Linux 7.3, whatever
30273 # kernel that is using, and Solaris 9. These platforms somehow
30274 # decide to call Name_Root() up to four times, via do_recursion, but
30275 # I'm not sure of the rest of the details. Other platforms,
30276 # including Fedora Core 1 (Linux 2.4.22-1.2199.nptl), RH Linux 9
30277 # (Linux 2.4.20-37.9.legacy), and probably AIX 3.4, Solaris 8,
30278 # BSD/OS 4.2, & IRIX 6.5 only call Name_Root() once as a result of
30281 # Bug: "skipping directory " without filename.
30283 dotest_fail reposmv-2r
"${testcvs} update" \
30284 "Cannot access ${TESTDIR}/root1/CVSROOT
30285 No such file or directory"
30287 dotest reposmv-2
"$testcvs update" \
30288 "$DOTSTAR$CPROG update: in directory \.:
30289 $CPROG update: ignoring CVS/Root because it specifies a non-existent repository $TESTDIR/root1
30290 $CPROG update: Updating \.
30291 $DOTSTAR$CPROG update: cannot open directory $CVSROOT_DIRNAME/dir1: No such file or directory
30292 $CPROG update: skipping directory "
30295 # CVS/Root overrides $CVSROOT
30297 CVSROOT_save
=${CVSROOT}
30298 CVSROOT
=:fork
:${TESTDIR}/root-moved
; export CVSROOT
30299 dotest_fail reposmv-3r
"${testcvs} update" \
30300 "Cannot access ${TESTDIR}/root1/CVSROOT
30301 No such file or directory"
30302 CVSROOT
=${CVSROOT_save}; export CVSROOT
30304 CVSROOT_save
=$CVSROOT
30305 CVSROOT
=$TESTDIR/root-moved
; export CVSROOT
30306 dotest reposmv-3
"$testcvs update" \
30307 "$DOTSTAR$CPROG update: in directory \.:
30308 $CPROG update: ignoring CVS/Root because it specifies a non-existent repository $TESTDIR/root1
30309 $CPROG update: Updating \.$DOTSTAR"
30310 CVSROOT
=$CVSROOT_save; export CVSROOT
30314 CVSROOT_save
=${CVSROOT}
30315 CVSROOT
=:fork
:${TESTDIR}/root-none
; export CVSROOT
30316 dotest_fail reposmv-4r
"${testcvs} update" \
30317 "Cannot access ${TESTDIR}/root1/CVSROOT
30318 No such file or directory"
30319 CVSROOT
=${CVSROOT_save}; export CVSROOT
30321 # CVS/Root doesn't seem to quite completely override $CVSROOT
30322 # Bug? Not necessarily a big deal if it only affects error
30324 CVSROOT_save
=${CVSROOT}
30325 CVSROOT
=${TESTDIR}/root-none
; export CVSROOT
30326 dotest_fail reposmv-4
"${testcvs} update" \
30327 "${CPROG} update: in directory \.:
30328 ${CPROG} update: ignoring CVS/Root because it specifies a non-existent repository ${TESTDIR}/root1
30329 ${CPROG} \[update aborted\]: ${TESTDIR}/root-none/CVSROOT: No such file or directory"
30330 CVSROOT
=${CVSROOT_save}; export CVSROOT
30333 # -d overrides CVS/Root
30335 # Oddly enough, with CVS 1.10 I think this didn't work for
30336 # local (that is, it would appear that CVS/Root would not
30337 # get used, but would produce an error if it didn't exist).
30338 dotest reposmv-5
"${testcvs} -d ${CVSROOT_MOVED} update" \
30339 "${SPROG} update: Updating \."
30341 # TODO: could also test various other things, like what if the
30342 # user removes CVS/Root (which is legit). Or another set of
30343 # tests would be if both repositories exist but we want to make
30344 # sure that CVS is using the correct one.
30355 # Test basic pserver functionality.
30357 if test -n "$remotehost"; then
30358 # Don't even try. (The issue is getting servercvs & testcvs
30359 # set correctly for the following tests. Some expect one access
30360 # method and some another, which in $remotehost mode, means that
30361 # sometimes the executables must run on one platform and
30362 # sometimes another.)
30365 save_servercvs
=$servercvs
30367 # First set SystemAuth=no. Not really necessary, I don't
30368 # think, but somehow it seems like the clean thing for
30371 dotest pserver-1
"$testcvs -Q co CVSROOT" ""
30373 echo "SystemAuth=no" >>config
30374 dotest pserver-2
"$testcvs -q ci -m config-it" \
30375 "$CVSROOT_DIRNAME/CVSROOT/config,v <-- config
30376 new revision: 1\.[0-9]*; previous revision: 1\.[0-9]*
30377 $SPROG commit: Rebuilding administrative file database"
30378 cat >$CVSROOT_DIRNAME/CVSROOT
/passwd
<<EOF
30379 testme:q6WV9d2t848B2:$username
30380 dontroot:q6WV9d2t848B2:root
30381 anonymous::$username
30383 willfail: :whocares
30385 dotest_fail pserver-3
"$servercvs pserver" \
30386 "error 0 Server configuration missing --allow-root in inetd.conf" <<EOF
30394 # Confirm that not sending a newline during auth cannot constitute
30395 # a denial-of-service attack. This assumes that PATH_MAX is less
30396 # than 65536 bytes. If PATH_MAX is larger than 65535 bytes, this
30397 # test could hang indefinitely.
30398 ${AWK} 'BEGIN { printf "0123456789abcdef" }' </dev
/null
>garbageseg
30399 echo "BEGIN AUTH REQUEST" >garbageinput
30401 while test $i -lt 64; do
30402 cat <garbageseg
>>garbageseg2
30406 while test $i -lt 64; do
30407 cat <garbageseg2
>>garbageinput
30410 dotest_fail pserver-auth-no-dos \
30411 "${servercvs} --allow-root=${CVSROOT_DIRNAME} pserver" \
30412 "$CPROG \\[pserver aborted\\]: error reading from net while validating pserver: Not enough space" \
30413 "$CPROG \\[pserver aborted\\]: error reading from net while validating pserver: Cannot allocate memory" <garbageinput
30415 rm garbageseg garbageseg2 garbageinput
30417 # Sending the Root and noop before waiting for the
30418 # "I LOVE YOU" is bogus, but hopefully we can get
30420 dotest pserver-4
"$servercvs --allow-root=$CVSROOT_DIRNAME pserver" \
30428 Root $CVSROOT_DIRNAME
30432 dotest_fail pserver-4.2 \
30433 "$servercvs --allow-root=$CVSROOT_DIRNAME pserver" \
30434 "error 0: root not allowed" <<EOF
30442 dotest pserver-5
"$servercvs --allow-root=$CVSROOT_DIRNAME pserver" \
30444 E Protocol error: Root says \"$TESTDIR/1\" but pserver says \"$CVSROOT_DIRNAME\"
30455 dotest pserver-5a
"${servercvs} --allow-root=${CVSROOT_DIRNAME} pserver" \
30456 "${DOTSTAR} LOVE YOU
30457 E Protocol error: init says \"${TESTDIR}/2\" but pserver says \"${CVSROOT_DIRNAME}\"
30466 dotest_fail pserver-5b
"test -d ${TESTDIR}/2" ''
30468 dotest pserver-5c
"${servercvs} --allow-root=${CVSROOT_DIRNAME} pserver" \
30469 "${DOTSTAR} LOVE YOU
30470 E init xxx must be an absolute pathname
30479 dotest_fail pserver-5d
"test -d xxx" ''
30481 dotest_fail pserver-6
"${servercvs} --allow-root=${CVSROOT_DIRNAME} pserver" \
30490 dotest_fail pserver-7
"${servercvs} --allow-root=${CVSROOT_DIRNAME} pserver" \
30492 BEGIN VERIFICATION REQUEST
30496 END VERIFICATION REQUEST
30499 dotest pserver-8
"${servercvs} --allow-root=${CVSROOT_DIRNAME} pserver" \
30500 "${DOTSTAR} LOVE YOU" <<EOF
30501 BEGIN VERIFICATION REQUEST
30505 END VERIFICATION REQUEST
30508 # Tests pserver-9 through pserver-13 are about empty passwords
30510 # Test empty password (both sides) for aliased user
30511 dotest pserver-9
"${servercvs} --allow-root=${CVSROOT_DIRNAME} pserver" \
30512 "${DOTSTAR} LOVE YOU" <<EOF
30520 # Test empty password (server side only) for aliased user
30521 dotest pserver-10
"${servercvs} --allow-root=${CVSROOT_DIRNAME} pserver" \
30522 "${DOTSTAR} LOVE YOU" <<EOF
30526 Aanythingwouldworkhereittrulydoesnotmatter
30530 # Test empty (both sides) password for non-aliased user
30531 dotest pserver-11
"${servercvs} --allow-root=${CVSROOT_DIRNAME} pserver" \
30532 "${DOTSTAR} LOVE YOU" <<EOF
30540 # Test empty (server side only) password for non-aliased user
30541 dotest pserver-12
"${servercvs} --allow-root=${CVSROOT_DIRNAME} pserver" \
30542 "${DOTSTAR} LOVE YOU" <<EOF
30546 Anypasswordwouldworkwhynotthisonethen
30550 # Test failure of whitespace password
30551 dotest_fail pserver-13
"${servercvs} --allow-root=${CVSROOT_DIRNAME} pserver" \
30552 "${DOTSTAR} HATE YOU" <<EOF
30556 Amquiteunabletocomeupwithinterestingpasswordsanymore
30560 # The following tests are for read-only access
30562 # Check that readers can only read, everyone else can write
30564 echo anonymous
>$CVSROOT_DIRNAME/CVSROOT
/readers
30566 dotest pserver-14
"$servercvs --allow-root=$CVSROOT_DIRNAME pserver" \
30568 M Concurrent Versions System (CVS) .*
30575 Root $CVSROOT_DIRNAME
30579 dotest pserver-15
"$servercvs --allow-root=$CVSROOT_DIRNAME pserver" \
30581 E $CPROG \\[server aborted\\]: .init. requires write access to the repository
30588 init $CVSROOT_DIRNAME
30591 dotest pserver-16
"${servercvs} --allow-root=${CVSROOT_DIRNAME} pserver" \
30592 "${DOTSTAR} LOVE YOU
30593 M Concurrent Versions System (CVS) .*
30600 Root ${CVSROOT_DIRNAME}
30604 dotest pserver-17
"${servercvs} --allow-root=${CVSROOT_DIRNAME} pserver" \
30605 "${DOTSTAR} LOVE YOU
30612 init ${CVSROOT_DIRNAME}
30615 dotest pserver-18
"${servercvs} --allow-root=${CVSROOT_DIRNAME} pserver" \
30616 "${DOTSTAR} LOVE YOU
30617 M Concurrent Versions System (CVS) .*
30624 Root ${CVSROOT_DIRNAME}
30628 dotest pserver-19
"${servercvs} --allow-root=${CVSROOT_DIRNAME} pserver" \
30629 "${DOTSTAR} LOVE YOU
30636 init ${CVSROOT_DIRNAME}
30639 # Check that writers can write, everyone else can only read
30640 # even if not listed in readers
30642 cat >${CVSROOT_DIRNAME}/CVSROOT
/writers
<<EOF
30646 dotest pserver-20
"${servercvs} --allow-root=${CVSROOT_DIRNAME} pserver" \
30647 "${DOTSTAR} LOVE YOU
30648 M Concurrent Versions System (CVS) .*
30655 Root ${CVSROOT_DIRNAME}
30659 dotest pserver-21
"${servercvs} --allow-root=${CVSROOT_DIRNAME} pserver" \
30660 "${DOTSTAR} LOVE YOU
30661 E $CPROG \\[server aborted\\]: .init. requires write access to the repository
30668 init ${CVSROOT_DIRNAME}
30671 dotest pserver-22
"${servercvs} --allow-root=${CVSROOT_DIRNAME} pserver" \
30672 "${DOTSTAR} LOVE YOU
30673 M Concurrent Versions System (CVS) .*
30680 Root ${CVSROOT_DIRNAME}
30684 dotest pserver-23
"${servercvs} --allow-root=${CVSROOT_DIRNAME} pserver" \
30685 "${DOTSTAR} LOVE YOU
30692 init ${CVSROOT_DIRNAME}
30695 dotest pserver-24
"${servercvs} --allow-root=${CVSROOT_DIRNAME} pserver" \
30696 "${DOTSTAR} LOVE YOU
30697 M Concurrent Versions System (CVS) .*
30704 Root ${CVSROOT_DIRNAME}
30708 dotest pserver-25
"${servercvs} --allow-root=${CVSROOT_DIRNAME} pserver" \
30709 "${DOTSTAR} LOVE YOU
30710 E $CPROG \\[server aborted\\]: .init. requires write access to the repository
30717 init ${CVSROOT_DIRNAME}
30720 # Should work the same without readers
30722 rm ${CVSROOT_DIRNAME}/CVSROOT
/readers
30724 dotest pserver-26
"${servercvs} --allow-root=${CVSROOT_DIRNAME} pserver" \
30725 "${DOTSTAR} LOVE YOU
30726 M Concurrent Versions System (CVS) .*
30733 Root ${CVSROOT_DIRNAME}
30737 dotest pserver-27
"${servercvs} --allow-root=${CVSROOT_DIRNAME} pserver" \
30738 "${DOTSTAR} LOVE YOU
30739 E $CPROG \\[server aborted\\]: .init. requires write access to the repository
30746 init ${CVSROOT_DIRNAME}
30749 dotest pserver-28
"${servercvs} --allow-root=${CVSROOT_DIRNAME} pserver" \
30750 "${DOTSTAR} LOVE YOU
30751 M Concurrent Versions System (CVS) .*
30758 Root ${CVSROOT_DIRNAME}
30762 dotest pserver-29
"${servercvs} --allow-root=${CVSROOT_DIRNAME} pserver" \
30763 "${DOTSTAR} LOVE YOU
30770 init ${CVSROOT_DIRNAME}
30773 dotest pserver-30
"${servercvs} --allow-root=${CVSROOT_DIRNAME} pserver" \
30774 "${DOTSTAR} LOVE YOU
30775 M Concurrent Versions System (CVS) .*
30782 Root ${CVSROOT_DIRNAME}
30786 dotest pserver-31
"${servercvs} --allow-root=${CVSROOT_DIRNAME} pserver" \
30787 "${DOTSTAR} LOVE YOU
30788 E $CPROG \\[server aborted\\]: .init. requires write access to the repository
30795 init ${CVSROOT_DIRNAME}
30798 # pserver used to try and print from the NULL pointer
30799 # in this error message in this case
30800 dotest_fail pserver-bufinit
"${servercvs} pserver" \
30801 "$CPROG \[pserver aborted\]: unexpected EOF encountered during authentication" </dev
/null
30804 dotest pserver-cleanup-1
"${testcvs} -q up -pr1.1 config >config" ""
30805 dotest pserver-cleanup-2
"${testcvs} -q ci -m config-it" \
30806 "$CVSROOT_DIRNAME/CVSROOT/config,v <-- config
30807 new revision: 1\.[0-9]*; previous revision: 1\.[0-9]*
30808 $SPROG commit: Rebuilding administrative file database"
30814 servercvs
=$save_servercvs
30815 fi # skip the whole thing for local
30821 # Some tests of the server (independent of the client).
30823 save_servercvs
=$servercvs
30825 dotest server-1
"${servercvs} server" \
30826 "E Protocol error: Root request missing
30833 # Could also test for relative pathnames here (so that crerepos-6a
30834 # and crerepos-6b can use :fork:).
30835 dotest server-2
"${servercvs} server" "ok" <<EOF
30837 Set MYENV=env-value
30838 init ${TESTDIR}/crerepos
30840 dotest server-3
"test -d ${TESTDIR}/crerepos/CVSROOT" ""
30842 # Now some tests of gzip-file-contents (used by jCVS).
30844 printf "%c%c%c%c%c%c.6%c%c+I-.%c%c%c%c5%c;%c%c%c%c", \
30845 31, 139, 8, 64, 5, 7, 64, 3, 225, 2, 64, 198, 185, 5, 64, 64, 64}' \
30846 </dev
/null |
${TR} '\100' '\000' >gzipped.dat
30847 # Note that the CVS client sends "-b 1.1.1", and this
30848 # test doesn't. But the server also defaults to that.
30849 cat <<EOF >session.dat
30850 Root ${TESTDIR}/crerepos
30852 gzip-file-contents 3
30860 ${TESTDIR}/crerepos
30865 cat gzipped.dat
>>session.dat
30866 echo import
>>session.dat
30867 dotest server-4
"${servercvs} server" \
30870 M No conflicts created by this import
30874 "${testcvs} -q -d ${TESTDIR}/crerepos co -p dir1/file1" "test"
30876 # OK, here are some notify tests.
30877 dotest server-6
"${servercvs} server" \
30879 ${TESTDIR}/crerepos/dir1/file1
30881 Root ${TESTDIR}/crerepos
30883 ${TESTDIR}/crerepos/dir1
30885 E Fri May 7 13:21:09 1999 -0000 myhost some-work-dir EUC
30888 # Sending the second "noop" before waiting for the output
30889 # from the first is bogus but hopefully we can get away
30891 dotest server-7
"${servercvs} server" \
30892 "M file1 $username Fri May 7 13:21:09 1999 -0000 myhost some-work-dir
30894 ${TESTDIR}/crerepos/dir1/file1
30896 M file1 $username Fri May 7 13:21:09 1999 -0000 myhost some-work-dir
30898 ${TESTDIR}/crerepos/dir1/file1
30900 Root ${TESTDIR}/crerepos
30902 ${TESTDIR}/crerepos/dir1
30904 E Fri May 7 13:21:09 1999 -0000 myhost some-work-dir EUC
30907 E The 57th day of Discord in the YOLD 3165 myhost some-work-dir EUC
30911 # OK, now test a few error conditions.
30912 # FIXCVS: should give "error" and no "Notified", like server-9
30913 dotest server-8
"${servercvs} server" \
30914 "M file1 $username The 57th day of Discord in the YOLD 3165 myhost some-work-dir
30915 E $CPROG server: invalid character in editor value
30917 ${TESTDIR}/crerepos/dir1/file1
30919 Root ${TESTDIR}/crerepos
30921 ${TESTDIR}/crerepos/dir1
30923 E Setting Orange, the 52th day of Discord in the YOLD 3165 myhost some-work-dir EUC
30927 dotest server-9
"${servercvs} server" \
30928 "E Protocol error; misformed Notify request
30930 Root ${TESTDIR}/crerepos
30932 ${TESTDIR}/crerepos/dir1
30934 E Setting Orange+57th day of Discord myhost some-work-dir EUC
30938 # First demonstrate an interesting quirk in the protocol.
30939 # The "watchers" request selects the files to operate based
30940 # on files which exist in the working directory. So if we
30941 # don't send "Entry" or the like, it won't do anything.
30942 # Wants to be documented in cvsclient.texi...
30943 dotest server-10
"${servercvs} server" "ok" <<EOF
30944 Root ${TESTDIR}/crerepos
30946 ${TESTDIR}/crerepos/dir1
30949 # See if "watchers" and "editors" display the right thing.
30950 dotest server-11
"${servercvs} server" \
30951 "M file1 ${username} tedit tunedit tcommit
30953 Root ${TESTDIR}/crerepos
30955 ${TESTDIR}/crerepos/dir1
30956 Entry /file1/1.1////
30959 dotest server-12
"${servercvs} server" \
30960 "M file1 ${username} The 57th day of Discord in the YOLD 3165 myhost some-work-dir
30962 Root ${TESTDIR}/crerepos
30964 ${TESTDIR}/crerepos/dir1
30965 Entry /file1/1.1////
30969 # Now do an unedit.
30970 dotest server-13
"${servercvs} server" \
30972 ${TESTDIR}/crerepos/dir1/file1
30974 Root ${TESTDIR}/crerepos
30976 ${TESTDIR}/crerepos/dir1
30978 U 7 May 1999 15:00 -0000 myhost some-work-dir EUC
30982 # Now try "watchers" and "editors" again.
30983 dotest server-14
"${servercvs} server" "ok" <<EOF
30984 Root ${TESTDIR}/crerepos
30986 ${TESTDIR}/crerepos/dir1
30989 dotest server-15
"${servercvs} server" "ok" <<EOF
30990 Root ${TESTDIR}/crerepos
30992 ${TESTDIR}/crerepos/dir1
30996 # Test that the global `-l' option is ignored nonfatally.
30997 dotest server-16
"${testcvs} server" \
30998 "E $CPROG server: WARNING: global \`-l' option ignored\.
31004 # There used to be some exploits based on malformed Entry requests
31005 dotest server-17
"$testcvs server" \
31006 "E protocol error: Malformed Entry
31008 Root $TESTDIR/crerepos
31010 $TESTDIR/crerepos/dir1
31011 Entry X/file1/1.1////
31015 dotest server-18
"$testcvs server" \
31016 "E protocol error: Malformed Entry
31018 Root $TESTDIR/crerepos
31020 $TESTDIR/crerepos/dir1
31025 # Check that the config file may be set from the command line.
31026 # But first verify the default config produces no error messages.
31027 dotest server-19
"$testcvs server" \
31029 Root $TESTDIR/crerepos
31034 echo THIS-CONFIG-OPTION-IS-BAD
=XXX
>$TESTDIR/newconfig
31035 dotest_fail server-20
"$testcvs server -c $TESTDIR/newconfig" \
31036 "E $SPROG \[server aborted\]: Invalid path to config file specified: \`$TESTDIR/newconfig'" <<EOF
31037 Root $TESTDIR/crerepos
31042 dotest_fail server-21 \
31043 "$testcvs server -c /etc/cvs/this-shouldnt-exist" \
31044 "E $SPROG \[server aborted\]: Failed to resolve path: \`/etc/cvs/this-shouldnt-exist': No such file or directory" <<EOF
31045 Root $TESTDIR/crerepos
31051 # Now make sure that the config file can't be set via the user's
31053 echo server
-c $TESTDIR/newconfig
>$HOME/.cvsrc
31054 dotest server-22
"$testcvs server" \
31056 Root $TESTDIR/crerepos
31063 rm -rf $TESTDIR/crerepos
31064 rm gzipped.dat session.dat
31065 rm $TESTDIR/newconfig
$HOME/.cvsrc
31066 servercvs
=$save_servercvs
31067 fi # skip the whole thing for local
31073 # More server tests, in particular testing that various
31074 # possible security holes are plugged.
31076 if test -n "$remotehost"; then
31077 # Don't even try. (The issue is getting servercvs & testcvs
31078 # set correctly for the following tests. Some expect one access
31079 # method and some another, which in $remotehost mode, means that
31080 # sometimes the executables must run on one platform and
31081 # sometimes another.)
31084 save_servercvs
=$servercvs
31086 dotest server2-1
"${servercvs} server" \
31087 "E protocol error: directory '${CVSROOT_DIRNAME}/\.\./dir1' not within root '${CVSROOT_DIRNAME}'
31089 Root ${CVSROOT_DIRNAME}
31091 ${CVSROOT_DIRNAME}/../dir1
31095 dotest server2-2
"${servercvs} server" \
31096 "E protocol error: directory '${CVSROOT_DIRNAME}dir1' not within root '${CVSROOT_DIRNAME}'
31098 Root ${CVSROOT_DIRNAME}
31100 ${CVSROOT_DIRNAME}dir1
31104 dotest
2-3 "${servercvs} server" \
31105 "E protocol error: directory '${TESTDIR}' not within root '${CVSROOT_DIRNAME}'
31107 Root ${CVSROOT_DIRNAME}
31113 # OK, now a few tests for the rule that one cannot pass a
31114 # filename containing a slash to Modified, Is-modified,
31115 # Notify, Questionable, or Unchanged. For completeness
31116 # we'd try them all. For lazyness/conciseness we don't.
31117 dotest server2-4
"${servercvs} server" \
31118 "E protocol error: directory 'foo/bar' not within current directory
31120 Root ${CVSROOT_DIRNAME}
31126 servercvs
=$save_servercvs
31133 # Some tests of the client (independent of the server).
31134 if $remote; then :; else
31140 # Skip these tests in proxy mode since they assume we are not
31141 # writing through a proxy server. There is no writeproxy-client
31142 # test currently. The writeproxy & writeproxy-noredirect tests
31143 # test the writeproxy server.
31148 cat >$TESTDIR/serveme
<<EOF
31150 # This is admittedly a bit cheezy, in the sense that we make lots
31151 # of assumptions about what the client is going to send us.
31152 # We don't mention Repository, because current clients don't require it.
31153 # Sending these at our own pace, rather than waiting for the client to
31154 # make the requests, is bogus, but hopefully we can get away with it.
31155 echo "Valid-requests Root Valid-responses valid-requests Directory Entry Modified Unchanged Argument Argumentx ci co update"
31157 echo "M special message"
31158 echo "Created first-dir/"
31159 echo "$CVSROOT_DIRNAME/first-dir/file1"
31160 echo "/file1/1.1///"
31161 echo "u=rw,g=rw,o=rw"
31167 # Cygwin. Pthffffffffft!
31168 if test -n "$remotehost"; then
31169 $CVS_RSH $remotehost "chmod +x $TESTDIR/serveme"
31171 chmod +x
$TESTDIR/serveme
31173 save_CVS_SERVER
=$CVS_SERVER
31174 CVS_SERVER
=$TESTDIR/serveme
; export CVS_SERVER
31176 dotest_fail client-1
"$testcvs -q co first-dir" \
31177 "$CPROG \[checkout aborted\]: This server does not support the global -q option$DOTSTAR"
31178 dotest client-2
"$testcvs co first-dir" "special message"
31180 cat >$TESTDIR/serveme
<<EOF
31182 echo "Valid-requests Root Valid-responses valid-requests Directory Entry Modified Unchanged Argument Argumentx ci co update"
31185 echo "Copy-file ./"
31186 echo "$CVSROOT_DIRNAME/first-dir/file1"
31187 echo "$TESTDIR/bogus/.#file1.1.1"
31189 echo "$CVSROOT_DIRNAME/first-dir/file1"
31190 echo "/file1/1.2///"
31191 echo "u=rw,g=rw,o=rw"
31198 mkdir
$TESTDIR/bogus
31199 # The ${DOTSTAR} is to match a potential "broken pipe" if the
31200 # client exits before the server script sends everything
31201 dotest_fail client-3
"$testcvs update" \
31203 $CPROG \[update aborted\]: protocol error: Copy-file tried to specify director$DOTSTAR"
31204 cat >$TESTDIR/serveme
<<EOF
31206 echo "Valid-requests Root Valid-responses valid-requests Directory Entry Modified Unchanged Argument Argumentx ci co update"
31209 echo "Copy-file ./"
31210 echo "$CVSROOT_DIRNAME/first-dir/file1"
31213 echo "$CVSROOT_DIRNAME/first-dir/file1"
31214 echo "/file1/1.2///"
31215 echo "u=rw,g=rw,o=rw"
31221 dotest client-4
"$testcvs update" "merge-it"
31222 dotest client-5
"cat .#file1.1.1" "xyz"
31223 dotest client-6
"cat CVS/Entries" "/file1/1.2/[A-Za-z0-9 :]*//
31225 dotest client-7
"cat file1" "abc"
31227 cat >$TESTDIR/serveme
<<EOF
31229 echo "Valid-requests Root Valid-responses valid-requests Directory Entry Modified Unchanged Argument Argumentx ci co update"
31231 echo "M OK, whatever"
31233 cat >$TESTDIR/client.tmp
31235 chmod u
=rw
,go
= file1
31236 # By specifying the time zone in local time, we don't
31237 # know exactly how that will translate to GMT.
31238 dotest client-8
"$testcvs update -D 99-10-04" "OK, whatever"
31239 # String 2 below is Cygwin again - ptoooey.
31240 dotest client-9
"cat $TESTDIR/client.tmp" \
31241 "Root $CVSROOT_DIRNAME
31242 Valid-responses [-a-zA-Z ]*
31245 Argument [34] Oct 1999 [0-9][0-9]:00:00 -0000
31248 $CVSROOT_DIRNAME/first-dir
31249 Entry /file1/1\.2///
31255 "Root $CVSROOT_DIRNAME
31256 Valid-responses [-a-zA-Z ]*
31259 Argument [34] Oct 1999 [0-9][0-9]:00:00 -0000
31262 $CVSROOT_DIRNAME/first-dir
31263 Entry /file1/1\.2///
31270 # The following test tests what was a potential client exploit in
31271 # CVS versions 1.11.14 and CVS versions 1.12.6 and earlier. This
31272 # exploit would allow a trojan server to create arbitrary files,
31273 # anywhere the user had write permissions, even outside of the
31275 cat >$HOME/.bashrc
<<EOF
31277 # This is where login scripts would usually be
31280 cat >$TESTDIR/serveme
<<EOF
31282 echo "Valid-requests Root Valid-responses valid-requests Directory Entry Modified Unchanged Argument Argumentx ci co update"
31284 echo "Rcs-diff $HOME/"
31285 echo "$HOME/.bashrc"
31286 echo "/.bashrc/73.50///"
31287 echo "u=rw,g=rw,o=rw"
31290 echo "echo 'gotcha!'"
31295 # If I don't run the following sleep between the above cat and
31296 # the following calls to dotest, sometimes the serveme file isn't
31297 # completely written yet by the time CVS tries to execute it,
31298 # causing the shell to intermittantly report syntax errors (usually
31299 # early EOF). There's probably a new race condition here, but this
31302 # Incidentally, I can reproduce this behavior with Linux 2.4.20 and
31303 # Bash 2.05 or Bash 2.05b.
31305 dotest_fail client-10
"$testcvs update" \
31306 "$CPROG update: Server attempted to update a file via an invalid pathname:
31307 $CPROG \[update aborted\]: \`$HOME/.bashrc'\."
31309 # A second try at a client exploit. This one never actually
31310 # failed in the past, but I thought it wouldn't hurt to add a test.
31311 cat >$TESTDIR/serveme
<<EOF
31313 echo "Valid-requests Root Valid-responses valid-requests Directory Entry Modified Unchanged Argument Argumentx ci co update"
31316 echo "$HOME/.bashrc"
31317 echo "/.bashrc/73.50///"
31318 echo "u=rw,g=rw,o=rw"
31321 echo "echo 'gotcha!'"
31326 dotest_fail client-11
"$testcvs update" \
31327 "$CPROG \[update aborted\]: patch original file \./\.bashrc does not exist"
31329 # A third try at a client exploit. This one did used to fail like
31331 cat >$TESTDIR/serveme
<<EOF
31333 echo "Valid-requests Root Valid-responses valid-requests Directory Entry Modified Unchanged Argument Argumentx ci co update"
31335 echo "Rcs-diff ../../home/"
31336 echo "../../.bashrc"
31337 echo "/.bashrc/73.50///"
31338 echo "u=rw,g=rw,o=rw"
31341 echo "echo 'gotcha!'"
31346 dotest_fail client-12
"$testcvs update" \
31347 "$CPROG update: Server attempted to update a file via an invalid pathname:
31348 $CPROG \[update aborted\]: \`\.\./\.\./home/.bashrc'\."
31350 # Try the same exploit using the Created response.
31351 cat >$TESTDIR/serveme
<<EOF
31353 echo "Valid-requests Root Valid-responses valid-requests Directory Entry Modified Unchanged Argument Argumentx ci co update"
31355 echo "Created $HOME/"
31356 echo "$HOME/.bashrc"
31357 echo "/.bashrc/73.50///"
31358 echo "u=rw,g=rw,o=rw"
31360 echo "#! $TESTSHELL"
31361 echo "echo 'gotcha!'"
31366 dotest_fail client-13
"$testcvs update" \
31367 "$CPROG update: Server attempted to update a file via an invalid pathname:
31368 $CPROG \[update aborted\]: \`$HOME/.bashrc'\."
31370 # Now try using the Update-existing response
31371 cat >$TESTDIR/serveme
<<EOF
31373 echo "Valid-requests Root Valid-responses valid-requests Directory Entry Modified Unchanged Argument Argumentx ci co update"
31375 echo "Update-existing ../../home/"
31376 echo "../../home/.bashrc"
31377 echo "/.bashrc/73.50///"
31378 echo "u=rw,g=rw,o=rw"
31380 echo "#! $TESTSHELL"
31381 echo "echo 'gotcha!'"
31386 dotest_fail client-14
"$testcvs update" \
31387 "$CPROG update: Server attempted to update a file via an invalid pathname:
31388 $CPROG \[update aborted\]: \`\.\./\.\./home/.bashrc'\."
31390 # Try the same exploit using the Merged response.
31391 cat >$TESTDIR/serveme
<<EOF
31393 echo "Valid-requests Root Valid-responses valid-requests Directory Entry Modified Unchanged Argument Argumentx ci co update"
31395 echo "Merged $HOME/"
31396 echo "$HOME/.bashrc"
31397 echo "/.bashrc/73.50///"
31398 echo "u=rw,g=rw,o=rw"
31400 echo "#! $TESTSHELL"
31401 echo "echo 'gotcha!'"
31406 dotest_fail client-15
"$testcvs update" \
31407 "$CPROG update: Server attempted to update a file via an invalid pathname:
31408 $CPROG \[update aborted\]: \`$HOME/.bashrc'\."
31410 # Now try using the Updated response
31411 cat >$TESTDIR/serveme
<<EOF
31413 echo "Valid-requests Root Valid-responses valid-requests Directory Entry Modified Unchanged Argument Argumentx ci co update"
31415 echo "Updated ../../home/"
31416 echo "../../home/.bashrc"
31417 echo "/.bashrc/73.50///"
31418 echo "u=rw,g=rw,o=rw"
31420 echo "#! $TESTSHELL"
31421 echo "echo 'gotcha!'"
31426 dotest_fail client-16
"$testcvs update" \
31427 "$CPROG update: Server attempted to update a file via an invalid pathname:
31428 $CPROG \[update aborted\]: \`\.\./\.\./home/.bashrc'\."
31430 # Try the same exploit using the Copy-file response.
31431 # As far as I know, Copy-file was never exploitable either.
31432 cat >$TESTDIR/serveme
<<EOF
31434 echo "Valid-requests Root Valid-responses valid-requests Directory Entry Modified Unchanged Argument Argumentx ci co update"
31438 echo "/innocuous/73.50///"
31439 echo "u=rw,g=rw,o=rw"
31441 echo "#! $TESTSHELL"
31442 echo "echo 'gotcha!'"
31445 echo "$HOME/innocuous"
31450 dotest_fail client-18
"$testcvs update" \
31451 "$CPROG \[update aborted\]: protocol error: Copy-file tried to specify directory"
31453 # And verify that none of the exploits was successful.
31454 dotest client-19
"cat $HOME/.bashrc" \
31456 # This is where login scripts would usually be
31459 # Check that the client detects redirect loops.
31460 cat >$TESTDIR/serveme
<<EOF
31462 echo "Valid-requests Root Valid-responses valid-requests Command-prep Referrer Repository Directory Relative-directory Max-dotdot Static-directory Sticky Entry Kopt Checkin-time Modified Is-modified UseUnchanged Unchanged Notify Hostname LocalDir Questionable Argument Argumentx Global_option Gzip-stream wrapper-sendme-rcsOptions Set Gssapi-authenticate expand-modules ci co update diff log rlog list rlist global-list-quiet ls add remove update-patches gzip-file-contents status rdiff tag rtag import admin export history release watch-on watch-off watch-add watch-remove watchers editors edit init annotate rannotate noop version"
31464 echo "Redirect $CVSROOT"
31466 # Eat up data from the client to avoid broken pipe errors.
31469 echo newstuff
>file1
31471 dotest_fail client-20
"$testcvs ci" \
31472 "$CPROG commit: Examining \.
31473 $CPROG \[commit aborted\]: \`Redirect' loop detected\. Server misconfiguration$QUESTION"
31478 rmdir $TESTDIR/bogus
31479 rm $TESTDIR/serveme
$HOME/.bashrc
31480 CVS_SERVER
=$save_CVS_SERVER; export CVS_SERVER
31486 # Check that a CVSROOT with a "." in the name will work.
31493 CVSROOT_save
=${CVSROOT}
31494 CVSROOT_DIRNAME_save
=${CVSROOT_DIRNAME}
31495 CVSROOT_DIRNAME
=${TESTDIR}/cvs.root
31496 CVSROOT
=`newroot ${CVSROOT_DIRNAME}`
31498 dotest dottedroot-init-1
"${testcvs} init" ""
31501 echo version1
>dir
1/dir
2/file1
31503 dotest dottedroot-1
"${testcvs} import -m '' module1 AUTHOR INITIAL" \
31504 "${SPROG} import: Importing ${CVSROOT_DIRNAME}/module1/dir2
31505 N module1/dir2/file1
31507 No conflicts created by this import"
31510 # This is the test that used to cause an assertion failure
31511 # in recurse.c:do_recursion().
31512 dotest dottedroot-2
"${testcvs} co -rINITIAL module1" \
31513 "${SPROG} checkout: Updating module1
31514 ${SPROG} checkout: Updating module1/dir2
31515 U module1/dir2/file1"
31519 rm -rf ${CVSROOT_DIRNAME}
31521 CVSROOT_DIRNAME
=${CVSROOT_DIRNAME_save}
31522 CVSROOT
=${CVSROOT_save}
31528 # Test that the server defaults to the correct executable in :fork:
31529 # mode. See the note in the TODO at the end of this file about this.
31531 # This test and client should be left after all other references to
31532 # CVS_SERVER are removed from this script.
31534 # The client series of tests already tests that CVS_SERVER is
31535 # working, but that test might be better here.
31537 if test -n "$remotehost"; then
31538 # Don't even try. If our caller specified a remotehost, our
31539 # access method has been determined anyhow.
31542 mkdir fork
; cd fork
31543 save_CVS_SERVER
=$CVS_SERVER
31545 # So looking through $PATH for cvs won't work...
31546 echo "echo junk" >cvs
31548 save_PATH
=$PATH; PATH
=.
:$PATH
31549 # The second error message below is for testing clients without
31551 if ${testcvs_server_support}; then
31552 dotest fork-1
"$testcvs -d:fork:$CVSROOT_DIRNAME version" \
31556 dotest_fail fork-1-noss \
31557 "$testcvs -d:fork:$CVSROOT_DIRNAME version" \
31559 Server: ${CPROG} version: You must set the CVS_SERVER environment variable when
31560 ${CPROG} version: using the :fork: access method\.
31561 ${CPROG} \[version aborted\]: This CVS was not compiled with server support\."
31564 CVS_SERVER
=${save_CVS_SERVER}; export CVS_SERVER
31565 unset save_CVS_SERVER
31566 PATH
=$save_PATH; unset save_PATH
31576 commit-add-missing
)
31577 # Make sure that a commit fails when a `cvs add'ed file has
31578 # been removed from the working directory.
31583 dotest commit-add-missing-1 \
31584 "$testcvs -Q import -m. $module X Y" ''
31587 # Check it out and tag it.
31588 dotest commit-add-missing-2
"$testcvs -Q co $module" ''
31590 dotest commit-add-missing-3
"$testcvs -Q tag -b B" ''
31592 dotest commit-add-missing-4
"$testcvs -Q add $file" ''
31594 dotest_fail commit-add-missing-5
"$testcvs -Q ci -m. $file" \
31595 "${SPROG} commit: Up-to-date check failed for .$file'
31596 ${SPROG} \[commit aborted\]: correct above errors first!"
31601 modify_repo
rm -rf $CVSROOT_DIRNAME/$module
31607 # Check that top-level commits work when CVS/Root
31608 # is overridden by cvs -d.
31610 mkdir
-p 1/subdir
; cd 1
31611 touch file1 subdir
/file2
31612 dotest commit-d-1
"$testcvs -Q import -m. c-d-c X Y" ""
31613 dotest commit-d-2
"$testcvs -Q co c-d-c" ""
31615 echo change
>>file1
; echo another change
>>subdir
/file2
31616 # Changing working root, then override with -d
31617 echo nosuchhost
:/cvs
> CVS
/Root
31618 dotest commit-d-3
"$testcvs -q -d '$CVSROOT' commit -m." \
31619 "$CVSROOT_DIRNAME/c-d-c/file1,v <-- file1
31620 new revision: 1.2; previous revision: 1.1
31621 $CVSROOT_DIRNAME/c-d-c/subdir/file2,v <-- subdir/file2
31622 new revision: 1.2; previous revision: 1.1"
31626 rm -rf 1 cvsroot
/c-d-c
31632 # Check that the CVS/Template directory is being
31633 # properly created.
31634 modify_repo mkdir
-p $CVSROOT_DIRNAME/first
/subdir
31635 modify_repo mkdir
$CVSROOT_DIRNAME/second
31636 mkdir template
; cd template
31638 # check that no CVS/Template is created for an empty rcsinfo
31639 # Note: For cvs clients with no Clear-template response, the
31640 # CVS/Template file will exist and be zero bytes in length.
31641 dotest template-empty-1
"${testcvs} -Q co first" ''
31642 dotest template-empty-2 \
31643 "test ! -s first/CVS/Template" ''
31644 dotest template-empty-3 \
31645 "test ! -s first/subdir/CVS/Template" ''
31648 # create some template files
31649 echo 'CVS: the default template' > ${TESTDIR}/template
/temp.def
31650 echo 'CVS: the first template' > ${TESTDIR}/template
/temp.first
31651 echo 'CVS: the subdir template' > ${TESTDIR}/template
/temp.subdir
31653 dotest template-rcsinfo-1
"${testcvs} -Q co CVSROOT" ''
31655 echo DEFAULT
${TESTDIR}/template
/temp.def
>>rcsinfo
31656 dotest template-rcsinfo-2
"$testcvs -Q ci -m."
31657 # Make sure we get the update without a commit.
31658 dotest template-rcsinfo-3
"${testcvs} -Q ci -m." ''
31659 # Did the CVSROOT/CVS/Template file get the updated version?
31661 dotest template-rcsinfo-4r \
31662 "cmp CVS/Template ${TESTDIR}/template/temp.def" ''
31664 dotest template-rcsinfo-4 \
31665 "test ! -f CVS/Template" ''
31667 echo "^first/subdir ${TESTDIR}/template/temp.subdir" >>rcsinfo
31668 echo "^first ${TESTDIR}/template/temp.first" >>rcsinfo
31669 dotest template-rcsinfo-4.1
"${testcvs} -Q ci -m. rcsinfo"
31670 # Did the CVSROOT/CVS/Template file get the updated version?
31672 dotest template-rcsinfo-5r \
31673 "cmp CVS/Template ${TESTDIR}/template/temp.def" ''
31675 dotest template-rcsinfo-5 \
31676 "test ! -f CVS/Template" ''
31680 # Now checkout the first and second modules and see
31681 # if the proper template has been provided for each
31682 dotest template-first
"${testcvs} co first second" \
31683 "${SPROG} checkout: Updating first
31684 ${SPROG} checkout: Updating first/subdir
31685 ${SPROG} checkout: Updating second"
31688 # When in client/server CVS/Template must exist
31689 dotest template-first-r-1
"test -f first/CVS/Template" ''
31690 dotest template-first-r-2
"test -f first/subdir/CVS/Template" ''
31691 dotest template-first-r-3
"test -f second/CVS/Template" ''
31692 # The value of the CVS/Template should be equal to the
31693 # file called out in the rcsinfo file.
31694 dotest template-first-r-4 \
31695 "cmp first/CVS/Template ${TESTDIR}/template/temp.first" ''
31696 dotest template-first-r-5 \
31697 "cmp first/subdir/CVS/Template ${TESTDIR}/template/temp.subdir" ''
31698 dotest template-first-r-6 \
31699 "cmp second/CVS/Template ${TESTDIR}/template/temp.def" ''
31701 # When in local mode CVS/Template must NOT exist
31702 dotest_fail template-first-1
"test -f first/CVS/Template" ''
31703 dotest_fail template-first-2
"test -f first/subdir/CVS/Template" ''
31704 dotest_fail template-first-3
"test -f second/CVS/Template" ''
31707 # Next, create a new subdirectory and see if it gets the
31708 # correct template or not
31711 dotest template-add-1
"${testcvs} add otherdir" \
31712 "Directory ${CVSROOT_DIRNAME}/second/otherdir added to the repository"
31714 dotest template-add-2r \
31715 "cmp otherdir/CVS/Template ${TESTDIR}/template/temp.def" ''
31717 dotest_fail template-add-2
"test -f otherdir/CVS/Template" ''
31721 # Update the remote template. Then see if doing an
31722 # update of a checked out tree will properly update
31723 # the CVS/Template files.
31724 echo 'CVS: Line two' >> ${TESTDIR}/template
/temp.def
31725 echo 'CVS: Line two' >> ${TESTDIR}/template
/temp.first
31726 echo 'CVS: Line two' >> ${TESTDIR}/template
/temp.subdir
31727 dotest template-second
"${testcvs} update first second" \
31728 "${SPROG} update: Updating first
31729 ${SPROG} update: Updating first/subdir
31730 ${SPROG} update: Updating second
31731 ${SPROG} update: Updating second/otherdir"
31734 dotest template-second-r-1 \
31735 "cmp first/CVS/Template ${TESTDIR}/template/temp.first" ''
31736 dotest template-second-r-2 \
31737 "cmp first/subdir/CVS/Template ${TESTDIR}/template/temp.subdir" ''
31738 dotest template-second-r-3 \
31739 "cmp second/CVS/Template ${TESTDIR}/template/temp.def" ''
31740 dotest template-second-r-4 \
31741 "cmp second/otherdir/CVS/Template ${TESTDIR}/template/temp.def" ''
31743 # When in local mode CVS/Template must NOT exist
31744 dotest_fail template-second-1
"test -f CVS/Template" ''
31745 dotest_fail template-second-2
"test -f subdir/CVS/Template" ''
31746 dotest_fail template-second-3
"test -f second/CVS/Template" ''
31747 dotest_fail template-second-4 \
31748 "test -f second/otherdir/CVS/Template" ''
31750 # Update the remote template with a zero-length template
31751 : > ${TESTDIR}/template
/temp.def
31752 dotest template-third-1
"${testcvs} update second" \
31753 "${SPROG} update: Updating second
31754 ${SPROG} update: Updating second/otherdir"
31757 dotest_fail template-third-r-2
"test -s second/CVS/Template" ''
31758 dotest_fail template-third-r-3
"test -s second/otherdir/CVS/Template" ''
31760 dotest_fail template-third-2
"test -f second/CVS/Template" ''
31761 dotest_fail template-third-3 \
31762 "test -f second/otherdir/CVS/Template" ''
31765 # fun with remote protocols and tags
31769 dotest template-tag-r-1
"${testcvs} -Q add file1" ''
31770 dotest template-tag-r-2
"${testcvs} -Q commit -madd file1"
31771 dotest template-tag-r-3
"${testcvs} -q tag tag" 'T file1'
31772 rm ${CVSROOT_DIRNAME}/CVSROOT
/val-tags
31775 dotest template-tag-r-4
"${testcvs} -Q co -rtag second" ''
31779 dotest template-norcsinfo-1
"${testcvs} up" \
31780 "${SPROG} update: Updating \."
31781 # Did the CVSROOT/CVS/Template file get the updated version?
31783 dotest template-norcsinfo-r-2 \
31784 "cmp CVS/Template ${TESTDIR}/template/temp.def" ''
31786 dotest_fail template-norcsinfo-2
"test -f CVS/Template" ''
31790 dotest template-norcsinfo-3
"${testcvs} -Q ci -m. rcsinfo"
31791 # Did the CVSROOT/CVS/Template file get the updated version?
31792 # The file should be gone or of zero length.
31793 dotest template-norcsinfo-4 \
31794 "test ! -s CVS/Template" ''
31797 dotest template-norcsinfo-5
"${testcvs} update first" \
31798 "${SPROG} update: Updating first
31799 ${SPROG} update: Updating first/subdir"
31801 # Note: For cvs clients with no Clear-template response, the
31802 # CVS/Template file will exist and be zero bytes in length.
31803 dotest template-norcsinfo-6 \
31804 "test ! -s first/CVS/Template" ''
31805 dotest template-norcsinfo-7 \
31806 "test ! -s first/subdir/CVS/Template" ''
31811 modify_repo
rm -rf $CVSROOT_DIRNAME/first
$CVSROOT_DIRNAME/second
31820 # Various tests for a read-only CVS mirror set up as a write-proxy
31821 # for a central server.
31823 # These tests are only meaningful in client/server mode.
31824 if $remote; then :; else
31825 remoteonly writeproxy
31829 if $noredirect; then
31830 notnoredirect writeproxy
31835 if test $?
-eq 77; then
31836 skip writeproxy
"$skipreason"
31840 PRIMARY_CVSROOT_DIRNAME_save
=$PRIMARY_CVSROOT_DIRNAME
31841 PRIMARY_CVSROOT_save
=$PRIMARY_CVSROOT
31842 PRIMARY_CVSROOT_DIRNAME
=$TESTDIR/primary_cvsroot
31843 PRIMARY_CVSROOT
=`newroot $PRIMARY_CVSROOT_DIRNAME`
31844 SECONDARY_CVSROOT_DIRNAME_save
=$SECONDARY_CVSROOT_DIRNAME
31845 SECONDARY_CVSROOT_save
=$SECONDARY_CVSROOT
31846 SECONDARY_CVSROOT_DIRNAME
=$TESTDIR/writeproxy_cvsroot
31847 SECONDARY_CVSROOT
=`newroot $SECONDARY_CVSROOT_DIRNAME`
31849 # Initialize the primary repository
31850 dotest writeproxy-init-1
"$testcvs -d$PRIMARY_CVSROOT init"
31851 mkdir writeproxy
; cd writeproxy
31852 mkdir primary
; cd primary
31853 dotest writeproxy-init-2
"$testcvs -Qd$PRIMARY_CVSROOT co CVSROOT"
31855 cat >>loginfo
<<EOF
31856 ALL (cat >/dev/null; echo %R) >$TESTDIR/referrer
31857 ALL $RSYNC -gopr --delete $PRIMARY_CVSROOT_DIRNAME/ $SECONDARY_CVSROOT_DIRNAME
31860 PrimaryServer=$PRIMARY_CVSROOT
31862 dotest writeproxy-init-3 \
31863 "$testcvs -Q ci -mconfigure-writeproxy"
31865 # Quickly verify that the server can resolve symlinks when
31866 # determining whether it is the primary.
31867 # This shouldn't actually change the repository.
31868 save_CVS_SERVER
=$CVS_SERVER
31869 ln -s $PRIMARY_CVSROOT_DIRNAME $TESTDIR/primary_link
31870 dotest writeproxy-0
"$CVS_SERVER server" \
31871 "Valid-requests Root Valid-responses valid-requests Command-prep Referrer Repository Directory Relative-directory Max-dotdot Static-directory Sticky Entry Kopt Checkin-time Modified Is-modified UseUnchanged Unchanged Notify Hostname LocalDir Questionable Argument Argumentx Global_option Gzip-stream wrapper-sendme-rcsOptions Set ${DOTSTAR}expand-modules ci co update diff log rlog list rlist global-list-quiet ls add remove update-patches gzip-file-contents status rdiff tag rtag import admin export history release watch-on watch-off watch-add watch-remove watchers editors edit init annotate rannotate noop version
31876 Root $TESTDIR/primary_link
31877 Valid-responses ok error Valid-requests Redirect Checked-in New-entry Checksum Copy-file Updated Created Update-existing Merged Patched Rcs-diff Mode Mod-time Removed Remove-entry Set-static-directory Clear-static-directory Set-sticky Clear-sticky Edit-file Template Clear-template Notified Module-expansion Wrapper-rcsOption M Mbinary E F MT
31880 Command-prep commit
31884 Argument configure-writeproxy
31888 Entry /checkoutlist/1.1///
31889 Modified checkoutlist
31892 # The "checkoutlist" file is used to support additional version controlled
31893 # administrative files in \$CVSROOT/CVSROOT, such as template files.
31895 # The first entry on a line is a filename which will be checked out from
31896 # the corresponding RCS file in the \$CVSROOT/CVSROOT directory.
31897 # The remainder of the line is an error message to use if the file cannot
31902 # [<whitespace>]<filename>[<whitespace><error message>]<end-of-line>
31904 # comment lines begin with '#'
31907 rm $TESTDIR/primary_link
31909 # And now the secondary.
31910 $RSYNC -gopr $PRIMARY_CVSROOT_DIRNAME/ $SECONDARY_CVSROOT_DIRNAME
31912 # Checkout from secondary
31914 # For now, move the primary root out of the way to satisfy
31915 # ourselves that the data is coming from the secondary.
31916 mv $PRIMARY_CVSROOT_DIRNAME $TESTDIR/save-root
31918 mkdir secondary
; cd secondary
31919 dotest writeproxy-1
"$testcvs -qd$SECONDARY_CVSROOT co CVSROOT" \
31920 "U CVSROOT/checkoutlist
31921 U CVSROOT/commitinfo
31923 U CVSROOT/cvswrappers
31927 U CVSROOT/postadmin
31928 U CVSROOT/postproxy
31930 U CVSROOT/postwatch
31934 U CVSROOT/verifymsg"
31936 # Confirm data present
31938 dotest writeproxy-2
"grep rsync loginfo" \
31939 "ALL $RSYNC -gopr --delete $PRIMARY_CVSROOT_DIRNAME/ $SECONDARY_CVSROOT_DIRNAME"
31940 dotest writeproxy-3
"grep PrimaryServer config" \
31942 PrimaryServer=$PRIMARY_CVSROOT"
31944 # Checkin to secondary
31946 dotest writeproxy-4
"$testcvs -Qd$SECONDARY_CVSROOT co -ldtop ."
31950 # Have to move the primary root back before we can perform write
31952 mv $TESTDIR/save-root
$PRIMARY_CVSROOT_DIRNAME
31954 dotest writeproxy-5
"$testcvs -Q add firstdir"
31956 echo now you see me
>file1
31957 dotest writeproxy-6
"$testcvs -Q add file1"
31958 dotest writeproxy-6a
"grep file1 CVS/Entries >/dev/null"
31959 dotest writeproxy-7
"$testcvs -Q ci -mfirst-file file1"
31961 # Verify that the server got the correct referrer.
31963 # This happens even when using a :fork:ed server because CVS is
31964 # hardcoded to support only :ext: servers.
31966 # This test meaningfully detects that a referrer was passed in fork
31967 # mode because the only time the referrer string can be altered from
31968 # its original state is when the server sends a Referrer response.
31969 # If the client were not parsing and resending the referrer, this
31970 # string would still match $SECONDARY_CVSROOT_DIRNAME.
31971 dotest writeproxy-7a
"cat $TESTDIR/referrer" \
31972 ":ext:$username@$hostname$SECONDARY_CVSROOT_DIRNAME"
31974 # Make sure the sync took place
31975 dotest writeproxy-7b
"$testcvs -Q up"
31977 # Checkout from primary
31978 cd ..
/..
/..
/primary
31979 dotest writeproxy-8
"$testcvs -qd$PRIMARY_CVSROOT co firstdir" \
31982 # Confirm data present
31983 # - This test indirectly confirms that the commit did not take
31984 # place on the secondary.
31986 dotest writeproxy-9
"cat file1" "now you see me"
31988 # Commit to primary
31989 echo now you see me again
>file1
31990 dotest writeproxy-10
"$testcvs -Q ci -medit file1"
31992 # Update from secondary
31993 cd ..
/..
/secondary
/top
/firstdir
31994 dotest writeproxy-11
"$testcvs -q up" \
31997 # Confirm data present
31998 dotest writeproxy-12
"cat file1" "now you see me again"
32000 # Test a failing rsync
32002 sed \
$d <loginfo
>tmp
32005 "ALL echo >&2 'Im rsync and I encountered an error!'; cat >/dev/null; exit 1"
32006 dotest writeproxy-init-13
"$testcvs -Q ci -mbreak-rsync" \
32007 "Im rsync and I encountered an error!"
32008 echo "# a comment" >>loginfo
32009 dotest writeproxy-13
"$testcvs -Q ci -mtest-broken-rsync" \
32010 "Im rsync and I encountered an error!"
32012 dotest_fail writeproxy-14
"$testcvs up" \
32013 "$SPROG update: Updating \.
32014 $SPROG \[update aborted\]: could not find desired version 1\.4 in $PRIMARY_CVSROOT_DIRNAME/CVSROOT/loginfo,v"
32018 rm -r writeproxy
$TESTDIR/referrer
32019 rm -rf $PRIMARY_CVSROOT_DIRNAME $SECONDARY_CVSROOT_DIRNAME
32020 PRIMARY_CVSROOT_DIRNAME
=$PRIMARY_CVSROOT_DIRNAME_save
32021 PRIMARY_CVSROOT
=$PRIMARY_CVSROOT_save
32022 SECONDARY_CVSROOT_DIRNAME
=$SECONDARY_CVSROOT_DIRNAME_save
32023 SECONDARY_CVSROOT
=$SECONDARY_CVSROOT_save
32028 writeproxy-noredirect
)
32029 # Various tests for a read-only CVS mirror set up as a write-proxy
32030 # for a central server.
32032 # These tests are only meaningful in client/server mode.
32034 # These tests are a few simple tests for a writeproxy setup with a
32035 # client that can't handle the `Redirect' response. Mostly they
32036 # parallel the "writeproxy" tests but, in the style of the "server",
32037 # "server2", "pserver", and related tests, they bypass the CVS client
32038 # for write commands by piping data into a server on STDIN to mimic
32039 # a client that cannot handle the `Redirect' response.
32040 if $remote; then :; else
32041 remoteonly writeproxy-noredirect
32046 if test $?
-eq 77; then
32047 skip writeproxy-noredirect
"$skipreason"
32051 PRIMARY_CVSROOT_DIRNAME_save
=$PRIMARY_CVSROOT_DIRNAME
32052 PRIMARY_CVSROOT_save
=$PRIMARY_CVSROOT
32053 PRIMARY_CVSROOT_DIRNAME
=$TESTDIR/primary_cvsroot
32054 PRIMARY_CVSROOT
=`newroot $PRIMARY_CVSROOT_DIRNAME`
32055 SECONDARY_CVSROOT_DIRNAME_save
=$SECONDARY_CVSROOT_DIRNAME
32056 SECONDARY_CVSROOT_DIRNAME
=$TESTDIR/writeproxy_cvsroot
32058 # Initialize the primary repository
32059 dotest writeproxy-noredirect-init-1 \
32060 "$testcvs -d'$PRIMARY_CVSROOT' init"
32061 mkdir writeproxy-noredirect
; cd writeproxy-noredirect
32062 mkdir primary
; cd primary
32063 dotest writeproxy-noredirect-init-2 \
32064 "$testcvs -Qd'$PRIMARY_CVSROOT' co CVSROOT"
32066 cat >>loginfo
<<EOF
32067 ALL $RSYNC -gopr --delete $PRIMARY_CVSROOT_DIRNAME/ $SECONDARY_CVSROOT_DIRNAME
32070 PrimaryServer=$PRIMARY_CVSROOT
32072 dotest writeproxy-noredirect-init-3 \
32073 "$testcvs -Q ci -mconfigure-writeproxy"
32075 # And now the secondary.
32076 $RSYNC -gopr $PRIMARY_CVSROOT_DIRNAME/ $SECONDARY_CVSROOT_DIRNAME
32078 CVS_SERVER_save
=$CVS_SERVER
32079 CVS_SERVER_secondary
=$TESTDIR/writeproxy-secondary-wrapper
32080 CVS_SERVER
=$CVS_SERVER_secondary
32082 # Wrap the CVS server to allow --primary-root to be set by the
32084 cat <<EOF >$TESTDIR/writeproxy-secondary-wrapper
32086 CVS_SERVER=$TESTDIR/writeproxy-primary-wrapper
32089 # No need to check the PID of the last client since we are testing with
32090 # Redirect disabled.
32091 proot_arg="--allow-root $SECONDARY_CVSROOT_DIRNAME"
32092 exec $servercvs \$proot_arg "\$@"
32094 cat <<EOF >$TESTDIR/writeproxy-primary-wrapper
32096 #CVS_SERVER_LOG=/tmp/cvsprimarylog
32097 exec $servercvs "\$@"
32100 chmod a
+x
$TESTDIR/writeproxy-secondary-wrapper \
32101 $TESTDIR/writeproxy-primary-wrapper
32103 # Checkout from secondary
32105 # It may look like we are checking out from the primary here, but
32106 # in fork mode, the deciding factor is the PrimaryServer translation
32109 # When the primary and secondary hostname were different, the server
32110 # the client is talking directly to is more obvious.
32112 # For now, move the primary root out of the way to satisfy
32113 # ourselves that the data is coming from the secondary.
32114 mv $PRIMARY_CVSROOT_DIRNAME $TESTDIR/save-root
32116 mkdir secondary
; cd secondary
32117 dotest writeproxy-noredirect-1 \
32118 "$testcvs -qd'$PRIMARY_CVSROOT' co CVSROOT" \
32119 "U CVSROOT/checkoutlist
32120 U CVSROOT/commitinfo
32122 U CVSROOT/cvswrappers
32126 U CVSROOT/postadmin
32127 U CVSROOT/postproxy
32129 U CVSROOT/postwatch
32133 U CVSROOT/verifymsg"
32135 # Confirm data present
32137 dotest writeproxy-noredirect-2
"grep rsync loginfo" \
32138 "ALL $RSYNC -gopr --delete $PRIMARY_CVSROOT_DIRNAME/ $SECONDARY_CVSROOT_DIRNAME"
32139 dotest writeproxy-noredirect-3
"grep PrimaryServer config" \
32141 PrimaryServer=$PRIMARY_CVSROOT"
32143 # Checkin to secondary
32145 dotest writeproxy-noredirect-4 \
32146 "$testcvs -Qd'$PRIMARY_CVSROOT' co -ldtop ."
32150 # Have to move the primary root back before we can perform write
32152 mv $TESTDIR/save-root
$PRIMARY_CVSROOT_DIRNAME
32154 dotest writeproxy-noredirect-5
"$CVS_SERVER server" \
32155 "Valid-requests Root Valid-responses valid-requests Command-prep Referrer Repository Directory Relative-directory Max-dotdot Static-directory Sticky Entry Kopt Checkin-time Modified Is-modified UseUnchanged Unchanged Notify Hostname LocalDir Questionable Argument Argumentx Global_option Gzip-stream wrapper-sendme-rcsOptions Set ${DOTSTAR}expand-modules ci co update diff log rlog list rlist global-list-quiet ls add remove update-patches gzip-file-contents status rdiff tag rtag import admin export history release watch-on watch-off watch-add watch-remove watchers editors edit init annotate rannotate noop version
32159 Clear-template firstdir/
32163 Root $PRIMARY_CVSROOT_DIRNAME
32164 Valid-responses ok error Valid-requests Checked-in New-entry Checksum Copy-file Updated Created Update-existing Merged Patched Rcs-diff Mode Mod-time Removed Remove-entry Set-static-directory Clear-static-directory Set-sticky Clear-sticky Template Clear-template Notified Module-expansion Wrapper-rcsOption M Mbinary E F MT
32170 wrapper-sendme-rcsOptions
32180 # Gotta update the workspace ourselves since we bypassed the client.
32181 cp -R CVS firstdir
/CVS
32182 echo "firstdir" >firstdir
/CVS
/Repository
32185 echo now you see me
>file1
32186 dotest writeproxy-noredirect-6
"$CVS_SERVER server" \
32187 "Valid-requests Root Valid-responses valid-requests Command-prep Referrer Repository Directory Relative-directory Max-dotdot Static-directory Sticky Entry Kopt Checkin-time Modified Is-modified UseUnchanged Unchanged Notify Hostname LocalDir Questionable Argument Argumentx Global_option Gzip-stream wrapper-sendme-rcsOptions Set ${DOTSTAR}expand-modules ci co update diff log rlog list rlist global-list-quiet ls add remove update-patches gzip-file-contents status rdiff tag rtag import admin export history release watch-on watch-off watch-add watch-remove watchers editors edit init annotate rannotate noop version
32196 Root $PRIMARY_CVSROOT_DIRNAME
32197 Valid-responses ok error Valid-requests Checked-in New-entry Checksum Copy-file Updated Created Update-existing Merged Patched Rcs-diff Mode Mod-time Removed Remove-entry Set-static-directory Clear-static-directory Set-sticky Clear-sticky Template Clear-template Notified Module-expansion Wrapper-rcsOption M Mbinary E F MT
32203 wrapper-sendme-rcsOptions
32212 # Have to add it to the workspace ourselves again since we are
32213 # bypassing the client.
32214 echo /file1/0/dummy
+timestamp
// >>CVS
/Entries
32216 dotest writeproxy-noredirect-7
"$CVS_SERVER server" \
32217 "Valid-requests Root Valid-responses valid-requests Command-prep Referrer Repository Directory Relative-directory Max-dotdot Static-directory Sticky Entry Kopt Checkin-time Modified Is-modified UseUnchanged Unchanged Notify Hostname LocalDir Questionable Argument Argumentx Global_option Gzip-stream wrapper-sendme-rcsOptions Set ${DOTSTAR}expand-modules ci co update diff log rlog list rlist global-list-quiet ls add remove update-patches gzip-file-contents status rdiff tag rtag import admin export history release watch-on watch-off watch-add watch-remove watchers editors edit init annotate rannotate noop version
32226 Root $PRIMARY_CVSROOT_DIRNAME
32227 Valid-responses ok error Valid-requests Checked-in New-entry Checksum Copy-file Updated Created Update-existing Merged Patched Rcs-diff Mode Mod-time Removed Remove-entry Set-static-directory Clear-static-directory Set-sticky Clear-sticky Template Clear-template Notified Module-expansion Wrapper-rcsOption M Mbinary E F MT
32230 Command-prep commit
32234 Argument first-file
32238 Entry /file1/0/+modified//
32247 # Have to add it to the workspace ourselves again since we are
32248 # bypassing the client.
32249 echo D
>CVS
/Entries
32250 echo /file1/1.1/dummy
+timestamp
// >>CVS
/Entries
32252 # Make sure the sync took place
32253 dotest writeproxy-noredirect-7a
"$testcvs -Q up"
32255 CVS_SERVER
=$servercvs
32256 # Checkout from primary
32257 cd ..
/..
/..
/primary
32258 dotest writeproxy-noredirect-8 \
32259 "$testcvs -qd'$PRIMARY_CVSROOT' co firstdir" \
32262 # Confirm data present
32263 # - This test indirectly confirms that the commit did not take
32264 # place on the secondary.
32266 dotest writeproxy-noredirect-9
"cat file1" "now you see me"
32268 # Commit to primary
32269 echo now you see me again
>file1
32270 dotest writeproxy-noredirect-10
"$testcvs -Q ci -medit file1"
32272 CVS_SERVER
=$CVS_SERVER_secondary
32273 # Update from secondary
32274 cd ..
/..
/secondary
/top
/firstdir
32275 dotest writeproxy-noredirect-11
"$testcvs -q up" "U file1"
32277 # Confirm data present
32278 dotest writeproxy-noredirect-12
"cat file1" "now you see me again"
32282 rm -r writeproxy-noredirect
32283 rm -rf $PRIMARY_CVSROOT_DIRNAME $SECONDARY_CVSROOT_DIRNAME
32284 rm $TESTDIR/writeproxy-secondary-wrapper \
32285 $TESTDIR/writeproxy-primary-wrapper
32286 CVS_SERVER
=$CVS_SERVER_save
32287 PRIMARY_CVSROOT_DIRNAME
=$PRIMARY_CVSROOT_DIRNAME_save
32288 PRIMARY_CVSROOT
=$PRIMARY_CVSROOT_save
32289 SECONDARY_CVSROOT_DIRNAME
=$SECONDARY_CVSROOT_DIRNAME_save
32295 # Various tests for a read-only CVS mirror set up as a write-proxy
32296 # for a central server accessed via the :ext: method.
32298 # Mostly these tests are intended to set up for the final test which
32299 # verifies that the server registers the referrer.
32300 if $remote; then :; else
32301 remoteonly writeproxy-ssh
32305 if $noredirect; then
32306 notnoredirect writeproxy-ssh
32310 require_rsh
"$CVS_RSH"
32311 if test $?
-eq 77; then
32312 skip writeproxy-ssh
"$skipreason"
32317 if test $?
-eq 77; then
32318 skip writeproxy-ssh
"$skipreason"
32323 PRIMARY_CVSROOT_DIRNAME_save
=$PRIMARY_CVSROOT_DIRNAME
32324 PRIMARY_CVSROOT_save
=$PRIMARY_CVSROOT
32325 SECONDARY_CVSROOT_DIRNAME_save
=$SECONDARY_CVSROOT_DIRNAME
32326 SECONDARY_CVSROOT_save
=$SECONDARY_CVSROOT
32329 PRIMARY_CVSROOT_DIRNAME
=$TESTDIR/primary_cvsroot
32330 PRIMARY_CVSROOT
=:ext
:$host$PRIMARY_CVSROOT_DIRNAME
32331 SECONDARY_CVSROOT_DIRNAME
=$TESTDIR/writeproxy_cvsroot
32332 SECONDARY_CVSROOT
=":ext;Redirect=yes:$host$SECONDARY_CVSROOT_DIRNAME"
32334 # Initialize the primary repository
32335 dotest writeproxy-ssh-init-1
"$testcvs -d$PRIMARY_CVSROOT init"
32336 mkdir writeproxy-ssh
; cd writeproxy-ssh
32337 mkdir primary
; cd primary
32338 dotest writeproxy-ssh-init-2
"$testcvs -Qd$PRIMARY_CVSROOT co CVSROOT"
32340 cat >>loginfo
<<EOF
32341 ALL $RSYNC -gopr --delete $PRIMARY_CVSROOT_DIRNAME/ $SECONDARY_CVSROOT_DIRNAME
32343 cat >>loginfo
<<EOF
32344 ALL echo Referrer=%R; cat >/dev/null
32347 PrimaryServer=$PRIMARY_CVSROOT
32349 dotest writeproxy-ssh-init-3 \
32350 "$testcvs -Q ci -mconfigure-writeproxy-ssh" \
32353 # And now the secondary.
32354 $RSYNC -gopr $PRIMARY_CVSROOT_DIRNAME/ $SECONDARY_CVSROOT_DIRNAME
32356 # Checkout from secondary
32358 # For now, move the primary root out of the way to satisfy
32359 # ourselves that the data is coming from the secondary.
32360 mv $PRIMARY_CVSROOT_DIRNAME $TESTDIR/save-root
32362 # Checkin to secondary
32364 save_CVSROOT
=$CVSROOT
32365 CVSROOT
=$SECONDARY_CVSROOT
32367 dotest writeproxy-ssh-1
"$testcvs -Q co -ldtop ."
32368 CVSROOT
=$save_CVSROOT
32373 # Have to move the primary root back before we can perform write
32375 mv $TESTDIR/save-root
$PRIMARY_CVSROOT_DIRNAME
32377 dotest writeproxy-ssh-2
"$testcvs -Q add firstdir" \
32378 "Referrer=:ext:$username@$hostname$SECONDARY_CVSROOT_DIRNAME"
32381 echo now you see me
>file1
32382 dotest writeproxy-ssh-3
"$testcvs -Q add file1"
32383 dotest writeproxy-ssh-4
"$testcvs -Q ci -mfirst-file file1" \
32384 "Referrer=:ext:$username@$hostname$SECONDARY_CVSROOT_DIRNAME"
32388 rm -r writeproxy-ssh
32389 rm -rf $PRIMARY_CVSROOT_DIRNAME $SECONDARY_CVSROOT_DIRNAME
32390 PRIMARY_CVSROOT_DIRNAME
=$PRIMARY_CVSROOT_DIRNAME_save
32391 PRIMARY_CVSROOT
=$PRIMARY_CVSROOT_save
32392 SECONDARY_CVSROOT_DIRNAME
=$SECONDARY_CVSROOT_DIRNAME_save
32393 SECONDARY_CVSROOT
=$SECONDARY_CVSROOT_save
32398 writeproxy-ssh-noredirect
)
32399 # Various tests for a read-only CVS mirror set up as a write-proxy
32400 # for a central server accessed via the :ext: method.
32402 # Mostly these tests are intended to set up for the final test which
32403 # verifies that the server registers the referrer.
32404 if $remote; then :; else
32405 remoteonly writeproxy-ssh-noredirect
32409 require_rsh
"$CVS_RSH"
32410 if test $?
-eq 77; then
32411 skip writeproxy-ssh-noredirect
"$skipreason"
32416 if test $?
-eq 77; then
32417 skip writeproxy-ssh-noredirect
"$skipreason"
32422 PRIMARY_CVSROOT_DIRNAME_save
=$PRIMARY_CVSROOT_DIRNAME
32423 PRIMARY_CVSROOT_save
=$PRIMARY_CVSROOT
32424 SECONDARY_CVSROOT_DIRNAME_save
=$SECONDARY_CVSROOT_DIRNAME
32425 SECONDARY_CVSROOT_save
=$SECONDARY_CVSROOT
32428 PRIMARY_CVSROOT_DIRNAME
=$TESTDIR/primary_cvsroot
32429 PRIMARY_CVSROOT
=:ext
:$host$PRIMARY_CVSROOT_DIRNAME
32430 SECONDARY_CVSROOT_DIRNAME
=$TESTDIR/writeproxy_cvsroot
32431 SECONDARY_CVSROOT
=":ext;Redirect=no:$host$PRIMARY_CVSROOT_DIRNAME"
32433 # Initialize the primary repository
32434 dotest writeproxy-ssh-noredirect-init-1 \
32435 "$testcvs -d$PRIMARY_CVSROOT init"
32436 mkdir writeproxy-ssh-noredirect
; cd writeproxy-ssh-noredirect
32437 mkdir primary
; cd primary
32438 dotest writeproxy-ssh-noredirect-init-2 \
32439 "$testcvs -Qd$PRIMARY_CVSROOT co CVSROOT"
32441 cat >>loginfo
<<EOF
32442 ALL $RSYNC -gopr --delete $PRIMARY_CVSROOT_DIRNAME/ $SECONDARY_CVSROOT_DIRNAME
32444 cat >>loginfo
<<EOF
32445 ALL echo Referrer=%R; cat >/dev/null
32448 PrimaryServer=$PRIMARY_CVSROOT
32450 dotest writeproxy-ssh-noredirect-init-3 \
32451 "$testcvs -Q ci -mconfigure-writeproxy-ssh-noredirect" \
32454 # And now the secondary.
32455 $RSYNC -gopr $PRIMARY_CVSROOT_DIRNAME/ $SECONDARY_CVSROOT_DIRNAME
32457 # Wrap the CVS server to allow --primary-root to be set by the
32459 cat <<EOF >$TESTDIR/writeproxy-secondary-wrapper
32461 CVS_SERVER=$TESTDIR/writeproxy-primary-wrapper
32464 # No need to check the PID of the last client since we are testing with
32465 # Redirect disabled.
32466 proot_arg="--allow-root=$SECONDARY_CVSROOT_DIRNAME"
32467 exec $CVS_SERVER \$proot_arg "\$@"
32469 cat <<EOF >$TESTDIR/writeproxy-primary-wrapper
32471 if test -n "\$CVS_SERVER_LOG"; then
32472 CVS_SERVER_LOG=$TMPDIR/cvsprimarylog; export CVS_SERVER_LOG
32474 exec $CVS_SERVER "\$@"
32477 CVS_SERVER_save
=$CVS_SERVER
32478 CVS_SERVER_secondary
=$TESTDIR/writeproxy-secondary-wrapper
32479 CVS_SERVER
=$CVS_SERVER_secondary
32481 chmod a
+x
$TESTDIR/writeproxy-secondary-wrapper \
32482 $TESTDIR/writeproxy-primary-wrapper
32484 # Checkout from secondary
32486 # For now, move the primary root out of the way to satisfy
32487 # ourselves that the data is coming from the secondary.
32488 mv $PRIMARY_CVSROOT_DIRNAME $TESTDIR/save-root
32490 # Checkin to secondary
32492 dotest writeproxy-ssh-noredirect-1 \
32493 "$testcvs -qd '$SECONDARY_CVSROOT' co -ldtop ."
32498 # Have to move the primary root back before we can perform write
32500 mv $TESTDIR/save-root
$PRIMARY_CVSROOT_DIRNAME
32502 dotest writeproxy-ssh-noredirect-2
"$testcvs -Q add firstdir" \
32506 echo now you see me
>file1
32507 dotest writeproxy-ssh-noredirect-3
"$testcvs -Q add file1"
32508 dotest writeproxy-ssh-noredirect-4 \
32509 "$testcvs -Q ci -mfirst-file file1" \
32514 rm -r writeproxy-ssh-noredirect
32515 rm -rf $PRIMARY_CVSROOT_DIRNAME $SECONDARY_CVSROOT_DIRNAME
32516 PRIMARY_CVSROOT_DIRNAME
=$PRIMARY_CVSROOT_DIRNAME_save
32517 PRIMARY_CVSROOT
=$PRIMARY_CVSROOT_save
32518 SECONDARY_CVSROOT_DIRNAME
=$SECONDARY_CVSROOT_DIRNAME_save
32519 SECONDARY_CVSROOT
=$SECONDARY_CVSROOT_save
32520 rm $TESTDIR/writeproxy-secondary-wrapper \
32521 $TESTDIR/writeproxy-primary-wrapper
32522 CVS_SERVER
=$CVS_SERVER_save
32528 # Check that there are no core dumps lurking in the trace
32531 # Perform some cleanup for normalized testing...
32532 rm ${CVSROOT_DIRNAME}/CVSROOT
/history
32533 rm -f ${CVSROOT_DIRNAME}/CVSROOT
/cvsignore
32534 rm -f ${CVSROOT_DIRNAME}/CVSROOT
/cvsignore
,v
32536 # checkout the trace option
32538 mkdir trace
&& cd trace
32539 mkdir imp
&& cd imp
32542 dotest_sort trace-1
"${testcvs} -t -t -t init" \
32543 " *-> Lock_Cleanup()
32544 *-> RCS_checkout (checkoutlist,v, , , , \.#[0-9][0-9]*)
32545 *-> RCS_checkout (commitinfo,v, , , , \.#[0-9][0-9]*)
32546 *-> RCS_checkout (config,v, , , , \.#[0-9][0-9]*)
32547 *-> RCS_checkout (cvswrappers,v, , , , \.#[0-9][0-9]*)
32548 *-> RCS_checkout (loginfo,v, , , , \.#[0-9][0-9]*)
32549 *-> RCS_checkout (modules,v, , , , \.#[0-9][0-9]*)
32550 *-> RCS_checkout (notify,v, , , , \.#[0-9][0-9]*)
32551 *-> RCS_checkout (postadmin,v, , , , \.#[0-9][0-9]*)
32552 *-> RCS_checkout (postproxy,v, , , , \.#[0-9][0-9]*)
32553 *-> RCS_checkout (posttag,v, , , , \.#[0-9][0-9]*)
32554 *-> RCS_checkout (postwatch,v, , , , \.#[0-9][0-9]*)
32555 *-> RCS_checkout (preproxy,v, , , , \.#[0-9][0-9]*)
32556 *-> RCS_checkout (rcsinfo,v, , , , \.#[0-9][0-9]*)
32557 *-> RCS_checkout (taginfo,v, , , , \.#[0-9][0-9]*)
32558 *-> RCS_checkout (verifymsg,v, , , , \.#[0-9][0-9]*)
32559 *-> Simple_Lock_Cleanup()
32560 *-> main loop with CVSROOT=${CVSROOT_DIRNAME}
32561 *-> parse_cvsroot ( ${CVSROOT_DIRNAME} )
32563 *-> unlink_file(\.#[0-9][0-9]*)
32564 *-> unlink_file(\.#[0-9][0-9]*)
32565 *-> unlink_file(\.#[0-9][0-9]*)
32566 *-> unlink_file(\.#[0-9][0-9]*)
32567 *-> unlink_file(\.#[0-9][0-9]*)
32568 *-> unlink_file(\.#[0-9][0-9]*)
32569 *-> unlink_file(\.#[0-9][0-9]*)
32570 *-> unlink_file(\.#[0-9][0-9]*)
32571 *-> unlink_file(\.#[0-9][0-9]*)
32572 *-> unlink_file(\.#[0-9][0-9]*)
32573 *-> unlink_file(\.#[0-9][0-9]*)
32574 *-> unlink_file(\.#[0-9][0-9]*)
32575 *-> unlink_file(\.#[0-9][0-9]*)
32576 *-> unlink_file(\.#checkoutlist)
32577 *-> unlink_file(\.#commitinfo)
32578 *-> unlink_file(\.#config)
32579 *-> unlink_file(\.#cvswrappers)
32580 *-> unlink_file(\.#loginfo)
32581 *-> unlink_file(\.#modules)
32582 *-> unlink_file(\.#notify)
32583 *-> unlink_file(\.#postadmin)
32584 *-> unlink_file(\.#postproxy)
32585 *-> unlink_file(\.#posttag)
32586 *-> unlink_file(\.#postwatch)
32587 *-> unlink_file(\.#preproxy)
32588 *-> unlink_file(\.#rcsinfo)
32589 *-> unlink_file(\.#taginfo)
32590 *-> unlink_file(\.#verifymsg)
32591 *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
32592 *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )" \
32594 *-> Forking server: ${CVS_SERVER} server
32595 *-> main loop with CVSROOT=${CVSROOT}
32596 *-> parse_cvsroot ( ${CVSROOT} )
32597 *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
32598 *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
32599 *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
32600 S -> CVS_SERVER_SLEEP not set\.
32601 S -> Lock_Cleanup()
32602 S -> Lock_Cleanup()
32603 S -> RCS_checkout (checkoutlist,v, , , , \.#[0-9][0-9]*)
32604 S -> RCS_checkout (commitinfo,v, , , , \.#[0-9][0-9]*)
32605 S -> RCS_checkout (config,v, , , , \.#[0-9][0-9]*)
32606 S -> RCS_checkout (cvswrappers,v, , , , \.#[0-9][0-9]*)
32607 S -> RCS_checkout (loginfo,v, , , , \.#[0-9][0-9]*)
32608 S -> RCS_checkout (modules,v, , , , \.#[0-9][0-9]*)
32609 S -> RCS_checkout (notify,v, , , , \.#[0-9][0-9]*)
32610 S -> RCS_checkout (postadmin,v, , , , \.#[0-9][0-9]*)
32611 S -> RCS_checkout (postproxy,v, , , , \.#[0-9][0-9]*)
32612 S -> RCS_checkout (posttag,v, , , , \.#[0-9][0-9]*)
32613 S -> RCS_checkout (postwatch,v, , , , \.#[0-9][0-9]*)
32614 S -> RCS_checkout (preproxy,v, , , , \.#[0-9][0-9]*)
32615 S -> RCS_checkout (rcsinfo,v, , , , \.#[0-9][0-9]*)
32616 S -> RCS_checkout (taginfo,v, , , , \.#[0-9][0-9]*)
32617 S -> RCS_checkout (verifymsg,v, , , , \.#[0-9][0-9]*)
32618 S -> Simple_Lock_Cleanup()
32619 S -> Simple_Lock_Cleanup()
32620 S -> do_cvs_command (init)
32621 S -> remove_locks()
32622 S -> remove_locks()
32623 S -> server_cleanup()
32624 S -> server_cleanup()
32625 S -> server_notify()
32626 S -> unlink_file(\.#[0-9][0-9]*)
32627 S -> unlink_file(\.#[0-9][0-9]*)
32628 S -> unlink_file(\.#[0-9][0-9]*)
32629 S -> unlink_file(\.#[0-9][0-9]*)
32630 S -> unlink_file(\.#[0-9][0-9]*)
32631 S -> unlink_file(\.#[0-9][0-9]*)
32632 S -> unlink_file(\.#[0-9][0-9]*)
32633 S -> unlink_file(\.#[0-9][0-9]*)
32634 S -> unlink_file(\.#[0-9][0-9]*)
32635 S -> unlink_file(\.#[0-9][0-9]*)
32636 S -> unlink_file(\.#[0-9][0-9]*)
32637 S -> unlink_file(\.#[0-9][0-9]*)
32638 S -> unlink_file(\.#[0-9][0-9]*)
32639 S -> unlink_file(\.#checkoutlist)
32640 S -> unlink_file(\.#commitinfo)
32641 S -> unlink_file(\.#config)
32642 S -> unlink_file(\.#cvswrappers)
32643 S -> unlink_file(\.#loginfo)
32644 S -> unlink_file(\.#modules)
32645 S -> unlink_file(\.#notify)
32646 S -> unlink_file(\.#postadmin)
32647 S -> unlink_file(\.#postproxy)
32648 S -> unlink_file(\.#posttag)
32649 S -> unlink_file(\.#postwatch)
32650 S -> unlink_file(\.#preproxy)
32651 S -> unlink_file(\.#rcsinfo)
32652 S -> unlink_file(\.#taginfo)
32653 S -> unlink_file(\.#verifymsg)" \
32655 dotest_sort trace-2 \
32656 "${testcvs} -t -t -t import -mimport trace MYVENDOR version-1" \
32660 *-> Parse_Info (${CVSROOT_DIRNAME}/CVSROOT/loginfo, trace, ALL)
32661 *-> Parse_Info (${CVSROOT_DIRNAME}/CVSROOT/verifymsg, trace, not ALL)
32662 *-> Simple_Lock_Cleanup()
32663 *-> main loop with CVSROOT=${CVSROOT_DIRNAME}
32664 *-> parse_cvsroot ( ${CVSROOT_DIRNAME} )
32666 *-> safe_location( where=(null) )
32667 *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
32668 *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
32670 No conflicts created by this import" \
32674 *-> Forking server: ${CVS_SERVER} server
32675 *-> Sending file \`file1' to server
32676 *-> main loop with CVSROOT=${CVSROOT}
32677 *-> parse_cvsroot ( ${CVSROOT} )
32678 *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
32679 *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
32680 *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
32682 No conflicts created by this import
32683 S -> CVS_SERVER_SLEEP not set\.
32684 S -> Lock_Cleanup()
32685 S -> Lock_Cleanup()
32686 S -> Parse_Info (${CVSROOT_DIRNAME}/CVSROOT/loginfo, trace, ALL)
32687 S -> Parse_Info (${CVSROOT_DIRNAME}/CVSROOT/verifymsg, trace, not ALL)
32688 S -> Simple_Lock_Cleanup()
32689 S -> Simple_Lock_Cleanup()
32690 S -> dirswitch (\., ${CVSROOT_DIRNAME}/trace)
32691 S -> do_cvs_command (import)
32692 S -> remove_locks()
32693 S -> remove_locks()
32694 S -> safe_location( where=(null) )
32695 S -> serve_directory (\.)
32696 S -> server_cleanup()
32697 S -> server_cleanup()
32698 S -> server_notify()"
32703 dotest_sort trace-3
"${testcvs} -t -t -t co trace" \
32704 " *callerdat=${PFMT}, argc=0, argv=${PFMT},
32705 *direntproc=${PFMT}, dirleavproc=${PFMT},
32706 *dosrcs=1, repository_in=${CVSROOT_DIRNAME}/trace )
32707 *local=0, which=3, aflag=0,
32708 *locktype=1, update_preload=trace
32710 *-> Create_Admin (\., trace, ${CVSROOT_DIRNAME}/trace, , , 0, 0, 1)
32711 *-> Leaving do_recursion ( frame=${PFMT} )
32712 *-> Leaving do_recursion ( frame=${PFMT} )
32714 *-> RCS_checkout (${CVSROOT_DIRNAME}/trace/file1,v, 1\.1\.1\.1, , , file1)
32715 *-> Reader_Lock(${CVSROOT_DIRNAME}/trace)
32716 *-> Register(file1, 1\.1\.1\.1, ${DATE}, , )
32717 *-> Simple_Lock_Cleanup()
32718 *-> Simple_Lock_Cleanup()
32719 *-> Write_Template (trace, ${CVSROOT_DIRNAME}/trace)
32720 *-> chmod(file1,[0-7][0-7]*)
32721 *-> do_module (trace, Updating, NULL, NULL)
32722 *-> do_recursion ( frame=${PFMT} )
32723 *-> do_recursion ( frame=${PFMT} )
32724 *-> fopen(${CVSROOT_DIRNAME}/CVSROOT/history,a)
32725 *-> lock_name (${CVSROOT_DIRNAME}/trace, #cvs\.lock)
32726 *-> lock_name (${CVSROOT_DIRNAME}/trace, #cvs\.rfl\.${hostname}\.[0-9][0-9]*)
32727 *-> lock_simple_remove()
32728 *-> main loop with CVSROOT=${CVSROOT_DIRNAME}
32729 *-> parse_cvsroot ( ${CVSROOT_DIRNAME} )
32731 *-> rename(CVS/Entries\.Backup,CVS/Entries)
32732 *-> safe_location( where=(null) )
32733 *-> set_lock (${CVSROOT_DIRNAME}/trace, 1)
32734 *-> start_recursion ( fileproc=${PFMT}, filesdoneproc=${PFMT},
32735 *-> unlink_file(\./CVS/Entries\.Static)
32736 *-> unlink_file(\./CVS/Tag)
32737 *-> unlink_file(CVS/Entries\.Log)
32738 *-> unlink_file_dir(CVS/,,file1)
32739 *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
32740 *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
32741 *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
32742 *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
32743 *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
32744 *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
32745 *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
32747 ${SPROG} checkout: Updating trace" \
32749 *callerdat=${PFMT}, argc=0, argv=${PFMT},
32750 *direntproc=${PFMT}, dirleavproc=${PFMT},
32751 *dosrcs=1, repository_in=${CVSROOT_DIRNAME}/trace )
32752 *local=0, which=3, aflag=0,
32753 *locktype=1, update_preload=trace
32755 *-> Create_Admin (trace, trace, ${CVSROOT_DIRNAME}/trace, , , 0, 0, 1)
32756 *-> Forking server: ${CVS_SERVER} server
32757 *-> Register(file1, 1\.1\.1\.1, ${DATE}, , )
32758 *-> main loop with CVSROOT=${CVSROOT}
32759 *-> parse_cvsroot ( ${CVSROOT} )
32760 *-> rename(\.new\.file1,file1)
32761 *-> rename(CVS/Entries\.Backup,CVS/Entries)
32762 *-> safe_location( where=(null) )
32763 *-> unlink_file(CVS/Entries\.Log)
32764 *-> unlink_file(CVS/Entries\.Static)
32765 *-> unlink_file(CVS/Tag)
32766 *-> unlink_file(CVS/Template)
32767 *-> unlink_file(trace/CVS/Tag)
32768 *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
32769 *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
32770 *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
32771 *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
32772 S -> CVS_SERVER_SLEEP not set\.
32774 S -> Create_Admin (\., trace, ${CVSROOT_DIRNAME}/trace, , , 0, 0, 1)
32775 S -> Leaving do_recursion ( frame=${PFMT} )
32776 S -> Leaving do_recursion ( frame=${PFMT} )
32777 S -> Lock_Cleanup()
32778 S -> Lock_Cleanup()
32779 S -> Parse_Info (${CVSROOT_DIRNAME}/CVSROOT/rcsinfo, trace, ALL)
32780 S -> RCS_checkout (${CVSROOT_DIRNAME}/trace/file1,v, 1\.1\.1\.1, , , (function))
32781 S -> Reader_Lock(${CVSROOT_DIRNAME}/trace)
32782 S -> Register(file1, 1\.1\.1\.1, , , )
32783 S -> Simple_Lock_Cleanup()
32784 S -> Simple_Lock_Cleanup()
32785 S -> Simple_Lock_Cleanup()
32786 S -> Write_Template (trace, ${CVSROOT_DIRNAME}/trace)
32787 S -> dirswitch (\., ${CVSROOT_DIRNAME})
32788 S -> dirswitch (\., ${CVSROOT_DIRNAME})
32789 S -> do_cvs_command (checkout)
32790 S -> do_module (trace, Updating, NULL, NULL)
32791 S -> do_module (trace, Updating, NULL, NULL)
32792 S -> do_recursion ( frame=${PFMT} )
32793 S -> do_recursion ( frame=${PFMT} )
32794 S -> fopen(${CVSROOT_DIRNAME}/CVSROOT/history,a)
32795 S -> lock_name (${CVSROOT_DIRNAME}/trace, #cvs\.lock)
32796 S -> lock_name (${CVSROOT_DIRNAME}/trace, #cvs\.rfl\.${hostname}\.[0-9][0-9]*)
32797 S -> lock_simple_remove()
32798 S -> remove_locks()
32799 S -> remove_locks()
32800 S -> rename(CVS/Entries\.Backup,CVS/Entries)
32801 S -> safe_location( where=(null) )
32802 S -> serve_directory (\.)
32803 S -> serve_directory (\.)
32804 S -> server_cleanup()
32805 S -> server_cleanup()
32806 S -> server_notify()
32807 S -> server_register(file1, 1\.1\.1\.1, , , , , )
32808 S -> set_lock (${CVSROOT_DIRNAME}/trace, 1)
32809 S -> start_recursion ( fileproc=${PFMT}, filesdoneproc=${PFMT},
32810 S -> unlink_file(\./CVS/Entries\.Static)
32811 S -> unlink_file(\./CVS/Tag)
32812 S -> unlink_file(CVS/Entries\.Log)
32813 S -> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
32814 S -> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
32815 S -> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
32816 S -> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
32817 S -> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
32819 ${SPROG} checkout: Updating trace"
32823 dotest_sort trace-4
"${testcvs} -t -t -t add subdir" \
32825 *-> Create_Admin (\., subdir, ${CVSROOT_DIRNAME}/trace/subdir, , , 0, 0, 1)
32827 *-> Parse_Info (${CVSROOT_DIRNAME}/CVSROOT/loginfo, trace/subdir, ALL)
32828 *-> Simple_Lock_Cleanup()
32829 *-> main loop with CVSROOT=${CVSROOT_DIRNAME}
32830 *-> parse_cvsroot ( ${CVSROOT_DIRNAME} )
32832 *-> rename(CVS/Entries\.Backup,CVS/Entries)
32833 *-> unlink_file(\./CVS/Tag)
32834 *-> unlink_file(${CVSROOT_DIRNAME}/trace/subdir/CVS/fileattr)
32835 *-> unlink_file(CVS/Entries\.Log)
32836 *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
32837 *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
32838 *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
32839 Directory ${CVSROOT_DIRNAME}/trace/subdir added to the repository" \
32841 *callerdat=${PFMT}, argc=1, argv=${PFMT},
32842 *direntproc=${PFMT}, dirleavproc=${PFMT},
32843 *dosrcs=0, repository_in=(null) )
32844 *local=0, which=1, aflag=0,
32845 *locktype=0, update_preload=(null)
32847 *-> Create_Admin (subdir, subdir, ${CVSROOT_DIRNAME}/trace/subdir, , , 0, 0, 1)
32848 *-> Forking server: ${CVS_SERVER} server
32849 *-> Leaving do_recursion ( frame=${PFMT} )
32850 *-> Leaving do_recursion ( frame=${PFMT} )
32851 *-> do_recursion ( frame=${PFMT} )
32852 *-> do_recursion ( frame=${PFMT} )
32853 *-> main loop with CVSROOT=${CVSROOT}
32854 *-> parse_cvsroot ( ${CVSROOT} )
32855 *-> rename(CVS/Entries\.Backup,CVS/Entries)
32856 ${DOTSTAR} *-> start_recursion ( fileproc=${PFMT}, filesdoneproc=${PFMT},
32857 *-> unlink_file(CVS/Entries\.Log)
32858 ${DOTSTAR} *-> unlink_file(CVS/Template)
32859 *-> unlink_file(subdir/CVS/Tag)
32860 *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
32861 *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
32862 *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
32863 *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
32864 *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
32865 *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
32866 *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
32867 *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
32868 *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
32869 *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
32870 *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
32871 ${DOTSTAR}Directory ${CVSROOT_DIRNAME}/trace/subdir added to the repository
32872 S -> CVS_SERVER_SLEEP not set\.
32873 S -> Lock_Cleanup()
32874 S -> Lock_Cleanup()
32875 S -> Parse_Info (${CVSROOT_DIRNAME}/CVSROOT/loginfo, trace/subdir, ALL)
32876 S -> Parse_Info (${CVSROOT_DIRNAME}/CVSROOT/rcsinfo, trace/subdir, ALL)
32877 S -> Simple_Lock_Cleanup()
32878 S -> Simple_Lock_Cleanup()
32879 S -> Write_Template (subdir, ${CVSROOT_DIRNAME}/trace/subdir)
32880 S -> dirswitch (\., ${CVSROOT_DIRNAME}/trace)
32881 S -> dirswitch (subdir, ${CVSROOT_DIRNAME}/trace/subdir)
32882 S -> do_cvs_command (add)
32883 S -> remove_locks()
32884 S -> remove_locks()
32885 S -> rename(CVS/Entries\.Backup,CVS/Entries)
32886 S -> rename(CVS/Entries\.Backup,CVS/Entries)
32887 S -> serve_directory (\.)
32888 S -> serve_directory (subdir)
32889 S -> server_cleanup()
32890 S -> server_cleanup()
32891 S -> server_notify()
32892 S -> unlink_file(${CVSROOT_DIRNAME}/trace/subdir/CVS/fileattr)
32893 S -> unlink_file(CVS/Entries\.Log)
32894 S -> unlink_file(CVS/Entries\.Log)
32895 S -> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
32896 S -> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )"
32898 dotest_sort trace-5
"${testcvs} -t -t -t add file2" \
32899 " *-> Lock_Cleanup()
32900 *-> Register(file2, 0, Initial file2, , )
32901 *-> Simple_Lock_Cleanup()
32902 *-> main loop with CVSROOT=${CVSROOT_DIRNAME}
32903 *-> parse_cvsroot ( ${CVSROOT_DIRNAME} )
32905 *-> rename(CVS/Entries\.Backup,CVS/Entries)
32906 *-> unlink_file(CVS/Entries\.Log)
32907 *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
32908 *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
32909 *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
32910 ${SPROG} add: scheduling file \`file2' for addition
32911 ${SPROG} add: use \`${SPROG} commit' to add this file permanently" \
32913 *callerdat=${PFMT}, argc=1, argv=${PFMT},
32914 *direntproc=${PFMT}, dirleavproc=${PFMT},
32915 *dosrcs=0, repository_in=(null) )
32916 *local=0, which=1, aflag=0,
32917 *locktype=0, update_preload=(null)
32918 *-> Forking server: ${CVS_SERVER} server
32919 *-> Leaving do_recursion ( frame=${PFMT} )
32920 *-> Register(file2, 0, dummy timestamp, , )
32921 *-> do_recursion ( frame=${PFMT} )
32922 *-> main loop with CVSROOT=${CVSROOT}
32923 *-> parse_cvsroot ( ${CVSROOT} )
32924 *-> rename(CVS/Entries\.Backup,CVS/Entries)
32925 ${DOTSTAR} *-> start_recursion ( fileproc=${PFMT}, filesdoneproc=${PFMT},
32926 *-> unlink_file(CVS/Entries\.Log)
32927 ${DOTSTAR} *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
32928 *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
32929 *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
32930 *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
32931 *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
32932 *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
32933 *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
32934 ${DOTSTAR}S -> CVS_SERVER_SLEEP not set\.
32935 S -> Lock_Cleanup()
32936 S -> Lock_Cleanup()
32937 S -> Register(file2, 0, Initial file2, , )
32938 S -> Simple_Lock_Cleanup()
32939 S -> Simple_Lock_Cleanup()
32940 S -> dirswitch (\., ${CVSROOT_DIRNAME}/trace)
32941 S -> do_cvs_command (add)
32942 S -> remove_locks()
32943 S -> remove_locks()
32944 S -> rename(CVS/Entries\.Backup,CVS/Entries)
32945 S -> serve_directory (\.)
32946 S -> server_cleanup()
32947 S -> server_cleanup()
32948 S -> server_notify()
32949 S -> server_register(file2, 0, Initial file2, , , , )
32950 S -> unlink_file(CVS/Entries\.Log)
32951 S -> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
32952 ${SPROG} add: scheduling file \`file2' for addition
32953 ${SPROG} add: use \`${SPROG} commit' to add this file permanently"
32954 dotest_sort trace-6
"${testcvs} -t -t -t ci -mnew-file file2" \
32955 " *callerdat=${PFMT}, argc=1, argv=${PFMT},
32956 *callerdat=${PFMT}, argc=1, argv=${PFMT},
32957 *callerdat=${PFMT}, argc=1, argv=${PFMT},
32958 *direntproc=${PFMT}, dirleavproc=${PFMT},
32959 *direntproc=${PFMT}, dirleavproc=${PFMT},
32960 *direntproc=${PFMT}, dirleavproc=${PFMT},
32961 *dosrcs=0, repository_in=(null) )
32962 *dosrcs=1, repository_in=(null) )
32963 *dosrcs=1, repository_in=(null) )
32964 *local=0, which=1, aflag=0,
32965 *local=0, which=1, aflag=0,
32966 *local=0, which=1, aflag=0,
32967 *locktype=0, update_preload=(null)
32968 *locktype=0, update_preload=(null)
32969 *locktype=2, update_preload=(null)
32970 *-> Leaving do_recursion ( frame=${PFMT} )
32971 *-> Leaving do_recursion ( frame=${PFMT} )
32972 *-> Leaving do_recursion ( frame=${PFMT} )
32975 *-> Parse_Info (${CVSROOT_DIRNAME}/CVSROOT/commitinfo, trace, ALL)
32976 *-> Parse_Info (${CVSROOT_DIRNAME}/CVSROOT/loginfo, trace, ALL)
32977 *-> Parse_Info (${CVSROOT_DIRNAME}/CVSROOT/verifymsg, trace, not ALL)
32978 *-> Promotable_Lock ()
32979 *-> RCS_checkout (${CVSROOT_DIRNAME}/trace/file2,v, 1, , , (function))
32980 *-> RCS_cmp_file( ${CVSROOT_DIRNAME}/trace/file2,v, 1, (null), , file2 )
32981 *-> Register(file2, 1\.1, ${DATE}, , )
32982 *-> Simple_Lock_Cleanup()
32983 *-> Simple_Lock_Cleanup()
32984 *-> Simple_Lock_Cleanup()
32985 *-> _lock_exists (${CVSROOT_DIRNAME}/trace, #cvs\.pfl\.\*, #cvs\.pfl\.${hostname}\.[0-9][0-9]*)
32986 *-> _lock_exists (${CVSROOT_DIRNAME}/trace, #cvs\.pfl\.\*, #cvs\.pfl\.${hostname}\.[0-9][0-9]*)
32987 *-> _lock_exists (${CVSROOT_DIRNAME}/trace, #cvs\.rfl\.\*, #cvs\.rfl\.${hostname}\.[0-9][0-9]*)
32988 *-> do_recursion ( frame=${PFMT} )
32989 *-> do_recursion ( frame=${PFMT} )
32990 *-> do_recursion ( frame=${PFMT} )
32991 *-> fopen(${CVSROOT_DIRNAME}/CVSROOT/history,a)
32992 *-> lock_dir_for_write (${CVSROOT_DIRNAME}/trace)
32993 *-> lock_name (${CVSROOT_DIRNAME}/trace, #cvs\.lock)
32994 *-> lock_name (${CVSROOT_DIRNAME}/trace, #cvs\.lock)
32995 *-> lock_name (${CVSROOT_DIRNAME}/trace, #cvs\.lock)
32996 *-> lock_name (${CVSROOT_DIRNAME}/trace, #cvs\.pfl\.${hostname}\.[0-9][0-9]*)
32997 *-> lock_name (${CVSROOT_DIRNAME}/trace, #cvs\.rfl\.${hostname}\.[0-9][0-9]*)
32998 *-> lock_name (${CVSROOT_DIRNAME}/trace, #cvs\.wfl\.${hostname}\.[0-9][0-9]*)
32999 *-> lock_name (${CVSROOT_DIRNAME}/trace, )
33000 *-> lock_name (${CVSROOT_DIRNAME}/trace, )
33001 *-> lock_name (${CVSROOT_DIRNAME}/trace, )
33002 *-> lock_simple_remove()
33003 *-> lock_simple_remove()
33004 *-> lock_tree_promotably (1, argv, 0, 1, 0)
33005 *-> main loop with CVSROOT=${CVSROOT_DIRNAME}
33006 *-> parse_cvsroot ( ${CVSROOT_DIRNAME} )
33007 *-> promotable_exists (${CVSROOT_DIRNAME}/trace)
33008 *-> promotable_exists (${CVSROOT_DIRNAME}/trace)
33009 *-> promotable_lock(${CVSROOT_DIRNAME}/trace)
33011 *-> readers_exist (${CVSROOT_DIRNAME}/trace)
33014 *-> rename(${CVSROOT_DIRNAME}/trace/,file2,,${CVSROOT_DIRNAME}/trace/file2,v)
33015 *-> rename(${CVSROOT_DIRNAME}/trace/,file2,,${CVSROOT_DIRNAME}/trace/file2,v)
33016 *-> rename(CVS/Entries\.Backup,CVS/Entries)
33017 *-> set_lock (${CVSROOT_DIRNAME}/trace, 0)
33018 *-> set_lock (${CVSROOT_DIRNAME}/trace, 1)
33019 *-> start_recursion ( fileproc=${PFMT}, filesdoneproc=${PFMT},
33020 *-> start_recursion ( fileproc=${PFMT}, filesdoneproc=${PFMT},
33021 *-> start_recursion ( fileproc=${PFMT}, filesdoneproc=${PFMT},
33022 *-> unlink_file(CVS/Base/file2)
33023 *-> unlink_file(CVS/Entries\.Log)
33024 *-> unlink_file(CVS/file2,t)
33025 *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
33026 *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
33027 *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
33028 *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
33029 *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
33030 *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
33031 *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
33032 *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
33033 *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
33034 *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
33035 *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
33036 *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
33037 *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
33038 *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
33039 *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
33040 *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
33041 *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
33042 *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
33043 *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
33044 ${CVSROOT_DIRNAME}/trace/file2,v <-- file2
33045 initial revision: 1\.1" \
33047 *callerdat=${PFMT}, argc=1, argv=${PFMT},
33048 *callerdat=${PFMT}, argc=1, argv=${PFMT},
33049 *callerdat=${PFMT}, argc=1, argv=${PFMT},
33050 *callerdat=${PFMT}, argc=1, argv=${PFMT},
33051 *callerdat=${PFMT}, argc=1, argv=${PFMT},
33052 *direntproc=${PFMT}, dirleavproc=${PFMT},
33053 *direntproc=${PFMT}, dirleavproc=${PFMT},
33054 *direntproc=${PFMT}, dirleavproc=${PFMT},
33055 *direntproc=${PFMT}, dirleavproc=${PFMT},
33056 *direntproc=${PFMT}, dirleavproc=${PFMT},
33057 *dosrcs=0, repository_in=(null) )
33058 *dosrcs=0, repository_in=(null) )
33059 *dosrcs=0, repository_in=(null) )
33060 *dosrcs=1, repository_in=(null) )
33061 *dosrcs=1, repository_in=(null) )
33062 *local=0, which=1, aflag=0,
33063 *local=0, which=1, aflag=0,
33064 *local=0, which=1, aflag=0,
33065 *local=0, which=1, aflag=0,
33066 *local=0, which=1, aflag=0,
33067 *locktype=0, update_preload=(null)
33068 *locktype=0, update_preload=(null)
33069 *locktype=0, update_preload=(null)
33070 *locktype=0, update_preload=(null)
33071 *locktype=2, update_preload=(null)
33072 *-> Forking server: ${CVS_SERVER} server
33073 *-> Leaving do_recursion ( frame=${PFMT} )
33074 *-> Leaving do_recursion ( frame=${PFMT} )
33075 *-> Register(file2, 1\.1, ${DATE}, , )
33076 *-> Sending file \`file2' to server
33077 *-> do_recursion ( frame=${PFMT} )
33078 *-> do_recursion ( frame=${PFMT} )
33079 *-> main loop with CVSROOT=${CVSROOT}
33080 *-> parse_cvsroot ( ${CVSROOT} )
33081 *-> rename(CVS/Entries\.Backup,CVS/Entries)
33082 *-> start_recursion ( fileproc=${PFMT}, filesdoneproc=${PFMT},
33083 *-> start_recursion ( fileproc=${PFMT}, filesdoneproc=${PFMT},
33084 *-> unlink_file(CVS/Base/file2)
33085 *-> unlink_file(CVS/Entries\.Log)
33086 *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
33087 *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
33088 *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
33089 *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
33090 *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
33091 *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
33092 *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
33093 *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
33094 *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
33095 *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
33096 ${CVSROOT_DIRNAME}/trace/file2,v <-- file2
33097 S -> CVS_SERVER_SLEEP not set\.
33098 S -> Leaving do_recursion ( frame=${PFMT} )
33099 S -> Leaving do_recursion ( frame=${PFMT} )
33100 S -> Leaving do_recursion ( frame=${PFMT} )
33101 S -> Lock_Cleanup()
33102 S -> Lock_Cleanup()
33103 S -> Lock_Cleanup()
33104 S -> Parse_Info (${CVSROOT_DIRNAME}/CVSROOT/commitinfo, trace, ALL)
33105 S -> Parse_Info (${CVSROOT_DIRNAME}/CVSROOT/loginfo, trace, ALL)
33106 S -> Parse_Info (${CVSROOT_DIRNAME}/CVSROOT/verifymsg, trace, not ALL)
33107 S -> Promotable_Lock ()
33108 S -> RCS_checkout (${CVSROOT_DIRNAME}/trace/file2,v, 1, , , (function))
33109 S -> RCS_cmp_file( ${CVSROOT_DIRNAME}/trace/file2,v, 1, (null), , file2 )
33110 S -> Register(file2, 1\.1, ${DATE}, , )
33111 S -> Simple_Lock_Cleanup()
33112 S -> Simple_Lock_Cleanup()
33113 S -> Simple_Lock_Cleanup()
33114 S -> Simple_Lock_Cleanup()
33115 S -> _lock_exists (${CVSROOT_DIRNAME}/trace, #cvs\.pfl\.\*, #cvs\.pfl\.${hostname}\.[0-9][0-9]*)
33116 S -> _lock_exists (${CVSROOT_DIRNAME}/trace, #cvs\.pfl\.\*, #cvs\.pfl\.${hostname}\.[0-9][0-9]*)
33117 S -> _lock_exists (${CVSROOT_DIRNAME}/trace, #cvs\.rfl\.\*, #cvs\.rfl\.${hostname}\.[0-9][0-9]*)
33118 S -> dirswitch (\., ${CVSROOT_DIRNAME}/trace)
33119 S -> do_cvs_command (commit)
33120 S -> do_recursion ( frame=${PFMT} )
33121 S -> do_recursion ( frame=${PFMT} )
33122 S -> do_recursion ( frame=${PFMT} )
33123 S -> fopen(${CVSROOT_DIRNAME}/CVSROOT/history,a)
33124 S -> lock_dir_for_write (${CVSROOT_DIRNAME}/trace)
33125 S -> lock_name (${CVSROOT_DIRNAME}/trace, #cvs\.lock)
33126 S -> lock_name (${CVSROOT_DIRNAME}/trace, #cvs\.lock)
33127 S -> lock_name (${CVSROOT_DIRNAME}/trace, #cvs\.lock)
33128 S -> lock_name (${CVSROOT_DIRNAME}/trace, #cvs\.pfl\.${hostname}\.[0-9][0-9]*)
33129 S -> lock_name (${CVSROOT_DIRNAME}/trace, #cvs\.rfl\.${hostname}\.[0-9][0-9]*)
33130 S -> lock_name (${CVSROOT_DIRNAME}/trace, #cvs\.wfl\.${hostname}\.[0-9][0-9]*)
33131 S -> lock_name (${CVSROOT_DIRNAME}/trace, )
33132 S -> lock_name (${CVSROOT_DIRNAME}/trace, )
33133 S -> lock_name (${CVSROOT_DIRNAME}/trace, )
33134 S -> lock_simple_remove()
33135 S -> lock_simple_remove()
33136 S -> lock_tree_promotably (1, argv, 0, 1, 0)
33137 S -> promotable_exists (${CVSROOT_DIRNAME}/trace)
33138 S -> promotable_exists (${CVSROOT_DIRNAME}/trace)
33139 S -> promotable_lock(${CVSROOT_DIRNAME}/trace)
33141 S -> readers_exist (${CVSROOT_DIRNAME}/trace)
33142 S -> remove_locks()
33143 S -> remove_locks()
33144 S -> remove_locks()
33145 S -> rename(${CVSROOT_DIRNAME}/trace/,file2,,${CVSROOT_DIRNAME}/trace/file2,v)
33146 S -> rename(${CVSROOT_DIRNAME}/trace/,file2,,${CVSROOT_DIRNAME}/trace/file2,v)
33147 S -> rename(CVS/Entries\.Backup,CVS/Entries)
33148 S -> serve_directory (\.)
33149 S -> server_cleanup()
33150 S -> server_cleanup()
33151 S -> server_notify()
33152 S -> server_pathname_check (file2)
33153 S -> server_pathname_check (file2)
33154 S -> server_pathname_check (file2)
33155 S -> server_register(file2, 1\.1, ${DATE}, , , , )
33156 S -> set_lock (${CVSROOT_DIRNAME}/trace, 0)
33157 S -> set_lock (${CVSROOT_DIRNAME}/trace, 1)
33158 S -> start_recursion ( fileproc=${PFMT}, filesdoneproc=${PFMT},
33159 S -> start_recursion ( fileproc=${PFMT}, filesdoneproc=${PFMT},
33160 S -> start_recursion ( fileproc=${PFMT}, filesdoneproc=${PFMT},
33161 S -> unlink_file(CVS/Entries\.Log)
33162 S -> unlink_file(CVS/file2,t)
33163 S -> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
33164 S -> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
33165 S -> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
33166 S -> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
33167 S -> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
33168 S -> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
33169 S -> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
33170 S -> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
33171 S -> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
33172 S -> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
33173 S -> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
33174 S -> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
33175 S -> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
33176 S -> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
33177 S -> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
33178 S -> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
33179 S -> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
33180 initial revision: 1\.1"
33181 dotest_sort trace-7
"${testcvs} -t -t -t tag bp" \
33182 " *callerdat=${PFMT}, argc=0, argv=${PFMT},
33183 *callerdat=${PFMT}, argc=0, argv=${PFMT},
33184 *direntproc=${PFMT}, dirleavproc=${PFMT},
33185 *direntproc=${PFMT}, dirleavproc=${PFMT},
33186 *dosrcs=1, repository_in= )
33187 *dosrcs=1, repository_in= )
33188 *local=0, which=1, aflag=0,
33189 *local=0, which=1, aflag=0,
33190 *locktype=1, update_preload=(null)
33191 *locktype=2, update_preload=(null)
33192 *local_specified=0, mname=(null), msg=(null) )
33193 *mwhere=(null), mfile=(null), shorten=0,
33194 *-> Leaving do_recursion ( frame=${PFMT} )
33195 *-> Leaving do_recursion ( frame=${PFMT} )
33196 *-> Leaving do_recursion ( frame=${PFMT} )
33197 *-> Leaving do_recursion ( frame=${PFMT} )
33198 *-> Leaving do_recursion ( frame=${PFMT} )
33199 *-> Leaving do_recursion ( frame=${PFMT} )
33201 *-> Parse_Info (${CVSROOT_DIRNAME}/CVSROOT/taginfo, trace, ALL)
33202 *-> Reader_Lock(${CVSROOT_DIRNAME}/trace)
33203 *-> Reader_Lock(${CVSROOT_DIRNAME}/trace/subdir)
33204 *-> Simple_Lock_Cleanup()
33205 *-> Simple_Lock_Cleanup()
33206 *-> Simple_Lock_Cleanup()
33207 *-> Simple_Lock_Cleanup()
33208 *-> Simple_Lock_Cleanup()
33209 *-> _lock_exists (${CVSROOT_DIRNAME}/trace, #cvs\.pfl\.\*, (null))
33210 *-> _lock_exists (${CVSROOT_DIRNAME}/trace, #cvs\.rfl\.\*, (null))
33211 *-> _lock_exists (${CVSROOT_DIRNAME}/trace/subdir, #cvs\.pfl\.\*, (null))
33212 *-> _lock_exists (${CVSROOT_DIRNAME}/trace/subdir, #cvs\.rfl\.\*, (null))
33213 *-> check_fileproc ( ${CVSROOT_DIRNAME}/trace, file1, ${CVSROOT_DIRNAME}/trace/file1,v )
33214 *-> check_fileproc ( ${CVSROOT_DIRNAME}/trace, file2, ${CVSROOT_DIRNAME}/trace/file2,v )
33215 *-> do_recursion ( frame=${PFMT} )
33216 *-> do_recursion ( frame=${PFMT} )
33217 *-> do_recursion ( frame=${PFMT} )
33218 *-> do_recursion ( frame=${PFMT} )
33219 *-> do_recursion ( frame=${PFMT} )
33220 *-> do_recursion ( frame=${PFMT} )
33221 *-> lock_dir_for_write (${CVSROOT_DIRNAME}/trace)
33222 *-> lock_dir_for_write (${CVSROOT_DIRNAME}/trace/subdir)
33223 *-> lock_name (${CVSROOT_DIRNAME}/trace, #cvs\.lock)
33224 *-> lock_name (${CVSROOT_DIRNAME}/trace, #cvs\.lock)
33225 *-> lock_name (${CVSROOT_DIRNAME}/trace, #cvs\.lock)
33226 *-> lock_name (${CVSROOT_DIRNAME}/trace, #cvs\.rfl\.${hostname}\.[0-9][0-9]*)
33227 *-> lock_name (${CVSROOT_DIRNAME}/trace, #cvs\.wfl\.${hostname}\.[0-9][0-9]*)
33228 *-> lock_name (${CVSROOT_DIRNAME}/trace, )
33229 *-> lock_name (${CVSROOT_DIRNAME}/trace, )
33230 *-> lock_name (${CVSROOT_DIRNAME}/trace/subdir, #cvs\.lock)
33231 *-> lock_name (${CVSROOT_DIRNAME}/trace/subdir, #cvs\.lock)
33232 *-> lock_name (${CVSROOT_DIRNAME}/trace/subdir, #cvs\.lock)
33233 *-> lock_name (${CVSROOT_DIRNAME}/trace/subdir, #cvs\.rfl\.${hostname}\.[0-9][0-9]*)
33234 *-> lock_name (${CVSROOT_DIRNAME}/trace/subdir, #cvs\.wfl\.${hostname}\.[0-9][0-9]*)
33235 *-> lock_name (${CVSROOT_DIRNAME}/trace/subdir, )
33236 *-> lock_name (${CVSROOT_DIRNAME}/trace/subdir, )
33237 *-> lock_simple_remove()
33238 *-> lock_simple_remove()
33239 *-> lock_simple_remove()
33240 *-> lock_simple_remove()
33241 *-> main loop with CVSROOT=${CVSROOT_DIRNAME}
33242 *-> parse_cvsroot ( ${CVSROOT_DIRNAME} )
33243 *-> promotable_exists (${CVSROOT_DIRNAME}/trace)
33244 *-> promotable_exists (${CVSROOT_DIRNAME}/trace/subdir)
33246 *-> readers_exist (${CVSROOT_DIRNAME}/trace)
33247 *-> readers_exist (${CVSROOT_DIRNAME}/trace/subdir)
33249 *-> rename(${CVSROOT_DIRNAME}/trace/,file1,,${CVSROOT_DIRNAME}/trace/file1,v)
33250 *-> rename(${CVSROOT_DIRNAME}/trace/,file2,,${CVSROOT_DIRNAME}/trace/file2,v)
33251 *-> rename(CVS/Entries\.Backup,CVS/Entries)
33252 *-> rtag_proc ( argc=1, argv=${PFMT}, xwhere=(null),
33253 *-> set_lock (${CVSROOT_DIRNAME}/trace, 1)
33254 *-> set_lock (${CVSROOT_DIRNAME}/trace, 1)
33255 *-> set_lock (${CVSROOT_DIRNAME}/trace/subdir, 1)
33256 *-> set_lock (${CVSROOT_DIRNAME}/trace/subdir, 1)
33257 *-> start_recursion ( fileproc=${PFMT}, filesdoneproc=${PFMT},
33258 *-> start_recursion ( fileproc=${PFMT}, filesdoneproc=${PFMT},
33259 *-> unlink_file(CVS/Entries\.Log)
33260 *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
33261 *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
33262 *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
33263 *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
33264 *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
33265 *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
33266 *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
33267 *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
33268 *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
33269 *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
33270 *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
33271 *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
33272 *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
33273 *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
33274 *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
33275 *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
33276 *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
33277 *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
33278 *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
33279 *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
33280 *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
33281 *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
33282 *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
33283 *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
33284 *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
33285 *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
33286 *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
33287 *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
33288 *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
33291 ${SPROG} tag: Tagging \.
33292 ${SPROG} tag: Tagging subdir" \
33294 *callerdat=${PFMT}, argc=0, argv=${PFMT},
33295 *callerdat=${PFMT}, argc=0, argv=${PFMT},
33296 *callerdat=${PFMT}, argc=0, argv=${PFMT},
33297 *direntproc=${PFMT}, dirleavproc=${PFMT},
33298 *direntproc=${PFMT}, dirleavproc=${PFMT},
33299 *direntproc=${PFMT}, dirleavproc=${PFMT},
33300 *dosrcs=0, repository_in=(null) )
33301 *dosrcs=1, repository_in= )
33302 *dosrcs=1, repository_in= )
33303 *local=0, which=1, aflag=0,
33304 *local=0, which=1, aflag=0,
33305 *local=0, which=1, aflag=0,
33306 *locktype=0, update_preload=(null)
33307 *locktype=1, update_preload=(null)
33308 *locktype=2, update_preload=(null)
33309 *local_specified=0, mname=(null), msg=(null) )
33310 *mwhere=(null), mfile=(null), shorten=0,
33311 *-> Forking server: ${CVS_SERVER} server
33312 *-> Leaving do_recursion ( frame=${PFMT} )
33313 *-> Leaving do_recursion ( frame=${PFMT} )
33314 *-> Leaving do_recursion ( frame=${PFMT} )
33315 *-> do_recursion ( frame=${PFMT} )
33316 *-> do_recursion ( frame=${PFMT} )
33317 *-> do_recursion ( frame=${PFMT} )
33318 *-> main loop with CVSROOT=${CVSROOT}
33319 *-> parse_cvsroot ( ${CVSROOT} )
33320 *-> start_recursion ( fileproc=${PFMT}, filesdoneproc=${PFMT},
33321 *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
33322 *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
33323 *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
33324 *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
33325 *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
33326 *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
33327 *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
33328 *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
33329 *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
33330 *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
33331 *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
33332 *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
33333 S -> CVS_SERVER_SLEEP not set\.
33334 S -> Leaving do_recursion ( frame=${PFMT} )
33335 S -> Leaving do_recursion ( frame=${PFMT} )
33336 S -> Leaving do_recursion ( frame=${PFMT} )
33337 S -> Leaving do_recursion ( frame=${PFMT} )
33338 S -> Leaving do_recursion ( frame=${PFMT} )
33339 S -> Leaving do_recursion ( frame=${PFMT} )
33340 S -> Lock_Cleanup()
33341 S -> Lock_Cleanup()
33342 S -> Parse_Info (${CVSROOT_DIRNAME}/CVSROOT/taginfo, trace, ALL)
33343 S -> Reader_Lock(${CVSROOT_DIRNAME}/trace)
33344 S -> Reader_Lock(${CVSROOT_DIRNAME}/trace/subdir)
33345 S -> Simple_Lock_Cleanup()
33346 S -> Simple_Lock_Cleanup()
33347 S -> Simple_Lock_Cleanup()
33348 S -> Simple_Lock_Cleanup()
33349 S -> Simple_Lock_Cleanup()
33350 S -> Simple_Lock_Cleanup()
33351 S -> _lock_exists (${CVSROOT_DIRNAME}/trace, #cvs\.pfl\.\*, (null))
33352 S -> _lock_exists (${CVSROOT_DIRNAME}/trace, #cvs\.rfl\.\*, (null))
33353 S -> _lock_exists (${CVSROOT_DIRNAME}/trace/subdir, #cvs\.pfl\.\*, (null))
33354 S -> _lock_exists (${CVSROOT_DIRNAME}/trace/subdir, #cvs\.rfl\.\*, (null))
33355 S -> check_fileproc ( ${CVSROOT_DIRNAME}/trace, file1, ${CVSROOT_DIRNAME}/trace/file1,v )
33356 S -> check_fileproc ( ${CVSROOT_DIRNAME}/trace, file2, ${CVSROOT_DIRNAME}/trace/file2,v )
33357 S -> dirswitch (\., ${CVSROOT_DIRNAME}/trace)
33358 S -> dirswitch (\., ${CVSROOT_DIRNAME}/trace)
33359 S -> dirswitch (subdir, ${CVSROOT_DIRNAME}/trace/subdir)
33360 S -> do_cvs_command (tag)
33361 S -> do_recursion ( frame=${PFMT} )
33362 S -> do_recursion ( frame=${PFMT} )
33363 S -> do_recursion ( frame=${PFMT} )
33364 S -> do_recursion ( frame=${PFMT} )
33365 S -> do_recursion ( frame=${PFMT} )
33366 S -> do_recursion ( frame=${PFMT} )
33367 S -> lock_dir_for_write (${CVSROOT_DIRNAME}/trace)
33368 S -> lock_dir_for_write (${CVSROOT_DIRNAME}/trace/subdir)
33369 S -> lock_name (${CVSROOT_DIRNAME}/trace, #cvs\.lock)
33370 S -> lock_name (${CVSROOT_DIRNAME}/trace, #cvs\.lock)
33371 S -> lock_name (${CVSROOT_DIRNAME}/trace, #cvs\.lock)
33372 S -> lock_name (${CVSROOT_DIRNAME}/trace, #cvs\.rfl\.${hostname}\.[0-9][0-9]*)
33373 S -> lock_name (${CVSROOT_DIRNAME}/trace, #cvs\.wfl\.${hostname}\.[0-9][0-9]*)
33374 S -> lock_name (${CVSROOT_DIRNAME}/trace, )
33375 S -> lock_name (${CVSROOT_DIRNAME}/trace, )
33376 S -> lock_name (${CVSROOT_DIRNAME}/trace/subdir, #cvs\.lock)
33377 S -> lock_name (${CVSROOT_DIRNAME}/trace/subdir, #cvs\.lock)
33378 S -> lock_name (${CVSROOT_DIRNAME}/trace/subdir, #cvs\.lock)
33379 S -> lock_name (${CVSROOT_DIRNAME}/trace/subdir, #cvs\.rfl\.${hostname}\.[0-9][0-9]*)
33380 S -> lock_name (${CVSROOT_DIRNAME}/trace/subdir, #cvs\.wfl\.${hostname}\.[0-9][0-9]*)
33381 S -> lock_name (${CVSROOT_DIRNAME}/trace/subdir, )
33382 S -> lock_name (${CVSROOT_DIRNAME}/trace/subdir, )
33383 S -> lock_simple_remove()
33384 S -> lock_simple_remove()
33385 S -> lock_simple_remove()
33386 S -> lock_simple_remove()
33387 S -> promotable_exists (${CVSROOT_DIRNAME}/trace)
33388 S -> promotable_exists (${CVSROOT_DIRNAME}/trace/subdir)
33390 S -> readers_exist (${CVSROOT_DIRNAME}/trace)
33391 S -> readers_exist (${CVSROOT_DIRNAME}/trace/subdir)
33392 S -> remove_locks()
33393 S -> remove_locks()
33394 S -> rename(${CVSROOT_DIRNAME}/trace/,file1,,${CVSROOT_DIRNAME}/trace/file1,v)
33395 S -> rename(${CVSROOT_DIRNAME}/trace/,file2,,${CVSROOT_DIRNAME}/trace/file2,v)
33396 S -> rename(CVS/Entries\.Backup,CVS/Entries)
33397 S -> rename(CVS/Entries\.Backup,CVS/Entries)
33398 S -> rtag_proc ( argc=1, argv=${PFMT}, xwhere=(null),
33399 S -> serve_directory (\.)
33400 S -> serve_directory (\.)
33401 S -> serve_directory (subdir)
33402 S -> server_cleanup()
33403 S -> server_cleanup()
33404 S -> server_notify()
33405 S -> set_lock (${CVSROOT_DIRNAME}/trace, 1)
33406 S -> set_lock (${CVSROOT_DIRNAME}/trace, 1)
33407 S -> set_lock (${CVSROOT_DIRNAME}/trace/subdir, 1)
33408 S -> set_lock (${CVSROOT_DIRNAME}/trace/subdir, 1)
33409 S -> start_recursion ( fileproc=${PFMT}, filesdoneproc=${PFMT},
33410 S -> start_recursion ( fileproc=${PFMT}, filesdoneproc=${PFMT},
33411 S -> unlink_file(CVS/Entries\.Log)
33412 S -> unlink_file(CVS/Entries\.Log)
33413 S -> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
33414 S -> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
33415 S -> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
33416 S -> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
33417 S -> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
33418 S -> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
33419 S -> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
33420 S -> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
33421 S -> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
33422 S -> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
33423 S -> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
33424 S -> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
33425 S -> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
33426 S -> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
33427 S -> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
33428 S -> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
33429 S -> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
33430 S -> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
33431 S -> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
33432 S -> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
33433 S -> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
33434 S -> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
33435 S -> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
33436 S -> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
33437 S -> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
33438 S -> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
33439 S -> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
33440 S -> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
33443 ${SPROG} tag: Tagging \.
33444 ${SPROG} tag: Tagging subdir"
33446 dotest_sort trace-8
"${testcvs} -t -t -t tag -b branch1" \
33447 " *callerdat=${PFMT}, argc=0, argv=${PFMT},
33448 *callerdat=${PFMT}, argc=0, argv=${PFMT},
33449 *direntproc=${PFMT}, dirleavproc=${PFMT},
33450 *direntproc=${PFMT}, dirleavproc=${PFMT},
33451 *dosrcs=1, repository_in= )
33452 *dosrcs=1, repository_in= )
33453 *local=0, which=1, aflag=0,
33454 *local=0, which=1, aflag=0,
33455 *locktype=1, update_preload=(null)
33456 *locktype=2, update_preload=(null)
33457 *local_specified=0, mname=(null), msg=(null) )
33458 *mwhere=(null), mfile=(null), shorten=0,
33459 *-> Leaving do_recursion ( frame=${PFMT} )
33460 *-> Leaving do_recursion ( frame=${PFMT} )
33461 *-> Leaving do_recursion ( frame=${PFMT} )
33462 *-> Leaving do_recursion ( frame=${PFMT} )
33463 *-> Leaving do_recursion ( frame=${PFMT} )
33464 *-> Leaving do_recursion ( frame=${PFMT} )
33466 *-> Parse_Info (${CVSROOT_DIRNAME}/CVSROOT/taginfo, trace, ALL)
33467 *-> Reader_Lock(${CVSROOT_DIRNAME}/trace)
33468 *-> Reader_Lock(${CVSROOT_DIRNAME}/trace/subdir)
33469 *-> Simple_Lock_Cleanup()
33470 *-> Simple_Lock_Cleanup()
33471 *-> Simple_Lock_Cleanup()
33472 *-> Simple_Lock_Cleanup()
33473 *-> Simple_Lock_Cleanup()
33474 *-> _lock_exists (${CVSROOT_DIRNAME}/trace, #cvs\.pfl\.\*, (null))
33475 *-> _lock_exists (${CVSROOT_DIRNAME}/trace, #cvs\.rfl\.\*, (null))
33476 *-> _lock_exists (${CVSROOT_DIRNAME}/trace/subdir, #cvs\.pfl\.\*, (null))
33477 *-> _lock_exists (${CVSROOT_DIRNAME}/trace/subdir, #cvs\.rfl\.\*, (null))
33478 *-> check_fileproc ( ${CVSROOT_DIRNAME}/trace, file1, ${CVSROOT_DIRNAME}/trace/file1,v )
33479 *-> check_fileproc ( ${CVSROOT_DIRNAME}/trace, file2, ${CVSROOT_DIRNAME}/trace/file2,v )
33480 *-> do_recursion ( frame=${PFMT} )
33481 *-> do_recursion ( frame=${PFMT} )
33482 *-> do_recursion ( frame=${PFMT} )
33483 *-> do_recursion ( frame=${PFMT} )
33484 *-> do_recursion ( frame=${PFMT} )
33485 *-> do_recursion ( frame=${PFMT} )
33486 *-> lock_dir_for_write (${CVSROOT_DIRNAME}/trace)
33487 *-> lock_dir_for_write (${CVSROOT_DIRNAME}/trace/subdir)
33488 *-> lock_name (${CVSROOT_DIRNAME}/trace, #cvs\.lock)
33489 *-> lock_name (${CVSROOT_DIRNAME}/trace, #cvs\.lock)
33490 *-> lock_name (${CVSROOT_DIRNAME}/trace, #cvs\.lock)
33491 *-> lock_name (${CVSROOT_DIRNAME}/trace, #cvs\.rfl\.${hostname}\.[0-9][0-9]*)
33492 *-> lock_name (${CVSROOT_DIRNAME}/trace, #cvs\.wfl\.${hostname}\.[0-9][0-9]*)
33493 *-> lock_name (${CVSROOT_DIRNAME}/trace, )
33494 *-> lock_name (${CVSROOT_DIRNAME}/trace, )
33495 *-> lock_name (${CVSROOT_DIRNAME}/trace/subdir, #cvs\.lock)
33496 *-> lock_name (${CVSROOT_DIRNAME}/trace/subdir, #cvs\.lock)
33497 *-> lock_name (${CVSROOT_DIRNAME}/trace/subdir, #cvs\.lock)
33498 *-> lock_name (${CVSROOT_DIRNAME}/trace/subdir, #cvs\.rfl\.${hostname}\.[0-9][0-9]*)
33499 *-> lock_name (${CVSROOT_DIRNAME}/trace/subdir, #cvs\.wfl\.${hostname}\.[0-9][0-9]*)
33500 *-> lock_name (${CVSROOT_DIRNAME}/trace/subdir, )
33501 *-> lock_name (${CVSROOT_DIRNAME}/trace/subdir, )
33502 *-> lock_simple_remove()
33503 *-> lock_simple_remove()
33504 *-> lock_simple_remove()
33505 *-> lock_simple_remove()
33506 *-> main loop with CVSROOT=${CVSROOT_DIRNAME}
33507 *-> parse_cvsroot ( ${CVSROOT_DIRNAME} )
33508 *-> promotable_exists (${CVSROOT_DIRNAME}/trace)
33509 *-> promotable_exists (${CVSROOT_DIRNAME}/trace/subdir)
33511 *-> readers_exist (${CVSROOT_DIRNAME}/trace)
33512 *-> readers_exist (${CVSROOT_DIRNAME}/trace/subdir)
33514 *-> rename(${CVSROOT_DIRNAME}/trace/,file1,,${CVSROOT_DIRNAME}/trace/file1,v)
33515 *-> rename(${CVSROOT_DIRNAME}/trace/,file2,,${CVSROOT_DIRNAME}/trace/file2,v)
33516 *-> rtag_proc ( argc=1, argv=${PFMT}, xwhere=(null),
33517 *-> set_lock (${CVSROOT_DIRNAME}/trace, 1)
33518 *-> set_lock (${CVSROOT_DIRNAME}/trace, 1)
33519 *-> set_lock (${CVSROOT_DIRNAME}/trace/subdir, 1)
33520 *-> set_lock (${CVSROOT_DIRNAME}/trace/subdir, 1)
33521 *-> start_recursion ( fileproc=${PFMT}, filesdoneproc=${PFMT},
33522 *-> start_recursion ( fileproc=${PFMT}, filesdoneproc=${PFMT},
33523 *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
33524 *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
33525 *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
33526 *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
33527 *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
33528 *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
33529 *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
33530 *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
33531 *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
33532 *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
33533 *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
33534 *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
33535 *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
33536 *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
33537 *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
33538 *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
33539 *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
33540 *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
33541 *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
33542 *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
33543 *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
33544 *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
33545 *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
33546 *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
33547 *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
33548 *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
33549 *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
33550 *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
33551 *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
33552 *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
33553 *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
33556 ${SPROG} tag: Tagging \.
33557 ${SPROG} tag: Tagging subdir" \
33559 *callerdat=${PFMT}, argc=0, argv=${PFMT},
33560 *callerdat=${PFMT}, argc=0, argv=${PFMT},
33561 *callerdat=${PFMT}, argc=0, argv=${PFMT},
33562 *direntproc=${PFMT}, dirleavproc=${PFMT},
33563 *direntproc=${PFMT}, dirleavproc=${PFMT},
33564 *direntproc=${PFMT}, dirleavproc=${PFMT},
33565 *dosrcs=0, repository_in=(null) )
33566 *dosrcs=1, repository_in= )
33567 *dosrcs=1, repository_in= )
33568 *local=0, which=1, aflag=0,
33569 *local=0, which=1, aflag=0,
33570 *local=0, which=1, aflag=0,
33571 *locktype=0, update_preload=(null)
33572 *locktype=1, update_preload=(null)
33573 *locktype=2, update_preload=(null)
33574 *local_specified=0, mname=(null), msg=(null) )
33575 *mwhere=(null), mfile=(null), shorten=0,
33576 *-> Forking server: ${CVS_SERVER} server
33577 *-> Leaving do_recursion ( frame=${PFMT} )
33578 *-> Leaving do_recursion ( frame=${PFMT} )
33579 *-> Leaving do_recursion ( frame=${PFMT} )
33580 *-> do_recursion ( frame=${PFMT} )
33581 *-> do_recursion ( frame=${PFMT} )
33582 *-> do_recursion ( frame=${PFMT} )
33583 *-> main loop with CVSROOT=${CVSROOT}
33584 *-> parse_cvsroot ( ${CVSROOT} )
33585 *-> start_recursion ( fileproc=${PFMT}, filesdoneproc=${PFMT},
33586 *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
33587 *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
33588 *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
33589 *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
33590 *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
33591 *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
33592 *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
33593 *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
33594 *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
33595 *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
33596 *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
33597 *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
33598 S -> CVS_SERVER_SLEEP not set\.
33599 S -> Leaving do_recursion ( frame=${PFMT} )
33600 S -> Leaving do_recursion ( frame=${PFMT} )
33601 S -> Leaving do_recursion ( frame=${PFMT} )
33602 S -> Leaving do_recursion ( frame=${PFMT} )
33603 S -> Leaving do_recursion ( frame=${PFMT} )
33604 S -> Leaving do_recursion ( frame=${PFMT} )
33605 S -> Lock_Cleanup()
33606 S -> Lock_Cleanup()
33607 S -> Parse_Info (${CVSROOT_DIRNAME}/CVSROOT/taginfo, trace, ALL)
33608 S -> Reader_Lock(${CVSROOT_DIRNAME}/trace)
33609 S -> Reader_Lock(${CVSROOT_DIRNAME}/trace/subdir)
33610 S -> Simple_Lock_Cleanup()
33611 S -> Simple_Lock_Cleanup()
33612 S -> Simple_Lock_Cleanup()
33613 S -> Simple_Lock_Cleanup()
33614 S -> Simple_Lock_Cleanup()
33615 S -> Simple_Lock_Cleanup()
33616 S -> _lock_exists (${CVSROOT_DIRNAME}/trace, #cvs\.pfl\.\*, (null))
33617 S -> _lock_exists (${CVSROOT_DIRNAME}/trace, #cvs\.rfl\.\*, (null))
33618 S -> _lock_exists (${CVSROOT_DIRNAME}/trace/subdir, #cvs\.pfl\.\*, (null))
33619 S -> _lock_exists (${CVSROOT_DIRNAME}/trace/subdir, #cvs\.rfl\.\*, (null))
33620 S -> check_fileproc ( ${CVSROOT_DIRNAME}/trace, file1, ${CVSROOT_DIRNAME}/trace/file1,v )
33621 S -> check_fileproc ( ${CVSROOT_DIRNAME}/trace, file2, ${CVSROOT_DIRNAME}/trace/file2,v )
33622 S -> dirswitch (\., ${CVSROOT_DIRNAME}/trace)
33623 S -> dirswitch (\., ${CVSROOT_DIRNAME}/trace)
33624 S -> dirswitch (subdir, ${CVSROOT_DIRNAME}/trace/subdir)
33625 S -> do_cvs_command (tag)
33626 S -> do_recursion ( frame=${PFMT} )
33627 S -> do_recursion ( frame=${PFMT} )
33628 S -> do_recursion ( frame=${PFMT} )
33629 S -> do_recursion ( frame=${PFMT} )
33630 S -> do_recursion ( frame=${PFMT} )
33631 S -> do_recursion ( frame=${PFMT} )
33632 S -> lock_dir_for_write (${CVSROOT_DIRNAME}/trace)
33633 S -> lock_dir_for_write (${CVSROOT_DIRNAME}/trace/subdir)
33634 S -> lock_name (${CVSROOT_DIRNAME}/trace, #cvs\.lock)
33635 S -> lock_name (${CVSROOT_DIRNAME}/trace, #cvs\.lock)
33636 S -> lock_name (${CVSROOT_DIRNAME}/trace, #cvs\.lock)
33637 S -> lock_name (${CVSROOT_DIRNAME}/trace, #cvs\.rfl\.${hostname}\.[0-9][0-9]*)
33638 S -> lock_name (${CVSROOT_DIRNAME}/trace, #cvs\.wfl\.${hostname}\.[0-9][0-9]*)
33639 S -> lock_name (${CVSROOT_DIRNAME}/trace, )
33640 S -> lock_name (${CVSROOT_DIRNAME}/trace, )
33641 S -> lock_name (${CVSROOT_DIRNAME}/trace/subdir, #cvs\.lock)
33642 S -> lock_name (${CVSROOT_DIRNAME}/trace/subdir, #cvs\.lock)
33643 S -> lock_name (${CVSROOT_DIRNAME}/trace/subdir, #cvs\.lock)
33644 S -> lock_name (${CVSROOT_DIRNAME}/trace/subdir, #cvs\.rfl\.${hostname}\.[0-9][0-9]*)
33645 S -> lock_name (${CVSROOT_DIRNAME}/trace/subdir, #cvs\.wfl\.${hostname}\.[0-9][0-9]*)
33646 S -> lock_name (${CVSROOT_DIRNAME}/trace/subdir, )
33647 S -> lock_name (${CVSROOT_DIRNAME}/trace/subdir, )
33648 S -> lock_simple_remove()
33649 S -> lock_simple_remove()
33650 S -> lock_simple_remove()
33651 S -> lock_simple_remove()
33652 S -> promotable_exists (${CVSROOT_DIRNAME}/trace)
33653 S -> promotable_exists (${CVSROOT_DIRNAME}/trace/subdir)
33655 S -> readers_exist (${CVSROOT_DIRNAME}/trace)
33656 S -> readers_exist (${CVSROOT_DIRNAME}/trace/subdir)
33657 S -> remove_locks()
33658 S -> remove_locks()
33659 S -> rename(${CVSROOT_DIRNAME}/trace/,file1,,${CVSROOT_DIRNAME}/trace/file1,v)
33660 S -> rename(${CVSROOT_DIRNAME}/trace/,file2,,${CVSROOT_DIRNAME}/trace/file2,v)
33661 S -> rename(CVS/Entries\.Backup,CVS/Entries)
33662 S -> rename(CVS/Entries\.Backup,CVS/Entries)
33663 S -> rtag_proc ( argc=1, argv=${PFMT}, xwhere=(null),
33664 S -> serve_directory (\.)
33665 S -> serve_directory (\.)
33666 S -> serve_directory (subdir)
33667 S -> server_cleanup()
33668 S -> server_cleanup()
33669 S -> server_notify()
33670 S -> set_lock (${CVSROOT_DIRNAME}/trace, 1)
33671 S -> set_lock (${CVSROOT_DIRNAME}/trace, 1)
33672 S -> set_lock (${CVSROOT_DIRNAME}/trace/subdir, 1)
33673 S -> set_lock (${CVSROOT_DIRNAME}/trace/subdir, 1)
33674 S -> start_recursion ( fileproc=${PFMT}, filesdoneproc=${PFMT},
33675 S -> start_recursion ( fileproc=${PFMT}, filesdoneproc=${PFMT},
33676 S -> unlink_file(CVS/Entries\.Log)
33677 S -> unlink_file(CVS/Entries\.Log)
33678 S -> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
33679 S -> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
33680 S -> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
33681 S -> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
33682 S -> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
33683 S -> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
33684 S -> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
33685 S -> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
33686 S -> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
33687 S -> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
33688 S -> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
33689 S -> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
33690 S -> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
33691 S -> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
33692 S -> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
33693 S -> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
33694 S -> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
33695 S -> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
33696 S -> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
33697 S -> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
33698 S -> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
33699 S -> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
33700 S -> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
33701 S -> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
33702 S -> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
33703 S -> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
33704 S -> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
33705 S -> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
33706 S -> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
33707 S -> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
33710 ${SPROG} tag: Tagging \.
33711 ${SPROG} tag: Tagging subdir"
33712 dotest_sort trace-9
"${testcvs} -t -t -t log" \
33715 *callerdat=${PFMT}, argc=0, argv=${PFMT},
33716 *direntproc=${PFMT}, dirleavproc=${PFMT},
33717 *dosrcs=1, repository_in=(null) )
33718 *local=0, which=7, aflag=0,
33719 *locktype=1, update_preload=(null)
33720 *-> Leaving do_recursion ( frame=${PFMT} )
33721 *-> Leaving do_recursion ( frame=${PFMT} )
33722 *-> Leaving do_recursion ( frame=${PFMT} )
33724 *-> Reader_Lock(${CVSROOT_DIRNAME}/trace)
33725 *-> Reader_Lock(${CVSROOT_DIRNAME}/trace/subdir)
33726 *-> Simple_Lock_Cleanup()
33727 *-> Simple_Lock_Cleanup()
33728 *-> Simple_Lock_Cleanup()
33729 *-> do_recursion ( frame=${PFMT} )
33730 *-> do_recursion ( frame=${PFMT} )
33731 *-> do_recursion ( frame=${PFMT} )
33732 *-> lock_name (${CVSROOT_DIRNAME}/trace, #cvs\.lock)
33733 *-> lock_name (${CVSROOT_DIRNAME}/trace, #cvs\.rfl\.${hostname}\.[0-9][0-9]*)
33734 *-> lock_name (${CVSROOT_DIRNAME}/trace/subdir, #cvs\.lock)
33735 *-> lock_name (${CVSROOT_DIRNAME}/trace/subdir, #cvs\.rfl\.${hostname}\.[0-9][0-9]*)
33736 *-> lock_simple_remove()
33737 *-> lock_simple_remove()
33738 *-> main loop with CVSROOT=${CVSROOT_DIRNAME}
33739 *-> parse_cvsroot ( ${CVSROOT_DIRNAME} )
33741 *-> set_lock (${CVSROOT_DIRNAME}/trace, 1)
33742 *-> set_lock (${CVSROOT_DIRNAME}/trace/subdir, 1)
33743 *-> start_recursion ( fileproc=${PFMT}, filesdoneproc=${PFMT},
33744 *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
33745 *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
33746 *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
33747 *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
33748 *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
33749 *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
33750 *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
33751 *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
33752 *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
33753 *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
33754 *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
33755 *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
33756 *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
33757 *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
33758 *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
33759 *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
33760 *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
33761 *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
33762 *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
33763 *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
33767 branch1: 1\.1\.0\.2
33768 branch1: 1\.1\.1\.1\.0\.2
33769 version-1: 1\.1\.1\.1
33770 ----------------------------
33771 ----------------------------
33772 ----------------------------
33773 =============================================================================
33774 =============================================================================
33776 RCS file: ${CVSROOT_DIRNAME}/trace/file1,v
33777 RCS file: ${CVSROOT_DIRNAME}/trace/file2,v
33778 Working file: file1
33779 Working file: file2
33785 ${SPROG} log: Logging \.
33786 ${SPROG} log: Logging subdir
33787 date: ${ISO8601DATE}; author: ${username}; state: Exp; commitid: ${commitid};
33788 date: ${ISO8601DATE}; author: ${username}; state: Exp; lines: ${PLUS}0 -0; commitid: ${commitid};
33789 date: ${ISO8601DATE}; author: ${username}; state: Exp; commitid: ${commitid};
33795 keyword substitution: kv
33796 keyword substitution: kv
33802 revision 1\.1\.1\.1
33805 total revisions: 1; selected revisions: 1
33806 total revisions: 2; selected revisions: 2" \
33810 *callerdat=${PFMT}, argc=0, argv=${PFMT},
33811 *callerdat=${PFMT}, argc=0, argv=${PFMT},
33812 *direntproc=${PFMT}, dirleavproc=${PFMT},
33813 *direntproc=${PFMT}, dirleavproc=${PFMT},
33814 *dosrcs=0, repository_in=(null) )
33815 *dosrcs=1, repository_in=(null) )
33816 *local=0, which=1, aflag=0,
33817 *local=0, which=7, aflag=0,
33818 *locktype=0, update_preload=(null)
33819 *locktype=1, update_preload=(null)
33820 *-> Forking server: ${CVS_SERVER} server
33821 *-> Leaving do_recursion ( frame=${PFMT} )
33822 *-> Leaving do_recursion ( frame=${PFMT} )
33823 *-> Leaving do_recursion ( frame=${PFMT} )
33824 *-> do_recursion ( frame=${PFMT} )
33825 *-> do_recursion ( frame=${PFMT} )
33826 *-> do_recursion ( frame=${PFMT} )
33827 *-> main loop with CVSROOT=${CVSROOT}
33828 *-> parse_cvsroot ( ${CVSROOT} )
33829 *-> start_recursion ( fileproc=${PFMT}, filesdoneproc=${PFMT},
33830 *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
33831 *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
33832 *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
33833 *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
33834 *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
33835 *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
33836 *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
33837 *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
33838 *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
33839 *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
33840 *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
33841 *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
33845 branch1: 1\.1\.0\.2
33846 branch1: 1\.1\.1\.1\.0\.2
33847 version-1: 1\.1\.1\.1
33848 ----------------------------
33849 ----------------------------
33850 ----------------------------
33851 =============================================================================
33852 =============================================================================
33854 RCS file: ${CVSROOT_DIRNAME}/trace/file1,v
33855 RCS file: ${CVSROOT_DIRNAME}/trace/file2,v
33856 S -> CVS_SERVER_SLEEP not set\.
33857 S -> Leaving do_recursion ( frame=${PFMT} )
33858 S -> Leaving do_recursion ( frame=${PFMT} )
33859 S -> Leaving do_recursion ( frame=${PFMT} )
33860 S -> Lock_Cleanup()
33861 S -> Lock_Cleanup()
33862 S -> Reader_Lock(${CVSROOT_DIRNAME}/trace)
33863 S -> Reader_Lock(${CVSROOT_DIRNAME}/trace/subdir)
33864 S -> Simple_Lock_Cleanup()
33865 S -> Simple_Lock_Cleanup()
33866 S -> Simple_Lock_Cleanup()
33867 S -> Simple_Lock_Cleanup()
33868 S -> dirswitch (\., ${CVSROOT_DIRNAME}/trace)
33869 S -> dirswitch (\., ${CVSROOT_DIRNAME}/trace)
33870 S -> dirswitch (subdir, ${CVSROOT_DIRNAME}/trace/subdir)
33871 S -> do_cvs_command (log)
33872 S -> do_recursion ( frame=${PFMT} )
33873 S -> do_recursion ( frame=${PFMT} )
33874 S -> do_recursion ( frame=${PFMT} )
33875 S -> lock_name (${CVSROOT_DIRNAME}/trace, #cvs\.lock)
33876 S -> lock_name (${CVSROOT_DIRNAME}/trace, #cvs\.rfl\.${hostname}\.[0-9][0-9]*)
33877 S -> lock_name (${CVSROOT_DIRNAME}/trace/subdir, #cvs\.lock)
33878 S -> lock_name (${CVSROOT_DIRNAME}/trace/subdir, #cvs\.rfl\.${hostname}\.[0-9][0-9]*)
33879 S -> lock_simple_remove()
33880 S -> lock_simple_remove()
33881 S -> remove_locks()
33882 S -> remove_locks()
33883 S -> rename(CVS/Entries\.Backup,CVS/Entries)
33884 S -> rename(CVS/Entries\.Backup,CVS/Entries)
33885 S -> serve_directory (\.)
33886 S -> serve_directory (\.)
33887 S -> serve_directory (subdir)
33888 S -> server_cleanup()
33889 S -> server_cleanup()
33890 S -> server_notify()
33891 S -> set_lock (${CVSROOT_DIRNAME}/trace, 1)
33892 S -> set_lock (${CVSROOT_DIRNAME}/trace/subdir, 1)
33893 S -> start_recursion ( fileproc=${PFMT}, filesdoneproc=${PFMT},
33894 S -> unlink_file(CVS/Entries\.Log)
33895 S -> unlink_file(CVS/Entries\.Log)
33896 S -> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
33897 S -> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
33898 S -> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
33899 S -> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
33900 S -> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
33901 S -> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
33902 S -> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
33903 S -> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
33904 S -> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
33905 S -> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
33906 S -> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
33907 S -> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
33908 S -> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
33909 S -> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
33910 S -> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
33911 S -> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
33912 S -> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
33913 S -> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
33914 S -> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
33915 Working file: file1
33916 Working file: file2
33922 ${SPROG} log: Logging \.
33923 ${SPROG} log: Logging subdir
33924 date: ${ISO8601DATE}; author: ${username}; state: Exp; commitid: ${commitid};
33925 date: ${ISO8601DATE}; author: ${username}; state: Exp; lines: ${PLUS}0 -0; commitid: ${commitid};
33926 date: ${ISO8601DATE}; author: ${username}; state: Exp; commitid: ${commitid};
33932 keyword substitution: kv
33933 keyword substitution: kv
33939 revision 1\.1\.1\.1
33942 total revisions: 1; selected revisions: 1
33943 total revisions: 2; selected revisions: 2"
33945 dotest_sort trace-10
"${testcvs} -t -t -t annotate file1" \
33947 *callerdat=${PFMT}, argc=1, argv=${PFMT},
33948 *direntproc=${PFMT}, dirleavproc=${PFMT},
33949 *dosrcs=1, repository_in= )
33950 *local=0, which=1, aflag=0,
33951 *locktype=1, update_preload=(null)
33952 *-> Leaving do_recursion ( frame=${PFMT} )
33954 *-> Reader_Lock(${CVSROOT_DIRNAME}/trace)
33955 *-> Simple_Lock_Cleanup()
33956 *-> Simple_Lock_Cleanup()
33957 *-> do_recursion ( frame=${PFMT} )
33958 *-> lock_name (${CVSROOT_DIRNAME}/trace, #cvs\.lock)
33959 *-> lock_name (${CVSROOT_DIRNAME}/trace, #cvs\.rfl\.${hostname}\.[0-9][0-9]*)
33960 *-> lock_simple_remove()
33961 *-> main loop with CVSROOT=${CVSROOT_DIRNAME}
33962 *-> parse_cvsroot ( ${CVSROOT_DIRNAME} )
33964 *-> set_lock (${CVSROOT_DIRNAME}/trace, 1)
33965 *-> start_recursion ( fileproc=${PFMT}, filesdoneproc=${PFMT},
33966 *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
33967 *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
33968 *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
33969 *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
33970 \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*
33971 Annotations for file1" \
33974 *callerdat=${PFMT}, argc=1, argv=${PFMT},
33975 *callerdat=${PFMT}, argc=1, argv=${PFMT},
33976 *direntproc=${PFMT}, dirleavproc=${PFMT},
33977 *direntproc=${PFMT}, dirleavproc=${PFMT},
33978 *dosrcs=0, repository_in=(null) )
33979 *dosrcs=1, repository_in= )
33980 *local=0, which=1, aflag=0,
33981 *local=0, which=1, aflag=0,
33982 *locktype=0, update_preload=(null)
33983 *locktype=1, update_preload=(null)
33984 *-> Forking server: ${CVS_SERVER} server
33985 *-> Leaving do_recursion ( frame=${PFMT} )
33986 *-> do_recursion ( frame=${PFMT} )
33987 *-> main loop with CVSROOT=${CVSROOT}
33988 *-> parse_cvsroot ( ${CVSROOT} )
33989 *-> start_recursion ( fileproc=${PFMT}, filesdoneproc=${PFMT},
33990 *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
33991 *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
33992 *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
33993 *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
33994 *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
33995 \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*
33996 Annotations for file1
33997 S -> CVS_SERVER_SLEEP not set\.
33998 S -> Leaving do_recursion ( frame=${PFMT} )
33999 S -> Lock_Cleanup()
34000 S -> Lock_Cleanup()
34001 S -> Reader_Lock(${CVSROOT_DIRNAME}/trace)
34002 S -> Simple_Lock_Cleanup()
34003 S -> Simple_Lock_Cleanup()
34004 S -> Simple_Lock_Cleanup()
34005 S -> dirswitch (\., ${CVSROOT_DIRNAME}/trace)
34006 S -> do_cvs_command (annotate)
34007 S -> do_recursion ( frame=${PFMT} )
34008 S -> lock_name (${CVSROOT_DIRNAME}/trace, #cvs\.lock)
34009 S -> lock_name (${CVSROOT_DIRNAME}/trace, #cvs\.rfl\.${hostname}\.[0-9][0-9]*)
34010 S -> lock_simple_remove()
34011 S -> remove_locks()
34012 S -> remove_locks()
34013 S -> serve_directory (\.)
34014 S -> server_cleanup()
34015 S -> server_cleanup()
34016 S -> server_notify()
34017 S -> server_pathname_check (file1)
34018 S -> set_lock (${CVSROOT_DIRNAME}/trace, 1)
34019 S -> start_recursion ( fileproc=${PFMT}, filesdoneproc=${PFMT},
34020 S -> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
34021 S -> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )"
34024 trace-11
"${testcvs} -t -t -t rtag -r bp -b branch2 trace" \
34025 " *aflag=0, repository=${CVSROOT_DIRNAME}/trace )
34026 *callerdat=${PFMT}, argc=0, argv=${PFMT},
34027 *callerdat=${PFMT}, argc=0, argv=${PFMT},
34028 *callerdat=${PFMT}, argc=0, argv=${PFMT},
34029 *direntproc=${PFMT}, dirleavproc=${PFMT},
34030 *direntproc=${PFMT}, dirleavproc=${PFMT},
34031 *direntproc=${PFMT}, dirleavproc=${PFMT},
34032 *dosrcs=1, repository_in=${CVSROOT_DIRNAME}/trace )
34033 *dosrcs=1, repository_in=${CVSROOT_DIRNAME}/trace )
34034 *dosrcs=1, repository_in=${CVSROOT_DIRNAME}/trace )
34035 *local=0, which=6, aflag=0,
34036 *local=0, which=6, aflag=0,
34037 *local=0, which=6, aflag=0,
34038 *locktype=1, update_preload=(null)
34039 *locktype=1, update_preload=trace
34040 *locktype=2, update_preload=trace
34041 *local_specified=0, mname=trace, msg=Tagging )
34042 *mwhere=(null), mfile=(null), shorten=0,
34043 *-> Leaving do_recursion ( frame=${PFMT} )
34044 *-> Leaving do_recursion ( frame=${PFMT} )
34045 *-> Leaving do_recursion ( frame=${PFMT} )
34046 *-> Leaving do_recursion ( frame=${PFMT} )
34047 *-> Leaving do_recursion ( frame=${PFMT} )
34048 *-> Leaving do_recursion ( frame=${PFMT} )
34049 *-> Leaving do_recursion ( frame=${PFMT} )
34050 *-> Leaving do_recursion ( frame=${PFMT} )
34051 *-> Leaving do_recursion ( frame=${PFMT} )
34053 *-> Parse_Info (${CVSROOT_DIRNAME}/CVSROOT/taginfo, trace, ALL)
34054 *-> Reader_Lock(${CVSROOT_DIRNAME}/trace)
34055 *-> Reader_Lock(${CVSROOT_DIRNAME}/trace)
34056 *-> Reader_Lock(${CVSROOT_DIRNAME}/trace/subdir)
34057 *-> Reader_Lock(${CVSROOT_DIRNAME}/trace/subdir)
34058 *-> Simple_Lock_Cleanup()
34059 *-> Simple_Lock_Cleanup()
34060 *-> Simple_Lock_Cleanup()
34061 *-> Simple_Lock_Cleanup()
34062 *-> Simple_Lock_Cleanup()
34063 *-> Simple_Lock_Cleanup()
34064 *-> Simple_Lock_Cleanup()
34065 *-> _lock_exists (${CVSROOT_DIRNAME}/trace, #cvs\.pfl\.\*, (null))
34066 *-> _lock_exists (${CVSROOT_DIRNAME}/trace, #cvs\.rfl\.\*, (null))
34067 *-> _lock_exists (${CVSROOT_DIRNAME}/trace/subdir, #cvs\.pfl\.\*, (null))
34068 *-> _lock_exists (${CVSROOT_DIRNAME}/trace/subdir, #cvs\.rfl\.\*, (null))
34069 *-> check_fileproc ( ${CVSROOT_DIRNAME}/trace, trace/file1, ${CVSROOT_DIRNAME}/trace/file1,v )
34070 *-> check_fileproc ( ${CVSROOT_DIRNAME}/trace, trace/file2, ${CVSROOT_DIRNAME}/trace/file2,v )
34071 *-> do_module (trace, Tagging, NULL, branch2)
34072 *-> do_recursion ( frame=${PFMT} )
34073 *-> do_recursion ( frame=${PFMT} )
34074 *-> do_recursion ( frame=${PFMT} )
34075 *-> do_recursion ( frame=${PFMT} )
34076 *-> do_recursion ( frame=${PFMT} )
34077 *-> do_recursion ( frame=${PFMT} )
34078 *-> do_recursion ( frame=${PFMT} )
34079 *-> do_recursion ( frame=${PFMT} )
34080 *-> do_recursion ( frame=${PFMT} )
34081 *-> fopen(${CVSROOT_DIRNAME}/CVSROOT/history,a)
34082 *-> lock_dir_for_write (${CVSROOT_DIRNAME}/trace)
34083 *-> lock_dir_for_write (${CVSROOT_DIRNAME}/trace/subdir)
34084 *-> lock_name (${CVSROOT_DIRNAME}/trace, #cvs\.lock)
34085 *-> lock_name (${CVSROOT_DIRNAME}/trace, #cvs\.lock)
34086 *-> lock_name (${CVSROOT_DIRNAME}/trace, #cvs\.lock)
34087 *-> lock_name (${CVSROOT_DIRNAME}/trace, #cvs\.lock)
34088 *-> lock_name (${CVSROOT_DIRNAME}/trace, #cvs\.rfl\.${hostname}\.[0-9][0-9]*)
34089 *-> lock_name (${CVSROOT_DIRNAME}/trace, #cvs\.rfl\.${hostname}\.[0-9][0-9]*)
34090 *-> lock_name (${CVSROOT_DIRNAME}/trace, #cvs\.wfl\.${hostname}\.[0-9][0-9]*)
34091 *-> lock_name (${CVSROOT_DIRNAME}/trace, )
34092 *-> lock_name (${CVSROOT_DIRNAME}/trace, )
34093 *-> lock_name (${CVSROOT_DIRNAME}/trace/subdir, #cvs\.lock)
34094 *-> lock_name (${CVSROOT_DIRNAME}/trace/subdir, #cvs\.lock)
34095 *-> lock_name (${CVSROOT_DIRNAME}/trace/subdir, #cvs\.lock)
34096 *-> lock_name (${CVSROOT_DIRNAME}/trace/subdir, #cvs\.lock)
34097 *-> lock_name (${CVSROOT_DIRNAME}/trace/subdir, #cvs\.rfl\.${hostname}\.[0-9][0-9]*)
34098 *-> lock_name (${CVSROOT_DIRNAME}/trace/subdir, #cvs\.rfl\.${hostname}\.[0-9][0-9]*)
34099 *-> lock_name (${CVSROOT_DIRNAME}/trace/subdir, #cvs\.wfl\.${hostname}\.[0-9][0-9]*)
34100 *-> lock_name (${CVSROOT_DIRNAME}/trace/subdir, )
34101 *-> lock_name (${CVSROOT_DIRNAME}/trace/subdir, )
34102 *-> lock_simple_remove()
34103 *-> lock_simple_remove()
34104 *-> lock_simple_remove()
34105 *-> lock_simple_remove()
34106 *-> lock_simple_remove()
34107 *-> lock_simple_remove()
34108 *-> main loop with CVSROOT=${CVSROOT_DIRNAME}
34109 *-> parse_cvsroot ( ${CVSROOT_DIRNAME} )
34110 *-> promotable_exists (${CVSROOT_DIRNAME}/trace)
34111 *-> promotable_exists (${CVSROOT_DIRNAME}/trace/subdir)
34113 *-> readers_exist (${CVSROOT_DIRNAME}/trace)
34114 *-> readers_exist (${CVSROOT_DIRNAME}/trace/subdir)
34116 *-> rename(${CVSROOT_DIRNAME}/trace/,file1,,${CVSROOT_DIRNAME}/trace/file1,v)
34117 *-> rename(${CVSROOT_DIRNAME}/trace/,file2,,${CVSROOT_DIRNAME}/trace/file2,v)
34118 *-> rtag_proc ( argc=1, argv=${PFMT}, xwhere=(null),
34119 *-> set_lock (${CVSROOT_DIRNAME}/trace, 1)
34120 *-> set_lock (${CVSROOT_DIRNAME}/trace, 1)
34121 *-> set_lock (${CVSROOT_DIRNAME}/trace, 1)
34122 *-> set_lock (${CVSROOT_DIRNAME}/trace/subdir, 1)
34123 *-> set_lock (${CVSROOT_DIRNAME}/trace/subdir, 1)
34124 *-> set_lock (${CVSROOT_DIRNAME}/trace/subdir, 1)
34125 *-> start_recursion ( fileproc=${PFMT}, filesdoneproc=${PFMT},
34126 *-> start_recursion ( fileproc=${PFMT}, filesdoneproc=${PFMT},
34127 *-> start_recursion ( fileproc=${PFMT}, filesdoneproc=${PFMT},
34128 *-> tag_check_valid ( name=bp, argc=0, argv=${PFMT}, local=0,
34129 *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
34130 *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
34131 *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
34132 *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
34133 *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
34134 *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
34135 *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
34136 *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
34137 *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
34138 *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
34139 *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
34140 *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
34141 *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
34142 *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
34143 *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
34144 *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
34145 *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
34146 *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
34147 *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
34148 *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
34149 *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
34150 *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
34151 *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
34152 *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
34153 *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
34154 *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
34155 *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
34156 *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
34157 *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
34158 *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
34159 *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
34160 ${SPROG} rtag: Tagging trace
34161 ${SPROG} rtag: Tagging trace/subdir" \
34163 *aflag=0, repository=${CVSROOT_DIRNAME}/trace )
34164 *callerdat=${PFMT}, argc=0, argv=${PFMT},
34165 *callerdat=${PFMT}, argc=0, argv=${PFMT},
34166 *callerdat=${PFMT}, argc=0, argv=${PFMT},
34167 *direntproc=${PFMT}, dirleavproc=${PFMT},
34168 *direntproc=${PFMT}, dirleavproc=${PFMT},
34169 *direntproc=${PFMT}, dirleavproc=${PFMT},
34170 *dosrcs=1, repository_in=${CVSROOT_DIRNAME}/trace )
34171 *dosrcs=1, repository_in=${CVSROOT_DIRNAME}/trace )
34172 *dosrcs=1, repository_in=${CVSROOT_DIRNAME}/trace )
34173 *local=0, which=6, aflag=0,
34174 *local=0, which=6, aflag=0,
34175 *local=0, which=6, aflag=0,
34176 *locktype=1, update_preload=(null)
34177 *locktype=1, update_preload=trace
34178 *locktype=2, update_preload=trace
34179 *local_specified=0, mname=trace, msg=Tagging )
34180 *mwhere=(null), mfile=(null), shorten=0,
34181 *-> Forking server: ${CVS_SERVER} server
34182 *-> main loop with CVSROOT=${CVSROOT}
34183 *-> parse_cvsroot ( ${CVSROOT} )
34184 *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
34185 *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
34186 *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
34187 S -> CVS_SERVER_SLEEP not set\.
34188 S -> Leaving do_recursion ( frame=${PFMT} )
34189 S -> Leaving do_recursion ( frame=${PFMT} )
34190 S -> Leaving do_recursion ( frame=${PFMT} )
34191 S -> Leaving do_recursion ( frame=${PFMT} )
34192 S -> Leaving do_recursion ( frame=${PFMT} )
34193 S -> Leaving do_recursion ( frame=${PFMT} )
34194 S -> Leaving do_recursion ( frame=${PFMT} )
34195 S -> Leaving do_recursion ( frame=${PFMT} )
34196 S -> Leaving do_recursion ( frame=${PFMT} )
34197 S -> Lock_Cleanup()
34198 S -> Lock_Cleanup()
34199 S -> Parse_Info (${CVSROOT_DIRNAME}/CVSROOT/taginfo, trace, ALL)
34200 S -> Reader_Lock(${CVSROOT_DIRNAME}/trace)
34201 S -> Reader_Lock(${CVSROOT_DIRNAME}/trace)
34202 S -> Reader_Lock(${CVSROOT_DIRNAME}/trace/subdir)
34203 S -> Reader_Lock(${CVSROOT_DIRNAME}/trace/subdir)
34204 S -> Simple_Lock_Cleanup()
34205 S -> Simple_Lock_Cleanup()
34206 S -> Simple_Lock_Cleanup()
34207 S -> Simple_Lock_Cleanup()
34208 S -> Simple_Lock_Cleanup()
34209 S -> Simple_Lock_Cleanup()
34210 S -> Simple_Lock_Cleanup()
34211 S -> Simple_Lock_Cleanup()
34212 S -> _lock_exists (${CVSROOT_DIRNAME}/trace, #cvs\.pfl\.\*, (null))
34213 S -> _lock_exists (${CVSROOT_DIRNAME}/trace, #cvs\.rfl\.\*, (null))
34214 S -> _lock_exists (${CVSROOT_DIRNAME}/trace/subdir, #cvs\.pfl\.\*, (null))
34215 S -> _lock_exists (${CVSROOT_DIRNAME}/trace/subdir, #cvs\.rfl\.\*, (null))
34216 S -> check_fileproc ( ${CVSROOT_DIRNAME}/trace, trace/file1, ${CVSROOT_DIRNAME}/trace/file1,v )
34217 S -> check_fileproc ( ${CVSROOT_DIRNAME}/trace, trace/file2, ${CVSROOT_DIRNAME}/trace/file2,v )
34218 S -> do_cvs_command (rtag)
34219 S -> do_module (trace, Tagging, NULL, branch2)
34220 S -> do_recursion ( frame=${PFMT} )
34221 S -> do_recursion ( frame=${PFMT} )
34222 S -> do_recursion ( frame=${PFMT} )
34223 S -> do_recursion ( frame=${PFMT} )
34224 S -> do_recursion ( frame=${PFMT} )
34225 S -> do_recursion ( frame=${PFMT} )
34226 S -> do_recursion ( frame=${PFMT} )
34227 S -> do_recursion ( frame=${PFMT} )
34228 S -> do_recursion ( frame=${PFMT} )
34229 S -> fopen(${CVSROOT_DIRNAME}/CVSROOT/history,a)
34230 S -> lock_dir_for_write (${CVSROOT_DIRNAME}/trace)
34231 S -> lock_dir_for_write (${CVSROOT_DIRNAME}/trace/subdir)
34232 S -> lock_name (${CVSROOT_DIRNAME}/trace, #cvs\.lock)
34233 S -> lock_name (${CVSROOT_DIRNAME}/trace, #cvs\.lock)
34234 S -> lock_name (${CVSROOT_DIRNAME}/trace, #cvs\.lock)
34235 S -> lock_name (${CVSROOT_DIRNAME}/trace, #cvs\.lock)
34236 S -> lock_name (${CVSROOT_DIRNAME}/trace, #cvs\.rfl\.${hostname}\.[0-9][0-9]*)
34237 S -> lock_name (${CVSROOT_DIRNAME}/trace, #cvs\.rfl\.${hostname}\.[0-9][0-9]*)
34238 S -> lock_name (${CVSROOT_DIRNAME}/trace, #cvs\.wfl\.${hostname}\.[0-9][0-9]*)
34239 S -> lock_name (${CVSROOT_DIRNAME}/trace, )
34240 S -> lock_name (${CVSROOT_DIRNAME}/trace, )
34241 S -> lock_name (${CVSROOT_DIRNAME}/trace/subdir, #cvs\.lock)
34242 S -> lock_name (${CVSROOT_DIRNAME}/trace/subdir, #cvs\.lock)
34243 S -> lock_name (${CVSROOT_DIRNAME}/trace/subdir, #cvs\.lock)
34244 S -> lock_name (${CVSROOT_DIRNAME}/trace/subdir, #cvs\.lock)
34245 S -> lock_name (${CVSROOT_DIRNAME}/trace/subdir, #cvs\.rfl\.${hostname}\.[0-9][0-9]*)
34246 S -> lock_name (${CVSROOT_DIRNAME}/trace/subdir, #cvs\.rfl\.${hostname}\.[0-9][0-9]*)
34247 S -> lock_name (${CVSROOT_DIRNAME}/trace/subdir, #cvs\.wfl\.${hostname}\.[0-9][0-9]*)
34248 S -> lock_name (${CVSROOT_DIRNAME}/trace/subdir, )
34249 S -> lock_name (${CVSROOT_DIRNAME}/trace/subdir, )
34250 S -> lock_simple_remove()
34251 S -> lock_simple_remove()
34252 S -> lock_simple_remove()
34253 S -> lock_simple_remove()
34254 S -> lock_simple_remove()
34255 S -> lock_simple_remove()
34256 S -> promotable_exists (${CVSROOT_DIRNAME}/trace)
34257 S -> promotable_exists (${CVSROOT_DIRNAME}/trace/subdir)
34259 S -> readers_exist (${CVSROOT_DIRNAME}/trace)
34260 S -> readers_exist (${CVSROOT_DIRNAME}/trace/subdir)
34261 S -> remove_locks()
34262 S -> remove_locks()
34263 S -> rename(${CVSROOT_DIRNAME}/trace/,file1,,${CVSROOT_DIRNAME}/trace/file1,v)
34264 S -> rename(${CVSROOT_DIRNAME}/trace/,file2,,${CVSROOT_DIRNAME}/trace/file2,v)
34265 S -> rtag_proc ( argc=1, argv=${PFMT}, xwhere=(null),
34266 S -> server_cleanup()
34267 S -> server_cleanup()
34268 S -> server_notify()
34269 S -> set_lock (${CVSROOT_DIRNAME}/trace, 1)
34270 S -> set_lock (${CVSROOT_DIRNAME}/trace, 1)
34271 S -> set_lock (${CVSROOT_DIRNAME}/trace, 1)
34272 S -> set_lock (${CVSROOT_DIRNAME}/trace/subdir, 1)
34273 S -> set_lock (${CVSROOT_DIRNAME}/trace/subdir, 1)
34274 S -> set_lock (${CVSROOT_DIRNAME}/trace/subdir, 1)
34275 S -> start_recursion ( fileproc=${PFMT}, filesdoneproc=${PFMT},
34276 S -> start_recursion ( fileproc=${PFMT}, filesdoneproc=${PFMT},
34277 S -> start_recursion ( fileproc=${PFMT}, filesdoneproc=${PFMT},
34278 S -> tag_check_valid ( name=bp, argc=0, argv=${PFMT}, local=0,
34279 S -> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
34280 S -> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
34281 S -> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
34282 S -> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
34283 S -> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
34284 S -> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
34285 S -> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
34286 S -> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
34287 S -> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
34288 S -> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
34289 S -> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
34290 S -> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
34291 S -> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
34292 S -> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
34293 S -> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
34294 S -> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
34295 S -> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
34296 S -> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
34297 S -> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
34298 S -> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
34299 S -> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
34300 S -> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
34301 S -> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
34302 S -> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
34303 S -> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
34304 S -> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
34305 S -> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
34306 S -> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
34307 S -> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
34308 ${SPROG} rtag: Tagging trace
34309 ${SPROG} rtag: Tagging trace/subdir"
34311 dotest_sort trace-12
"${testcvs} -t -t -t status file1" \
34314 *callerdat=${PFMT}, argc=1, argv=${PFMT},
34315 *direntproc=${PFMT}, dirleavproc=${PFMT},
34316 *dosrcs=1, repository_in=(null) )
34317 *local=0, which=1, aflag=0,
34318 *locktype=1, update_preload=(null)
34319 Repository revision: 1\.1\.1\.1 ${CVSROOT_DIRNAME}/trace/file1,v
34320 Sticky Date: (none)
34321 Sticky Options: (none)
34323 Working revision: 1\.1\.1\.1 ${DATE}
34324 *-> Leaving do_recursion ( frame=${PFMT} )
34326 *-> Reader_Lock(${CVSROOT_DIRNAME}/trace)
34327 *-> Simple_Lock_Cleanup()
34328 *-> Simple_Lock_Cleanup()
34329 *-> do_recursion ( frame=${PFMT} )
34330 *-> lock_name (${CVSROOT_DIRNAME}/trace, #cvs\.lock)
34331 *-> lock_name (${CVSROOT_DIRNAME}/trace, #cvs\.rfl\.${hostname}\.[0-9][0-9]*)
34332 *-> lock_simple_remove()
34333 *-> main loop with CVSROOT=${CVSROOT_DIRNAME}
34334 *-> parse_cvsroot ( ${CVSROOT_DIRNAME} )
34336 *-> set_lock (${CVSROOT_DIRNAME}/trace, 1)
34337 *-> start_recursion ( fileproc=${PFMT}, filesdoneproc=${PFMT},
34338 *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
34339 *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
34340 *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
34341 *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
34342 ===================================================================
34343 File: file1 *Status: Up-to-date" \
34347 *callerdat=${PFMT}, argc=1, argv=${PFMT},
34348 *callerdat=${PFMT}, argc=1, argv=${PFMT},
34349 *direntproc=${PFMT}, dirleavproc=${PFMT},
34350 *direntproc=${PFMT}, dirleavproc=${PFMT},
34351 *dosrcs=0, repository_in=(null) )
34352 *dosrcs=1, repository_in=(null) )
34353 *local=0, which=1, aflag=0,
34354 *local=0, which=1, aflag=0,
34355 *locktype=0, update_preload=(null)
34356 *locktype=1, update_preload=(null)
34357 Repository revision: 1\.1\.1\.1 ${CVSROOT_DIRNAME}/trace/file1,v
34358 Sticky Date: (none)
34359 Sticky Options: (none)
34361 Working revision: 1\.1\.1\.1
34362 *-> Forking server: ${CVS_SERVER} server
34363 *-> Leaving do_recursion ( frame=${PFMT} )
34364 *-> do_recursion ( frame=${PFMT} )
34365 *-> main loop with CVSROOT=${CVSROOT}
34366 *-> parse_cvsroot ( ${CVSROOT} )
34367 *-> start_recursion ( fileproc=${PFMT}, filesdoneproc=${PFMT},
34368 *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
34369 *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
34370 *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
34371 *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
34372 *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
34373 ===================================================================
34374 File: file1 *Status: Up-to-date
34375 S -> CVS_SERVER_SLEEP not set\.
34376 S -> Leaving do_recursion ( frame=${PFMT} )
34377 S -> Lock_Cleanup()
34378 S -> Lock_Cleanup()
34379 S -> Reader_Lock(${CVSROOT_DIRNAME}/trace)
34380 S -> Simple_Lock_Cleanup()
34381 S -> Simple_Lock_Cleanup()
34382 S -> Simple_Lock_Cleanup()
34383 S -> dirswitch (\., ${CVSROOT_DIRNAME}/trace)
34384 S -> do_cvs_command (status)
34385 S -> do_recursion ( frame=${PFMT} )
34386 S -> lock_name (${CVSROOT_DIRNAME}/trace, #cvs\.lock)
34387 S -> lock_name (${CVSROOT_DIRNAME}/trace, #cvs\.rfl\.${hostname}\.[0-9][0-9]*)
34388 S -> lock_simple_remove()
34389 S -> remove_locks()
34390 S -> remove_locks()
34391 S -> serve_directory (\.)
34392 S -> server_cleanup()
34393 S -> server_cleanup()
34394 S -> server_notify()
34395 S -> server_pathname_check (file1)
34396 S -> set_lock (${CVSROOT_DIRNAME}/trace, 1)
34397 S -> start_recursion ( fileproc=${PFMT}, filesdoneproc=${PFMT},
34398 S -> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
34399 S -> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )"
34402 dotest_sort trace-13
"${testcvs} -t -t -t up -C file1" \
34403 " *callerdat=${PFMT}, argc=1, argv=${PFMT},
34404 *direntproc=${PFMT}, dirleavproc=${PFMT},
34405 *dosrcs=1, repository_in=(null) )
34406 *local=0, which=3, aflag=0,
34407 *locktype=1, update_preload=(null)
34408 *-> Leaving do_recursion ( frame=${PFMT} )
34410 *-> RCS_checkout (${CVSROOT_DIRNAME}/trace/file1,v, 1\.1\.1\.1, , , (function))
34411 *-> RCS_checkout (${CVSROOT_DIRNAME}/trace/file1,v, 1\.1\.1\.1, , , file1)
34412 *-> RCS_cmp_file( ${CVSROOT_DIRNAME}/trace/file1,v, 1\.1\.1\.1, (null), , file1 )
34413 *-> Reader_Lock(${CVSROOT_DIRNAME}/trace)
34414 *-> Register(file1, 1\.1\.1\.1, ${DATE}, , )
34415 *-> Simple_Lock_Cleanup()
34416 *-> Simple_Lock_Cleanup()
34417 *-> chmod(file1,[0-7][0-7]*)
34418 *-> copy(file1,\.#file1\.1\.1\.1\.1)
34419 *-> do_recursion ( frame=${PFMT} )
34420 *-> fopen(${CVSROOT_DIRNAME}/CVSROOT/history,a)
34421 *-> lock_name (${CVSROOT_DIRNAME}/trace, #cvs\.lock)
34422 *-> lock_name (${CVSROOT_DIRNAME}/trace, #cvs\.rfl\.${hostname}\.[0-9][0-9]*)
34423 *-> lock_simple_remove()
34424 *-> main loop with CVSROOT=${CVSROOT_DIRNAME}
34425 *-> parse_cvsroot ( ${CVSROOT_DIRNAME} )
34427 *-> rename(CVS/Entries\.Backup,CVS/Entries)
34428 *-> rename(file1,CVS/,,file1)
34429 *-> set_lock (${CVSROOT_DIRNAME}/trace, 1)
34430 *-> start_recursion ( fileproc=${PFMT}, filesdoneproc=${PFMT},
34431 *-> unlink_file(CVS/Entries\.Log)
34432 *-> unlink_file_dir(CVS/,,file1)
34433 *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
34434 *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
34435 *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
34436 *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
34437 *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
34438 (Locally modified file1 moved to \.#file1\.1\.1\.1\.1)
34441 *callerdat=${PFMT}, argc=1, argv=${PFMT},
34442 *callerdat=${PFMT}, argc=1, argv=${PFMT},
34443 *direntproc=${PFMT}, dirleavproc=${PFMT},
34444 *direntproc=${PFMT}, dirleavproc=${PFMT},
34445 *dosrcs=0, repository_in=(null) )
34446 *dosrcs=1, repository_in=(null) )
34447 *local=0, which=1, aflag=0,
34448 *local=0, which=3, aflag=0,
34449 *locktype=0, update_preload=(null)
34450 *locktype=1, update_preload=(null)
34451 *-> Forking server: ${CVS_SERVER} server
34452 *-> Leaving do_recursion ( frame=${PFMT} )
34453 *-> Register(file1, 1\.1\.1\.1, ${DATE}, , )
34454 *-> copy(file1,\.#file1\.1\.1\.1\.1)
34455 *-> do_recursion ( frame=${PFMT} )
34456 *-> main loop with CVSROOT=${CVSROOT}
34457 *-> parse_cvsroot ( ${CVSROOT} )
34458 *-> rename(\.new\.file1,file1)
34459 *-> rename(CVS/Entries\.Backup,CVS/Entries)
34460 *-> start_recursion ( fileproc=${PFMT}, filesdoneproc=${PFMT},
34461 *-> unlink_file(CVS/Entries\.Log)
34462 *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
34463 *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
34464 *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
34465 *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
34466 *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
34467 *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
34468 *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
34469 (Locally modified file1 moved to \.#file1\.1\.1\.1\.1)
34470 S -> CVS_SERVER_SLEEP not set\.
34471 S -> Leaving do_recursion ( frame=${PFMT} )
34472 S -> Lock_Cleanup()
34473 S -> Lock_Cleanup()
34474 S -> RCS_checkout (${CVSROOT_DIRNAME}/trace/file1,v, 1\.1\.1\.1, , , (function))
34475 S -> Reader_Lock(${CVSROOT_DIRNAME}/trace)
34476 S -> Register(file1, 1\.1\.1\.1, M, , )
34477 S -> Simple_Lock_Cleanup()
34478 S -> Simple_Lock_Cleanup()
34479 S -> Simple_Lock_Cleanup()
34480 S -> dirswitch (\., ${CVSROOT_DIRNAME}/trace)
34481 S -> do_cvs_command (update)
34482 S -> do_recursion ( frame=${PFMT} )
34483 S -> fopen(${CVSROOT_DIRNAME}/CVSROOT/history,a)
34484 S -> lock_name (${CVSROOT_DIRNAME}/trace, #cvs\.lock)
34485 S -> lock_name (${CVSROOT_DIRNAME}/trace, #cvs\.rfl\.${hostname}\.[0-9][0-9]*)
34486 S -> lock_simple_remove()
34487 S -> remove_locks()
34488 S -> remove_locks()
34489 S -> rename(CVS/Entries\.Backup,CVS/Entries)
34490 S -> serve_directory (\.)
34491 S -> server_cleanup()
34492 S -> server_cleanup()
34493 S -> server_notify()
34494 S -> server_pathname_check (file1)
34495 S -> server_register(file1, 1\.1\.1\.1, M, , , , )
34496 S -> set_lock (${CVSROOT_DIRNAME}/trace, 1)
34497 S -> start_recursion ( fileproc=${PFMT}, filesdoneproc=${PFMT},
34498 S -> unlink_file(CVS/Entries\.Log)
34499 S -> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
34500 S -> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
34501 S -> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
34504 dotest_sort trace-14
"${testcvs} -t -t -t ci -madd-data file1" \
34505 " *callerdat=${PFMT}, argc=1, argv=${PFMT},
34506 *callerdat=${PFMT}, argc=1, argv=${PFMT},
34507 *callerdat=${PFMT}, argc=1, argv=${PFMT},
34508 *direntproc=${PFMT}, dirleavproc=${PFMT},
34509 *direntproc=${PFMT}, dirleavproc=${PFMT},
34510 *direntproc=${PFMT}, dirleavproc=${PFMT},
34511 *dosrcs=0, repository_in=(null) )
34512 *dosrcs=1, repository_in=(null) )
34513 *dosrcs=1, repository_in=(null) )
34514 *local=0, which=1, aflag=0,
34515 *local=0, which=1, aflag=0,
34516 *local=0, which=1, aflag=0,
34517 *locktype=0, update_preload=(null)
34518 *locktype=0, update_preload=(null)
34519 *locktype=2, update_preload=(null)
34520 *-> Leaving do_recursion ( frame=${PFMT} )
34521 *-> Leaving do_recursion ( frame=${PFMT} )
34522 *-> Leaving do_recursion ( frame=${PFMT} )
34525 *-> Parse_Info (${CVSROOT_DIRNAME}/CVSROOT/commitinfo, trace, ALL)
34526 *-> Parse_Info (${CVSROOT_DIRNAME}/CVSROOT/loginfo, trace, ALL)
34527 *-> Parse_Info (${CVSROOT_DIRNAME}/CVSROOT/verifymsg, trace, not ALL)
34528 *-> Promotable_Lock ()
34529 *-> RCS_checkout (${CVSROOT_DIRNAME}/trace/file1,v, , , , (function))
34530 *-> RCS_checkout (${CVSROOT_DIRNAME}/trace/file1,v, 1\.1, , -ko, ${tempname})
34531 *-> RCS_checkout (${CVSROOT_DIRNAME}/trace/file1,v, 1\.1\.1\.1, , , (function))
34532 *-> RCS_cmp_file( ${CVSROOT_DIRNAME}/trace/file1,v, (null), (null), , file1 )
34533 *-> RCS_cmp_file( ${CVSROOT_DIRNAME}/trace/file1,v, 1\.1\.1\.1, (null), , file1 )
34534 *-> Register(file1, 1\.2, ${DATE}, , )
34535 *-> Simple_Lock_Cleanup()
34536 *-> Simple_Lock_Cleanup()
34537 *-> Simple_Lock_Cleanup()
34538 *-> _lock_exists (${CVSROOT_DIRNAME}/trace, #cvs\.pfl\.\*, #cvs\.pfl\.${hostname}\.[0-9][0-9]*)
34539 *-> _lock_exists (${CVSROOT_DIRNAME}/trace, #cvs\.pfl\.\*, #cvs\.pfl\.${hostname}\.[0-9][0-9]*)
34540 *-> _lock_exists (${CVSROOT_DIRNAME}/trace, #cvs\.rfl\.\*, #cvs\.rfl\.${hostname}\.[0-9][0-9]*)
34541 *-> do_recursion ( frame=${PFMT} )
34542 *-> do_recursion ( frame=${PFMT} )
34543 *-> do_recursion ( frame=${PFMT} )
34544 *-> fopen(${CVSROOT_DIRNAME}/CVSROOT/history,a)
34545 *-> lock_dir_for_write (${CVSROOT_DIRNAME}/trace)
34546 *-> lock_name (${CVSROOT_DIRNAME}/trace, #cvs\.lock)
34547 *-> lock_name (${CVSROOT_DIRNAME}/trace, #cvs\.lock)
34548 *-> lock_name (${CVSROOT_DIRNAME}/trace, #cvs\.lock)
34549 *-> lock_name (${CVSROOT_DIRNAME}/trace, #cvs\.pfl\.${hostname}\.[0-9][0-9]*)
34550 *-> lock_name (${CVSROOT_DIRNAME}/trace, #cvs\.rfl\.${hostname}\.[0-9][0-9]*)
34551 *-> lock_name (${CVSROOT_DIRNAME}/trace, #cvs\.wfl\.${hostname}\.[0-9][0-9]*)
34552 *-> lock_name (${CVSROOT_DIRNAME}/trace, )
34553 *-> lock_name (${CVSROOT_DIRNAME}/trace, )
34554 *-> lock_name (${CVSROOT_DIRNAME}/trace, )
34555 *-> lock_simple_remove()
34556 *-> lock_simple_remove()
34557 *-> lock_tree_promotably (1, argv, 0, 1, 0)
34558 *-> main loop with CVSROOT=${CVSROOT_DIRNAME}
34559 *-> parse_cvsroot ( ${CVSROOT_DIRNAME} )
34560 *-> promotable_exists (${CVSROOT_DIRNAME}/trace)
34561 *-> promotable_exists (${CVSROOT_DIRNAME}/trace)
34562 *-> promotable_lock(${CVSROOT_DIRNAME}/trace)
34564 *-> readers_exist (${CVSROOT_DIRNAME}/trace)
34567 *-> rename(${CVSROOT_DIRNAME}/trace/,file1,,${CVSROOT_DIRNAME}/trace/file1,v)
34568 *-> rename(CVS/Entries\.Backup,CVS/Entries)
34569 *-> set_lock (${CVSROOT_DIRNAME}/trace, 0)
34570 *-> set_lock (${CVSROOT_DIRNAME}/trace, 1)
34571 *-> start_recursion ( fileproc=${PFMT}, filesdoneproc=${PFMT},
34572 *-> start_recursion ( fileproc=${PFMT}, filesdoneproc=${PFMT},
34573 *-> start_recursion ( fileproc=${PFMT}, filesdoneproc=${PFMT},
34574 *-> unlink_file(${tempname})
34575 *-> unlink_file(${tempname})
34576 *-> unlink_file(CVS/Base/file1)
34577 *-> unlink_file(CVS/Entries\.Log)
34578 *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
34579 *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
34580 *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
34581 *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
34582 *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
34583 *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
34584 *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
34585 *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
34586 *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
34587 *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
34588 *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
34589 *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
34590 *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
34591 *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
34592 *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
34593 *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
34594 *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
34595 *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
34596 ${CVSROOT_DIRNAME}/trace/file1,v <-- file1
34597 new revision: 1\.2; previous revision: 1\.1" \
34599 *callerdat=${PFMT}, argc=1, argv=${PFMT},
34600 *callerdat=${PFMT}, argc=1, argv=${PFMT},
34601 *callerdat=${PFMT}, argc=1, argv=${PFMT},
34602 *callerdat=${PFMT}, argc=1, argv=${PFMT},
34603 *callerdat=${PFMT}, argc=1, argv=${PFMT},
34604 *direntproc=${PFMT}, dirleavproc=${PFMT},
34605 *direntproc=${PFMT}, dirleavproc=${PFMT},
34606 *direntproc=${PFMT}, dirleavproc=${PFMT},
34607 *direntproc=${PFMT}, dirleavproc=${PFMT},
34608 *direntproc=${PFMT}, dirleavproc=${PFMT},
34609 *dosrcs=0, repository_in=(null) )
34610 *dosrcs=0, repository_in=(null) )
34611 *dosrcs=0, repository_in=(null) )
34612 *dosrcs=1, repository_in=(null) )
34613 *dosrcs=1, repository_in=(null) )
34614 *local=0, which=1, aflag=0,
34615 *local=0, which=1, aflag=0,
34616 *local=0, which=1, aflag=0,
34617 *local=0, which=1, aflag=0,
34618 *local=0, which=1, aflag=0,
34619 *locktype=0, update_preload=(null)
34620 *locktype=0, update_preload=(null)
34621 *locktype=0, update_preload=(null)
34622 *locktype=0, update_preload=(null)
34623 *locktype=2, update_preload=(null)
34624 *-> Forking server: ${CVS_SERVER} server
34625 *-> Leaving do_recursion ( frame=${PFMT} )
34626 *-> Leaving do_recursion ( frame=${PFMT} )
34627 *-> Register(file1, 1\.2, ${DATE}, , )
34628 *-> Sending file \`file1' to server
34629 *-> do_recursion ( frame=${PFMT} )
34630 *-> do_recursion ( frame=${PFMT} )
34631 *-> main loop with CVSROOT=${CVSROOT}
34632 *-> parse_cvsroot ( ${CVSROOT} )
34633 *-> rename(CVS/Entries\.Backup,CVS/Entries)
34634 *-> start_recursion ( fileproc=${PFMT}, filesdoneproc=${PFMT},
34635 *-> start_recursion ( fileproc=${PFMT}, filesdoneproc=${PFMT},
34636 *-> unlink_file(CVS/Base/file1)
34637 *-> unlink_file(CVS/Entries\.Log)
34638 *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
34639 *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
34640 *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
34641 *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
34642 *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
34643 *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
34644 *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
34645 *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
34646 *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
34647 *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
34648 ${CVSROOT_DIRNAME}/trace/file1,v <-- file1
34649 S -> CVS_SERVER_SLEEP not set\.
34650 S -> Leaving do_recursion ( frame=${PFMT} )
34651 S -> Leaving do_recursion ( frame=${PFMT} )
34652 S -> Leaving do_recursion ( frame=${PFMT} )
34653 S -> Lock_Cleanup()
34654 S -> Lock_Cleanup()
34655 S -> Lock_Cleanup()
34656 S -> Parse_Info (${CVSROOT_DIRNAME}/CVSROOT/commitinfo, trace, ALL)
34657 S -> Parse_Info (${CVSROOT_DIRNAME}/CVSROOT/loginfo, trace, ALL)
34658 S -> Parse_Info (${CVSROOT_DIRNAME}/CVSROOT/verifymsg, trace, not ALL)
34659 S -> Promotable_Lock ()
34660 S -> RCS_checkout (${CVSROOT_DIRNAME}/trace/file1,v, , , , (function))
34661 S -> RCS_checkout (${CVSROOT_DIRNAME}/trace/file1,v, 1\.1, , -ko, ${tempname})
34662 S -> RCS_checkout (${CVSROOT_DIRNAME}/trace/file1,v, 1\.1\.1\.1, , , (function))
34663 S -> RCS_cmp_file( ${CVSROOT_DIRNAME}/trace/file1,v, (null), (null), , file1 )
34664 S -> RCS_cmp_file( ${CVSROOT_DIRNAME}/trace/file1,v, 1\.1\.1\.1, (null), , file1 )
34665 S -> Register(file1, 1\.2, ${DATE}, , )
34666 S -> Simple_Lock_Cleanup()
34667 S -> Simple_Lock_Cleanup()
34668 S -> Simple_Lock_Cleanup()
34669 S -> Simple_Lock_Cleanup()
34670 S -> _lock_exists (${CVSROOT_DIRNAME}/trace, #cvs\.pfl\.\*, #cvs\.pfl\.${hostname}\.[0-9][0-9]*)
34671 S -> _lock_exists (${CVSROOT_DIRNAME}/trace, #cvs\.pfl\.\*, #cvs\.pfl\.${hostname}\.[0-9][0-9]*)
34672 S -> _lock_exists (${CVSROOT_DIRNAME}/trace, #cvs\.rfl\.\*, #cvs\.rfl\.${hostname}\.[0-9][0-9]*)
34673 S -> dirswitch (\., ${CVSROOT_DIRNAME}/trace)
34674 S -> do_cvs_command (commit)
34675 S -> do_recursion ( frame=${PFMT} )
34676 S -> do_recursion ( frame=${PFMT} )
34677 S -> do_recursion ( frame=${PFMT} )
34678 S -> fopen(${CVSROOT_DIRNAME}/CVSROOT/history,a)
34679 S -> lock_dir_for_write (${CVSROOT_DIRNAME}/trace)
34680 S -> lock_name (${CVSROOT_DIRNAME}/trace, #cvs\.lock)
34681 S -> lock_name (${CVSROOT_DIRNAME}/trace, #cvs\.lock)
34682 S -> lock_name (${CVSROOT_DIRNAME}/trace, #cvs\.lock)
34683 S -> lock_name (${CVSROOT_DIRNAME}/trace, #cvs\.pfl\.${hostname}\.[0-9][0-9]*)
34684 S -> lock_name (${CVSROOT_DIRNAME}/trace, #cvs\.rfl\.${hostname}\.[0-9][0-9]*)
34685 S -> lock_name (${CVSROOT_DIRNAME}/trace, #cvs\.wfl\.${hostname}\.[0-9][0-9]*)
34686 S -> lock_name (${CVSROOT_DIRNAME}/trace, )
34687 S -> lock_name (${CVSROOT_DIRNAME}/trace, )
34688 S -> lock_name (${CVSROOT_DIRNAME}/trace, )
34689 S -> lock_simple_remove()
34690 S -> lock_simple_remove()
34691 S -> lock_tree_promotably (1, argv, 0, 1, 0)
34692 S -> promotable_exists (${CVSROOT_DIRNAME}/trace)
34693 S -> promotable_exists (${CVSROOT_DIRNAME}/trace)
34694 S -> promotable_lock(${CVSROOT_DIRNAME}/trace)
34696 S -> readers_exist (${CVSROOT_DIRNAME}/trace)
34697 S -> remove_locks()
34698 S -> remove_locks()
34699 S -> remove_locks()
34700 S -> rename(${CVSROOT_DIRNAME}/trace/,file1,,${CVSROOT_DIRNAME}/trace/file1,v)
34701 S -> rename(CVS/Entries\.Backup,CVS/Entries)
34702 S -> serve_directory (\.)
34703 S -> server_cleanup()
34704 S -> server_cleanup()
34705 S -> server_notify()
34706 S -> server_pathname_check (file1)
34707 S -> server_pathname_check (file1)
34708 S -> server_pathname_check (file1)
34709 S -> server_register(file1, 1\.2, ${DATE}, , , , )
34710 S -> set_lock (${CVSROOT_DIRNAME}/trace, 0)
34711 S -> set_lock (${CVSROOT_DIRNAME}/trace, 1)
34712 S -> start_recursion ( fileproc=${PFMT}, filesdoneproc=${PFMT},
34713 S -> start_recursion ( fileproc=${PFMT}, filesdoneproc=${PFMT},
34714 S -> start_recursion ( fileproc=${PFMT}, filesdoneproc=${PFMT},
34715 S -> unlink_file(${tempname})
34716 S -> unlink_file(${tempname})
34717 S -> unlink_file(CVS/Entries\.Log)
34718 S -> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
34719 S -> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
34720 S -> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
34721 S -> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
34722 S -> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
34723 S -> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
34724 S -> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
34725 S -> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
34726 S -> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
34727 S -> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
34728 S -> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
34729 S -> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
34730 S -> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
34731 S -> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
34732 S -> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
34733 S -> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
34734 new revision: 1\.2; previous revision: 1\.1"
34736 dotest_fail_sort trace-15
"${testcvs} -t -t -t diff -r1.1 file1" \
34737 " *aflag=0, repository= )
34738 *callerdat=${PFMT}, argc=1, argv=${PFMT},
34739 *direntproc=${PFMT}, dirleavproc=${PFMT},
34740 *dosrcs=1, repository_in=(null) )
34741 *local=0, which=7, aflag=0,
34742 *locktype=1, update_preload=(null)
34743 *-> Leaving do_recursion ( frame=${PFMT} )
34745 *-> RCS_checkout (${CVSROOT_DIRNAME}/trace/file1,v, 1\.1, , , ${tempname})
34746 *-> RCS_checkout (${CVSROOT_DIRNAME}/trace/file1,v, 1\.2, , , (function))
34747 *-> RCS_checkout (${CVSROOT_DIRNAME}/trace/file1,v, 1\.2, , , ${tempname})
34748 *-> RCS_cmp_file( ${CVSROOT_DIRNAME}/trace/file1,v, 1\.1, 1\.2, , file1 )
34749 *-> Reader_Lock(${CVSROOT_DIRNAME}/trace)
34750 *-> Simple_Lock_Cleanup()
34751 *-> Simple_Lock_Cleanup()
34752 *-> diff_file_nodiff (file1, 3)
34753 *-> do_recursion ( frame=${PFMT} )
34754 *-> lock_name (${CVSROOT_DIRNAME}/trace, #cvs\.lock)
34755 *-> lock_name (${CVSROOT_DIRNAME}/trace, #cvs\.rfl\.${hostname}\.[0-9][0-9]*)
34756 *-> lock_simple_remove()
34757 *-> main loop with CVSROOT=${CVSROOT_DIRNAME}
34758 *-> parse_cvsroot ( ${CVSROOT_DIRNAME} )
34760 *-> set_lock (${CVSROOT_DIRNAME}/trace, 1)
34761 *-> start_recursion ( fileproc=${PFMT}, filesdoneproc=${PFMT},
34762 *-> tag_check_valid ( name=1\.1, argc=1, argv=${PFMT}, local=0,
34763 *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
34764 *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
34765 *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
34766 *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
34768 ===================================================================
34771 RCS file: ${CVSROOT_DIRNAME}/trace/file1,v
34773 retrieving revision 1\.1
34774 retrieving revision 1\.2" \
34776 *aflag=0, repository= )
34777 *callerdat=${PFMT}, argc=1, argv=${PFMT},
34778 *callerdat=${PFMT}, argc=1, argv=${PFMT},
34779 *direntproc=${PFMT}, dirleavproc=${PFMT},
34780 *direntproc=${PFMT}, dirleavproc=${PFMT},
34781 *dosrcs=0, repository_in=(null) )
34782 *dosrcs=1, repository_in=(null) )
34783 *local=0, which=1, aflag=0,
34784 *local=0, which=7, aflag=0,
34785 *locktype=0, update_preload=(null)
34786 *locktype=1, update_preload=(null)
34787 *-> Forking server: ${CVS_SERVER} server
34788 *-> Leaving do_recursion ( frame=${PFMT} )
34789 *-> do_recursion ( frame=${PFMT} )
34790 *-> main loop with CVSROOT=${CVSROOT}
34791 *-> parse_cvsroot ( ${CVSROOT} )
34792 *-> start_recursion ( fileproc=${PFMT}, filesdoneproc=${PFMT},
34793 *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
34794 *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
34795 *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
34796 *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
34797 *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
34799 ===================================================================
34802 RCS file: ${CVSROOT_DIRNAME}/trace/file1,v
34803 S -> CVS_SERVER_SLEEP not set\.
34804 S -> Leaving do_recursion ( frame=${PFMT} )
34805 S -> Lock_Cleanup()
34806 S -> Lock_Cleanup()
34807 S -> RCS_checkout (${CVSROOT_DIRNAME}/trace/file1,v, 1\.1, , , ${tempname})
34808 S -> RCS_checkout (${CVSROOT_DIRNAME}/trace/file1,v, 1\.2, , , (function))
34809 S -> RCS_checkout (${CVSROOT_DIRNAME}/trace/file1,v, 1\.2, , , ${tempname})
34810 S -> RCS_cmp_file( ${CVSROOT_DIRNAME}/trace/file1,v, 1\.1, 1\.2, , file1 )
34811 S -> Reader_Lock(${CVSROOT_DIRNAME}/trace)
34812 S -> Simple_Lock_Cleanup()
34813 S -> Simple_Lock_Cleanup()
34814 S -> Simple_Lock_Cleanup()
34815 S -> diff_file_nodiff (file1, 3)
34816 S -> dirswitch (\., ${CVSROOT_DIRNAME}/trace)
34817 S -> do_cvs_command (diff)
34818 S -> do_recursion ( frame=${PFMT} )
34819 S -> lock_name (${CVSROOT_DIRNAME}/trace, #cvs\.lock)
34820 S -> lock_name (${CVSROOT_DIRNAME}/trace, #cvs\.rfl\.${hostname}\.[0-9][0-9]*)
34821 S -> lock_simple_remove()
34822 S -> remove_locks()
34823 S -> remove_locks()
34824 S -> serve_directory (\.)
34825 S -> server_cleanup()
34826 S -> server_cleanup()
34827 S -> server_notify()
34828 S -> server_pathname_check (file1)
34829 S -> set_lock (${CVSROOT_DIRNAME}/trace, 1)
34830 S -> start_recursion ( fileproc=${PFMT}, filesdoneproc=${PFMT},
34831 S -> tag_check_valid ( name=1\.1, argc=1, argv=${PFMT}, local=0,
34832 S -> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
34833 S -> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
34835 retrieving revision 1\.1
34836 retrieving revision 1\.2"
34838 dotest_sort trace-16
"${testcvs} -t -t -t rdiff -rbp trace/file1" \
34839 " *aflag=0, repository=${CVSROOT_DIRNAME}/trace )
34840 *callerdat=${PFMT}, argc=1, argv=${PFMT},
34841 *direntproc=${PFMT}, dirleavproc=${PFMT},
34842 *dosrcs=1, repository_in=${CVSROOT_DIRNAME}/trace )
34843 *local=0, which=6, aflag=0,
34844 *locktype=1, update_preload=trace
34845 *-> Leaving do_recursion ( frame=${PFMT} )
34847 *-> RCS_checkout (${CVSROOT_DIRNAME}/trace/file1,v, 1\.1\.1\.1, bp, , ${tempname})
34848 *-> RCS_checkout (${CVSROOT_DIRNAME}/trace/file1,v, 1\.2, , , ${tempname})
34849 *-> Reader_Lock(${CVSROOT_DIRNAME}/trace)
34850 *-> Simple_Lock_Cleanup()
34851 *-> Simple_Lock_Cleanup()
34852 *-> do_module (trace/file1, Patching, NULL, NULL)
34853 *-> do_recursion ( frame=${PFMT} )
34854 *-> lock_name (${CVSROOT_DIRNAME}/trace, #cvs\.lock)
34855 *-> lock_name (${CVSROOT_DIRNAME}/trace, #cvs\.rfl\.${hostname}\.[0-9][0-9]*)
34856 *-> lock_simple_remove()
34857 *-> main loop with CVSROOT=${CVSROOT_DIRNAME}
34858 *-> parse_cvsroot ( ${CVSROOT_DIRNAME} )
34859 *-> patch_proc ( (null), (null), (null), 0, 0, trace/file1, Patching )
34861 *-> set_lock (${CVSROOT_DIRNAME}/trace, 1)
34862 *-> start_recursion ( fileproc=${PFMT}, filesdoneproc=${PFMT},
34863 *-> tag_check_valid ( name=bp, argc=1, argv=${PFMT}, local=0,
34864 *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
34865 *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
34866 *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
34867 *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
34869 \*\*\* trace/file1:1\.1\.1\.1 ${DATE}
34870 \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*
34873 --- trace/file1 ${DATE}
34875 diff -c trace/file1:1\.1\.1\.1 trace/file1:1\.2" \
34877 *aflag=0, repository=${CVSROOT_DIRNAME}/trace )
34878 *callerdat=${PFMT}, argc=1, argv=${PFMT},
34879 *direntproc=${PFMT}, dirleavproc=${PFMT},
34880 *dosrcs=1, repository_in=${CVSROOT_DIRNAME}/trace )
34881 *local=0, which=6, aflag=0,
34882 *locktype=1, update_preload=trace
34883 *-> Forking server: ${CVS_SERVER} server
34884 *-> main loop with CVSROOT=${CVSROOT}
34885 *-> parse_cvsroot ( ${CVSROOT} )
34886 *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
34887 *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
34888 *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
34890 \*\*\* trace/file1:1\.1\.1\.1 ${DATE}
34891 \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*
34894 --- trace/file1 ${DATE}
34896 S -> CVS_SERVER_SLEEP not set\.
34897 S -> Leaving do_recursion ( frame=${PFMT} )
34898 S -> Lock_Cleanup()
34899 S -> Lock_Cleanup()
34900 S -> RCS_checkout (${CVSROOT_DIRNAME}/trace/file1,v, 1\.1\.1\.1, bp, , ${tempname})
34901 S -> RCS_checkout (${CVSROOT_DIRNAME}/trace/file1,v, 1\.2, , , ${tempname})
34902 S -> Reader_Lock(${CVSROOT_DIRNAME}/trace)
34903 S -> Simple_Lock_Cleanup()
34904 S -> Simple_Lock_Cleanup()
34905 S -> Simple_Lock_Cleanup()
34906 S -> do_cvs_command (rdiff)
34907 S -> do_module (trace/file1, Patching, NULL, NULL)
34908 S -> do_recursion ( frame=${PFMT} )
34909 S -> lock_name (${CVSROOT_DIRNAME}/trace, #cvs\.lock)
34910 S -> lock_name (${CVSROOT_DIRNAME}/trace, #cvs\.rfl\.${hostname}\.[0-9][0-9]*)
34911 S -> lock_simple_remove()
34912 S -> patch_proc ( (null), (null), (null), 0, 0, trace/file1, Patching )
34913 S -> remove_locks()
34914 S -> remove_locks()
34915 S -> server_cleanup()
34916 S -> server_cleanup()
34917 S -> server_notify()
34918 S -> server_pathname_check (file1)
34919 S -> set_lock (${CVSROOT_DIRNAME}/trace, 1)
34920 S -> start_recursion ( fileproc=${PFMT}, filesdoneproc=${PFMT},
34921 S -> tag_check_valid ( name=bp, argc=1, argv=${PFMT}, local=0,
34922 S -> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
34923 S -> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
34924 diff -c trace/file1:1\.1\.1\.1 trace/file1:1\.2"
34926 dotest_sort trace-17
"${testcvs} -t -t -t rm -f file1" \
34927 " *callerdat=${PFMT}, argc=1, argv=${PFMT},
34928 *direntproc=${PFMT}, dirleavproc=${PFMT},
34929 *dosrcs=1, repository_in=(null) )
34930 *local=0, which=1, aflag=0,
34931 *locktype=1, update_preload=(null)
34932 *-> Leaving do_recursion ( frame=${PFMT} )
34934 *-> Reader_Lock(${CVSROOT_DIRNAME}/trace)
34935 *-> Register(file1, -1\.2, ${DATE}, , )
34936 *-> Simple_Lock_Cleanup()
34937 *-> Simple_Lock_Cleanup()
34938 *-> do_recursion ( frame=${PFMT} )
34939 *-> lock_name (${CVSROOT_DIRNAME}/trace, #cvs\.lock)
34940 *-> lock_name (${CVSROOT_DIRNAME}/trace, #cvs\.rfl\.${hostname}\.[0-9][0-9]*)
34941 *-> lock_simple_remove()
34942 *-> main loop with CVSROOT=${CVSROOT_DIRNAME}
34943 *-> parse_cvsroot ( ${CVSROOT_DIRNAME} )
34945 *-> rename(CVS/Entries\.Backup,CVS/Entries)
34946 *-> set_lock (${CVSROOT_DIRNAME}/trace, 1)
34947 *-> start_recursion ( fileproc=${PFMT}, filesdoneproc=${PFMT},
34948 *-> unlink_file(CVS/Entries\.Log)
34949 *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
34950 *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
34951 *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
34952 *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
34953 *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
34954 ${SPROG} remove: scheduling \`file1' for removal
34955 ${SPROG} remove: use \`${SPROG} commit' to remove this file permanently" \
34957 *callerdat=${PFMT}, argc=1, argv=${PFMT},
34958 *callerdat=${PFMT}, argc=1, argv=${PFMT},
34959 *callerdat=${PFMT}, argc=1, argv=${PFMT},
34960 *direntproc=${PFMT}, dirleavproc=${PFMT},
34961 *direntproc=${PFMT}, dirleavproc=${PFMT},
34962 *direntproc=${PFMT}, dirleavproc=${PFMT},
34963 *dosrcs=0, repository_in=(null) )
34964 *dosrcs=0, repository_in=(null) )
34965 *dosrcs=1, repository_in=(null) )
34966 *local=0, which=1, aflag=0,
34967 *local=0, which=1, aflag=0,
34968 *local=0, which=1, aflag=0,
34969 *locktype=0, update_preload=(null)
34970 *locktype=0, update_preload=(null)
34971 *locktype=1, update_preload=(null)
34972 *-> Forking server: ${CVS_SERVER} server
34973 *-> Leaving do_recursion ( frame=${PFMT} )
34974 *-> Leaving do_recursion ( frame=${PFMT} )
34975 *-> Register(file1, -1\.2, dummy timestamp, , )
34976 *-> do_recursion ( frame=${PFMT} )
34977 *-> do_recursion ( frame=${PFMT} )
34978 *-> main loop with CVSROOT=${CVSROOT}
34979 *-> parse_cvsroot ( ${CVSROOT} )
34980 *-> rename(CVS/Entries\.Backup,CVS/Entries)
34981 *-> start_recursion ( fileproc=${PFMT}, filesdoneproc=${PFMT},
34982 *-> start_recursion ( fileproc=${PFMT}, filesdoneproc=${PFMT},
34983 *-> unlink_file(CVS/Entries\.Log)
34984 *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
34985 *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
34986 *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
34987 *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
34988 *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
34989 *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
34990 *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
34991 *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
34992 *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
34993 S -> CVS_SERVER_SLEEP not set\.
34994 S -> Leaving do_recursion ( frame=${PFMT} )
34995 S -> Lock_Cleanup()
34996 S -> Lock_Cleanup()
34997 S -> Reader_Lock(${CVSROOT_DIRNAME}/trace)
34998 S -> Register(file1, -1\.2, , , )
34999 S -> Simple_Lock_Cleanup()
35000 S -> Simple_Lock_Cleanup()
35001 S -> Simple_Lock_Cleanup()
35002 S -> dirswitch (\., ${CVSROOT_DIRNAME}/trace)
35003 S -> do_cvs_command (remove)
35004 S -> do_recursion ( frame=${PFMT} )
35005 S -> lock_name (${CVSROOT_DIRNAME}/trace, #cvs\.lock)
35006 S -> lock_name (${CVSROOT_DIRNAME}/trace, #cvs\.rfl\.${hostname}\.[0-9][0-9]*)
35007 S -> lock_simple_remove()
35008 S -> remove_locks()
35009 S -> remove_locks()
35010 S -> rename(CVS/Entries\.Backup,CVS/Entries)
35011 S -> serve_directory (\.)
35012 S -> server_cleanup()
35013 S -> server_cleanup()
35014 S -> server_notify()
35015 S -> server_pathname_check (file1)
35016 S -> server_register(file1, -1\.2, , , , , )
35017 S -> set_lock (${CVSROOT_DIRNAME}/trace, 1)
35018 S -> start_recursion ( fileproc=${PFMT}, filesdoneproc=${PFMT},
35019 S -> unlink_file(CVS/Entries\.Log)
35020 S -> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
35021 S -> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
35022 S -> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
35023 ${SPROG} remove: scheduling \`file1' for removal
35024 ${SPROG} remove: use \`${SPROG} commit' to remove this file permanently"
35026 dotest_sort trace-18
"${testcvs} -t -t -t ci -mremove file1" \
35027 " *callerdat=${PFMT}, argc=1, argv=${PFMT},
35028 *callerdat=${PFMT}, argc=1, argv=${PFMT},
35029 *callerdat=${PFMT}, argc=1, argv=${PFMT},
35030 *direntproc=${PFMT}, dirleavproc=${PFMT},
35031 *direntproc=${PFMT}, dirleavproc=${PFMT},
35032 *direntproc=${PFMT}, dirleavproc=${PFMT},
35033 *dosrcs=0, repository_in=(null) )
35034 *dosrcs=1, repository_in=(null) )
35035 *dosrcs=1, repository_in=(null) )
35036 *local=0, which=1, aflag=0,
35037 *local=0, which=1, aflag=0,
35038 *local=0, which=1, aflag=0,
35039 *locktype=0, update_preload=(null)
35040 *locktype=0, update_preload=(null)
35041 *locktype=2, update_preload=(null)
35042 *-> Leaving do_recursion ( frame=${PFMT} )
35043 *-> Leaving do_recursion ( frame=${PFMT} )
35044 *-> Leaving do_recursion ( frame=${PFMT} )
35047 *-> Parse_Info (${CVSROOT_DIRNAME}/CVSROOT/commitinfo, trace, ALL)
35048 *-> Parse_Info (${CVSROOT_DIRNAME}/CVSROOT/loginfo, trace, ALL)
35049 *-> Parse_Info (${CVSROOT_DIRNAME}/CVSROOT/verifymsg, trace, not ALL)
35050 *-> Promotable_Lock ()
35051 *-> RCS_checkout (${CVSROOT_DIRNAME}/trace/file1,v, , , , file1)
35052 *-> RCS_checkout (${CVSROOT_DIRNAME}/trace/file1,v, 1\.2, , -ko, ${tempname})
35053 *-> Scratch_Entry(file1)
35054 *-> Simple_Lock_Cleanup()
35055 *-> Simple_Lock_Cleanup()
35056 *-> Simple_Lock_Cleanup()
35057 *-> _lock_exists (${CVSROOT_DIRNAME}/trace, #cvs\.pfl\.\*, #cvs.pfl\.${hostname}\.[0-9][0-9]*)
35058 *-> _lock_exists (${CVSROOT_DIRNAME}/trace, #cvs\.pfl\.\*, #cvs.pfl\.${hostname}\.[0-9][0-9]*)
35059 *-> _lock_exists (${CVSROOT_DIRNAME}/trace, #cvs\.rfl\.\*, #cvs.rfl\.${hostname}\.[0-9][0-9]*)
35060 *-> do_recursion ( frame=${PFMT} )
35061 *-> do_recursion ( frame=${PFMT} )
35062 *-> do_recursion ( frame=${PFMT} )
35063 *-> fopen(${CVSROOT_DIRNAME}/CVSROOT/history,a)
35064 *-> lock_dir_for_write (${CVSROOT_DIRNAME}/trace)
35065 *-> lock_name (${CVSROOT_DIRNAME}/trace, #cvs\.lock)
35066 *-> lock_name (${CVSROOT_DIRNAME}/trace, #cvs\.lock)
35067 *-> lock_name (${CVSROOT_DIRNAME}/trace, #cvs\.lock)
35068 *-> lock_name (${CVSROOT_DIRNAME}/trace, #cvs\.pfl\.${hostname}\.[0-9][0-9]*)
35069 *-> lock_name (${CVSROOT_DIRNAME}/trace, #cvs\.rfl\.${hostname}\.[0-9][0-9]*)
35070 *-> lock_name (${CVSROOT_DIRNAME}/trace, #cvs\.wfl\.${hostname}\.[0-9][0-9]*)
35071 *-> lock_name (${CVSROOT_DIRNAME}/trace, )
35072 *-> lock_name (${CVSROOT_DIRNAME}/trace, )
35073 *-> lock_name (${CVSROOT_DIRNAME}/trace, )
35074 *-> lock_simple_remove()
35075 *-> lock_simple_remove()
35076 *-> lock_tree_promotably (1, argv, 0, 1, 0)
35077 *-> main loop with CVSROOT=${CVSROOT_DIRNAME}
35078 *-> parse_cvsroot ( ${CVSROOT_DIRNAME} )
35079 *-> promotable_exists (${CVSROOT_DIRNAME}/trace)
35080 *-> promotable_exists (${CVSROOT_DIRNAME}/trace)
35081 *-> promotable_lock(${CVSROOT_DIRNAME}/trace)
35083 *-> readers_exist (${CVSROOT_DIRNAME}/trace)
35086 *-> rename(${CVSROOT_DIRNAME}/trace/,file1,,${CVSROOT_DIRNAME}/trace/file1,v)
35087 *-> rename(${CVSROOT_DIRNAME}/trace/,file1,,${CVSROOT_DIRNAME}/trace/file1,v)
35088 *-> rename(${CVSROOT_DIRNAME}/trace/,file1,,${CVSROOT_DIRNAME}/trace/file1,v)
35089 *-> rename(CVS/Entries\.Backup,CVS/Entries)
35090 *-> set_lock (${CVSROOT_DIRNAME}/trace, 0)
35091 *-> set_lock (${CVSROOT_DIRNAME}/trace, 1)
35092 *-> start_recursion ( fileproc=${PFMT}, filesdoneproc=${PFMT},
35093 *-> start_recursion ( fileproc=${PFMT}, filesdoneproc=${PFMT},
35094 *-> start_recursion ( fileproc=${PFMT}, filesdoneproc=${PFMT},
35095 *-> unlink_file(${tempname})
35096 *-> unlink_file(${tempname})
35097 *-> unlink_file(CVS/Entries\.Log)
35098 *-> unlink_file(file1)
35099 *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
35100 *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
35101 *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
35102 *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
35103 *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
35104 *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
35105 *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
35106 *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
35107 *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
35108 *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
35109 *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
35110 *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
35111 *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
35112 *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
35113 *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
35114 *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
35115 *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
35116 *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
35117 *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
35118 *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
35119 *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
35120 *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
35121 *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
35122 *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
35123 *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
35124 *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
35125 *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
35126 *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
35127 *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
35128 *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
35129 ${CVSROOT_DIRNAME}/trace/file1,v <-- file1
35130 new revision: delete; previous revision: 1\.2" \
35132 *callerdat=${PFMT}, argc=1, argv=${PFMT},
35133 *callerdat=${PFMT}, argc=1, argv=${PFMT},
35134 *callerdat=${PFMT}, argc=1, argv=${PFMT},
35135 *callerdat=${PFMT}, argc=1, argv=${PFMT},
35136 *callerdat=${PFMT}, argc=1, argv=${PFMT},
35137 *direntproc=${PFMT}, dirleavproc=${PFMT},
35138 *direntproc=${PFMT}, dirleavproc=${PFMT},
35139 *direntproc=${PFMT}, dirleavproc=${PFMT},
35140 *direntproc=${PFMT}, dirleavproc=${PFMT},
35141 *direntproc=${PFMT}, dirleavproc=${PFMT},
35142 *dosrcs=0, repository_in=(null) )
35143 *dosrcs=0, repository_in=(null) )
35144 *dosrcs=0, repository_in=(null) )
35145 *dosrcs=1, repository_in=(null) )
35146 *dosrcs=1, repository_in=(null) )
35147 *local=0, which=1, aflag=0,
35148 *local=0, which=1, aflag=0,
35149 *local=0, which=1, aflag=0,
35150 *local=0, which=1, aflag=0,
35151 *local=0, which=1, aflag=0,
35152 *locktype=0, update_preload=(null)
35153 *locktype=0, update_preload=(null)
35154 *locktype=0, update_preload=(null)
35155 *locktype=0, update_preload=(null)
35156 *locktype=2, update_preload=(null)
35157 *-> Forking server: ${CVS_SERVER} server
35158 *-> Leaving do_recursion ( frame=${PFMT} )
35159 *-> Leaving do_recursion ( frame=${PFMT} )
35160 *-> Scratch_Entry(file1)
35161 *-> do_recursion ( frame=${PFMT} )
35162 *-> do_recursion ( frame=${PFMT} )
35163 *-> main loop with CVSROOT=${CVSROOT}
35164 *-> parse_cvsroot ( ${CVSROOT} )
35165 *-> rename(CVS/Entries\.Backup,CVS/Entries)
35166 *-> start_recursion ( fileproc=${PFMT}, filesdoneproc=${PFMT},
35167 *-> start_recursion ( fileproc=${PFMT}, filesdoneproc=${PFMT},
35168 *-> unlink_file(CVS/Entries\.Log)
35169 *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
35170 *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
35171 *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
35172 *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
35173 *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
35174 *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
35175 *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
35176 *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
35177 *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
35178 *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
35179 ${CVSROOT_DIRNAME}/trace/file1,v <-- file1
35180 S -> CVS_SERVER_SLEEP not set\.
35181 S -> Leaving do_recursion ( frame=${PFMT} )
35182 S -> Leaving do_recursion ( frame=${PFMT} )
35183 S -> Leaving do_recursion ( frame=${PFMT} )
35184 S -> Lock_Cleanup()
35185 S -> Lock_Cleanup()
35186 S -> Lock_Cleanup()
35187 S -> Parse_Info (${CVSROOT_DIRNAME}/CVSROOT/commitinfo, trace, ALL)
35188 S -> Parse_Info (${CVSROOT_DIRNAME}/CVSROOT/loginfo, trace, ALL)
35189 S -> Parse_Info (${CVSROOT_DIRNAME}/CVSROOT/verifymsg, trace, not ALL)
35190 S -> Promotable_Lock ()
35191 S -> RCS_checkout (${CVSROOT_DIRNAME}/trace/file1,v, , , , file1)
35192 S -> RCS_checkout (${CVSROOT_DIRNAME}/trace/file1,v, 1\.2, , -ko, ${tempname})
35193 S -> Scratch_Entry(file1)
35194 S -> Simple_Lock_Cleanup()
35195 S -> Simple_Lock_Cleanup()
35196 S -> Simple_Lock_Cleanup()
35197 S -> Simple_Lock_Cleanup()
35198 S -> _lock_exists (${CVSROOT_DIRNAME}/trace, #cvs\.pfl\.\*, #cvs.pfl\.${hostname}\.[0-9][0-9]*)
35199 S -> _lock_exists (${CVSROOT_DIRNAME}/trace, #cvs\.pfl\.\*, #cvs.pfl\.${hostname}\.[0-9][0-9]*)
35200 S -> _lock_exists (${CVSROOT_DIRNAME}/trace, #cvs\.rfl\.\*, #cvs.rfl\.${hostname}\.[0-9][0-9]*)
35201 S -> dirswitch (\., ${CVSROOT_DIRNAME}/trace)
35202 S -> do_cvs_command (commit)
35203 S -> do_recursion ( frame=${PFMT} )
35204 S -> do_recursion ( frame=${PFMT} )
35205 S -> do_recursion ( frame=${PFMT} )
35206 S -> fopen(${CVSROOT_DIRNAME}/CVSROOT/history,a)
35207 S -> lock_dir_for_write (${CVSROOT_DIRNAME}/trace)
35208 S -> lock_name (${CVSROOT_DIRNAME}/trace, #cvs\.lock)
35209 S -> lock_name (${CVSROOT_DIRNAME}/trace, #cvs\.lock)
35210 S -> lock_name (${CVSROOT_DIRNAME}/trace, #cvs\.lock)
35211 S -> lock_name (${CVSROOT_DIRNAME}/trace, #cvs\.pfl\.${hostname}\.[0-9][0-9]*)
35212 S -> lock_name (${CVSROOT_DIRNAME}/trace, #cvs\.rfl\.${hostname}\.[0-9][0-9]*)
35213 S -> lock_name (${CVSROOT_DIRNAME}/trace, #cvs\.wfl\.${hostname}\.[0-9][0-9]*)
35214 S -> lock_name (${CVSROOT_DIRNAME}/trace, )
35215 S -> lock_name (${CVSROOT_DIRNAME}/trace, )
35216 S -> lock_name (${CVSROOT_DIRNAME}/trace, )
35217 S -> lock_simple_remove()
35218 S -> lock_simple_remove()
35219 S -> lock_tree_promotably (1, argv, 0, 1, 0)
35220 S -> promotable_exists (${CVSROOT_DIRNAME}/trace)
35221 S -> promotable_exists (${CVSROOT_DIRNAME}/trace)
35222 S -> promotable_lock(${CVSROOT_DIRNAME}/trace)
35224 S -> readers_exist (${CVSROOT_DIRNAME}/trace)
35225 S -> remove_locks()
35226 S -> remove_locks()
35227 S -> remove_locks()
35228 S -> rename(${CVSROOT_DIRNAME}/trace/,file1,,${CVSROOT_DIRNAME}/trace/file1,v)
35229 S -> rename(${CVSROOT_DIRNAME}/trace/,file1,,${CVSROOT_DIRNAME}/trace/file1,v)
35230 S -> rename(${CVSROOT_DIRNAME}/trace/,file1,,${CVSROOT_DIRNAME}/trace/file1,v)
35231 S -> rename(CVS/Entries\.Backup,CVS/Entries)
35232 S -> serve_directory (\.)
35233 S -> server_cleanup()
35234 S -> server_cleanup()
35235 S -> server_notify()
35236 S -> server_pathname_check (file1)
35237 S -> server_pathname_check (file1)
35238 S -> server_pathname_check (file1)
35239 S -> set_lock (${CVSROOT_DIRNAME}/trace, 0)
35240 S -> set_lock (${CVSROOT_DIRNAME}/trace, 1)
35241 S -> start_recursion ( fileproc=${PFMT}, filesdoneproc=${PFMT},
35242 S -> start_recursion ( fileproc=${PFMT}, filesdoneproc=${PFMT},
35243 S -> start_recursion ( fileproc=${PFMT}, filesdoneproc=${PFMT},
35244 S -> unlink_file(${tempname})
35245 S -> unlink_file(${tempname})
35246 S -> unlink_file(CVS/Entries\.Log)
35247 S -> unlink_file(file1)
35248 S -> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
35249 S -> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
35250 S -> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
35251 S -> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
35252 S -> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
35253 S -> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
35254 S -> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
35255 S -> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
35256 S -> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
35257 S -> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
35258 S -> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
35259 S -> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
35260 S -> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
35261 S -> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
35262 S -> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
35263 S -> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
35264 S -> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
35265 S -> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
35266 S -> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
35267 S -> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
35268 S -> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
35269 S -> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
35270 S -> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
35271 S -> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
35272 S -> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
35273 S -> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
35274 S -> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
35275 S -> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
35277 new revision: delete; previous revision: 1\.2"
35279 # SGI IRIX seems to have problems with the stdout and stderr
35280 # mix for this test, so separate them.
35281 dotest_sort trace-19
"${testcvs} -t -t -t history file1 2>stderr19" \
35282 "O ${ISODATE} ${username} trace =trace= ${TESTDIR}/trace/\*" \
35283 "O ${ISODATE} ${username} trace =trace= <remote>/\*"
35284 dotest_sort trace-19stderr
"sort < stderr19" \
35285 " *-> Lock_Cleanup()
35286 *-> Simple_Lock_Cleanup()
35287 *-> main loop with CVSROOT=${CVSROOT_DIRNAME}
35288 *-> parse_cvsroot ( ${CVSROOT_DIRNAME} )
35290 *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
35291 *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )" \
35293 *-> Forking server: ${CVS_SERVER} server
35294 *-> main loop with CVSROOT=${CVSROOT}
35295 *-> parse_cvsroot ( ${CVSROOT} )
35296 *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
35297 *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
35298 *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
35299 S -> CVS_SERVER_SLEEP not set\.
35300 S -> Lock_Cleanup()
35301 S -> Lock_Cleanup()
35302 S -> Simple_Lock_Cleanup()
35303 S -> Simple_Lock_Cleanup()
35304 S -> do_cvs_command (history)
35305 S -> remove_locks()
35306 S -> remove_locks()
35307 S -> server_cleanup()
35308 S -> server_cleanup()
35309 S -> server_notify()"
35314 trace-20
"echo yes | ${testcvs} -t -t -t release -d trace" \
35315 " *callerdat=${PFMT}, argc=0, argv=${PFMT},
35316 *callerdat=${PFMT}, argc=0, argv=${PFMT},
35317 *callerdat=${PFMT}, argc=0, argv=${PFMT},
35318 *direntproc=${PFMT}, dirleavproc=${PFMT},
35319 *direntproc=${PFMT}, dirleavproc=${PFMT},
35320 *direntproc=${PFMT}, dirleavproc=${PFMT},
35321 *dosrcs=0, repository_in=(null) )
35322 *dosrcs=0, repository_in=(null) )
35323 *dosrcs=0, repository_in=(null) )
35324 *local=0, which=1, aflag=0,
35325 *local=0, which=1, aflag=0,
35326 *local=0, which=1, aflag=0,
35327 *locktype=0, update_preload=(null)
35328 *locktype=0, update_preload=(null)
35329 *locktype=2, update_preload=(null)
35330 *-> Leaving do_recursion ( frame=${PFMT} )
35331 *-> Leaving do_recursion ( frame=${PFMT} )
35332 *-> Leaving do_recursion ( frame=${PFMT} )
35333 *-> Leaving do_recursion ( frame=${PFMT} )
35334 *-> Leaving do_recursion ( frame=${PFMT} )
35335 *-> Leaving do_recursion ( frame=${PFMT} )
35336 *-> Leaving do_recursion ( frame=${PFMT} )
35337 *-> Leaving do_recursion ( frame=${PFMT} )
35338 *-> Leaving do_recursion ( frame=${PFMT} )
35341 *-> Promotable_Lock ()
35342 *-> Simple_Lock_Cleanup()
35343 *-> Simple_Lock_Cleanup()
35344 *-> Simple_Lock_Cleanup()
35345 *-> Simple_Lock_Cleanup()
35346 *-> _lock_exists (${CVSROOT_DIRNAME}/trace, #cvs\.pfl\.\*, #cvs\.pfl\.${hostname}\.[0-9][0-9]*)
35347 *-> _lock_exists (${CVSROOT_DIRNAME}/trace, #cvs\.pfl\.\*, #cvs\.pfl\.${hostname}\.[0-9][0-9]*)
35348 *-> _lock_exists (${CVSROOT_DIRNAME}/trace, #cvs\.rfl\.\*, #cvs\.rfl\.${hostname}\.[0-9][0-9]*)
35349 *-> _lock_exists (${CVSROOT_DIRNAME}/trace/subdir, #cvs\.pfl\.\*, #cvs\.pfl\.${hostname}\.[0-9][0-9]*)
35350 *-> _lock_exists (${CVSROOT_DIRNAME}/trace/subdir, #cvs\.pfl\.\*, #cvs\.pfl\.${hostname}\.[0-9][0-9]*)
35351 *-> _lock_exists (${CVSROOT_DIRNAME}/trace/subdir, #cvs\.rfl\.\*, #cvs\.rfl\.${hostname}\.[0-9][0-9]*)
35352 *-> do_recursion ( frame=${PFMT} )
35353 *-> do_recursion ( frame=${PFMT} )
35354 *-> do_recursion ( frame=${PFMT} )
35355 *-> do_recursion ( frame=${PFMT} )
35356 *-> do_recursion ( frame=${PFMT} )
35357 *-> do_recursion ( frame=${PFMT} )
35358 *-> do_recursion ( frame=${PFMT} )
35359 *-> do_recursion ( frame=${PFMT} )
35360 *-> do_recursion ( frame=${PFMT} )
35361 *-> fopen(${CVSROOT_DIRNAME}/CVSROOT/history,a)
35362 *-> lock_dir_for_write (${CVSROOT_DIRNAME}/trace)
35363 *-> lock_dir_for_write (${CVSROOT_DIRNAME}/trace/subdir)
35364 *-> lock_name (${CVSROOT_DIRNAME}/trace, #cvs\.lock)
35365 *-> lock_name (${CVSROOT_DIRNAME}/trace, #cvs\.lock)
35366 *-> lock_name (${CVSROOT_DIRNAME}/trace, #cvs\.lock)
35367 *-> lock_name (${CVSROOT_DIRNAME}/trace, #cvs\.pfl\.${hostname}\.[0-9][0-9]*)
35368 *-> lock_name (${CVSROOT_DIRNAME}/trace, #cvs\.rfl\.${hostname}\.[0-9][0-9]*)
35369 *-> lock_name (${CVSROOT_DIRNAME}/trace, #cvs\.wfl\.${hostname}\.[0-9][0-9]*)
35370 *-> lock_name (${CVSROOT_DIRNAME}/trace, )
35371 *-> lock_name (${CVSROOT_DIRNAME}/trace, )
35372 *-> lock_name (${CVSROOT_DIRNAME}/trace, )
35373 *-> lock_name (${CVSROOT_DIRNAME}/trace/subdir, #cvs\.lock)
35374 *-> lock_name (${CVSROOT_DIRNAME}/trace/subdir, #cvs\.lock)
35375 *-> lock_name (${CVSROOT_DIRNAME}/trace/subdir, #cvs\.lock)
35376 *-> lock_name (${CVSROOT_DIRNAME}/trace/subdir, #cvs\.pfl\.${hostname}\.[0-9][0-9]*)
35377 *-> lock_name (${CVSROOT_DIRNAME}/trace/subdir, #cvs\.rfl\.${hostname}\.[0-9][0-9]*)
35378 *-> lock_name (${CVSROOT_DIRNAME}/trace/subdir, #cvs\.wfl\.${hostname}\.[0-9][0-9]*)
35379 *-> lock_name (${CVSROOT_DIRNAME}/trace/subdir, )
35380 *-> lock_name (${CVSROOT_DIRNAME}/trace/subdir, )
35381 *-> lock_name (${CVSROOT_DIRNAME}/trace/subdir, )
35382 *-> lock_simple_remove()
35383 *-> lock_simple_remove()
35384 *-> lock_simple_remove()
35385 *-> lock_simple_remove()
35386 *-> lock_tree_promotably (0, argv, 0, 1, 0)
35387 *-> main loop with CVSROOT=${CVSROOT_DIRNAME}
35388 *-> parse_cvsroot ( ${CVSROOT_DIRNAME} )
35389 *-> promotable_exists (${CVSROOT_DIRNAME}/trace)
35390 *-> promotable_exists (${CVSROOT_DIRNAME}/trace)
35391 *-> promotable_exists (${CVSROOT_DIRNAME}/trace/subdir)
35392 *-> promotable_exists (${CVSROOT_DIRNAME}/trace/subdir)
35393 *-> promotable_lock(${CVSROOT_DIRNAME}/trace)
35394 *-> promotable_lock(${CVSROOT_DIRNAME}/trace/subdir)
35395 *-> readers_exist (${CVSROOT_DIRNAME}/trace)
35396 *-> readers_exist (${CVSROOT_DIRNAME}/trace/subdir)
35399 *-> run_popen(${testcvs} -n -q -d ${CVSROOT_DIRNAME} update,r)
35400 *-> set_lock (${CVSROOT_DIRNAME}/trace, 0)
35401 *-> set_lock (${CVSROOT_DIRNAME}/trace, 1)
35402 *-> set_lock (${CVSROOT_DIRNAME}/trace/subdir, 0)
35403 *-> set_lock (${CVSROOT_DIRNAME}/trace/subdir, 1)
35404 *-> start_recursion ( fileproc=${PFMT}, filesdoneproc=${PFMT},
35405 *-> start_recursion ( fileproc=${PFMT}, filesdoneproc=${PFMT},
35406 *-> unlink_file_dir(trace)
35407 *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
35408 *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
35409 *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
35410 *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
35411 *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
35412 *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
35413 *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
35414 *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
35415 *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
35416 *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
35417 *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
35418 *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
35419 *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
35420 *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
35421 *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
35422 *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
35423 *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
35424 *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
35425 *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
35426 *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
35427 *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
35428 *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
35429 *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
35430 *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
35431 *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
35432 *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
35433 *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
35434 Are you sure you want to release (and delete) directory \`trace': *-> start_recursion ( fileproc=${PFMT}, filesdoneproc=${PFMT},
35435 You have \[0\] altered files in this repository\." \
35437 *callerdat=${PFMT}, argc=0, argv=${PFMT},
35438 *callerdat=${PFMT}, argc=0, argv=${PFMT},
35439 *direntproc=${PFMT}, dirleavproc=${PFMT},
35440 *direntproc=${PFMT}, dirleavproc=${PFMT},
35441 *dosrcs=0, repository_in=(null) )
35442 *dosrcs=0, repository_in=(null) )
35443 *local=0, which=1, aflag=0,
35444 *local=0, which=1, aflag=0,
35445 *locktype=0, update_preload=(null)
35446 *locktype=0, update_preload=(null)
35447 *-> Forking server: ${CVS_SERVER} server
35448 *-> Leaving do_recursion ( frame=${PFMT} )
35449 *-> Leaving do_recursion ( frame=${PFMT} )
35450 *-> Leaving do_recursion ( frame=${PFMT} )
35451 *-> Leaving do_recursion ( frame=${PFMT} )
35452 *-> Leaving do_recursion ( frame=${PFMT} )
35453 *-> Leaving do_recursion ( frame=${PFMT} )
35454 *-> do_recursion ( frame=${PFMT} )
35455 *-> do_recursion ( frame=${PFMT} )
35456 *-> do_recursion ( frame=${PFMT} )
35457 *-> do_recursion ( frame=${PFMT} )
35458 *-> do_recursion ( frame=${PFMT} )
35459 *-> do_recursion ( frame=${PFMT} )
35460 *-> main loop with CVSROOT=${CVSROOT}
35461 *-> parse_cvsroot ( ${CVSROOT} )
35462 *-> run_popen(${testcvs} -n -q -d ${CVSROOT} update,r)
35463 *-> start_recursion ( fileproc=${PFMT}, filesdoneproc=${PFMT},
35464 *-> unlink_file_dir(trace)
35465 *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
35466 *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
35467 *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
35468 *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
35469 *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
35470 *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
35471 *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
35472 *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
35473 *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
35474 *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
35475 *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
35476 *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
35477 *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
35478 *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
35479 *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
35480 *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
35481 *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
35482 *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
35483 *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
35484 *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
35485 *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
35486 Are you sure you want to release (and delete) directory \`trace': *-> start_recursion ( fileproc=${PFMT}, filesdoneproc=${PFMT},
35487 S -> CVS_SERVER_SLEEP not set\.
35488 S -> Lock_Cleanup()
35489 S -> Lock_Cleanup()
35490 S -> Simple_Lock_Cleanup()
35491 S -> Simple_Lock_Cleanup()
35492 S -> do_cvs_command (release)
35493 S -> fopen(${CVSROOT_DIRNAME}/CVSROOT/history,a)
35494 S -> remove_locks()
35495 S -> remove_locks()
35496 S -> server_cleanup()
35497 S -> server_cleanup()
35498 S -> server_notify()
35499 S -> server_notify()
35500 S -> server_notify()
35501 You have \[0\] altered files in this repository\."
35506 modify_repo
rm -fr $CVSROOT_DIRNAME/trace
35512 echo $what is not the name of a
test -- ignored
35516 # Sanity check sanity.sh. :)
35518 # Test our exit directory so that tests that exit in an incorrect directory
35519 # are noticed during single test runs.
35522 # Sparc Solaris 9 is dereferencing paths here as if /bin/pwd were
35523 # called when /tmp is a symlink. This might be a new problem with this
35524 # test, but since this was recently tested I think it more likely to be
35526 if test "x$TESTDIR" != "x`pwd`"; then
35527 fail
"cleanup: PWD != TESTDIR (\``pwd`' != \`$TESTDIR')"
35530 # Test that the last test didn't overwrite any write proxy configuration
35531 # which may be in place.
35535 $SECONDARY_CVSROOT_DIRNAME/CVSROOT
/config \
35536 $CVSROOT_DIRNAME/CVSROOT
/config \
35537 $SECONDARY_CVSROOT_DIRNAME/CVSROOT
/loginfo \
35538 $CVSROOT_DIRNAME/CVSROOT
/loginfo \
35539 $SECONDARY_CVSROOT_DIRNAME/CVSROOT
/postadmin \
35540 $CVSROOT_DIRNAME/CVSROOT
/postadmin \
35541 $SECONDARY_CVSROOT_DIRNAME/CVSROOT
/posttag \
35542 $CVSROOT_DIRNAME/CVSROOT
/posttag \
35543 $SECONDARY_CVSROOT_DIRNAME/CVSROOT
/postwatch \
35544 $CVSROOT_DIRNAME/CVSROOT
/postwatch
; do
35545 if cmp $file $TESTDIR/`basename $file`-clean >/dev
/null
2>&1; then
35548 echo "\`$file' and \`$TESTDIR/`basename $file`-clean' differ." \
35554 fail
"cleanup: write proxy configuration not preserved"
35558 if $remote && test "$servercvs_orig" != "$servercvs" >/dev
/null
2>&1; then
35559 fail
"test slagged \$servercvs"
35562 # Reset val-tags to a pristine state.
35563 if test -s $CVSROOT_DIRNAME/CVSROOT
/val-tags
; then
35564 modify_repo
":" > $CVSROOT_DIRNAME/CVSROOT
/val-tags
35566 verify_tmp_empty
"post $what"
35568 done # The big loop
35570 # Set up summary data for output.
35574 if test $skipped -ne 0; then
35575 skippedoutput
="$skipped test group"
35576 if test $skipped -ne 1; then
35577 skippedoutput
="${skippedoutput}s"
35579 skippedoutput
="$skippedoutput skipped"
35581 if test $warnings -ne 0; then
35582 warningsoutput
="$warnings test"
35583 if test $warnings -ne 1; then
35584 warningsoutput
="${warningsoutput}s"
35586 warningsoutput
="$warningsoutput passed with warnings"
35588 if test -n "$skippedoutput" ||
test -n "$warningsoutput"; then
35590 if test -n "$skippedoutput"; then
35591 extendedinfo
="$extendedinfo$skippedoutput"
35593 if test -n "$skippedoutput" && test -n "$warningsoutput"; then
35594 extendedinfo
="$extendedinfo and "
35596 if test -n "$warningsoutput"; then
35597 extendedinfo
="$extendedinfo$warningsoutput"
35599 extendedinfo
="$extendedinfo)"
35602 echo "OK, all $passed tests passed$extendedinfo."
35605 # * Test `cvs update -d foo' (where foo does not exist).
35606 # * Test `cvs update foo bar' (where foo and bar are both from the
35607 # same directory in the repository). Suppose one is a branch--make
35608 # sure that both directories get updated with the respective correct
35610 # * `cvs update ../foo'. Also ../../foo ./../foo foo/../../bar /foo/bar
35611 # foo/.././../bar foo/../bar etc.
35612 # * Test all flags in modules file.
35613 # Test that ciprog gets run both on checkin in that directory, or a
35614 # higher-level checkin which recurses into it.
35615 # * Test operations on a directory that contains other directories but has
35616 # no files of its own.
35617 # * -t global option
35618 # * cvs rm followed by cvs add or vice versa (with no checkin in between).
35619 # * cvs rm twice (should be a nice error message).
35620 # * -P option to checkout--(a) refrains from checking out new empty dirs,
35621 # (b) prunes empty dirs already there.
35622 # * Test that cvs -d `hostname`:${TESTDIR}/non/existent co foo
35623 # gives an appropriate error (e.g.
35624 # Cannot access ${TESTDIR}/non-existent/CVSROOT
35625 # No such file or directory).
35626 # (like basica-9, but for remote).
35627 # * Test ability to send notifications in response to watches. (currently
35628 # hard to test because CVS doesn't send notifications if username is the
35630 # * Test the contents of adm files other than Root and Repository.
35631 # Entries seems the next most important thing.
35632 # * Test the following compatibility issues:
35633 # - The filler fields in "D" entries in CVS/Entries get preserved
35634 # (per cvs.texinfo).
35635 # - Unrecognized entry types in CVS/Entries get ignored (looks like
35636 # this needs to be documented in cvs.texinfo, but is not)
35637 # - Test that unrecognized files in CVS directories (e.g. CVS/Foobar)
35638 # are ignored (per cvs.texinfo).
35639 # - Test 'cvs history' with symlinks in the path to the working directory.
35640 # - Remove most of the CVS_SERVER stuff after a reasonable amount of time.
35641 # The "fork" & "client" series of tests should be left. 4/2/00, CVS
35642 # 1.11.0.1 was altered so that it would default to program_name (set from
35643 # argv[0]) rather than "cvs", but I'd like this script to work on legacy
35644 # versions of CVS for awhile.
35645 # - Testsuite doesn't work with usernames over eight characters in length.
35647 # End of TODO list.
35652 # Remove the test directory, but first change out of it.
35654 echo "exiting without removing test dir in order to preserve timing information."
35656 cd `dirname $TESTDIR`