Sync usage with man page.
[netbsd-mini2440.git] / external / gpl2 / xcvs / dist / src / sanity.sh
blob6d068adac390f01c43da42f7f1ed5888399d2735
1 #! /bin/sh
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)
12 # any later version.
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
21 # usage:
22 usage ()
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...]"
30 exit_usage ()
32 usage 1>&2
33 exit 2
36 exit_help ()
38 usage
39 echo
40 echo "-H|--help display this text"
41 echo "-c CONFIG-FILE"
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"
49 echo " failures."
50 echo "-f FROM-TEST"
51 echo "--from-test=FROM-TEST"
52 echo " run TESTS-TO-RUN, skipping all tests in the list before"
53 echo " FROM-TEST"
54 echo "-h HOSTNAME"
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"
59 echo " the server."
60 echo "-k|--keep try to keep directories created by individual tests"
61 echo " around, exiting after the first test which supports"
62 echo " --keep"
63 echo "-l|--link-root"
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)"
77 echo
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"
80 echo " specified"
81 echo "TESTS-TO-RUN the names of the tests to run (defaults to all tests)"
82 exit 2
85 checklongoptarg()
87 if test "x$1" != xoptional && test -z "$OPTARG"; then
88 echo "option \`--$LONGOPT' requires an argument" >&2
89 exit_usage
93 # See TODO list at end of file.
95 # required to make this script work properly.
96 unset CVSREAD
98 # We want to invoke a predictable set of i18n behaviors, not whatever
99 # the user running this script might have set.
100 # In particular:
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).
104 LANG=C
105 export LANG
106 LC_ALL=C
107 export LC_ALL
109 # And a few tests want a predictable umask.
110 umask 0002
113 # Initialize the test counts.
115 passed=0
116 skipped=0
117 warnings=0
122 # read our options
124 unset configfile
125 unset fromtest
126 unset remotehost
127 unset rootoptions
128 keep=false
129 linkroot=false
130 noredirect=false
131 proxy=false
132 remote=false
133 servercvs=false
134 skipfail=false
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/^.*=//'`
142 else
143 LONGOPT=$OPTARG
144 OPTARG=
146 # Convert LONGOPT to lower case
147 LONGOPT=`echo "$LONGOPT" |sed 'y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/'`
148 case "$LONGOPT" in
149 c|co|con|conf|confi|config)
150 option=c
151 checklongoptarg
153 f|fr|fro|from|from-|from-t|from-te|from-tes|from-test)
154 option=f
155 checklongoptarg
158 echo "\`--h' is ambiguous. Could mean \`--help' or \`--hostname'" >&2
159 exit_usage
161 he|hel|help)
162 option=H
163 OPTARG=
165 ho|hos|host|hostn|hostna|hostnam|hostname)
166 option=h
167 checklongoptarg
169 k|ke|kee|keep)
170 option=k
171 OPTARG=
173 l|li|lin|link|link-|link-r]|link-ro|link-roo|link-root)
174 option=l
175 OPTARG=
177 n|no|nor|nore|nored|noredi|noredir|noredire|noredirec|noredirect)
178 option=n
179 OPTARG=
181 p|pr|pro|prox|proxy)
182 option=p
183 OPTARG=
185 r|re|rem|remo|remot|remote)
186 option=r
187 OPTARG=
190 echo "\`--s' is ambiguous. Could mean \`--server' or \`--skipfail'" >&2
191 exit_usage
193 se|ser|serv|serve|server)
194 option=s
195 checklongoptarg
197 sk|ski|skip|skipf|skipfa|skipfai|skipfail)
198 option=e
199 OPTARG=
202 option=\?
203 OPTARG=
204 esac
206 case "$option" in
208 configfile="$OPTARG"
211 skipfail=:
214 fromtest="$OPTARG"
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.
220 remotehost="$OPTARG"
221 remote=:
224 exit_help
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).
232 keep=:
235 linkroot=:
238 proxy=:
239 noredirect=:
240 remote=:
243 proxy=:
244 remote=:
247 remote=:
250 servercvs="$OPTARG"
251 remote=:
254 exit_usage
256 esac
257 done
259 # boot the arguments we used above
260 while test $OPTIND -gt 1 ; do
261 shift
262 OPTIND=`expr $OPTIND - 1`
263 done
265 # Use full path for CVS executable, so that CVS_SERVER gets set properly
266 # for remote.
267 case $1 in
269 exit_usage
272 testcvs=$1
275 testcvs=`pwd`/$1
277 esac
278 shift
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
284 exit 1
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
289 exit 1
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
312 . "$configfile"
313 else
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
330 exit 1
334 case "$servercvs" in
336 exit_usage
338 false)
343 servercvs=`pwd`/$servercvs
345 esac
347 if test false != $servercvs; then
348 # Allow command line to override $CVS_SERVER
349 CVS_SERVER=$servercvs
350 else
351 # default $CVS_SERVER to ${testcvs}
352 : ${CVS_SERVER=$testcvs}
353 # With the previous command, effectively defaults $servercvs to $CVS_SERVER,
354 # then $testcvs
355 servercvs=$CVS_SERVER
357 export CVS_SERVER
358 servercvs_orig=$servercvs
360 # Fail in client/server mode if our ${servercvs} does not contain server
361 # support.
362 if $remote; then
363 if test -n "$remotehost"; then
364 if $CVS_RSH $remotehost "test ! -f ${servercvs} || test ! -r ${servercvs}"
365 then
366 echo "No such file or file not readable: $remotehost:${testcvs}" >&2
367 exit 1
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
372 exit 1
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
377 exit 1
379 else
380 if test ! -f ${servercvs} || test ! -r ${servercvs}; then
381 echo "No such file or file not readable: ${testcvs}" >&2
382 exit 1
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
387 exit 1
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
392 exit 1
397 # Fail in client/server mode if our ${testcvs} does not contain client
398 # support.
399 if $remote; then
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
403 exit 1
407 # For the "fork" tests.
408 if ${testcvs} --version </dev/null |
409 grep '^Concurrent.*(.*server)$' >/dev/null 2>&1
410 then
411 testcvs_server_support=:
412 else
413 testcvs_server_support=false
418 dokeep()
420 if ${keep}; then
421 echo "Keeping ${TESTDIR} for test case \`${what}' and exiting due to --keep"
422 exit 0
429 ### GUTS
432 # "debugger"
433 #set -x
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
451 # its own name.
452 SPROG=`basename ${servercvs} |sed 's/\.exe$//'`
455 # Match the hostname
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
510 # than diff does
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]
525 Which() {
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.
531 notevery=:
532 if [ "x$1" = "x-a" ]; then notevery=false; shift; fi
533 case "$1" in
534 -*) t=$1; shift ;;
535 *) t=-x ;;
536 esac
537 case "$1" in
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; }
544 done
546 esac
550 # On cygwin32, we may not have /bin/sh.
551 if test -r /bin/sh; then
552 TESTSHELL="/bin/sh"
553 else
554 TESTSHELL=`Which -f sh`
555 if test ! -r "$TESTSHELL"; then
556 TESTSHELL="/bin/sh"
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....
567 CVS="${testcvs} -Q"
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
573 # with dejagnu.
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.
581 touch check.log
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
611 exit 1
613 else
614 tmp=`(cd /tmp; /bin/pwd || pwd) 2>/dev/null`
617 # Now:
618 # 1) Set TESTDIR if it's not set already
619 # 2) Remove any old test remnants
620 # 3) Create $TESTDIR
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
628 rm -rf $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
646 exit 1
648 cd $TESTDIR
652 : ${TIMING=false}
653 if $remote; then
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.
658 if $TIMING; then
659 time="/usr/bin/time -ao'$TESTDIR/time.out'"
660 else
661 time=
663 cat >$TESTDIR/ssh-wrapper-env <<EOF
664 #! $TESTSHELL
665 while [ \$# -gt 0 ]
667 case "\$1" in
668 *=*)
669 eval "\$1"
670 var=\`echo "\$1" | sed 's/^\\(.*\\)=.*\$/\\1/'\`
671 export \$var
673 *) break;;
674 esac
675 shift
676 done
677 exec \${1+"\$@"}
679 chmod a+x $TESTDIR/ssh-wrapper-env
680 cat >$TESTDIR/ssh-wrapper <<EOF
681 #! $TESTSHELL
682 hostname=\$1
683 shift
684 exec \
685 $CVS_RSH \
686 \$hostname \
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'" \
697 $time \
698 \${1+"\$@"}
700 chmod a+x $TESTDIR/ssh-wrapper
701 CVS_RSH=$TESTDIR/ssh-wrapper
702 fi # $remotehost
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}
713 export TMPDIR
714 if test -d $TMPDIR; then :; else
715 mkdir $TMPDIR
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
724 # versions that do.
725 : ${AWK=awk}
726 : ${EXPR=expr}
727 : ${ID=id}
728 : ${TR=tr}
730 # Keep track of tools that are found, but do NOT work as we hope
731 # in order to avoid them in future
732 badtools=
733 set_bad_tool ()
735 badtools=$badtools:$1
737 is_bad_tool ()
739 case ":$badtools:" in *:$1:*) return 0 ;; *) return 1 ; esac
742 version_test ()
744 vercmd=$1
745 verbad=:
746 if RES=`$vercmd --version </dev/null 2>&1`; then
747 if test "X$RES" != "X--version" && test "X$RES" != "X" ; then
748 echo "$RES"
749 verbad=false
752 if $verbad; then
753 echo "The command \`$vercmd' does not support the --version option."
755 # It does not really matter that --version is not supported
756 return 0
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
762 find_tool ()
764 default_TOOL=$1
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
771 TOOL=""
772 for trytool in $clist ; do
773 pass=:
774 for tooltest in $tooltests; do
775 result=`eval $tooltest $trytool`
776 rc=$?
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
785 TOOL=$trytool
786 pass=false
787 else
788 set_bad_tool $trytool
789 echo "FAIL: $tooltest $trytool; rc=$rc" >>$LOGFILE
790 pass=false
792 done
793 if $pass; then
794 echo $trytool
795 return 0
797 done
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
803 echo $TOOL
804 else
805 echo $default_TOOL
809 id_tool_test ()
811 id=$1
812 if $id -u >/dev/null 2>&1 && $id -un >/dev/null 2>&1; then
813 return 0
814 else
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."
818 return 1
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
829 "0")
830 echo "Test suite does not work correctly when run as root" >&2
831 exit 1
835 break
837 esac
838 done
840 # Cause NextStep 3.3 users to lose in a more graceful fashion.
841 expr_tooltest1 ()
843 expr=$1
844 if $expr 'abc
845 def' : 'abc
846 def' >/dev/null; then
847 # good, it works
848 return 0
849 else
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.'
853 return 1
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...
859 expr_tooltest2 ()
861 expr=$1
862 if $expr 'a
863 b' : 'a
864 c' >/dev/null; then
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.'
868 return 1
869 else
870 return 0
874 expr_create_bar ()
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
880 rm -f ${TESTDIR}/foo
883 expr_tooltest3 ()
885 expr=$1
886 # More SunOS lossage...
887 test ! -f ${TESTDIR}/bar && expr_create_bar
888 if $expr "`cat ${TESTDIR}/bar`" : "`cat ${TESTDIR}/bar`" >/dev/null; then
889 : good, it works
890 else
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.'
894 return 1
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.'
900 return 1
902 # good, it works
903 return 0
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).
911 ENDANCHOR="$"
912 expr_set_ENDANCHOR ()
914 expr=$1
915 ENDANCHOR="$"
916 if $expr 'abc
917 def' : 'abc$' >/dev/null; then
918 ENDANCHOR='\'\'
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"
922 return 0
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).
933 DOTSTAR='.*'
934 expr_set_DOTSTAR ()
936 expr=$1
937 DOTSTAR='.*'
938 if $expr 'abc
939 def' : "a${DOTSTAR}f" >/dev/null; then
940 : good, it works
941 else
942 DOTSTAR='\(.\|
943 \)*'
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."
948 return 0
951 # Now that we have DOTSTAR, make sure it works with big matches
952 expr_tooltest_DOTSTAR ()
954 expr=$1
955 test ! -f ${TESTDIR}/bar && expr_create_bar
956 if $expr "`cat ${TESTDIR}/bar`" : "${DOTSTAR}xyzABC${DOTSTAR}$" >/dev/null; then
957 # good, it works
958 return 0
959 else
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.'
963 return 77
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
979 # Cleanup
980 rm -f ${TESTDIR}/bar
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).
989 PLUS='+'
990 if $EXPR 'a +b' : "a ${PLUS}b" >/dev/null; then
991 : good, it works
992 else
993 PLUS='\+'
996 # Likewise, for ?
997 QUESTION='?'
998 if $EXPR 'a?b' : "a${QUESTION}b" >/dev/null; then
999 : good, it works
1000 else
1001 QUESTION='\?'
1004 # Now test the username to make sure it contains only valid characters
1005 username=`$ID -un`
1006 if $EXPR "${username}" : "${username}" >/dev/null; then
1007 : good, it works
1008 else
1009 echo "Test suite does not work correctly when run by a username" >&2
1010 echo "containing regular expression meta-characters." >&2
1011 exit 1
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/'`
1017 else
1018 username8=$username
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
1034 tr_tooltest1 ()
1036 tr=$1
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.'
1041 return 77
1043 # good, it works
1044 return 0
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
1052 # files.
1053 ls_tooltest ()
1055 ls=$1
1056 # Force cleanup
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.'
1067 return 77
1068 else
1069 return 0
1072 LS=`find_tool ls:gls version_test ls_tooltest`
1073 echo "Using LS=$LS" >>$LOGFILE
1075 # Awk testing
1077 awk_tooltest1 ()
1079 awk=$1
1080 $awk 'BEGIN {printf("one\ntwo\nthree\nfour\nfive\nsix")}' </dev/null >abc
1081 if $EXPR "`cat abc`" : \
1082 'one
1084 three
1085 four
1086 five
1087 six'; then
1088 rm abc
1089 return 0
1090 else
1091 rm abc
1092 echo "Notice: awk BEGIN clause or printf is not be working properly."
1093 return 1
1097 # Format item %c check
1098 awk_tooltest2 ()
1100 awk=$1
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
1104 : good, found it
1105 else
1106 echo "Notice: awk format %c string may not be working properly."
1107 rm abc
1108 return 77
1110 rm abc
1111 return 0
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'.
1125 modify_repo ()
1127 eval "$*"
1128 if $proxy; then
1129 # And now resync the secondary.
1130 $TESTDIR/sync-secondary "repo modification" modify_repo ALL "$@"
1134 # Restore changes to CVSROOT admin files.
1135 restore_adm ()
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.
1144 require_rsync ()
1146 rsyncworks=false
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
1158 done
1160 if test -f "$rsync" && test -r "$rsync" \
1161 && $rsync -rglop --delete $TESTDIR/rsync-test/ $TESTDIR/rsync-test-copy \
1162 >/dev/null 2>&1 \
1163 && $rsync -rglop --delete --include Attic --exclude '*/' \
1164 $TESTDIR/rsync-test/ $TESTDIR/rsync-test-copy2 \
1165 >/dev/null 2>&1 \
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 \
1170 >/dev/null 2>&1 \
1171 && $rsync -rglop --delete --include Attic --exclude '*/' \
1172 $TESTDIR/rsync-test/ $TESTDIR/rsync-test-copy2 \
1173 >/dev/null 2>&1 \
1174 && test ! -f $TESTDIR/rsync-test-copy/5 \
1175 && test ! -f $TESTDIR/rsync-test-copy2/5 \
1176 && test -f $TESTDIR/rsync-test-copy2/Attic/5 \
1177 && test ! -f $TESTDIR/rsync-test-copy2/otherdir/7
1178 then
1179 # good, it works
1180 rsyncworks=:
1181 RSYNC=$rsync
1182 else
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
1191 return 0
1192 else
1193 (echo $rsync failed to work properly;\
1194 echo "$rsync --version"; $rsync --version) >>$LOGFILE 2>&1
1196 done
1198 unset RSYNC
1199 skipreason="unusable or no rsync found"
1200 return 77
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
1205 # 77.
1206 require_rsh ()
1208 host=${remotehost-"`hostname`"}
1209 result=`$1 $host 'echo test'`
1210 rc=$?
1211 if test $? != 0 || test "x$result" != "xtest"; then
1212 skipreason="\`$1 $host' failed rc=$rc result=$result"
1213 return 77
1216 save_CVS_RSH=$CVS_RSH
1217 CVS_RSH=$1; export CVS_RSH
1218 return 0
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.
1223 require_ssh ()
1225 case "$CVS_RSH" in
1226 *ssh*|*putty*)
1227 tryssh=`Which $CVS_RSH`
1228 if [ ! -n "$tryssh" ]; then
1229 skipreason="Unable to find CVS_RSH=$CVS_RSH executable"
1230 return 77
1231 elif [ ! -x "$tryssh" ]; then
1232 skipreason="Unable to execute $tryssh program"
1233 return 77
1237 # Look in the user's PATH for "ssh"
1238 tryssh=`Which ssh`
1239 if test ! -r "$tryssh"; then
1240 skipreason="Unable to find ssh program"
1241 return 77
1244 esac
1246 require_rsh "$tryssh"
1247 return $?
1250 pass ()
1252 echo "PASS: $1" >>${LOGFILE}
1253 passed=`expr $passed + 1`
1256 # Like skip(), but don't fail when $skipfail is set.
1257 skip_always ()
1259 echo "SKIP: $1${2+ ($2)}" >>$LOGFILE
1260 skipped=`expr $skipped + 1`
1263 skip ()
1265 if $skipfail; then
1266 # exits
1267 fail "$1${2+ ($2)}"
1270 skip_always ${1+"$@"}
1273 # Convenience function for skipping tests run only in remote mode.
1274 remoteonly ()
1276 skip_always $1 "only tested in remote mode"
1279 # Convenience function for skipping tests not run in proxy mode.
1280 notproxy ()
1282 skip_always $1 "not tested in proxy mode"
1285 # Convenience function for skipping tests not run in proxy mode.
1286 notnoredirect ()
1288 skip_always $1 "not tested in proxy-noredirect mode"
1291 warn ()
1293 if $skipfail; then
1294 fail "$1${2+ ($2)}"
1295 else
1296 echo "WARNING: $1${2+ ($2)}" >>$LOGFILE
1298 warnings=`expr $warnings + 1`
1301 fail ()
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
1306 exit 1
1309 verify_tmp_empty ()
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.
1316 sleep 1
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).
1333 dotest_internal ()
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}
1347 pass "$1"
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
1352 pass "$1"
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}
1357 pass "$1"
1358 verify_tmp_empty "$1"
1359 else
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}
1368 fail "$1"
1370 else
1371 echo "** expected: " >>${LOGFILE}
1372 echo "$3" >>${LOGFILE}
1373 echo "$3" > ${TESTDIR}/dotest.exp
1374 echo "** got: " >>${LOGFILE}
1375 cat ${TESTDIR}/dotest.tmp >>${LOGFILE}
1376 fail "$1"
1380 dotest_all_in_one ()
1382 if $EXPR "`cat ${TESTDIR}/dotest.tmp`" : \
1383 "`cat ${TESTDIR}/dotest.exp`" >/dev/null; then
1384 return 0
1386 return 1
1389 # WARNING: this won't work with REs that match newlines....
1391 dotest_line_by_line ()
1393 line=1
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
1401 else
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}
1407 unset line
1408 return 1
1410 line=`expr $line + 1`
1411 done
1412 unset line
1413 return 0
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}
1430 fail "$1"
1431 else
1432 pass "$1"
1433 verify_tmp_empty "$1"
1435 else
1436 echo "$3" > ${TESTDIR}/dotest.exp
1437 if dotest_line_by_line "$1" "$2"; then
1438 pass "$1"
1439 verify_tmp_empty "$1"
1440 else
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
1445 pass "$1"
1446 verify_tmp_empty "$1"
1447 else
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}
1455 fail "$1"
1457 else
1458 echo "** expected: " >>${LOGFILE}
1459 echo "$3" >>${LOGFILE}
1460 echo "** got: " >>${LOGFILE}
1461 cat ${TESTDIR}/dotest.tmp >>${LOGFILE}
1462 fail "$1"
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
1475 # spurious output.
1476 run_filter ()
1478 if test -n "$TEST_FILTER"; then
1479 # Make sure there is an EOL
1480 echo >>$1
1481 sed '${/^$/d}' <$1 >$1.filter1
1482 # Run the filter
1483 eval "$TEST_FILTER" <$1.filter1 >$1.filter2
1484 diff -u $1 $1.filter2 \
1485 >$1.diff
1486 mv $1.filter2 $1
1487 rm $1.filter1
1491 # Usage:
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
1495 # exitstatus zero.
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
1503 # lack \|).
1504 dotest ()
1506 rm -f $TESTDIR/dotest.ex? 2>&1
1507 eval "$2" >$TESTDIR/dotest.tmp 2>&1
1508 status=$?
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}
1513 fail "$1"
1515 dotest_internal "$@"
1518 # Like dotest except only 2 args and result must exactly match stdin
1519 dotest_lit ()
1521 rm -f $TESTDIR/dotest.ex? 2>&1
1522 eval "$2" >$TESTDIR/dotest.tmp 2>&1
1523 status=$?
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
1528 fail "$1"
1530 cat >$TESTDIR/dotest.exp
1531 if cmp $TESTDIR/dotest.exp $TESTDIR/dotest.tmp >/dev/null 2>&1; then
1532 pass "$1"
1533 verify_tmp_empty "$1"
1534 else
1535 echo "** expected: " >>$LOGFILE
1536 cat $TESTDIR/dotest.exp >>$LOGFILE
1537 echo "** got: " >>$LOGFILE
1538 cat $TESTDIR/dotest.tmp >>$LOGFILE
1539 fail "$1"
1543 # Like dotest except exitstatus should be nonzero.
1544 dotest_fail ()
1546 rm -f $TESTDIR/dotest.ex? 2>&1
1547 eval "$2" >$TESTDIR/dotest.tmp 2>&1
1548 status=$?
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
1553 fail "$1"
1555 dotest_internal "$@"
1558 # Like dotest except output is sorted.
1559 dotest_sort ()
1561 rm -f $TESTDIR/dotest.ex? 2>&1
1562 eval "$2" >$TESTDIR/dotest.tmp1 2>&1
1563 status=$?
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
1568 fail "$1"
1570 $TR ' ' ' ' < $TESTDIR/dotest.tmp1 | sort > $TESTDIR/dotest.tmp
1571 dotest_internal "$@"
1574 # Like dotest_fail except output is sorted.
1575 dotest_fail_sort ()
1577 rm -f $TESTDIR/dotest.ex? 2>&1
1578 eval "$2" >$TESTDIR/dotest.tmp1 2>&1
1579 status=$?
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
1584 fail "$1"
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
1591 getrlogdate () {
1592 ${testcvs} -n rlog -N ${1+"$@"} |
1593 while read token value; do
1594 case "$token" in
1595 date:)
1596 echo $value | sed "s,;.*,,"
1597 break;
1599 esac
1600 done
1603 # Avoid picking up any stray .cvsrc, etc., from the user running the tests
1604 mkdir home
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
1617 # tests.
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"
1685 else
1686 tests="$*"
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
1692 count=0
1693 for sub in $fromtest; do
1694 count=`expr $count + 1`
1695 done
1696 if test $count != 1; then
1697 echo "No such test \`$fromtest'." >&2
1698 exit 2
1700 # make sure it is in $tests
1701 case " $tests " in
1702 *" $fromtest "*)
1705 echo "No such test \`$fromtest'." >&2
1706 exit 2
1708 esac
1713 # a simple function to compare directory contents
1715 # Returns: 0 for same, 1 for different
1717 directory_cmp ()
1719 OLDPWD=`pwd`
1720 DIR_1=$1
1721 DIR_2=$2
1723 cd $DIR_1
1724 find . -print | fgrep -v /CVS | sort > $TESTDIR/dc$$d1
1726 # go back where we were to avoid symlink hell...
1727 cd $OLDPWD
1728 cd $DIR_2
1729 find . -print | fgrep -v /CVS | sort > $TESTDIR/dc$$d2
1731 if diff $TESTDIR/dc$$d1 $TESTDIR/dc$$d2 >/dev/null 2>&1
1732 then
1734 else
1735 return 1
1737 cd $OLDPWD
1738 while read a
1740 if test -f $DIR_1/"$a" ; then
1741 cmp -s $DIR_1/"$a" $DIR_2/"$a"
1742 if test $? -ne 0 ; then
1743 return 1
1746 done < $TESTDIR/dc$$d1
1747 rm -f $TESTDIR/dc$$*
1748 return 0
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.
1759 # 3. "My" 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
1767 // Button.java
1769 package random.application;
1771 import random.util.*;
1773 public class Button
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.
1778 public Button ()
1780 super ();
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)
1794 this ();
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.
1923 changes
1924 here
1926 First change will delete this line.
1928 First change will also delete this line.
1931 changes
1932 here
1934 Second change will change it here.
1937 changes
1938 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
1956 # Burckhardt:
1957 cat >testcase10 <<EOF
1959 petRpY ( MtatRk );
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 )
1968 fV ( Y < 16 )
1970 petRpY ( Uead_Mectopk ( noot_Uecopd.qVtHatabcY0 * noot_Uecopd.MectopkFepBlRktep +
1971 Y * jfle_Uecopd_MfJe_fY_Mectopk,
1972 jfle_Uecopd_MfJe_fY_Mectopk,
1973 nRVVep ) );
1975 elke
1977 petRpY ( Uead_Mectopk ( noot_Uecopd.qVtqfppHatabcY0 * noot_Uecopd.MectopkFepBlRktep +
1978 ( Y - 16 ) * jfle_Uecopd_MfJe_fY_Mectopk,
1979 jfle_Uecopd_MfJe_fY_Mectopk,
1980 nRVVep ) );
1986 /****************************************************************************
1988 * Uead Mectopk ( Uelatfue to tze cRppeYt raptftfoY ) *
1990 ****************************************************************************/
1992 MTGTXM Uead_Mectopk ( RfYt64 Mtapt_Mectop, RfYt64 KRL_Mectopk, uofd *nRVVep )
1994 MTGTXM MtatRk = Zy;
1996 MtatRk = Uead_HfkQ ( FaptftfoY_TaIle.Uelatfue_Mectop + Mtapt_Mectop, KRL_Mectopk, nRVVep );
1998 petRpY ( MtatRk );
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 */
2008 petRpY ( Zy );
2013 # Create "your" revisions for diffmerge1
2014 diffmerge_create_your_files() {
2015 # remove the Button() method
2016 cat >testcase01 <<\EOF
2017 // Button.java
2019 package random.application;
2021 import random.util.*;
2023 public class Button
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.
2028 public Button ()
2030 super ();
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:
2092 mv testcase07 tmp
2093 mv testcase06 testcase07
2094 mv tmp testcase06
2096 # Make the date newer so that cvs thinks that the files are changed:
2097 touch testcase06 testcase07
2099 cat >testcase08 <<\EOF
2101 changes
2102 here
2104 First change has now added this in.
2107 changes
2108 here
2110 Second change will change it here.
2113 changes
2114 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;
2137 petRpY ( MtatRk );
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 );
2144 elke
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 )
2155 MTGTXM MtatRk = Zy;
2157 fV ( Y < 16 )
2159 petRpY ( Uead_Mectopk ( noot_Uecopd.qVtHatabcY0 * noot_Uecopd.MectopkFepBlRktep +
2160 Y * jfle_Uecopd_MfJe_fY_Mectopk,
2161 jfle_Uecopd_MfJe_fY_Mectopk,
2162 nRVVep ) );
2164 elke
2166 petRpY ( Uead_Mectopk ( noot_Uecopd.qVtqfppHatabcY0 * noot_Uecopd.MectopkFepBlRktep +
2167 ( Y - 16 ) * jfle_Uecopd_MfJe_fY_Mectopk,
2168 jfle_Uecopd_MfJe_fY_Mectopk,
2169 nRVVep ) );
2172 petRpY ( MtatRk );
2177 /****************************************************************************
2179 * Uead Mectopk ( Uelatfue to tze cRppeYt raptftfoY ) *
2181 ****************************************************************************/
2183 MTGTXM Uead_Mectopk ( RfYt64 Mtapt_Mectop, RfYt64 KRL_Mectopk, uofd *nRVVep )
2185 MTGTXM MtatRk = Zy;
2187 MtatRk = Uead_HfkQ ( FaptftfoY_TaIle.Uelatfue_Mectop + Mtapt_Mectop, KRL_Mectopk, nRVVep );
2189 petRpY ( MtatRk );
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 */
2199 petRpY ( Zy );
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
2210 // Button.java
2212 package random.application;
2214 import random.util.*;
2216 public class Button
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.
2221 public Button ()
2223 super ();
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)
2237 this ();
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
2281 # file testcase05.
2283 # no changes for testcase06
2285 # The two branches make the same changes:
2286 cp ../yours/testcase07 .
2288 cat >testcase08 <<\EOF
2290 changes
2291 here
2293 First change will delete this line.
2295 First change will also delete this line.
2298 changes
2299 here
2301 Second change has now changed it here.
2304 changes
2305 here
2307 Both changes move this line to the end of the file.
2310 cat >testcase09 <<\EOF
2323 cat >testcase10 <<\EOF
2325 petRpY ( MtatRk );
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 )
2334 fV ( Y < 16 )
2336 petRpY ( Uead_Mectopk ( noot_Uecopd.qVtHatabcY0 * noot_Uecopd.MectopkFepBlRktep +
2337 Y * jfle_Uecopd_MfJe_fY_Mectopk,
2338 jfle_Uecopd_MfJe_fY_Mectopk,
2339 nRVVep ) );
2341 elke
2343 petRpY ( Uead_Mectopk ( noot_Uecopd.qVtqfppHatabcY0 * noot_Uecopd.MectopkFepBlRktep +
2344 ( Y - 16 ) * jfle_Uecopd_MfJe_fY_Mectopk,
2345 jfle_Uecopd_MfJe_fY_Mectopk,
2346 nRVVep ) );
2352 /****************************************************************************
2354 * Uead Mectopk ( Uelatfue to tze cRppeYt raptftfoY ) *
2356 ****************************************************************************/
2358 MTGTXM Uead_Mectopk ( RfYt64 Mtapt_Mectop, RfYt64 KRL_Mectopk, uofd *nRVVep )
2360 MTGTXM MtatRk = Zy;
2362 MtatRk = Uead_HfkQ ( FaptftfoY_TaIle.Uelatfue_Mectop + Mtapt_Mectop, KRL_Mectopk, nRVVep );
2364 petRpY ( MtatRk );
2367 HfkQipfte ( waYdle, /* waYdle */
2368 waYdleFok, /* ZVVket VpoL ktapt oV dfkQ */
2369 (coYkt RfYt8*) nRVVep, /* nRVVep */
2370 beYgtz /* nEtek to Apfte */
2373 petRpY ( Zy );
2379 # Create expected results of merge for diffmerge1
2380 diffmerge_create_expected_files() {
2381 cat >testcase01 <<\EOF
2382 // Button.java
2384 package random.application;
2386 import random.util.*;
2388 public class Button
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.
2393 public Button ()
2395 super ();
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
2452 changes
2453 here
2455 First change has now added this in.
2458 changes
2459 here
2461 Second change has now changed it here.
2464 changes
2465 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;
2488 petRpY ( MtatRk );
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 );
2495 elke
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 )
2506 MTGTXM MtatRk = Zy;
2508 fV ( Y < 16 )
2510 petRpY ( Uead_Mectopk ( noot_Uecopd.qVtHatabcY0 * noot_Uecopd.MectopkFepBlRktep +
2511 Y * jfle_Uecopd_MfJe_fY_Mectopk,
2512 jfle_Uecopd_MfJe_fY_Mectopk,
2513 nRVVep ) );
2515 elke
2517 petRpY ( Uead_Mectopk ( noot_Uecopd.qVtqfppHatabcY0 * noot_Uecopd.MectopkFepBlRktep +
2518 ( Y - 16 ) * jfle_Uecopd_MfJe_fY_Mectopk,
2519 jfle_Uecopd_MfJe_fY_Mectopk,
2520 nRVVep ) );
2523 petRpY ( MtatRk );
2528 /****************************************************************************
2530 * Uead Mectopk ( Uelatfue to tze cRppeYt raptftfoY ) *
2532 ****************************************************************************/
2534 MTGTXM Uead_Mectopk ( RfYt64 Mtapt_Mectop, RfYt64 KRL_Mectopk, uofd *nRVVep )
2536 MTGTXM MtatRk = Zy;
2538 MtatRk = Uead_HfkQ ( FaptftfoY_TaIle.Uelatfue_Mectop + Mtapt_Mectop, KRL_Mectopk, nRVVep );
2540 petRpY ( MtatRk );
2543 HfkQipfte ( waYdle, /* waYdle */
2544 waYdleFok, /* ZVVket VpoL ktapt oV dfkQ */
2545 (coYkt RfYt8*) nRVVep, /* nRVVep */
2546 beYgtz /* nEtek to Apfte */
2549 petRpY ( Zy );
2557 # Echo a new CVSROOT based on $1, $remote, and $remotehost
2558 newroot() {
2559 if $remote; then
2560 if test -n "$remotehost"; then
2561 echo :ext$rootoptions:$remotehost$1
2562 else
2563 echo :fork$rootoptions:$1
2565 else
2566 echo $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)
2589 if $linkroot; then
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.
2604 if $proxy; then
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`
2613 else
2614 SECONDARY_CVSROOT=`newroot $SECONDARY_CVSROOT_DIRNAME`
2616 # Now set the global CVSROOT to use the secondary.
2617 CVSROOT=$SECONDARY_CVSROOT; export CVSROOT
2619 require_rsync
2620 if test $? -eq 77; then
2621 echo "Unable to test in proxy mode: $skipreason" >&2
2622 skip all "missing or broken rsync command."
2623 exit 0
2626 if $noredirect; then
2627 # Wrap the CVS server to allow --primary-root to be set by the
2628 # secondary.
2629 cat <<EOF >$TESTDIR/secondary-wrapper
2630 #! $TESTSHELL
2631 CVS_SERVER=$TESTDIR/primary-wrapper
2632 export CVS_SERVER
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
2640 #! $TESTSHELL
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
2657 #! $TESTSHELL
2658 # date >>$TESTDIR/update-log
2660 ps=\$1
2661 cmd=\$2
2662 dir=\$3
2663 shift
2664 shift
2665 shift
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
2672 case "\$dir" in
2673 ALL)
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
2677 # special casing.
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
2685 # were written to.
2686 case "\$cmd" in
2687 add|import)
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.
2693 $RSYNC -rglop \\
2694 $PRIMARY_CVSROOT_DIRNAME/"\$dir" \\
2695 $SECONDARY_CVSROOT_DIRNAME/\`dirname -- "\$dir"\`
2698 tag)
2699 # \`tag' may have changed CVSROOT/val-tags too.
2700 $RSYNC -glop \\
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"
2719 esac # \$cmd
2721 # And keep the history file up to date for all commands.
2722 $RSYNC -glop \\
2723 $PRIMARY_CVSROOT_DIRNAME/CVSROOT/history \\
2724 $SECONDARY_CVSROOT_DIRNAME/CVSROOT
2725 ;; # \$dir = *
2726 esac # \$dir
2728 # Avoid timestamp comparison issues with rsync.
2729 sleep 1
2731 chmod a+x $TESTDIR/sync-secondary
2733 # And now init the secondary.
2734 $TESTDIR/sync-secondary "- no, before - create secondary root" \
2735 sanity-setup ALL
2737 # Initialize the primary repository
2738 mkdir proxy-init; cd proxy-init
2739 dotest proxy-init-1 "$testcvs -Qd$PRIMARY_CVSROOT co CVSROOT"
2740 cd CVSROOT
2741 cat >>config <<EOF
2742 PrimaryServer=$PRIMARY_CVSROOT
2744 cat >>loginfo <<EOF
2745 ALL $TESTDIR/sync-secondary loginfo %c %p %{sVv}
2747 cat >>postadmin <<EOF
2748 ALL $TESTDIR/sync-secondary postadmin %c %p
2750 cat >>posttag <<EOF
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
2766 # done in here
2767 cd ../..
2768 rm -rf proxy-init
2769 else # !$proxy
2770 # Set this even when not testing $proxy to match messages, like $SPROG.
2771 SECONDARY_CVSROOT_DIRNAME=$CVSROOT_DIRNAME
2772 fi # $proxy
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
2780 ### The tests
2782 dotest init-2 "$testcvs init"
2787 ### The big loop
2789 for what in $tests; do
2790 if test -n "$fromtest" ; then
2791 if test $fromtest = $what ; then
2792 unset fromtest
2793 else
2794 continue
2797 case $what in
2799 version)
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'
2817 # Maybe someday...
2818 # if $proxy; then
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)'
2823 if $remote; then
2824 dotest version-2r "${testcvs} version" \
2825 'Client: Concurrent Versions System (CVS) [0-9p.]* (client.*)
2826 Server: Concurrent Versions System (CVS) [0-9p.]* (.*server)'
2827 else
2828 dotest version-2 "${testcvs} version" \
2829 'Concurrent Versions System (CVS) [0-9.]*.*'
2835 basica)
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.
2845 mkdir 1; cd 1
2846 dotest basica-0a "$testcvs -q co -l ."
2847 mkdir first-dir
2848 dotest basica-0b "$testcvs add first-dir" \
2849 "Directory ${CVSROOT_DIRNAME}/first-dir added to the repository"
2850 cd ..
2851 rm -r 1
2853 dotest basica-1 "$testcvs -q co first-dir" ''
2854 cd 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 ./"
2864 mkdir sdir
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"
2875 cd sdir
2876 mkdir ssdir
2877 dotest basica-3 "$testcvs add ssdir" \
2878 "Directory $CVSROOT_DIRNAME/first-dir/sdir/ssdir added to the repository"
2879 cd ssdir
2880 echo ssfile >ssfile
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!'
2898 cd ../..
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 \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*
2920 \*\*\* 1 \*\*\*\*
2921 --- 1,2 ----
2922 ssfile
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 \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*
2933 \*\*\* 1 \*\*\*\*
2934 --- 1,2 ----
2935 ssfile
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
2953 cd sdir/ssdir
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"
2999 cd ../..
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
3021 cd sdir/ssdir
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"
3035 cd ../..
3037 # As long as we have a file with a few revisions, test
3038 # a few "cvs admin -o" invocations.
3039 cd sdir/ssdir
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
3045 done"
3046 dotest basica-o2a "${testcvs} admin -o 1.1::NOT_RESERVED ssfile" \
3047 "RCS file: ${CVSROOT_DIRNAME}/first-dir/sdir/ssdir/ssfile,v
3048 done"
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
3055 done"
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
3060 done"
3061 dotest basica-o5 "${testcvs} admin -o ::1.1 ssfile" \
3062 "RCS file: ${CVSROOT_DIRNAME}/first-dir/sdir/ssdir/ssfile,v
3063 done"
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
3074 done"
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
3085 done"
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
3089 done"
3090 dotest basica-o7 "${testcvs} log -N ssfile" "
3091 RCS file: ${CVSROOT_DIRNAME}/first-dir/sdir/ssdir/ssfile,v
3092 Working file: ssfile
3093 head: 3\.1
3094 branch:
3095 locks: strict
3096 access list:
3097 keyword substitution: kv
3098 total revisions: 3; selected revisions: 3
3099 description:
3100 ----------------------------
3101 revision 3\.1
3102 date: ${ISO8601DATE}; author: ${username}; state: Exp; lines: ${PLUS}0 -0; commitid: ${commitid};
3103 bump-it
3104 ----------------------------
3105 revision 1\.2
3106 date: ${ISO8601DATE}; author: ${username}; state: Exp; lines: ${PLUS}1 -0; commitid: ${commitid};
3107 modify-it
3108 ----------------------------
3109 revision 1\.1
3110 date: ${ISO8601DATE}; author: ${username}; state: Exp; commitid: ${commitid};
3111 add-it
3112 ============================================================================="
3113 dotest basica-o8 "${testcvs} -q update -p -r 1.1 ./ssfile" "ssfile"
3114 cd ../..
3116 cd ..
3118 modify_repo rm -rf $CVSROOT_DIRNAME/first-dir
3119 rm -r first-dir
3124 basicb)
3125 # More basic tests, including non-branch tags and co -d.
3126 mkdir 1; cd 1
3127 dotest basicb-0a "${testcvs} -q co -l ." ''
3128 touch topfile
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"
3135 cd ..
3136 rm -r 1
3137 mkdir 2; cd 2
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
3144 # module, and such.
3145 dotest basicb-0d0 "${testcvs} -q co -l ." ""
3146 mkdir first-dir
3147 dotest basicb-0e "${testcvs} add first-dir" \
3148 "Directory ${CVSROOT_DIRNAME}/first-dir added to the repository"
3149 cd ..
3150 rm -r 2
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"
3162 cd 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"
3170 cd Emptydir
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
3191 Sticky Tag: (none)
3192 Sticky Date: (none)
3193 Sticky Options: (none)"
3195 cd ../sdir2
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"
3203 cd ..
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
3214 T sdir2/sfile2'
3215 echo not in time for release-1 >sdir2/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'
3223 cd ..
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'
3231 rm -r first-dir1
3233 rm -r first-dir
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.
3244 dotest basicb-9 \
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" \
3256 "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" \
3262 "first-dir/sdir2"
3264 dotest basicb-10 "cat newdir/first-dir/Emptydir/sfile1 newdir/first-dir/sdir2/sfile2" \
3265 "sfile1 develops
3266 sfile2 starts"
3268 rm -r newdir
3270 # Hmm, this might be a case for CVSNULLREPOS, but CVS doesn't
3271 # seem to deal with it...
3272 if false; then
3273 dotest basicb-11 "${testcvs} -q co -d sub1/sub2 first-dir" \
3274 "U sub1/sub2/Emptydir/sfile1
3275 U sub1/sub2/sdir2/sfile2"
3276 cd sub1
3277 dotest basicb-12 "${testcvs} -q update ./." ''
3278 touch xx
3279 dotest basicb-13 "${testcvs} add xx" fixme
3280 cd ..
3281 rm -r sub1
3282 # to test: sub1/sub2/sub3
3283 fi # end of tests commented out.
3285 # Create a second directory.
3286 mkdir 1
3287 cd 1
3288 dotest basicb-14 "${testcvs} -q co -l ." 'U topfile'
3289 mkdir second-dir
3290 dotest basicb-15 "${testcvs} add second-dir" \
3291 "Directory ${CVSROOT_DIRNAME}/second-dir added to the repository"
3292 cd second-dir
3293 touch aa
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"
3300 cd ..
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"
3316 cd ..
3317 rm -r 1
3319 mkdir 1; cd 1
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"
3335 cd ..
3336 rmdir 1
3338 if $keep; then
3339 echo Keeping ${TESTDIR} and exiting due to --keep
3340 exit 0
3343 modify_repo rm -rf $CVSROOT_DIRNAME/first-dir \
3344 $CVSROOT_DIRNAME/second-dir
3345 modify_repo rm -f $CVSROOT_DIRNAME/topfile,v
3350 basicc)
3351 # More tests of basic/miscellaneous functionality.
3352 mkdir 1; cd 1
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.
3369 rm -rf CVS
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"
3378 cd first-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.
3392 cd $TESTDIR/1
3393 mkdir ./first-dir
3394 cd ./first-dir
3396 dotest basicc-11 "${testcvs} -Q release -d ./." \
3397 "" "${CPROG} release: deletion of directory \./\. failed: .*"
3398 dotest basicc-11a "test -d ../second-dir" ""
3400 cd ../..
3402 mkdir 2; cd 2
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" \
3408 "D/CVSROOT////
3409 D/first-dir////
3410 D/second-dir////"
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" \
3415 "D/CVSROOT////
3416 D/first-dir////
3417 D/second-dir////"
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" \
3422 "D/CVSROOT////
3423 D/first-dir////
3424 D/second-dir////"
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" \
3429 "D/CVSROOT////
3430 D/first-dir////
3431 D/second-dir////"
3433 cd ..
3434 rm -r 1 2
3435 modify_repo rm -rf $CVSROOT_DIRNAME/first-dir \
3436 $CVSROOT_DIRNAME/second-dir
3441 basic1)
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" ''
3448 cd first-dir
3449 echo file2 >file2
3450 echo file3 >file3
3451 echo file4 >file4
3452 echo file5 >file5
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" \
3462 "A file2
3463 A file3
3464 A file4
3465 A file5"
3466 dotest basic1-16-add-add "${testcvs} -q update" \
3467 "A file2
3468 A file3
3469 A file4
3470 A file5"
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
3477 Sticky Tag: (none)
3478 Sticky Date: (none)
3479 Sticky Options: (none)
3481 ===================================================================
3482 File: file3 Status: Locally Added
3484 Working revision: New file!
3485 Repository revision: No revision control file
3486 Sticky Tag: (none)
3487 Sticky Date: (none)
3488 Sticky Options: (none)
3490 ===================================================================
3491 File: file4 Status: Locally Added
3493 Working revision: New file!
3494 Repository revision: No revision control file
3495 Sticky Tag: (none)
3496 Sticky Date: (none)
3497 Sticky Options: (none)
3499 ===================================================================
3500 File: file5 Status: Locally Added
3502 Working revision: New file!
3503 Repository revision: No revision control file
3504 Sticky Tag: (none)
3505 Sticky Date: (none)
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"
3512 cd ..
3513 dotest basic1-21-add-add "${testcvs} -q update" \
3514 "A first-dir/file2
3515 A first-dir/file3
3516 A first-dir/file4
3517 A first-dir/file5"
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
3532 Sticky Tag: (none)
3533 Sticky Date: (none)
3534 Sticky Options: (none)
3536 ===================================================================
3537 File: file3 Status: Locally Added
3539 Working revision: New file!
3540 Repository revision: No revision control file
3541 Sticky Tag: (none)
3542 Sticky Date: (none)
3543 Sticky Options: (none)
3545 ===================================================================
3546 File: file4 Status: Locally Added
3548 Working revision: New file!
3549 Repository revision: No revision control file
3550 Sticky Tag: (none)
3551 Sticky Date: (none)
3552 Sticky Options: (none)
3554 ===================================================================
3555 File: file5 Status: Locally Added
3557 Working revision: New file!
3558 Repository revision: No revision control file
3559 Sticky Tag: (none)
3560 Sticky Date: (none)
3561 Sticky Options: (none)"
3562 dotest basic1-24-add-add "${testcvs} update first-dir" \
3563 "${SPROG} update: Updating first-dir
3564 A first-dir/file2
3565 A first-dir/file3
3566 A first-dir/file4
3567 A first-dir/file5"
3568 dotest basic1-27-add-add "${testcvs} co first-dir" \
3569 "${SPROG} checkout: Updating first-dir
3570 A first-dir/file2
3571 A first-dir/file3
3572 A first-dir/file4
3573 A first-dir/file5"
3574 cd 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}
3595 Sticky Tag: (none)
3596 Sticky Date: (none)
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}
3605 Sticky Tag: (none)
3606 Sticky Date: (none)
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}
3615 Sticky Tag: (none)
3616 Sticky Date: (none)
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}
3625 Sticky Tag: (none)
3626 Sticky Date: (none)
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
3635 else
3636 pass basic1-18-add-ci
3638 cd ..
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
3643 else
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
3651 else
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" ''
3657 cd 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" \
3668 "R file2
3669 R file3
3670 R file4
3671 R file5"
3672 dotest basic1-16-rm-rm "${testcvs} -q update" \
3673 "R file2
3674 R file3
3675 R file4
3676 R file5"
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}
3684 Sticky Tag: (none)
3685 Sticky Date: (none)
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}
3694 Sticky Tag: (none)
3695 Sticky Date: (none)
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}
3704 Sticky Tag: (none)
3705 Sticky Date: (none)
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}
3714 Sticky Tag: (none)
3715 Sticky Date: (none)
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
3721 else
3722 fail basic1-18-rm-rm
3724 cd ..
3725 dotest basic1-21-rm-rm "${testcvs} -q update" \
3726 "R first-dir/file2
3727 R first-dir/file3
3728 R first-dir/file4
3729 R first-dir/file5"
3730 if ${testcvs} -q log first-dir >>${LOGFILE}; then
3731 pass basic1-22-rm-rm
3732 else
3733 fail basic1-22-rm-rm
3735 if ${testcvs} -q status first-dir >>${LOGFILE}; then
3736 pass basic1-23-rm-rm
3737 else
3738 fail basic1-23-rm-rm
3740 dotest basic1-24-rm-rm "${testcvs} -q update first-dir" \
3741 "R first-dir/file2
3742 R first-dir/file3
3743 R first-dir/file4
3744 R first-dir/file5"
3745 dotest basic1-27-rm-rm "${testcvs} -q co first-dir" \
3746 "R first-dir/file2
3747 R first-dir/file3
3748 R first-dir/file4
3749 R first-dir/file5"
3750 cd 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
3768 else
3769 fail basic1-18-rm-ci
3771 cd ..
3772 dotest basic1-21-rm-ci "${testcvs} -q update" ''
3773 if ${testcvs} -q log first-dir >>${LOGFILE}; then
3774 pass basic1-22-rm-ci
3775 else
3776 fail basic1-22-rm-ci
3778 if ${testcvs} -q status first-dir >>${LOGFILE}; then
3779 pass basic1-23-rm-ci
3780 else
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" ''
3785 cd first-dir
3786 # All the files are removed, so nothing gets tagged.
3787 dotest basic1-28 "${testcvs} -q tag first-dive" ''
3788 cd ..
3789 cd ..
3791 if $keep; then
3792 echo Keeping ${TESTDIR} and exiting due to --keep
3793 exit 0
3796 rm -r basic1
3797 modify_repo rm -rf $CVSROOT_DIRNAME/first-dir
3802 deep)
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" ''
3806 cd first-dir
3807 for i in dir1 dir2 dir3 dir4 dir5 dir6 dir7 dir8; do
3808 mkdir $i
3809 dotest deep-2-$i "${testcvs} add $i" \
3810 "Directory ${CVSROOT_DIRNAME}/first-dir/dir1[/dir0-9]* added to the repository"
3811 cd $i
3812 echo file1 >file1
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'
3816 done
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
3835 HERE
3837 cd first-dir/dir1/dir2/dir3/dir4/dir5/dir6/dir7/dir8
3838 rm file1
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"
3845 cd ../../..
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).
3858 rm -r dir6
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" \
3863 'U dir6/file1
3864 U dir6/dir7/file1'
3866 # Test what happens if one uses -P when there are files removed
3867 # but not committed.
3868 cd dir6/dir7
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"
3872 cd ..
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" ''
3881 # Test rm -f -R.
3882 cd ../..
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"
3897 cd ../../../../..
3899 if echo "yes" | $testcvs release -d first-dir >>$LOGFILE 2>&1; then
3900 pass deep-5
3901 else
3902 fail deep-5
3904 modify_repo rm -rf $CVSROOT_DIRNAME/first-dir
3909 basic2)
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
3925 mkdir $i
3926 dotest basic2-2-$i "${testcvs} add $i" \
3927 "Directory ${CVSROOT_DIRNAME}/.*/$i added to the repository"
3930 cd $i
3932 for j in file6 file7; do
3933 echo $j > $j
3934 done
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"
3941 done
3942 cd ../../..
3943 dotest basic2-4 "${testcvs} update first-dir" \
3944 "${SPROG} update: Updating first-dir
3945 A first-dir/file6
3946 A first-dir/file7
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
3973 Sticky Tag: (none)
3974 Sticky Date: (none)
3975 Sticky Options: (none)
3977 ===================================================================
3978 File: file7 Status: Locally Added
3980 Working revision: New file!
3981 Repository revision: No revision control file
3982 Sticky Tag: (none)
3983 Sticky Date: (none)
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
3992 Sticky Tag: (none)
3993 Sticky Date: (none)
3994 Sticky Options: (none)
3996 ===================================================================
3997 File: file7 Status: Locally Added
3999 Working revision: New file!
4000 Repository revision: No revision control file
4001 Sticky Tag: (none)
4002 Sticky Date: (none)
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
4011 Sticky Tag: (none)
4012 Sticky Date: (none)
4013 Sticky Options: (none)
4015 ===================================================================
4016 File: file7 Status: Locally Added
4018 Working revision: New file!
4019 Repository revision: No revision control file
4020 Sticky Tag: (none)
4021 Sticky Date: (none)
4022 Sticky Options: (none)"
4024 # XXX why is this commented out???
4025 # if ${CVS} diff -u first-dir >> ${LOGFILE} || test $? = 1 ; then
4026 # pass 34
4027 # else
4028 # fail 34
4029 # fi
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
4047 T first-dir/file6
4048 T first-dir/file7
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
4060 cd $i
4062 # modify a file
4063 echo file6 >>file6
4065 # delete a file
4066 rm file7
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
4073 echo file14 >file14
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"
4078 done
4080 cd ../../..
4081 dotest basic2-12 "${testcvs} update first-dir" \
4082 "${SPROG} update: Updating first-dir
4083 A first-dir/file14
4084 M first-dir/file6
4085 R first-dir/file7
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
4102 head: 1\.1
4103 branch:
4104 locks: strict
4105 access list:
4106 symbolic names:
4107 second-dive: 1\.1
4108 keyword substitution: kv
4109 total revisions: 1; selected revisions: 1
4110 description:
4111 ----------------------------
4112 revision 1\.1
4113 date: ${ISO8601DATE}; author: ${username}; state: Exp; commitid: ${commitid};
4114 second dive
4115 =============================================================================
4117 RCS file: ${CVSROOT_DIRNAME}/first-dir/file7,v
4118 Working file: first-dir/file7
4119 head: 1\.1
4120 branch:
4121 locks: strict
4122 access list:
4123 symbolic names:
4124 second-dive: 1\.1
4125 keyword substitution: kv
4126 total revisions: 1; selected revisions: 1
4127 description:
4128 ----------------------------
4129 revision 1\.1
4130 date: ${ISO8601DATE}; author: ${username}; state: Exp; commitid: ${commitid};
4131 second dive
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
4138 head: 1\.1
4139 branch:
4140 locks: strict
4141 access list:
4142 symbolic names:
4143 second-dive: 1\.1
4144 keyword substitution: kv
4145 total revisions: 1; selected revisions: 1
4146 description:
4147 ----------------------------
4148 revision 1\.1
4149 date: ${ISO8601DATE}; author: ${username}; state: Exp; commitid: ${commitid};
4150 second dive
4151 =============================================================================
4153 RCS file: ${CVSROOT_DIRNAME}/first-dir/dir1/file7,v
4154 Working file: first-dir/dir1/file7
4155 head: 1\.1
4156 branch:
4157 locks: strict
4158 access list:
4159 symbolic names:
4160 second-dive: 1\.1
4161 keyword substitution: kv
4162 total revisions: 1; selected revisions: 1
4163 description:
4164 ----------------------------
4165 revision 1\.1
4166 date: ${ISO8601DATE}; author: ${username}; state: Exp; commitid: ${commitid};
4167 second dive
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
4174 head: 1\.1
4175 branch:
4176 locks: strict
4177 access list:
4178 symbolic names:
4179 second-dive: 1\.1
4180 keyword substitution: kv
4181 total revisions: 1; selected revisions: 1
4182 description:
4183 ----------------------------
4184 revision 1\.1
4185 date: ${ISO8601DATE}; author: ${username}; state: Exp; commitid: ${commitid};
4186 second dive
4187 =============================================================================
4189 RCS file: ${CVSROOT_DIRNAME}/first-dir/dir1/dir2/file7,v
4190 Working file: first-dir/dir1/dir2/file7
4191 head: 1\.1
4192 branch:
4193 locks: strict
4194 access list:
4195 symbolic names:
4196 second-dive: 1\.1
4197 keyword substitution: kv
4198 total revisions: 1; selected revisions: 1
4199 description:
4200 ----------------------------
4201 revision 1\.1
4202 date: ${ISO8601DATE}; author: ${username}; state: Exp; commitid: ${commitid};
4203 second dive
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
4213 Sticky Tag: (none)
4214 Sticky Date: (none)
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}
4223 Sticky Tag: (none)
4224 Sticky Date: (none)
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}
4233 Sticky Tag: (none)
4234 Sticky Date: (none)
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
4243 Sticky Tag: (none)
4244 Sticky Date: (none)
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}
4253 Sticky Tag: (none)
4254 Sticky Date: (none)
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}
4263 Sticky Tag: (none)
4264 Sticky Date: (none)
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
4273 Sticky Tag: (none)
4274 Sticky Date: (none)
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}
4283 Sticky Tag: (none)
4284 Sticky Date: (none)
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}
4293 Sticky Tag: (none)
4294 Sticky Date: (none)
4295 Sticky Options: (none)${DOTSTAR}"
4297 # XXX why is this commented out?
4298 # if ${CVS} diff -u first-dir >> ${LOGFILE} || test $? = 1 ; then
4299 # pass 42
4300 # else
4301 # fail 42
4302 # fi
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
4330 T first-dir/file14
4331 T first-dir/file6
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.: "
4343 # end of third dive
4344 dotest_fail basic2-20 "test -d first-dir" ""
4346 # now try some rtags
4348 # rtag HEADS
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
4358 VERS: 1\.2
4359 \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*
4360 file6
4361 file6"
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'"
4369 dotest basic2-21c \
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
4374 VERS: 1\.2
4375 \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*
4376 file6
4377 file6"
4378 modify_repo mv $CVSROOT_DIRNAME/CVSROOT/val-tags.save \
4379 $CVSROOT_DIRNAME/CVSROOT/val-tags
4381 # tag by tag
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"
4387 # tag by revision
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"
4393 # rdiff by revision
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 \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*
4401 \*\*\* 1 \*\*\*\*
4402 --- 1,2 ----
4403 file6
4404 ${PLUS} file6
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 \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*
4410 \*\*\* 1 \*\*\*\*
4411 - file7
4412 --- 0 ----
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 \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*
4419 \*\*\* 1 \*\*\*\*
4420 --- 1,2 ----
4421 file6
4422 ${PLUS} file6
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 \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*
4428 \*\*\* 1 \*\*\*\*
4429 - file7
4430 --- 0 ----
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 \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*
4437 \*\*\* 1 \*\*\*\*
4438 --- 1,2 ----
4439 file6
4440 ${PLUS} file6
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 \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*
4446 \*\*\* 1 \*\*\*\*
4447 - file7
4448 --- 0 ----"
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 \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*
4456 \*\*\* 1 \*\*\*\*
4457 --- 1,2 ----
4458 file6
4459 ${PLUS} file6
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 \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*
4465 \*\*\* 1 \*\*\*\*
4466 - file7
4467 --- 0 ----"
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
4471 U 1dir/file14
4472 U 1dir/file6
4473 ${SPROG} export: Updating 1dir/dir1
4474 U 1dir/dir1/file14
4475 U 1dir/dir1/file6
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
4485 U first-dir/file14
4486 U first-dir/file6
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.
4501 mkdir export-dir
4502 dotest basic2-28 "${testcvs} export -rrtagged-by-revision -d export-dir first-dir" \
4503 "${SPROG} export: Updating export-dir
4504 U export-dir/file14
4505 U export-dir/file6
4506 U export-dir/file7
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
4521 U first-dir/file14
4522 U first-dir/file6
4523 U first-dir/file7
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.
4540 cd export-dir
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
4551 N second-dir/file14
4552 N second-dir/file6
4553 N second-dir/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"
4557 cd ..
4559 dotest basic2-32 "${testcvs} export -r HEAD second-dir" \
4560 "${SPROG} export: Updating second-dir
4561 U second-dir/file14
4562 U second-dir/file6
4563 U second-dir/file7
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"
4575 rm -r second-dir
4577 rm -r export-dir first-dir
4578 mkdir 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.
4582 cd first-dir
4583 dotest basic2-34 "${testcvs} update -A -l *file*" \
4584 "[UP] file6
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 \.
4591 D file14
4592 D file6"
4593 dotest basic2-36 "${testcvs} tag -l rtagged-by-revision" \
4594 "${SPROG} tag: Tagging \.
4595 T file14
4596 T file6"
4598 cd ..
4599 mv first-dir 1dir
4600 mv first-dir.cpy first-dir
4601 cd 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"
4610 cd ..
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>"
4681 dokeep
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.
4691 mkdir ls; cd ls
4692 dotest ls-init-1 "$testcvs -Q co -dtop ."
4693 cd top
4694 dotest ls-1 "$testcvs ls CVSROOT" \
4695 "checkoutlist
4696 commitinfo
4697 config
4698 cvswrappers
4699 loginfo
4700 modules
4701 notify
4702 postadmin
4703 postproxy
4704 posttag
4705 postwatch
4706 preproxy
4707 rcsinfo
4708 taginfo
4709 verifymsg"
4710 dotest ls-2 "$testcvs ls -R" \
4711 "\.:
4712 CVSROOT
4714 CVSROOT:
4715 checkoutlist
4716 commitinfo
4717 config
4718 cvswrappers
4719 loginfo
4720 modules
4721 notify
4722 postadmin
4723 postproxy
4724 posttag
4725 postwatch
4726 preproxy
4727 rcsinfo
4728 taginfo
4729 verifymsg"
4730 # This used to cause a fatal error.
4731 modify_repo mkdir $CVSROOT_DIRNAME/notcheckedout
4732 dotest ls-3 "$testcvs ls -RP" \
4733 "\.:
4734 CVSROOT
4735 notcheckedout
4737 CVSROOT:
4738 checkoutlist
4739 commitinfo
4740 config
4741 cvswrappers
4742 loginfo
4743 modules
4744 notify
4745 postadmin
4746 postproxy
4747 posttag
4748 postwatch
4749 preproxy
4750 rcsinfo
4751 taginfo
4752 verifymsg"
4754 # Make sure the previous command did not create the notcheckedout
4755 # directory.
4756 dotest_fail ls-4 "test -d notcheckedout"
4758 dotest ls-5 "$testcvs ls -R" \
4759 "\.:
4760 CVSROOT
4761 notcheckedout
4763 CVSROOT:
4764 checkoutlist
4765 commitinfo
4766 config
4767 cvswrappers
4768 loginfo
4769 modules
4770 notify
4771 postadmin
4772 postproxy
4773 posttag
4774 postwatch
4775 preproxy
4776 rcsinfo
4777 taginfo
4778 verifymsg
4780 notcheckedout:"
4781 dotest_fail ls-6 "test -d notcheckedout"
4783 # Several test for ls -d, which shows dead revisions
4785 # Set up the dead files
4786 mkdir cemetery
4787 dotest ls-d-init-1 "$testcvs -Q add cemetery"
4788 cd cemetery
4789 touch dead living
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"
4794 rm dead
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"
4798 rm dead
4799 dotest ls-d-init-9 "$testcvs -Q rm dead"
4800 dotest ls-d-init-10 "$testcvs -Q ci -mm dead"
4802 # Possible output
4803 output_living="living"
4804 output_dead="dead
4805 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
4810 # factors:
4812 # + Working directory is on branch or trunk
4813 # + ls or rls
4814 # + implicit branch, explicit trunk, or explicit branch
4815 # + -d present or absent
4817 # Working directory on trunk
4818 $testcvs -Q up -A
4820 ## ls
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"
4830 ## rls
4831 dotest ls-d-7 "$testcvs rls cemetery" \
4832 "$SPROG rls: Listing module: \`cemetery'
4833 $output_living"
4834 dotest ls-d-8 "$testcvs rls -d cemetery" \
4835 "$SPROG rls: Listing module: \`cemetery'
4836 $output_dead"
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
4847 ## ls
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"
4857 ## rls
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
4875 $testcvs -Q up -A
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"
4883 cd ..
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"
4888 cd cemetery
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"
4898 cd ..
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"
4904 cd cemetery
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
4911 touch dated
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
4915 echo mm >> dated
4916 dotest ls-D-init-2 "$testcvs -Q ci -mm dated"
4917 time_predeath=`date '+%Y-%m-%d %H:%M:%S'` ; sleep 1
4918 rm dated
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" \
4927 "/dated/1\.1/.*"
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" \
4931 "/dated/1.2/.*"
4933 dotest ls-D-4 "$testcvs ls -D '$time_postdeath' -e dated"
4935 dokeep
4936 cd ../../..
4937 rm -r ls
4938 modify_repo rm -rf $CVSROOT_DIRNAME/notcheckedout \
4939 $CVSROOT_DIRNAME/cemetery
4940 unset output_living output_dead
4945 parseroot)
4946 mkdir 1; cd 1
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" \
4952 "U 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"
4958 if $remote; then
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'\."
4991 dokeep
4993 # Clean up
4994 CVSROOT=$CVSROOT_save
4995 cd ..
4996 rm -r 1
5001 files)
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.
5009 mkdir 1; cd 1
5010 dotest files-1 "${testcvs} -q co -l ." ""
5011 mkdir first-dir
5012 dotest files-2 "${testcvs} add first-dir" \
5013 "Directory ${CVSROOT_DIRNAME}/first-dir added to the repository"
5014 cd first-dir
5015 touch tfile
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" ""
5024 mkdir dir
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'"
5028 cd dir
5029 touch .file
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"
5033 mkdir sdir
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'"
5037 cd sdir
5038 mkdir ssdir
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'"
5042 cd ssdir
5043 touch .file
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"
5047 cd ../..
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"
5053 dotest files-11 \
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"
5059 if $remote; then
5060 # FIXCVS:
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.
5066 dotest files-12r \
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
5073 # local or remote.
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"
5078 else
5079 dotest files-12 \
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"
5086 dotest files-13 \
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"
5090 dotest files-14 \
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"
5095 dokeep
5096 cd ../../..
5097 rm -r 1
5098 modify_repo rm -rf $CVSROOT_DIRNAME/first-dir
5103 spacefiles)
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).
5109 mkdir 1; cd 1
5110 dotest spacefiles-1 "${testcvs} -q co -l ." ""
5111 touch ./-c
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"
5118 mkdir 'first dir'
5119 dotest spacefiles-4 "${testcvs} add 'first dir'" \
5120 "Directory ${CVSROOT_DIRNAME}/first dir added to the repository"
5121 mkdir ./-b
5122 dotest spacefiles-5 "${testcvs} add -- -b" \
5123 "Directory ${CVSROOT_DIRNAME}/-b added to the repository"
5124 cd 'first dir'
5125 touch 'a file'
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"
5133 cd ../..
5135 mkdir 2; cd 2
5136 dotest spacefiles-10 "${testcvs} co -- -b" \
5137 "${SPROG} checkout: Updating -b"
5138 dotest spacefiles-11 "${testcvs} -q co -- -c" "U \./-c"
5139 rm ./-c
5140 dotest spacefiles-13 "${testcvs} -q co 'first dir'" \
5141 "U first dir/a file"
5142 cd ..
5144 mkdir 3; cd 3
5145 dotest spacefiles-14 "${testcvs} -q co 'first dir/a file'" \
5146 "U first dir/a file"
5147 cd ..
5149 rm -r 1 2 3
5150 modify_repo rm -rf "'$CVSROOT_DIRNAME/first dir'" \
5151 $CVSROOT_DIRNAME/-b $CVSROOT_DIRNAME/-c,v
5156 commit-readonly)
5157 mkdir 1; cd 1
5158 module=x
5160 : > junk
5161 dotest commit-readonly-1 "$testcvs -Q import -m . $module X Y" ''
5162 dotest commit-readonly-2 "$testcvs -Q co $module" ''
5163 cd $module
5165 file=m
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"
5175 echo line2 >> $file
5176 # Make the file read-only.
5177 chmod a-w $file
5179 dotest commit-readonly-5 "$testcvs -Q ci -m . $file"
5181 dokeep
5182 cd ../..
5183 rm -rf 1
5184 modify_repo rm -rf $CVSROOT_DIRNAME/"$module"
5189 status)
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 ."
5194 mkdir first-dir
5195 dotest status-init-2 "${testcvs} add first-dir" \
5196 "Directory ${CVSROOT_DIRNAME}/first-dir added to the repository"
5197 cd first-dir
5198 echo a line >tfile
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"
5205 cd ..
5206 dotest status-init-5 "${testcvs} -q co -dsecond-dir first-dir" \
5207 "U second-dir/tfile"
5208 cd second-dir
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"
5213 cd ../first-dir
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
5222 C 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}
5232 Sticky Tag: (none)
5233 Sticky Date: (none)
5234 Sticky Options: (none)"
5236 # touch the file, leaving conflict markers in place
5237 # and note our status
5238 touch tfile
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}
5246 Sticky Tag: (none)
5247 Sticky Date: (none)
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}
5259 Sticky Tag: (none)
5260 Sticky Date: (none)
5261 Sticky Options: (none)"
5263 # Check that there are no problems just using CVS/Root too.
5264 save_CVSROOT=$CVSROOT
5265 unset 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}
5273 Sticky Tag: (none)
5274 Sticky Date: (none)
5275 Sticky Options: (none)"
5276 CVSROOT=$save_CVSROOT
5277 export CVSROOT
5279 # FIXCVS:
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 :]*//"
5285 cd ..
5286 mkdir fourth-dir
5287 dotest status-init-8 "$testcvs add fourth-dir" \
5288 "Directory $CVSROOT_DIRNAME/fourth-dir added to the repository"
5289 cd fourth-dir
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"
5297 cd ../first-dir
5298 mkdir third-dir
5299 dotest status-init-11 "$testcvs add third-dir" \
5300 "Directory $CVSROOT_DIRNAME/first-dir/third-dir added to the repository"
5301 cd third-dir
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}
5316 Sticky Tag: (none)
5317 Sticky Date: (none)
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}
5326 Sticky Tag: (none)
5327 Sticky Date: (none)
5328 Sticky Options: (none)"
5330 dokeep
5331 cd ../../..
5332 rm -rf status
5333 modify_repo rm -rf $CVSROOT_DIRNAME/first-dir \
5334 $CVSROOT_DIRNAME/fourth-dir
5339 commit-readonlyfs)
5340 mkdir 1; cd 1
5341 module=x
5342 : > junk
5343 dotest commit-readonlyfs-1 "${testcvs} -Q import -m . $module X Y" ''
5344 if $remote; then
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" ''
5348 else
5349 dotest commit-readonlyfs-2 "${testcvs} -Q -R co $module" ''
5350 rm -rf $module
5351 dotest commit-readonlyfs-2r3 "${testcvs} -q -R co $module" \
5352 "U $module/junk"
5353 rm -rf $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
5359 U $module/junk"
5361 cd $module
5362 echo test > junk
5363 if $remote; then
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})"
5366 else
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"
5374 dokeep
5375 cd ../..
5376 rm -rf 1
5377 modify_repo rm -rf $CVSROOT_DIRNAME/"$module"
5382 rdiff)
5383 # Test rdiff
5384 # XXX for now this is just the most essential test...
5385 cd ${TESTDIR}
5387 mkdir testimport
5388 cd testimport
5389 echo '$''Id$' > foo
5390 echo '$''Name$' >> foo
5391 echo '$''Id$' > bar
5392 echo '$''Name$' >> bar
5393 dotest_sort rdiff-1 \
5394 "${testcvs} import -I ! -m test-import-with-keyword trdiff TRDIFF T1" \
5397 N trdiff/bar
5398 N trdiff/foo
5399 No conflicts created by this import'
5400 dotest rdiff-2 \
5401 "${testcvs} co -ko trdiff" \
5402 "${SPROG} checkout: Updating trdiff
5403 U trdiff/bar
5404 U trdiff/foo"
5405 cd trdiff
5406 echo something >> foo
5407 dotest rdiff-3 \
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
5413 dotest rdiff-4 \
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"
5417 dotest rdiff-5 \
5418 "${testcvs} commit -m added-new-file new" \
5419 "${CVSROOT_DIRNAME}/trdiff/new,v <-- new
5420 initial revision: 1\.1"
5421 dotest rdiff-6 \
5422 "${testcvs} tag local-v0" \
5423 "${SPROG} tag: Tagging .
5424 T bar
5425 T foo
5426 T new"
5427 dotest rdiff-7 \
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}
5435 Sticky Tag: (none)
5436 Sticky Date: (none)
5437 Sticky Options: -ko
5439 Existing Tags:
5440 local-v0 (revision: 1\.2)
5441 T1 (revision: 1\.1\.1\.1)
5442 TRDIFF (branch: 1\.1\.1)"
5444 cd ..
5445 rm -r trdiff
5447 dotest rdiff-8 \
5448 "${testcvs} rdiff -r T1 -r local-v0 trdiff" \
5449 "${SPROG}"' rdiff: Diffing trdiff
5450 Index: trdiff/foo
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 \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*
5455 \*\*\* 1,2 \*\*\*\*
5456 ! \$''Id: foo,v 1\.1\.1\.1 [0-9/]* [0-9:]* '"${username}"' Exp \$
5457 ! \$''Name: T1 \$
5458 --- 1,3 ----
5459 ! \$''Id: foo,v 1\.2 [0-9/]* [0-9:]* '"${username}"' Exp \$
5460 ! \$''Name: local-v0 \$
5461 ! something
5462 Index: trdiff/new
5463 diff -c /dev/null trdiff/new:1\.1
5464 \*\*\* /dev/null '"${DATE}"'
5465 --- trdiff/new '"${DATE}"'
5466 \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*
5467 \*\*\* 0 \*\*\*\*
5468 --- 1,2 ----
5469 '"${PLUS}"' #ident "@(#)trdiff:\$''Name: local-v0 \$:\$''Id: new,v 1\.1 [0-9/]* [0-9:]* '"${username}"' Exp \$"
5470 '"${PLUS}"' new file'
5472 dokeep
5473 cd ..
5474 rm -r testimport
5475 modify_repo rm -rf $CVSROOT_DIRNAME/trdiff
5480 rdiff-short)
5481 # Test that the short patch behaves as expected
5482 # 1) Added file.
5483 # 2) Removed file.
5484 # 3) Different revision number with no difference.
5485 # 4) Different revision number with changes.
5486 # 5) Against trunk.
5487 # 6) Same revision number (no difference).
5488 mkdir rdiff-short; cd rdiff-short
5489 mkdir abc
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" ''
5496 cd 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" \
5517 "T file1\.txt"
5518 dotest rdiff-short-init-8 \
5519 "${testcvs} tag -r 1.2 tag2 file1.txt" \
5520 "T file1\.txt"
5521 dotest rdiff-short-init-9 \
5522 "${testcvs} tag -r 1.3 tag3 file1.txt" \
5523 "T 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" \
5535 "T file2\.txt"
5536 dotest rdiff-short-init-13 \
5537 "${testcvs} tag -r 1.1 tag5 file2.txt" \
5538 "T file2\.txt"
5539 cd ../..
5540 rm -fr rdiff-short
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'
5551 # 1) Added file.
5552 # 2) Removed file.
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"
5562 # 5) Against trunk.
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
5579 rdiff2)
5580 # Test for the segv problem reported by James Cribb
5581 # Somewhere to work
5582 mkdir rdiff2; cd rdiff2
5583 # Create a module "m" with files "foo" and "d/bar"
5584 mkdir m; cd m
5585 echo foo >foo
5586 mkdir d
5587 echo bar >d/bar
5588 dotest_sort rdiff2-1 \
5589 "${testcvs} -q import -I ! -m initial-import m vendor initial" \
5592 N m/d/bar
5593 N m/foo
5594 No conflicts created by this import'
5596 cd ..
5597 rm -r m
5599 # Remove "foo"
5600 dotest rdiff2-2 "${testcvs} get m" \
5601 "${SPROG} checkout: Updating m
5602 U m/foo
5603 ${SPROG} checkout: Updating m/d
5604 U m/d/bar"
5605 cd m
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"
5614 # Modify "d/bar"
5615 echo foo >d/bar
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
5624 Index: m/d/bar
5625 diff -c m/d/bar:1\.1\.1\.1 m/d/bar:1\.2
5626 \*\*\* m/d/bar:1\.1\.1\.1 ${DATE}
5627 --- m/d/bar ${DATE}
5628 \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*
5629 \*\*\* 1 \*\*\*\*
5630 ! bar
5631 --- 1 ----
5632 ! foo"
5634 dokeep
5635 cd ../..
5636 rm -rf rdiff2
5637 modify_repo rm -rf $CVSROOT_DIRNAME/m
5642 diff)
5643 # Various tests specific to the "cvs diff" command.
5644 # Related tests:
5645 # death2: -N
5646 # rcslib: cvs diff and $Name.
5647 # rdiff: cvs rdiff.
5648 # diffmerge*: nuts and bolts (stuff within diff library)
5649 mkdir 1; cd 1
5650 dotest diff-1 "$testcvs -q co -l ."
5651 mkdir first-dir
5652 dotest diff-2 "$testcvs add first-dir" \
5653 "Directory $CVSROOT_DIRNAME/first-dir added to the repository"
5654 cd first-dir
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"
5661 touch abc
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" \
5675 "Index: abc
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 \*/"
5686 dokeep
5687 cd ../..
5688 modify_repo rm -rf $CVSROOT_DIRNAME/first-dir
5689 rm -r 1
5694 diffnl)
5695 # Test handling of 'cvs diff' of files without newlines
5696 mkdir 1; cd 1
5697 dotest diffnl-000 "${testcvs} -q co -l ." ''
5698 mkdir first-dir
5699 dotest diffnl-001 "${testcvs} add first-dir" \
5700 "Directory ${CVSROOT_DIRNAME}/first-dir added to the repository"
5701 cd first-dir
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" \
5714 "Index: abc
5715 ===================================================================
5716 RCS file: ${CVSROOT_DIRNAME}/first-dir/abc,v
5717 retrieving revision 1\.1
5718 diff -r1\.1 abc
5720 < five"
5721 dotest_fail diffnl-101 "${testcvs} diff -u abc" \
5722 "Index: abc
5723 ===================================================================
5724 RCS file: ${CVSROOT_DIRNAME}/first-dir/abc,v
5725 retrieving revision 1\.1
5726 diff -u -r1\.1 abc
5727 --- abc ${RFCDATE} 1\.1
5728 +++ abc ${RFCDATE}
5729 @@ -2,5 +2,4 @@
5731 three
5732 four
5733 -five
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" \
5743 "Index: abc
5744 ===================================================================
5745 RCS file: ${CVSROOT_DIRNAME}/first-dir/abc,v
5746 retrieving revision 1\.2
5747 diff -r1\.2 abc
5749 < six
5750 \\\\ No newline at end of file
5752 > seven
5753 \\\\ No newline at end of file"
5754 dotest_fail diffnl-201 "${testcvs} diff -u abc" \
5755 "Index: abc
5756 ===================================================================
5757 RCS file: ${CVSROOT_DIRNAME}/first-dir/abc,v
5758 retrieving revision 1\.2
5759 diff -u -r1\.2 abc
5760 --- abc ${RFCDATE} 1\.2
5761 +++ abc ${RFCDATE}
5762 @@ -2,4 +2,4 @@
5764 three
5765 four
5766 -six
5767 \\\\ No newline at end of file
5768 +seven
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
5775 echo "one
5777 three
5778 four
5779 seven" > abc
5780 dotest_fail diffnl-300 "${testcvs} diff abc" \
5781 "Index: abc
5782 ===================================================================
5783 RCS file: ${CVSROOT_DIRNAME}/first-dir/abc,v
5784 retrieving revision 1\.3
5785 diff -r1\.3 abc
5787 < seven
5788 \\\\ No newline at end of file
5790 > seven"
5791 dotest_fail diffnl-301 "${testcvs} diff -u abc" \
5792 "Index: abc
5793 ===================================================================
5794 RCS file: ${CVSROOT_DIRNAME}/first-dir/abc,v
5795 retrieving revision 1\.3
5796 diff -u -r1\.3 abc
5797 --- abc ${RFCDATE} 1\.3
5798 +++ abc ${RFCDATE}
5799 @@ -2,4 +2,4 @@
5801 three
5802 four
5803 -seven
5804 \\\\ No newline at end of file
5805 +seven"
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" \
5813 "Index: abc
5814 ===================================================================
5815 RCS file: ${CVSROOT_DIRNAME}/first-dir/abc,v
5816 retrieving revision 1\.4
5817 diff -r1\.4 abc
5819 < seven
5821 > seven
5822 \\\\ No newline at end of file"
5823 dotest_fail diffnl-401 "${testcvs} diff -u abc" \
5824 "Index: abc
5825 ===================================================================
5826 RCS file: ${CVSROOT_DIRNAME}/first-dir/abc,v
5827 retrieving revision 1\.4
5828 diff -u -r1\.4 abc
5829 --- abc ${RFCDATE} 1\.4
5830 +++ abc ${RFCDATE}
5831 @@ -2,4 +2,4 @@
5833 three
5834 four
5835 -seven
5836 +seven
5837 \\\\ No newline at end of file"
5839 dokeep
5840 cd ../..
5841 rm -r 1
5842 modify_repo rm -rf $CVSROOT_DIRNAME/first-dir
5847 death)
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"
5858 cd first-dir
5860 # Create a directory with only dead files, to make sure CVS
5861 # doesn't get confused by it.
5862 mkdir subdir
5863 dotest 65a0 "${testcvs} add subdir" \
5864 "Directory ${CVSROOT_DIRNAME}/first-dir/subdir added to the repository"
5865 cd subdir
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"
5873 rm sfile
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"
5880 cd ..
5881 dotest 65a5 "${testcvs} -q update -P" ''
5882 dotest_fail 65a6 "test -d subdir" ''
5884 # add a file.
5885 touch file1
5886 if ${CVS} add file1 2>> ${LOGFILE}; then
5887 pass 66
5888 else
5889 fail 66
5892 # commit
5893 if ${CVS} ci -m test >> ${LOGFILE} 2>&1; then
5894 pass 67
5895 else
5896 fail 67
5899 # remove
5900 rm file1
5901 if ${CVS} rm file1 2>> ${LOGFILE}; then
5902 pass 68
5903 else
5904 fail 68
5907 # commit
5908 if ${CVS} ci -m test >>${LOGFILE} ; then
5909 pass 69
5910 else
5911 fail 69
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
5917 pass 69a1
5918 else
5919 fail 69a1
5921 dotest 69a2 "cat file1" ''
5923 # create second file
5924 touch file2
5925 if ${CVS} add file1 file2 2>> ${LOGFILE}; then
5926 pass 70
5927 else
5928 fail 70
5931 # commit
5932 if ${CVS} ci -m test >> ${LOGFILE} 2>&1; then
5933 pass 71
5934 else
5935 fail 71
5938 # log
5939 if ${CVS} log file1 >> ${LOGFILE}; then
5940 pass 72
5941 else
5942 fail 72
5945 # file4 will be dead at the time of branching and stay dead.
5946 echo file4 > file4
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"
5953 rm file4
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
5963 T file2'
5965 # branch1
5966 if ${CVS} tag -b branch1 ; then
5967 pass 73
5968 else
5969 fail 73
5972 # and move to the branch.
5973 if ${CVS} update -r branch1 ; then
5974 pass 74
5975 else
5976 fail 74
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
5984 pass 75
5985 else
5986 fail 75
5989 # commit
5990 if ${CVS} ci -m test >> ${LOGFILE} 2>&1; then
5991 pass 76
5992 else
5993 fail 76
5996 dotest death-76a0 \
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 \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*
6003 \*\*\* 0 \*\*\*\*
6004 --- 1 ----
6005 ${PLUS} line1 from branch1"
6006 dotest death-76a1 \
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 \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*
6013 \*\*\* 1 \*\*\*\*
6014 - line1 from branch1
6015 --- 0 ----"
6017 # remove
6018 rm file3
6019 if ${CVS} rm file3 2>> ${LOGFILE}; then
6020 pass 77
6021 else
6022 fail 77
6025 # commit
6026 if ${CVS} ci -m test >>${LOGFILE} ; then
6027 pass 78
6028 else
6029 fail 78
6032 # add again
6033 echo line1 from branch1 >> file3
6034 if ${CVS} add file3 2>> ${LOGFILE}; then
6035 pass 79
6036 else
6037 fail 79
6040 # commit
6041 if ${CVS} ci -m test >> ${LOGFILE} 2>&1; then
6042 pass 80
6043 else
6044 fail 80
6047 # change the first file
6048 echo line2 from branch1 >> file1
6050 # commit
6051 if ${CVS} ci -m test >> ${LOGFILE} 2>&1; then
6052 pass 81
6053 else
6054 fail 81
6057 # remove the second
6058 rm file2
6059 if ${CVS} rm file2 2>> ${LOGFILE}; then
6060 pass 82
6061 else
6062 fail 82
6065 # commit
6066 if ${CVS} ci -m test >>${LOGFILE}; then
6067 pass 83
6068 else
6069 fail 83
6072 # back to the trunk.
6073 if ${CVS} update -A 2>> ${LOGFILE}; then
6074 pass 84
6075 else
6076 fail 84
6079 dotest_fail death-file4-4 "test -f file4" ''
6081 if test -f file3 ; then
6082 fail 85
6083 else
6084 pass 85
6087 # join
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
6094 U file3"
6096 dotest_fail death-file4-5 "test -f file4" ''
6098 if test -f file3 ; then
6099 pass 87
6100 else
6101 fail 87
6104 # Make sure that we joined the correct change to file1
6105 if echo line2 from branch1 | cmp - file1 >/dev/null; then
6106 pass 87a
6107 else
6108 fail 87a
6111 # update
6112 if ${CVS} update ; then
6113 pass 88
6114 else
6115 fail 88
6118 # commit
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"
6126 cd ..
6127 mkdir 2
6128 cd 2
6129 dotest 89a "${testcvs} -q co first-dir" 'U first-dir/file1
6130 U first-dir/file3'
6131 cd ..
6132 rm -r 2
6133 cd first-dir
6135 # remove first file.
6136 rm file1
6137 if ${CVS} rm file1 2>> ${LOGFILE}; then
6138 pass 90
6139 else
6140 fail 90
6143 # commit
6144 if ${CVS} ci -m test >>${LOGFILE}; then
6145 pass 91
6146 else
6147 fail 91
6150 if test -f file1 ; then
6151 fail 92
6152 else
6153 pass 92
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
6161 fail 92.1b
6162 else
6163 pass 92.1b
6165 if test -f file3 ; then
6166 pass 92.1c
6167 else
6168 fail 92.1c
6171 # back to branch1
6172 if ${CVS} update -r branch1 2>> ${LOGFILE}; then
6173 pass 93
6174 else
6175 fail 93
6178 dotest_fail death-file4-6 "test -f file4" ''
6180 if test -f file1 ; then
6181 pass 94
6182 else
6183 fail 94
6186 # and join
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" ''
6200 dokeep
6201 cd ..
6202 rm -r first-dir
6203 modify_repo rm -rf $CVSROOT_DIRNAME/first-dir
6208 death2)
6209 # More tests of death support.
6210 modify_repo mkdir $CVSROOT_DIRNAME/first-dir
6211 dotest death2-1 "$testcvs -q co first-dir"
6213 cd 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" \
6231 'T file1
6232 T file4'
6233 dotest death2-5 "${testcvs} -q tag tag" \
6234 'T file1
6235 T file4'
6237 # Switch over to the branch.
6238 dotest death2-6 "${testcvs} -q update -r branch" ''
6240 # Delete the file on the branch.
6241 rm file1
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" \
6251 "Index: file1
6252 ===================================================================
6253 RCS file: file1
6254 diff -N file1
6255 \*\*\* file1 ${RFCDATE} [0-9.]*
6256 --- /dev/null ${RFCDATE_EPOCH}
6257 \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*
6258 \*\*\* 1 \*\*\*\*
6259 - first revision
6260 --- 0 ----"
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}"
6271 # and in reverse
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" \
6279 "Index: file1
6280 ===================================================================
6281 RCS file: file1
6282 diff -N file1
6283 \*\*\* file1 ${RFCDATE} [0-9.]*
6284 --- /dev/null ${RFCDATE_EPOCH}
6285 \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*
6286 \*\*\* 1 \*\*\*\*
6287 - first revision
6288 --- 0 ----"
6289 # and in reverse
6290 dotest_fail death2-diff-4a \
6291 "${testcvs} -q diff -rbranch -r1.1 -N -c file1" \
6292 "Index: file1
6293 ===================================================================
6294 RCS file: file1
6295 diff -N file1
6296 \*\*\* /dev/null ${RFCDATE_EPOCH}
6297 --- file1 ${RFCDATE} [0-9.]*
6298 \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*
6299 \*\*\* 0 \*\*\*\*
6300 --- 1 ----
6301 + first revision"
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 ." \
6308 "Index: file1
6309 ===================================================================
6310 RCS file: file1
6311 diff -N file1
6312 \*\*\* file1 [-a-zA-Z0-9: ]* [0-9.]*
6313 --- /dev/null ${RFCDATE_EPOCH}
6314 \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*
6315 \*\*\* 1 \*\*\*\*
6316 - first revision
6317 --- 0 ----"
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 \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*
6329 \*\*\* 1 \*\*\*\*
6330 - first revision
6331 --- 0 ----"
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" \
6344 "Index: file1
6345 ===================================================================
6346 RCS file: file1
6347 diff -N file1
6348 \*\*\* /dev/null ${RFCDATE_EPOCH}
6349 --- file1 ${RFCDATE}
6350 \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*
6351 \*\*\* 0 \*\*\*\*
6352 --- 1 ----
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" \
6369 "[UP] file1
6370 U file4"
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
6390 # this case.
6391 dotest death2-14 "${testcvs} -q update -r branch" \
6392 "[UP] file1
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" \
6419 "Index: file3
6420 ===================================================================
6421 RCS file: file3
6422 diff -N file3
6423 \*\*\* /dev/null ${RFCDATE_EPOCH}
6424 --- file3 ${RFCDATE} [0-9.]*
6425 \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*
6426 \*\*\* 0 \*\*\*\*
6427 --- 1 ----
6428 ${PLUS} first revision"
6430 dotest_fail death2-diff-11 "${testcvs} -q diff -rtag -c ." \
6431 "Index: file1
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 \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*
6440 \*\*\* 1 \*\*\*\*
6441 ! first revision
6442 --- 1 ----
6443 ! second revision
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 ." \
6449 "Index: file1
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 \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*
6458 \*\*\* 1 \*\*\*\*
6459 ! first revision
6460 --- 1 ----
6461 ! second revision
6462 Index: file2
6463 ===================================================================
6464 RCS file: file2
6465 diff -N file2
6466 \*\*\* /dev/null ${RFCDATE_EPOCH}
6467 --- file2 ${RFCDATE} [0-9.]*
6468 \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*
6469 \*\*\* 0 \*\*\*\*
6470 --- 1 ----
6471 ${PLUS} branch revision
6472 Index: file3
6473 ===================================================================
6474 RCS file: file3
6475 diff -N file3
6476 \*\*\* /dev/null ${RFCDATE_EPOCH}
6477 --- file3 ${RFCDATE} [0-9.]*
6478 \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*
6479 \*\*\* 0 \*\*\*\*
6480 --- 1 ----
6481 ${PLUS} first revision
6482 Index: file4
6483 ===================================================================
6484 RCS file: file4
6485 diff -N file4
6486 \*\*\* file4 ${RFCDATE} [0-9.]*
6487 --- /dev/null ${RFCDATE_EPOCH}
6488 \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*
6489 \*\*\* 1 \*\*\*\*
6490 - file4 first revision
6491 --- 0 ----"
6493 # Switch to the nonbranch tag.
6494 dotest death2-19 "${testcvs} -q update -r tag" \
6495 "[UP] file1
6496 ${SPROG} update: \`file2' is no longer in the repository
6497 ${SPROG} update: \`file3' is no longer in the repository
6498 U file4"
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" \
6508 "Index: file1
6509 ===================================================================
6510 RCS file: file1
6511 diff -N file1
6512 \*\*\* /dev/null ${RFCDATE_EPOCH}
6513 --- file1 ${RFCDATE} [0-9.]*
6514 \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*
6515 \*\*\* 0 \*\*\*\*
6516 --- 1 ----
6517 ${PLUS} first revision"
6519 # now back to the trunk
6520 dotest death2-21 "${testcvs} -q update -A" \
6521 "U file2
6522 [UP] file4"
6524 # test merging with a dead file
6525 dotest death2-22 "${testcvs} -q co first-dir" \
6526 "U first-dir/file1
6527 U first-dir/file2
6528 U first-dir/file4"
6530 cd 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"
6537 cd ..
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
6541 C file4"
6543 dokeep
6544 cd ..
6545 rm -r first-dir
6546 modify_repo rm -rf $CVSROOT_DIRNAME/first-dir
6551 rm-update-message)
6552 # FIXME
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
6559 file=x
6560 echo >$file
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"
6567 rm $file
6568 dotest rm-update-message-1 "$testcvs up $file" \
6569 "${SPROG} update: warning: \`$file' was lost
6570 U $file"
6572 dokeep
6573 cd ../..
6574 rm -r rm-update-message
6575 modify_repo rm -rf $CVSROOT_DIRNAME/rm-update-message
6580 rmadd)
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.
6589 mkdir 1; cd 1
6590 dotest rmadd-1 "$testcvs -q co -l ."
6591 mkdir first-dir
6592 dotest rmadd-2 "${testcvs} add first-dir" \
6593 "Directory ${CVSROOT_DIRNAME}/first-dir added to the repository"
6594 cd first-dir
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"
6615 if $remote; then
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"
6620 echo T7 >CVS/Tag
6621 else
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"
6628 touch file2
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.
6633 # Or something.
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" ""
6643 touch file3
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"
6656 touch file4
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" \
6673 "first file1"
6674 # Oops, -p suppresses writing val-tags (probably a questionable
6675 # behavior).
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"
6681 fi # !$proxy
6683 # Oops - CVS isn't distinguishing between a branch tag and
6684 # a non-branch tag.
6685 dotest rmadd-21 \
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.
6692 echo file5 >file5
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"
6696 if $remote; then
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"
6707 else
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}
6729 Sticky Tag: 8\.4
6730 Sticky Date: (none)
6731 Sticky Options: (none)"
6733 # now try forced revision with recursion
6734 mkdir sub
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"
6745 # lose the branch
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"
6770 if $remote; then
6771 # as noted above, remote doesn't set a sticky tag
6773 else
6774 dotest rmadd-32 "cat CVS/Tag" "T9"
6775 dotest rmadd-33 "cat sub/CVS/Tag" "T9"
6778 dokeep
6779 cd ../..
6780 rm -r 1
6781 modify_repo rm -rf $CVSROOT_DIRNAME/first-dir
6786 rmadd2)
6787 # Tests of undoing commits, including in the presence of
6788 # adding and removing files. See join for a list of -j tests.
6789 mkdir 1; cd 1
6790 dotest rmadd2-1 "${testcvs} -q co -l ." ''
6791 mkdir first-dir
6792 dotest rmadd2-2 "${testcvs} add first-dir" \
6793 "Directory ${CVSROOT_DIRNAME}/first-dir added to the repository"
6794 cd first-dir
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
6829 # the head.
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
6843 Working file: file1
6844 head: 1\.6
6845 branch:
6846 locks: strict
6847 access list:
6848 symbolic names:
6849 tagone: 1\.1
6850 keyword substitution: kv
6851 total revisions: 6
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}
6861 Existing Tags:
6862 tagone (revision: 1.1)"
6864 dokeep
6865 cd ../..
6866 rm -r 1
6867 modify_repo rm -rf $CVSROOT_DIRNAME/first-dir
6872 rmadd3)
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
6884 # the add.
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.
6889 mkdir 1; cd 1
6890 dotest rmadd3-init1 "${testcvs} -q co -l ." ''
6891 mkdir first-dir
6892 dotest rmadd3-init2 "${testcvs} add first-dir" \
6893 "Directory ${CVSROOT_DIRNAME}/first-dir added to the repository"
6894 cd first-dir
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"
6925 if $keep; then
6926 echo Keeping ${TESTDIR} and exiting due to --keep
6927 exit 0
6930 dokeep
6931 cd ../..
6932 rm -r 1
6933 modify_repo rm -rf $CVSROOT_DIRNAME/first-dir
6938 resurrection)
6939 # This test tests a few file resurrection scenarios.
6940 mkdir 1; cd 1
6941 dotest resurrection-init1 "$testcvs -q co -l ." ''
6942 mkdir first-dir
6943 dotest resurrection-init2 "$testcvs add first-dir" \
6944 "Directory $CVSROOT_DIRNAME/first-dir added to the repository"
6945 cd first-dir
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" \
6960 "U 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" \
6970 "U 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
6984 # branch.
6985 dotest_sort resurrection-6 "$testcvs -r add file1" \
6986 "U 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.
7001 touch file2
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" \
7013 "U file1
7014 $SPROG add: \`file1', version 1\.3, resurrected"
7015 dotest_fail resurrection-15 'test -w file1' ''
7017 dokeep
7018 cd ../..
7019 rm -rf 1
7020 modify_repo rm -rf $CVSROOT_DIRNAME/first-dir
7025 dirs)
7026 # Tests related to removing and adding directories.
7027 # See also:
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
7034 # in the directory.
7035 # dirs2. Sort of similar to conflicts3-22 but somewhat different.
7036 mkdir imp-dir; cd imp-dir
7037 echo file1 >file1
7038 mkdir sdir
7039 echo sfile >sdir/sfile
7040 dotest_sort dirs-1 \
7041 "${testcvs} import -m import-it dir1 vend rel" "
7043 N dir1/file1
7044 N dir1/sdir/sfile
7045 No conflicts created by this import
7046 ${SPROG} import: Importing ${CVSROOT_DIRNAME}/dir1/sdir"
7047 cd ..
7049 mkdir 1; cd 1
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
7057 # behavior.
7058 modify_repo rm -rf $CVSROOT_DIRNAME/dir1/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...
7082 rm -r dir1/sdir
7084 dotest dirs-5 "cat dir1/CVS/Entries" \
7085 "/file1/1.1.1.1/[a-zA-Z0-9 :]*//
7086 D/sdir////"
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 :]*//
7090 D/sdir////"
7091 dotest dirs-8 "${testcvs} update -d dir1" \
7092 "${SPROG} update: Updating dir1"
7094 dokeep
7095 cd ..
7096 rm -r imp-dir 1
7097 modify_repo rm -rf $CVSROOT_DIRNAME/dir1
7102 dirs2)
7103 # See "dirs" for a list of tests involving adding and
7104 # removing directories.
7105 mkdir 1; cd 1
7106 dotest dirs2-1 "$testcvs -q co -l ."
7107 mkdir first-dir
7108 dotest dirs2-2 "${testcvs} add first-dir" \
7109 "Directory ${CVSROOT_DIRNAME}/first-dir added to the repository"
7110 cd first-dir
7111 mkdir sdir
7112 dotest dirs2-3 "${testcvs} add sdir" \
7113 "Directory ${CVSROOT_DIRNAME}/first-dir/sdir added to the repository"
7114 touch sdir/file1
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"
7121 rm -r sdir/CVS
7122 if $remote; then
7123 # This is just like conflicts3-23
7124 dotest_fail dirs2-6r "${testcvs} update -d" \
7125 "${QUESTION} sdir
7126 ${SPROG} update: Updating \.
7127 ${SPROG} update: Updating sdir
7128 ${CPROG} update: move away \`sdir/file1'; it is in the way
7129 C sdir/file1"
7130 rm sdir/file1
7131 rm -r sdir/CVS
7133 # This is where things are not just like conflicts3-23
7134 dotest dirs2-7r "${testcvs} update -d" \
7135 "${QUESTION} sdir
7136 ${SPROG} update: Updating \.
7137 ${SPROG} update: Updating sdir
7138 U sdir/file1"
7139 else
7140 dotest dirs2-6 "${testcvs} update -d" \
7141 "${CPROG} update: Updating \.
7142 ${QUESTION} sdir"
7143 rm sdir/file1
7144 dotest dirs2-7 "${testcvs} update -d" \
7145 "${CPROG} update: Updating \.
7146 ${QUESTION} sdir"
7148 cd ../..
7150 # Now, the same thing (more or less) on a branch.
7151 mkdir 2; cd 2
7152 dotest dirs2-8 "${testcvs} -q co first-dir" 'U first-dir/sdir/file1'
7153 cd first-dir
7154 dotest dirs2-9 "${testcvs} -q tag -b br" "T sdir/file1"
7155 rm -r sdir/CVS
7157 if $remote; then
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" \
7162 "$QUESTION sdir
7163 $SPROG update: Updating \.
7164 $SPROG update: Updating sdir
7165 $CPROG update: move away \`sdir/file1'; it is in the way
7166 C sdir/file1"
7167 else
7168 dotest dirs2-10 "${testcvs} update -d -r br" \
7169 "$SPROG update: Updating \.
7170 $QUESTION sdir"
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"
7177 cd ../..
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.
7184 mkdir 3; cd 3
7185 dotest dirs2-11 "${testcvs} -q co -r br first-dir" \
7186 "U first-dir/sdir/file1"
7187 cd first-dir
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
7197 if $remote; then
7198 dotest dirs2-14 "${testcvs} update -d -r br" \
7199 "${QUESTION} sdir/file1
7200 ${SPROG} update: Updating \.
7201 ${SPROG} update: Updating sdir"
7202 else
7203 dotest dirs2-14 "${testcvs} update -d -r br" \
7204 "${CPROG} update: Updating \.
7205 ${QUESTION} sdir"
7208 dokeep
7209 cd ../..
7210 rm -r 1 2 3
7211 modify_repo rm -rf $CVSROOT_DIRNAME/first-dir
7216 branches)
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"
7220 cd 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
7241 HERE
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" \
7249 "T file1
7250 T file2
7251 T file3
7252 T file4"
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.
7256 echo 1:br1 >file1
7257 dotest branches-4 "${testcvs} tag -b br1" "${SPROG}"' tag: Tagging \.
7258 T file1
7259 T file2
7260 T file3
7261 T file4'
7262 dotest branches-5 "${testcvs} update -r br1" \
7263 "${SPROG} update: Updating \.
7264 M file1"
7265 echo 2:br1 >file2
7266 echo 4:br1 >file4
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
7275 T file2
7276 T file3
7277 T file4'
7278 dotest branches-8 "${testcvs} -q update -r brbr" ''
7279 echo 1:brbr >file1
7280 echo 4:brbr >file4
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
7287 2:br1
7288 3:ancest
7289 4:brbr'
7290 dotest branches-11 "${testcvs} -q update -r br1" \
7291 '[UP] file1
7292 [UP] file4'
7293 dotest branches-12 "cat file1 file2 file3 file4" '1:br1
7294 2:br1
7295 3:ancest
7296 4:br1'
7297 echo 4:br1-2 >file4
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
7302 [UP] file2
7303 [UP] file4'
7304 dotest branches-14 "cat file1 file2 file3 file4" '1:ancest
7305 2:ancest
7306 3:ancest
7307 4:trunk-2'
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
7316 Working file: file4
7317 head: 1\.3
7318 branch:
7319 locks: strict
7320 access list:
7321 symbolic names:
7322 brbr: 1\.2\.2\.1\.0\.2
7323 br1: 1\.2\.0\.2
7324 keyword substitution: kv
7325 total revisions: 6; selected revisions: 6
7326 description:
7327 ----------------------------
7328 revision 1\.3
7329 date: ${ISO8601DATE}; author: ${username}; state: Exp; lines: ${PLUS}1 -1; commitid: ${commitid};
7330 trunk-change-after-branch
7331 ----------------------------
7332 revision 1\.2
7333 date: ${ISO8601DATE}; author: ${username}; state: Exp; lines: ${PLUS}1 -1; commitid: ${commitid};
7334 branches: 1\.2\.2;
7335 trunk-before-branch
7336 ----------------------------
7337 revision 1\.1
7338 date: ${ISO8601DATE}; author: ${username}; state: Exp; commitid: ${commitid};
7339 add-it
7340 ----------------------------
7341 revision 1\.2\.2\.2
7342 date: ${ISO8601DATE}; author: ${username}; state: Exp; lines: ${PLUS}1 -1; commitid: ${commitid};
7343 change-on-br1
7344 ----------------------------
7345 revision 1\.2\.2\.1
7346 date: ${ISO8601DATE}; author: ${username}; state: Exp; lines: ${PLUS}1 -1; commitid: ${commitid};
7347 branches: 1\.2\.2\.1\.2;
7348 modify
7349 ----------------------------
7350 revision 1\.2\.2\.1\.2\.1
7351 date: ${ISO8601DATE}; author: ${username}; state: Exp; lines: ${PLUS}1 -1; commitid: ${commitid};
7352 modify
7353 ============================================================================="
7354 dotest_fail branches-14.4 \
7355 "${testcvs} diff -c -r 1.1 -r 1.3 file4" \
7356 "Index: 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 \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*
7365 \*\*\* 1 \*\*\*\*
7366 ! 4:trunk-1
7367 --- 1 ----
7368 ! 4:trunk-3"
7369 dotest_fail branches-14.5 \
7370 "${testcvs} diff -c -r 1.1 -r 1.2.2.1 file4" \
7371 "Index: 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 \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*
7380 \*\*\* 1 \*\*\*\*
7381 ! 4:trunk-1
7382 --- 1 ----
7383 ! 4:br1"
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
7392 1:ancest
7393 [=]======
7394 1:brbr
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
7399 done
7400 RCS file: ${CVSROOT_DIRNAME}/first-dir/file2,v
7401 done
7402 RCS file: ${CVSROOT_DIRNAME}/first-dir/file3,v
7403 done
7404 RCS file: ${CVSROOT_DIRNAME}/first-dir/file4,v
7405 done"
7407 dokeep
7408 cd ..
7409 modify_repo rm -rf $CVSROOT_DIRNAME/first-dir
7410 rm -r first-dir
7415 branches2)
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
7420 # as well.
7422 modify_repo mkdir $CVSROOT_DIRNAME/first-dir
7423 mkdir trunk; cd trunk
7425 # Create a file.
7426 dotest branches2-1 "${testcvs} -q co first-dir"
7427 cd 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"
7436 # Tag the file.
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.
7444 cd ../..
7445 mkdir b1; cd b1
7446 dotest branches2-7 "${testcvs} -q co -r b1 first-dir" \
7447 "U first-dir/file1"
7448 cd 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'
7453 mkdir dir1
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" > dir1/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.
7470 cd ../..
7471 mkdir b2; cd b2
7472 dotest branches2-12 "${testcvs} -q co -r b2 first-dir" \
7473 'U first-dir/file1'
7474 cd first-dir
7475 dotest branches2-13 "${testcvs} update -d -r b1 dir1" \
7476 "${SPROG} update: Updating dir1
7477 U dir1/file3"
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)
7486 Sticky Date: (none)
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)
7496 Sticky Date: (none)
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: \`.'
7503 CVSROOT
7504 first-dir"
7505 dotest branches2-14-rls-2 "$testcvs rls -R" \
7506 "$SPROG rls: Listing module: \`.'
7508 CVSROOT
7509 first-dir
7511 CVSROOT:
7512 checkoutlist
7513 commitinfo
7514 config
7515 cvswrappers
7516 loginfo
7517 modules
7518 notify
7519 postadmin
7520 postproxy
7521 posttag
7522 postwatch
7523 preproxy
7524 rcsinfo
7525 taginfo
7526 verifymsg
7527 Emptydir
7529 CVSROOT/Emptydir:
7531 first-dir:
7532 file1
7533 dir1
7535 first-dir/dir1:"
7536 dotest branches2-14-rls-3 "$testcvs rls -l -R" \
7537 "$SPROG rls: Listing module: \`.'
7539 d--- $ISO8601DATE CVSROOT
7540 d--- $ISO8601DATE first-dir
7542 CVSROOT:
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
7560 CVSROOT/Emptydir:
7562 first-dir:
7563 ---- $ISO8601DATE 1\.1 file1
7564 d--- $ISO8601DATE dir1
7566 first-dir/dir1:"
7567 dotest branches2-14-rls-4 "$testcvs rls -eR" \
7568 "$SPROG rls: Listing module: \`.'
7570 D/CVSROOT////
7571 D/first-dir////
7573 CVSROOT:
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//
7589 D/Emptydir////
7591 CVSROOT/Emptydir:
7593 first-dir:
7594 /file1/1\.1/$DATE//
7595 D/dir1////
7597 first-dir/dir1:"
7598 dotest branches2-14-rls-5 "$testcvs -q rls -R" \
7599 "\.:
7600 CVSROOT
7601 first-dir
7603 CVSROOT:
7604 checkoutlist
7605 commitinfo
7606 config
7607 cvswrappers
7608 loginfo
7609 modules
7610 notify
7611 postadmin
7612 postproxy
7613 posttag
7614 postwatch
7615 preproxy
7616 rcsinfo
7617 taginfo
7618 verifymsg
7619 Emptydir
7621 CVSROOT/Emptydir:
7623 first-dir:
7624 file1
7625 dir1
7627 first-dir/dir1:"
7628 dotest branches2-14-rls-6 "$testcvs -q rls -lRrb1" \
7629 "\.:
7630 d--- $ISO8601DATE CVSROOT
7631 d--- $ISO8601DATE first-dir
7633 CVSROOT:
7634 d--- $ISO8601DATE Emptydir
7636 CVSROOT/Emptydir:
7638 first-dir:
7639 ---- $ISO8601DATE 1\.1 file1
7640 ---- $ISO8601DATE 1\.1\.2\.1 file2
7641 d--- $ISO8601DATE dir1
7643 first-dir/dir1:
7644 ---- $ISO8601DATE 1\.1\.2\.1 file3"
7645 dotest branches2-14-rls-7 "$testcvs -q rls -lRrb2" \
7646 "\.:
7647 d--- $ISO8601DATE CVSROOT
7648 d--- $ISO8601DATE first-dir
7650 CVSROOT:
7651 d--- $ISO8601DATE Emptydir
7653 CVSROOT/Emptydir:
7655 first-dir:
7656 ---- $ISO8601DATE 1\.1 file1
7657 d--- $ISO8601DATE dir1
7659 first-dir/dir1:"
7661 # Now some calls to ls. These are more appropriate here.
7662 dotest branches2-14-ls-1 "$testcvs ls" \
7663 "file1
7664 dir1"
7665 dotest branches2-14-ls-2 "$testcvs ls -e" \
7666 "/file1/1\.1/$DATE//
7667 D/dir1////"
7668 dotest branches2-14-ls-3 "$testcvs ls -R" \
7669 "\.:
7670 file1
7671 dir1
7673 dir1:
7674 file3"
7675 dotest branches2-14-ls-4 "$testcvs ls -eRrHEAD" \
7676 "\.:
7677 /file1/1\.1/$DATE//THEAD
7678 D/dir1////
7680 dir1:"
7681 dotest branches2-14-ls-5 "$testcvs ls -eRrb1" \
7682 "\.:
7683 /file1/1\.1/$DATE//Tb1
7684 /file2/1\.1\.2\.1/$DATE//Tb1
7685 D/dir1////
7687 dir1:
7688 /file3/1\.1\.2\.1/$DATE//Tb1"
7689 dotest branches2-14-ls-6 "$testcvs ls -eRrb2" \
7690 "\.:
7691 /file1/1.1/$DATE//Tb2
7692 D/dir1////
7694 dir1:"
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
7702 # below as well.
7703 rm -r dir1
7704 dotest branches2-15 "${testcvs} update -d -j b1 dir1" \
7705 "${SPROG} update: Updating dir1
7706 U dir1/file3"
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
7710 # should be nicer.
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)
7719 Sticky Date: (none)
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!
7728 Sticky Date: (none)
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
7737 U dir1/file3"
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}
7745 Sticky Tag: (none)
7746 Sticky Date: (none)
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)
7756 Sticky Date: (none)
7757 Sticky Options: (none)"
7759 rm -r dir1
7760 dotest branches2-21 "${testcvs} update -d -P -j b1 dir1" \
7761 "${SPROG} update: Updating dir1
7762 U dir1/file3"
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}
7770 Sticky Tag: (none)
7771 Sticky Date: (none)
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}
7780 Sticky Tag: (none)
7781 Sticky Date: (none)
7782 Sticky Options: (none)"
7784 cd ../..
7785 rm -r b1 b2
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.
7790 mkdir b1a
7791 mkdir b1b
7792 cd b1b
7793 dotest branches2-23 "${testcvs} -q co -r b1 first-dir" \
7794 'U first-dir/file1
7795 U first-dir/file2
7796 U first-dir/dir1/file3'
7797 cd ../b1a
7798 dotest branches2-24 "${testcvs} -q co -r b1 first-dir" \
7799 'U first-dir/file1
7800 U first-dir/file2
7801 U first-dir/dir1/file3'
7802 cd first-dir
7803 mkdir dir2
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" > dir2/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
7818 U dir2/file4"
7819 cd 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)
7828 Sticky Date: (none)
7829 Sticky Options: (none)"
7830 dotest branches2-30 "cat CVS/Tag" 'Tb1'
7832 # Test update -A on a subdirectory
7833 cd ..
7834 rm -r dir2
7835 dotest branches2-31 "${testcvs} update -A -d dir2" \
7836 "${SPROG} update: Updating dir2"
7837 cd 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'
7852 cd dir2
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}
7860 Sticky Tag: (none)
7861 Sticky Date: (none)
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'
7867 first-dir:
7868 ---- $ISO8601DATE 1\.1 file1
7869 ---- $ISO8601DATE 1\.1\.2\.1 file2
7870 d--- $ISO8601DATE dir1
7871 d--- $ISO8601DATE dir2
7873 first-dir/dir1:
7874 ---- $ISO8601DATE 1\.1\.2\.1 file3
7876 first-dir/dir2:
7877 ---- $ISO8601DATE 1\.1\.2\.1 file4"
7879 dokeep
7880 cd ../../..
7881 modify_repo rm -rf $CVSROOT_DIRNAME/first-dir
7882 rm -r trunk b1a b1b
7887 branches3)
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
7896 # the server?
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"
7903 cd 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
7919 Working file: file1
7920 head: 1\.1
7921 branch:
7922 locks: strict
7923 access list:
7924 symbolic names:
7925 tag1: 1\.1\.0\.1000
7926 keyword substitution: kv
7927 total revisions: 1; selected revisions: 1
7928 description:
7929 ----------------------------
7930 revision 1.1
7931 date: ${ISO8601DATE}; author: ${username}; state: Exp; commitid: ${commitid};
7933 ============================================================================="
7935 dokeep
7936 cd ../..
7937 modify_repo rm -rf $CVSROOT_DIRNAME/first-dir
7938 rm -r branches3
7939 fi # !$remotehost
7944 branches4)
7945 # test where a tag is a branch tag in some files and a revision
7946 # tag in others
7948 modify_repo mkdir $CVSROOT_DIRNAME/first-dir
7949 mkdir branches4; cd branches4
7951 dotest branches4-1 "$testcvs -q co first-dir"
7952 cd 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" \
7973 "T versions/file1
7974 T versions/file2
7975 T versions/file3
7976 T versions/file4
7977 T mixed/file1
7978 T mixed/file3
7979 T mixed2/file1
7980 T mixed2/file3"
7982 dotest branches4-5 "${testcvs} -q tag -b xxx branches/file* mixed*/file2 mixed*/file4" \
7983 "T branches/file1
7984 T branches/file2
7985 T branches/file3
7986 T branches/file4
7987 T mixed/file2
7988 T mixed/file4
7989 T mixed2/file2
7990 T mixed2/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"
8020 dokeep
8021 cd ../..
8022 modify_repo rm -rf $CVSROOT_DIRNAME/first-dir
8023 rm -r branches4
8028 tagc)
8029 # Test the tag -c option.
8030 mkdir 1; cd 1
8031 dotest tagc-1 "${testcvs} -q co -l ." ''
8032 mkdir first-dir
8033 dotest tagc-2 "${testcvs} add first-dir" \
8034 "Directory ${CVSROOT_DIRNAME}/first-dir added to the repository"
8035 cd first-dir
8036 touch file1 file2
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" \
8047 "T file1
8048 T file2"
8049 touch file1 file2
8050 dotest tagc-6 "${testcvs} -q tag -c tag2" \
8051 "T file1
8052 T file2"
8053 # Avoid timestamp granularity bugs (FIXME: CVS should be
8054 # doing the sleep, right?).
8055 sleep 1
8056 echo myedit >>file1
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"
8060 touch file3
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!"
8069 cd ../..
8070 mkdir 2
8071 cd 2
8072 dotest tagc-8 "${testcvs} -q co first-dir" \
8073 "U first-dir/file1
8074 U first-dir/file2"
8075 cd ../1/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
8086 T file1
8087 T file2"
8089 dokeep
8090 cd ../..
8091 rm -r 1 2
8092 modify_repo rm -rf $CVSROOT_DIRNAME/first-dir
8097 update-p)
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.
8101 mkdir 1; cd 1
8102 module=x
8104 echo > unused-file
8106 # Create the module.
8107 dotest update-p-1 \
8108 "$testcvs -Q import -m. $module X Y" ''
8110 file=F
8111 # Check it out and tag it.
8112 dotest update-p-2 "$testcvs -Q co $module" ''
8113 cd $module
8114 dotest update-p-3 "$testcvs -Q tag -b B" ''
8115 echo v1 > $file
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 "===================================================================
8129 Checking out $file
8130 RCS: ${CVSROOT_DIRNAME}/$module/$file,v
8131 VERS: 1\.1
8132 \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*
8135 # Repeat the above, but with $file removed.
8136 # This exercises a slightly different code path.
8137 rm $file
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 "===================================================================
8143 Checking out $file
8144 RCS: ${CVSROOT_DIRNAME}/$module/$file,v
8145 VERS: 1\.1
8146 \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*
8149 # Exercise yet another code path:
8150 # the one that involves reviving a `dead' file.
8151 # And a little more, for good measure...
8152 touch new
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 \.
8165 U $file"
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
8171 echo v2 > $file
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
8179 dokeep
8180 cd ../..
8181 rm -rf 1
8182 modify_repo rm -rf $CVSROOT_DIRNAME/$module
8187 tagf)
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
8192 mkdir 1; cd 1
8193 dotest tagf-1 "${testcvs} -q co -l ." ''
8194 mkdir first-dir
8195 dotest tagf-2 "${testcvs} add first-dir" \
8196 "Directory ${CVSROOT_DIRNAME}/first-dir added to the repository"
8197 cd first-dir
8198 touch file1 file2
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
8211 T file2"
8212 dotest tagf-6 "${testcvs} -q update -r br" ""
8213 echo brmod >> file1
8214 echo brmod >> file2
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
8230 T file2"
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)
8241 Sticky Date: (none)
8242 Sticky Options: (none)
8244 Existing Tags:
8245 br (revision: 1\.1\.2\.1)"
8247 # Now, how do we recover?
8248 dotest tagf-10 "${testcvs} -q tag -d br" "D file1
8249 D file2"
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
8252 # skip that number.
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
8257 done"
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
8268 C file1
8269 M file2"
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
8272 # "M file1".
8273 dotest tagf-14 "cat file1" \
8274 "<<<<<<< file1
8275 brmod
8276 moremod
8277 [=]======
8278 [>]>>>>>> 1\.1"
8279 echo resolve >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" \
8333 "T 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 \.
8344 U file1
8345 U file2"
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" \
8357 "T 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
8366 # file1 and file2
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"
8381 dokeep
8382 cd ../..
8383 rm -r 1
8384 modify_repo rm -rf $CVSROOT_DIRNAME/first-dir
8389 tag-space)
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
8396 mkdir 1; cd 1
8397 dotest tag-space-init-1 "$testcvs -q co -l ."
8398 mkdir first-dir
8399 dotest tag-space-init-2 "$testcvs add first-dir" \
8400 "Directory $CVSROOT_DIRNAME/first-dir added to the repository"
8401 cd first-dir
8402 touch file1
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"
8414 if $remote; then
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
8418 error " <<EOF
8419 Root $CVSROOT_DIRNAME
8420 UseUnchanged
8421 Argument --
8422 Argument spacetag
8423 Directory .
8424 $CVSROOT_DIRNAME/first-dir
8425 Entry /file1/1.1///
8426 Unchanged file1
8430 dotest tag-space-4 "$testcvs server" \
8431 "E $SPROG \[tag aborted\]: tag \`spacetag ' has non-visible graphic characters
8432 error " <<EOF
8433 Root $CVSROOT_DIRNAME
8434 UseUnchanged
8435 Argument --
8436 Argument spacetag
8437 Directory .
8438 $CVSROOT_DIRNAME/first-dir
8439 Entry /file1/1.1///
8440 Unchanged file1
8443 fi # $remote
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"
8450 cd ../..
8451 mkdir 2; cd 2
8453 # But once a vendor branch exists, it's all over.
8454 mkdir project; cd project
8455 touch file1
8456 dotest tag-space-init-4 \
8457 "$testcvs -Q import -mimport second-dir VENDOR RELEASE"
8459 cd ..
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"
8469 if $remote; then
8470 # I based the client input in the next two tests on actual input
8471 # from WinCVS 1.2.
8472 dotest tag-space-8 "$testcvs server" \
8473 "E $SPROG \[checkout aborted\]: tag \` spacetag ' must start with a letter
8474 error " <<EOF
8475 Root $CVSROOT_DIRNAME
8476 Argument -P
8477 Argument -r
8478 Argument spacetag
8479 Argument first-dir
8480 Directory .
8481 $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
8488 error " <<EOF
8489 Root $CVSROOT_DIRNAME
8490 Argument -P
8491 Argument -r
8492 Argument spacetag
8493 Argument second-dir
8494 Directory .
8495 $CVSROOT_DIRNAME
8498 fi # $remote
8500 dotest tag-space-10 "$testcvs -Q co second-dir"
8501 cd 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"
8507 if $remote; then
8508 dotest tag-space-12 "$testcvs server" \
8509 "E $SPROG \[update aborted\]: tag \` spacetag ' must start with a letter
8510 error " <<EOF
8511 Root $CVSROOT_DIRNAME
8512 Argument -r
8513 Argument spacetag
8514 Argument -u
8515 Argument --
8516 Directory .
8517 $CVSROOT_DIRNAME
8518 Unchanged file1
8519 update
8521 fi # $remote
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.
8527 if $keep; then
8528 echo Keeping $TESTDIR and exiting due to --keep
8529 exit 0
8532 cd ../..
8533 rm -r 1 2
8534 modify_repo rm -rf $CVSROOT_DIRNAME/first-dir \
8535 $CVSROOT_DIRNAME/second-dir
8540 rcslib)
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" ''
8549 cd 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 "===================================================================
8560 Checking out foo\.c
8561 RCS: ${CVSROOT_DIRNAME}/first-dir/foo\.c,v
8562 VERS: 1\.1
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 "===================================================================
8573 Checking out foo\.c
8574 RCS: ${CVSROOT_DIRNAME}/first-dir/foo\.c,v
8575 VERS: 1\.2
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 \.
8581 Index: foo\.c
8582 ===================================================================
8583 RCS file: ${CVSROOT_DIRNAME}/first-dir/foo\.c,v
8584 retrieving revision 1\.1
8585 retrieving revision 1\.2
8586 diff -r1\.1 -r1\.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 \.
8595 Index: foo\.c
8596 ===================================================================
8597 RCS file: ${CVSROOT_DIRNAME}/first-dir/foo\.c,v
8598 retrieving revision 1\.1
8599 diff -r1\.1 foo\.c
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.
8611 cat >rgx.c <<EOF
8612 test_regex (whiz, bang)
8614 foo;
8615 bar;
8616 baz;
8617 grumble;
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"
8626 cat >rgx.c <<EOF
8627 test_regex (whiz, bang)
8629 foo;
8630 bar;
8631 baz;
8632 mumble;
8635 # Use dotest_fail because exit status from `cvs diff' must be 1.
8637 # Incidentally test that CVS no longer splits diff arguments on
8638 # spaces.
8639 dotest_fail rcslib-diffrgx-3 "$testcvs diff -c -F'.* (' rgx.c" \
8640 "Index: 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)
8648 \*\*\* 3,7 \*\*\*\*
8649 foo;
8650 bar;
8651 baz;
8652 ! grumble;
8654 --- 3,7 ----
8655 foo;
8656 bar;
8657 baz;
8658 ! mumble;
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.
8666 cd ..
8668 modify_repo rm -rf $CVSROOT_DIRNAME/first-dir
8669 rm -r first-dir
8671 mkdir 1; cd 1
8672 dotest rcslib-merge-1 "$testcvs -q co -l ."
8673 mkdir first-dir
8674 dotest rcslib-merge-2 "$testcvs -q add first-dir" \
8675 "Directory $CVSROOT_DIRNAME.*/first-dir added to the repository"
8676 cd ..; rm -r 1
8678 dotest rcslib-merge-3 "$testcvs -q co first-dir" ""
8679 cd first-dir
8681 echo '$''Revision$' > file1
8682 echo '2' >> file1
8683 echo '3' >> 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)
8703 Sticky Date: (none)
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" \
8714 "U file1
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" \
8721 "<<<<<<< file1
8722 1\.1\.2\.1
8724 three
8725 [=]======
8726 1\.2
8729 [>]>>>>>> 1\.2"
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
8736 # UNIX side.
8737 modify_repo $CVS_RSH $remotehost "'ln -s file1,v $CVSROOT_DIRNAME/first-dir/file2,v'"
8738 else
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"
8751 else
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.
8758 rm file1
8759 dotest rcslib-symlink-3a "${testcvs} -q up file1" \
8760 "${SPROG} update: warning: \`file1' was lost
8761 U file1"
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'"
8776 else
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'"
8790 else
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 .
8803 T file1
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"
8809 else
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.
8815 cd ..
8816 mkdir 2; cd 2
8817 dotest rcslib-symlink-7 "$testcvs -q co first-dir" \
8818 "U first-dir/file1
8819 U first-dir/file2"
8820 cd 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"
8851 cd ../.. # $TESTDIR
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
8856 count=0
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
8862 done
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'
8870 else
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
8877 U second-dir/fileX"
8879 cd 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"
8887 dokeep
8888 cd ..
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
8911 multibranch)
8912 # Test the ability to have several branchpoints coming off the
8913 # same revision.
8914 modify_repo mkdir $CVSROOT_DIRNAME/first-dir
8915 dotest multibranch-1 "${testcvs} -q co first-dir" ''
8916 cd 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
8924 HERE
8925 dotest multibranch-4 "${testcvs} tag -b br1" \
8926 "${SPROG} tag: Tagging \.
8927 T file1"
8928 dotest multibranch-5 "${testcvs} tag -b br2" \
8929 "${SPROG} tag: Tagging \.
8930 T file1"
8931 dotest multibranch-6 "${testcvs} -q update -r br1" ''
8932 echo on-br1 >file1
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
8945 br2 adds a line'
8947 dotest multibranch-14 "${testcvs} log file1" \
8949 RCS file: ${CVSROOT_DIRNAME}/first-dir/file1,v
8950 Working file: file1
8951 head: 1\.1
8952 branch:
8953 locks: strict
8954 access list:
8955 symbolic names:
8956 br2: 1\.1\.0\.4
8957 br1: 1\.1\.0\.2
8958 keyword substitution: kv
8959 total revisions: 3; selected revisions: 3
8960 description:
8961 ----------------------------
8962 revision 1\.1
8963 date: ${ISO8601DATE}; author: ${username}; state: Exp; commitid: ${commitid};
8964 branches: 1\.1\.2; 1\.1\.4;
8965 add-it
8966 ----------------------------
8967 revision 1\.1\.4\.1
8968 date: ${ISO8601DATE}; author: ${username}; state: Exp; lines: ${PLUS}1 -0; commitid: ${commitid};
8969 modify-on-br2
8970 ----------------------------
8971 revision 1\.1\.2\.1
8972 date: ${ISO8601DATE}; author: ${username}; state: Exp; lines: ${PLUS}1 -1; commitid: ${commitid};
8973 modify-on-br1
8974 ============================================================================="
8976 dokeep
8977 cd ..
8978 modify_repo rm -rf $CVSROOT_DIRNAME/first-dir
8979 rm -r first-dir
8984 import) # test death after import
8985 # Tests of "cvs import":
8986 # basic2
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
8993 # flag
8994 # modules3
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.
9004 # import
9005 mkdir import-dir ; cd import-dir
9007 for i in 1 2 3 4 ; do
9008 echo imported file"$i" > imported-f"$i"
9009 done
9011 # This directory should be on the default ignore list,
9012 # so it shouldn't get imported.
9013 mkdir RCS
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" \
9023 I first-dir/RCS
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" ''
9032 cd ..
9034 # co
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"
9041 cd first-dir
9043 for i in 1 2 3 4 ; do
9044 dotest import-98-$i "test -f imported-f$i" ''
9045 done
9046 dotest_fail import-98.5 "test -d RCS" ''
9048 # remove
9049 rm imported-f1
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'
9054 # change
9055 echo local-change >> imported-f2
9057 # commit
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"
9065 # log
9066 dotest import-101 "${testcvs} log imported-f1" \
9068 RCS file: ${CVSROOT_DIRNAME}/first-dir/Attic/imported-f1,v
9069 Working file: imported-f1
9070 head: 1\.2
9071 branch:
9072 locks: strict
9073 access list:
9074 symbolic names:
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
9079 description:
9080 ----------------------------
9081 revision 1\.2
9082 date: ${ISO8601DATE}; author: ${username}; state: dead; lines: ${PLUS}0 -0; commitid: ${commitid};
9083 local-changes
9084 ----------------------------
9085 revision 1\.1
9086 date: ${ISO8601DATE}; author: ${username}; state: Exp; commitid: ${commitid};
9087 branches: 1\.1\.1;
9088 Initial revision
9089 ----------------------------
9090 revision 1\.1\.1\.1
9091 date: ${ISO8601DATE}; author: ${username}; state: Exp; lines: ${PLUS}0 -0; commitid: ${commitid};
9092 first-import
9093 ============================================================================="
9095 # update into the vendor branch.
9096 dotest import-102 "${testcvs} update -rvendor-branch" \
9097 "${SPROG} update: Updating .
9098 [UP] imported-f1
9099 [UP] imported-f2"
9101 # remove file4 on the vendor branch
9102 rm imported-f4
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'
9107 # commit
9108 dotest import-104 \
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
9116 [UP] imported-f2"
9118 # second import - file4 deliberately unchanged
9119 cd ../import-dir
9120 for i in 1 2 3 ; do
9121 echo rev 2 of file $i >> imported-f"$i"
9122 done
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
9134 I first-dir/RCS
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" \
9142 cd ..
9144 rm imported-f2-orig.tmp
9146 # co
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"
9152 cd first-dir
9154 dotest_fail import-108 "test -f imported-f1" ''
9156 for i in 2 3 ; do
9157 dotest import-109-$i "test -f imported-f$i" ''
9158 done
9160 # check vendor branch for file4
9161 dotest import-110 "${testcvs} -q update -rvendor-branch" \
9162 "[UP] imported-f1
9163 [UP] imported-f2"
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
9170 [UP] imported-f2"
9172 cd ..
9174 dotest import-113 \
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"
9185 cd first-dir
9187 dotest_fail import-114 "test -f imported-f1" ''
9189 for i in 2 3 ; do
9190 dotest import-115-$i "test -f imported-f$i" ''
9191 done
9193 dotest import-116 'cat imported-f2' \
9194 'imported file2
9195 [<]<<<<<< imported-f2
9196 import should not expand \$''Id: imported-f2,v 1\.2 [0-9/]* [0-9:]* '"${username}"' Exp \$
9197 local-change
9198 [=]======
9199 import should not expand \$''Id: imported-f2,v 1\.1\.1\.2 [0-9/]* [0-9:]* '"${username}"' Exp \$
9200 rev 2 of file 2
9201 [>]>>>>>> 1\.1\.1\.2'
9203 dokeep
9204 cd ..
9205 rm -r first-dir
9206 modify_repo rm -rf $CVSROOT_DIRNAME/first-dir
9207 rm -r import-dir
9212 importb)
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.
9217 mkdir imp-dir
9218 cd imp-dir
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" \
9225 N first-dir/file1
9226 N first-dir/file2
9227 No conflicts created by this import"
9228 cd ..
9229 rm -r imp-dir
9231 # Now we put the sources we get from FreeMunger into 1.1.3
9232 mkdir imp-dir
9233 cd imp-dir
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.
9248 C first-dir/file1
9249 C first-dir/file2
9250 Use the following command to help the merge:"
9251 cd ..
9252 rm -r imp-dir
9254 # Now a test of main branch import (into second-dir, not first-dir).
9255 mkdir imp-dir
9256 cd imp-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"
9268 cd ..
9269 rm -r imp-dir
9271 mkdir 1
9272 cd 1
9273 # when we implement main branch import, will want to
9274 # add "second-dir" here.
9275 dotest importb-4 "${testcvs} -q co first-dir" \
9276 "U first-dir/file1
9277 U first-dir/file2"
9278 cd first-dir
9279 dotest importb-5 "${testcvs} -q log file1" "
9280 RCS file: ${CVSROOT_DIRNAME}/first-dir/file1,v
9281 Working file: file1
9282 head: 1\.1
9283 branch: 1\.1\.1
9284 locks: strict
9285 access list:
9286 symbolic names:
9287 freemunger-1_0: 1\.1\.3\.1
9288 freemunger: 1\.1\.3
9289 openmunger-1_0: 1\.1\.1\.1
9290 openmunger: 1\.1\.1
9291 keyword substitution: kv
9292 total revisions: 3; selected revisions: 3
9293 description:
9294 ----------------------------
9295 revision 1\.1
9296 date: ${ISO8601DATE}; author: ${username}; state: Exp; commitid: ${commitid};
9297 branches: 1\.1\.1; 1\.1\.3;
9298 Initial revision
9299 ----------------------------
9300 revision 1\.1\.3\.1
9301 date: ${ISO8601DATE}; author: ${username}; state: Exp; lines: ${PLUS}1 -1; commitid: ${commitid};
9303 ----------------------------
9304 revision 1\.1\.1\.1
9305 date: ${ISO8601DATE}; author: ${username}; state: Exp; lines: ${PLUS}0 -0; commitid: ${commitid};
9307 ============================================================================="
9309 dokeep
9310 cd ../..
9311 rm -r 1
9312 modify_repo rm -rf $CVSROOT_DIRNAME/first-dir \
9313 $CVSROOT_DIRNAME/second-dir
9318 importc)
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.
9323 save_TZ=$TZ
9324 TZ=UTC0; export TZ
9326 mkdir 1; cd 1
9327 mkdir adir bdir cdir
9328 mkdir adir/sub1 adir/sub2
9329 mkdir adir/sub1/ssdir
9330 mkdir bdir/subdir
9331 touch adir/sub1/file1 adir/sub2/file2 adir/sub1/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"
9351 cd ..
9352 mkdir 2; cd 2
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"
9359 cd first-dir
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
9369 dotest importc-5 \
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
9379 # an existing file.
9380 dotest importc-8 "${testcvs} -q log cdir/cfile" "
9381 RCS file: ${CVSROOT_DIRNAME}/first-dir/cdir/cfile,v
9382 Working file: cdir/cfile
9383 head: 1\.1
9384 branch: 1\.1\.1
9385 locks: strict
9386 access list:
9387 symbolic names:
9388 wip_test: 1\.1\.1\.1\.0\.2
9389 release: 1\.1\.1\.1
9390 vendor: 1\.1\.1
9391 keyword substitution: kv
9392 total revisions: 3; selected revisions: 3
9393 description:
9394 ----------------------------
9395 revision 1\.1
9396 date: ${ISO8601DATE2034}; author: ${username}; state: Exp; commitid: ${commitid};
9397 branches: 1\.1\.1;
9398 Initial revision
9399 ----------------------------
9400 revision 1\.1\.1\.1
9401 date: ${ISO8601DATE2034}; author: ${username}; state: Exp; lines: ${PLUS}0 -0; commitid: ${commitid};
9402 branches: 1\.1\.1\.1\.2;
9403 import-it
9404 ----------------------------
9405 revision 1\.1\.1\.1\.2\.1
9406 date: ${ISO8601DATE}; author: ${username}; state: Exp; lines: ${PLUS}1 -0; commitid: ${commitid};
9407 modify
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
9413 head: 1\.1
9414 branch: 1\.1\.1
9415 locks: strict
9416 access list:
9417 symbolic names:
9418 wip_test: 1\.1\.1\.1\.0\.2
9419 release: 1\.1\.1\.1
9420 vendor: 1\.1\.1
9421 keyword substitution: kv
9422 total revisions: 2; selected revisions: 2
9423 description:
9424 ----------------------------
9425 revision 1\.1
9426 date: ${ISO8601DATE1971}; author: ${username}; state: Exp; commitid: ${commitid};
9427 branches: 1\.1\.1;
9428 Initial revision
9429 ----------------------------
9430 revision 1\.1\.1\.1
9431 date: ${ISO8601DATE1971}; author: ${username}; state: Exp; lines: ${PLUS}0 -0; commitid: ${commitid};
9432 import-it
9433 ============================================================================="
9434 cd ..
9436 # Now tests of absolute pathnames and .. as repository directory.
9437 cd ../1
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" ""
9446 dokeep
9447 TZ=$save_TZ
9448 cd ..
9449 rm -r 1 2
9450 modify_repo rm -rf $CVSROOT_DIRNAME/first-dir
9455 importX)
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
9461 # with -X.)
9462 mkdir imp-dir
9463 cd imp-dir
9464 echo 'Munger sources 0.9' >file0
9465 dotest_sort importX-1 \
9466 "${testcvs} import -m add first-dir munger munger-0_9" \
9469 N first-dir/file0
9470 No conflicts created by this import"
9471 cd ..
9472 rm -r imp-dir
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.)
9477 mkdir imp-dir
9478 cd imp-dir
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
9488 N first-dir/file1
9489 N first-dir/file2
9490 No conflicts created by this import.
9491 U first-dir/file0
9492 Use the following command to help the merge:"
9493 cd ..
9494 rm -r imp-dir
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.)
9500 mkdir imp-dir
9501 cd imp-dir
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.
9513 C first-dir/file1
9514 N first-dir/file3
9515 U first-dir/file0
9516 U first-dir/file2
9517 Use the following command to help the merge:"
9518 cd ..
9519 rm -r imp-dir
9521 mkdir 1
9522 cd 1
9523 # only file0 should be checked out
9524 dotest importX-4 "${testcvs} -q co first-dir" \
9525 "U first-dir/file0"
9526 cd first-dir
9528 dotest importX-5 "${testcvs} -q log file0" "
9529 RCS file: ${CVSROOT_DIRNAME}/first-dir/file0,v
9530 Working file: file0
9531 head: 1\.1
9532 branch: 1\.1\.1
9533 locks: strict
9534 access list:
9535 symbolic names:
9536 munger-1_1: 1\.1\.1\.2
9537 munger-1_0: 1\.1\.1\.2
9538 munger-0_9: 1\.1\.1\.1
9539 munger: 1\.1\.1
9540 keyword substitution: kv
9541 total revisions: 3; selected revisions: 3
9542 description:
9543 ----------------------------
9544 revision 1\.1
9545 date: ${ISO8601DATE}; author: ${username}; state: Exp; commitid: ${commitid};
9546 branches: 1\.1\.1;
9547 Initial revision
9548 ----------------------------
9549 revision 1\.1\.1\.2
9550 date: ${ISO8601DATE}; author: ${username}; state: Exp; lines: ${PLUS}1 -1; commitid: ${commitid};
9552 ----------------------------
9553 revision 1\.1\.1\.1
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
9560 Working file: file1
9561 head: 1\.2
9562 branch:
9563 locks: strict
9564 access list:
9565 symbolic names:
9566 munger-1_1: 1\.1\.1\.2
9567 munger-1_0: 1\.1\.1\.1
9568 munger: 1\.1\.1
9569 keyword substitution: kv
9570 total revisions: 4; selected revisions: 4
9571 description:
9572 ----------------------------
9573 revision 1\.2
9574 date: ${ISO8601DATE}; author: ${username}; state: dead; lines: ${PLUS}0 -0; commitid: ${commitid};
9575 Revision 1\.1 was added on the vendor branch\.
9576 ----------------------------
9577 revision 1\.1
9578 date: ${ISO8601DATE}; author: ${username}; state: Exp; commitid: ${commitid};
9579 branches: 1\.1\.1;
9580 Initial revision
9581 ----------------------------
9582 revision 1\.1\.1\.2
9583 date: ${ISO8601DATE}; author: ${username}; state: Exp; lines: ${PLUS}1 -1; commitid: ${commitid};
9585 ----------------------------
9586 revision 1\.1\.1\.1
9587 date: ${ISO8601DATE}; author: ${username}; state: Exp; lines: ${PLUS}0 -0; commitid: ${commitid};
9589 ============================================================================="
9591 cd ../..
9592 rm -r 1
9593 modify_repo rm -rf ${CVSROOT_DIRNAME}/first-dir
9598 importX2)
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.
9603 mkdir wnt
9604 cd wnt
9606 dotest importX2-1 "${testcvs} -q co CVSROOT" "[UP] CVSROOT${DOTSTAR}"
9607 cd CVSROOT
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"
9615 cd ../..
9617 # Import a sources file, but do NOT specify -X. The new file
9618 # should be killed, anyway (because of the config option).
9619 mkdir imp-dir
9620 cd imp-dir
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
9628 N first-dir/file1
9629 No conflicts created by this import.
9630 Use the following command to help the merge:"
9631 cd ..
9632 rm -r imp-dir
9634 mkdir 1
9635 cd 1
9636 # **nothing** should be checked out**
9637 dotest importX2-4 "${testcvs} -q co first-dir" ""
9639 cd first-dir
9640 dotest importX2-5 "${testcvs} -q log file1" "
9641 RCS file: ${CVSROOT_DIRNAME}/first-dir/Attic/file1,v
9642 Working file: file1
9643 head: 1\.2
9644 branch:
9645 locks: strict
9646 access list:
9647 symbolic names:
9648 source-1_0: 1\.1\.1\.1
9649 source: 1\.1\.1
9650 keyword substitution: kv
9651 total revisions: 3; selected revisions: 3
9652 description:
9653 ----------------------------
9654 revision 1\.2
9655 date: ${ISO8601DATE}; author: ${username}; state: dead; lines: ${PLUS}0 -0; commitid: ${commitid};
9656 Revision 1\.1 was added on the vendor branch\.
9657 ----------------------------
9658 revision 1\.1
9659 date: ${ISO8601DATE}; author: ${username}; state: Exp; commitid: ${commitid};
9660 branches: 1\.1\.1;
9661 Initial revision
9662 ----------------------------
9663 revision 1\.1\.1\.1
9664 date: ${ISO8601DATE}; author: ${username}; state: Exp; lines: ${PLUS}0 -0; commitid: ${commitid};
9666 ============================================================================="
9668 dokeep
9669 cd ../..
9670 restore_adm
9671 rm -r 1
9672 rm -r wnt
9673 modify_repo rm -rf $CVSROOT_DIRNAME/first-dir
9678 import-CVS)
9679 mkdir import-CVS
9680 cd import-CVS
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\."
9685 mkdir sdir
9686 mkdir sdir/CVS
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
9696 N import-CVS/file1
9697 N import-CVS/file2
9698 N import-CVS/file3
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"
9704 dokeep
9705 cd ..
9706 rm -r import-CVS
9707 modify_repo rm -rf $CVSROOT_DIRNAME/import-CVS
9712 import-quirks)
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.
9717 mkdir import-quirks
9718 cd import-quirks
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"
9762 dokeep
9763 cd ..
9764 rm -r import-quirks
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.
9780 mkdir 1; cd 1
9781 module=x
9783 echo > unused-file
9785 # Create the module.
9786 dotest import-after-initial-1 \
9787 "$testcvs -Q import -m. $module X Y" ''
9789 file=m
9790 # Check it out and add a file.
9791 dotest import-after-initial-2 "$testcvs -Q co $module" ''
9792 cd $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.
9799 sleep 2
9801 # Do the first import of $file *after* $file already has an
9802 # initial version.
9803 mkdir sub
9804 cd sub
9805 echo newer-via-import > $file
9806 dotest import-after-initial-5 \
9807 "$testcvs -Q import -m. $module X Y2" ''
9808 cd ..
9810 # Sleep a second so we're sure to be after the second of the import.
9811 sleep 1
9813 dotest import-after-initial-6 \
9814 "$testcvs -Q update -p -D now $file" 'original'
9816 dokeep
9817 cd ../..
9818 rm -rf 1
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.
9835 mkdir imp-dir
9836 cd imp-dir
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" \
9843 N first-dir/file1
9844 N first-dir/file2
9845 No conflicts created by this import'
9846 cd ..
9848 # Next checkout the new module
9849 dotest branch-after-import-2 \
9850 "${testcvs} -q co first-dir" \
9851 'U first-dir/file1
9852 U first-dir/file2'
9853 cd 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
9857 # resolution.
9858 dotest branch-after-import-3 \
9859 "${testcvs} tag -b TESTTOTRON file1" \
9860 'T 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"
9876 dokeep
9877 cd ../..
9878 rm -r branch-after-import
9879 modify_repo rm -rf $CVSROOT_DIRNAME/first-dir
9884 join)
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
9897 # topology:
9899 # --->bp---->trunk too many to mention
9900 # \----->branch
9902 # /----->branch1
9903 # --->bp---->trunk multibranch, multibranch2
9904 # \----->branch2
9906 # --->bp1----->bp2---->trunk join3
9907 # \->br1 \->br2
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.
9918 # Conflict.
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.
9933 # Conflict.
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.
9942 # Conflict.
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.
9946 # Conflict.
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.
9956 # Conflict.
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
9961 # lists.
9963 modify_repo mkdir $CVSROOT_DIRNAME/first-dir
9964 mkdir 1
9965 cd 1
9966 dotest join-1 "$testcvs -q co first-dir"
9968 cd first-dir
9970 # Add two files.
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"
9996 # Make a branch.
9997 dotest join-4 "${testcvs} -q tag -b branch ." \
9998 'T file3
9999 T file4
10000 T file6
10001 T file8
10002 T file9'
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"
10037 # Remove file10
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.
10046 cd ../..
10047 mkdir 2
10048 cd 2
10049 dotest join-8 "${testcvs} -q co -r branch first-dir" \
10050 'U first-dir/file3
10051 U first-dir/file4
10052 U first-dir/file6
10053 U first-dir/file8
10054 U first-dir/file9'
10056 cd 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 ." \
10082 'T file3
10083 T file4
10084 T file5
10085 T file6
10086 T file8
10087 T file9'
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 ." \
10122 'T file1
10123 T file2
10124 T file8
10125 T file9'
10127 # Do a checkout with a merge.
10128 cd ../..
10129 mkdir 3
10130 cd 3
10131 dotest join-16 "${testcvs} -q co -jT1 -jT2 first-dir" \
10132 "U first-dir/file1
10133 U first-dir/file2
10134 ${SPROG} checkout: file first-dir/file2 exists, but has been added in revision T2
10135 U first-dir/file3
10136 ${SPROG} checkout: scheduling \`first-dir/file3' for removal
10137 U first-dir/file4
10138 ${SPROG} checkout: scheduling \`first-dir/file4' for removal
10139 U first-dir/file7
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.
10143 cd first-dir
10144 dotest join-17 "${testcvs} -q update" \
10145 'A file1
10146 R file3
10147 R file4'
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 ." \
10153 "U file1
10154 $SPROG update: file file2 exists, but has been added in revision T2
10155 $SPROG update: scheduling \`file3' for removal
10156 M file4
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" \
10162 'A file1
10163 R file3
10164 M file4'
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
10176 # on branches.
10177 cd ../../3
10178 rm -r first-dir
10179 dotest join-20 "${testcvs} -q co -jbranch first-dir" \
10180 "U first-dir/file1
10181 U first-dir/file2
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
10186 U first-dir/file3
10187 ${SPROG} checkout: scheduling \`first-dir/file3' for removal
10188 U first-dir/file4
10189 ${SPROG} checkout: file first-dir/file4 has been modified, but has been removed in revision branch
10190 U first-dir/file7
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.
10195 cd first-dir
10196 dotest join-21 "${testcvs} -q update" \
10197 'A file1
10198 M file2
10199 R file3'
10201 # Checkout the main line again.
10202 cd ../../1
10203 rm -r first-dir
10204 dotest join-22 "${testcvs} -q co first-dir" \
10205 'U first-dir/file2
10206 U first-dir/file3
10207 U first-dir/file4
10208 U first-dir/file7'
10210 # Modify file4 locally, and do an update with a merge from a
10211 # single revision.
10212 # The file2 handling is a bug; see above join-20.
10213 cd first-dir
10214 echo 'third revision of file4' > file4
10215 dotest join-23 "${testcvs} -q update -jbranch ." \
10216 "U file1
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
10222 M file4
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" \
10229 'A file1
10230 M file2
10231 R file3
10232 M file4'
10234 cd ..
10236 # Checkout the main line again and make a new branch which we
10237 # merge to.
10238 rm -r first-dir
10239 dotest join-25 "${testcvs} -q co first-dir" \
10240 'U first-dir/file2
10241 U first-dir/file3
10242 U first-dir/file4
10243 U first-dir/file7'
10244 cd first-dir
10245 dotest join-26 "${testcvs} -q tag -b br2" \
10246 "T file2
10247 T file3
10248 T file4
10249 T file7"
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" \
10255 "U file1
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
10262 U file8
10263 U file9"
10264 # Verify that the right changes have been scheduled.
10265 dotest join-29 "${testcvs} -q update" \
10266 "A file1
10267 M file2
10268 R file3
10269 A file8
10270 A file9"
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
10278 cd ..
10279 rm -r first-dir
10280 dotest join-twobranch-1 "${testcvs} -q co -rbranch first-dir" \
10281 'U first-dir/file1
10282 U first-dir/file2
10283 U first-dir/file8
10284 U first-dir/file9'
10285 cd first-dir
10286 dotest join-twobranch-2 "${testcvs} -q update -rbr2 -jbranch" \
10287 "${SPROG} update: \`file1' is no longer in the repository
10288 U file1
10289 U file2
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
10294 U file3
10295 ${SPROG} update: scheduling \`file3' for removal
10296 U file4
10297 ${SPROG} update: file file4 has been modified, but has been removed in revision branch
10298 U file7
10299 ${SPROG} update: \`file8' is no longer in the repository
10300 U file8
10301 ${SPROG} update: \`file9' is no longer in the repository
10302 U file9"
10303 # Verify that the right changes have been scheduled.
10304 dotest join-twobranch-3 "${testcvs} -q update" \
10305 "A file1
10306 M file2
10307 R file3
10308 A file8
10309 A file9"
10311 # Checkout the mainline again to try merging from the trunk
10312 # to a branch.
10313 cd ..
10314 rm -r first-dir
10315 dotest join-30 "${testcvs} -q co first-dir" \
10316 'U first-dir/file2
10317 U first-dir/file3
10318 U first-dir/file4
10319 U first-dir/file7'
10320 cd first-dir
10322 # Tag the current revisions on the trunk.
10323 dotest join-31 "${testcvs} -q tag T3 ." \
10324 'T file2
10325 T file3
10326 T file4
10327 T file7'
10329 # Modify file7.
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"
10335 # And Tag again.
10336 dotest join-33 "${testcvs} -q tag T4 ." \
10337 'T file2
10338 T file3
10339 T file4
10340 T file7'
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
10346 U file7"
10348 # Verify that the right changes have been scheduled.
10349 dotest join-35 "${testcvs} -q update" \
10350 'A file7'
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" \
10356 "A file7
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" \
10364 'A file7'
10366 dokeep
10367 cd ../..
10368 rm -r 1 2 3
10369 modify_repo rm -rf $CVSROOT_DIRNAME/first-dir
10374 join2)
10375 # More joining tests.
10377 # First the usual setup; create a directory first-dir, a file
10378 # first-dir/file1, and a branch br1.
10379 mkdir 1; cd 1
10380 dotest join2-1 "${testcvs} -q co -l ." ''
10381 mkdir first-dir
10382 dotest join2-2 "${testcvs} add first-dir" \
10383 "Directory ${CVSROOT_DIRNAME}/first-dir added to the repository"
10384 cd first-dir
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
10395 touch bradd
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}
10415 Sticky Tag: (none)
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
10426 modify on branch"
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}
10435 Sticky Tag: (none)
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
10446 # the branch.
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
10455 # it.
10456 dotest join2-17-circumvent "${testcvs} -q update -A" \
10457 "${SPROG} update: \`bradd' is no longer in the repository
10458 [UP] file1"
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}
10469 Sticky Tag: (none)
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"
10476 dokeep
10477 cd ../..
10478 rm -r 1
10479 modify_repo rm -rf $CVSROOT_DIRNAME/first-dir
10484 join3)
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.
10488 mkdir 1; cd 1
10489 dotest join3-1 "${testcvs} -q co -l ." ''
10490 mkdir first-dir
10491 dotest join3-2 "${testcvs} add first-dir" \
10492 "Directory ${CVSROOT_DIRNAME}/first-dir added to the repository"
10493 cd first-dir
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
10523 T file2"
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
10534 U file2"
10535 dotest join3-13 "cat file1" \
10536 "initial contents of file1
10537 [<]<<<<<< file1
10538 br1:line1
10539 [=]======
10540 trunk:line1
10541 [>]>>>>>> 1\.2"
10542 rm 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
10547 U file1" "U file1"
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
10567 [<]<<<<<< file1
10568 br1:line1
10569 [=]======
10570 trunk:line1
10571 br2:line1
10572 [>]>>>>>> 1\.2\.2\.1"
10574 dokeep
10575 cd ../..
10576 rm -r 1
10577 modify_repo rm -rf $CVSROOT_DIRNAME/first-dir
10582 join4)
10583 # Like join, but with local (uncommitted) modifications.
10585 modify_repo mkdir $CVSROOT_DIRNAME/first-dir
10586 mkdir 1
10587 cd 1
10588 dotest join4-1 "${testcvs} -q co first-dir" ''
10590 cd first-dir
10592 # Add two files.
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"
10618 # Make a branch.
10619 dotest join4-4 "${testcvs} -q tag -b branch ." \
10620 'T file3
10621 T file4
10622 T file6
10623 T file8
10624 T file9'
10626 # Add file10
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.
10653 cd ../..
10654 mkdir 2
10655 cd 2
10656 dotest join4-8 "${testcvs} -q co -r branch first-dir" \
10657 'U first-dir/file3
10658 U first-dir/file4
10659 U first-dir/file6
10660 U first-dir/file8
10661 U first-dir/file9'
10663 cd 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 ." \
10689 'T file3
10690 T file4
10691 T file5
10692 T file6
10693 T file8
10694 T file9'
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 ." \
10729 'T file1
10730 T file2
10731 T file8
10732 T file9'
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 ." \
10738 "U file1
10739 R file10
10740 A file2
10741 ${SPROG} update: file file2 exists, but has been added in revision T2
10742 ${SPROG} update: scheduling \`file3' for removal
10743 M file4
10744 ${SPROG} update: file file4 is locally modified, but has been removed in revision T2
10745 R file6
10746 A file7
10747 R file8
10748 R file9
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" \
10753 'A file1
10754 R file10
10755 A file2
10756 R file3
10757 M file4
10758 R file6
10759 A file7
10760 R file8
10761 R file9'
10763 dokeep
10764 cd ../..
10765 rm -r 1 2
10766 modify_repo rm -rf $CVSROOT_DIRNAME/first-dir
10771 join5)
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
10779 mkdir 1; cd 1
10780 dotest join5-init-1 "${testcvs} -Q co -l ."
10781 mkdir join5
10782 dotest join5-init-2 "${testcvs} -Q add join5"
10783 cd 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"
10790 cd ../..
10792 mkdir 2; cd 2
10793 dotest join5-init-5 "${testcvs} -Q co join5"
10794 cd 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"
10800 cd ../..
10802 cd 1/join5
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
10813 C -file"
10815 dokeep
10816 cd ../../..
10817 rm -r join5
10818 modify_repo rm -rf $CVSROOT_DIRNAME/join5
10823 join6)
10824 mkdir join6; cd join6
10825 mkdir 1; cd 1
10826 dotest join6-init-1 "${testcvs} -Q co -l ."
10827 mkdir join6
10828 dotest join6-init-2 "${testcvs} -Q add join6"
10829 cd join6
10830 echo aaa >temp.txt
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
10846 # change.
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
10852 # the change.
10853 echo bbb >temp.txt
10854 echo ccc >>temp.txt
10855 echo ddd >>temp.txt
10856 dotest join6-3.5 "${testcvs} update -j1.1 -j1.2 temp.txt" \
10857 "M 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" \
10864 "Index: temp\.txt
10865 ===================================================================
10866 RCS file: ${CVSROOT_DIRNAME}/join6/temp\.txt,v
10867 retrieving revision 1\.2
10868 diff -r1\.2 temp.txt
10870 < aaa"
10872 cp temp2.txt temp.txt
10873 dotest_fail join6-4 "${testcvs} diff temp.txt" \
10874 "Index: temp.txt
10875 ===================================================================
10876 RCS file: ${CVSROOT_DIRNAME}/join6/temp\.txt,v
10877 retrieving revision 1\.2
10878 diff -r1\.2 temp\.txt
10880 < ddd"
10882 dotest join6-5 "${testcvs} update -j1.1 -j1.2 temp.txt" \
10883 "M 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" \
10892 "M 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" \
10899 "Index: temp\.txt
10900 ===================================================================
10901 RCS file: ${CVSROOT_DIRNAME}/join6/temp.txt,v
10902 retrieving revision 1\.2
10903 diff -r1\.2 temp\.txt
10904 3a4,6
10905 > <<<<<<< temp\.txt
10906 > dddd
10907 > =======
10909 > >>>>>>> 1\.2"
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" \
10916 "Index: temp\.txt
10917 ===================================================================
10918 RCS file: ${CVSROOT_DIRNAME}/join6/temp.txt,v
10919 retrieving revision 1\.3
10920 diff -r1\.3 temp\.txt
10922 > ddd"
10923 dotest join6-12 "${testcvs} update -j1.2 -j1.3 temp.txt" \
10924 "M 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" \
10935 "T temp.txt"
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" \
10942 "T temp.txt
10943 T temp2.txt"
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
10957 # try to merge
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
10966 if $remote; then
10967 dotest_fail join6-32 "${testcvs} -q up -jt1 -jt2" \
10968 "? temp2\.txt
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
10975 C temp2\.txt"
10976 else
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.
10984 U temp2\.txt
10985 ? temp2\.txt"
10988 dokeep
10989 cd ../../..
10990 rm -r join6
10991 modify_repo rm -rf $CVSROOT_DIRNAME/join6
10996 join7)
10997 # This test deals with joins that happen with the -n switch
10998 mkdir join7; cd join7
10999 mkdir impdir; cd impdir
11000 echo aaa >temp.txt
11001 echo bbb >>temp.txt
11002 echo ccc >>temp.txt
11003 dotest join7-1 \
11004 "${testcvs} -Q import -minitial join7 vendor vers-1" \
11006 cd ..
11007 dotest join7-2 "${testcvs} -Q co join7" ""
11008 cd join7
11009 echo ddd >> temp.txt
11010 dotest join7-3 "${testcvs} -Q ci -madded-line temp.txt" ""
11011 cd ../impdir
11012 echo aaaa >temp.txt
11013 echo bbbb >>temp.txt
11014 echo ccc >>temp.txt
11015 echo eee >>temp.txt
11016 dotest join7-4 \
11017 "${testcvs} -Q import -minitial join7 vendor vers-2" \
11019 cd ../join7
11020 dotest join7-5 \
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"
11027 touch temp.txt
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"
11040 dokeep
11041 cd ../..
11042 rm -r join7
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
11062 mkdir $module
11063 $testcvs -q add $module >>$LOGFILE 2>&1
11064 cd $module
11066 file=m
11067 echo trunk > $file
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"
11081 rm $file
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
11094 C $file"
11096 # restore to the trunk
11097 rm -f $file
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"
11107 else
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
11117 C m"
11119 dokeep
11120 cd ../..
11121 rm -r join-readonly-conflict
11122 modify_repo rm -rf $CVSROOT_DIRNAME/$module
11127 join-admin)
11128 mkdir 1; cd 1
11129 dotest join-admin-0-1 "$testcvs -q co -l ."
11130 module=x
11131 mkdir $module
11132 dotest join-admin-0-2 "$testcvs -q add $module" \
11133 "Directory $CVSROOT_DIRNAME/$module added to the repository"
11134 cd $module
11136 # Create a file so applying the first tag works.
11137 echo foo > a
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" ''
11143 echo '$''Id$' > b
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}
11163 Sticky Tag: (none)
11164 Sticky Date: (none)
11165 Sticky Options: (none)"
11167 dokeep
11168 cd ../..
11169 rm -rf 1
11170 modify_repo rm -rf $CVSROOT_DIRNAME/$module
11175 join-admin-2)
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
11179 # -kk requires.
11180 mkdir 1; cd 1
11181 dotest join-admin-2-1 "$testcvs -q co -l ." ''
11182 module=x
11183 mkdir $module
11184 dotest join-admin-2-2 "$testcvs -q add $module" \
11185 "Directory ${CVSROOT_DIRNAME}/x added to the repository"
11186 cd $module
11188 # Create a file so applying the first tag works.
11189 echo '$''Id$' > e0
11190 cp e0 e
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"
11196 cp e0 e
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"
11202 echo '$''Id$' > b
11203 dotest join-admin-2-10 "$testcvs -Q add b" ''
11204 cp e0 e
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
11219 ${QUESTION} e0" \
11220 "${QUESTION} e0
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$'
11233 dokeep
11234 cd ../..
11235 rm -rf 1
11236 modify_repo rm -rf $CVSROOT_DIRNAME/$module
11241 join-rm)
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
11247 # removal.
11249 module=join-rm
11250 mkdir $module; cd $module
11252 dotest join-rm-init-1 "$testcvs -q co -l ." ''
11253 mkdir $module
11254 dotest join-rm-init-2 "$testcvs -q add $module" \
11255 "Directory $CVSROOT_DIRNAME/$module added to the repository"
11256 cd $module
11258 # add some files.
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" \
11282 "R b
11284 R g"
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
11297 Working file: b
11298 head: 1\.2
11299 branch:
11300 locks: strict
11301 access list:
11302 symbolic names:
11303 br: 1\.1\.0\.2
11304 keyword substitution: kv
11305 total revisions: 3; selected revisions: 3
11306 description:
11307 ----------------------------
11308 revision 1\.2
11309 date: ${ISO8601DATE}; author: $username; state: dead; lines: ${PLUS}0 -0; commitid: ${commitid};
11310 save the merge
11311 ----------------------------
11312 revision 1\.1
11313 date: ${ISO8601DATE}; author: $username; state: Exp; commitid: ${commitid};
11314 branches: 1.1.2;
11315 add-em
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
11330 # not.
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}
11341 Sticky Tag: (none)
11342 Sticky Date: (none)
11343 Sticky Options: (none)"
11345 dokeep
11346 cd ../..
11347 modify_repo rm -rf $CVSROOT_DIRNAME/$module
11348 rm -r $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"
11357 cd first-dir
11358 touch a
11360 dotest new-1 "$testcvs -Q add a"
11362 dotest new-2 "$testcvs -Q ci -m added"
11363 rm a
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"
11370 dokeep
11371 cd ..
11372 rm -r first-dir
11373 modify_repo rm -rf $CVSROOT_DIRNAME/first-dir
11378 newb)
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.
11385 # Create file 'a'.
11386 modify_repo mkdir $CVSROOT_DIRNAME/first-dir
11387 dotest newb-123a "${testcvs} -q co first-dir" ''
11388 cd first-dir
11389 touch a
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"
11397 # Make a branch.
11398 dotest newb-123d "${testcvs} -q tag -b branch" "T a"
11400 # Check out the branch.
11401 cd ..
11402 rm -r first-dir
11403 mkdir 1
11404 cd 1
11405 dotest newb-123e "${testcvs} -q co -r branch first-dir" \
11406 "U first-dir/a"
11408 # Remove 'a' on another copy of the branch.
11409 cd ..
11410 mkdir 2
11411 cd 2
11412 dotest newb-123f "${testcvs} -q co -r branch first-dir" \
11413 "U first-dir/a"
11414 cd first-dir
11415 rm a
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.
11426 cd ..
11427 rm -r first-dir
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.
11432 cd ../1/first-dir
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"
11449 if test -f a; then
11450 fail newb-123k
11451 else
11452 pass newb-123k
11455 dokeep
11456 cd ../..
11457 rm -r 1 2
11458 modify_repo rm -rf $CVSROOT_DIRNAME/first-dir
11463 conflicts)
11464 modify_repo mkdir $CVSROOT_DIRNAME/first-dir
11466 mkdir 1
11467 cd 1
11469 dotest conflicts-124 "${testcvs} -q co first-dir" ''
11471 cd first-dir
11472 touch a
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"
11481 cd ../..
11482 mkdir 2
11483 cd 2
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
11490 VERS: 1\.1
11491 \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*"
11492 dotest conflicts-127 "${testcvs} -Q co first-dir" ''
11493 cd first-dir
11494 dotest conflicts-127a "test -f a" ''
11496 cd ../../1/first-dir
11497 echo add a line >>a
11498 mkdir dir1
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"
11504 cd ../..
11506 # Similar to conflicts-126.5, but now the file has nonempty
11507 # contents.
11508 mkdir 3
11509 cd 3
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
11515 VERS: 1\.2
11516 \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*
11517 add a line"
11518 cd ..
11519 rmdir 3
11521 # Now go over the to the other working directory and
11522 # start testing conflicts
11523 cd 2/first-dir
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!'
11528 mkdir dir1
11529 mkdir sdir
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}
11537 Sticky Tag: (none)
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
11547 C 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
11556 ${QUESTION} dir1
11557 ${QUESTION} sdir" \
11558 "${QUESTION} dir1
11559 ${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
11566 C a"
11567 rmdir dir1 sdir
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}
11576 Sticky Tag: (none)
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
11585 mv a aa
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"
11598 mv aa a
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}
11607 Sticky Tag: (none)
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}
11625 Sticky Tag: (none)
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}
11638 Sticky Tag: (none)
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
11645 echo abc >abc
11646 if ${testcvs} add abc >>${LOGFILE} 2>&1; then
11647 pass 134
11648 else
11649 fail 134
11651 if ${testcvs} ci -m 'add abc' abc >>${LOGFILE} 2>&1; then
11652 pass 135
11653 else
11654 fail 135
11656 cd ../../2
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
11670 # set.
11671 cd ../1/first-dir
11672 mkdir subdir
11673 dotest conflicts-138 "${testcvs} add subdir" "${DOTSTAR}"
11674 cd ../..
11675 mkdir 3
11676 cd 3
11677 dotest conflicts-139 \
11678 "${testcvs} -q co first-dir/abc first-dir/subdir" "${DOTSTAR}"
11679 cd ../1/first-dir/subdir
11680 echo sss >sss
11681 dotest conflicts-140 "${testcvs} add sss" "${DOTSTAR}"
11682 dotest conflicts-140a "${testcvs} ci -m adding sss" \
11683 "${DOTSTAR}"
11684 cd ../../../3/first-dir
11685 dotest conflicts-141 "${testcvs} -q update" "${DOTSTAR}"
11686 dotest conflicts-142 "test -f subdir/sss"
11688 dokeep
11689 cd ../..
11690 rm -r 1 2 3
11691 modify_repo rm -rf $CVSROOT_DIRNAME/first-dir
11692 restore_adm
11697 conflicts2)
11698 # More conflicts tests; separate from conflicts to keep each
11699 # test a manageable size.
11700 modify_repo mkdir $CVSROOT_DIRNAME/first-dir
11702 mkdir 1
11703 cd 1
11705 dotest conflicts2-142a1 "${testcvs} -q co first-dir" ''
11707 cd first-dir
11708 touch a abc
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"
11720 cd ../..
11721 mkdir 2
11722 cd 2
11724 dotest conflicts2-142a4 "${testcvs} -q co first-dir" 'U first-dir/a
11725 U first-dir/abc'
11726 cd ..
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
11733 # conflict
11734 cd 1/first-dir
11735 echo modify a >>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
11740 rm a
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
11746 C a"
11747 # Resolve the conflict by deciding not to remove the file
11748 # after all.
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}
11758 Sticky Tag: (none)
11759 Sticky Date: (none)
11760 Sticky Options: (none)"
11761 dotest conflicts2-142b6 "$testcvs -q update" 'U a'
11763 # Now one level up.
11764 cd ..
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"
11769 if $remote; then
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"
11774 cd first-dir
11775 else
11776 dotest conflicts2-142b8 "${testcvs} add first-dir/a" \
11777 "U first-dir/a
11778 $SPROG add: \`first-dir/a', version 1\.2, resurrected"
11779 cd first-dir
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" ''
11791 cd ../..
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
11796 # not a conflict.
11797 cd 1/first-dir
11798 rm abc
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
11806 rm abc
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 \."
11812 cd ../..
11814 # conflicts2-142d*: test that if one party adds a file, and another
11815 # party has a file of the same name, cvs notices
11816 cd 1/first-dir
11817 touch aa.c
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
11830 # first commits
11831 touch bb.c
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).
11855 if $remote; then
11856 dotest_fail conflicts2-142d2r "${testcvs} -q update" \
11857 "${QUESTION} aa\.c
11858 ${QUESTION} same\.c
11859 ${CPROG} update: move away \`\./aa\.c'; it is in the way
11860 C aa\.c
11861 ${SPROG} update: conflict: \`bb\.c' created independently by second party
11862 C bb\.c
11863 ${CPROG} update: move away \`\./same\.c'; it is in the way
11864 C same\.c"
11865 else
11866 dotest_fail conflicts2-142d2 "${testcvs} -q update" \
11867 "${CPROG} update: move away \`aa\.c'; it is in the way
11868 C aa\.c
11869 ${CPROG} update: conflict: \`bb\.c' created independently by second party
11870 C bb\.c
11871 U same\.c"
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}
11889 Sticky Tag: (none)
11890 Sticky Date: (none)
11891 Sticky Options: (none)"
11893 # FIXCVS
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
11919 # directory.
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
11930 # this (?).
11932 dokeep
11933 cd ../..
11934 rm -r 1 2
11935 modify_repo rm -rf $CVSROOT_DIRNAME/first-dir
11940 conflicts3)
11941 # More tests of conflicts and/or multiple working directories
11942 # in general.
11944 mkdir 1; cd 1
11945 dotest conflicts3-1 "$testcvs -q co -l ."
11946 mkdir first-dir
11947 dotest conflicts3-2 "${testcvs} add first-dir" \
11948 "Directory ${CVSROOT_DIRNAME}/first-dir added to the repository"
11949 cd ..
11950 mkdir 2; cd 2
11951 dotest conflicts3-3 "${testcvs} -q co -l first-dir" ''
11952 cd ../1/first-dir
11953 touch file1 file2
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" \
11967 "U file1
11968 U file2"
11969 dotest_fail conflicts3-7 "test -f file1" ''
11970 dotest conflicts3-8 "${testcvs} -q update" \
11971 "U file1
11972 U file2"
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.
11995 mkdir sdir
11996 dotest conflicts3-14 "${testcvs} add sdir" \
11997 "Directory ${CVSROOT_DIRNAME}/first-dir/sdir added to the repository"
11998 touch sdir/sfile
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.
12011 mkdir sdir
12012 mkdir sdir/CVS
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?).
12019 if $remote; then
12020 dotest conflicts3-15 "${testcvs} -q update" \
12021 "${QUESTION} sdir"
12022 else
12023 dotest conflicts3-15 "${testcvs} -q update" \
12024 "${QUESTION} sdir
12025 ${SPROG} update: ignoring sdir (CVS/Repository missing)"
12026 touch sdir/CVS/Repository
12027 dotest conflicts3-16 "${testcvs} -q update" \
12028 "${QUESTION} sdir
12029 ${SPROG} update: ignoring sdir (CVS/Entries missing)"
12030 cd ..
12031 dotest conflicts3-16a "${testcvs} -q update first-dir" \
12032 "${QUESTION} first-dir/sdir
12033 ${SPROG} update: ignoring first-dir/sdir (CVS/Entries missing)"
12034 cd first-dir
12036 rm -r sdir
12038 # OK, now the same thing, but the directory doesn't exist
12039 # in the repository.
12040 mkdir newdir
12041 mkdir newdir/CVS
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)"
12049 cd ..
12050 dotest conflicts3-20 "${testcvs} -q update first-dir" \
12051 "${CPROG} update: ignoring first-dir/newdir (CVS/Entries missing)"
12052 cd first-dir
12053 rm -r newdir
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.
12058 cd ..
12059 rm -r first-dir
12060 dotest conflicts3-20a "${testcvs} -q co -l first-dir" ''
12061 cd first-dir
12063 dotest conflicts3-21 "${testcvs} -q update -d sdir" "U sdir/sfile"
12064 rm -r sdir/CVS
12065 dotest conflicts3-22 "${testcvs} -q update" "${QUESTION} sdir"
12066 if $remote; then
12067 dotest_fail conflicts3-23 "${testcvs} -q update -PdA" \
12068 "${QUESTION} sdir
12069 ${CPROG} update: move away \`sdir/sfile'; it is in the way
12070 C sdir/sfile"
12071 else
12072 dotest conflicts3-23 "${testcvs} -q update -PdA" \
12073 "${QUESTION} sdir"
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.
12082 rm -r sdir
12083 dotest conflicts3-24 "${testcvs} -q update -d sdir" "U sdir/sfile"
12084 rm 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"
12091 rm -r sdir/CVS
12092 dotest conflicts3-27 "${testcvs} -q update" "${QUESTION} sdir"
12093 dotest conflicts3-28 "${testcvs} -q update -PdA" \
12094 "${QUESTION} sdir"
12096 dokeep
12097 cd ../..
12098 rm -r 1 2
12099 modify_repo rm -rf $CVSROOT_DIRNAME/first-dir
12104 clean)
12105 # Test update -C (overwrite local mods w/ repository copies)
12106 mkdir 1; cd 1
12107 dotest clean-1 "${testcvs} -q co -l ." ''
12108 mkdir first-dir
12109 dotest clean-2 "${testcvs} add first-dir" \
12110 "Directory ${CVSROOT_DIRNAME}/first-dir added to the repository"
12111 cd first-dir
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)
12130 U cleanme\.txt"
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\.
12134 fish"
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)
12144 U cleanme\.txt"
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\.
12148 bluegill"
12150 # Now try with conflicts
12151 cd ..
12152 dotest clean-15 "${testcvs} -q co -d second-dir first-dir" \
12153 'U second-dir/cleanme\.txt'
12154 cd second-dir
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"
12159 cd ../first-dir
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
12168 C cleanme\.txt"
12169 dotest clean-18 "${testcvs} -q update -C" \
12170 "(Locally modified cleanme\.txt moved to \.#cleanme\.txt\.1\.1)
12171 U cleanme\.txt"
12172 dotest clean-19 "cat .#cleanme.txt.1.1" \
12173 "The usual boring test text\.
12174 fish"
12176 # Done. Clean up.
12177 dokeep
12178 cd ../..
12179 rm -rf 1
12180 modify_repo rm -rf $CVSROOT_DIRNAME/first-dir
12185 keywordexpand)
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
12198 continue
12201 mkdir keywordexpand; cd keywordexpand
12203 dotest keywordexpand-1 "${testcvs} -q co CVSROOT" \
12204 'U CVSROOT/checkoutlist
12205 U CVSROOT/commitinfo
12206 U CVSROOT/config
12207 U CVSROOT/cvswrappers
12208 U CVSROOT/loginfo
12209 U CVSROOT/modules
12210 U CVSROOT/notify
12211 U CVSROOT/postadmin
12212 U CVSROOT/postproxy
12213 U CVSROOT/posttag
12214 U CVSROOT/postwatch
12215 U CVSROOT/preproxy
12216 U CVSROOT/rcsinfo
12217 U CVSROOT/taginfo
12218 U CVSROOT/verifymsg'
12219 cd CVSROOT
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"
12225 cd ..
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" \
12244 cd ..
12246 dotest keywordexpand-4 "${testcvs} -Q checkout keywordexpand" ''
12247 cd keywordexpand
12248 dotest keywordexpand-5 "cat file1" \
12249 "\$""Author\$
12250 \$""Date\$
12251 \$""CVSHeader\$
12252 \$""Header\$
12253 \$""Id\$
12254 \$""Locker\$
12255 \$""Log\$
12256 \$""Name\$
12257 \$""RCSfile\$
12258 \$""Revision\$
12259 \$""Source\$
12260 \$""State\$
12261 \$MyBSD\$"
12262 cd ../CVSROOT
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
12266 rm -f config.old
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" \
12272 "\$""Author\$
12273 \$""Date\$
12274 \$""CVSHeader\$
12275 \$""Header\$
12276 \$""Id: file1,v 1\.2 [0-9/]* [0-9:]* ${username} Exp \$
12277 \$""Locker\$
12278 \$""Log\$
12279 \$""Name\$
12280 \$""RCSfile\$
12281 \$""Revision\$
12282 \$""Source\$
12283 \$""State\$
12284 \$MyBSD: keywordexpand/file1,v 1\.2 [0-9/]* [0-9:]* ${username} Exp \$
12285 a change"
12287 cd ../CVSROOT
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"
12313 dokeep
12314 # Done. Clean up.
12315 cd ../..
12316 rm -rf $TESTDIR/keywordexpand
12317 modify_repo rm -rf $CVSROOT_DIRNAME/keywordexpand
12318 restore_adm
12323 modules)
12324 # Tests of various ways to define and use modules.
12325 # Roadmap to various modules tests:
12326 # -a:
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
12334 # -s: modules.
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
12343 # out.
12344 ############################################################
12345 # Check out the whole repository
12346 mkdir 1; cd 1
12347 dotest modules-1 "${testcvs} -q co ." 'U CVSROOT/checkoutlist
12348 U CVSROOT/commitinfo
12349 U CVSROOT/config
12350 U CVSROOT/cvswrappers
12351 U CVSROOT/loginfo
12352 U CVSROOT/modules
12353 U CVSROOT/notify
12354 U CVSROOT/postadmin
12355 U CVSROOT/postproxy
12356 U CVSROOT/posttag
12357 U CVSROOT/postwatch
12358 U CVSROOT/preproxy
12359 U CVSROOT/rcsinfo
12360 U CVSROOT/taginfo
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"
12367 cd ..
12368 rm -rf 1
12370 ############################################################
12371 # Check out CVSROOT
12372 mkdir 1; cd 1
12373 dotest modules-2 "${testcvs} -q co CVSROOT" 'U CVSROOT/checkoutlist
12374 U CVSROOT/commitinfo
12375 U CVSROOT/config
12376 U CVSROOT/cvswrappers
12377 U CVSROOT/loginfo
12378 U CVSROOT/modules
12379 U CVSROOT/notify
12380 U CVSROOT/postadmin
12381 U CVSROOT/postproxy
12382 U CVSROOT/posttag
12383 U CVSROOT/postwatch
12384 U CVSROOT/preproxy
12385 U CVSROOT/rcsinfo
12386 U CVSROOT/taginfo
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"
12393 cd ..
12394 rm -rf 1
12396 ############################################################
12397 # Check out CVSROOT in some other directory
12398 modify_repo mkdir $CVSROOT_DIRNAME/somedir
12399 mkdir 1; cd 1
12400 dotest modules-3 "${testcvs} -q co somedir" ''
12401 cd somedir
12402 dotest modules-3d "${testcvs} -q co CVSROOT" 'U CVSROOT/checkoutlist
12403 U CVSROOT/commitinfo
12404 U CVSROOT/config
12405 U CVSROOT/cvswrappers
12406 U CVSROOT/loginfo
12407 U CVSROOT/modules
12408 U CVSROOT/notify
12409 U CVSROOT/postadmin
12410 U CVSROOT/postproxy
12411 U CVSROOT/posttag
12412 U CVSROOT/postwatch
12413 U CVSROOT/preproxy
12414 U CVSROOT/rcsinfo
12415 U CVSROOT/taginfo
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"
12422 cd ../..
12423 rm -rf 1
12424 modify_repo rm -rf $CVSROOT_DIRNAME/somedir
12425 ############################################################
12426 # end rebuild tests
12427 ############################################################
12430 modify_repo mkdir $CVSROOT_DIRNAME/first-dir
12432 mkdir 1
12433 cd 1
12435 dotest modules-143 "${testcvs} -q co first-dir" ""
12437 cd first-dir
12438 mkdir subdir
12439 dotest modules-143a "${testcvs} add subdir" \
12440 "Directory ${CVSROOT_DIRNAME}/first-dir/subdir added to the repository"
12442 cd subdir
12443 mkdir ssdir
12444 dotest modules-143b "${testcvs} add ssdir" \
12445 "Directory ${CVSROOT_DIRNAME}/first-dir/subdir/ssdir added to the repository"
12447 touch a b
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"
12462 cd ..
12463 dotest modules-146 "$testcvs -q co CVSROOT" \
12464 "U CVSROOT/checkoutlist
12465 U CVSROOT/commitinfo
12466 U CVSROOT/config
12467 U CVSROOT/cvswrappers
12468 U CVSROOT/loginfo
12469 U CVSROOT/modules
12470 U CVSROOT/notify
12471 U CVSROOT/postadmin
12472 U CVSROOT/postproxy
12473 U CVSROOT/posttag
12474 U CVSROOT/postwatch
12475 U CVSROOT/preproxy
12476 U CVSROOT/rcsinfo
12477 U CVSROOT/taginfo
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
12493 world -a .
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"
12514 cd ..
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
12533 world -a \.'
12534 # There is code in modules.c:save_d which explicitly skips
12535 # modules defined with -a, which is why aliasmodule is not
12536 # listed.
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
12550 # strip slashes.
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
12585 # being output.
12586 # We accept a zero exit status because it is what CVS does
12587 # (Dec 95). Probably the exit status should be nonzero,
12588 # however.
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
12593 # creating it.
12594 dotest_fail modules-150g2 "test -f dirmodule/a || test -f dirmodule/b" ""
12595 rm -r dirmodule
12597 # Now test that a module using -d checks out to the specified
12598 # directory.
12599 dotest modules-150h1 "${testcvs} -q co namedmodule" \
12600 'U nameddir/a
12601 U nameddir/b'
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'
12605 rm 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
12612 # aliasmodule/a.
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"
12618 cd ..
12619 rm -r 1
12621 mkdir 2
12622 cd 2
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" \
12630 "CVS
12631 first-dir"
12632 cd ..
12633 rm -r 2
12635 # Test checking out everything.
12636 mkdir 1
12637 cd 1
12638 dotest modules-155b "${testcvs} -q co world" \
12639 "U CVSROOT/${DOTSTAR}
12640 U first-dir/subdir/a
12641 U first-dir/subdir/b"
12642 cd ..
12643 rm -r 1
12645 # Test checking out a module which lists at least two
12646 # specific files twice. At one time, this failed over
12647 # remote CVS.
12648 mkdir 1
12649 cd 1
12650 dotest modules-155c1 "${testcvs} -q co first-dir" \
12651 "U first-dir/subdir/a
12652 U first-dir/subdir/b"
12654 cd first-dir
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"
12667 cd ..
12668 rm -r first-dir
12669 dotest modules-155c4 "${testcvs} -q co topfiles" \
12670 "U first-dir/file1
12671 U first-dir/file2"
12672 dotest modules-155c5 "${testcvs} -q co topfiles" ""
12674 # Make sure the right thing happens if we remove a file.
12675 cd first-dir
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"
12681 cd ..
12682 rm -r first-dir
12683 dotest modules-155c8 "${testcvs} -q co topfiles" \
12684 "${SPROG} checkout: warning: \`first-dir/file1' is not (any longer) pertinent
12685 U first-dir/file2"
12687 dokeep
12688 cd ..
12689 rm -r 1
12690 modify_repo rm -rf $CVSROOT_DIRNAME/first-dir
12695 modules2)
12696 # More tests of modules, in particular the & feature.
12697 mkdir 1; cd 1
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"
12705 cd third-dir
12706 touch file3
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"
12713 cd ../..
12714 rm -r 1
12716 mkdir 1
12717 cd 1
12719 dotest modules2-1 "${testcvs} -q co CVSROOT/modules" \
12720 'U CVSROOT/modules'
12721 cd CVSROOT
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
12726 badmod -d newdir
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"
12737 cd ..
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.
12745 cd ampermodule
12746 if ${testcvs} release -d first-dir second-dir <<EOF >>${LOGFILE}
12750 then
12751 pass modules2-6
12752 else
12753 fail modules2-6
12755 dotest_fail modules2-7 "test -d first-dir" ''
12756 dotest_fail modules2-8 "test -d second-dir" ''
12758 cd ..
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
12769 else
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" ''
12778 rm -rf newname
12780 # Now we create another directory named first-dir and make
12781 # sure that CVS doesn't get them mixed up.
12782 mkdir first-dir
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
12789 cd ampermodule
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"
12793 cd ..
12795 # As with the "Updating xxx" message, the "U first-dir/amper1"
12796 # message (instead of "U ampermodule/first-dir/amper1") is
12797 # rather fishy.
12798 dotest modules2-12 "${testcvs} co ampermodule" \
12799 "${SPROG} checkout: Updating first-dir
12800 A first-dir/amper1
12801 ${SPROG} checkout: Updating second-dir"
12803 if $remote; then
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"
12807 else
12808 # Trying this as above led to a "protocol error" message.
12809 # Work around this bug.
12810 cd ampermodule
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"
12814 cd ..
12816 cd ..
12817 rm -r 1
12819 # Now test the "combmodule" module (combining regular modules
12820 # and ampersand modules in the same module definition).
12821 mkdir 1; cd 1
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" ""
12828 cd combmodule
12829 rm -r first-dir
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
12836 # to do.
12837 dotest modules2-17 "${testcvs} update -d" \
12838 "${SPROG} update: Updating \."
12840 cd ..
12841 dotest modules2-18 "${testcvs} -q co combmodule" \
12842 "U first-dir/amper1"
12843 dotest modules2-19 "test -f combmodule/first-dir/amper1" ""
12844 cd ..
12845 rm -r 1
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.
12850 mkdir 1; cd 1
12851 dotest modules2-20 "${testcvs} co ampdirmod" \
12852 "${SPROG} checkout: Updating first-dir
12853 U first-dir/amper1
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"
12861 cd ..
12862 rm -r 1
12864 # Confirm that a rename with added depth nested in an ampersand
12865 # module works.
12866 mkdir 1; cd 1
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" ''
12873 cd ..; rm -r 1
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.
12878 mkdir 1; cd 1
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"
12884 if $remote; then
12885 dotest_fail modules2-ampertag-2 "test -d ampermodule/second-dir" ''
12886 dotest_fail modules2-ampertag-3 "test -d ampermodule/second-dir/CVS" ''
12887 else
12888 dotest modules2-ampertag-2 "test -d ampermodule/second-dir" ''
12889 dotest modules2-ampertag-3 "test -d ampermodule/second-dir/CVS" ''
12891 cd ..; rm -r 1
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.
12898 mkdir 1; cd 1
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"
12904 if $remote; then
12905 dotest_fail modules2-tagfiles-2r "test -d messymod/sdir" ''
12906 else
12907 dotest modules2-tagfiles-2 "cat messymod/sdir/CVS/Tag" 'Ttag'
12909 cd ..; rm -r 1
12911 # Test that CVS gives an error if one combines -a with
12912 # other options.
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.
12916 mkdir 1; cd 1
12917 dotest modules2-a0.5 "${testcvs} -q co CVSROOT/modules" \
12918 'U CVSROOT/modules'
12919 cd CVSROOT
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"
12925 cd ..
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"
12930 cd ..; rm -r 1
12932 # Clean up.
12933 modify_repo rm -rf $CVSROOT_DIRNAME/first-dir \
12934 $CVSROOT_DIRNAME/second-dir \
12935 $CVSROOT_DIRNAME/third-dir
12940 modules3)
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.
12945 mkdir 1; cd 1
12947 dotest modules3-0 "$testcvs -q co -l ."
12948 mkdir first-dir
12949 dotest modules3-1 "${testcvs} add first-dir" \
12950 "Directory ${CVSROOT_DIRNAME}/first-dir added to the repository"
12952 cd first-dir
12953 echo file1 >file1
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"
12960 cd ..
12962 dotest modules3-4 "${testcvs} -q update -d CVSROOT" \
12963 "U CVSROOT${DOTSTAR}"
12964 cd CVSROOT
12965 cat >modules <<EOF
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"
12978 cd ..
12980 dotest modules3-6 "${testcvs} -q co bigmod" ''
12981 rm -r first-dir
12982 dotest modules3-7 "${testcvs} -q co bigmod" 'U first-dir/file1'
12983 cd ..
12984 rm -r 1
12986 mkdir 1; cd 1
12987 mkdir suba
12988 mkdir suba/subb
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"
12999 cd ..; rm -r 1
13000 mkdir 1; cd 1
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"
13007 if $remote; then
13008 cd second-dir
13009 mkdir suba
13010 dotest modules3-7-workaround1 "${testcvs} add suba" \
13011 "Directory ${CVSROOT_DIRNAME}/second-dir/suba added to the repository"
13012 cd suba
13013 mkdir subb
13014 dotest modules3-7-workaround2 "${testcvs} add subb" \
13015 "Directory ${CVSROOT_DIRNAME}/second-dir/suba/subb added to the repository"
13016 cd ../..
13019 cd second-dir/suba/subb
13020 touch fileb
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"
13027 cd ../../..
13028 cd ..; rm -r 1
13030 mkdir 1
13031 cd 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" ''
13035 cd ..
13036 rm -r 1
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}).
13041 mkdir 1
13042 cd 1
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.
13049 if $remote; then
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
13055 cd ..
13056 rm -r 1
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
13072 mkdir 1; cd 1
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" ''
13076 cd ..; rm -r 1
13077 fi # end of tests skipped for remote
13079 # Now here is where it used to get seriously bogus.
13080 mkdir 1; cd 1
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.
13088 cd ..; rm -r 1
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.
13094 mkdir 2; cd 2
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'
13099 dokeep
13100 cd ..; rm -r 2
13101 modify_repo rm -rf $CVSROOT_DIRNAME/first-dir \
13102 $CVSROOT_DIRNAME/second-dir
13107 modules4)
13108 # Some tests using the modules file with aliases that
13109 # exclude particular directories.
13111 mkdir 1; cd 1
13113 dotest modules4-1 "${testcvs} -q co -l ." ''
13114 mkdir first-dir
13115 dotest modules4-2 "${testcvs} add first-dir" \
13116 "Directory ${CVSROOT_DIRNAME}/first-dir added to the repository"
13118 cd first-dir
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"
13124 echo file1 > file1
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"
13147 cd ..
13149 dotest modules4-8 "${testcvs} -q update -d CVSROOT" \
13150 "U CVSROOT${DOTSTAR}"
13151 cd CVSROOT
13152 cat >modules <<EOF
13153 all -a first-dir
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"
13162 cd ..
13164 cd ..
13165 mkdir 2; cd 2
13167 dotest modules4-10 "${testcvs} -q co all" \
13168 "U first-dir/file1
13169 U first-dir/subdir/file2
13170 U first-dir/subdir_long/file3"
13171 rm -r first-dir
13173 dotest modules4-11 "${testcvs} -q co some" \
13174 "U first-dir/file1
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" ''
13178 rm -r first-dir
13180 if $remote; then
13181 # But remote seems to do it the other way.
13182 dotest modules4-14r-1 "${testcvs} -q co somewhat" \
13183 "U first-dir/file1
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" ''
13187 else
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" \
13193 "U first-dir/file1
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" ''
13199 rm -r first-dir
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" ''
13205 rm -r first-dir
13207 cd ..
13208 rm -r 2
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
13219 head: 1\.1
13220 branch:
13221 locks: strict
13222 access list:
13223 symbolic names:
13224 keyword substitution: kv
13225 total revisions: 1; selected revisions: 1
13226 description:
13227 ----------------------------
13228 revision 1\.1
13229 date: ${ISO8601DATE}; author: ${username}; state: Exp; commitid: ${commitid};
13230 add-it
13231 ============================================================================="
13233 dokeep
13234 cd ../../..
13235 rm -r 1
13236 modify_repo rm -rf $CVSROOT_DIRNAME/first-dir
13241 modules5)
13242 # Test module programs
13244 modify_repo mkdir $CVSROOT_DIRNAME/first-dir
13245 mkdir 1
13246 cd 1
13247 dotest modules5-1 "$testcvs -q co first-dir"
13248 cd first-dir
13249 mkdir subdir
13250 dotest modules5-2 "${testcvs} add subdir" \
13251 "Directory ${CVSROOT_DIRNAME}/first-dir/subdir added to the repository"
13252 cd subdir
13253 mkdir ssdir
13254 dotest modules5-3 "${testcvs} add ssdir" \
13255 "Directory ${CVSROOT_DIRNAME}/first-dir/subdir/ssdir added to the repository"
13256 touch a b
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"
13270 cd ..
13271 dotest modules5-6 "${testcvs} -q co CVSROOT" \
13272 "U CVSROOT/checkoutlist
13273 U CVSROOT/commitinfo
13274 U CVSROOT/config
13275 U CVSROOT/cvswrappers
13276 U CVSROOT/loginfo
13277 U CVSROOT/modules
13278 U CVSROOT/notify
13279 U CVSROOT/postadmin
13280 U CVSROOT/postproxy
13281 U CVSROOT/posttag
13282 U CVSROOT/postwatch
13283 U CVSROOT/preproxy
13284 U CVSROOT/rcsinfo
13285 U CVSROOT/taginfo
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
13293 #! $TESTSHELL
13294 sleep 1
13295 echo "$i script invoked in \`pwd\`"
13296 echo "args: \$@"
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"
13301 else
13302 chmod +x ${CVSROOT_DIRNAME}/$i.sh
13304 done
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"
13315 cd ..
13316 rm -rf first-dir
13318 # Test that real modules check out to realmodule/a, not subdir/a.
13319 if $remote; then
13320 # FIXCVS?
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" \
13328 "U realmodule/a
13329 ${SPROG} checkout: Executing ..${CVSROOT_DIRNAME}/checkout\.sh. .realmodule..
13330 checkout script invoked in ${TMPDIR}/cvs-serv[0-9a-z]*
13331 args: realmodule"
13332 else
13333 dotest modules5-8 "${testcvs} co realmodule" \
13334 "U realmodule/a
13335 ${SPROG} checkout: Executing ..${CVSROOT_DIRNAME}/checkout\.sh. .realmodule..
13336 checkout script invoked in ${TESTDIR}/1
13337 args: realmodule"
13339 dotest modules5-9 "test -d realmodule && test -f realmodule/a" ""
13340 dotest_fail modules5-10 "test -f realmodule/b" ""
13341 if $remote; then
13342 dotest modules5-11 "${testcvs} -q co realmodule" \
13343 "checkout script invoked in ${TMPDIR}/cvs-serv[0-9a-z]*
13344 args: realmodule"
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"
13350 else
13351 dotest modules5-11 "${testcvs} -q co realmodule" \
13352 "checkout script invoked in ${TESTDIR}/1
13353 args: realmodule"
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"
13368 if $remote; then
13369 dotest modules5-16 "${testcvs} -q export -r MYTAG realmodule" \
13370 "U realmodule/a
13371 export script invoked in ${TMPDIR}/cvs-serv[0-9a-z]*
13372 args: realmodule"
13373 else
13374 dotest modules5-16 "${testcvs} -q export -r MYTAG realmodule" \
13375 "U realmodule/a
13376 export script invoked in ${TESTDIR}/1
13377 args: realmodule"
13379 rm -r realmodule
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
13387 if $remote; then
13388 dotest modules5-18 "${testcvs} co dirmodule/a" \
13389 "U dirmodule/a
13390 ${SPROG} checkout: Executing ..${CVSROOT_DIRNAME}/checkout\.sh. .dirmodule..
13391 checkout script invoked in ${TMPDIR}/cvs-serv[0-9a-z]*
13392 args: dirmodule"
13393 else
13394 dotest modules5-18 "${testcvs} co dirmodule/a" \
13395 "U dirmodule/a
13396 ${SPROG} checkout: Executing ..${CVSROOT_DIRNAME}/checkout\.sh. .dirmodule..
13397 checkout script invoked in ${TESTDIR}/1
13398 args: dirmodule"
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
13408 # being output.
13409 # We accept a zero exit status because it is what CVS does
13410 # (Dec 95). Probably the exit status should be nonzero,
13411 # however.
13412 if $remote; then
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]*
13417 args: dirmodule"
13418 else
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
13423 args: dirmodule"
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
13427 # creating it.
13428 dotest_fail modules5-23 "test -f dirmodule/a || test -f dirmodule/b" ""
13429 rm -r dirmodule
13431 # Now test that a module using -d checks out to the specified
13432 # directory.
13433 if $remote; then
13434 dotest modules5-24 "${testcvs} -q co namedmodule" \
13435 "U nameddir/a
13436 U nameddir/b
13437 checkout script invoked in ${TMPDIR}/cvs-serv[0-9a-z]*
13438 args: nameddir"
13439 else
13440 dotest modules5-24 "${testcvs} -q co namedmodule" \
13441 "U nameddir/a
13442 U nameddir/b
13443 checkout script invoked in ${TESTDIR}/1
13444 args: nameddir"
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?
13451 if $remote; then
13452 dotest modules5-26 "${testcvs} -q co namedmodule" \
13453 "M nameddir/a
13454 checkout script invoked in ${TMPDIR}/cvs-serv[0-9a-z]*
13455 args: nameddir"
13456 else
13457 dotest modules5-26 "${testcvs} -q co namedmodule" \
13458 "M nameddir/a
13459 checkout script invoked in ${TESTDIR}/1
13460 args: nameddir"
13462 rm nameddir/a
13464 if $remote; then
13465 dotest modules5-27 "${testcvs} -q co namedmodule" \
13466 "U nameddir/a
13467 checkout script invoked in ${TMPDIR}/cvs-serv[0-9a-z]*
13468 args: nameddir"
13469 else
13470 dotest modules5-27 "${testcvs} -q co namedmodule" \
13471 "U nameddir/a
13472 checkout script invoked in ${TESTDIR}/1
13473 args: nameddir"
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.
13482 if $remote; then
13483 dotest modules5-29 "${testcvs} co -d mydir realmodule" \
13484 "U mydir/a
13485 ${SPROG} checkout: Executing ..${CVSROOT_DIRNAME}/checkout\.sh. .mydir..
13486 checkout script invoked in ${TMPDIR}/cvs-serv[0-9a-z]*
13487 args: mydir"
13488 else
13489 dotest modules5-29 "${testcvs} co -d mydir realmodule" \
13490 "U mydir/a
13491 ${SPROG} checkout: Executing ..${CVSROOT_DIRNAME}/checkout\.sh. .mydir..
13492 checkout script invoked in ${TESTDIR}/1
13493 args: mydir"
13495 dotest modules5-30 "test -d mydir && test -f mydir/a" ""
13496 dotest_fail modules5-31 "test -d realmodule || test -f mydir/b" ""
13497 if $remote; then
13498 dotest modules5-32 "${testcvs} -q co -d mydir realmodule" \
13499 "checkout script invoked in ${TMPDIR}/cvs-serv[0-9a-z]*
13500 args: mydir"
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"
13506 else
13507 dotest modules5-32 "${testcvs} -q co -d mydir realmodule" \
13508 "checkout script invoked in ${TESTDIR}/1
13509 args: mydir"
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.: "
13519 if $remote; then
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" \
13524 "U mydir/a
13525 export script invoked in ${TMPDIR}/cvs-serv[0-9a-z]*
13526 args: mydir"
13527 else
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" \
13532 "U mydir/a
13533 export script invoked in ${TESTDIR}/1
13534 args: mydir"
13536 rm -r mydir
13538 # Now test the ability to check out a single file from a directory
13539 if $remote; then
13540 dotest modules5-38 "${testcvs} co -d mydir dirmodule/a" \
13541 "U mydir/a
13542 ${SPROG} checkout: Executing ..${CVSROOT_DIRNAME}/checkout\.sh. .mydir..
13543 checkout script invoked in ${TMPDIR}/cvs-serv[0-9a-z]*
13544 args: mydir"
13545 else
13546 dotest modules5-38 "${testcvs} co -d mydir dirmodule/a" \
13547 "U mydir/a
13548 ${SPROG} checkout: Executing ..${CVSROOT_DIRNAME}/checkout\.sh. .mydir..
13549 checkout script invoked in ${TESTDIR}/1
13550 args: mydir"
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
13560 # being output.
13561 # We accept a zero exit status because it is what CVS does
13562 # (Dec 95). Probably the exit status should be nonzero,
13563 # however.
13564 if $remote; then
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]*
13569 args: mydir"
13570 else
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
13575 args: mydir"
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
13579 # creating it.
13580 dotest_fail modules5-43 "test -f mydir/a || test -f mydir/b" ""
13581 rm -r mydir
13583 if $remote; then
13584 dotest modules5-44 "${testcvs} -q co -d mydir namedmodule" \
13585 "U mydir/a
13586 U mydir/b
13587 checkout script invoked in ${TMPDIR}/cvs-serv[0-9a-z]*
13588 args: mydir"
13589 else
13590 dotest modules5-44 "${testcvs} -q co -d mydir namedmodule" \
13591 "U mydir/a
13592 U mydir/b
13593 checkout script invoked in ${TESTDIR}/1
13594 args: mydir"
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?
13602 if $remote; then
13603 dotest modules5-47 "${testcvs} -q co -d mydir namedmodule" \
13604 "M mydir/a
13605 checkout script invoked in ${TMPDIR}/cvs-serv[0-9a-z]*
13606 args: mydir"
13607 else
13608 dotest modules5-47 "${testcvs} -q co -d mydir namedmodule" \
13609 "M mydir/a
13610 checkout script invoked in ${TESTDIR}/1
13611 args: mydir"
13613 rm mydir/a
13615 if $remote; then
13616 dotest modules5-48 "${testcvs} -q co -d mydir namedmodule" \
13617 "U mydir/a
13618 checkout script invoked in ${TMPDIR}/cvs-serv[0-9a-z]*
13619 args: mydir"
13620 else
13621 dotest modules5-48 "${testcvs} -q co -d mydir namedmodule" \
13622 "U mydir/a
13623 checkout script invoked in ${TESTDIR}/1
13624 args: mydir"
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.: "
13630 dokeep
13631 cd ..
13632 rm -r 1
13633 modify_repo rm -rf $CVSROOT_DIRNAME/first-dir \
13634 $CVSROOT_DIRNAME/*.sh
13639 modules6)
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.
13652 mkdir modules6
13653 cd modules6
13654 dotest module6-setup-1 "${testcvs} -Q co CVSROOT" ""
13655 cd 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'
13664 cd ..
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"
13672 dokeep
13673 restore_adm
13674 cd ..
13675 rm -r modules6
13680 modules7)
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.
13687 mkdir modules7
13688 cd modules7
13689 dotest modules7-1 "$testcvs -Q co -d top ."
13690 cd top
13691 mkdir zero one
13692 dotest modules7-2 "$testcvs -Q add zero one"
13693 cd 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"
13698 cd ../CVSROOT
13699 echo 'all -a zero one' > modules
13700 dotest modules7-5 "$testcvs -Q ci -mall-module"
13701 cd ../..
13702 mkdir myexport
13703 cd myexport
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
13709 U one/file1"
13710 dotest modules7-8 'cat one/file1' 'file1 contents'
13712 dokeep
13714 # cleanup
13715 restore_adm
13716 cd ../..
13717 rm -fr modules7
13718 rm -rf $CVSROOT_DIRNAME/zero $CVSROOT_DIRNAME/one
13723 mkmodules)
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.
13729 mkdir 1; cd 1
13730 dotest mkmodules-temp-file-removal-1 "${testcvs} -Q co CVSROOT" ''
13731 cd 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"
13757 dokeep
13758 cd ../..
13759 rm -r 1
13764 co-d)
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.
13770 module=co-d
13771 mkdir $module; cd $module
13772 mkdir top; cd top
13773 dotest co-d-init-1 "$testcvs -Q co -l ."
13774 mkdir $module
13775 dotest co-d-init-2 "$testcvs -Q add $module"
13776 cd $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"
13781 cd ../..
13783 mkdir 2; cd 2
13784 dotest co-d-1 "$testcvs -q co -d dir $module" \
13785 "U dir/file1
13786 U dir/file2"
13787 dotest co-d-1.2 "cat dir/CVS/Repository" "$module"
13789 dotest co-d-2 "$testcvs -q co -d dir2/sdir $module" \
13790 "U dir2/sdir/file1
13791 U dir2/sdir/file2"
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"
13802 mkdir dir3
13803 dotest co-d-3 "$testcvs -q co -d dir3 $module" \
13804 "U dir3/file1
13805 U dir3/file2"
13806 dotest co-d-3.2 "cat dir3/CVS/Repository" "$module"
13808 mkdir dir4
13809 dotest co-d-4 "$testcvs -q co -d dir4/sdir $module" \
13810 "U dir4/sdir/file1
13811 U dir4/sdir/file2"
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
13817 # FIXCVS:
13818 # This is broken in client/server mode because the server does not
13819 # know the client's directory structure and has to create
13820 # everything.
13821 if $remote; then
13822 dotest co-d-4.2r "cat dir4/CVS/Repository" "."
13823 else
13824 dotest_fail co-d-4.2 "test -d dir4/CVS"
13827 dotest co-d-4.3 "cat dir4/sdir/CVS/Repository" "$module"
13829 mkdir dir5
13830 mkdir dir5/sdir
13831 dotest co-d-5 "$testcvs -q co -d dir5/sdir $module" \
13832 "U dir5/sdir/file1
13833 U dir5/sdir/file2"
13834 # FIXCVS as for co-d-4.2r.
13835 if $remote; then
13836 dotest co-d-5.2 "cat dir5/CVS/Repository" "."
13837 else
13838 dotest_fail co-d-5.2 "test -d dir5/CVS"
13841 dotest co-d-5.3 "cat dir5/sdir/CVS/Repository" "$module"
13843 # clean up
13844 dokeep
13845 cd ../..
13846 modify_repo rm -rf $CVSROOT_DIRNAME/$module
13847 rm -r $module
13852 cvsadm)
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
13862 # ``foo bar''
13863 # <2mod> is a directory at the second level of cvsroot
13864 # ``foo bar/baz''
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
13880 # directories.
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
13889 REP=${CVSROOT}
13891 # First, set TopLevelAdmin=yes so we're sure to get
13892 # top-level CVS directories.
13893 mkdir 1; cd 1
13894 dotest cvsadm-setup-1 "${testcvs} -q co CVSROOT/config" \
13895 "U CVSROOT/config"
13896 cd CVSROOT
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"
13902 cd ../..
13903 rm -r 1
13905 # Second, check out the modules file and edit it.
13906 mkdir 1; cd 1
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 ." ''
13946 mkdir mod1
13947 mkdir mod1-2
13948 mkdir mod2
13949 mkdir mod2/sub2
13950 mkdir mod2-2
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" > mod1/file1
13962 echo "file1-2" > mod1-2/file1-2
13963 echo "file2" > mod2/sub2/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
13989 # Done.
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
13998 # order.
14000 dotest cvsadm-3 "${testcvs} co 1mod" \
14001 "${SPROG} checkout: Updating 1mod
14002 U 1mod/file1"
14003 dotest cvsadm-3b "cat CVS/Repository" "\."
14004 dotest cvsadm-3d "cat 1mod/CVS/Repository" "mod1"
14005 rm -rf CVS 1mod
14007 dotest cvsadm-4 "${testcvs} co 2mod" \
14008 "${SPROG} checkout: Updating 2mod
14009 U 2mod/file2"
14010 dotest cvsadm-4b "cat CVS/Repository" "\."
14011 dotest cvsadm-4d "cat 2mod/CVS/Repository" "mod2/sub2"
14012 rm -rf CVS 2mod
14014 dotest cvsadm-5 "${testcvs} co 1d1mod" \
14015 "${SPROG} checkout: Updating dir1d1
14016 U dir1d1/file1"
14017 dotest cvsadm-5b "cat CVS/Repository" "\."
14018 dotest cvsadm-5d "cat dir1d1/CVS/Repository" "mod1"
14019 rm -rf CVS dir1d1
14021 dotest cvsadm-6 "${testcvs} co 1d2mod" \
14022 "${SPROG} checkout: Updating dir1d2
14023 U dir1d2/file2"
14024 dotest cvsadm-6b "cat CVS/Repository" "\."
14025 dotest cvsadm-6d "cat dir1d2/CVS/Repository" "mod2/sub2"
14026 rm -rf CVS dir1d2
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"
14034 rm -rf CVS dir2d1
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"
14042 rm -rf CVS dir2d2
14044 ##################################################
14045 ## You are in a shell script of twisted little
14046 ## module combination statements, all alike.
14047 ##################################################
14049 ### 1mod
14051 dotest cvsadm-9 "${testcvs} co 1mod 1mod-2" \
14052 "${SPROG} checkout: Updating 1mod
14053 U 1mod/file1
14054 ${SPROG} checkout: Updating 1mod-2
14055 U 1mod-2/file1-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
14067 U 1mod/file1
14068 ${SPROG} checkout: Updating 2mod
14069 U 2mod/file2"
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
14080 U 1mod/file1
14081 ${SPROG} checkout: Updating dir1d1
14082 U dir1d1/file1"
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
14093 U 1mod/file1
14094 ${SPROG} checkout: Updating dir1d2
14095 U dir1d2/file2"
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
14106 U 1mod/file1
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
14120 U 1mod/file1
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
14133 ### 2mod
14135 dotest cvsadm-15 "${testcvs} co 2mod 2mod-2" \
14136 "${SPROG} checkout: Updating 2mod
14137 U 2mod/file2
14138 ${SPROG} checkout: Updating 2mod-2
14139 U 2mod-2/file2-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
14151 U 2mod/file2
14152 ${SPROG} checkout: Updating dir1d1
14153 U dir1d1/file1"
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
14164 U 2mod/file2
14165 ${SPROG} checkout: Updating dir1d2
14166 U dir1d2/file2"
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
14177 U 2mod/file2
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
14191 U 2mod/file2
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
14204 ### 1d1mod
14206 dotest cvsadm-20 "${testcvs} co 1d1mod 1d1mod-2" \
14207 "${SPROG} checkout: Updating dir1d1
14208 U dir1d1/file1
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
14221 U dir1d1/file1
14222 ${SPROG} checkout: Updating dir1d2
14223 U dir1d2/file2"
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
14234 U dir1d1/file1
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
14248 U dir1d1/file1
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
14261 ### 1d2mod
14263 dotest cvsadm-24 "${testcvs} co 1d2mod 1d2mod-2" \
14264 "${SPROG} checkout: Updating dir1d2
14265 U dir1d2/file2
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
14278 U dir1d2/file2
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
14292 U dir1d2/file2
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
14305 # 2d1mod
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
14338 # 2d2mod
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" \
14353 "mod2-2/sub2-2"
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
14363 U dir/file1"
14364 dotest cvsadm-1d3b "cat CVS/Repository" "\."
14365 dotest cvsadm-1d3d "cat dir/CVS/Repository" "mod1"
14366 rm -rf CVS dir
14368 dotest cvsadm-1d4 "${testcvs} co -d dir 2mod" \
14369 "${SPROG} checkout: Updating dir
14370 U dir/file2"
14371 dotest cvsadm-1d4b "cat CVS/Repository" "\."
14372 dotest cvsadm-1d4d "cat dir/CVS/Repository" "mod2/sub2"
14373 rm -rf CVS dir
14375 dotest cvsadm-1d5 "${testcvs} co -d dir 1d1mod" \
14376 "${SPROG} checkout: Updating dir
14377 U dir/file1"
14378 dotest cvsadm-1d5b "cat CVS/Repository" "\."
14379 dotest cvsadm-1d5d "cat dir/CVS/Repository" "mod1"
14380 rm -rf CVS dir
14382 dotest cvsadm-1d6 "${testcvs} co -d dir 1d2mod" \
14383 "${SPROG} checkout: Updating dir
14384 U dir/file2"
14385 dotest cvsadm-1d6b "cat CVS/Repository" "\."
14386 dotest cvsadm-1d6d "cat dir/CVS/Repository" "mod2/sub2"
14387 rm -rf CVS dir
14389 dotest cvsadm-1d7 "${testcvs} co -d dir 2d1mod" \
14390 "${SPROG} checkout: Updating dir
14391 U dir/file1"
14392 dotest cvsadm-1d7b "cat CVS/Repository" "\."
14393 dotest cvsadm-1d7d "cat dir/CVS/Repository" "mod1"
14394 rm -rf CVS dir
14396 dotest cvsadm-1d8 "${testcvs} co -d dir 2d2mod" \
14397 "${SPROG} checkout: Updating dir
14398 U dir/file2"
14399 dotest cvsadm-1d8b "cat CVS/Repository" "\."
14400 dotest cvsadm-1d8d "cat dir/CVS/Repository" "mod2/sub2"
14401 rm -rf CVS dir
14403 ##################################################
14404 ## Los Combonaciones
14405 ##################################################
14407 ### 1mod
14409 dotest cvsadm-1d9 "${testcvs} co -d dir 1mod 1mod-2" \
14410 "${SPROG} checkout: Updating dir/1mod
14411 U dir/1mod/file1
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"
14422 rm -rf CVS dir
14424 # 1mod 2mod redmod bluemod
14425 dotest cvsadm-1d10 "${testcvs} co -d dir 1mod 2mod" \
14426 "${SPROG} checkout: Updating dir/1mod
14427 U dir/1mod/file1
14428 ${SPROG} checkout: Updating dir/2mod
14429 U dir/2mod/file2"
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"
14437 rm -rf CVS dir
14439 dotest cvsadm-1d11 "${testcvs} co -d dir 1mod 1d1mod" \
14440 "${SPROG} checkout: Updating dir/1mod
14441 U dir/1mod/file1
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"
14451 rm -rf CVS dir
14453 dotest cvsadm-1d12 "${testcvs} co -d dir 1mod 1d2mod" \
14454 "${SPROG} checkout: Updating dir/1mod
14455 U dir/1mod/file1
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"
14465 rm -rf CVS dir
14467 dotest cvsadm-1d13 "${testcvs} co -d dir 1mod 2d1mod" \
14468 "${SPROG} checkout: Updating dir/1mod
14469 U dir/1mod/file1
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"
14480 rm -rf CVS dir
14482 dotest cvsadm-1d14 "${testcvs} co -d dir 1mod 2d2mod" \
14483 "${SPROG} checkout: Updating dir/1mod
14484 U dir/1mod/file1
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"
14495 rm -rf CVS dir
14498 ### 2mod
14500 dotest cvsadm-1d15 "${testcvs} co -d dir 2mod 2mod-2" \
14501 "${SPROG} checkout: Updating dir/2mod
14502 U dir/2mod/file2
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"
14512 rm -rf CVS dir
14514 dotest cvsadm-1d16 "${testcvs} co -d dir 2mod 1d1mod" \
14515 "${SPROG} checkout: Updating dir/2mod
14516 U dir/2mod/file2
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"
14526 rm -rf CVS dir
14528 dotest cvsadm-1d17 "${testcvs} co -d dir 2mod 1d2mod" \
14529 "${SPROG} checkout: Updating dir/2mod
14530 U dir/2mod/file2
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"
14540 rm -rf CVS dir
14542 dotest cvsadm-1d18 "${testcvs} co -d dir 2mod 2d1mod" \
14543 "${SPROG} checkout: Updating dir/2mod
14544 U dir/2mod/file2
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"
14555 rm -rf CVS dir
14557 dotest cvsadm-1d19 "${testcvs} co -d dir 2mod 2d2mod" \
14558 "${SPROG} checkout: Updating dir/2mod
14559 U dir/2mod/file2
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"
14570 rm -rf CVS dir
14573 ### 1d1mod
14575 dotest cvsadm-1d20 "${testcvs} co -d dir 1d1mod 1d1mod-2" \
14576 "${SPROG} checkout: Updating dir/dir1d1
14577 U dir/dir1d1/file1
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"
14587 rm -rf CVS dir
14589 dotest cvsadm-1d21 "${testcvs} co -d dir 1d1mod 1d2mod" \
14590 "${SPROG} checkout: Updating dir/dir1d1
14591 U dir/dir1d1/file1
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"
14601 rm -rf CVS dir
14603 dotest cvsadm-1d22 "${testcvs} co -d dir 1d1mod 2d1mod" \
14604 "${SPROG} checkout: Updating dir/dir1d1
14605 U dir/dir1d1/file1
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"
14616 rm -rf CVS dir
14618 dotest cvsadm-1d23 "${testcvs} co -d dir 1d1mod 2d2mod" \
14619 "${SPROG} checkout: Updating dir/dir1d1
14620 U dir/dir1d1/file1
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"
14631 rm -rf CVS dir
14634 ### 1d2mod
14636 dotest cvsadm-1d24 "${testcvs} co -d dir 1d2mod 1d2mod-2" \
14637 "${SPROG} checkout: Updating dir/dir1d2
14638 U dir/dir1d2/file2
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"
14648 rm -rf CVS dir
14650 dotest cvsadm-1d25 "${testcvs} co -d dir 1d2mod 2d1mod" \
14651 "${SPROG} checkout: Updating dir/dir1d2
14652 U dir/dir1d2/file2
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"
14663 rm -rf CVS dir
14665 dotest cvsadm-1d26 "${testcvs} co -d dir 1d2mod 2d2mod" \
14666 "${SPROG} checkout: Updating dir/dir1d2
14667 U dir/dir1d2/file2
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"
14678 rm -rf CVS dir
14681 # 2d1mod
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" \
14697 "mod1-2"
14698 rm -rf CVS dir
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"
14714 rm -rf CVS dir
14717 # 2d2mod
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" \
14733 "mod2-2/sub2-2"
14734 rm -rf CVS dir
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
14743 U dir/dir2/file1"
14745 # Remote couldn't handle this, even with the "mkdir dir", before
14746 # CVS 1.11.14.
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"
14750 rm -rf CVS dir
14752 mkdir dir
14753 dotest cvsadm-2d4 "$testcvs co -d dir/dir2 2mod" \
14754 "$SPROG checkout: Updating dir/dir2
14755 U dir/dir2/file2"
14756 dotest cvsadm-2d4b "cat CVS/Repository" "\."
14757 dotest cvsadm-2d4f "cat dir/dir2/CVS/Repository" "mod2/sub2"
14758 rm -rf CVS dir
14760 mkdir dir
14761 dotest cvsadm-2d5 "$testcvs co -d dir/dir2 1d1mod" \
14762 "$SPROG checkout: Updating dir/dir2
14763 U dir/dir2/file1"
14764 dotest cvsadm-2d5b "cat CVS/Repository" "\."
14765 dotest cvsadm-2d5f "cat dir/dir2/CVS/Repository" "mod1"
14766 rm -rf CVS dir
14768 mkdir dir
14769 dotest cvsadm-2d6 "$testcvs co -d dir/dir2 1d2mod" \
14770 "$SPROG checkout: Updating dir/dir2
14771 U dir/dir2/file2"
14772 dotest cvsadm-2d6b "cat CVS/Repository" "\."
14773 dotest cvsadm-2d6f "cat dir/dir2/CVS/Repository" "mod2/sub2"
14774 rm -rf CVS dir
14776 mkdir dir
14777 dotest cvsadm-2d7 "$testcvs co -d dir/dir2 2d1mod" \
14778 "$SPROG checkout: Updating dir/dir2
14779 U dir/dir2/file1"
14780 dotest cvsadm-2d7b "cat CVS/Repository" "\."
14781 dotest cvsadm-2d7f "cat dir/dir2/CVS/Repository" "mod1"
14782 rm -rf CVS dir
14784 mkdir dir
14785 dotest cvsadm-2d8 "$testcvs co -d dir/dir2 2d2mod" \
14786 "$SPROG checkout: Updating dir/dir2
14787 U dir/dir2/file2"
14788 dotest cvsadm-2d8b "cat CVS/Repository" "\."
14789 dotest cvsadm-2d8f "cat dir/dir2/CVS/Repository" "mod2/sub2"
14790 rm -rf CVS dir
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
14799 U 1mod/file1"
14800 dotest cvsadm-N3b "cat CVS/Repository" "\."
14801 dotest cvsadm-N3d "cat 1mod/CVS/Repository" "mod1"
14802 rm -rf CVS 1mod
14804 dotest cvsadm-N4 "$testcvs co -N 2mod" \
14805 "$SPROG checkout: Updating 2mod
14806 U 2mod/file2"
14807 dotest cvsadm-N4b "cat CVS/Repository" "\."
14808 dotest cvsadm-N4d "cat 2mod/CVS/Repository" "mod2/sub2"
14809 rm -rf CVS 2mod
14811 dotest cvsadm-N5 "$testcvs co -N 1d1mod" \
14812 "$SPROG checkout: Updating dir1d1
14813 U dir1d1/file1"
14814 dotest cvsadm-N5b "cat CVS/Repository" "\."
14815 dotest cvsadm-N5d "cat dir1d1/CVS/Repository" "mod1"
14816 rm -rf CVS dir1d1
14818 dotest cvsadm-N6 "$testcvs co -N 1d2mod" \
14819 "$SPROG checkout: Updating dir1d2
14820 U dir1d2/file2"
14821 dotest cvsadm-N6b "cat CVS/Repository" "\."
14822 dotest cvsadm-N6d "cat dir1d2/CVS/Repository" "mod2/sub2"
14823 rm -rf CVS dir1d2
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"
14831 rm -rf CVS dir2d1
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"
14839 rm -rf CVS dir2d2
14841 ## the ones in one-deep directories
14843 dotest cvsadm-N1d3 "$testcvs co -N -d dir 1mod" \
14844 "$SPROG checkout: Updating dir/1mod
14845 U dir/1mod/file1"
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"
14849 rm -rf CVS dir
14851 dotest cvsadm-N1d4 "$testcvs co -N -d dir 2mod" \
14852 "$SPROG checkout: Updating dir/2mod
14853 U dir/2mod/file2"
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"
14857 rm -rf CVS dir
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"
14865 rm -rf CVS dir
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"
14873 rm -rf CVS dir
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"
14882 rm -rf CVS dir
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" \
14891 "mod2/sub2"
14892 rm -rf CVS dir
14894 ## the ones in two-deep directories
14896 mkdir dir
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"
14903 rm -rf CVS dir
14905 mkdir dir
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"
14912 rm -rf CVS dir
14914 mkdir dir
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"
14921 rm -rf CVS dir
14923 mkdir dir
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"
14930 rm -rf CVS dir
14932 mkdir dir
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" \
14940 "mod1"
14941 rm -rf CVS dir
14943 mkdir dir
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" \
14951 "mod2/sub2"
14952 rm -rf CVS dir
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 ##################################################
14959 dokeep
14960 restore_adm
14962 # remove our junk
14963 cd ..
14964 rm -r 1
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
14973 emptydir)
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
14978 mkdir 1; cd 1
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"
14993 rm -rf CVS 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" > mod1/file1
15002 mkdir moda/modasub
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
15016 # End Populate.
15018 dotest emptydir-6 "${testcvs} co 2d1mod" \
15019 "${SPROG} checkout: Updating dir2d1/sub/sub2d1
15020 U dir2d1/sub/sub2d1/file1"
15021 cd dir2d1
15022 touch emptyfile
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
15026 # the repository.
15027 dotest_fail emptydir-7 "${testcvs} add emptyfile" \
15028 "${SPROG} \[add aborted]: cannot add to \`${CVSROOT_DIRNAME}/CVSROOT/Emptydir'"
15029 mkdir emptydir
15030 dotest_fail emptydir-8 "${testcvs} add emptydir" \
15031 "${CPROG} \[add aborted]: cannot add to \`${CVSROOT_DIRNAME}/CVSROOT/Emptydir'"
15032 cd ..
15033 rm -rf CVS dir2d1
15035 # OK, while we have an Emptydir around, test a few obscure
15036 # things about it.
15037 mkdir edir; cd edir
15038 dotest emptydir-9 "${testcvs} -q co -l CVSROOT" \
15039 "U CVSROOT${DOTSTAR}"
15040 cd CVSROOT
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" ''
15044 cd ../..
15045 rm -r edir
15046 cd ..
15048 # Now start playing with moda.
15049 mkdir 2; cd 2
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
15055 # test.
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"
15062 cd ..
15064 # Test the effect of a non-cvs directory already existing with the
15065 # same name as one in the modules file.
15066 mkdir 3; cd 3
15067 mkdir dir2d1
15068 dotest emptydir-16 "${testcvs} co 2d1mod" \
15069 "${SPROG} checkout: Updating dir2d1/sub/sub2d1
15070 U dir2d1/sub/sub2d1/file1"
15072 if $remote; then
15073 dotest emptydir-17 "cat dir2d1/CVS/Repository" "CVSROOT/Emptydir"
15074 else
15075 dotest_fail emptydir-17 "test -d dir2d1/CVS"
15078 dokeep
15079 cd ..
15080 rm -r 1 2 3
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
15088 abspath)
15090 # These tests test the thituations thin thwitch thoo theck
15091 # things thout twith thabsolute thaths. Threally.
15094 # CHECKOUTS
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" > mod1/file1
15105 echo "file2" > mod2/file2
15106 cd mod1
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"
15110 cd ..
15111 cd mod2
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"
15115 cd ..
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
15126 # Done.
15128 # Try checking out the module in a local directory
15129 if $remote; then
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
15134 U 1/file1"
15135 else
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"
15143 # Done. Clean up.
15144 rm -r $TESTDIR/1
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
15152 # via co -d.
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"
15158 rm -r $TESTDIR/1
15160 dotest abspath-3.2 "$testcvs -q co -d 1/2 mod1" \
15161 "U 1/2/file1"
15162 rm -r 1
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.
15167 mkdir 1
15168 if $remote; then
15169 dotest abspath-3ar "$testcvs co -d 1/2 mod1" \
15170 "$SPROG checkout: Updating 1/2
15171 U 1/2/file1"
15172 dotest abspath-3br "cat 1/CVS/Repository" .
15173 else
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
15183 # Done. Clean up.
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.
15199 if $remote; then
15200 dotest abspath-5ar "${testcvs} co -d 1 mod1 mod2" \
15201 "${SPROG} checkout: Updating 1/mod1
15202 U 1/mod1/file1
15203 ${SPROG} checkout: Updating 1/mod2
15204 U 1/mod2/file2"
15205 else
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"
15215 # Done. Clean up.
15216 rm -rf $TESTDIR/1
15219 # Try checking out the top-level module.
15220 if $remote; then
15221 dotest abspath-6ar "$testcvs co -d 1 ." \
15222 "$SPROG checkout: Updating 1
15223 $SPROG checkout: Updating 1/CVSROOT
15224 $DOTSTAR
15225 $SPROG checkout: Updating 1/mod1
15226 U 1/mod1/file1
15227 $SPROG checkout: Updating 1/mod2
15228 U 1/mod2/file2"
15229 else
15230 dotest abspath-6a "${testcvs} co -d ${TESTDIR}/1 ." \
15231 "${SPROG} checkout: Updating ${TESTDIR}/1
15232 ${SPROG} checkout: Updating ${TESTDIR}/1/CVSROOT
15233 ${DOTSTAR}
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"
15243 # Done. Clean up.
15244 rm -rf ${TESTDIR}/1
15246 # Test that an absolute pathname to some other directory
15247 # doesn't mess with the current working directory.
15248 mkdir 1
15249 cd 1
15250 if $remote; then
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"
15254 cd ..
15255 dotest abspath-7a-try2r "${testcvs} -q co -d 2 mod2" \
15256 "U 2/file2"
15257 cd 1
15258 else
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" \
15264 "U mod1/file1"
15265 cd mod1
15266 if $remote; then
15267 cd ../..
15268 dotest abspath-7dr "${testcvs} -q co -d 3 mod2" \
15269 "U 3/file2"
15270 cd 1/mod1
15271 else
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.
15282 dokeep
15283 cd ../..
15284 rm -r 1 2 3
15285 modify_repo rm -rf $CVSROOT_DIRNAME/mod1 $CVSROOT_DIRNAME/mod2
15290 abspath2)
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)"
15310 toplevel)
15311 # test the feature that cvs creates a CVS subdir also for
15312 # the toplevel directory
15314 # First set the TopLevelAdmin setting.
15315 mkdir 1; cd 1
15316 dotest toplevel-1a "${testcvs} -q co CVSROOT/config" \
15317 "U CVSROOT/config"
15318 cd CVSROOT
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"
15324 cd ../..
15325 rm -r 1
15327 mkdir 1; cd 1
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"
15333 cd top-dir
15335 touch file1
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"
15342 cd ..
15344 cd second-dir
15345 touch file2
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"
15353 cd ../..
15354 rm -r 1; mkdir 1; cd 1
15355 dotest toplevel-5 "${testcvs} co top-dir" \
15356 "${SPROG} checkout: Updating top-dir
15357 U top-dir/file1"
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"
15377 # test or not.
15378 dotest toplevel-9 "${testcvs} update -d" \
15379 "${SPROG} update: Updating \.
15380 ${SPROG} update: Updating CVSROOT
15381 ${DOTSTAR}
15382 ${SPROG} update: Updating top-dir"
15384 cd ..
15385 rm -r 1; mkdir 1; cd 1
15386 dotest toplevel-10 "${testcvs} co top-dir" \
15387 "${SPROG} checkout: Updating top-dir
15388 U top-dir/file1"
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).
15399 rm -r CVS
15400 # Now set the permissions so we can't recreate it.
15401 if test -n "$remotehost"; then
15402 # Cygwin again.
15403 $CVS_RSH $remotehost "chmod -w $TESTDIR/1"
15404 else
15405 chmod -w ../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"
15417 chmod +w ../1
15419 dokeep
15420 restore_adm
15421 cd ..
15422 rm -r 1
15423 modify_repo rm -rf $CVSROOT_DIRNAME/top-dir \
15424 $CVSROOT_DIRNAME/second-dir
15429 toplevel2)
15430 # Similar to toplevel, but test the case where TopLevelAdmin=no.
15432 # First set the TopLevelAdmin setting.
15433 mkdir 1; cd 1
15434 dotest toplevel2-1a "${testcvs} -q co CVSROOT/config" \
15435 "U CVSROOT/config"
15436 cd CVSROOT
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"
15442 cd ../..
15443 rm -r 1
15445 # Now set up some directories and subdirectories
15446 mkdir 1; cd 1
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"
15452 cd top-dir
15454 touch file1
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"
15461 cd ..
15463 cd second-dir
15464 touch file2
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"
15472 cd ../..
15473 rm -r 1; mkdir 1; cd 1
15474 dotest toplevel2-5 "${testcvs} co top-dir" \
15475 "${SPROG} checkout: Updating top-dir
15476 U top-dir/file1"
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"
15489 cd ..
15490 rm -r 1; mkdir 1; cd 1
15491 dotest toplevel2-10 "${testcvs} co top-dir" \
15492 "${SPROG} checkout: Updating top-dir
15493 U top-dir/file1"
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" ""
15499 dokeep
15500 cd ..
15501 restore_adm
15502 rm -r 1
15503 modify_repo rm -rf $CVSROOT_DIRNAME/top-dir \
15504 $CVSROOT_DIRNAME/second-dir
15509 rstar-toplevel)
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"
15519 dokeep
15524 trailingslashes)
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 ."
15530 cd t
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.
15536 cd ../t2
15537 dotest trailingslashes-1 "$testcvs -q up CVSROOT"
15538 dotest_fail trailingslashes-1a "test -f topfile"
15540 # FIXCVS:
15541 # Now the one that fails in remote mode.
15542 # This highlights one of the failure cases mentioned in TODO item
15543 # #205.
15544 if $remote; then
15545 dotest trailingslashes-2 "$testcvs -q up CVSROOT/" \
15546 "U topfile"
15547 dotest trailingslashes-2a "test -f topfile"
15548 else
15549 dotest trailingslashes-2 "$testcvs -q up CVSROOT/"
15550 dotest_fail trailingslashes-2a "test -f topfile"
15553 dokeep
15554 cd ../..
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
15581 C CVSROOT/config
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
15585 C CVSROOT/loginfo
15586 ${CPROG} checkout: move away \`CVSROOT/modules'; it is in the way
15587 C CVSROOT/modules
15588 ${CPROG} checkout: move away \`CVSROOT/notify'; it is in the way
15589 C CVSROOT/notify
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
15595 C CVSROOT/posttag
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
15599 C CVSROOT/preproxy
15600 ${CPROG} checkout: move away \`CVSROOT/rcsinfo'; it is in the way
15601 C CVSROOT/rcsinfo
15602 ${CPROG} checkout: move away \`CVSROOT/taginfo'; it is in the way
15603 C CVSROOT/taginfo
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
15612 VERS: 1\.[0-9]*
15613 \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*"
15615 dokeep
15616 cd $TESTDIR
15621 mflag)
15622 for message in '' ' ' '
15623 ' ' test' ; do
15624 # Set up
15625 mkdir a-dir; cd a-dir
15626 # Test handling of -m during import
15627 echo testa >>test
15628 if ${testcvs} import -m "$message" a-dir A A1 >>${LOGFILE} 2>&1;then
15629 pass 156
15630 else
15631 fail 156
15633 # Must import twice since the first time uses inline code that
15634 # avoids RCS call.
15635 echo testb >>test
15636 if ${testcvs} import -m "$message" a-dir A A2 >>${LOGFILE} 2>&1;then
15637 pass 157
15638 else
15639 fail 157
15641 # Test handling of -m during ci
15642 cd ..; rm -r a-dir
15643 if ${testcvs} co a-dir >>${LOGFILE} 2>&1; then
15644 pass 158
15645 else
15646 fail 158
15648 cd a-dir
15649 echo testc >>test
15650 if ${testcvs} ci -m "$message" >>${LOGFILE} 2>&1; then
15651 pass 159
15652 else
15653 fail 159
15655 # Test handling of -m during rm/ci
15656 rm test;
15657 if ${testcvs} rm test >>${LOGFILE} 2>&1; then
15658 pass 160
15659 else
15660 fail 160
15662 if ${testcvs} ci -m "$message" >>${LOGFILE} 2>&1; then
15663 pass 161
15664 else
15665 fail 161
15668 dokeep
15669 # Clean up
15670 cd ..
15671 rm -r a-dir
15672 modify_repo rm -rf $CVSROOT_DIRNAME/a-dir
15673 done
15678 editor)
15679 # More tests of log messages, in this case the ability to
15680 # run an external editor.
15681 # TODO:
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
15688 #!${TESTSHELL}
15689 sleep 1
15690 sed <\$1 -e 's/^/x/' >${TESTDIR}/edit.new
15691 mv ${TESTDIR}/edit.new \$1
15692 exit 0
15694 chmod +x ${TESTDIR}/editme
15696 mkdir 1; cd 1
15697 dotest editor-1 "${testcvs} -q co -l ." ''
15698 mkdir first-dir
15699 dotest editor-2 "${testcvs} add first-dir" \
15700 "Directory ${CVSROOT_DIRNAME}/first-dir added to the repository"
15701 cd first-dir
15702 touch file1 file2
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
15713 T file2"
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
15733 head: 1\.1
15734 branch:
15735 locks: strict
15736 access list:
15737 keyword substitution: kv
15738 total revisions: 2; selected revisions: 2
15739 description:
15740 ----------------------------
15741 revision 1\.1
15742 date: ${ISO8601DATE}; author: ${username}; state: Exp; commitid: ${commitid};
15743 branches: 1\.1\.2;
15744 xCVS: ----------------------------------------------------------------------
15745 xCVS: Enter Log. Lines beginning with .CVS:. are removed automatically
15746 xCVS:
15747 xCVS: Committing in .
15748 xCVS:
15749 xCVS: Added Files:
15750 xCVS: file1 file2
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
15757 xCVS:
15758 xCVS: Committing in .
15759 xCVS:
15760 xCVS: Modified Files:
15761 xCVS: Tag: br
15762 xCVS: file1
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
15771 head: 1\.1
15772 branch:
15773 locks: strict
15774 access list:
15775 keyword substitution: kv
15776 total revisions: 2; selected revisions: 2
15777 description:
15778 ----------------------------
15779 revision 1\.1
15780 date: ${ISO8601DATE}; author: ${username}; state: Exp; commitid: ${commitid};
15781 branches: 1\.1\.2;
15782 xCVS: ----------------------------------------------------------------------
15783 xCVS: Enter Log. Lines beginning with .CVS:. are removed automatically
15784 xCVS:
15785 xCVS: Committing in .
15786 xCVS:
15787 xCVS: Added Files:
15788 xCVS: file1 file2
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
15795 xCVS:
15796 xCVS: Modified Files:
15797 xCVS: Tag: br
15798 xCVS: file2
15799 xCVS: ----------------------------------------------------------------------
15800 =============================================================================" "
15801 RCS file: ${CVSROOT_DIRNAME}/first-dir/file2,v
15802 Working file: file2
15803 head: 1\.1
15804 branch:
15805 locks: strict
15806 access list:
15807 keyword substitution: kv
15808 total revisions: 2; selected revisions: 2
15809 description:
15810 ----------------------------
15811 revision 1\.1
15812 date: ${ISO8601DATE}; author: ${username}; state: Exp; commitid: ${commitid};
15813 branches: 1\.1\.2;
15814 xCVS: ----------------------------------------------------------------------
15815 xCVS: Enter Log. Lines beginning with .CVS:. are removed automatically
15816 xCVS:
15817 xCVS: Committing in .
15818 xCVS:
15819 xCVS: Added Files:
15820 xCVS: file1 file2
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
15827 xCVS:
15828 xCVS: Committing in .
15829 xCVS:
15830 xCVS: Modified Files:
15831 xCVS: Tag: br
15832 xCVS: file2
15833 xCVS: ----------------------------------------------------------------------
15834 ============================================================================="
15836 # Test CVS's response to an unchanged log message
15837 cat >${TESTDIR}/editme <<EOF
15838 #!${TESTSHELL}
15839 sleep 1
15840 exit 0
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
15851 #!${TESTSHELL}
15852 sleep 1
15853 cat /dev/null >\$1
15854 exit 0
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
15865 #!${TESTSHELL}
15866 sleep 1
15867 echo >\$1
15868 exit 0
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
15879 #!${TESTSHELL}
15880 sleep 1
15881 cat \$1 >${TESTDIR}/edit.new
15882 mv ${TESTDIR}/edit.new \$1
15883 exit 0
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
15894 # hosts.
15895 cd ..
15896 dotest editor-emptylog-continue-1 "${testcvs} -q co CVSROOT/loginfo" \
15897 "U CVSROOT/loginfo"
15899 cd CVSROOT
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"
15905 cd ../first-dir
15906 cat >${TESTDIR}/editme <<EOF
15907 #!${TESTSHELL}
15908 sleep 1
15909 cp /dev/null \$1
15910 exit 1
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...
15923 if $remote; then
15924 dotest editor-emptylog-continue-4r \
15925 "cat $CVSROOT_DIRNAME/CVSROOT/commitlog" \
15926 "Start-Log
15927 Update of $CVSROOT_DIRNAME/CVSROOT
15928 In directory $hostname:$TMPDIR/cvs-serv[0-9a-z]*
15930 Modified Files:
15931 loginfo
15932 Log Message:
15933 loggem
15934 End-Log
15935 Start-Log
15936 Update of $CVSROOT_DIRNAME/first-dir
15937 In directory $hostname:$TMPDIR/cvs-serv[0-9a-z]*
15939 Modified Files:
15940 file1
15941 Log Message:
15943 End-Log"
15944 else
15945 dotest editor-emptylog-continue-4 \
15946 "cat $CVSROOT_DIRNAME/CVSROOT/commitlog" \
15947 "Start-Log
15948 Update of $CVSROOT_DIRNAME/CVSROOT
15949 In directory $hostname:$TESTDIR/1/CVSROOT
15951 Modified Files:
15952 loginfo
15953 Log Message:
15954 loggem
15955 End-Log
15956 Start-Log
15957 Update of $CVSROOT_DIRNAME/first-dir
15958 In directory $hostname:$TESTDIR/1/first-dir
15960 Modified Files:
15961 file1
15962 Log Message:
15964 End-Log"
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
15971 head: 1\.2
15972 branch:
15973 locks: strict
15974 access list:
15975 keyword substitution: kv
15976 total revisions: 3; selected revisions: 1
15977 description:
15978 ----------------------------
15979 revision 1\.2
15980 date: ${ISO8601DATE}; author: ${username}; state: Exp; lines: +0 -0; commitid: ${commitid};
15981 \*\*\* empty log message \*\*\*
15982 ============================================================================="
15984 # clean up
15985 dokeep
15986 # restore the default loginfo script
15987 restore_adm
15988 cd ../..
15989 rm -r 1
15990 rm $TESTDIR/editme
15991 modify_repo rm -rf $CVSROOT_DIRNAME/first-dir
15996 env)
15997 # Test to see if the CVS_PID environment variable is being set
15998 mkdir ${TESTDIR}/env
15999 cd ${TESTDIR}/env
16000 dotest env-1 "${testcvs} -Q co . >>${LOGFILE}" ''
16002 cat > ${TESTDIR}/env/test-cvs-pid <<EOF
16003 #!${TESTSHELL}
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,,'\`
16010 else
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.
16017 pid=\$\$
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;
16025 next;
16027 { print \$pidx " " \$ppidx }' |\\
16028 grep "^\$pid " |\\
16029 awk '{ print \$NF }'\`
16030 else
16031 ppid=unkown
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
16038 exit 0
16039 else
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
16047 exit 1
16049 else
16050 echo The environment variable CVS_PID is not set.
16051 exit 1
16054 if test -n "$remotehost"; then
16055 $CVS_RSH $remotehost "chmod +x ${TESTDIR}/env/test-cvs-pid"
16056 else
16057 chmod +x ${TESTDIR}/env/test-cvs-pid
16059 cd CVSROOT
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"
16065 cd ..
16066 mkdir env
16067 dotest env-3 "${testcvs} -q add env" \
16068 "Directory ${CVSROOT_DIRNAME}/env added to the repository"
16069 cd env
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"
16078 dokeep
16079 # undo commitinfo changes
16080 restore_adm
16081 cd ../..
16082 rm -fr $TESTDIR/env
16083 modify_repo rm -rf $CVSROOT_DIRNAME/env
16088 errmsg1)
16089 modify_repo mkdir $CVSROOT_DIRNAME/1dir
16090 mkdir 1
16091 cd 1
16092 dotest errmsg1-init-1 "$testcvs -Q co 1dir"
16093 cd 1dir
16094 touch foo
16095 dotest errmsg-init-2 "$testcvs -Q add foo"
16096 if ${testcvs} ci -m added >>${LOGFILE} 2>&1; then
16097 pass 164
16098 else
16099 fail 164
16101 cd ../..
16102 mkdir 2
16103 cd 2
16104 if ${testcvs} -q co 1dir >>${LOGFILE}; then
16105 pass 165
16106 else
16107 fail 165
16109 chmod a-w 1dir
16110 cd ../1/1dir
16111 rm foo;
16112 if ${testcvs} rm foo >>${LOGFILE} 2>&1; then
16113 pass 166
16114 else
16115 fail 166
16117 if ${testcvs} ci -m removed >>${LOGFILE} 2>&1; then
16118 pass 167
16119 else
16120 fail 167
16123 cd ../../2/1dir
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.
16127 if $remote; then
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"
16132 else
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"
16139 dokeep
16140 cd ..
16141 chmod u+w 1dir
16142 cd ..
16143 rm -r 1 2
16144 modify_repo rm -rf $CVSROOT_DIRNAME/1dir
16149 errmsg2)
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.
16158 mkdir 1; cd 1
16159 dotest errmsg2-1 "$testcvs -q co -l ."
16160 mkdir first-dir
16161 dotest errmsg2-2 "${testcvs} add first-dir" \
16162 "Directory ${CVSROOT_DIRNAME}/first-dir added to the repository"
16163 cd first-dir
16164 dotest_fail errmsg2-3 "${testcvs} add CVS" \
16165 "${CPROG} add: cannot add special file .CVS.; skipping"
16166 touch file1
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
16171 # least currently.
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"
16189 mkdir sdir
16190 cd ..
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"
16202 cd first-dir
16204 touch file10
16205 mkdir sdir10
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.
16219 cd ..
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.
16236 mkdir bogus-dir
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
16241 # error message.
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"
16247 rm -r bogus-dir
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"
16269 dokeep
16270 cd ..
16271 rm -r 1
16272 modify_repo rm -rf $CVSROOT_DIRNAME/first-dir
16277 errmsg3)
16278 # Test the *PANIC* message caused by missing administration files
16279 mkdir errmsg3
16280 cd errmsg3
16281 mkdir CVS
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!"
16290 dokeep
16291 cd ..
16292 rm -r errmsg3
16297 close-stdout)
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
16301 mkdir close-stdout
16302 cd close-stdout
16303 echo a > file
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.*"
16313 dokeep
16314 cd ..
16315 rm -r close-stdout
16316 modify_repo rm -rf $CVSROOT_DIRNAME/closeout
16317 else
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
16328 continue
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"
16344 dokeep
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
16354 adderrmsg)
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.
16359 mkdir 1; cd 1
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"
16364 cd adderrmsg-dir
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
16373 touch file1
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"
16378 # add it twice
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" ""
16392 # clean up
16393 dokeep
16394 cd ../..
16395 rm -r 1
16396 modify_repo rm -rf $CVSROOT_DIRNAME/adderrmsg-dir
16401 opterrmsg)
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
16409 # -z.
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"
16422 devcom)
16423 modify_repo mkdir $CVSROOT_DIRNAME/first-dir
16424 mkdir 1
16425 cd 1
16426 dotest devcom-1 "$testcvs -q co first-dir"
16428 cd first-dir
16429 echo abb >abb
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"
16442 echo abc >abc
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"
16451 cd ../..
16452 mkdir 2
16453 cd 2
16455 dotest devcom-8 "$testcvs -q co first-dir" \
16456 "U first-dir/abb
16457 U first-dir/abc"
16459 cd 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
16470 # self-evident.
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"
16474 echo aaaa >>abb
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" \
16522 'T abb
16523 T abc'
16524 cd ../..
16525 mkdir 3
16526 cd 3
16528 # Test commented out because the bug it tests for is not fixed
16529 # The error is:
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" \
16535 'U first-dir/abb'
16536 cd ..
16537 # Since first-dir/abb is readonly, use -f.
16538 rm -rf 3
16540 # Test checking out the directory rather than the file.
16541 mkdir 3
16542 cd 3
16543 dotest devcom-t2 "${testcvs} -q co -rtag first-dir" \
16544 'U first-dir/abb
16545 U first-dir/abc'
16546 cd ..
16547 # Since the files are readonly, use -f.
16548 rm -rf 3
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
16554 mkdir 3
16555 cd 3
16556 dotest devcom-t3 "${testcvs} -q co -rtag first-dir" \
16557 'U first-dir/abb
16558 U first-dir/abc'
16559 cd ..
16560 # Since the files are readonly, use -f.
16561 rm -rf 3
16563 # Now remove all the file attributes
16564 cd 2/first-dir
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" ''
16572 cd ../..
16573 mkdir 3
16574 cd 3
16575 dotest devcom-some1 "${testcvs} -q co first-dir" 'U first-dir/abb
16576 U first-dir/abc'
16577 dotest devcom-some2 "test -w first-dir/abb" ''
16578 dotest_fail devcom-some3 "test -w first-dir/abc" ''
16580 dokeep
16581 cd ..
16582 # Use -f because of the readonly files.
16583 rm -rf 1 2 3
16584 modify_repo rm -rf $CVSROOT_DIRNAME/first-dir
16589 devcom2)
16590 # More watch tests, most notably setting watches on
16591 # files in various different states.
16592 modify_repo mkdir $CVSROOT_DIRNAME/first-dir
16593 mkdir 1
16594 cd 1
16595 dotest devcom2-1 "${testcvs} -q co first-dir" ''
16596 cd 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" ''
16603 touch w1 w2 w3 nw1
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
16608 # adds the file.
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).
16624 cd ../..
16625 mkdir 2
16626 cd 2
16627 dotest devcom2-7 "${testcvs} -q co first-dir" 'U first-dir/nw1
16628 U first-dir/w1
16629 U first-dir/w2
16630 U first-dir/w3'
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" ''
16636 cd first-dir
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" \
16648 "Fw1 _watched=
16649 Fw2 _watched=
16650 Fw3 _watched=
16651 Fnw1 _watched=
16652 D _watched="
16653 cd ..
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"
16661 cd first+dir
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" \
16667 "Fw1 _watched=
16668 Fw2 _watched=
16669 Fw3 _watched=
16670 Fnw1 _watched=
16671 D _watched="
16673 dokeep
16674 cd ../..
16675 # Use -f because of the readonly files.
16676 rm -rf 1 2
16677 modify_repo rm -rf $CVSROOT_DIRNAME/first-dir
16682 devcom3)
16683 # More watch tests, most notably handling of features designed
16684 # for future expansion.
16685 modify_repo mkdir $CVSROOT_DIRNAME/first-dir
16686 mkdir 1
16687 cd 1
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"
16692 cd CVSROOT
16693 echo "ALL $TESTDIR/1/loggit %r %p %c" >>postwatch
16694 dotest devcom3-init-2 "$testcvs -Q ci -mlog-watch"
16695 cd .. # 1
16697 cat >loggit <<EOF
16698 #!$TESTSHELL
16699 echo \${1+"\$@"} >>$TESTDIR/1/watch-log
16701 # #^@&!^@ Cygwin.
16702 if test -n "$remotehost"; then
16703 $CVS_RSH $remotehost "chmod +x $TESTDIR/1/loggit"
16704 else
16705 chmod +x loggit
16710 dotest devcom3-1 "$testcvs -q co first-dir"
16711 cd first-dir
16713 touch w1 w2
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" \
16721 "Fw1 _watched=
16722 Fw2 _watched="
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
16726 Enew line here
16727 G@#$^!@#=&
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
16733 # too.
16734 dotest devcom3-7 "cat ${CVSROOT_DIRNAME}/first-dir/CVS/fileattr" \
16735 "Fw2 _watched=
16736 G@#..!@#=&
16737 Enew line here"
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" \
16749 "Fw2 _watched=
16750 Fw1 _watched=
16751 Enew line here
16752 G@#..!@#=&"
16754 # Now test disconnected "cvs edit" and the format of the
16755 # CVS/Notify file.
16756 if $remote; then
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}",
16763 # but which is:
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
16778 if $proxy; then
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"
16782 rm CVS/Notify
16783 dotest devcom3-9hp "$testcvs watchers w1"
16784 else
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"
16794 cd ../..
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
16802 mkdir 2; cd 2
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"
16806 notifyworks=false
16807 if $remote; then
16808 if $proxy; then :; else
16809 notifyworks=:
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"
16819 else
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"
16826 dokeep
16827 restore_adm
16828 cd ..
16829 # Use -f because of the readonly files.
16830 rm -rf 1 2
16831 modify_repo rm -rf $CVSROOT_DIRNAME/first-dir
16836 watch4)
16837 # More watch tests, including adding directories.
16838 mkdir 1; cd 1
16839 dotest watch4-0a "${testcvs} -q co -l ." ''
16840 mkdir first-dir
16841 dotest watch4-0b "${testcvs} add first-dir" \
16842 "Directory ${CVSROOT_DIRNAME}/first-dir added to the repository"
16844 cd first-dir
16845 dotest watch4-1 "${testcvs} watch on" ''
16846 # This is just like the 173 test
16847 touch file1
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.
16855 mkdir subdir
16856 dotest watch4-4 "${testcvs} add subdir" \
16857 "Directory ${CVSROOT_DIRNAME}/first-dir/subdir added to the repository"
16858 cd subdir
16859 touch sfile
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"
16866 cd ../../..
16867 mkdir 2; cd 2
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" ''
16872 cd first-dir
16873 dotest watch4-10 "${testcvs} edit file1" ''
16874 echo 'edited in 2' >file1
16875 cd ../..
16877 cd 1/first-dir
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"
16889 cd ../..
16890 cd 2/first-dir
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
16898 C file1"
16899 if (echo yes | ${testcvs} unedit file1) >>${LOGFILE}; then
16900 pass watch4-14
16901 else
16902 fail watch4-15
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"
16913 cd ../..
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"
16919 dokeep
16920 # Specify -f because of the readonly files.
16921 rm -rf 1 2
16922 modify_repo rm -rf $CVSROOT_DIRNAME/first-dir
16927 watch5)
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 ." ''
16946 mkdir first-dir
16947 dotest watch5-0b "${testcvs} add first-dir" \
16948 "Directory ${CVSROOT_DIRNAME}/first-dir added to the repository"
16950 cd first-dir
16951 dotest watch5-1 "${testcvs} watch on" ''
16952 # This is just like the 173 test
16953 touch file1
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
16963 pass watch5-6
16964 else
16965 fail watch5-6
16967 dotest watch5-7 "test -f CVS/Base/file1" ''
16969 # Here's where the file used to dissappear
16970 touch file1
16971 if ${testcvs} status file1 >>${LOGFILE} 2>&1; then
16972 pass watch5-8
16973 else
16974 fail watch5-8
16976 dotest watch5-10 "test -f CVS/Base/file1" ''
16978 # Make sure update won't remove the file either
16979 touch file1
16980 dotest watch5-11 "${testcvs} -q up" ''
16981 dotest watch5-12 "test -f CVS/Base/file1" ''
16983 dokeep
16984 cd ../..
16985 rm -r watch5
16986 modify_repo rm -rf $CVSROOT_DIRNAME/first-dir
16991 watch6-0)
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 ."
16999 cd top
17000 mkdir watch6-0
17001 dotest watch6-0-setup-2 "$testcvs -Q add watch6-0"
17002 cd 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
17014 mkdir dir1
17015 mkdir dir2
17016 mkdir dir3
17017 echo afile>afile
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"
17030 dokeep
17031 cd ../../..
17032 rm -rf watch6-0
17033 modify_repo rm -rf $CVSROOT_DIRNAME/watch6-0
17038 watch6)
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 ."
17043 cd top
17044 mkdir watch6
17045 dotest watch6-setup-2 "$testcvs -Q add watch6"
17047 # I don't recall why I had these next 3 lines.
17048 cd ..
17049 dotest watch6-setup-3 "$testcvs -Q co watch6"
17050 cd watch6
17052 mkdir subdir
17053 dotest watch6-setup-4 "$testcvs -Q add subdir"
17054 cd subdir
17056 # START watch add/remove sequence
17057 dotest watch6-1 "$testcvs -Q watch add"
17058 dotest watch6-2 \
17059 "grep '_watchers' $CVSROOT_DIRNAME/watch6/subdir/CVS/fileattr >/dev/null"
17061 dotest watch6-3 "$testcvs watch on"
17062 dotest watch6-4 \
17063 "grep '_watchers' $CVSROOT_DIRNAME/watch6/subdir/CVS/fileattr >/dev/null"
17064 dotest watch6-5 \
17065 "grep '_watched' $CVSROOT_DIRNAME/watch6/subdir/CVS/fileattr >/dev/null"
17067 dotest watch6-6 "$testcvs watch off"
17068 dotest watch6-7 \
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"
17088 dotest watch6-15 \
17089 "grep '_watchers' $CVSROOT_DIRNAME/watch6/subdir/CVS/fileattr >/dev/null"
17091 dotest watch6-16 "$testcvs watch on"
17092 dotest watch6-17 \
17093 "grep '_watchers' $CVSROOT_DIRNAME/watch6/subdir/CVS/fileattr >/dev/null"
17094 dotest watch6-18 \
17095 "grep '_watched' $CVSROOT_DIRNAME/watch6/subdir/CVS/fileattr >/dev/null"
17097 dotest watch6-19 "$testcvs watch off"
17098 dotest watch6-20 \
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
17110 if $keep; then
17111 echo Keeping $TESTDIR and exiting due to --keep
17112 exit 0
17114 cd ../../..
17115 rm -r watch6
17116 modify_repo rm -rf $CVSROOT_DIRNAME/watch6
17121 edit-check)
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 ."
17126 mkdir first-dir
17127 dotest edit-check-0b "$testcvs add first-dir" \
17128 "Directory $CVSROOT_DIRNAME/first-dir added to the repository"
17130 cd first-dir
17131 dotest edit-check-1 "$testcvs watch on"
17133 echo foo > file1
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" \
17157 "$editorsLineRE
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"
17166 echo "bar" > file1
17167 dotest_fail edit-check-7b "$testcvs edit -c file1" \
17168 "$editorsLineRE
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
17185 # the issue.
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" \
17197 "$editorsLineRE
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"
17206 chmod u+w 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"
17219 cd ..
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"
17226 cd first-dir
17227 dotest edit-check-16c "$testcvs editors file1"
17229 cd ..
17230 dotest edit-check-17a "$testcvs edit -c"
17231 dotest_fail edit-check-17b "$testcvs edit -c" \
17232 "$R_editorsLineRE
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"
17242 cd first-dir
17244 # Manually fake another editor:
17246 # Try to gaurantee a seperate name for an "other" user editting
17247 # the file.
17248 otherUser="dummyUser"
17249 if [ x"$USER" = x"$otherUser" ] ; then
17250 otherUser="dummyUser2"
17252 if [ x"$LOGNAME" = x"$otherUser" ] ; then
17253 otherUser="dummyUser3"
17255 tabChar=' '
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/%'`"
17261 echo \
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" \
17272 "$A_editorsLineRE
17273 $NF_editorsLineRE"
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" \
17279 "$O_editorsLineRE
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" \
17285 "$A_editorsLineRE
17286 $NF_editorsLineRE"
17288 echo "Yet another change" >file1
17290 dotest_fail edit-check-23a "$testcvs edit -c" \
17291 "$A_editorsLineRE
17292 $NF_editorsLineRE
17293 $SPROG edit: Skipping file \`file1' due to existing editors\."
17295 dotest edit-check-23b "$testcvs editors" \
17296 "$A_editorsLineRE
17297 $NF_editorsLineRE"
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" \
17310 "$A_editorsLineRE
17311 $NF_editorsLineRE"
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"
17320 chmod u+w file1
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.
17340 if $remote; then
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" \
17357 "$editorsLineRE
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
17364 # the same time:
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"
17375 mkdir second-dir
17376 dotest edit-check-32c "$testcvs add second-dir" \
17377 "Directory $CVSROOT_DIRNAME/first-dir/second-dir added to the repository"
17378 cd second-dir
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"
17390 cd ..
17392 dotest edit-check-33a "$testcvs edit -c"
17394 dotest edit-check-33b "$testcvs editors" \
17395 "$AF_editorsLineRE
17396 $AF_editorsLineRE
17397 $F3_editorsLineRE"
17398 dotest edit-check-33c "test -w second-dir/file3"
17400 dotest_fail edit-check-34a "$testcvs edit -c file1 file2" \
17401 "$AF_editorsLineRE
17402 $SPROG edit: Skipping file \`file1' due to existing editors\.
17403 $AF_editorsLineRE
17404 $SPROG edit: Skipping file \`file2' due to existing editors\."
17406 dotest edit-check-34b "$testcvs editors file1 file2" \
17407 "$editorsLineRE
17408 $AF_editorsLineRE"
17410 dotest edit-check-35a "$testcvs unedit file1"
17411 dotest edit-check-35b "$testcvs editors" \
17412 "$AF_editorsLineRE
17413 $F3_editorsLineRE"
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"
17420 dokeep
17421 cd ../..
17422 rm -rf edit-check
17423 rm -rf $CVSROOT_DIRNAME/first-dir
17428 unedit-without-baserev)
17429 mkdir 1; cd 1
17430 module=x
17432 file=m
17433 echo foo > $file
17434 dotest unedit-without-baserev-1 \
17435 "$testcvs -Q import -m . $module X Y" ''
17436 dotest unedit-without-baserev-2 "$testcvs -Q co $module" ''
17437 cd $module
17439 dotest unedit-without-baserev-3 "$testcvs -Q edit $file" ''
17441 echo add a line >> $file
17442 rm -f CVS/Baserev
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
17456 U m"
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
17462 # missing.
17463 cd ../..
17464 mkdir 2; cd 2
17465 dotest unedit-without-baserev-7 "${testcvs} -Q co x" ''
17466 cd x
17468 dotest unedit-without-baserev-10 "${testcvs} edit m" ''
17469 echo 'edited in 2' >m
17470 cd ../..
17472 cd 1/x
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"
17481 cd ../..
17482 cd 2/x
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
17490 C m"
17491 rm CVS/Baserev
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
17497 U m"
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"
17506 dokeep
17507 cd ../..
17508 rm -rf 1
17509 rm -r 2
17510 modify_repo rm -rf $CVSROOT_DIRNAME/$module
17515 ignore)
17516 # On Windows, we can't check out CVSROOT, because the case
17517 # insensitivity means that this conflicts with cvsroot.
17518 mkdir ignore
17519 cd ignore
17521 dotest ignore-1 "${testcvs} -q co CVSROOT" "U CVSROOT/${DOTSTAR}"
17522 cd CVSROOT
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"
17533 cd ..
17534 if echo "yes" | ${testcvs} release -d CVSROOT >>${LOGFILE} ; then
17535 pass ignore-4
17536 else
17537 fail ignore-4
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
17545 cd 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'
17569 cd ..
17570 rm -r dir-to-import
17572 mkdir 1
17573 cd 1
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'
17583 cd first-dir
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
17587 # as a bug.
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.
17598 rm optig.c
17599 if $remote; then
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
17608 # contents.
17609 touch bar.c
17611 dotest ignore-11ar "$testcvs -q ci -m commit-it" \
17612 "$QUESTION notig.c"
17615 # now test .cvsignore files
17616 cd ..
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" \
17640 "M foobar.c
17641 You have \[1\] altered files in this repository.
17642 Are you sure you want to release (and delete) directory .second-dir': "
17644 dokeep
17645 cd ../..
17646 rm -r ignore
17647 modify_repo rm -rf $CVSROOT_DIRNAME/ignore
17652 ignore-on-branch)
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" ''
17660 cd setup
17661 echo file1 >file1
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'
17668 echo file2 >file2
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"
17675 cd ..
17677 # Check out branch.
17679 # - This was the original failure case - file2 would not be flagged
17680 # with a '?'
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.
17689 if $remote; then
17690 dotest ignore-on-branch-3 "$testcvs -q tag -b branch2" \
17691 '? file2
17692 T file1'
17693 else
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'
17705 dokeep
17706 cd ../..
17707 rm -r ignore-on-branch
17708 modify_repo rm -rf $CVSROOT_DIRNAME/ignore-on-branch
17713 binfiles)
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
17723 mkdir 1; cd 1
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
17728 cd first-dir
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"
17736 cd ../..
17737 mkdir 2; cd 2
17738 dotest binfiles-4 "${testcvs} -q co first-dir" 'U first-dir/binfile'
17739 cd first-dir
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}
17751 Sticky Tag: (none)
17752 Sticky Date: (none)
17753 Sticky Options: -kb"
17755 # Test that "-kk" does not override "-kb"
17756 cd ../..
17757 mkdir 2a; cd 2a
17758 dotest binfiles-4 "${testcvs} -q co -kk first-dir" 'U first-dir/binfile'
17759 cd first-dir
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}
17770 Sticky Tag: (none)
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
17776 # directories
17777 cd ../..
17778 rm -r 2a
17779 mkdir 3; cd 3
17780 dotest binfiles-5.5b0 "${testcvs} -q co first-dir/binfile" \
17781 'U first-dir/binfile'
17782 cd first-dir
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}
17790 Sticky Tag: (none)
17791 Sticky Date: (none)
17792 Sticky Options: -kb"
17793 cd ../..
17794 rm -r 3
17795 # test that "-kk" does not override "-kb"
17796 mkdir 3; cd 3
17797 dotest binfiles-5.5b0 "${testcvs} -q co -kk first-dir/binfile" \
17798 'U first-dir/binfile'
17799 cd first-dir
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}
17807 Sticky Tag: (none)
17808 Sticky Date: (none)
17809 Sticky Options: -kb"
17810 cd ../..
17811 rm -r 3
17812 cd 2/first-dir
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
17833 C binfile"
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" ''
17855 cd ../..
17857 mkdir 3
17858 cd 3
17859 dotest binfiles-13a0 "${testcvs} -q co -r HEAD first-dir" \
17860 'U first-dir/binfile'
17861 cd first-dir
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"
17872 cd ../..
17873 rm -r 3
17875 cd 2/first-dir
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}
17889 Sticky Tag: (none)
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
17894 done"
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}
17907 Sticky Tag: (none)
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}
17919 Sticky Tag: (none)
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" \
17931 '[UP] 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}
17939 Sticky Tag: (none)
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" \
17945 "[UP] 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}
17953 Sticky Tag: (none)
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
17958 done"
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}
17967 Sticky Tag: (none)
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
17975 done"
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
17980 done"
17981 dotest binfiles-o3 "${testcvs} -q log -h -N binfile" "
17982 RCS file: ${CVSROOT_DIRNAME}/first-dir/binfile,v
17983 Working file: binfile
17984 head: 1\.3
17985 branch:
17986 locks: strict
17987 access list:
17988 keyword substitution: v
17989 total revisions: 1
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" ""
17997 dokeep
17998 cd ../..
17999 modify_repo rm -rf $CVSROOT_DIRNAME/first-dir
18000 rm -r 1 2
18005 binfiles2)
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
18025 mkdir 1; cd 1
18026 dotest binfiles2-1 "${testcvs} -q co first-dir" ''
18027 cd 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
18062 T brmod-trmod
18063 T brmod-wdmod'
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"
18069 cp ../binfl2 brmod
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
18083 [UP] brmod
18084 [UP] brmod-trmod
18085 [UP] brmod-wdmod"
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" \
18095 "U binfile\.dat
18096 U brmod
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
18100 C brmod-trmod
18101 M brmod-wdmod
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
18105 C brmod-wdmod"
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
18133 done"
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
18138 done"
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
18142 head: 1\.3
18143 branch:
18144 locks: strict
18145 access list:
18146 keyword substitution: b
18147 total revisions: 1; selected revisions: 1
18148 description:
18149 ----------------------------
18150 revision 1\.3
18151 date: ${ISO8601DATE}; author: ${username}; state: Exp; commitid: ${commitid};
18152 checkin
18153 ============================================================================="
18155 dokeep
18156 cd ../..
18157 modify_repo rm -rf $CVSROOT_DIRNAME/first-dir
18158 rm -r 1
18163 binfiles3)
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
18167 mkdir 1; cd 1
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
18171 cd first-dir
18172 echo hello >file1
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"
18179 rm file1
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
18206 head: 1\.3
18207 branch:
18208 locks: strict
18209 access list:
18210 keyword substitution: b
18211 total revisions: 3
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
18232 done"
18233 dotest binfiles3-12 "${testcvs} -q update -r 1.3 file1" "U file1"
18234 dotest binfiles3-13 "cmp file1 ${TESTDIR}/1/binfile.dat" ""
18236 dokeep
18237 cd ../..
18238 rm -r 1
18239 modify_repo rm -rf $CVSROOT_DIRNAME/first-dir
18244 mcopy)
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
18266 mkdir 1; cd 1
18267 dotest mcopy-1 "${testcvs} -q co first-dir" ''
18268 cd 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
18277 dotest mcopy-1a \
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
18297 # both.
18298 CVSWRAPPERS="* -m 'COPY'"
18299 export CVSWRAPPERS
18300 dotest mcopy-2 "${testcvs} -q tag -b br" 'T \.cvswrappers
18301 T brmod
18302 T brmod-trmod
18303 T brmod-wdmod'
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" \
18316 "[UP] brmod
18317 [UP] brmod-trmod
18318 [UP] brmod-wdmod"
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" \
18331 "U brmod
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
18335 C brmod-trmod
18336 M brmod-wdmod
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
18340 C brmod-wdmod"
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"
18359 dokeep
18360 cd ../..
18361 modify_repo rm -rf $CVSROOT_DIRNAME/first-dir
18362 rm -r 1
18363 unset CVSWRAPPERS
18364 fi # end of tests to be skipped for remote
18369 binwrap)
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
18374 cd 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
18384 pass binwrap-1
18385 else
18386 fail binwrap-1
18388 cd ..
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}
18399 Sticky Tag: (none)
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}
18409 Sticky Tag: (none)
18410 Sticky Date: (none)
18411 Sticky Options: -kb"
18413 dokeep
18414 rm -r first-dir
18415 modify_repo rm -rf $CVSROOT_DIRNAME/first-dir
18420 binwrap2)
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
18425 cd 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
18435 pass binwrap2-1
18436 else
18437 fail binwrap2-1
18439 cd ..
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}
18450 Sticky Tag: (none)
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}
18460 Sticky Tag: (none)
18461 Sticky Date: (none)
18462 Sticky Options: -kb"
18464 dokeep
18465 rm -r first-dir
18466 modify_repo rm -rf $CVSROOT_DIRNAME/first-dir
18471 binwrap3)
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
18479 # to binary.
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
18484 # files.
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
18489 # things straight.
18491 # Here's the directory tree:
18493 # ./
18494 # .cvswrappers
18495 # foo-b.c0
18496 # foo-b.sb
18497 # foo-t.c1
18498 # foo-t.st
18500 # sub1/ sub2/
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
18506 # foo-t.c2
18507 # foo-t.c3
18509 # subsub/
18510 # .cvswrappers
18511 # foo-b.c3
18512 # foo-b.sb
18513 # foo-t.c0
18514 # foo-t.c1
18515 # foo-t.c2
18516 # foo-t.st
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}"
18524 cd ${TESTDIR}
18526 # On Windows, we can't check out CVSROOT, because the case
18527 # insensitivity means that this conflicts with cvsroot.
18528 mkdir wnt
18529 cd wnt
18531 mkdir binwrap3 # the 0th dir
18532 mkdir binwrap3/sub1
18533 mkdir binwrap3/sub2
18534 mkdir binwrap3/sub2/subsub
18536 echo "bar*" > binwrap3/.cvswrappers
18537 echo "*.c0 -k 'b'" >> binwrap3/.cvswrappers
18538 echo "whatever -k 'b'" >> binwrap3/.cvswrappers
18539 echo ${binwrap3_text} > binwrap3/foo-b.c0
18540 echo ${binwrap3_text} > binwrap3/bar-t.c0
18541 echo ${binwrap3_text} > binwrap3/foo-b.sb
18542 echo ${binwrap3_text} > binwrap3/foo-t.sb
18543 echo ${binwrap3_text} > binwrap3/foo-t.c1
18544 echo ${binwrap3_text} > binwrap3/foo-t.st
18546 echo "bar* -k 'kv'" > binwrap3/sub1/.cvswrappers
18547 echo "*.c1 -k 'b'" >> binwrap3/sub1/.cvswrappers
18548 echo "whatever -k 'b'" >> binwrap3/sub1/.cvswrappers
18549 echo ${binwrap3_text} > binwrap3/sub1/foo-b.c1
18550 echo ${binwrap3_text} > binwrap3/sub1/bar-t.c1
18551 echo ${binwrap3_text} > binwrap3/sub1/foo-b.sb
18552 echo ${binwrap3_text} > binwrap3/sub1/foo-t.sb
18553 echo ${binwrap3_text} > binwrap3/sub1/foo-t.c0
18554 echo ${binwrap3_text} > binwrap3/sub1/foo-t.st
18556 echo "bar*" > binwrap3/sub2/.cvswrappers
18557 echo "*.st -k 'b'" >> binwrap3/sub2/.cvswrappers
18558 echo ${binwrap3_text} > binwrap3/sub2/foo-b.sb
18559 echo ${binwrap3_text} > binwrap3/sub2/foo-t.sb
18560 echo ${binwrap3_text} > binwrap3/sub2/foo-b.st
18561 echo ${binwrap3_text} > binwrap3/sub2/bar-t.st
18562 echo ${binwrap3_text} > binwrap3/sub2/foo-t.c0
18563 echo ${binwrap3_text} > binwrap3/sub2/foo-t.c1
18564 echo ${binwrap3_text} > binwrap3/sub2/foo-t.c2
18565 echo ${binwrap3_text} > binwrap3/sub2/foo-t.c3
18567 echo "bar* -k 'kv'" > binwrap3/sub2/subsub/.cvswrappers
18568 echo "*.c3 -k 'b'" >> binwrap3/sub2/subsub/.cvswrappers
18569 echo "foo -k 'b'" >> binwrap3/sub2/subsub/.cvswrappers
18570 echo "c0* -k 'b'" >> binwrap3/sub2/subsub/.cvswrappers
18571 echo ${binwrap3_text} > binwrap3/sub2/subsub/foo-b.c3
18572 echo ${binwrap3_text} > binwrap3/sub2/subsub/bar-t.c3
18573 echo ${binwrap3_text} > binwrap3/sub2/subsub/foo-b.sb
18574 echo ${binwrap3_text} > binwrap3/sub2/subsub/foo-t.sb
18575 echo ${binwrap3_text} > binwrap3/sub2/subsub/foo-t.c0
18576 echo ${binwrap3_text} > binwrap3/sub2/subsub/foo-t.c1
18577 echo ${binwrap3_text} > binwrap3/sub2/subsub/foo-t.c2
18578 echo ${binwrap3_text} > binwrap3/sub2/subsub/foo-t.st
18580 # Now set up CVSROOT/cvswrappers, the easy way:
18581 dotest binwrap3-1 "${testcvs} -q co CVSROOT" "[UP] CVSROOT${DOTSTAR}"
18582 cd CVSROOT
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"
18592 cd ..
18594 # Avoid environmental interference
18595 CVSWRAPPERS_save=${CVSWRAPPERS}
18596 unset CVSWRAPPERS
18598 # Do the import
18599 cd binwrap3
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" \
18605 "[NI] ${DOTSTAR}"
18607 # OK, now test "cvs add".
18608 cd ..
18609 rm -r binwrap3
18610 dotest binwrap3-2b "${testcvs} co binwrap3" "${DOTSTAR}"
18611 cd binwrap3
18612 cd sub2
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"
18626 cd ..
18628 # Now check out the module and see which files are binary.
18629 cd ..
18630 rm -r binwrap3
18631 dotest binwrap3-3 "${testcvs} co binwrap3" "${DOTSTAR}"
18632 cd binwrap3
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
18728 dokeep
18729 cd ..
18730 rm -r binwrap3 CVSROOT
18731 cd ..
18732 rm -r wnt
18733 modify_repo rm -rf $CVSROOT_DIRNAME/binwrap3
18734 CVSWRAPPERS=${CVSWRAPPERS_save}
18739 mwrap)
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.
18758 mkdir wnt
18759 cd wnt
18761 dotest mwrap-c1 "${testcvs} -q co CVSROOT" "[UP] CVSROOT${DOTSTAR}"
18762 cd CVSROOT
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"
18768 cd ..
18769 mkdir m1; cd m1
18770 dotest mwrap-1 "${testcvs} -q co -l ." ''
18771 mkdir first-dir
18772 dotest mwrap-2 "${testcvs} add first-dir" \
18773 "Directory ${CVSROOT_DIRNAME}/first-dir added to the repository"
18774 cd first-dir
18775 touch aa
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"
18782 cd ../..
18783 mkdir m2; cd m2
18784 dotest mwrap-5 "${testcvs} -q co first-dir" "U first-dir/aa"
18785 cd first-dir
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"
18790 cd ../..
18791 cd m1/first-dir
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
18797 C aa"
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
18802 C aa"
18803 dotest mwrap-9 "cat aa" "changed in m2"
18804 dotest mwrap-10 "cat .#aa.1.1" "changed in m1"
18806 dokeep
18807 restore_adm
18808 cd ../..
18809 rm -r CVSROOT
18810 rm -r m1 m2
18811 cd ..
18812 rm -r wnt
18813 modify_repo rm -rf $CVSROOT_DIRNAME/first-dir
18818 info)
18819 # Administrative file tests.
18820 # Here is a list of where each administrative file is tested:
18821 # loginfo: info
18822 # modules: modules, modules2, modules3
18823 # cvsignore: ignore
18824 # verifymsg: info
18825 # cvswrappers: mwrap
18826 # taginfo: taginfo
18827 # posttag: posttag
18828 # postadmin: admin
18829 # postwatch: devcom3
18830 # config: config
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.
18835 mkdir wnt
18836 cd wnt
18838 dotest info-1 "$testcvs -q co CVSROOT" "[UP] CVSROOT${DOTSTAR}"
18839 cd CVSROOT
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" \
18853 >> loginfo
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
18859 # with "cvs init".
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\."
18873 cd ..
18875 modify_repo mkdir $CVSROOT_DIRNAME/first-dir
18876 dotest info-5 "$testcvs -q co first-dir" ''
18877 cd first-dir
18878 touch file1
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
18892 leisure\." \
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
18900 leisure\.
18901 $SPROG commit: loginfo:[0-9]*: no such user variable \${=ZEE}"
18902 echo line0 >>file1
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
18912 leisure\." \
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
18920 leisure\.
18921 $SPROG commit: loginfo:[0-9]*: no such user variable \${=ZEE}"
18922 echo line1 >>file1
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
18931 leisure\."
18933 cd ..
18934 dotest info-9 "cat $TESTDIR/testlog" \
18935 "xenv-valueyz=${username}=${commitid}=${commitid}=${CVSROOT_DIRNAME}="
18936 dotest info-10 "cat $TESTDIR/testlog2" \
18937 'first-dir
18938 first-dir
18939 first-dir
18940 first-dir file1,,NONE,1.1
18941 first-dir 1.1
18942 first-dir file1 %s
18943 first-dir NONEAX
18944 first-dir file1ux
18945 first-dir
18946 first-dir
18947 first-dir
18948 first-dir file1,,1.1,1.2
18949 first-dir 1.2
18950 first-dir file1 %s
18951 first-dir 1.1AX
18952 first-dir file1ux
18953 first-dir
18954 first-dir
18955 first-dir
18956 first-dir file1,,1.2,1.3
18957 first-dir 1.3
18958 first-dir file1 %s
18959 first-dir 1.2AX
18960 first-dir file1ux'
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
18967 cd CVSROOT
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" \
18982 >> loginfo
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
18995 leisure\."
18996 cd ..
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" ''
19004 cd third-dir
19005 touch file1
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\."
19030 echo line0 >>file1
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\."
19051 echo line1 >>file1
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\."
19072 cd ..
19073 dotest info-intfmt-9 "cat $TESTDIR/testlog" "xenv-valueyz=${username}=${TESTDIR}/cvsroot="
19074 dotest info-intfmt-10 "cat $TESTDIR/testlog2" \
19075 'third-dir
19076 third-dir
19077 third-dir
19078 third-dir file1,,NONE,1.1
19079 third-dir 1.1
19080 third-dir file1 %s
19081 third-dir NONEAX
19082 third-dir file1ux
19083 third-dir
19084 third-dir
19085 third-dir
19086 third-dir file1,,1.1,1.2
19087 third-dir 1.2
19088 third-dir file1 %s
19089 third-dir 1.1AX
19090 third-dir file1ux
19091 third-dir
19092 third-dir
19093 third-dir
19094 third-dir file1,,1.2,1.3
19095 third-dir 1.3
19096 third-dir file1 %s
19097 third-dir 1.2AX
19098 third-dir file1ux'
19100 rm ${TESTDIR}/testlog ${TESTDIR}/testlog2
19102 # test the new format strings too
19103 cd CVSROOT
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"
19116 cd ..
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" ''
19124 cd fourth-dir
19125 touch file1
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}"
19134 echo line0 >>file1
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}"
19139 echo line1 >>file1
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"
19144 cd ..
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
19149 1\.1
19150 file1
19151 NONEAX
19152 fourth-dir file1 1\.1 1\.2
19153 1\.2
19154 file1
19155 1\.1AX
19156 fourth-dir file1 1\.2 1\.3
19157 1\.3
19158 file1
19159 1\.2AX'
19161 # clean up after newfmt tests
19162 cd CVSROOT
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
19174 #!${TESTSHELL}
19175 echo vscript "\$@"
19176 if sed 1q < \$1 | grep '^BugId:[ ]*[0-9][0-9]*$' > /dev/null; then
19177 exit 0
19178 elif sed 1q < \$1 | grep '^BugId:[ ]*new$' > /dev/null; then
19179 echo A new bugid was found. >> \$1
19180 exit 0
19181 else
19182 echo "No BugId found."
19183 sleep 1
19184 exit 1
19187 cat >${TESTDIR}/vscript2 <<EOF
19188 #!${TESTSHELL}
19189 echo vscript2 "\$@"
19190 if test -f CVS/Repository; then
19191 repo=\`cat CVS/Repository\`
19192 else
19193 repo=\`pwd\`
19195 echo \$repo
19196 if echo "\$repo" |grep yet-another/ >/dev/null 2>&1; then
19197 exit 1
19198 else
19199 exit 0
19202 # Grumble, grumble, mumble, search for "Cygwin".
19203 if test -n "$remotehost"; then
19204 $CVS_RSH $remotehost "chmod +x ${TESTDIR}/vscript*"
19205 else
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"
19218 cd ../first-dir
19219 echo line2 >>file1
19220 dotest_fail info-v2 "${testcvs} -q ci -m bogus" \
19221 "vscript $tempname file1 1\.3
19222 No BugId found\.
19223 ${SPROG} \[commit aborted\]: Message verification failed"
19225 cat >${TESTDIR}/comment.tmp <<EOF
19226 BugId: 42
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
19235 cd ..
19236 mkdir another-dir
19237 cd another-dir
19238 touch file2
19239 dotest_fail info-v4 \
19240 "${testcvs} import -m bogus first-dir/another x y" \
19241 "vscript $tempname - Imported sources NONE
19242 No BugId found\.
19243 ${SPROG} \[import aborted\]: Message verification failed"
19245 # now verify that directory dependent verifymsgs work
19246 dotest info-v5 \
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"
19259 # FIXCVS
19261 # note that in the local case the error message is the same as
19262 # info-v5
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.
19269 if $remote; then
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"
19275 else
19276 dotest info-v6 \
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"
19299 rm file2
19300 cd ..
19301 rmdir another-dir
19303 cd CVSROOT
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"
19309 cd ../first-dir
19310 echo line3 >>file1
19311 cat >${TESTDIR}/comment.tmp <<EOF
19312 BugId: new
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" "
19321 BugId: new
19322 See what happens next.
19323 A new bugid was found.
19324 ============================================================================="
19326 cd ../CVSROOT
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"
19335 cd ../first-dir
19336 echo line4 >>file1
19337 cat >${TESTDIR}/comment.tmp <<EOF
19338 BugId: new
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" "
19347 BugId: new
19348 See what happens next with stat.
19349 A new bugid was found.
19350 ============================================================================="
19352 cd ../CVSROOT
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"
19361 cd ../first-dir
19362 echo line5 >>file1
19363 cat >${TESTDIR}/comment.tmp <<EOF
19364 BugId: new
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" "
19373 BugId: new
19374 See what happens next.
19375 ============================================================================="
19377 cd ../CVSROOT
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"
19390 cd ../CVSROOT
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"
19399 dokeep
19400 rm ${TESTDIR}/vscript*
19401 cd ..
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"
19415 dokeep
19416 cd ..
19417 rm -r wnt
19418 rm $HOME/.cvsrc
19419 modify_repo rm -rf $CVSROOT_DIRNAME/first-dir \
19420 $CVSROOT_DIRNAME/third-dir \
19421 $CVSROOT_DIRNAME/fourth-dir
19426 taginfo)
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
19436 mkdir 1; cd 1
19437 dotest taginfo-init-1 "$testcvs -q co CVSROOT" "U CVSROOT/$DOTSTAR"
19438 cd CVSROOT
19439 dotest taginfo-init-2 "$testcvs -Q tag taginfo-start"
19440 cat >$TESTDIR/1/loggit <<EOF
19441 #!$TESTSHELL
19442 if test "\$1" = rejectme; then
19443 exit 1
19444 else
19445 echo "\$@" >>$TESTDIR/1/taglog
19446 exit 0
19449 # #^@&!^@ Cygwin.
19450 if test -n "$remotehost"; then
19451 $CVS_RSH $remotehost "chmod +x ${TESTDIR}/1/loggit"
19452 else
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"
19468 cd ..
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
19473 # repository.
19474 modify_repo mkdir $CVSROOT_DIRNAME/first-dir
19475 dotest taginfo-3 "$testcvs -q co first-dir"
19477 cd first-dir
19478 echo first >file1
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
19492 leisure\."
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\.
19498 T file1"
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\.
19504 T file1"
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
19517 leisure\."
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\.
19523 T file1"
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\.
19541 T file1"
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\.
19551 T file1"
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\.
19560 D file1"
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
19600 tag1 del first-dir
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
19608 cd ..
19609 cd CVSROOT
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
19625 leisure\."
19627 cat >${TESTDIR}/1/loggit <<EOF
19628 #!${TESTSHELL}
19629 if test "\$1" = rejectme; then
19630 exit 1
19631 else
19632 while test "\$#" -gt 0; do
19633 echo "\$1" >>${TESTDIR}/1/taglog
19634 shift
19635 done
19636 exit 0
19640 cd ..
19641 cd first-dir
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
19657 leisure\."
19659 dotest taginfo-newfmt-3 "${testcvs} -q tag tag1" \
19660 "T file 2
19661 T file1"
19662 dotest taginfo-newfmt-4 "${testcvs} -q tag tag3" \
19663 "T file 2
19664 T file1"
19665 dotest taginfo-newfmt-5 "$testcvs -q tag -rtag1 tag4" \
19666 "T file 2
19667 T file1"
19669 dotest taginfo-newfmt-examine-1 "cat ${TESTDIR}/1/taglog" \
19670 "$TESTDIR/cvsroot
19671 tag1
19674 first-dir
19675 file 2
19677 NONE
19678 1\.1
19679 file1
19681 NONE
19682 1\.1
19683 $TESTDIR/cvsroot
19684 tag3
19687 first-dir
19688 file 2
19690 NONE
19691 1\.1
19692 file1
19694 NONE
19695 1\.1
19696 $TESTDIR/cvsroot
19697 tag4
19700 first-dir
19701 file 2
19702 tag1
19703 NONE
19704 1\.1
19705 file1
19706 tag1
19707 NONE
19708 1\.1"
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
19713 cd ..
19714 cd CVSROOT
19715 cat >${TESTDIR}/1/loggit <<EOF
19716 #!${TESTSHELL}
19717 if test "\$1" = rejectme; then
19718 exit 1
19719 else
19720 echo "\$@" >>${TESTDIR}/1/taglog
19721 exit 0
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
19744 leisure\."
19746 cd ../first-dir
19747 dotest taginfo-newfmt-8 "${testcvs} -q tag tag1" ""
19748 mkdir sdir
19749 dotest taginfo-newfmt-8b "${testcvs} -q add sdir" \
19750 "Directory ${TESTDIR}/cvsroot/first-dir/sdir added to the repository"
19751 touch sdir/file3
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" \
19758 "T file 2
19759 W file1 : br already exists on branch 1\.1\.2\.1 : NOT MOVING tag to branch 1\.1\.0\.4
19760 T sdir/file3"
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" \
19767 "T file 2
19768 T file1
19769 T sdir/file3"
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" \
19786 "T file 2
19787 T file1
19788 T sdir/file3"
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" \
19796 "T file 2
19797 T file1
19798 T sdir/file3"
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" \
19803 "D file 2
19804 D file1"
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"
19840 dokeep
19841 restore_adm
19842 cd ../..
19843 rm -r 1
19844 modify_repo rm -rf $CVSROOT_DIRNAME/first-dir
19849 posttag)
19850 # Tests of the CVSROOT/taginfo file. See the comment at the
19851 # "info" tests for a full list of administrative file tests.
19853 mkdir 1; cd 1
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.
19859 cd CVSROOT
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"
19865 cd ..
19867 cat >$TESTDIR/1/loggit <<EOF
19868 #!$TESTSHELL
19869 if test "\$1" = rejectme; then
19870 error=:
19871 else
19872 error=false
19875 while [ -n "\$1" ]; do
19876 echo "\$1" >>$TESTDIR/1/taglog
19877 shift
19878 done
19880 if \$error; then
19881 exit 1
19883 exit 0
19885 # #^@&!^@ Cygwin.
19886 if test -n "$remotehost"; then
19887 $CVS_RSH $remotehost "chmod +x $TESTDIR/1/loggit"
19888 else
19889 chmod +x $TESTDIR/1/loggit
19892 modify_repo mkdir $CVSROOT_DIRNAME/first-dir
19893 dotest posttag-init-3 "$testcvs -q co first-dir"
19895 cd first-dir
19896 echo first >file1
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" \
19909 "T file 2
19910 T file1"
19911 dotest posttag-2 "$testcvs -q tag tag3" \
19912 "T file 2
19913 T file1"
19915 dotest posttag-3 "$testcvs -q tag rejectme" \
19916 "T file 2
19917 T file1"
19919 dotest posttag-4 "$testcvs -q tag -d rejectme" \
19920 "D file 2
19921 D file1"
19923 dotest posttag-examine-1 "cat $TESTDIR/1/taglog" \
19924 "$TESTDIR/cvsroot
19925 tag1
19928 first-dir
19929 file 2
19930 NONE
19931 1\.1
19932 file1
19933 NONE
19934 1\.1
19935 $TESTDIR/cvsroot
19936 tag3
19939 first-dir
19940 file 2
19941 NONE
19942 1\.1
19943 file1
19944 NONE
19945 1\.1
19946 $TESTDIR/cvsroot
19947 rejectme
19950 first-dir
19951 file 2
19952 NONE
19954 file1
19955 NONE
19957 $TESTDIR/cvsroot
19958 rejectme
19961 first-dir
19962 file 2
19965 file1
19967 1.1"
19969 dokeep
19970 cd ../..
19971 restore_adm
19972 rm -r 1
19973 modify_repo rm -rf $CVSROOT_DIRNAME/first-dir
19978 config)
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
19983 # primary.
19984 if $noredirect; then
19985 notnoredirect config
19986 continue
19989 # On Windows, we can't check out CVSROOT, because the case
19990 # insensitivity means that this conflicts with cvsroot.
19991 mkdir wnt
19992 cd wnt
19994 dotest config-init-1 "$testcvs -q co CVSROOT" "U CVSROOT/$DOTSTAR"
19995 cd CVSROOT
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
20009 if $proxy; then
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"
20016 else
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"
20024 if $proxy; then
20025 : # FIXME: don't try in proxy mode
20026 else
20027 # Now test the HistoryLogPath and HistorySearchPath options.
20028 mkdir $TESTDIR/historylogs
20029 echo >config \
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"
20046 sleep 1
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.
20059 if $remote; then
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>"
20063 else
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
20073 dokeep
20074 restore_adm
20075 cd ../..
20076 rm -r wnt
20081 config2)
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
20087 remoteonly config2
20088 continue
20091 # On Windows, we can't check out CVSROOT, because the case
20092 # insensitivity means that this conflicts with cvsroot.
20093 mkdir wnt
20094 cd wnt
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"
20099 cd CVSROOT
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
20111 # level.
20113 # Too high.
20114 dotest config2-1 "$testcvs -z9 update" \
20115 "$SPROG server: Forcing compression level 6 (allowed: 5 <= z <= 6)\.
20116 $SPROG update: Updating \."
20117 # Too low.
20118 dotest config2-2 "$testcvs -z1 update" \
20119 "$SPROG server: Forcing compression level 5 (allowed: 5 <= z <= 6)\.
20120 $SPROG update: Updating \."
20121 # From zero.
20122 dotest config2-3 "$testcvs update" \
20123 "$SPROG server: Forcing compression level 5 (allowed: 5 <= z <= 6)\.
20124 $SPROG update: Updating \."
20125 # Just right.
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"
20139 # Too high.
20140 dotest config2-5 "$testcvs -z9 update" \
20141 "$SPROG server: Forcing compression level 0 (allowed: 0 <= z <= 0)\.
20142 $SPROG update: Updating \."
20143 # Just right.
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 \."
20156 dokeep
20157 restore_adm
20158 cd ../..
20159 rm -r wnt
20162 config3)
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
20167 mkdir config3
20168 cd config3
20170 dotest config3-init-1 "$testcvs -q co CVSROOT" "U CVSROOT/$DOTSTAR"
20171 cd CVSROOT
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"
20177 cat <<EOF >>config
20178 # Ignore a comment with leading spaces.
20179 GLOBAL-BAD-OPTION=WWW
20181 [/ignore/this/root]
20182 [/and/this/one]
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"
20191 cd ..
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"
20196 cd CVSROOT
20197 dotest config3-init-2a "$testcvs -Q up -jHEAD -jinitial-config" \
20198 "$DOTSTAR
20199 Merging differences between 1\.[0-9]* and 1\.[0-9]* into config"
20201 cat <<EOF >>config
20202 # Ignore a comment with leading spaces.
20204 [/ignore/this/root]
20205 [/and/this/one]
20206 IGNORED-BAD-OPTION=YYY
20207 # Ignore a comment with leading spaces.
20209 [/some/other/root]
20211 # Comments and blank lines do not affect fall-through behavior.
20213 [$CVSROOT_DIRNAME]
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"
20234 cd ..
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
20243 # root is ignored.
20244 cd CVSROOT
20245 dotest config3-init-3a "$testcvs -Q up -jHEAD -jinitial-config" \
20246 "$DOTSTAR
20247 Merging differences between 1\.[0-9]* and 1\.[0-9]* into config"
20249 cat <<EOF >>config
20250 HistoryLogPath=$TESTDIR/historylog
20252 [/ignore/this/root]
20253 [/and/this/one]
20254 IGNORED-BAD-OPTION=YYY
20256 [/some/other/root]
20257 [$CVSROOT_DIRNAME]
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
20266 [$CVSROOT_DIRNAME]
20267 [$SECONDARY_CVSROOT_DIRNAME]
20268 LogHistory=TMAR
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"
20282 cd ..
20283 dotest config3-3 "$testcvs co -d config3-2 config3" \
20284 "$SPROG checkout: Updating config3-2"
20286 cd config3-2
20287 touch newfile
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"
20296 cd ..
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\]"
20301 dokeep
20302 restore_adm
20303 cd ..
20304 rm -r config3
20305 modify_repo rm -rf $CVSROOT_DIRNAME/config3
20310 config4)
20311 # TmpDir
20312 mkdir config4
20313 cd config4
20315 dotest config4-init-1 "$testcvs -q co CVSROOT" "U CVSROOT/$DOTSTAR"
20316 cd CVSROOT
20317 mkdir $TESTDIR/config4/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/config4/verify <<EOF
20328 #! /bin/sh
20329 echo \$1
20330 exit 0
20332 chmod a+x $TESTDIR/config4/verify
20333 dotest config4-1 \
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"
20340 dokeep
20341 restore_adm
20342 cd ../..
20343 rm -r config4
20344 modify_repo rm -rf $CVSROOT_DIRNAME/config4
20349 serverpatch)
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
20355 mkdir 1
20356 cd 1
20357 dotest serverpatch-1 "$testcvs -q co first-dir"
20359 cd first-dir
20361 # Add a file with an RCS keyword.
20362 echo '$''Name$' > file1
20363 echo '1' >> 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"
20372 # Tag the file.
20373 dotest serverpatch-4 "${testcvs} -q tag tag file1" 'T file1'
20375 # Check out a tagged copy of the file.
20376 cd ../..
20377 mkdir 2
20378 cd 2
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.
20387 cd ../1/first-dir
20388 echo '2' >> file1
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" \
20397 'U file1' \
20398 "P file1
20399 ${CPROG} update: checksum failure after patch to \./file1; will refetch
20400 ${CPROG} client: refetching unpatchable files
20401 $SPROG update: warning: \`file1' was lost
20402 U file1"
20404 dokeep
20405 cd ../..
20406 rm -r 1 2
20407 modify_repo rm -rf $CVSROOT_DIRNAME/first-dir
20412 log)
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
20421 # -b, -r: log
20422 # -d: logopt, rcs
20423 # -s: logopt, rcs3
20424 # -R: logopt, rcs3
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"
20430 cd 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" \
20474 "[UP] file1
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.=
20491 log_header1="
20492 RCS file: ${CVSROOT_DIRNAME}/first-dir/file1,v
20493 Working file: file1
20494 head: 1\.3
20495 branch:
20496 locks: strict
20497 access list:"
20498 rlog_header1="
20499 RCS file: ${CVSROOT_DIRNAME}/first-dir/file1,v
20500 head: 1\.3
20501 branch:
20502 locks: strict
20503 access list:"
20504 log_tags1='symbolic names:
20505 tag: 1\.2\.2\.1
20506 branch: 1\.2\.0\.2'
20507 log_keyword='keyword substitution: kv'
20508 log_dash='----------------------------
20509 revision'
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}
20515 line 1
20517 line 2"
20518 log_rev2="${log_dash} 1\.2
20519 ${log_date}${log_lines}${log_commitid}
20520 branches: 1\.2\.2;
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" \
20536 "${log_header1}
20537 ${log_tags1}
20538 ${log_keyword}
20539 total revisions: 5; selected revisions: 5
20540 description:
20541 ${log_rev3}
20542 ${log_rev2}
20543 ${log_rev1}
20544 ${log_rev2b}
20545 ${log_rev1b}
20546 ${log_trailer}"
20548 dotest log-12 "${testcvs} log -N file1" \
20549 "${log_header1}
20550 ${log_keyword}
20551 total revisions: 5; selected revisions: 5
20552 description:
20553 ${log_rev3}
20554 ${log_rev2}
20555 ${log_rev1}
20556 ${log_rev2b}
20557 ${log_rev1b}
20558 ${log_trailer}"
20560 dotest log-13 "${testcvs} log -b file1" \
20561 "${log_header1}
20562 ${log_tags1}
20563 ${log_keyword}
20564 total revisions: 5; selected revisions: 3
20565 description:
20566 ${log_rev3}
20567 ${log_rev2}
20568 ${log_rev1}
20569 ${log_trailer}"
20571 dotest log-14 "${testcvs} log -r file1" \
20572 "${log_header1}
20573 ${log_tags1}
20574 ${log_keyword}
20575 total revisions: 5; selected revisions: 1
20576 description:
20577 ${log_rev3}
20578 ${log_trailer}"
20580 dotest log-14a "${testcvs} log -rHEAD file1" \
20581 "${log_header1}
20582 ${log_tags1}
20583 ${log_keyword}
20584 total revisions: 5; selected revisions: 1
20585 description:
20586 ${log_rev3}
20587 ${log_trailer}"
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
20594 ${log_header1}
20595 ${log_tags1}
20596 ${log_keyword}
20597 total revisions: 5; selected revisions: 1
20598 description:
20599 ${log_rev3}
20600 ${log_trailer}"
20602 # Check that unusual syntax works correctly.
20604 dotest log-14c "${testcvs} log -r: file1" \
20605 "${log_header1}
20606 ${log_tags1}
20607 ${log_keyword}
20608 total revisions: 5; selected revisions: 1
20609 description:
20610 ${log_rev3}
20611 ${log_trailer}"
20612 dotest log-14d "${testcvs} log -r, file1" \
20613 "${log_header1}
20614 ${log_tags1}
20615 ${log_keyword}
20616 total revisions: 5; selected revisions: 1
20617 description:
20618 ${log_rev3}
20619 ${log_trailer}"
20620 dotest log-14e "${testcvs} log -r. file1" \
20621 "${log_header1}
20622 ${log_tags1}
20623 ${log_keyword}
20624 total revisions: 5; selected revisions: 1
20625 description:
20626 ${log_rev3}
20627 ${log_trailer}"
20628 dotest log-14f "${testcvs} log -r:: file1" \
20629 "${log_header1}
20630 ${log_tags1}
20631 ${log_keyword}
20632 total revisions: 5; selected revisions: 0
20633 description:
20634 ${log_trailer}"
20636 dotest log-15 "${testcvs} log -r1.2 file1" \
20637 "${log_header1}
20638 ${log_tags1}
20639 ${log_keyword}
20640 total revisions: 5; selected revisions: 1
20641 description:
20642 ${log_rev2}
20643 ${log_trailer}"
20645 dotest log-16 "${testcvs} log -r1.2.2 file1" \
20646 "${log_header1}
20647 ${log_tags1}
20648 ${log_keyword}
20649 total revisions: 5; selected revisions: 2
20650 description:
20651 ${log_rev2b}
20652 ${log_rev1b}
20653 ${log_trailer}"
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" \
20658 "${log_header1}
20659 ${log_tags1}
20660 ${log_keyword}
20661 total revisions: 5; selected revisions: 2
20662 description:
20663 ${log_rev2b}
20664 ${log_rev1b}
20665 ${log_trailer}"
20667 dotest log-18 "${testcvs} log -r1.2.2. file1" \
20668 "${log_header1}
20669 ${log_tags1}
20670 ${log_keyword}
20671 total revisions: 5; selected revisions: 1
20672 description:
20673 ${log_rev2b}
20674 ${log_trailer}"
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" \
20679 "${log_header1}
20680 ${log_tags1}
20681 ${log_keyword}
20682 total revisions: 5; selected revisions: 2
20683 description:
20684 ${log_rev3}
20685 ${log_rev2b}
20686 ${log_trailer}"
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" \
20691 "${log_header1}
20692 ${log_tags1}
20693 ${log_keyword}
20694 total revisions: 5; selected revisions: 1
20695 description:
20696 ${log_rev2b}
20697 ${log_trailer}"
20699 dotest log-20 "${testcvs} log -r1.2: file1" \
20700 "${log_header1}
20701 ${log_tags1}
20702 ${log_keyword}
20703 total revisions: 5; selected revisions: 2
20704 description:
20705 ${log_rev3}
20706 ${log_rev2}
20707 ${log_trailer}"
20709 dotest log-20a "${testcvs} log -r1.2:: file1" \
20710 "${log_header1}
20711 ${log_tags1}
20712 ${log_keyword}
20713 total revisions: 5; selected revisions: 1
20714 description:
20715 ${log_rev3}
20716 ${log_trailer}"
20718 dotest log-21 "${testcvs} log -r:1.2 file1" \
20719 "${log_header1}
20720 ${log_tags1}
20721 ${log_keyword}
20722 total revisions: 5; selected revisions: 2
20723 description:
20724 ${log_rev2}
20725 ${log_rev1}
20726 ${log_trailer}"
20728 dotest log-21a "${testcvs} log -r::1.2 file1" \
20729 "${log_header1}
20730 ${log_tags1}
20731 ${log_keyword}
20732 total revisions: 5; selected revisions: 2
20733 description:
20734 ${log_rev2}
20735 ${log_rev1}
20736 ${log_trailer}"
20738 dotest log-22 "${testcvs} log -r1.1:1.2 file1" \
20739 "${log_header1}
20740 ${log_tags1}
20741 ${log_keyword}
20742 total revisions: 5; selected revisions: 2
20743 description:
20744 ${log_rev2}
20745 ${log_rev1}
20746 ${log_trailer}"
20748 dotest log-22a "${testcvs} log -r1.1::1.2 file1" \
20749 "${log_header1}
20750 ${log_tags1}
20751 ${log_keyword}
20752 total revisions: 5; selected revisions: 1
20753 description:
20754 ${log_rev2}
20755 ${log_trailer}"
20757 dotest log-22b "${testcvs} log -r1.1::1.3 file1" \
20758 "${log_header1}
20759 ${log_tags1}
20760 ${log_keyword}
20761 total revisions: 5; selected revisions: 2
20762 description:
20763 ${log_rev3}
20764 ${log_rev2}
20765 ${log_trailer}"
20767 dotest log-23 "${testcvs} log -rfoo:: file1" \
20768 "${SPROG} log: warning: no revision .foo. in .${CVSROOT_DIRNAME}/first-dir/file1,v.
20769 ${log_header1}
20770 ${log_tags1}
20771 ${log_keyword}
20772 total revisions: 5; selected revisions: 0
20773 description:
20774 ${log_trailer}"
20776 dotest log-24 "${testcvs} log -rfoo::1.3 file1" \
20777 "${SPROG} log: warning: no revision .foo. in .${CVSROOT_DIRNAME}/first-dir/file1,v.
20778 ${log_header1}
20779 ${log_tags1}
20780 ${log_keyword}
20781 total revisions: 5; selected revisions: 0
20782 description:
20783 ${log_trailer}"
20785 dotest log-25 "${testcvs} log -r::foo file1" \
20786 "${SPROG} log: warning: no revision .foo. in .${CVSROOT_DIRNAME}/first-dir/file1,v.
20787 ${log_header1}
20788 ${log_tags1}
20789 ${log_keyword}
20790 total revisions: 5; selected revisions: 0
20791 description:
20792 ${log_trailer}"
20794 dotest log-26 "${testcvs} log -r1.1::foo file1" \
20795 "${SPROG} log: warning: no revision .foo. in .${CVSROOT_DIRNAME}/first-dir/file1,v.
20796 ${log_header1}
20797 ${log_tags1}
20798 ${log_keyword}
20799 total revisions: 5; selected revisions: 0
20800 description:
20801 ${log_trailer}"
20803 # Test BASE pseudotag
20804 dotest log-27 "${testcvs} log -rBASE file1" \
20805 "${log_header1}
20806 ${log_tags1}
20807 ${log_keyword}
20808 total revisions: 5; selected revisions: 1
20809 description:
20810 ${log_rev2b}
20811 ${log_trailer}"
20813 dotest log-28 "${testcvs} -q up -r1.2 file1" "[UP] file1"
20814 dotest log-29 "${testcvs} log -rBASE file1" \
20815 "${log_header1}
20816 ${log_tags1}
20817 ${log_keyword}
20818 total revisions: 5; selected revisions: 1
20819 description:
20820 ${log_rev2}
20821 ${log_trailer}"
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" \
20828 "${rlog_header1}
20829 ${log_tags1}
20830 ${log_keyword}
20831 total revisions: 5; selected revisions: 5
20832 description:
20833 ${log_rev3}
20834 ${log_rev2}
20835 ${log_rev1}
20836 ${log_rev2b}
20837 ${log_rev1b}
20838 ${log_trailer}"
20840 dotest log-r12 "${testcvs} rlog -N first-dir/file1" \
20841 "${rlog_header1}
20842 ${log_keyword}
20843 total revisions: 5; selected revisions: 5
20844 description:
20845 ${log_rev3}
20846 ${log_rev2}
20847 ${log_rev1}
20848 ${log_rev2b}
20849 ${log_rev1b}
20850 ${log_trailer}"
20852 dotest log-r13 "${testcvs} rlog -b first-dir/file1" \
20853 "${rlog_header1}
20854 ${log_tags1}
20855 ${log_keyword}
20856 total revisions: 5; selected revisions: 3
20857 description:
20858 ${log_rev3}
20859 ${log_rev2}
20860 ${log_rev1}
20861 ${log_trailer}"
20863 dotest log-r14 "${testcvs} rlog -r first-dir/file1" \
20864 "${rlog_header1}
20865 ${log_tags1}
20866 ${log_keyword}
20867 total revisions: 5; selected revisions: 1
20868 description:
20869 ${log_rev3}
20870 ${log_trailer}"
20872 dotest log-r14a "${testcvs} rlog -rHEAD first-dir/file1" \
20873 "${rlog_header1}
20874 ${log_tags1}
20875 ${log_keyword}
20876 total revisions: 5; selected revisions: 1
20877 description:
20878 ${log_rev3}
20879 ${log_trailer}"
20881 dotest_fail log-r14b "${testcvs} rlog -r HEAD first-dir/file1" \
20882 "${SPROG} rlog: cannot find module .HEAD. - ignored
20883 ${rlog_header1}
20884 ${log_tags1}
20885 ${log_keyword}
20886 total revisions: 5; selected revisions: 1
20887 description:
20888 ${log_rev3}
20889 ${log_trailer}"
20891 dotest log-r14c "${testcvs} rlog -r: first-dir/file1" \
20892 "${rlog_header1}
20893 ${log_tags1}
20894 ${log_keyword}
20895 total revisions: 5; selected revisions: 1
20896 description:
20897 ${log_rev3}
20898 ${log_trailer}"
20899 dotest log-r14d "${testcvs} rlog -r, first-dir/file1" \
20900 "${rlog_header1}
20901 ${log_tags1}
20902 ${log_keyword}
20903 total revisions: 5; selected revisions: 1
20904 description:
20905 ${log_rev3}
20906 ${log_trailer}"
20907 dotest log-r14e "${testcvs} rlog -r. first-dir/file1" \
20908 "${rlog_header1}
20909 ${log_tags1}
20910 ${log_keyword}
20911 total revisions: 5; selected revisions: 1
20912 description:
20913 ${log_rev3}
20914 ${log_trailer}"
20915 dotest log-r14f "${testcvs} rlog -r:: first-dir/file1" \
20916 "${rlog_header1}
20917 ${log_tags1}
20918 ${log_keyword}
20919 total revisions: 5; selected revisions: 0
20920 description:
20921 ${log_trailer}"
20923 dotest log-r15 "${testcvs} rlog -r1.2 first-dir/file1" \
20924 "${rlog_header1}
20925 ${log_tags1}
20926 ${log_keyword}
20927 total revisions: 5; selected revisions: 1
20928 description:
20929 ${log_rev2}
20930 ${log_trailer}"
20932 dotest log-r16 "${testcvs} rlog -r1.2.2 first-dir/file1" \
20933 "${rlog_header1}
20934 ${log_tags1}
20935 ${log_keyword}
20936 total revisions: 5; selected revisions: 2
20937 description:
20938 ${log_rev2b}
20939 ${log_rev1b}
20940 ${log_trailer}"
20942 dotest log-r17 "${testcvs} rlog -rbranch first-dir/file1" \
20943 "${rlog_header1}
20944 ${log_tags1}
20945 ${log_keyword}
20946 total revisions: 5; selected revisions: 2
20947 description:
20948 ${log_rev2b}
20949 ${log_rev1b}
20950 ${log_trailer}"
20952 dotest log-r18 "${testcvs} rlog -r1.2.2. first-dir/file1" \
20953 "${rlog_header1}
20954 ${log_tags1}
20955 ${log_keyword}
20956 total revisions: 5; selected revisions: 1
20957 description:
20958 ${log_rev2b}
20959 ${log_trailer}"
20961 dotest log-r18a "${testcvs} rlog -r1.2.2.2 -r1.3:1.3 first-dir/file1" \
20962 "${rlog_header1}
20963 ${log_tags1}
20964 ${log_keyword}
20965 total revisions: 5; selected revisions: 2
20966 description:
20967 ${log_rev3}
20968 ${log_rev2b}
20969 ${log_trailer}"
20971 dotest log-r19 "${testcvs} rlog -rbranch. first-dir/file1" \
20972 "${rlog_header1}
20973 ${log_tags1}
20974 ${log_keyword}
20975 total revisions: 5; selected revisions: 1
20976 description:
20977 ${log_rev2b}
20978 ${log_trailer}"
20980 dotest log-r20 "${testcvs} rlog -r1.2: first-dir/file1" \
20981 "${rlog_header1}
20982 ${log_tags1}
20983 ${log_keyword}
20984 total revisions: 5; selected revisions: 2
20985 description:
20986 ${log_rev3}
20987 ${log_rev2}
20988 ${log_trailer}"
20990 dotest log-r20a "${testcvs} rlog -r1.2:: first-dir/file1" \
20991 "${rlog_header1}
20992 ${log_tags1}
20993 ${log_keyword}
20994 total revisions: 5; selected revisions: 1
20995 description:
20996 ${log_rev3}
20997 ${log_trailer}"
20999 dotest log-r21 "${testcvs} rlog -r:1.2 first-dir/file1" \
21000 "${rlog_header1}
21001 ${log_tags1}
21002 ${log_keyword}
21003 total revisions: 5; selected revisions: 2
21004 description:
21005 ${log_rev2}
21006 ${log_rev1}
21007 ${log_trailer}"
21009 dotest log-r21a "${testcvs} rlog -r::1.2 first-dir/file1" \
21010 "${rlog_header1}
21011 ${log_tags1}
21012 ${log_keyword}
21013 total revisions: 5; selected revisions: 2
21014 description:
21015 ${log_rev2}
21016 ${log_rev1}
21017 ${log_trailer}"
21019 dotest log-r22 "${testcvs} rlog -r1.1:1.2 first-dir/file1" \
21020 "${rlog_header1}
21021 ${log_tags1}
21022 ${log_keyword}
21023 total revisions: 5; selected revisions: 2
21024 description:
21025 ${log_rev2}
21026 ${log_rev1}
21027 ${log_trailer}"
21029 dotest log-r22a "${testcvs} rlog -r1.1::1.2 first-dir/file1" \
21030 "${rlog_header1}
21031 ${log_tags1}
21032 ${log_keyword}
21033 total revisions: 5; selected revisions: 1
21034 description:
21035 ${log_rev2}
21036 ${log_trailer}"
21038 dotest log-r22b "${testcvs} rlog -r1.1::1.3 first-dir/file1" \
21039 "${rlog_header1}
21040 ${log_tags1}
21041 ${log_keyword}
21042 total revisions: 5; selected revisions: 2
21043 description:
21044 ${log_rev3}
21045 ${log_rev2}
21046 ${log_trailer}"
21048 dotest log-r23 "${testcvs} rlog -rfoo:: first-dir/file1" \
21049 "${SPROG} rlog: warning: no revision .foo. in .${CVSROOT_DIRNAME}/first-dir/file1,v.
21050 ${rlog_header1}
21051 ${log_tags1}
21052 ${log_keyword}
21053 total revisions: 5; selected revisions: 0
21054 description:
21055 ${log_trailer}"
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.
21059 ${rlog_header1}
21060 ${log_tags1}
21061 ${log_keyword}
21062 total revisions: 5; selected revisions: 0
21063 description:
21064 ${log_trailer}"
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.
21068 ${rlog_header1}
21069 ${log_tags1}
21070 ${log_keyword}
21071 total revisions: 5; selected revisions: 0
21072 description:
21073 ${log_trailer}"
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.
21077 ${rlog_header1}
21078 ${log_tags1}
21079 ${log_keyword}
21080 total revisions: 5; selected revisions: 0
21081 description:
21082 ${log_trailer}"
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.
21087 ${rlog_header1}
21088 ${log_tags1}
21089 ${log_keyword}
21090 total revisions: 5; selected revisions: 0
21091 description:
21092 ${log_trailer}"
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.
21097 ${rlog_header1}
21098 ${log_tags1}
21099 ${log_keyword}
21100 total revisions: 5; selected revisions: 0
21101 description:
21102 ${log_trailer}"
21104 # Test when head is dead
21106 dotest log-d0 "${testcvs} -q up -A" \
21107 "[UP] file1
21108 U file2"
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"
21115 log_header1="
21116 RCS file: ${CVSROOT_DIRNAME}/first-dir/Attic/file1,v
21117 Working file: file1
21118 head: 1\.4
21119 branch:
21120 locks: strict
21121 access list:"
21122 rlog_header1="
21123 RCS file: ${CVSROOT_DIRNAME}/first-dir/Attic/file1,v
21124 head: 1\.4
21125 branch:
21126 locks: strict
21127 access list:"
21128 log_header2="
21129 RCS file: ${CVSROOT_DIRNAME}/first-dir/file2,v
21130 Working file: file2
21131 head: 1\.3
21132 branch:
21133 locks: strict
21134 access list:"
21135 rlog_header2="
21136 RCS file: ${CVSROOT_DIRNAME}/first-dir/file2,v
21137 head: 1\.3
21138 branch:
21139 locks: strict
21140 access list:"
21141 log_tags2='symbolic names:
21142 tag2: 1\.3
21143 tag1: 1\.2'
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" \
21152 "${log_header1}
21153 ${log_tags1}
21154 ${log_keyword}
21155 total revisions: 6; selected revisions: 2
21156 description:
21157 ${log_rev2b}
21158 ${log_rev1b}
21159 ${log_trailer}"
21160 dotest log-rd3 "${testcvs} rlog -rbranch first-dir/file1" \
21161 "${rlog_header1}
21162 ${log_tags1}
21163 ${log_keyword}
21164 total revisions: 6; selected revisions: 2
21165 description:
21166 ${log_rev2b}
21167 ${log_rev1b}
21168 ${log_trailer}"
21169 dotest log-d4 "${testcvs} -q log -rbranch" \
21170 "${log_header1}
21171 ${log_tags1}
21172 ${log_keyword}
21173 total revisions: 6; selected revisions: 2
21174 description:
21175 ${log_rev2b}
21176 ${log_rev1b}
21177 ${log_trailer}
21178 ${SPROG} log: warning: no revision .branch. in .${CVSROOT_DIRNAME}/first-dir/file2,v.
21179 ${log_header2}
21180 ${log_tags2}
21181 ${log_keyword}
21182 total revisions: 3; selected revisions: 0
21183 description:
21184 ${log_trailer}"
21185 dotest log-d4a "${testcvs} -q log -t -rbranch" \
21186 "${log_header1}
21187 ${log_tags1}
21188 ${log_keyword}
21189 total revisions: 6
21190 description:
21191 ${log_trailer}
21192 ${SPROG} log: warning: no revision .branch. in .${CVSROOT_DIRNAME}/first-dir/file2,v.
21193 ${log_header2}
21194 ${log_tags2}
21195 ${log_keyword}
21196 total revisions: 3
21197 description:
21198 ${log_trailer}"
21199 dotest log-d4b "${testcvs} -q log -tS -rbranch" \
21200 "${log_header1}
21201 ${log_tags1}
21202 ${log_keyword}
21203 total revisions: 6; selected revisions: 2
21204 description:
21205 ${log_trailer}
21206 ${SPROG} log: warning: no revision .branch. in .${CVSROOT_DIRNAME}/first-dir/file2,v."
21207 dotest log-d4c "${testcvs} -q log -h -rbranch" \
21208 "${log_header1}
21209 ${log_tags1}
21210 ${log_keyword}
21211 total revisions: 6
21212 ${log_trailer}
21213 ${SPROG} log: warning: no revision .branch. in .${CVSROOT_DIRNAME}/first-dir/file2,v.
21214 ${log_header2}
21215 ${log_tags2}
21216 ${log_keyword}
21217 total revisions: 3
21218 ${log_trailer}"
21219 dotest log-d4d "${testcvs} -q log -hS -rbranch" \
21220 "${log_header1}
21221 ${log_tags1}
21222 ${log_keyword}
21223 total revisions: 6; selected revisions: 2
21224 ${log_trailer}
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" \
21233 "${rlog_header1}
21234 ${log_tags1}
21235 ${log_keyword}
21236 total revisions: 6; selected revisions: 2
21237 description:
21238 ${log_rev2b}
21239 ${log_rev1b}
21240 ${log_trailer}
21241 ${SPROG} rlog: warning: no revision .branch. in .${CVSROOT_DIRNAME}/first-dir/file2,v.
21242 ${rlog_header2}
21243 ${log_tags2}
21244 ${log_keyword}
21245 total revisions: 3; selected revisions: 0
21246 description:
21247 ${log_trailer}"
21248 dotest log-rd4a "${testcvs} -q rlog -t -rbranch first-dir" \
21249 "${rlog_header1}
21250 ${log_tags1}
21251 ${log_keyword}
21252 total revisions: 6
21253 description:
21254 ${log_trailer}
21255 ${SPROG} rlog: warning: no revision .branch. in .${CVSROOT_DIRNAME}/first-dir/file2,v.
21256 ${rlog_header2}
21257 ${log_tags2}
21258 ${log_keyword}
21259 total revisions: 3
21260 description:
21261 ${log_trailer}"
21262 dotest log-rd4b "${testcvs} -q rlog -St -rbranch first-dir" \
21263 "${rlog_header1}
21264 ${log_tags1}
21265 ${log_keyword}
21266 total revisions: 6; selected revisions: 2
21267 description:
21268 ${log_trailer}
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" \
21271 "${rlog_header1}
21272 ${log_tags1}
21273 ${log_keyword}
21274 total revisions: 6
21275 ${log_trailer}
21276 ${SPROG} rlog: warning: no revision .branch. in .${CVSROOT_DIRNAME}/first-dir/file2,v.
21277 ${rlog_header2}
21278 ${log_tags2}
21279 ${log_keyword}
21280 total revisions: 3
21281 ${log_trailer}"
21282 dotest log-rd4d "${testcvs} -q rlog -Sh -rbranch first-dir" \
21283 "${rlog_header1}
21284 ${log_tags1}
21285 ${log_keyword}
21286 total revisions: 6; selected revisions: 2
21287 ${log_trailer}
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" \
21296 "${log_header1}
21297 ${log_tags1}
21298 ${log_keyword}
21299 total revisions: 6; selected revisions: 2
21300 description:
21301 ${log_rev2b}
21302 ${log_rev1b}
21303 ${log_trailer}"
21304 dotest log-rd5 "${testcvs} rlog -r1.2.2.1:1.2.2.2 first-dir/file1" \
21305 "${rlog_header1}
21306 ${log_tags1}
21307 ${log_keyword}
21308 total revisions: 6; selected revisions: 2
21309 description:
21310 ${log_rev2b}
21311 ${log_rev1b}
21312 ${log_trailer}"
21313 dotest log-d6 "${testcvs} -q log -r1.2.2.1:1.2.2.2" \
21314 "${log_header1}
21315 ${log_tags1}
21316 ${log_keyword}
21317 total revisions: 6; selected revisions: 2
21318 description:
21319 ${log_rev2b}
21320 ${log_rev1b}
21321 ${log_trailer}
21322 ${log_header2}
21323 ${log_tags2}
21324 ${log_keyword}
21325 total revisions: 3; selected revisions: 0
21326 description:
21327 ${log_trailer}"
21328 dotest log-rd6 "${testcvs} -q rlog -r1.2.2.1:1.2.2.2 first-dir" \
21329 "${rlog_header1}
21330 ${log_tags1}
21331 ${log_keyword}
21332 total revisions: 6; selected revisions: 2
21333 description:
21334 ${log_rev2b}
21335 ${log_rev1b}
21336 ${log_trailer}
21337 ${rlog_header2}
21338 ${log_tags2}
21339 ${log_keyword}
21340 total revisions: 3; selected revisions: 0
21341 description:
21342 ${log_trailer}"
21343 dotest log-d7 "${testcvs} log -r1.2:1.3 file1" \
21344 "${log_header1}
21345 ${log_tags1}
21346 ${log_keyword}
21347 total revisions: 6; selected revisions: 2
21348 description:
21349 ${log_rev3}
21350 ${log_rev2}
21351 ${log_trailer}"
21352 dotest log-rd7 "${testcvs} -q rlog -r1.2:1.3 first-dir/file1" \
21353 "${rlog_header1}
21354 ${log_tags1}
21355 ${log_keyword}
21356 total revisions: 6; selected revisions: 2
21357 description:
21358 ${log_rev3}
21359 ${log_rev2}
21360 ${log_trailer}"
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.
21364 ${log_header1}
21365 ${log_tags1}
21366 ${log_keyword}
21367 total revisions: 6; selected revisions: 0
21368 description:
21369 ${log_trailer}
21370 ${log_header2}
21371 ${log_tags2}
21372 ${log_keyword}
21373 total revisions: 3; selected revisions: 2
21374 description:
21375 ${log_rev3}
21376 ${log_rev22}
21377 ${log_trailer}"
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.
21381 ${log_header2}
21382 ${log_tags2}
21383 ${log_keyword}
21384 total revisions: 3; selected revisions: 2
21385 description:
21386 ${log_rev3}
21387 ${log_rev22}
21388 ${log_trailer}"
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.
21392 ${rlog_header1}
21393 ${log_tags1}
21394 ${log_keyword}
21395 total revisions: 6; selected revisions: 0
21396 description:
21397 ${log_trailer}
21398 ${rlog_header2}
21399 ${log_tags2}
21400 ${log_keyword}
21401 total revisions: 3; selected revisions: 2
21402 description:
21403 ${log_rev3}
21404 ${log_rev22}
21405 ${log_trailer}"
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.
21409 ${rlog_header2}
21410 ${log_tags2}
21411 ${log_keyword}
21412 total revisions: 3; selected revisions: 2
21413 description:
21414 ${log_rev3}
21415 ${log_rev22}
21416 ${log_trailer}"
21418 dotest log-d99 "${testcvs} -q up -rbranch" \
21419 "[UP] file1
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
21426 done"
21427 dotest log-o1 "${testcvs} admin -o ::1.2.2.1 file1" \
21428 "RCS file: ${CVSROOT_DIRNAME}/first-dir/Attic/file1,v
21429 done"
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
21433 done"
21434 dotest log-o3 "${testcvs} log file1" \
21435 "${log_header1}
21436 ${log_tags1}
21437 ${log_keyword}
21438 total revisions: 5; selected revisions: 5
21439 description:
21440 ${log_rev4}
21441 ${log_rev3}
21442 ${log_rev2}
21443 ${log_rev1}
21444 ${log_rev1b}
21445 ${log_trailer}"
21446 dotest log-ro3 "${testcvs} rlog first-dir/file1" \
21447 "${rlog_header1}
21448 ${log_tags1}
21449 ${log_keyword}
21450 total revisions: 5; selected revisions: 5
21451 description:
21452 ${log_rev4}
21453 ${log_rev3}
21454 ${log_rev2}
21455 ${log_rev1}
21456 ${log_rev1b}
21457 ${log_trailer}"
21458 dotest log-o4 "${testcvs} -q update -p -r 1.2.2.1 file1" \
21459 "first branch revision"
21461 dokeep
21462 cd ..
21463 rm -r first-dir
21464 modify_repo rm -rf $CVSROOT_DIRNAME/first-dir
21469 log2)
21470 # More "cvs log" tests, for example the file description.
21472 # Check in a file
21473 modify_repo mkdir $CVSROOT_DIRNAME/first-dir
21474 dotest log2-1 "$testcvs -q co first-dir"
21475 cd 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
21490 head: 1\.1
21491 branch:
21492 locks: strict
21493 access list:
21494 keyword substitution: kv
21495 total revisions: 1; selected revisions: 1
21496 description:
21497 file1-is-for-testing
21498 ----------------------------
21499 revision 1\.1
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
21508 done"
21509 dotest log2-6 "${testcvs} log -N file1" "
21510 RCS file: ${CVSROOT_DIRNAME}/first-dir/file1,v
21511 Working file: file1
21512 head: 1\.1
21513 branch:
21514 locks: strict
21515 access list:
21516 keyword substitution: kv
21517 total revisions: 1; selected revisions: 1
21518 description:
21519 change-description
21520 ----------------------------
21521 revision 1\.1
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
21530 done"
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
21536 head: 1\.1
21537 branch:
21538 locks: strict
21539 access list:
21540 keyword substitution: kv
21541 total revisions: 1; selected revisions: 1
21542 description:
21543 longer description
21544 with two lines
21545 ----------------------------
21546 revision 1\.1
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"
21554 # doesn't exist.
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
21560 head: 1\.1
21561 branch:
21562 locks: strict
21563 access list:
21564 keyword substitution: kv
21565 total revisions: 1; selected revisions: 1
21566 description:
21567 change from stdin
21568 ----------------------------
21569 revision 1\.1
21570 date: ${ISO8601DATE}; author: ${username}; state: Exp; commitid: ${commitid};
21572 ============================================================================="
21574 dokeep
21575 cd ..
21576 rm $TESTDIR/descrip
21577 rm -r first-dir
21578 modify_repo rm -rf $CVSROOT_DIRNAME/first-dir
21583 logopt)
21584 # Some tests of log.c's option parsing and such things.
21585 mkdir 1; cd 1
21586 dotest logopt-1 "$testcvs -q co -l ." ''
21587 mkdir first-dir
21588 dotest logopt-2 "$testcvs add first-dir" \
21589 "Directory $CVSROOT_DIRNAME/first-dir added to the repository"
21590 cd first-dir
21591 echo hi >file1
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"
21598 cd ..
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"
21617 dokeep
21618 cd ..
21619 rm -r 1
21620 modify_repo rm -rf $CVSROOT_DIRNAME/first-dir
21625 ann)
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.
21630 mkdir 1; cd 1
21631 dotest ann-1 "$testcvs -q co -l ."
21632 mkdir first-dir
21633 dotest ann-2 "${testcvs} add first-dir" \
21634 "Directory ${CVSROOT_DIRNAME}/first-dir added to the repository"
21635 cd first-dir
21636 cat >file1 <<EOF
21637 this
21640 ancestral
21641 file
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"
21649 cat >file1 <<EOF
21650 this
21653 file
21655 with
21657 blank
21658 line
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"
21664 cat >file1 <<EOF
21665 this
21668 trunk file
21670 with
21672 blank
21673 line
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"
21679 cat >file1 <<EOF
21680 this
21683 file
21685 with
21687 blank
21688 line
21689 and some
21690 branched content
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
21749 cd ../..
21750 rm -r 1
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'"
21798 dokeep
21799 modify_repo rm -rf $CVSROOT_DIRNAME/first-dir
21804 ann-id)
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.
21809 mkdir 1; cd 1
21810 dotest ann-id-1 "$testcvs -q co -l ."
21811 module=x
21812 mkdir $module
21813 dotest ann-id-2 "${testcvs} add $module" \
21814 "Directory ${CVSROOT_DIRNAME}/$module added to the repository"
21815 cd $module
21817 file=m
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"
21837 dokeep
21838 cd ../..
21839 rm -rf 1
21840 modify_repo rm -rf $CVSROOT_DIRNAME/$module
21845 crerepos)
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.
21853 # local.
21854 if $remote; then
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"
21862 continue
21865 # Make sure server ignores real $HOME/.cvsrc:
21866 cat >$TESTDIR/cvs-setHome <<EOF
21867 #!$TESTSHELL
21868 HOME=$HOME
21869 export HOME
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
21877 else # local
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: .*"
21885 mkdir crerepos
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.
21903 mkdir 1; cd 1
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': "
21911 rm -rf CVS
21912 cd ..
21913 # The directory 1 should be empty
21914 dotest crerepos-6 "rmdir 1"
21916 if $remote; then
21917 # Test that CVS rejects a relative path in CVSROOT.
21918 mkdir 1; cd 1
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.\."
21928 cd ..
21929 rm -r 1
21931 mkdir 1; cd 1
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.\."
21938 cd ..
21939 rm -r 1
21940 else # local
21941 # Test that CVS rejects a relative path in CVSROOT.
21943 mkdir 1; cd 1
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"
21952 cd ..
21953 rm -r 1
21955 mkdir 1; cd 1
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.\."
21960 cd ..
21961 rm -r 1
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.
21971 mkdir 1; cd 1
21972 dotest crerepos-8 "${testcvs} -q co -l ." ''
21973 mkdir first-dir
21974 dotest crerepos-9 "${testcvs} add first-dir" \
21975 "Directory ${CVSROOT_DIRNAME}/first-dir added to the repository"
21976 cd first-dir
21977 touch file1
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"
21984 cd ../..
21985 rm -r 1
21987 mkdir 1; cd 1
21988 dotest crerepos-12 "$testcvs -d $CREREPOS_ROOT -q co -l ."
21989 mkdir crerepos-dir
21990 dotest crerepos-13 "$testcvs add crerepos-dir" \
21991 "Directory $TESTDIR/crerepos/crerepos-dir added to the repository"
21992 cd crerepos-dir
21993 touch cfile
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"
22000 cd ../..
22001 rm -r 1
22003 mkdir 1; cd 1
22004 dotest crerepos-16 "${testcvs} co first-dir" \
22005 "${SPROG} checkout: Updating first-dir
22006 U first-dir/file1"
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"
22014 cd ..
22016 CVS_SERVER=$CVS_SERVER_save; export CVS_SERVER
22018 if $keep; then
22019 echo Keeping ${TESTDIR} and exiting due to --keep
22020 exit 0
22023 dokeep
22024 rm -f $TESTDIR/cvs-setHome
22025 rm -r 1
22026 modify_repo rm -rf $CVSROOT_DIRNAME/first-dir
22027 rm -rf $TESTDIR/crerepos
22032 rcs)
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.
22042 save_TZ=$TZ
22043 TZ=UTC0; export TZ
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
22065 head 1.3;
22066 access;
22067 symbols;
22068 locks; strict;
22069 comment @# @;
22073 date ${RAWRCSDATE2000A}; author kingdon; state Exp;
22074 branches;
22075 next 1.2;
22078 date ${RAWRCSDATE1996A}; author kingdon; state Exp;
22079 branches;
22080 next 1.1;
22083 date ${RAWRCSDATE1996B}; author kingdon; state Exp;
22084 branches;
22085 next ;
22088 desc
22089 @file1 is for testing CVS
22095 @delete second line; modify twelfth line
22097 text
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
22115 @add more lines
22117 text
22118 @a1 1
22119 This is the second line
22120 d11 1
22121 a11 1
22122 This is the twelfth line
22128 @add file1
22130 text
22131 @d2 12
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'
22137 cd first-dir
22138 dotest rcs-2 "$testcvs -q log" "
22139 RCS file: $CVSROOT_DIRNAME/first-dir/file1,v
22140 Working file: file1
22141 head: 1\.3
22142 branch:
22143 locks: strict
22144 access list:
22145 symbolic names:
22146 keyword substitution: kv
22147 total revisions: 3; selected revisions: 3
22148 description:
22149 file1 is for testing CVS
22150 ----------------------------
22151 revision 1\.3
22152 date: ${ISO8601DATE2000A}; author: kingdon; state: Exp; lines: ${PLUS}1 -2;
22153 delete second line; modify twelfth line
22154 ----------------------------
22155 revision 1\.2
22156 date: ${ISO8601DATE1996A}; author: kingdon; state: Exp; lines: ${PLUS}12 -0;
22157 add more lines
22158 ----------------------------
22159 revision 1\.1
22160 date: ${ISO8601DATE1996B}; author: kingdon; state: Exp;
22161 add file1
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
22175 head: 1\.3
22176 branch:
22177 locks: strict
22178 access list:
22179 symbolic names:
22180 keyword substitution: kv
22181 total revisions: 3; selected revisions: 1
22182 description:
22183 file1 is for testing CVS
22184 ----------------------------
22185 revision 1\.3
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
22195 head: 1\.3
22196 branch:
22197 locks: strict
22198 access list:
22199 symbolic names:
22200 keyword substitution: kv
22201 total revisions: 3; selected revisions: 2
22202 description:
22203 file1 is for testing CVS
22204 ----------------------------
22205 revision 1\.2
22206 date: ${ISO8601DATE1996A}; author: kingdon; state: Exp; lines: ${PLUS}12 -0;
22207 add more lines
22208 ----------------------------
22209 revision 1\.1
22210 date: ${ISO8601DATE1996B}; author: kingdon; state: Exp;
22211 add file1
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
22236 # data/setup.
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
22243 head 1.5 ;
22244 branch 1.2.6;
22245 access ;
22246 symbols branch:1.2.6;
22247 locks;
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;
22255 desc @@
22256 1.5 log @@ newphrase1; newphrase2 42; text @head revision@
22257 1.4 log @@ text @d1 1
22258 a1 1
22259 new year revision@
22260 1.3 log @@ text @d1 1
22261 a1 1
22262 old year revision@
22263 1.2 log @@ text @d1 1
22264 a1 1
22265 mid revision@ 1.1
22267 log @@ text @d1 1
22268 a1 1
22269 start revision@
22270 1.2.6.1 log @@ text @d1 1
22271 a1 1
22272 branch revision@
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
22292 done"
22293 # But we do want to make sure that "cvs admin" leaves the newphrases
22294 # in the file.
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
22297 dotest rcs-8 \
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" \
22303 "head 1\.5;
22304 access;
22305 symbols
22306 branch:1.2.6;
22307 locks;
22309 testofanewphrase @without newphrase we'd have trouble extending @@ all@;
22311 1\.5
22312 date 71\.01\.01\.01\.00\.00; author joe; state bogus;
22313 branches;
22314 next 1\.4;
22316 1\.4
22317 date 71\.01\.01\.00\.00\.05; author joe; state bogus;
22318 branches;
22319 next 1\.3;
22321 1\.3
22322 date 70\.12\.31\.15\.00\.05; author joe; state bogus;
22323 branches;
22324 next 1\.2;
22326 1\.2
22327 date 70\.12\.31\.12\.15\.05; author me; state bogus;
22328 branches
22329 1\.2\.6\.1;
22330 next 1\.1;
22332 1\.1
22333 date 70\.12\.31\.11\.00\.05; author joe; state bogus;
22334 branches;
22335 next ;
22336 newph ;
22338 1\.2\.6\.1
22339 date 71\.01\.01\.08\.00\.05; author joe; state Exp;
22340 branches;
22341 next 1\.2\.6\.2;
22343 1\.2\.6\.2
22344 date [0-9.]*; author ${username}; state Exp;
22345 branches;
22346 next ;
22347 commitid ${commitid};
22350 desc
22354 1\.5
22357 newphrase1 ;
22358 newphrase2 42;
22359 text
22360 @head revision@
22363 1\.4
22366 text
22367 @d1 1
22368 a1 1
22369 new year revision@
22372 1\.3
22375 text
22376 @d1 1
22377 a1 1
22378 old year revision@
22381 1\.2
22384 text
22385 @d1 1
22386 a1 1
22387 mid revision@
22390 1\.1
22393 text
22394 @d1 1
22395 a1 1
22396 start revision@
22399 1\.2\.6\.1
22402 text
22403 @d1 1
22404 a1 1
22405 branch revision@
22408 1\.2\.6\.2
22410 @mod
22412 text
22413 @d1 1
22414 a1 1
22415 next branch revision
22418 dotest rcs-9 "${testcvs} -q update -p -D '1970-12-31 11:30 UT' file2" \
22419 "start revision"
22421 dotest rcs-10 "${testcvs} -q update -p -D '1970-12-31 12:30 UT' file2" \
22422 "mid revision"
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" \
22429 "mid revision"
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
22440 head: 1\.5
22441 branch:
22442 locks:
22443 access list:
22444 symbolic names:
22445 branch: 1\.2\.6
22446 keyword substitution: kv
22447 total revisions: 7; selected revisions: 7
22448 description:
22449 ----------------------------
22450 revision 1\.5
22451 date: 1971-01-01 01:00:00 [+-]0000; author: joe; state: bogus; lines: ${PLUS}1 -1;
22452 \*\*\* empty log message \*\*\*
22453 ----------------------------
22454 revision 1\.4
22455 date: 1971-01-01 00:00:05 [+-]0000; author: joe; state: bogus; lines: ${PLUS}1 -1;
22456 \*\*\* empty log message \*\*\*
22457 ----------------------------
22458 revision 1\.3
22459 date: 1970-12-31 15:00:05 [+-]0000; author: joe; state: bogus; lines: ${PLUS}1 -1;
22460 \*\*\* empty log message \*\*\*
22461 ----------------------------
22462 revision 1\.2
22463 date: 1970-12-31 12:15:05 [+-]0000; author: me; state: bogus; lines: ${PLUS}1 -1;
22464 branches: 1\.2\.6;
22465 \*\*\* empty log message \*\*\*
22466 ----------------------------
22467 revision 1\.1
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 \
22482 | grep revision" \
22483 "total revisions: 7; selected revisions: 3
22484 revision 1\.3
22485 revision 1\.2
22486 revision 1\.1"
22487 # Later than 1971-01-01
22488 dotest rcs-16 "${testcvs} -q log -d '1971-01-01 00:00 GMT<' file2 \
22489 | grep revision" \
22490 "total revisions: 7; selected revisions: 4
22491 revision 1\.5
22492 revision 1\.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
22499 revision 1\.5
22500 revision 1\.4
22501 revision 1\.1
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
22509 revision 1\.5
22510 revision 1\.1"
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
22516 revision 1\.5
22517 revision 1\.4"
22519 dokeep
22520 TZ=$save_TZ
22521 cd ..
22522 rm -r first-dir
22523 modify_repo rm -rf $CVSROOT_DIRNAME/first-dir
22528 rcs2)
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;
22548 desc @a test file@
22549 1.7 log @@ text @head revision@
22550 1.6 log @@ text @d1 1
22551 a1 1
22552 2004 was a great year for leaping@
22553 1.5 log @@ text @d1 1
22554 a1 1
22555 2003 wasn't@
22556 1.4 log @@ text @d1 1
22557 a1 1
22558 two year hiatus@
22559 1.3 log @@ text @d1 1
22560 a1 1
22561 2000 is also a good year for leaping@
22562 1.2 log @@ text @d1 1
22563 a1 1
22564 Tonight we're going to party like it's a certain year@
22565 1.1 log @@ text @d1 1
22566 a1 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'
22573 cd first-dir
22575 # 9 Sep 1999
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"
22578 # 1 Jan 2001.
22579 dotest rcs2-3 "${testcvs} -q update -p -D '2001-01-01 11:30 UT' file1" \
22580 "two year hiatus"
22581 # 29 Feb 2000
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" \
22589 "head revision"
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
22597 # from there).
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" \
22605 "head revision"
22606 dotest rcs2-8 "${testcvs} -q update -p -D '8 years' file1" \
22607 "head revision"
22609 dokeep
22610 cd ..
22611 rm -r first-dir
22612 modify_repo rm -rf $CVSROOT_DIRNAME/first-dir
22617 rcs3)
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
22626 mkdir 1; cd 1
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}"
22661 cd first-dir
22662 dotest_fail rcs3-5a "${testcvs} log -s nostate file1" \
22663 "${DOTSTAR}ssertion.*failed${DOTSTAR}" "${DOTSTAR}failed assertion${DOTSTAR}"
22664 cd ..
22666 # See remote code above for rationale for cd.
22667 cd first-dir
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' \
22674 >>$TESTDIR/file1,v
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"
22679 dokeep
22680 cd ../..
22681 rm -r 1
22682 modify_repo rm -rf $CVSROOT_DIRNAME/first-dir
22687 rcs4)
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
22699 # the coding bug.
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.
22710 save_TZ=$TZ
22711 TZ=UTC0; export TZ
22713 mkdir rcs4
22714 cd rcs4
22716 mkdir imp-dir
22717 cd imp-dir
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" \
22727 N rcs4-dir/file1
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
22736 U rcs4-dir/file1'
22737 cd ..
22738 # Next checkout the new module
22739 dotest rcs4-3 \
22740 "${testcvs} -q co rcs4-dir" \
22741 'U rcs4-dir/file1'
22742 cd 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
22752 # time.
22753 dotest rcs4-5 \
22754 "${testcvs} -q update -D 'October 1, 2001 UTC' file1" \
22755 '[UP] file1'
22756 dotest rcs4-6 \
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}'
22764 Sticky Tag: (none)
22765 Sticky Date: 2001\.10\.01\.00\.00\.00
22766 Sticky Options: (none)'
22768 dokeep
22769 TZ=$save_TZ
22770 cd ../..
22771 rm -r rcs4
22772 modify_repo rm -rf $CVSROOT_DIRNAME/rcs4-dir
22777 rcs5)
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
22792 head 1.1;
22793 access;
22794 symbols;
22795 locks;
22796 expand kv;
22798 1.1 date 2007.03.20.04.03.02; author jeremiah; state Ext; branches; next;
22800 desc
22805 @he always had very fine wine@
22806 text
22807 @line1
22810 echo ' * History: $''Log$' >>$TESTDIR/file1,v
22811 cat <<\EOF >>$TESTDIR/file1,v
22813 line5
22816 modify_repo mv $TESTDIR/file1,v $CVSROOT_DIRNAME/rcs5/file1,v
22818 mkdir rcs5
22819 cd rcs5
22820 dotest rcs5-1 "$testcvs -Q co rcs5"
22821 dotest rcs5-2 "cat rcs5/file1" \
22822 "line1
22823 /\\*
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
22827 \\* History:
22828 \\*/
22829 line5"
22831 cd ..
22832 rm -r rcs5
22833 modify_repo rm -rf $CVSROOT_DIRNAME/rcs5
22838 lockfiles)
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.
22844 if $proxy; then
22845 # don't even try
22846 continue
22849 mkdir 1; cd 1
22850 mkdir sdir
22851 mkdir sdir/ssdir
22852 echo file >sdir/ssdir/file1
22853 dotest lockfiles-1 \
22854 "${testcvs} -Q import -m import-it first-dir bar baz" ""
22855 cd ..
22857 mkdir 2; cd 2
22858 dotest lockfiles-2 "${testcvs} -q co first-dir" \
22859 "U first-dir/sdir/ssdir/file1"
22860 dotest lockfiles-3 "${testcvs} -Q co CVSROOT" ""
22861 cd 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"
22876 else
22877 chmod u=rwx,g=r,o= ${TESTDIR}/locks
22879 save_umask=`umask`
22880 umask 0077
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.
22893 # Bah! Cygwin!
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"
22899 else
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"
22906 cd ../../..
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:
22918 # Lock Present
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
22935 # present).
22936 # 6. Don't allow promotable read when write locks are present...
22937 # (fail to perform commit up-to-date check with promotable lock
22938 # present).
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...
22956 cd ..
22957 mkdir 3; cd 3
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).
22975 cd ../2
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
22985 # present).
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
22996 # present).
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"
23045 cd 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"
23052 dokeep
23053 cd ../..
23054 # Restore umask.
23055 umask $save_umask
23056 unset CVSUMASK
23057 rm -r $TESTDIR/locks
23058 rm -r 1 2 3
23059 modify_repo rm -rf $CVSROOT_DIRNAME/first-dir
23064 backuprecover)
23065 # Tests to make sure we get the expected behavior
23066 # when we recover a repository from an old backup
23068 # Details:
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
23081 # permanently
23082 # Granted, the developer should have been notified not to do this
23083 # by now, but still...
23085 mkdir backuprecover; cd backuprecover
23086 mkdir 1; cd 1
23087 dotest backuprecover-1 "$testcvs -q co -l ."
23088 mkdir first-dir
23089 dotest backuprecover-2 "${testcvs} add first-dir" \
23090 "Directory ${CVSROOT_DIRNAME}/first-dir added to the repository"
23091 cd first-dir
23092 mkdir dir
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...)
23123 cd ../..
23124 mkdir 2; cd 2
23125 dotest backuprecover-7 "${testcvs} -Q co first-dir" ''
23126 cd 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
23148 cd ../..
23149 mkdir 3; cd 3
23150 dotest backuprecover-9a "${testcvs} -Q co first-dir" ''
23151 cd first-dir
23152 echo >>file1
23153 echo >>dir/file2
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...
23165 cd ../..
23166 mkdir 4; cd 4
23167 dotest backuprecover-10 "${testcvs} -Q co first-dir" ''
23168 cd 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" ''
23174 echo >>file1
23175 echo >>dir/file2
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"
23197 echo >>file1
23198 echo "Tee hee hee hee" >>file1
23199 echo >>dir/file2
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 .
23214 U file1
23215 ${SPROG} update: Updating dir
23216 U dir/file2"
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
23227 cd ../..
23228 echo \
23229 "#!$TESTSHELL
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
23235 cd repos-first-dir
23236 DATADIRS=\`find . -name CVS -print\`
23237 cd ../first-dir
23238 find . -name CVS -print | xargs rm -rf
23239 for file in \${DATADIRS}; do
23240 cp -R ../repos-first-dir/\${file} \${file}
23241 done" >fixit
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)
23246 cd 3
23247 dotest backuprecover-17 \
23248 "${testcvs} -Q co -d repos-first-dir first-dir" ''
23249 cd ../4
23250 dotest backuprecover-18 \
23251 "${testcvs} -Q co -d repos-first-dir first-dir" ''
23252 sh ../fixit
23253 cd ../3; sh ../fixit
23255 # (re)commit developer 3's stuff
23256 cd first-dir
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
23273 C 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
23281 C dir/file2"
23282 sed -e \
23283 "/^<<<<<<</,/^=======/d
23284 /^>>>>>>>/d" file1 >tmp; mv tmp file1
23285 sed -e \
23286 "/^<<<<<<</,/^=======/d
23287 /^>>>>>>>/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" ''
23314 dokeep
23315 cd ../../..
23316 rm -r backuprecover
23317 modify_repo rm -rf $CVSROOT_DIRNAME/first-dir
23322 sshstdio)
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
23327 # skip this test.
23329 if $proxy; then
23330 notproxy sshstdio
23331 continue
23334 if $remote; then :; else
23335 remoteonly sshstdio
23336 continue
23339 require_ssh
23340 if test $? -eq 77; then
23341 skip sshstdio "$skipreason"
23342 continue
23345 SSHSTDIO_ROOT=:ext:$host$CVSROOT_DIRNAME
23347 mkdir sshstdio; cd sshstdio
23348 dotest sshstdio-1 "$testcvs -d $SSHSTDIO_ROOT -q co -l ."
23349 mkdir first-dir
23350 dotest sshstdio-2 "$testcvs add first-dir" \
23351 "Directory $CVSROOT_DIRNAME/first-dir added to the repository"
23352 cd first-dir
23353 a='aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa'
23354 c='aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaacaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa'
23355 # Generate 1024 lines of $a
23356 cnt=0
23357 echo $a > aaa
23358 while [ $cnt -lt 5 ] ; do
23359 cnt=`expr $cnt + 1` ;
23360 mv aaa aaa.old
23361 cat aaa.old aaa.old aaa.old aaa.old > aaa
23362 done
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
23376 #!$TESTSHELL
23377 exec "\$@" 2>&1 < /dev/null | cat
23379 chmod +x wrapper.sh
23380 ./wrapper.sh \
23381 $testcvs -z5 -Q diff --side-by-side -W 500 -r 1.1 -r 1.2 \
23382 aaa > wrapper.dif
23384 $testcvs -z5 -Q diff --side-by-side -W 500 -r 1.1 -r 1.2 \
23385 aaa > good.dif
23387 dotest sshstdio-6 "cmp wrapper.dif good.dif"
23389 dokeep
23390 cd ../..
23391 CVS_RSH=$save_CVS_RSH; export CVS_RSH
23392 rm -r sshstdio
23393 rm -rf $CVSROOT_DIRNAME/first-dir
23398 parseroot2)
23399 # Test some :ext: roots for consistancy.
23400 if $remote; then :; else
23401 remoteonly parseroot2
23402 continue
23405 require_rsh "$CVS_RSH"
23406 if test $? -eq 77; then
23407 skip parseroot2 "$skipreason"
23408 continue
23411 # Test checking out and subsequently updating with some different
23412 # CVSROOTs.
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"
23419 cd CVSROOT
23420 dotest parseroot2-2 "$testcvs -Q up"
23421 cd ..
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.
23426 rm -r CVSROOT
23427 CVSROOT=$host$CVSROOT_DIRNAME
23428 dotest parseroot2-3 "$testcvs -Q co CVSROOT"
23429 cd CVSROOT
23430 dotest parseroot2-4 "$testcvs -Q up"
23432 dokeep
23433 cd ../..
23434 CVSROOT=$save_CVSROOT
23435 rm -r parseroot2
23440 parseroot3)
23441 # Test some :ext: roots for consistancy.
23442 if $remote; then :; else
23443 remoteonly parseroot3
23444 continue
23447 require_rsh "$CVS_RSH"
23448 if test $? -eq 77; then
23449 skip parseroot3 "$skipreason"
23450 continue
23453 # Test checking out and subsequently updating with some different
23454 # CVSROOTs.
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
23461 unset CVS_RSH
23462 unset 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"
23465 cd CVSROOT
23466 dotest parseroot3-2 "$testcvs -Q up"
23467 cd ..
23469 # Initial checkout.
23470 rm -r CVSROOT
23471 CVSROOT=":ext;cvs_RSH=$save_CVS_RSH;CVS_Server=$save_CVS_SERVER:$host$CVSROOT_DIRNAME"
23472 dotest parseroot3-3 "$testcvs -Q co CVSROOT"
23473 cd CVSROOT
23474 dotest parseroot3-4 "$testcvs -Q up"
23475 cd ..
23477 # Checkout bogus values for Redirect
23478 rm -r CVSROOT
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'"
23482 cd CVSROOT
23483 # FIXCVS: parse_cvsroot is called more often that is
23484 # desirable.
23485 dotest parseroot3-6 "$testcvs -Q up" \
23486 "$SPROG update: CVSROOT: unrecognized value \`bogus' for \`Redirect'"
23487 cd ..
23489 # Checkout good values for Redirect
23490 rm -r CVSROOT
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"
23493 cd CVSROOT
23494 dotest parseroot3-8 "$testcvs -Q up"
23495 cd ..
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"
23502 dokeep
23503 cd ..
23504 CVSROOT=$save_CVSROOT
23505 CVS_RSH=$save_CVS_RSH
23506 CVS_SERVER=$save_CVS_SERVER
23507 export CVS_RSH CVS_SERVER
23508 rm -r parseroot3
23513 history)
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.
23524 if $proxy; then
23525 # don't even try
23526 continue
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>/\*"
23609 big)
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
23619 # benefit.
23621 modify_repo mkdir $CVSROOT_DIRNAME/first-dir
23622 dotest big-1 "$testcvs -q co first-dir"
23623 cd 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
23627 echo \
23628 "This is line ($i,$j,$k) which goes into the file file1 for testing" >>file1
23629 done
23630 done
23631 done
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"
23638 cd ..
23639 mkdir 2
23640 cd 2
23641 dotest big-4 "$testcvs -q get first-dir" "U first-dir/file1"
23642 cd ../first-dir
23643 echo "add a line to the end" >>file1
23645 dotest_fail big-4b "$testcvs -q diff -u" \
23646 "Index: file1
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"
23662 cd ../2/first-dir
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"
23667 dokeep
23668 cd ../..
23669 rm -r first-dir 2
23670 modify_repo rm -rf $CVSROOT_DIRNAME/first-dir
23675 modes)
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
23688 save_umask=`umask`
23689 umask 077
23690 mkdir 1; cd 1
23691 dotest modes-1 "${testcvs} -q co -l ." ''
23692 mkdir first-dir
23693 dotest modes-2 "${testcvs} add first-dir" \
23694 "Directory ${CVSROOT_DIRNAME}/first-dir added to the repository"
23695 cd first-dir
23696 touch aa
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"
23703 # Yawn. Cygwin.
23704 if test -n "$remotehost"; then
23705 dotest modes-5remotehost "$CVS_RSH $remotehost 'ls -l ${CVSROOT_DIRNAME}/first-dir/aa,v'" \
23706 "-r--r--r-- .*"
23707 else
23708 dotest modes-5 "ls -l ${CVSROOT_DIRNAME}/first-dir/aa,v" \
23709 "-r--r--r-- .*"
23712 # Test for whether we can set the execute bit.
23713 chmod +x aa
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
23720 # CVS behavior.
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'" \
23725 "-r--r--r-- .*"
23726 else
23727 dotest modes-7 "ls -l ${CVSROOT_DIRNAME}/first-dir/aa,v" \
23728 "-r--r--r-- .*"
23731 # OK, now manually change the modes and see what happens.
23733 # Cygwin, already.
23734 if test -n "$remotehost"; then
23735 $CVS_RSH $remotehost "chmod g=r,o= ${CVSROOT_DIRNAME}/first-dir/aa,v"
23736 else
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"
23743 # Cygwin.
23744 if test -n "$remotehost"; then
23745 dotest modes-7bremotehost "$CVS_RSH $remotehost 'ls -l ${CVSROOT_DIRNAME}/first-dir/aa,v'" \
23746 "-r--r----- .*"
23747 else
23748 dotest modes-7b "ls -l ${CVSROOT_DIRNAME}/first-dir/aa,v" \
23749 "-r--r----- .*"
23752 CVSUMASK=007
23753 export CVSUMASK
23754 touch ab
23755 # Might as well test the execute bit too.
23756 chmod +x ab
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'" \
23773 # "-r--r--r--.*"
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" \
23778 "-r-xr-x---.*"
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
23783 T ab'
23784 dotest modes-12 "${testcvs} -q update -r br" ''
23785 touch ac
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.
23797 dotest modes-15 \
23798 "ls -l ${CVSROOT_DIRNAME}/first-dir/Attic/ac,v" \
23799 "-r--r-----.*"
23801 dokeep
23802 cd ../..
23803 # Restore umask.
23804 umask $save_umask
23805 rm -r 1
23806 modify_repo rm -rf $CVSROOT_DIRNAME/first-dir
23811 modes2)
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.
23816 mkdir 1; cd 1
23817 dotest modes2-1 "${testcvs} -q co -l ." ''
23818 mkdir first-dir
23819 dotest modes2-2 "${testcvs} add first-dir" \
23820 "Directory ${CVSROOT_DIRNAME}/first-dir added to the repository"
23821 cd first-dir
23822 touch aa
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.
23839 touch aa
23840 chmod a= aa
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"
23848 dokeep
23849 chmod u+rwx aa
23850 cd ../..
23851 rm -r 1
23852 modify_repo rm -rf $CVSROOT_DIRNAME/first-dir
23857 modes3)
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).
23863 mkdir 1; cd 1
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
23883 # there.
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
23887 # denied error.
23888 if test -n "$remotehost"; then
23889 cygwin_hack=false
23890 else
23891 cygwin_hack=:
23893 else
23894 cygwin_hack=false
23897 cd $TESTDIR/1
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.
23915 rm -r first-dir
23916 dotest modes3-6 "${testcvs} update -dP" \
23917 "${SPROG} update: Updating .
23918 ${SPROG} update: Updating CVSROOT
23919 U ${DOTSTAR}
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
23926 U ${DOTSTAR}
23927 ${SPROG} update: Updating first-dir
23928 ${SPROG} update: Updating second-dir"
23930 dokeep
23931 cd ..
23932 rm -r 1
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
23941 stamps)
23942 # Test timestamps.
23943 mkdir 1; cd 1
23944 dotest stamps-1 "${testcvs} -q co -l ." ''
23945 mkdir first-dir
23946 dotest stamps-2 "${testcvs} add first-dir" \
23947 "Directory ${CVSROOT_DIRNAME}/first-dir added to the repository"
23948 cd first-dir
23949 touch aa
23950 echo '$''Id$' >kw
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
23953 # problem.
23954 sleep 60
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?
23960 sleep 60
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" ''
23972 sleep 60
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
23980 # problem.
23981 sleep 60
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
23993 then
23994 fail stamps-6kw
23995 else
23996 pass stamps-6kw
23998 cd ../..
23999 sleep 60
24000 mkdir 2
24001 cd 2
24002 dotest stamps-7 "${testcvs} -q get first-dir" "U first-dir/aa
24003 U first-dir/kw"
24004 cd first-dir
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
24010 # work.
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.
24017 sleep 60
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
24028 # problem.
24029 sleep 60
24030 ls -l aa >${TESTDIR}/1/stamp.aa.ci2
24031 ls -l kw >${TESTDIR}/1/stamp.kw.ci2
24032 cd ../..
24033 cd 1/first-dir
24034 sleep 60
24035 dotest stamps-10 "${testcvs} -q update" '[UP] aa
24036 [UP] kw'
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"
24057 dokeep
24058 cd ../..
24059 rm -r 1 2
24060 modify_repo rm -rf $CVSROOT_DIRNAME/first-dir
24065 perms)
24066 mkdir 1; cd 1
24067 dotest perms-init-1 "$testcvs -Q co CVSROOT"
24068 cd CVSROOT
24069 echo 'PreservePermissions=yes' >> ${CVSROOT_DIRNAME}/CVSROOT/config
24070 dotest perms-init-2 "$testcvs -Q ci -mperms"
24071 cd ..
24073 dotest perms-1 "$testcvs -q co -l ."
24074 mkdir first-dir
24075 dotest perms-2 "${testcvs} add first-dir" \
24076 "Directory ${CVSROOT_DIRNAME}/first-dir added to the repository"
24077 cd first-dir
24079 touch foo
24080 chmod 431 foo
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.
24089 cd ../..
24090 mkdir 2; cd 2
24091 dotest perms-5 "${testcvs} -q co first-dir" "U first-dir/foo"
24092 cd first-dir
24093 if $remote; then :; else
24094 # PreservePermissions not yet implemented for remote.
24095 dotest perms-6 "ls -l foo" "-r---wx--x .* foo"
24098 dokeep
24099 cd ../1/CVSROOT
24100 restore_adm
24101 cd ../..
24102 rm -rf 1 2
24103 modify_repo rm -rf $CVSROOT_DIRNAME/first-dir
24108 symlinks)
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
24114 mkdir 1; cd 1
24115 dotest symlinks-1 "$testcvs -q co -l ."
24116 mkdir first-dir
24117 dotest symlinks-2 "$testcvs add first-dir" \
24118 "Directory $CVSROOT_DIRNAME/first-dir added to the repository"
24119 cd first-dir
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"
24125 if $remote; then
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"
24130 else
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.
24136 cd ../..
24137 mkdir 2; cd 2
24138 dotest symlinks-5 "$testcvs -q co first-dir" "U first-dir/slink"
24139 cd first-dir
24140 dotest symlinks-6 "ls -l slink" \
24141 "l[rwx\-]* .* slink -> $TESTDIR/fumble"
24144 dokeep
24145 cd ../..
24146 rm -rf 1 2
24147 modify_repo rm -rf $CVSROOT_DIRNAME/first-dir
24148 restore_adm
24153 symlinks2)
24154 # Symlinks in working directory without PreservePermissions.
24155 # Also see: symlinks: with PreservePermissions
24156 # rcslib-symlink-*: symlinks in repository.
24157 mkdir 1; cd 1
24158 dotest symlinks2-1 "${testcvs} -q co -l ." ''
24159 mkdir first-dir
24160 dotest symlinks2-2 "${testcvs} add first-dir" \
24161 "Directory ${CVSROOT_DIRNAME}/first-dir added to the repository"
24162 cd first-dir
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"
24170 rm slink
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"
24181 dokeep
24182 cd ../..
24183 rm -rf 1
24184 modify_repo rm -rf $CVSROOT_DIRNAME/first-dir
24189 hardlinks)
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
24195 mkdir 1; cd 1
24196 dotest hardlinks-1 "${testcvs} -q co -l ." ''
24197 mkdir first-dir
24198 dotest hardlinks-2 "${testcvs} add first-dir" \
24199 "Directory ${CVSROOT_DIRNAME}/first-dir added to the repository"
24200 cd first-dir
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.
24205 if touch aaaa
24206 then
24207 pass hardlinks-2.1
24208 else
24209 fail hardlinks-2.1
24212 if ln aaaa b.b.b.b
24213 then
24214 pass hardlinks-2.2
24215 else
24216 fail hardlinks-2.2
24219 if ln aaaa 'dd dd dd'
24220 then
24221 pass hardlinks-2.3
24222 else
24223 fail hardlinks-2.3
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.
24239 cd ../..
24240 mkdir 2; cd 2
24241 if $remote; then
24242 # Remote does not implement PreservePermissions.
24243 dotest hardlinks-5r "${testcvs} -q co first-dir" \
24244 "U first-dir/aaaa
24245 U first-dir/b\.b\.b\.b
24246 U first-dir/dd dd dd"
24247 cd first-dir
24248 dotest hardlinks-6r "ls -l [abd]*" \
24249 "-[rwx\-]* *1 .* aaaa
24250 -[rwx\-]* *1 .* b\.b\.b\.b
24251 -[rwx\-]* *1 .* dd dd dd"
24252 else
24253 dotest hardlinks-5 "${testcvs} -q co first-dir" \
24254 "U first-dir/aaaa
24255 U first-dir/b\.b\.b\.b
24256 U first-dir/dd dd dd"
24257 cd first-dir
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"
24270 dokeep
24271 cd ../..
24272 rm -rf 1 2
24273 modify_repo rm -rf $CVSROOT_DIRNAME/first-dir
24274 restore_adm
24279 sticky)
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.
24284 mkdir 1; cd 1
24285 dotest sticky-1 "$testcvs -q co -l ."
24286 mkdir first-dir
24287 dotest sticky-2 "$testcvs add first-dir" \
24288 "Directory $CVSROOT_DIRNAME/first-dir added to the repository"
24289 cd first-dir
24291 touch file1
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" ''
24307 touch file2
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
24312 [UP] file1"
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"
24320 # Now back to tag1
24321 dotest sticky-15 "${testcvs} -q update -r tag1" "[UP] file1
24322 $SPROG update: \`file2' is no longer in the repository"
24324 rm file1
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
24333 U file2"
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
24338 U file2"
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
24359 U file1" "U file1"
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
24365 U file1" "U file1"
24367 dokeep
24368 restore_adm
24369 cd ../..
24370 rm -r 1
24371 modify_repo rm -rf $CVSROOT_DIRNAME/first-dir
24376 keyword)
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.
24389 mkdir 1; cd 1
24390 dotest keyword-1 "${testcvs} -q co -l ." ''
24391 mkdir first-dir
24392 dotest keyword-2 "${testcvs} add first-dir" \
24393 "Directory ${CVSROOT_DIRNAME}/first-dir added to the repository"
24394 cd first-dir
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: "'\$'"
24426 "'\$'"Name: "'\$'"
24427 "'\$'"RCSfile: file1,v "'\$'"
24428 "'\$'"Revision: 1\.1 "'\$'"
24429 "'\$'"Source: ${CVSROOT_DIRNAME}/first-dir/file1,v "'\$'"
24430 "'\$'"State: Exp "'\$'"
24431 "'\$'"Nonkey"'\$'"
24432 "'\$'"Date
24433 "'\$'"State: Exp "'\$'" "'\$'"State: Exp "'\$'"
24434 xx "'\$'"Log: file1,v "'\$'"
24435 xx Revision 1\.1 [0-9/]* [0-9:]* ${username}
24436 xx add
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
24444 1\.1 locked
24445 done"
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: "'\$'"
24454 "'\$'"Name: "'\$'"
24455 "'\$'"RCSfile: file1,v "'\$'"
24456 "'\$'"Revision: 1\.1 "'\$'"
24457 "'\$'"Source: ${CVSROOT_DIRNAME}/first-dir/file1,v "'\$'"
24458 "'\$'"State: Exp "'\$'"
24459 "'\$'"Nonkey"'\$'"
24460 "'\$'"Date
24461 "'\$'"State: Exp "'\$'" "'\$'"State: Exp "'\$'"
24462 xx "'\$'"Log: file1,v "'\$'"
24463 xx Revision 1\.1 [0-9/]* [0-9:]* ${username}
24464 xx add
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} "'\$'"
24474 "'\$'"Name: "'\$'"
24475 "'\$'"RCSfile: file1,v "'\$'"
24476 "'\$'"Revision: 1\.1 "'\$'"
24477 "'\$'"Source: ${CVSROOT_DIRNAME}/first-dir/file1,v "'\$'"
24478 "'\$'"State: Exp "'\$'"
24479 "'\$'"Nonkey"'\$'"
24480 "'\$'"Date
24481 "'\$'"State: Exp "'\$'" "'\$'"State: Exp "'\$'"
24482 xx "'\$'"Log: file1,v "'\$'"
24483 xx Revision 1\.1 ${RCSKEYDATE} ${username}
24484 xx add
24487 dotest keyword-11 "${testcvs} update -kk file1" "U file1"
24488 dotest keyword-12 "cat file1" \
24489 '\$'"Author"'\$'"
24490 "'\$'"Date"'\$'"
24491 "'\$'"Header"'\$'"
24492 "'\$'"Id"'\$'"
24493 "'\$'"Locker"'\$'"
24494 "'\$'"Name"'\$'"
24495 "'\$'"RCSfile"'\$'"
24496 "'\$'"Revision"'\$'"
24497 "'\$'"Source"'\$'"
24498 "'\$'"State"'\$'"
24499 "'\$'"Nonkey"'\$'"
24500 "'\$'"Date
24501 "'\$'"State"'\$'" "'\$'"State"'\$'"
24502 xx "'\$'"Log"'\$'"
24503 xx Revision 1\.1 ${RCSKEYDATE} ${username}
24504 xx add
24507 dotest keyword-13 "${testcvs} update -kv file1" "U file1"
24508 dotest keyword-14 "cat file1" \
24509 "${username}
24510 ${RCSKEYDATE}
24511 ${CVSROOT_DIRNAME}/first-dir/file1,v 1\.1 ${RCSKEYDATE} ${username} Exp
24512 file1,v 1\.1 ${RCSKEYDATE} ${username} Exp
24515 file1,v
24516 1\.1
24517 ${CVSROOT_DIRNAME}/first-dir/file1,v
24519 "'\$'"Nonkey"'\$'"
24520 "'\$'"Date
24521 Exp Exp
24522 xx file1,v
24523 xx Revision 1\.1 ${RCSKEYDATE} ${username}
24524 xx add
24527 dotest keyword-15 "${testcvs} update -ko file1" "U file1"
24528 dotest keyword-16 "cat file1" \
24529 '\$'"Author"'\$'"
24530 "'\$'"Date"'\$'"
24531 "'\$'"Header"'\$'"
24532 "'\$'"Id"'\$'"
24533 "'\$'"Locker"'\$'"
24534 "'\$'"Name"'\$'"
24535 "'\$'"RCSfile"'\$'"
24536 "'\$'"Revision"'\$'"
24537 "'\$'"Source"'\$'"
24538 "'\$'"State"'\$'"
24539 "'\$'"Nonkey"'\$'"
24540 "'\$'"Date
24541 "'\$'"State"'\$'" "'\$'"State"'\$'"
24542 xx "'\$'"Log"'\$'
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" \
24562 "P 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
24566 U file1"
24568 dotest keyword-22 "cat file1" '\$'"Name: tag1 "'\$'
24570 if $remote; then
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
24577 U file1"
24578 else
24579 dotest keyword-23 "${testcvs} update -A file1" "[UP] file1"
24581 dotest keyword-24 "cat file1" '\$'"Name: "'\$'"
24582 change"
24584 dokeep
24585 cd ../..
24586 rm -r 1
24587 modify_repo rm -rf $CVSROOT_DIRNAME/first-dir
24592 keywordlog)
24593 # Test the Log keyword.
24594 mkdir 1; cd 1
24595 dotest keywordlog-1 "${testcvs} -q co -l ." ''
24596 mkdir first-dir
24597 dotest keywordlog-2 "${testcvs} add first-dir" \
24598 "Directory ${CVSROOT_DIRNAME}/first-dir added to the repository"
24599 cd first-dir
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"
24610 cd ../..
24611 mkdir 2; cd 2
24612 dotest keywordlog-4a "${testcvs} -q co first-dir" "U first-dir/file1"
24613 cd ../1/first-dir
24615 echo 'xx $''Log$' >> file1
24616 cat >${TESTDIR}/comment.tmp <<EOF
24617 First log line
24618 Second log line
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" \
24633 "initial
24634 xx "'\$'"Log: file1,v "'\$'"
24635 xx Revision 1\.4 ${RCSKEYDATE} ${username}
24636 xx First log line
24637 xx Second log line
24640 cd ../../2/first-dir
24641 dotest keywordlog-8 "${testcvs} -q update" "[UP] file1"
24642 dotest keywordlog-9 "cat file1" \
24643 "initial
24644 xx "'\$'"Log: file1,v "'\$'"
24645 xx Revision 1\.4 ${RCSKEYDATE} ${username}
24646 xx First log line
24647 xx Second log line
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" \
24656 "initial
24657 xx "'\$'"Log: file1,v "'\$'"
24658 xx Revision 1\.5 ${RCSKEYDATE} ${username}
24659 xx modify
24661 xx Revision 1\.4 ${RCSKEYDATE} ${username}
24662 xx First log line
24663 xx Second log line
24665 change"
24667 cd ../../2/first-dir
24668 dotest keywordlog-12 "${testcvs} -q update" "[UP] file1"
24669 dotest keywordlog-13 "cat file1" \
24670 "initial
24671 xx "'\$'"Log: file1,v "'\$'"
24672 xx Revision 1\.5 ${RCSKEYDATE} ${username}
24673 xx modify
24675 xx Revision 1\.4 ${RCSKEYDATE} ${username}
24676 xx First log line
24677 xx Second log line
24679 change"
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" \
24688 "initial
24689 xx "'\$'"Log: file1,v "'\$'"
24690 xx Revision 1\.4\.2\.1 ${RCSKEYDATE} ${username}
24691 xx br-modify
24693 xx Revision 1\.4 ${RCSKEYDATE} ${username}
24694 xx First log line
24695 xx Second log line
24697 br-change"
24698 cd ../../2/first-dir
24699 dotest keywordlog-17 "${testcvs} -q update -r br" "[UP] file1"
24700 dotest keywordlog-18 "cat file1" \
24701 "initial
24702 xx "'\$'"Log: file1,v "'\$'"
24703 xx Revision 1\.4\.2\.1 ${RCSKEYDATE} ${username}
24704 xx br-modify
24706 xx Revision 1\.4 ${RCSKEYDATE} ${username}
24707 xx First log line
24708 xx Second log line
24710 br-change"
24711 cd ../..
24712 dotest keywordlog-19 "${testcvs} -q co -p -r br first-dir/file1" \
24713 "initial
24714 xx "'\$'"Log: file1,v "'\$'"
24715 xx Revision 1\.4\.2\.1 ${RCSKEYDATE} ${username}
24716 xx br-modify
24718 xx Revision 1\.4 ${RCSKEYDATE} ${username}
24719 xx First log line
24720 xx Second log line
24722 br-change"
24723 dotest keywordlog-20 "${testcvs} -q co -p first-dir/file1" \
24724 "initial
24725 xx "'\$'"Log: file1,v "'\$'"
24726 xx Revision 1\.5 ${RCSKEYDATE} ${username}
24727 xx modify
24729 xx Revision 1\.4 ${RCSKEYDATE} ${username}
24730 xx First log line
24731 xx Second log line
24733 change"
24734 dotest keywordlog-21 "${testcvs} -q co -p -r 1.4 first-dir/file1" \
24735 "initial
24736 xx "'\$'"Log: file1,v "'\$'"
24737 xx Revision 1\.4 ${RCSKEYDATE} ${username}
24738 xx First log line
24739 xx Second log line
24742 cd 2/first-dir
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"
24774 cd ../..
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
24785 done"
24787 dotest keywordlog-25 \
24788 "${testcvs} -q co -p first-dir/file1" \
24789 "initial
24790 xx "'\$'"Log: file1,v "'\$'"
24791 xx Revision 1\.4 ${RCSKEYDATE} ${username}
24792 xx First log line
24793 xx Second log line
24796 # Now test the behavior when the comment leader exceeds the
24797 # configured maximum.
24798 mkdir 3; cd 3
24799 dotest keywordlog-26 "$testcvs -Q co first-dir"
24801 cd first-dir
24802 sed 's/xx \$/1234567890123456789 $/' <file1 >tmp
24803 mv tmp file1
24804 dotest keywordlog-27 "$testcvs -Q ci -mrevision-5"
24805 dotest keywordlog-28 "cat file1" \
24806 "initial
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
24812 xx First log line
24813 xx Second log line
24816 sed 's/1234567890123456789 \$/12345678901234567890 $/' <file1 >tmp
24817 mv tmp file1
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" \
24821 "initial
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
24827 xx First log line
24828 xx Second log line
24831 # Check that the Log-related config options work.
24832 cd ..
24833 dotest keywordlog-31 "$testcvs -Q co CVSROOT"
24834 cd CVSROOT
24835 echo "UseArchiveCommentLeader=TrUe" >>config
24836 dotest keywordlog-32 "$testcvs -Q ci -mset-UseArchiveCommentLeader"
24838 cd ../first-dir
24839 dotest keywordlog-33 "$testcvs -Q ci -fmrevision-7 file1"
24840 dotest keywordlog-34 "cat file1" \
24841 "initial
24842 12345678901234567890 "'\$'"Log: file1,v "'\$'"
24843 # Revision 1\.7 $RCSKEYDATE $username
24844 # revision-7
24846 1234567890123456789 Revision 1\.5 $RCSKEYDATE $username
24847 1234567890123456789 revision-5
24848 1234567890123456789
24849 xx Revision 1\.4 $RCSKEYDATE $username
24850 xx First log line
24851 xx Second log line
24854 cd ../CVSROOT
24855 echo "MaxCommentLeaderLength=1k" >>config
24856 dotest keywordlog-35 "$testcvs -Q ci -mset-MaxCommentLeaderLength"
24858 cd ../first-dir
24859 dotest keywordlog-36 "$testcvs -Q ci -fmrevision-8 file1"
24860 dotest keywordlog-37 "cat file1" \
24861 "initial
24862 12345678901234567890 "'\$'"Log: file1,v "'\$'"
24863 12345678901234567890 Revision 1\.8 $RCSKEYDATE $username
24864 12345678901234567890 revision-8
24865 12345678901234567890
24866 # Revision 1\.7 $RCSKEYDATE $username
24867 # revision-7
24869 1234567890123456789 Revision 1\.5 $RCSKEYDATE $username
24870 1234567890123456789 revision-5
24871 1234567890123456789
24872 xx Revision 1\.4 $RCSKEYDATE $username
24873 xx First log line
24874 xx Second log line
24877 dokeep
24878 cd ../..
24879 restore_adm
24880 rm -r 1 2 3
24881 modify_repo rm -rf $CVSROOT_DIRNAME/first-dir
24886 keywordname)
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
24891 mkdir 1; cd 1
24892 dotest keywordname-init-1 "${testcvs} -q co -l ." ''
24893 mkdir first-dir
24894 dotest keywordname-init-2 "${testcvs} add first-dir" \
24895 "Directory ${CVSROOT_DIRNAME}/first-dir added to the repository"
24896 cd first-dir
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" \
24914 "T file1
24915 T file2"
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.
24927 # FIXCVS - BUG
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
24930 # being required.
24931 # FIXCVS - see note above keyword-21
24932 dotest keywordname-update-1 "${testcvs} -q up -rbr" "U file1" \
24933 "P 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
24937 U file1"
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
24942 # $Name
24943 dotest keywordname-update-4 "${testcvs} -q tag firsttag" \
24944 "T file1
24945 T file2"
24946 # FIXCVS - see note above keyword-21
24947 dotest keywordname-update-5 "${testcvs} -q up -A" "U file1" \
24948 "P 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
24952 U file1"
24953 dotest keywordname-update-6 "cat file1" \
24954 '\$'"Name: "'\$'"
24955 new data"
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" \
24961 "P 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
24965 U file1"
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" \
24971 "P 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
24975 U file1"
24976 dotest keywordname-update-12 "cat file1" \
24977 '\$'"Name: "'\$'"
24978 new data"
24979 dotest keywordname-update-13 "cat file2" '\$'"Name: "'\$'
24981 cd ../..
24983 # now verify that a fresh checkout substitutes all the $Name fields
24984 mkdir 2; cd 2
24985 dotest keywordname-checkout-1 \
24986 "${testcvs} -q co -rfirsttag first-dir" \
24987 "U first-dir/file1
24988 U first-dir/file2"
24989 cd first-dir
24990 dotest keywordname-checkout-2 "cat file1" '\$'"Name: firsttag "'\$'
24991 dotest keywordname-checkout-3 "cat file2" '\$'"Name: firsttag "'\$'
24993 dokeep
24994 cd ../../..
24995 rm -r keywordname
24996 modify_repo rm -rf $CVSROOT_DIRNAME/first-dir
25001 keyword2)
25002 # Test merging on files with keywords:
25003 # without -kk
25004 # with -kk
25005 # on text files
25006 # on binary files
25007 # Note: This test assumes that CVS has already passed the binfiles
25008 # test sequence
25009 # Note2: We are testing positive on binary corruption here
25010 # we probably really DON'T want to 'cvs update -kk' a binary file...
25011 mkdir 1; cd 1
25012 dotest keyword2-1 "${testcvs} -q co -l ." ''
25013 mkdir first-dir
25014 dotest keyword2-2 "${testcvs} add first-dir" \
25015 "Directory ${CVSROOT_DIRNAME}/first-dir added to the repository"
25016 cd first-dir
25018 echo '$''Revision$' >> file1
25019 echo "I" >>file1
25020 echo "like" >>file1
25021 echo "long" >>file1
25022 echo "files!" >>file1
25023 echo "" >>file1
25024 echo "a test line for our times" >>file1
25025 echo "" >>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" \
25051 "T binfile\.dat
25052 T file1"
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" \
25068 "U file1
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" \
25076 "Index: file1
25077 ===================================================================
25078 RCS file: ${CVSROOT_DIRNAME}/first-dir/file1,v
25079 retrieving revision 1\.2
25080 diff -r1\.2 file1
25082 > <<<<<<< file1
25083 1a3,5
25084 > =======
25085 > \\\$""Revision: 1\.1\.2\.1 \\\$
25086 > >>>>>>> 1\.1\.2\.1
25087 14a19
25088 > what else do we have${QUESTION}"
25090 # Here's the problem... shouldn't -kk a binary file...
25091 rm file1
25092 dotest keyword2-13 "${testcvs} -q update -A -kk -j branch" \
25093 "${SPROG} update: warning: \`file1' was lost
25094 U file1
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" \
25112 "[UP] file1"
25113 dotest keyword2-17 "${testcvs} -q tag -b branch2" \
25114 "T binfile\.dat
25115 T file1"
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" \
25128 "U binfile\.dat
25129 U binfile\.dat
25130 U file1"
25132 dokeep
25133 cd ../..
25134 rm -r 1
25135 modify_repo rm -rf $CVSROOT_DIRNAME/first-dir
25140 head)
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).
25148 mkdir imp-dir
25149 cd imp-dir
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" \
25157 N first-dir/file1
25158 N first-dir/file2
25159 No conflicts created by this import"
25160 cd ..
25161 rm -r imp-dir
25162 mkdir 1
25163 cd 1
25164 dotest head-2 "${testcvs} -q co first-dir" \
25165 "U first-dir/file1
25166 U first-dir/file2"
25167 cd 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
25173 T file2"
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
25179 T file2"
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
25186 T file2"
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" \
25194 "imported contents
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" \
25200 "Index: file1
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 \*\*\*\*
25210 --- 1,5 ----
25211 imported contents
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" \
25220 "imported contents
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" \
25231 "imported contents
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" \
25243 "[UP] file1"
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" \
25247 "imported contents
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" \
25253 "Index: file1
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 \*\*\*\*
25263 --- 1,5 ----
25264 imported contents
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
25283 done"
25284 dotest head-o0b "${testcvs} tag -d brtag" \
25285 "${SPROG} tag: Untagging \.
25286 D file1
25287 D file2"
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
25292 done
25293 RCS file: ${CVSROOT_DIRNAME}/first-dir/file2,v
25294 done"
25296 dokeep
25297 cd ../..
25298 rm -r 1
25299 modify_repo rm -rf $CVSROOT_DIRNAME/first-dir
25304 tagdate)
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.
25309 # Notice:
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.
25321 mkdir 1; cd 1
25322 save_TZ=$TZ
25323 TZ=UTC0; export TZ
25324 dotest tagdate-1 "${testcvs} -q co -l ." ''
25325 mkdir first-dir
25326 dotest tagdate-2 "${testcvs} add first-dir" \
25327 "Directory ${CVSROOT_DIRNAME}/first-dir added to the repository"
25328 cd first-dir
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"
25352 echo br2-1 >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"
25364 # And check export
25366 echo br2-2 >file1
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" \
25375 "Index: 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
25383 @@ -1 ${PLUS}1 @@
25384 -br2-1
25385 ${PLUS}br2-2"
25387 # Tag a date on a branch.
25388 dotest tagdate-13c "$testcvs -q tag -rbr2:'$date_T3' tagdate" \
25389 "T file1"
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"
25400 cd ../..
25401 mkdir 2; cd 2
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"
25411 # Now for annotate
25412 cd ../1/first-dir
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
25426 echo br2-1 > file3
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`
25436 cd ../..
25437 mkdir 3; cd 3
25438 dotest tagdate-20 "${testcvs} -Q co first-dir" ''
25439 cd 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
25455 echo br2-1 > file2
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`
25463 cd ../..
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"
25472 # +60s
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"
25482 mkdir 4; cd 4
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}
25557 Sticky Tag: (none)
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}
25581 Sticky Tag: (none)
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}
25651 Sticky Tag: (none)
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}
25661 Sticky Tag: (none)
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}
25695 Sticky Tag: (none)
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}
25705 Sticky Tag: (none)
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"
25783 cd ..
25785 unset date_T1 date_T2 date_T3 date_T4 date_T5
25786 unset date_T6 date_T7 date_T8 date_T9
25787 TZ=$save_TZ
25789 dokeep
25790 rm -r 1 2 3 4
25791 modify_repo rm -rf $CVSROOT_DIRNAME/first-dir
25796 multibranch2)
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.
25801 mkdir 1; cd 1
25802 dotest multibranch2-1 "${testcvs} -q co -l ." ''
25803 mkdir first-dir
25804 dotest multibranch2-2 "${testcvs} add first-dir" \
25805 "Directory ${CVSROOT_DIRNAME}/first-dir added to the repository"
25806 cd first-dir
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
25820 T file2"
25821 dotest multibranch2-6 "${testcvs} -q tag -b B" "T file1
25822 T file2"
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
25834 [UP] file2'
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
25845 head: 1\.1
25846 branch:
25847 locks: strict
25848 access list:
25849 symbolic names:
25850 B: 1\.1\.0\.4
25851 A: 1\.1\.0\.2
25852 keyword substitution: kv
25853 total revisions: 3; selected revisions: 3
25854 description:
25855 ----------------------------
25856 revision 1\.1
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};
25863 modify-on-B
25864 ----------------------------
25865 revision 1\.1\.2\.1
25866 date: ${ISO8601DATE}; author: $username; state: Exp; lines: ${PLUS}1 -1; commitid: ${commitid};
25867 modify-on-A
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
25875 head: 1\.1
25876 branch:
25877 locks: strict
25878 access list:
25879 symbolic names:
25880 B: 1\.1\.0\.4
25881 A: 1\.1\.0\.2
25882 keyword substitution: kv
25883 total revisions: 3; selected revisions: 1
25884 description:
25885 ----------------------------
25886 revision 1\.1
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
25897 [UP] file2"
25898 dotest multibranch2-14 "${testcvs} -q update -r A -j B file2" \
25899 "[UP] 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"
25908 dokeep
25909 cd ../..
25910 rm -r 1
25911 modify_repo rm -rf $CVSROOT_DIRNAME/first-dir
25916 tag8k)
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.
25925 mkdir 1
25926 cd 1
25928 module=x
25930 : > junk
25931 dotest tag8k-1 "$testcvs -Q import -m . $module X Y" ''
25932 dotest tag8k-2 "$testcvs -Q co $module" ''
25933 cd $module
25935 file=m
25936 : > $file
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.
25943 echo a > $file
25944 dotest tag8k-5 "$testcvs -Q ci -m . $file"
25946 # Add just under 8K worth of tags.
25947 t=TAG---------------------------------------------------------------------
25948 t=$t$t
25949 t=$t$t$t$t$t
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.
25979 echo a >> $file
25980 dotest tag8k-18 "$testcvs -Q ci -m . $file"
25982 dokeep
25983 cd ../..
25984 rm -r 1
25985 modify_repo rm -rf $CVSROOT_DIRNAME/$module
25990 admin)
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.
25997 # For -o, see:
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:
26008 # 1.3.2.6::1.3.2.8
26009 # 1.3.2.6::1.3.2
26010 # 1.3.2.1::1.3.2.6
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
26016 # tested.
26017 mkdir 2; cd 2
26018 dotest admin-init-1 "$testcvs -Q co CVSROOT"
26019 cd CVSROOT
26020 echo "ALL $TESTDIR/2/loggit %r %p %c" >>postadmin
26021 dotest admin-init-2 "$testcvs -Q ci -mlog-admin"
26022 cd .. # 2
26024 cat >loggit <<EOF
26025 #!$TESTSHELL
26026 echo \${1+"\$@"} >>$TESTDIR/2/admin-log
26028 # #^@&!^@ Cygwin.
26029 if test -n "$remotehost"; then
26030 $CVS_RSH $remotehost "chmod +x $TESTDIR/2/loggit"
26031 else
26032 chmod +x loggit
26034 cd .. # $TESTDIR
26037 mkdir 1; cd 1
26038 dotest admin-1 "${testcvs} -q co -l ." ''
26039 mkdir first-dir
26040 dotest admin-2 "${testcvs} add first-dir" \
26041 "Directory ${CVSROOT_DIRNAME}/first-dir added to the repository"
26042 cd first-dir
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
26054 # on a branch.
26055 touch file1 file2
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
26066 T file2"
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" \
26078 "U file1
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
26086 done
26087 RCS file: ${CVSROOT_DIRNAME}/first-dir/file2,v
26088 done"
26089 dotest admin-10-2 "${testcvs} -q admin file3" \
26090 "RCS file: ${CVSROOT_DIRNAME}/first-dir/Attic/file3,v
26091 done"
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
26113 # the old one.
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
26120 done"
26121 dotest admin-11a "${testcvs} log -N file1" "
26122 RCS file: ${CVSROOT_DIRNAME}/first-dir/file1,v
26123 Working file: file1
26124 head: 1\.1
26125 branch: 1\.1\.2
26126 locks:
26127 access list:
26131 keyword substitution: kv
26132 total revisions: 2; selected revisions: 2
26133 description:
26134 ----------------------------
26135 revision 1\.1
26136 date: ${ISO8601DATE}; author: ${username}; state: Exp; commitid: ${commitid};
26137 branches: 1\.1\.2;
26139 ----------------------------
26140 revision 1\.1\.2\.1
26141 date: ${ISO8601DATE}; author: ${username}; state: foo; lines: ${PLUS}1 -0; commitid: ${commitid};
26142 modify-on-branch
26143 ============================================================================="
26144 dotest admin-12 "${testcvs} -q admin -bbr file1" \
26145 "RCS file: ${CVSROOT_DIRNAME}/first-dir/file1,v
26146 done"
26147 dotest admin-12a "${testcvs} log -N file1" "
26148 RCS file: ${CVSROOT_DIRNAME}/first-dir/file1,v
26149 Working file: file1
26150 head: 1\.1
26151 branch: 1\.1\.2
26152 locks:
26153 access list:
26157 keyword substitution: kv
26158 total revisions: 2; selected revisions: 2
26159 description:
26160 ----------------------------
26161 revision 1\.1
26162 date: ${ISO8601DATE}; author: ${username}; state: Exp; commitid: ${commitid};
26163 branches: 1\.1\.2;
26165 ----------------------------
26166 revision 1\.1\.2\.1
26167 date: ${ISO8601DATE}; author: ${username}; state: foo; lines: ${PLUS}1 -0; commitid: ${commitid};
26168 modify-on-branch
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" \
26183 "head 1\.1;
26184 branch 1\.1\.2;
26185 access
26188 baz;
26189 symbols
26190 br:1\.1\.0\.2;
26191 locks;
26192 comment @xx@;
26195 1\.1
26196 date ${RCSDELTADATE}; author ${username}; state Exp;
26197 branches
26198 1\.1\.2\.1;
26199 next ;
26200 commitid ${commitid};
26202 1\.1\.2\.1
26203 date ${RCSDELTADATE}; author ${username}; state foo;
26204 branches;
26205 next ;
26206 commitid ${commitid};
26209 desc
26213 1\.1
26215 @add
26217 text
26221 1\.1\.2\.1
26223 @modify-on-branch
26225 text
26226 @a0 1
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
26237 head: 1\.1
26238 branch:
26239 locks: strict
26240 access list:
26241 symbolic names:
26242 br: 1\.1\.0\.2
26243 keyword substitution: kv
26244 total revisions: 1; selected revisions: 1
26245 description:
26246 ----------------------------
26247 revision 1\.1
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
26255 done"
26256 dotest admin-15 "${testcvs} -q log file2" "
26257 RCS file: ${CVSROOT_DIRNAME}/first-dir/file2,v
26258 Working file: file2
26259 head: 1\.1
26260 branch:
26261 locks: strict
26262 access list:
26263 auth3
26264 auth2
26266 symbolic names:
26267 tagone: 1\.1
26268 br: 1\.1\.0\.2
26269 keyword substitution: kv
26270 total revisions: 1; selected revisions: 1
26271 description:
26272 ----------------------------
26273 revision 1\.1
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
26281 done"
26282 dotest admin-17 "${testcvs} -q log file1" "
26283 RCS file: ${CVSROOT_DIRNAME}/first-dir/file1,v
26284 Working file: file1
26285 head: 1\.1
26286 branch:
26287 locks: strict
26288 access list:
26292 auth3
26293 auth2
26294 symbolic names:
26295 br: 1\.1
26296 keyword substitution: kv
26297 total revisions: 2; selected revisions: 2
26298 description:
26299 ----------------------------
26300 revision 1\.1
26301 date: ${ISO8601DATE}; author: ${username}; state: Exp; commitid: ${commitid};
26302 branches: 1\.1\.2;
26304 ----------------------------
26305 revision 1\.1\.2\.1
26306 date: ${ISO8601DATE}; author: ${username}; state: foo; lines: ${PLUS}1 -0; commitid: ${commitid};
26307 modify-on-branch
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
26316 done"
26317 dotest admin-20 "${testcvs} -q log file1" "
26318 RCS file: ${CVSROOT_DIRNAME}/first-dir/file1,v
26319 Working file: file1
26320 head: 1\.1
26321 branch:
26322 locks: strict
26323 access list:
26325 auth2
26326 symbolic names:
26327 keyword substitution: kv
26328 total revisions: 2; selected revisions: 2
26329 description:
26330 ----------------------------
26331 revision 1\.1
26332 date: ${ISO8601DATE}; author: ${username}; state: Exp; commitid: ${commitid};
26333 branches: 1\.1\.2;
26335 ----------------------------
26336 revision 1.1.2.1
26337 date: ${ISO8601DATE}; author: ${username}; state: foo; lines: ${PLUS}1 -0; commitid: ${commitid};
26338 modify-on-branch
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
26356 done"
26357 dotest admin-19a-log "${testcvs} -q log -h -N file1" "
26358 RCS file: ${CVSROOT_DIRNAME}/first-dir/file1,v
26359 Working file: file1
26360 head: 1\.1
26361 branch:
26362 locks: strict
26363 access list:
26365 auth2
26366 auth3
26367 keyword substitution: kv
26368 total revisions: 2
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
26375 done"
26376 dotest admin-19a-3 "${testcvs} -q log -h -N file1" "
26377 RCS file: ${CVSROOT_DIRNAME}/first-dir/file1,v
26378 Working file: file1
26379 head: 1\.1
26380 branch:
26381 locks: strict
26382 access list:
26383 keyword substitution: kv
26384 total revisions: 2
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
26390 done"
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
26400 done"
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
26436 1\.6 locked
26437 done"
26438 dotest admin-22-o9 "${testcvs} log -r1.6 aaa" "
26439 RCS file: ${CVSROOT_DIRNAME}/first-dir/aaa,v
26440 Working file: aaa
26441 head: 1\.6
26442 branch:
26443 locks: strict
26444 ${username}: 1\.6
26445 access list:
26446 symbolic names:
26447 keyword substitution: kv
26448 total revisions: 6; selected revisions: 1
26449 description:
26450 ----------------------------
26451 revision 1\.6 locked by: ${username};
26452 date: ${ISO8601DATE}; author: ${username}; state: Exp; lines: ${PLUS}1 -0; commitid: ${commitid};
26453 sixth
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
26461 1\.6 unlocked
26462 done"
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
26467 done"
26468 dotest admin-22-o13 "${testcvs} log aaa" "
26469 RCS file: ${CVSROOT_DIRNAME}/first-dir/aaa,v
26470 Working file: aaa
26471 head: 1\.4
26472 branch:
26473 locks: strict
26474 access list:
26475 symbolic names:
26476 keyword substitution: kv
26477 total revisions: 4; selected revisions: 4
26478 description:
26479 ----------------------------
26480 revision 1\.4
26481 date: ${ISO8601DATE}; author: ${username}; state: Exp; lines: ${PLUS}1 -0; commitid: ${commitid};
26482 fourth
26483 ----------------------------
26484 revision 1\.3
26485 date: ${ISO8601DATE}; author: ${username}; state: Exp; lines: ${PLUS}1 -0; commitid: ${commitid};
26486 third
26487 ----------------------------
26488 revision 1\.2
26489 date: ${ISO8601DATE}; author: ${username}; state: Exp; lines: ${PLUS}1 -0; commitid: ${commitid};
26490 second
26491 ----------------------------
26492 revision 1\.1
26493 date: ${ISO8601DATE}; author: ${username}; state: Exp; commitid: ${commitid};
26494 first
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 "===================================================================
26510 Checking out aaa
26511 RCS: ${CVSROOT_DIRNAME}/first-dir/aaa,v
26512 VERS: 1\.4
26513 \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*
26514 first rev
26515 second rev
26516 third rev
26517 fourth rev"
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
26535 done"
26536 dotest admin-22-o23 "${testcvs} log aaa" "
26537 RCS file: ${CVSROOT_DIRNAME}/first-dir/aaa,v
26538 Working file: aaa
26539 head: 1\.4
26540 branch:
26541 locks: strict
26542 access list:
26543 symbolic names:
26544 br1: 1\.3\.0\.2
26545 keyword substitution: kv
26546 total revisions: 5; selected revisions: 5
26547 description:
26548 ----------------------------
26549 revision 1\.4
26550 date: ${ISO8601DATE}; author: ${username}; state: Exp; lines: ${PLUS}1 -0; commitid: ${commitid};
26551 fourth
26552 ----------------------------
26553 revision 1\.3
26554 date: ${ISO8601DATE}; author: ${username}; state: Exp; lines: ${PLUS}1 -0; commitid: ${commitid};
26555 branches: 1\.3\.2;
26556 third
26557 ----------------------------
26558 revision 1\.2
26559 date: ${ISO8601DATE}; author: ${username}; state: Exp; lines: ${PLUS}1 -0; commitid: ${commitid};
26560 second
26561 ----------------------------
26562 revision 1\.1
26563 date: ${ISO8601DATE}; author: ${username}; state: Exp; commitid: ${commitid};
26564 first
26565 ----------------------------
26566 revision 1\.3\.2\.4
26567 date: ${ISO8601DATE}; author: ${username}; state: Exp; lines: ${PLUS}4 -0; commitid: ${commitid};
26568 branch-four
26569 ============================================================================="
26571 dotest admin-22-o24 "${testcvs} -q update -p -r 1.3.2.4 aaa" \
26572 "first rev
26573 second rev
26574 third rev
26575 new branch rev
26576 second branch rev
26577 third branch rev
26578 fourth branch rev"
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
26583 # this case.
26584 dotest admin-23 "${testcvs} -q log file2" "
26585 RCS file: ${CVSROOT_DIRNAME}/first-dir/file2,v
26586 Working file: file2
26587 head: 1\.2
26588 branch:
26589 locks: strict
26590 access list:
26591 auth3
26592 auth2
26594 symbolic names:
26595 tagone: 1\.1
26596 br: 1\.1\.0\.2
26597 keyword substitution: kv
26598 total revisions: 1; selected revisions: 1
26599 description:
26600 ----------------------------
26601 revision 1\.2
26602 date: ${ISO8601DATE}; author: ${username}; state: Exp; commitid: ${commitid};
26603 modify
26604 ============================================================================="
26606 dotest admin-25 "cat ${CVSROOT_DIRNAME}/first-dir/file1,v" \
26607 "head 1\.1;
26608 access
26610 auth2;
26611 symbols;
26612 locks; strict;
26613 comment @xx@;
26616 1\.1
26617 date ${RCSDELTADATE}; author ${username}; state Exp;
26618 branches
26619 1\.1\.2\.1;
26620 next ;
26621 commitid ${commitid};
26623 1\.1\.2\.1
26624 date ${RCSDELTADATE}; author ${username}; state foo;
26625 branches;
26626 next ;
26627 commitid ${commitid};
26630 desc
26634 1\.1
26636 @add
26638 text
26642 1\.1\.2\.1
26644 @modify-on-branch
26646 text
26647 @a0 1
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
26660 done"
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
26666 done"
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
26672 done"
26674 dotest admin-26-4 "${testcvs} admin -nbr2:1.1.2 file2" \
26675 "RCS file: ${CVSROOT_DIRNAME}/first-dir/file2,v
26676 done"
26678 dotest admin-26-5 "${testcvs} admin -nbr4:1.1.0.2 file2" \
26679 "RCS file: ${CVSROOT_DIRNAME}/first-dir/file2,v
26680 done"
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}
26691 Sticky Tag: (none)
26692 Sticky Date: (none)
26693 Sticky Options: (none)
26695 Existing Tags:
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
26721 done"
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
26732 done"
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
26765 done"
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" \
26774 "head 1\.4;
26775 access
26776 auth3
26777 auth2
26778 foo;
26779 symbols
26780 tagfour:1\.3
26781 br4:1\.1\.0\.2
26782 br2:1\.1\.0\.2
26783 tagthree:1\.1
26784 br1:1\.1\.0\.2
26785 tagtwo:1\.1
26786 tagone:1\.1
26787 br:1\.1\.0\.2;
26788 locks; strict;
26789 comment @# @;
26792 1\.4
26793 date ${RCSDELTADATE}; author ${username}; state Exp;
26794 branches;
26795 next 1\.3;
26796 commitid ${commitid};
26798 1\.3
26799 date ${RCSDELTADATE}; author ${username}; state Exp;
26800 branches;
26801 next 1\.2;
26802 commitid ${commitid};
26804 1\.2
26805 date ${RCSDELTADATE}; author ${username}; state Exp;
26806 branches;
26807 next ;
26808 commitid ${commitid};
26811 desc
26815 1\.4
26817 @yet_another
26819 text
26820 @add a line
26821 nuthr_line
26822 yet_another
26826 1\.3
26828 @nuthr_line
26830 text
26831 @d3 1
26835 1\.2
26837 @modify
26839 text
26840 @d2 1
26843 dotest_fail admin-30 "${testcvs} admin -mbr:another-log-message \
26844 file2 aaa file3" \
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
26852 done"
26853 dotest admin-31 "${testcvs} log" \
26854 "${SPROG} log: Logging \.
26856 RCS file: ${CVSROOT_DIRNAME}/first-dir/aaa,v
26857 Working file: aaa
26858 head: 1\.4
26859 branch:
26860 locks: strict
26861 access list:
26862 symbolic names:
26863 br1: 1\.3\.0\.2
26864 keyword substitution: kv
26865 total revisions: 5; selected revisions: 5
26866 description:
26867 ----------------------------
26868 revision 1\.4
26869 date: ${ISO8601DATE}; author: ${username}; state: Exp; lines: ${PLUS}1 -0; commitid: ${commitid};
26870 fourth
26871 ----------------------------
26872 revision 1\.3
26873 date: ${ISO8601DATE}; author: ${username}; state: Exp; lines: ${PLUS}1 -0; commitid: ${commitid};
26874 branches: 1\.3\.2;
26875 third
26876 ----------------------------
26877 revision 1\.2
26878 date: ${ISO8601DATE}; author: ${username}; state: Exp; lines: ${PLUS}1 -0; commitid: ${commitid};
26879 second
26880 ----------------------------
26881 revision 1\.1
26882 date: ${ISO8601DATE}; author: ${username}; state: Exp; commitid: ${commitid};
26883 first
26884 ----------------------------
26885 revision 1\.3\.2\.4
26886 date: ${ISO8601DATE}; author: ${username}; state: Exp; lines: ${PLUS}4 -0; commitid: ${commitid};
26887 branch-four
26888 =============================================================================
26890 RCS file: ${CVSROOT_DIRNAME}/first-dir/file1,v
26891 Working file: file1
26892 head: 1\.1
26893 branch:
26894 locks: strict
26895 access list:
26897 auth2
26898 symbolic names:
26899 tagten: 1\.1
26900 BO${PLUS}GUS: 1\.1
26901 keyword substitution: kv
26902 total revisions: 2; selected revisions: 2
26903 description:
26904 ----------------------------
26905 revision 1\.1
26906 date: ${ISO8601DATE}; author: ${username}; state: Exp; commitid: ${commitid};
26907 branches: 1\.1\.2;
26909 ----------------------------
26910 revision 1\.1\.2\.1
26911 date: ${ISO8601DATE}; author: ${username}; state: foo; lines: ${PLUS}1 -0; commitid: ${commitid};
26912 modify-on-branch
26913 =============================================================================
26915 RCS file: ${CVSROOT_DIRNAME}/first-dir/file2,v
26916 Working file: file2
26917 head: 1\.4
26918 branch:
26919 locks: strict
26920 access list:
26921 auth3
26922 auth2
26924 symbolic names:
26925 tagfour: 1\.3
26926 br4: 1\.1\.0\.2
26927 br2: 1\.1\.0\.2
26928 tagthree: 1\.1
26929 br1: 1\.1\.0\.2
26930 tagtwo: 1\.1
26931 tagone: 1\.1
26932 br: 1\.1\.0\.2
26933 keyword substitution: kv
26934 total revisions: 3; selected revisions: 3
26935 description:
26936 ----------------------------
26937 revision 1\.4
26938 date: ${ISO8601DATE}; author: ${username}; state: Exp; lines: ${PLUS}1 -0; commitid: ${commitid};
26939 yet_another
26940 ----------------------------
26941 revision 1\.3
26942 date: ${ISO8601DATE}; author: ${username}; state: Exp; lines: ${PLUS}1 -0; commitid: ${commitid};
26943 nuthr_line
26944 ----------------------------
26945 revision 1\.2
26946 date: ${ISO8601DATE}; author: ${username}; state: Exp; commitid: ${commitid};
26947 modify
26948 =============================================================================
26950 RCS file: ${CVSROOT_DIRNAME}/first-dir/Attic/file3,v
26951 Working file: file3
26952 head: 1\.1
26953 branch:
26954 locks: strict
26955 access list:
26956 symbolic names:
26957 br: 1\.1\.0\.2
26958 keyword substitution: kv
26959 total revisions: 2; selected revisions: 2
26960 description:
26961 ----------------------------
26962 revision 1\.1
26963 date: ${ISO8601DATE}; author: ${username}; state: dead; commitid: ${commitid};
26964 branches: 1\.1\.2;
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"
26977 dokeep
26979 # clean up our after ourselves
26980 restore_adm
26981 cd ../..
26982 rm -r 1 2
26983 modify_repo rm -rf $CVSROOT_DIRNAME/first-dir
26988 reserved)
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.
27001 mkdir 1; cd 1
27002 dotest reserved-1 "${testcvs} -q co -l ." ''
27003 mkdir first-dir
27004 dotest reserved-2 "${testcvs} add first-dir" \
27005 "Directory ${CVSROOT_DIRNAME}/first-dir added to the repository"
27006 cd first-dir
27007 touch file1
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
27017 1\.1 locked
27018 done"
27019 dotest reserved-6 "${testcvs} log -N file1" "
27020 RCS file: ${CVSROOT_DIRNAME}/first-dir/file1,v
27021 Working file: file1
27022 head: 1\.1
27023 branch:
27024 locks: strict
27025 ${username}: 1\.1
27026 access list:
27027 keyword substitution: kv
27028 total revisions: 1; selected revisions: 1
27029 description:
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
27040 1\.1 unlocked
27041 done"
27043 dotest reserved-8 "${testcvs} log -N file1" "
27044 RCS file: ${CVSROOT_DIRNAME}/first-dir/file1,v
27045 Working file: file1
27046 head: 1\.1
27047 branch:
27048 locks: strict
27049 access list:
27050 keyword substitution: kv
27051 total revisions: 1; selected revisions: 1
27052 description:
27053 ----------------------------
27054 revision 1\.1
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
27068 #!${TESTSHELL}
27069 line=\`grep <\$1/\$2,v 'locks $anyusername:1\.[0-9];'\`
27070 if test -z "\$line"; then
27071 # It isn't locked
27072 exit 0
27073 else
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
27077 exit 1
27080 # Cygwin. Blaaarg.
27081 if test -n "$remotehost"; then
27082 $CVS_RSH $remotehost "chmod +x ${TESTDIR}/lockme"
27083 else
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.
27098 cd ..
27099 if ${testcvs} -q co CVSROOT >>${LOGFILE} ; then
27100 pass reserved-11
27101 else
27102 fail reserved-11
27104 cd CVSROOT
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
27115 # Cygwin.
27116 if test -n "$remotehost"; then
27117 $CVS_RSH $remotehost "chmod 644 ${CVSROOT_DIRNAME}/first-dir/a-lock,v"
27118 else
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"
27122 # Cygwin. Blah.
27123 if test -n "$remotehost"; then
27124 $CVS_RSH $remotehost "chmod 444 ${CVSROOT_DIRNAME}/first-dir/a-lock,v"
27125 else
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:
27135 deprecated\.
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
27146 1\.1 unlocked
27147 done"
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
27152 deprecated\.
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
27169 deprecated\.
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
27174 cd ../CVSROOT
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
27180 deprecated\.
27181 $CVSROOT_DIRNAME/CVSROOT/commitinfo,v <-- commitinfo
27182 new revision: 1\.3; previous revision: 1\.2
27183 $SPROG commit: Rebuilding administrative file database"
27185 dokeep
27186 cd ..; rm -r CVSROOT
27187 cd ..
27188 rm -r 1
27189 rm $TESTDIR/lockme
27190 modify_repo rm -rf $CVSROOT_DIRNAME/first-dir
27195 diffmerge1)
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
27215 # fault.
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:
27223 cd ${TESTDIR}
27225 mkdir diffmerge1
27226 cd diffmerge1
27228 # These are the files we both start out with:
27229 mkdir import
27230 cd import
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"
27236 cd ..
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
27245 # using a branch:
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
27250 mv diffmerge1 mine
27252 # In your working copy, you'll make changes, and
27253 # then check in your changes before I check in mine:
27254 cd yours
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:
27280 cd ../mine
27281 diffmerge_create_my_files
27282 dotest diffmerge1_mine "${testcvs} -q update -j tag" \
27283 "M testcase01
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
27288 M testcase02
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
27293 M testcase03
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
27298 M testcase04
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
27311 M testcase07
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
27317 M testcase08
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
27322 M testcase09
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
27327 M testcase10
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:
27336 cd ..
27337 mkdir comp_me
27338 cd comp_me
27339 diffmerge_create_expected_files
27340 cd ..
27341 rm mine/.#*
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
27346 # correct result:
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:
27351 dokeep
27352 cd ..
27353 rm -r diffmerge1
27354 modify_repo rm -rf $CVSROOT_DIRNAME/diffmerge1
27359 diffmerge2)
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.
27364 mkdir diffmerge2
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
27371 # lib in it.
27373 # Nevertheless, once burned twice cautious, so we test for his
27374 # bug here.
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
27389 # Index: 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
27394 # 178a179,184
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:
27409 echo "head 1.1;
27410 access;
27411 symbols
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
27417 Review_V1p2:1.1
27418 Review_V1p2B:1.1
27419 Review_V1p2A:1.1
27420 Review_V1p1:1.1
27421 Review_1p1:1.1;
27422 locks; strict;
27423 comment @ * @;
27427 date 97.04.02.11.20.05; author colinl; state Exp;
27428 branches
27429 1.1.2.1;
27430 next ;
27432 1.1.2.1
27433 date 97.06.09.10.00.07; author colinl; state Exp;
27434 branches;
27435 next ;
27438 desc
27444 @Project: DEV1175
27445 DCN:
27446 Tested By: Colin Law
27447 Reviewed By:
27448 Reason for Change: Initial Revision of all files
27450 Design Change Details:
27452 Implications:
27454 text
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
27460 * Branched
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
27466 * Branched
27468 * Rev 1.0 19 Apr 1995 16:32:48 COLINL
27469 * Initial revision.
27471 /*****************************************************************************
27472 FILE : SGRID.H
27473 VERSION : 2.1
27474 AUTHOR : Dave Hartley
27475 SYSTEM : Borland C++
27476 DESCRIPTION : The declaration of the scrolling grid class
27478 *****************************************************************************/
27479 #if !defined(__SGRID_H)
27480 #define __SGRID_H
27482 #if !defined(__SCROLL_H)
27483 #include <scroll.h>
27484 #endif
27486 #if !defined(__GKI_H)
27487 #include \"gki.h\"
27488 #endif
27490 #if defined PRINTING_SUPPORT
27491 class Printer;
27492 #endif
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
27507 public:
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
27514 sgLineType
27515 - the syle of line
27516 sgHorizontalTotal
27517 - the total number of horizontal grid lines
27518 verticalSpacingMin
27519 - the min distance between the vertical grid lines
27520 on the scrolling axis
27521 currentTimestamp
27522 - timestamp value now
27523 ticksPerSecond
27524 - number of timestamp ticks per second
27525 ticksPerPixel
27526 - number of timestamp ticks per pixel required
27528 RETURN : None
27529 NOTES :
27530 ---------------------------------------------------------------------------*/
27531 ScrollingGrid( GkiColour sgColour, GkiLineType sgLineType,
27532 uint16 sgHorizontalTotal,
27533 uint16 verticalSpacingMin, uint32 currentTimestamp,
27534 uint16 ticksPerSecond, uint32 ticksPerPixel );
27535 #else
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
27541 sgLineType
27542 - the syle of line
27543 sgHorizontalTotal ( THE MAX NUMBER OF LINES IS 100 )
27544 - the total number of horizontal grid lines
27545 sgVerticalSpacing
27546 - the distance between the vertical grid lines
27547 on the scrolling axis
27549 RETURN : None
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 );
27557 #endif
27558 /*---------------------------------------------------------------------------
27559 FUNCTION : DESTRUCTOR
27560 DESCRIPTION : tidies it all up
27561 ARGUMENTS : name :
27563 RETURN : None
27564 NOTES :
27565 ---------------------------------------------------------------------------*/
27566 ~ScrollingGrid( void );
27568 /*---------------------------------------------------------------------------
27569 FUNCTION : ATTACH
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
27576 RETURN : None
27577 NOTES :
27578 ---------------------------------------------------------------------------*/
27579 void attach( SViewport *tDrawingArea );
27581 #if defined _WINDOWS
27582 /*---------------------------------------------------------------------------
27583 FUNCTION : calculateVerticalSpacing
27584 DESCRIPTION : determines optimum spacing along time axis
27585 ARGUMENTS :
27586 RETURN : None
27587 NOTES :
27588 ---------------------------------------------------------------------------*/
27589 void calculateVerticalSpacing();
27591 /*---------------------------------------------------------------------------
27592 FUNCTION : gridSpacingTicks
27593 DESCRIPTION : Provides the grid spacing in the time axis in ticks
27594 ARGUMENTS :
27595 RETURN : Number of ticks
27596 NOTES :
27597 ---------------------------------------------------------------------------*/
27598 uint32 gridSpacingTicks();
27600 #endif
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.
27613 Pure virtual
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
27617 RETURN : None
27618 NOTES :
27619 ---------------------------------------------------------------------------*/
27620 virtual void OnDraw( CDC *pDC );
27622 #else // not Windows
27624 /*---------------------------------------------------------------------------
27625 FUNCTION : PAINT
27626 DESCRIPTION : This extends the standard grid paint method to paint the
27627 viewport relative to its current position.
27629 ARGUMENTS : name :
27631 RETURN : None
27632 NOTES :
27633 ---------------------------------------------------------------------------*/
27634 void paint( void );
27635 #endif
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
27642 ARGUMENTS : name :
27644 RETURN : None
27645 NOTES :
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
27654 given
27656 ARGUMENTS : name :
27657 displayPosition
27658 - Where in the log to look to see if there is an
27659 entry to print
27661 - printerPtr
27662 the printer to print to
27664 RETURN : None
27665 NOTES :
27666 ---------------------------------------------------------------------------*/
27667 void print( uint16 currentPrintPos, Printer *printerPtr );
27668 #endif
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
27674 RETURN : None
27675 NOTES :
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
27683 ARGUMENTS : name :
27684 - newTimestamp
27687 - newTimeBase
27688 the number of ticks that represent a plot point on
27689 the trendgraph.
27691 RETURN : None
27692 NOTES :
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
27701 commands
27703 ARGUMENTS : name :
27705 RETURN : None
27706 NOTES :
27707 ---------------------------------------------------------------------------*/
27708 void setupForPrint();
27709 #endif
27711 /*---------------------------------------------------------------------------
27712 FUNCTION : UPDATE
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.
27719 RETURN : None
27720 NOTES :
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
27730 ARGUMENTS : name :
27732 RETURN : None
27733 NOTES :
27734 ---------------------------------------------------------------------------*/
27735 void updateBuffer( void );
27737 private:
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
27748 storePtr
27749 - the place to put the string
27751 RETURN : None
27752 NOTES :
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
27760 ARGUMENTS : name :
27761 yPos
27762 - were it goes on the Y-axis
27764 gridMarkerPtr
27765 - what it is
27767 RETURN : None
27768 NOTES :
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.
27777 in viewport coords
27778 pDC pointer to device context to use
27780 RETURN : None
27781 NOTES :
27782 ---------------------------------------------------------------------------*/
27783 void paintHorizontalLines(RectCoords* pRectToDraw, CDC* pDC );
27784 #else
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
27790 xEnd
27791 - the ending X co-ordinate for the horizontal line
27793 RETURN : None
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 );
27798 #endif
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.
27805 in viewport coords
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
27809 RETURN : None
27810 NOTES :
27811 ---------------------------------------------------------------------------*/
27812 void paintVerticalLines( RectCoords* pRectToDraw, uint16 offset,
27813 CDC* pDC );
27814 #else
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
27820 yEnd
27821 - the ending Y co-ordinate for the vertical line
27822 offset
27823 - a starting point offset that determines at what X
27824 position the first line will be drawn
27827 RETURN : None
27828 NOTES :
27829 ---------------------------------------------------------------------------*/
27830 void paintVerticalLines( uint16 yStart, uint16 yEnd, uint16 offset );
27831 #endif
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
27839 yEnd
27840 - the end point on the y axis for the line
27841 xPosition
27842 - The horizontal offset from the start of the viewport
27843 pDC pointer to device context to use
27845 RETURN : None
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 );
27852 #else
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
27858 yEnd
27859 - the end point on the y axis for the line
27860 xPosition
27861 - The horizontal offset from the start of the viewport
27863 RETURN : None
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 );
27870 #endif
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;
27903 uint16 vSpacing;
27904 #if defined PRINTING_SUPPORT
27905 uint16 numberOfGridMarkersPrinted;
27906 #endif
27907 bool firstTime; // indicates first time through
27908 bool dateMarker;
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
27917 #endif
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
27929 ARGUMENTS : name :
27931 RETURN :
27932 NOTES :
27933 ---------------------------------------------------------------------------*/
27934 inline uint16 ScrollingGrid::horizontalLines( void )
27936 return( horizontalTotal );
27938 /*---------------------------------------------------------------------------
27939 FUNCTION : VERTICALSPACING
27940 DESCRIPTION : returns the distance between adjacent vertical lines
27941 ARGUMENTS : name :
27943 RETURN : None
27944 NOTES :
27945 ---------------------------------------------------------------------------*/
27946 inline uint16 ScrollingGrid::verticalSpacing( void )
27948 return( vSpacing );
27951 #endif
27955 1.1.2.1
27957 @DEV1194:DS4 Provision of major and minor grid lines
27959 text
27960 @d1 1
27961 a1 1
27962 /* \$""Header: /usr/local/repository/cmnsrc/review/src/sgrid.h,v 1.1 1997/04/02 11:20:05 colinl Exp \$ */
27963 d3 1
27964 a3 12
27965 * \$""Log: sgrid.h,v \$
27966 * Revision 1.1 1997/04/02 11:20:05 colinl
27967 * Project: DEV1175
27968 * DCN:
27969 * Tested By: Colin Law
27970 * Reviewed By:
27971 * Reason for Change: Initial Revision of all files
27973 * Design Change Details:
27975 * Implications:
27977 d58 6
27978 a63 5
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
27984 d77 2
27985 a78 3
27986 ScrollingGrid( GkiColour majorColour, GkiColour minorColour,
27987 GkiLineType sgLineType,
27988 uint16 yMajorGridLines, uint16 yMinorGridLines,
27989 a137 17
27990 FUNCTION : DrawHorizontalGridLines
27992 DESCRIPTION : Draws major or minor grid lines
27993 ARGUMENTS : pDC device context
27994 pPen pen to use
27995 numLines total lines required
27996 yLow, yHigh, xLow, xHigh rectangle to draw in
27997 yMax max y value
27998 RETURN : None
27999 NOTES :
28000 ---------------------------------------------------------------------------*/
28001 void DrawHorizontalGridLines( CDC* pDC, CPen* pPen,
28002 uint16 numLines,
28003 uint16 yLow, uint16 yHigh, uint16 xLow, uint16 xHigh,
28004 uint16 yMax );
28006 /*---------------------------------------------------------------------------
28007 d148 6
28008 d448 1
28009 a448 2
28010 uint16 m_yMajorGridLines;
28011 uint16 m_yMinorGridLines;
28012 d456 2
28013 a457 3
28014 GkiLineType lineType; // line type for minor grid lines
28015 GkiColour m_majorColour;
28016 GkiColour m_minorColour;
28017 d462 1
28018 a462 2
28019 CPen *pMajorPen; // pen to use for drawing major grid lines
28020 CPen *pMinorPen; // pen to use for drawing minor grid lines
28021 d472 12
28022 @" > diffmerge2/sgrid.h,v
28024 # We have to put the RCS file in the repository by hand for
28025 # this test:
28026 modify_repo mkdir $CVSROOT_DIRNAME/diffmerge2
28027 modify_repo cp diffmerge2/sgrid.h,v \
28028 $CVSROOT_DIRNAME/diffmerge2/sgrid.h,v
28029 rm -rf diffmerge2
28030 dotest diffmerge2_co \
28031 "$testcvs co diffmerge2" "${DOTSTAR}U $DOTSTAR"
28032 cd diffmerge2
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" ''
28040 dokeep
28041 cd ..
28042 rm -rf diffmerge2
28043 modify_repo rm -rf $CVSROOT_DIRNAME/diffmerge2
28048 release)
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.
28060 mkdir 1; cd 1
28061 dotest release-1 "${testcvs} -q co -l ." ''
28062 mkdir first-dir
28063 dotest release-2 "${testcvs} add first-dir" \
28064 "Directory ${CVSROOT_DIRNAME}/first-dir added to the repository"
28065 cd first-dir
28066 mkdir dir1
28067 dotest release-3 "${testcvs} add dir1" \
28068 "Directory ${CVSROOT_DIRNAME}/first-dir/dir1 added to the repository"
28069 mkdir dir2
28070 dotest release-4 "${testcvs} add dir2" \
28071 "Directory ${CVSROOT_DIRNAME}/first-dir/dir2 added to the repository"
28072 cd dir2
28073 mkdir dir3
28074 dotest release-5 "${testcvs} add dir3" \
28075 "Directory ${CVSROOT_DIRNAME}/first-dir/dir2/dir3 added to the repository"
28077 cd ../..
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"
28093 cd first-dir
28094 mkdir dir1
28095 dotest release-10 "${testcvs} add dir1" \
28096 "Directory ${CVSROOT_DIRNAME}/first-dir/dir1 added to the repository"
28097 cd dir2
28098 mkdir dir3
28099 dotest release-11 "${testcvs} add dir3" \
28100 "Directory ${CVSROOT_DIRNAME}/first-dir/dir2/dir3 added to the repository"
28102 cd ../..
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/dir1/dir4
28123 # FIXCVS: There should be a path showing in front of dir below,
28124 # I believe.
28125 dotest release-unrecognized-dir-1 \
28126 "${testcvs} release -d first-dir/dir1" \
28127 "${QUESTION} dir4
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.
28148 cd first-dir
28149 mkdir second-dir
28150 dotest release-18 "$testcvs add second-dir" \
28151 "Directory $CVSROOT_DIRNAME/first-dir/second-dir added to the repository"
28153 cd second-dir
28154 touch file1
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"
28160 cd ..
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"
28167 dokeep
28168 cd ../..
28169 rm -r 1
28170 modify_repo rm -rf 1 $CVSROOT_DIRNAME/first-dir
28175 recase)
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
28188 mkdir 1; cd 1
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:
28194 echo file >file
28195 echo FiLe >FiLe
28196 if cmp file FiLe >/dev/null; then
28197 client_sensitive=false
28198 else
28199 client_sensitive=:
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
28206 else
28207 server_sensitive=:
28209 else
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"
28217 cd 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
28247 cd ../..
28248 mkdir 2; cd 2
28249 dotest recase-3 "$testcvs -q co first-dir" \
28250 "U first-dir/FiLe"
28252 cd first-dir
28253 # Prove that we can still get status and log information on
28254 # conflicting case files (1 in Attic, one in parent).
28255 if $remote; then
28256 if $client_sensitive; then
28257 file=file
28258 fIlE=fIlE
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.
28262 file=FiLe
28263 fIlE=FiLe
28265 else # ! $remote
28266 file=file
28267 fIlE=fIlE
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
28282 Working file: file
28283 head: 1\.2
28284 branch:
28285 locks: strict
28286 access list:
28287 symbolic names:
28288 first: 1\.1
28289 keyword substitution: kv
28290 total revisions: 2; selected revisions: 2
28291 description:
28292 ----------------------------
28293 revision 1\.2
28294 date: ${ISO8601DATE}; author: $username; state: dead; lines: +0 -0; commitid: ${commitid};
28296 ----------------------------
28297 revision 1\.1
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}
28308 Sticky Tag: (none)
28309 Sticky Date: (none)
28310 Sticky Options: (none)"
28311 dotest recase-7sscs "$testcvs log FiLe" \
28313 RCS file: $CVSROOT_DIRNAME/first-dir/FiLe,v
28314 Working file: FiLe
28315 head: 1\.1
28316 branch:
28317 locks: strict
28318 access list:
28319 symbolic names:
28320 keyword substitution: kv
28321 total revisions: 1; selected revisions: 1
28322 description:
28323 ----------------------------
28324 revision 1\.1
28325 date: ${ISO8601DATE}; author: $username; state: Exp; commitid: ${commitid};
28326 recase
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}
28337 Sticky Tag: (none)
28338 Sticky Date: (none)
28339 Sticky Options: (none)"
28340 dotest recase-5ssci "$testcvs log file" \
28342 RCS file: $CVSROOT_DIRNAME/first-dir/FiLe,v
28343 Working file: FiLe
28344 head: 1\.1
28345 branch:
28346 locks: strict
28347 access list:
28348 symbolic names:
28349 keyword substitution: kv
28350 total revisions: 1; selected revisions: 1
28351 description:
28352 ----------------------------
28353 revision 1\.1
28354 date: ${ISO8601DATE}; author: $username; state: Exp; commitid: ${commitid};
28355 recase
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}
28364 Sticky Tag: (none)
28365 Sticky Date: (none)
28366 Sticky Options: (none)"
28367 dotest recase-7ss "$testcvs log FiLe" \
28369 RCS file: $CVSROOT_DIRNAME/first-dir/FiLe,v
28370 Working file: FiLe
28371 head: 1\.1
28372 branch:
28373 locks: strict
28374 access list:
28375 symbolic names:
28376 keyword substitution: kv
28377 total revisions: 1; selected revisions: 1
28378 description:
28379 ----------------------------
28380 revision 1\.1
28381 date: ${ISO8601DATE}; author: $username; state: Exp; commitid: ${commitid};
28382 recase
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}
28395 Sticky Tag: (none)
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
28402 head: 1\.3
28403 branch:
28404 locks: strict
28405 access list:
28406 symbolic names:
28407 first: 1\.1
28408 keyword substitution: kv
28409 total revisions: 3; selected revisions: 3
28410 description:
28411 ----------------------------
28412 revision 1\.3
28413 date: ${ISO8601DATE}; author: $username; state: Exp; lines: +1 -1; commitid: ${commitid};
28414 recase
28415 ----------------------------
28416 revision 1\.2
28417 date: ${ISO8601DATE}; author: $username; state: dead; lines: +0 -0; commitid: ${commitid};
28419 ----------------------------
28420 revision 1\.1
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}
28431 Sticky Tag: (none)
28432 Sticky Date: (none)
28433 Sticky Options: (none)"
28434 dotest recase-7si "$testcvs log FiLe" \
28436 RCS file: $CVSROOT_DIRNAME/first-dir/FiLe,v
28437 Working file: FiLe
28438 head: 1\.3
28439 branch:
28440 locks: strict
28441 access list:
28442 symbolic names:
28443 first: 1\.1
28444 keyword substitution: kv
28445 total revisions: 3; selected revisions: 3
28446 description:
28447 ----------------------------
28448 revision 1\.3
28449 date: ${ISO8601DATE}; author: $username; state: Exp; lines: +1 -1; commitid: ${commitid};
28450 recase
28451 ----------------------------
28452 revision 1\.2
28453 date: ${ISO8601DATE}; author: $username; state: dead; lines: +0 -0; commitid: ${commitid};
28455 ----------------------------
28456 revision 1\.1
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}
28480 Sticky Tag: (none)
28481 Sticky Date: (none)
28482 Sticky Options: (none)"
28485 # and an update
28486 if $server_sensitive; then
28487 dotest recase-9ss "$testcvs -q up -rfirst" \
28488 "$SPROG update: \`FiLe' is no longer in the repository
28489 U file"
28491 if $client_sensitive; then
28492 dotest recase-10sscs "$testcvs -q up -A" \
28493 "U FiLe
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
28499 C FiLe
28500 $SPROG update: \`file' is no longer in the repository"
28502 cd ..
28503 rm -r first-dir
28504 dotest recase-11ssci "$testcvs -q co first-dir" \
28505 "U first-dir/FiLe"
28506 cd first-dir
28510 # See what happens when cased names clash.
28513 # Copy the archive
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"
28518 else
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
28528 C FILE"
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
28550 Working file: file
28551 head: 1\.2
28552 branch:
28553 locks: strict
28554 access list:
28555 symbolic names:
28556 first: 1\.1
28557 keyword substitution: kv
28558 total revisions: 2; selected revisions: 2
28559 description:
28560 ----------------------------
28561 revision 1\.2
28562 date: ${ISO8601DATE}; author: $username; state: dead; lines: +0 -0; commitid: ${commitid};
28564 ----------------------------
28565 revision 1\.1
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}
28576 Sticky Tag: (none)
28577 Sticky Date: (none)
28578 Sticky Options: (none)"
28579 dotest recase-16sscs "$testcvs log FiLe" \
28581 RCS file: $CVSROOT_DIRNAME/first-dir/FiLe,v
28582 Working file: FiLe
28583 head: 1\.1
28584 branch:
28585 locks: strict
28586 access list:
28587 symbolic names:
28588 keyword substitution: kv
28589 total revisions: 1; selected revisions: 1
28590 description:
28591 ----------------------------
28592 revision 1\.1
28593 date: ${ISO8601DATE}; author: $username; state: Exp; commitid: ${commitid};
28594 recase
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}
28603 Sticky Tag: (none)
28604 Sticky Date: (none)
28605 Sticky Options: (none)"
28606 dotest recase-18sscs "$testcvs log FILE" \
28608 RCS file: $CVSROOT_DIRNAME/first-dir/FILE,v
28609 Working file: FILE
28610 head: 1\.1
28611 branch:
28612 locks: strict
28613 access list:
28614 symbolic names:
28615 keyword substitution: kv
28616 total revisions: 1; selected revisions: 1
28617 description:
28618 ----------------------------
28619 revision 1\.1
28620 date: ${ISO8601DATE}; author: $username; state: Exp; commitid: ${commitid};
28621 recase
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}
28632 Sticky Tag: (none)
28633 Sticky Date: (none)
28634 Sticky Options: (none)"
28635 dotest recase-16ssci "$testcvs log FiLe" \
28637 RCS file: $CVSROOT_DIRNAME/first-dir/FiLe,v
28638 Working file: FiLe
28639 head: 1\.1
28640 branch:
28641 locks: strict
28642 access list:
28643 symbolic names:
28644 keyword substitution: kv
28645 total revisions: 1; selected revisions: 1
28646 description:
28647 ----------------------------
28648 revision 1\.1
28649 date: ${ISO8601DATE}; author: $username; state: Exp; commitid: ${commitid};
28650 recase
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}
28659 Sticky Tag: (none)
28660 Sticky Date: (none)
28661 Sticky Options: (none)"
28662 dotest recase-18ssci "$testcvs log FILE" \
28664 RCS file: $CVSROOT_DIRNAME/first-dir/FiLe,v
28665 Working file: FiLe
28666 head: 1\.1
28667 branch:
28668 locks: strict
28669 access list:
28670 symbolic names:
28671 keyword substitution: kv
28672 total revisions: 1; selected revisions: 1
28673 description:
28674 ----------------------------
28675 revision 1\.1
28676 date: ${ISO8601DATE}; author: $username; state: Exp; commitid: ${commitid};
28677 recase
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}
28702 Sticky Tag: (none)
28703 Sticky Date: (none)
28704 Sticky Options: (none)"
28707 # And last but not least, prove that a checkout is still possible.
28708 cd ../..
28709 mkdir 3; cd 3
28710 if $server_sensitive; then
28711 if $client_sensitive; then
28712 dotest recase-20sscs "$testcvs -q co first-dir" \
28713 "U first-dir/FILE
28714 U first-dir/FiLe"
28715 else # $server_senstive && !$client_sensitive
28716 dotest_fail recase-20ssci "$testcvs -q co first-dir" \
28717 "U first-dir/FILE
28718 $SPROG checkout: move away \`first-dir/FiLe'; it is in the way
28719 C first-dir/FiLe"
28721 else # !$server_sensitive
28722 # Skip these since nothing has changed.
28726 dokeep
28727 cd ..
28728 rm -r 1 2 3
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
28733 # confusion.
28734 $CVS_RSH $remotehost "rm -f $CVSROOT_DIRNAME/first-dir/FILE,v"
28736 modify_repo rm -rf $CVSROOT_DIRNAME/first-dir
28741 multiroot)
28743 # set up two repositories
28746 if $proxy; then
28747 # don't even try
28748 continue
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}
28765 mkdir 1; cd 1
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"
28785 cd ..
28786 rm -rf 1
28789 # create some directories in ${CVSROOT2_DIRNAME}
28791 mkdir 1; cd 1
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"
28811 cd ..
28812 rm -rf 1
28814 # check out a few directories, from simple/shallow to
28815 # complex/deep
28816 mkdir 1; cd 1
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
28835 U mod1-1/file1-1
28836 ${SPROG} checkout: Updating mod1-2
28837 U mod1-2/file1-2"
28838 dotest multiroot-setup-12 "${testcvs2} co mod2-1 mod2-2" \
28839 "${SPROG} checkout: Updating mod2-1
28840 U mod2-1/file2-1
28841 ${SPROG} checkout: Updating mod2-2
28842 U mod2-2/file2-2"
28843 cd mod1-2
28844 dotest multiroot-setup-13 "${testcvs2} co mod2-2" \
28845 "${SPROG} checkout: Updating mod2-2
28846 U mod2-2/file2-2"
28847 cd ..
28848 cd mod2-2
28849 dotest multiroot-setup-14 "${testcvs1} co mod1-2" \
28850 "${SPROG} checkout: Updating mod1-2
28851 U mod1-2/file1-2"
28852 cd ..
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",
28874 # etc.
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
28926 > bobby
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
28934 > brown
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
28944 > goes
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
28952 > down" \
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
28961 > bobby
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
28969 > brown
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
28981 > goes
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
28989 > down"
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
29033 T mod1-1/file1-1
29034 ${SPROG} tag: Tagging mod1-2
29035 T mod1-2/file1-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
29040 T mod2-1/file2-1
29041 ${SPROG} tag: Tagging mod2-2" \
29042 "${SPROG} tag: Tagging \.
29043 ${SPROG} tag: Tagging mod1-1
29044 T mod1-1/file1-1
29045 ${SPROG} tag: Tagging mod1-2
29046 T mod1-2/file1-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
29053 T mod2-1/file2-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
29061 if $remote; then
29062 cd mod1-1
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"
29066 cd ../mod2-1
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"
29078 cd ../..
29079 else
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
29096 Sticky Tag: (none)
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}
29106 Sticky Tag: (none)
29107 Sticky Date: (none)
29108 Sticky Options: (none)
29110 Existing Tags:
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}
29120 Sticky Tag: (none)
29121 Sticky Date: (none)
29122 Sticky Options: (none)
29124 Existing Tags:
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
29133 Sticky Tag: (none)
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}
29143 Sticky Tag: (none)
29144 Sticky Date: (none)
29145 Sticky Options: (none)
29147 Existing Tags:
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
29156 Sticky Tag: (none)
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}
29166 Sticky Tag: (none)
29167 Sticky Date: (none)
29168 Sticky Options: (none)
29170 Existing Tags:
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
29179 Sticky Tag: (none)
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}
29189 Sticky Tag: (none)
29190 Sticky Date: (none)
29191 Sticky Options: (none)
29193 Existing Tags:
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}
29203 Sticky Tag: (none)
29204 Sticky Date: (none)
29205 Sticky Options: (none)
29207 Existing Tags:
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
29216 Sticky Tag: (none)
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}
29226 Sticky Tag: (none)
29227 Sticky Date: (none)
29228 Sticky Options: (none)
29230 Existing Tags:
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}
29240 Sticky Tag: (none)
29241 Sticky Date: (none)
29242 Sticky Options: (none)
29244 Existing Tags:
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
29254 Sticky Tag: (none)
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}
29264 Sticky Tag: (none)
29265 Sticky Date: (none)
29266 Sticky Options: (none)
29268 Existing Tags:
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
29278 Sticky Tag: (none)
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}
29288 Sticky Tag: (none)
29289 Sticky Date: (none)
29290 Sticky Options: (none)
29292 Existing Tags:
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
29301 Sticky Tag: (none)
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}
29311 Sticky Tag: (none)
29312 Sticky Date: (none)
29313 Sticky Options: (none)
29315 Existing Tags:
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}
29325 Sticky Tag: (none)
29326 Sticky Date: (none)
29327 Sticky Options: (none)
29329 Existing Tags:
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
29377 head: 1\.1
29378 branch:
29379 locks: strict
29380 access list:
29381 symbolic names:
29382 keyword substitution: kv
29383 total revisions: 1; selected revisions: 1
29384 description:
29385 ----------------------------
29386 revision 1\.1
29387 date: ${ISO8601DATE}; author: ${username}; state: Exp; commitid: ${commitid};
29388 reading
29389 =============================================================================
29391 RCS file: ${CVSROOT1_DIRNAME}/mod1-1/file1-1,v
29392 Working file: mod1-1/file1-1
29393 head: 1\.2
29394 branch:
29395 locks: strict
29396 access list:
29397 symbolic names:
29398 cattle: 1\.2
29399 keyword substitution: kv
29400 total revisions: 2; selected revisions: 2
29401 description:
29402 ----------------------------
29403 revision 1\.2
29404 date: ${ISO8601DATE}; author: ${username}; state: Exp; lines: ${PLUS}1 -0; commitid: ${commitid};
29405 actually
29406 ----------------------------
29407 revision 1\.1
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
29415 head: 1\.1
29416 branch:
29417 locks: strict
29418 access list:
29419 symbolic names:
29420 keyword substitution: kv
29421 total revisions: 1; selected revisions: 1
29422 description:
29423 ----------------------------
29424 revision 1\.1
29425 date: ${ISO8601DATE}; author: ${username}; state: Exp; commitid: ${commitid};
29426 reading
29427 =============================================================================
29429 RCS file: ${CVSROOT1_DIRNAME}/mod1-2/file1-2,v
29430 Working file: mod1-2/file1-2
29431 head: 1\.2
29432 branch:
29433 locks: strict
29434 access list:
29435 symbolic names:
29436 cattle: 1\.2
29437 keyword substitution: kv
29438 total revisions: 2; selected revisions: 2
29439 description:
29440 ----------------------------
29441 revision 1\.2
29442 date: ${ISO8601DATE}; author: ${username}; state: Exp; lines: ${PLUS}1 -0; commitid: ${commitid};
29443 actually
29444 ----------------------------
29445 revision 1\.1
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
29453 head: 1\.1
29454 branch:
29455 locks: strict
29456 access list:
29457 symbolic names:
29458 keyword substitution: kv
29459 total revisions: 1; selected revisions: 1
29460 description:
29461 ----------------------------
29462 revision 1\.1
29463 date: ${ISO8601DATE}; author: ${username}; state: Exp; commitid: ${commitid};
29464 reading
29465 =============================================================================
29467 RCS file: ${CVSROOT1_DIRNAME}/mod1-2/file1-2,v
29468 Working file: mod2-2/mod1-2/file1-2
29469 head: 1\.2
29470 branch:
29471 locks: strict
29472 access list:
29473 symbolic names:
29474 cattle: 1\.2
29475 keyword substitution: kv
29476 total revisions: 2; selected revisions: 2
29477 description:
29478 ----------------------------
29479 revision 1\.2
29480 date: ${ISO8601DATE}; author: ${username}; state: Exp; lines: ${PLUS}1 -0; commitid: ${commitid};
29481 actually
29482 ----------------------------
29483 revision 1\.1
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
29491 head: 1\.1
29492 branch:
29493 locks: strict
29494 access list:
29495 symbolic names:
29496 keyword substitution: kv
29497 total revisions: 1; selected revisions: 1
29498 description:
29499 ----------------------------
29500 revision 1\.1
29501 date: ${ISO8601DATE}; author: ${username}; state: Exp; commitid: ${commitid};
29502 reading
29503 =============================================================================
29505 RCS file: ${CVSROOT2_DIRNAME}/mod2-2/file2-2,v
29506 Working file: mod1-2/mod2-2/file2-2
29507 head: 1\.2
29508 branch:
29509 locks: strict
29510 access list:
29511 symbolic names:
29512 cattle: 1\.2
29513 keyword substitution: kv
29514 total revisions: 2; selected revisions: 2
29515 description:
29516 ----------------------------
29517 revision 1\.2
29518 date: ${ISO8601DATE}; author: ${username}; state: Exp; lines: ${PLUS}1 -0; commitid: ${commitid};
29519 actually
29520 ----------------------------
29521 revision 1\.1
29522 date: ${ISO8601DATE}; author: ${username}; state: Exp; commitid: ${commitid};
29523 anyone
29524 =============================================================================
29525 ${SPROG} log: Logging mod2-1
29527 RCS file: ${CVSROOT2_DIRNAME}/mod2-1/anotherfile2-1,v
29528 Working file: mod2-1/anotherfile2-1
29529 head: 1\.1
29530 branch:
29531 locks: strict
29532 access list:
29533 symbolic names:
29534 keyword substitution: kv
29535 total revisions: 1; selected revisions: 1
29536 description:
29537 ----------------------------
29538 revision 1\.1
29539 date: ${ISO8601DATE}; author: ${username}; state: Exp; commitid: ${commitid};
29540 reading
29541 =============================================================================
29543 RCS file: ${CVSROOT2_DIRNAME}/mod2-1/file2-1,v
29544 Working file: mod2-1/file2-1
29545 head: 1\.2
29546 branch:
29547 locks: strict
29548 access list:
29549 symbolic names:
29550 cattle: 1\.2
29551 keyword substitution: kv
29552 total revisions: 2; selected revisions: 2
29553 description:
29554 ----------------------------
29555 revision 1\.2
29556 date: ${ISO8601DATE}; author: ${username}; state: Exp; lines: ${PLUS}1 -0; commitid: ${commitid};
29557 actually
29558 ----------------------------
29559 revision 1\.1
29560 date: ${ISO8601DATE}; author: ${username}; state: Exp; commitid: ${commitid};
29561 anyone
29562 =============================================================================
29563 ${SPROG} log: Logging mod2-2
29565 RCS file: ${CVSROOT2_DIRNAME}/mod2-2/anotherfile2-2,v
29566 Working file: mod2-2/anotherfile2-2
29567 head: 1\.1
29568 branch:
29569 locks: strict
29570 access list:
29571 symbolic names:
29572 keyword substitution: kv
29573 total revisions: 1; selected revisions: 1
29574 description:
29575 ----------------------------
29576 revision 1\.1
29577 date: ${ISO8601DATE}; author: ${username}; state: Exp; commitid: ${commitid};
29578 reading
29579 =============================================================================
29581 RCS file: ${CVSROOT2_DIRNAME}/mod2-2/file2-2,v
29582 Working file: mod2-2/file2-2
29583 head: 1\.2
29584 branch:
29585 locks: strict
29586 access list:
29587 symbolic names:
29588 cattle: 1\.2
29589 keyword substitution: kv
29590 total revisions: 2; selected revisions: 2
29591 description:
29592 ----------------------------
29593 revision 1\.2
29594 date: ${ISO8601DATE}; author: ${username}; state: Exp; lines: ${PLUS}1 -0; commitid: ${commitid};
29595 actually
29596 ----------------------------
29597 revision 1\.1
29598 date: ${ISO8601DATE}; author: ${username}; state: Exp; commitid: ${commitid};
29599 anyone
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
29606 head: 1\.1
29607 branch:
29608 locks: strict
29609 access list:
29610 symbolic names:
29611 keyword substitution: kv
29612 total revisions: 1; selected revisions: 1
29613 description:
29614 ----------------------------
29615 revision 1\.1
29616 date: ${ISO8601DATE}; author: ${username}; state: Exp; commitid: ${commitid};
29617 reading
29618 =============================================================================
29620 RCS file: ${CVSROOT1_DIRNAME}/mod1-1/file1-1,v
29621 Working file: mod1-1/file1-1
29622 head: 1\.2
29623 branch:
29624 locks: strict
29625 access list:
29626 symbolic names:
29627 cattle: 1\.2
29628 keyword substitution: kv
29629 total revisions: 2; selected revisions: 2
29630 description:
29631 ----------------------------
29632 revision 1\.2
29633 date: ${ISO8601DATE}; author: ${username}; state: Exp; lines: ${PLUS}1 -0; commitid: ${commitid};
29634 actually
29635 ----------------------------
29636 revision 1\.1
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
29644 head: 1\.1
29645 branch:
29646 locks: strict
29647 access list:
29648 symbolic names:
29649 keyword substitution: kv
29650 total revisions: 1; selected revisions: 1
29651 description:
29652 ----------------------------
29653 revision 1\.1
29654 date: ${ISO8601DATE}; author: ${username}; state: Exp; commitid: ${commitid};
29655 reading
29656 =============================================================================
29658 RCS file: ${CVSROOT1_DIRNAME}/mod1-2/file1-2,v
29659 Working file: mod1-2/file1-2
29660 head: 1\.2
29661 branch:
29662 locks: strict
29663 access list:
29664 symbolic names:
29665 cattle: 1\.2
29666 keyword substitution: kv
29667 total revisions: 2; selected revisions: 2
29668 description:
29669 ----------------------------
29670 revision 1\.2
29671 date: ${ISO8601DATE}; author: ${username}; state: Exp; lines: ${PLUS}1 -0; commitid: ${commitid};
29672 actually
29673 ----------------------------
29674 revision 1\.1
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
29683 head: 1\.1
29684 branch:
29685 locks: strict
29686 access list:
29687 symbolic names:
29688 keyword substitution: kv
29689 total revisions: 1; selected revisions: 1
29690 description:
29691 ----------------------------
29692 revision 1\.1
29693 date: ${ISO8601DATE}; author: ${username}; state: Exp; commitid: ${commitid};
29694 reading
29695 =============================================================================
29697 RCS file: ${CVSROOT1_DIRNAME}/mod1-2/file1-2,v
29698 Working file: mod2-2/mod1-2/file1-2
29699 head: 1\.2
29700 branch:
29701 locks: strict
29702 access list:
29703 symbolic names:
29704 cattle: 1\.2
29705 keyword substitution: kv
29706 total revisions: 2; selected revisions: 2
29707 description:
29708 ----------------------------
29709 revision 1\.2
29710 date: ${ISO8601DATE}; author: ${username}; state: Exp; lines: ${PLUS}1 -0; commitid: ${commitid};
29711 actually
29712 ----------------------------
29713 revision 1\.1
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
29722 head: 1\.1
29723 branch:
29724 locks: strict
29725 access list:
29726 symbolic names:
29727 keyword substitution: kv
29728 total revisions: 1; selected revisions: 1
29729 description:
29730 ----------------------------
29731 revision 1\.1
29732 date: ${ISO8601DATE}; author: ${username}; state: Exp; commitid: ${commitid};
29733 reading
29734 =============================================================================
29736 RCS file: ${CVSROOT2_DIRNAME}/mod2-2/file2-2,v
29737 Working file: mod1-2/mod2-2/file2-2
29738 head: 1\.2
29739 branch:
29740 locks: strict
29741 access list:
29742 symbolic names:
29743 cattle: 1\.2
29744 keyword substitution: kv
29745 total revisions: 2; selected revisions: 2
29746 description:
29747 ----------------------------
29748 revision 1\.2
29749 date: ${ISO8601DATE}; author: ${username}; state: Exp; lines: ${PLUS}1 -0; commitid: ${commitid};
29750 actually
29751 ----------------------------
29752 revision 1\.1
29753 date: ${ISO8601DATE}; author: ${username}; state: Exp; commitid: ${commitid};
29754 anyone
29755 =============================================================================
29756 ${SPROG} log: Logging mod2-1
29758 RCS file: ${CVSROOT2_DIRNAME}/mod2-1/anotherfile2-1,v
29759 Working file: mod2-1/anotherfile2-1
29760 head: 1\.1
29761 branch:
29762 locks: strict
29763 access list:
29764 symbolic names:
29765 keyword substitution: kv
29766 total revisions: 1; selected revisions: 1
29767 description:
29768 ----------------------------
29769 revision 1\.1
29770 date: ${ISO8601DATE}; author: ${username}; state: Exp; commitid: ${commitid};
29771 reading
29772 =============================================================================
29774 RCS file: ${CVSROOT2_DIRNAME}/mod2-1/file2-1,v
29775 Working file: mod2-1/file2-1
29776 head: 1\.2
29777 branch:
29778 locks: strict
29779 access list:
29780 symbolic names:
29781 cattle: 1\.2
29782 keyword substitution: kv
29783 total revisions: 2; selected revisions: 2
29784 description:
29785 ----------------------------
29786 revision 1\.2
29787 date: ${ISO8601DATE}; author: ${username}; state: Exp; lines: ${PLUS}1 -0; commitid: ${commitid};
29788 actually
29789 ----------------------------
29790 revision 1\.1
29791 date: ${ISO8601DATE}; author: ${username}; state: Exp; commitid: ${commitid};
29792 anyone
29793 =============================================================================
29794 ${SPROG} log: Logging mod2-2
29796 RCS file: ${CVSROOT2_DIRNAME}/mod2-2/anotherfile2-2,v
29797 Working file: mod2-2/anotherfile2-2
29798 head: 1\.1
29799 branch:
29800 locks: strict
29801 access list:
29802 symbolic names:
29803 keyword substitution: kv
29804 total revisions: 1; selected revisions: 1
29805 description:
29806 ----------------------------
29807 revision 1\.1
29808 date: ${ISO8601DATE}; author: ${username}; state: Exp; commitid: ${commitid};
29809 reading
29810 =============================================================================
29812 RCS file: ${CVSROOT2_DIRNAME}/mod2-2/file2-2,v
29813 Working file: mod2-2/file2-2
29814 head: 1\.2
29815 branch:
29816 locks: strict
29817 access list:
29818 symbolic names:
29819 cattle: 1\.2
29820 keyword substitution: kv
29821 total revisions: 2; selected revisions: 2
29822 description:
29823 ----------------------------
29824 revision 1\.2
29825 date: ${ISO8601DATE}; author: ${username}; state: Exp; lines: ${PLUS}1 -0; commitid: ${commitid};
29826 actually
29827 ----------------------------
29828 revision 1\.1
29829 date: ${ISO8601DATE}; author: ${username}; state: Exp; commitid: ${commitid};
29830 anyone
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
29836 # mod1-1 mod2-2")
29838 dokeep
29840 # clean up after ourselves
29841 cd ..
29842 rm -r 1
29844 # clean up our repositories
29845 rm -rf ${CVSROOT1_DIRNAME} ${CVSROOT2_DIRNAME}
29850 multiroot2)
29851 # More multiroot tests. In particular, nested directories.
29853 if $proxy; then
29854 # don't even try
29855 continue
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
29867 echo file1 >file1
29868 mkdir sdir
29869 echo sfile >sdir/sfile
29870 mkdir sdir/ssdir
29871 echo ssfile >sdir/ssdir/ssfile
29872 dotest_sort multiroot2-3 \
29873 "${testcvs} -d ${CVSROOT1} import -m import-to-root1 dir1 vend rel" "
29875 N dir1/file1
29876 N dir1/sdir/sfile
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"
29881 cd sdir
29882 dotest_sort multiroot2-4 \
29883 "${testcvs} -d ${CVSROOT2} import -m import-to-root2 sdir vend2 rel2" "
29885 N sdir/sfile
29886 N sdir/ssdir/ssfile
29887 No conflicts created by this import
29888 ${SPROG} import: Importing ${TESTDIR}/root2/sdir/ssdir"
29889 cd ../..
29891 mkdir 1; cd 1
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" \
29895 "U dir1/file1
29896 U dir1/sdir/sfile
29897 U dir1/sdir/ssdir/ssfile"
29898 cd dir1
29899 dotest multiroot2-6 "${testcvs} -Q release -d sdir" ""
29900 dotest multiroot2-7 "${testcvs} -d ${CVSROOT2} -q co sdir" \
29901 "U sdir/sfile
29902 U sdir/ssdir/ssfile"
29903 cd ..
29904 # This has one subtle effect - it deals with Entries.Log
29905 # so that the next test doesn't get trace messages for
29906 # Entries.Log
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
29920 # to work around).
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()
29946 *-> Lock_Cleanup()
29947 *-> Simple_Lock_Cleanup()"
29950 dotest multiroot2-9 "${testcvs} -q tag tag1" \
29951 "T dir1/file1
29952 T dir1/sdir/sfile
29953 T dir1/sdir/ssdir/ssfile"
29954 echo "change it" >>dir1/file1
29955 echo "change him too" >>dir1/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" \
29962 "T dir1/file1
29963 T dir1/sdir/sfile
29964 T dir1/sdir/ssdir/ssfile"
29965 dotest_fail multiroot2-12 \
29966 "${testcvs} -q diff -u -r tag1 -r tag2" \
29967 "Index: dir1/file1
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 @@
29976 file1
29977 ${PLUS}change it
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 @@
29987 sfile
29988 ${PLUS}change him too"
29990 if $keep; then
29991 echo Keeping ${TESTDIR} and exiting due to --keep
29992 exit 0
29995 # clean up after ourselves
29996 cd ..
29997 rm -r imp-dir 1
29999 # clean up our repositories
30000 rm -rf root1 root2
30005 multiroot3)
30006 # More multiroot tests. Directories are side-by-side, not nested.
30007 # Not drastically different from multiroot but it covers somewhat
30008 # different stuff.
30010 if $proxy; then
30011 # don't even try
30012 continue
30015 CVSROOT1=`newroot ${TESTDIR}/root1`
30016 CVSROOT2=`newroot ${TESTDIR}/root2`
30018 mkdir 1; cd 1
30019 dotest multiroot3-1 "${testcvs} -d ${CVSROOT1} init" ""
30020 dotest multiroot3-2 "${testcvs} -d ${CVSROOT1} -q co -l ." ""
30021 mkdir dir1
30022 dotest multiroot3-3 "${testcvs} add dir1" \
30023 "Directory ${TESTDIR}/root1/dir1 added to the repository"
30024 dotest multiroot3-4 "${testcvs} -d ${CVSROOT2} init" ""
30025 rm -r CVS
30026 dotest multiroot3-5 "${testcvs} -d ${CVSROOT2} -q co -l ." ""
30027 mkdir dir2
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 dir1/file1 dir2/file2
30043 if $remote; then
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.
30048 cd dir1
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"
30052 cd ..
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"
30056 else
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.
30083 mkdir 1a
30084 cd 1a
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)"
30116 cd ../..
30118 if $keep; then
30119 echo Keeping ${TESTDIR} and exiting due to --keep
30120 exit 0
30123 rm -r 1
30124 rm -rf ${TESTDIR}/root1 ${TESTDIR}/root2
30125 unset CVSROOT1
30126 unset CVSROOT2
30131 multiroot4)
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.
30136 if $proxy; then
30137 # don't even try
30138 continue
30141 CVSROOT1=`newroot ${TESTDIR}/root1`
30142 CVSROOT2=`newroot ${TESTDIR}/root2`
30144 mkdir 1; cd 1
30145 dotest multiroot4-1 "${testcvs} -d ${CVSROOT1} init" ""
30146 dotest multiroot4-2 "${testcvs} -d ${CVSROOT1} -q co -l ." ""
30147 mkdir dircom
30148 dotest multiroot4-3 "${testcvs} add dircom" \
30149 "Directory ${TESTDIR}/root1/dircom added to the repository"
30150 cd dircom
30151 touch file1
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"
30158 cd ../..
30159 mkdir 2; cd 2
30160 dotest multiroot4-6 "${testcvs} -d ${CVSROOT2} init" ""
30161 dotest multiroot4-7 "${testcvs} -d ${CVSROOT2} -q co -l ." ""
30162 mkdir dircom
30163 dotest multiroot4-8 "${testcvs} add dircom" \
30164 "Directory ${TESTDIR}/root2/dircom added to the repository"
30165 cd dircom
30166 touch file2
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"
30174 cd ../..
30175 cd 1/dircom
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.
30180 mkdir sdir2
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" ""
30185 cd ..
30186 dotest multiroot4-13 "${testcvs} -q update dircom" ""
30187 cd ..
30189 rm -r 1 2
30190 rm -rf ${TESTDIR}/root1 ${TESTDIR}/root2
30191 unset CVSROOT1
30192 unset CVSROOT2
30197 rmroot)
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
30207 mkdir 1; cd 1
30208 dotest rmroot-setup-1 "${testcvs} -q co -l ." ''
30209 mkdir first-dir
30210 dotest rmroot-setup-2 "${testcvs} add first-dir" \
30211 "Directory ${CVSROOT_DIRNAME}/first-dir added to the repository"
30212 cd first-dir
30213 touch file1 file2
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"
30223 rm CVS/Root
30224 dotest rmroot-1 "${testcvs} -q update" ''
30226 dokeep
30227 cd ../..
30228 rm -rf 1
30229 modify_repo rm -rf $CVSROOT_DIRNAME/first-dir
30234 reposmv)
30235 # More tests of repositories and specifying them.
30236 # Similar to crerepos but that test is probably getting big
30237 # enough.
30239 if $proxy; then
30240 # don't even try
30241 continue
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
30249 echo file1 >file1
30250 dotest reposmv-setup-2 \
30251 "${testcvs} -d ${CVSROOT1} import -m add dir1 vendor release" \
30252 "N dir1/file1
30254 No conflicts created by this import"
30255 cd ..
30257 mkdir 1; cd 1
30258 dotest reposmv-1 "${testcvs} -d ${CVSROOT1} -Q co dir1" ""
30259 mv ${TESTDIR}/root1 ${TESTDIR}/root-moved
30260 cd dir1
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
30279 # this test.
30281 # Bug: "skipping directory " without filename.
30282 if $remote; then
30283 dotest_fail reposmv-2r "${testcvs} update" \
30284 "Cannot access ${TESTDIR}/root1/CVSROOT
30285 No such file or directory"
30286 else
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
30296 if $remote; then
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
30303 else
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
30313 if $remote; then
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
30320 else
30321 # CVS/Root doesn't seem to quite completely override $CVSROOT
30322 # Bug? Not necessarily a big deal if it only affects error
30323 # messages.
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.
30346 cd ../..
30347 rm -r imp-dir 1
30348 rm -rf root1 root2
30349 unset CVSROOT1
30354 pserver)
30355 # Test basic pserver functionality.
30356 if $remote; then
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.)
30363 continue
30365 save_servercvs=$servercvs
30366 servercvs=$testcvs
30367 # First set SystemAuth=no. Not really necessary, I don't
30368 # think, but somehow it seems like the clean thing for
30369 # the testsuite.
30370 mkdir 1; cd 1
30371 dotest pserver-1 "$testcvs -Q co CVSROOT" ""
30372 cd 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
30382 $username:
30383 willfail: :whocares
30385 dotest_fail pserver-3 "$servercvs pserver" \
30386 "error 0 Server configuration missing --allow-root in inetd.conf" <<EOF
30387 BEGIN AUTH REQUEST
30388 $CVSROOT_DIRNAME
30389 testme
30390 Ay::'d
30391 END AUTH REQUEST
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
30403 i=`expr $i + 1`
30404 done
30406 while test $i -lt 64; do
30407 cat <garbageseg2 >>garbageinput
30408 i=`expr $i + 1`
30409 done
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
30414 unset i
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
30419 # away with it.
30420 dotest pserver-4 "$servercvs --allow-root=$CVSROOT_DIRNAME pserver" \
30421 "$DOTSTAR LOVE YOU
30422 ok" <<EOF
30423 BEGIN AUTH REQUEST
30424 $CVSROOT_DIRNAME
30425 testme
30426 Ay::'d
30427 END AUTH REQUEST
30428 Root $CVSROOT_DIRNAME
30429 noop
30432 dotest_fail pserver-4.2 \
30433 "$servercvs --allow-root=$CVSROOT_DIRNAME pserver" \
30434 "error 0: root not allowed" <<EOF
30435 BEGIN AUTH REQUEST
30436 $CVSROOT_DIRNAME
30437 dontroot
30438 Ay::'d
30439 END AUTH REQUEST
30442 dotest pserver-5 "$servercvs --allow-root=$CVSROOT_DIRNAME pserver" \
30443 "$DOTSTAR LOVE YOU
30444 E Protocol error: Root says \"$TESTDIR/1\" but pserver says \"$CVSROOT_DIRNAME\"
30445 error " <<EOF
30446 BEGIN AUTH REQUEST
30447 $CVSROOT_DIRNAME
30448 testme
30449 Ay::'d
30450 END AUTH REQUEST
30451 Root $TESTDIR/1
30452 noop
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}\"
30458 error " <<EOF
30459 BEGIN AUTH REQUEST
30460 ${CVSROOT_DIRNAME}
30461 testme
30462 Ay::'d
30463 END AUTH REQUEST
30464 init ${TESTDIR}/2
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
30471 error " <<EOF
30472 BEGIN AUTH REQUEST
30473 ${CVSROOT_DIRNAME}
30474 testme
30475 Ay::'d
30476 END AUTH REQUEST
30477 init xxx
30479 dotest_fail pserver-5d "test -d xxx" ''
30481 dotest_fail pserver-6 "${servercvs} --allow-root=${CVSROOT_DIRNAME} pserver" \
30482 "I HATE YOU" <<EOF
30483 BEGIN AUTH REQUEST
30484 ${CVSROOT_DIRNAME}
30485 testme
30486 Ay::'d^b?hd
30487 END AUTH REQUEST
30490 dotest_fail pserver-7 "${servercvs} --allow-root=${CVSROOT_DIRNAME} pserver" \
30491 "I HATE YOU" <<EOF
30492 BEGIN VERIFICATION REQUEST
30493 ${CVSROOT_DIRNAME}
30494 testme
30495 Ay::'d^b?hd
30496 END VERIFICATION REQUEST
30499 dotest pserver-8 "${servercvs} --allow-root=${CVSROOT_DIRNAME} pserver" \
30500 "${DOTSTAR} LOVE YOU" <<EOF
30501 BEGIN VERIFICATION REQUEST
30502 ${CVSROOT_DIRNAME}
30503 testme
30504 Ay::'d
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
30513 BEGIN AUTH REQUEST
30514 ${CVSROOT_DIRNAME}
30515 anonymous
30517 END AUTH REQUEST
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
30523 BEGIN AUTH REQUEST
30524 ${CVSROOT_DIRNAME}
30525 anonymous
30526 Aanythingwouldworkhereittrulydoesnotmatter
30527 END AUTH REQUEST
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
30533 BEGIN AUTH REQUEST
30534 ${CVSROOT_DIRNAME}
30535 ${username}
30537 END AUTH REQUEST
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
30543 BEGIN AUTH REQUEST
30544 ${CVSROOT_DIRNAME}
30545 ${username}
30546 Anypasswordwouldworkwhynotthisonethen
30547 END AUTH REQUEST
30550 # Test failure of whitespace password
30551 dotest_fail pserver-13 "${servercvs} --allow-root=${CVSROOT_DIRNAME} pserver" \
30552 "${DOTSTAR} HATE YOU" <<EOF
30553 BEGIN AUTH REQUEST
30554 ${CVSROOT_DIRNAME}
30555 willfail
30556 Amquiteunabletocomeupwithinterestingpasswordsanymore
30557 END AUTH REQUEST
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" \
30567 "$DOTSTAR LOVE YOU
30568 M Concurrent Versions System (CVS) .*
30569 ok" <<EOF
30570 BEGIN AUTH REQUEST
30571 $CVSROOT_DIRNAME
30572 anonymous
30573 Ay::'d
30574 END AUTH REQUEST
30575 Root $CVSROOT_DIRNAME
30576 version
30579 dotest pserver-15 "$servercvs --allow-root=$CVSROOT_DIRNAME pserver" \
30580 "$DOTSTAR LOVE YOU
30581 E $CPROG \\[server aborted\\]: .init. requires write access to the repository
30582 error " <<EOF
30583 BEGIN AUTH REQUEST
30584 $CVSROOT_DIRNAME
30585 anonymous
30586 Ay::'d
30587 END AUTH REQUEST
30588 init $CVSROOT_DIRNAME
30591 dotest pserver-16 "${servercvs} --allow-root=${CVSROOT_DIRNAME} pserver" \
30592 "${DOTSTAR} LOVE YOU
30593 M Concurrent Versions System (CVS) .*
30594 ok" <<EOF
30595 BEGIN AUTH REQUEST
30596 ${CVSROOT_DIRNAME}
30597 testme
30598 Ay::'d
30599 END AUTH REQUEST
30600 Root ${CVSROOT_DIRNAME}
30601 version
30604 dotest pserver-17 "${servercvs} --allow-root=${CVSROOT_DIRNAME} pserver" \
30605 "${DOTSTAR} LOVE YOU
30606 ok" <<EOF
30607 BEGIN AUTH REQUEST
30608 ${CVSROOT_DIRNAME}
30609 testme
30610 Ay::'d
30611 END AUTH REQUEST
30612 init ${CVSROOT_DIRNAME}
30615 dotest pserver-18 "${servercvs} --allow-root=${CVSROOT_DIRNAME} pserver" \
30616 "${DOTSTAR} LOVE YOU
30617 M Concurrent Versions System (CVS) .*
30618 ok" <<EOF
30619 BEGIN AUTH REQUEST
30620 ${CVSROOT_DIRNAME}
30621 ${username}
30622 Ay::'d
30623 END AUTH REQUEST
30624 Root ${CVSROOT_DIRNAME}
30625 version
30628 dotest pserver-19 "${servercvs} --allow-root=${CVSROOT_DIRNAME} pserver" \
30629 "${DOTSTAR} LOVE YOU
30630 ok" <<EOF
30631 BEGIN AUTH REQUEST
30632 ${CVSROOT_DIRNAME}
30633 ${username}
30634 Anything
30635 END AUTH REQUEST
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
30643 testme
30646 dotest pserver-20 "${servercvs} --allow-root=${CVSROOT_DIRNAME} pserver" \
30647 "${DOTSTAR} LOVE YOU
30648 M Concurrent Versions System (CVS) .*
30649 ok" <<EOF
30650 BEGIN AUTH REQUEST
30651 ${CVSROOT_DIRNAME}
30652 anonymous
30653 Ay::'d
30654 END AUTH REQUEST
30655 Root ${CVSROOT_DIRNAME}
30656 version
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
30662 error " <<EOF
30663 BEGIN AUTH REQUEST
30664 ${CVSROOT_DIRNAME}
30665 anonymous
30666 Ay::'d
30667 END AUTH REQUEST
30668 init ${CVSROOT_DIRNAME}
30671 dotest pserver-22 "${servercvs} --allow-root=${CVSROOT_DIRNAME} pserver" \
30672 "${DOTSTAR} LOVE YOU
30673 M Concurrent Versions System (CVS) .*
30674 ok" <<EOF
30675 BEGIN AUTH REQUEST
30676 ${CVSROOT_DIRNAME}
30677 testme
30678 Ay::'d
30679 END AUTH REQUEST
30680 Root ${CVSROOT_DIRNAME}
30681 version
30684 dotest pserver-23 "${servercvs} --allow-root=${CVSROOT_DIRNAME} pserver" \
30685 "${DOTSTAR} LOVE YOU
30686 ok" <<EOF
30687 BEGIN AUTH REQUEST
30688 ${CVSROOT_DIRNAME}
30689 testme
30690 Ay::'d
30691 END AUTH REQUEST
30692 init ${CVSROOT_DIRNAME}
30695 dotest pserver-24 "${servercvs} --allow-root=${CVSROOT_DIRNAME} pserver" \
30696 "${DOTSTAR} LOVE YOU
30697 M Concurrent Versions System (CVS) .*
30698 ok" <<EOF
30699 BEGIN AUTH REQUEST
30700 ${CVSROOT_DIRNAME}
30701 ${username}
30702 Ay::'d
30703 END AUTH REQUEST
30704 Root ${CVSROOT_DIRNAME}
30705 version
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
30711 error " <<EOF
30712 BEGIN AUTH REQUEST
30713 ${CVSROOT_DIRNAME}
30714 ${username}
30715 Anything
30716 END AUTH REQUEST
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) .*
30727 ok" <<EOF
30728 BEGIN AUTH REQUEST
30729 ${CVSROOT_DIRNAME}
30730 anonymous
30731 Ay::'d
30732 END AUTH REQUEST
30733 Root ${CVSROOT_DIRNAME}
30734 version
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
30740 error " <<EOF
30741 BEGIN AUTH REQUEST
30742 ${CVSROOT_DIRNAME}
30743 anonymous
30744 Ay::'d
30745 END AUTH REQUEST
30746 init ${CVSROOT_DIRNAME}
30749 dotest pserver-28 "${servercvs} --allow-root=${CVSROOT_DIRNAME} pserver" \
30750 "${DOTSTAR} LOVE YOU
30751 M Concurrent Versions System (CVS) .*
30752 ok" <<EOF
30753 BEGIN AUTH REQUEST
30754 ${CVSROOT_DIRNAME}
30755 testme
30756 Ay::'d
30757 END AUTH REQUEST
30758 Root ${CVSROOT_DIRNAME}
30759 version
30762 dotest pserver-29 "${servercvs} --allow-root=${CVSROOT_DIRNAME} pserver" \
30763 "${DOTSTAR} LOVE YOU
30764 ok" <<EOF
30765 BEGIN AUTH REQUEST
30766 ${CVSROOT_DIRNAME}
30767 testme
30768 Ay::'d
30769 END AUTH REQUEST
30770 init ${CVSROOT_DIRNAME}
30773 dotest pserver-30 "${servercvs} --allow-root=${CVSROOT_DIRNAME} pserver" \
30774 "${DOTSTAR} LOVE YOU
30775 M Concurrent Versions System (CVS) .*
30776 ok" <<EOF
30777 BEGIN AUTH REQUEST
30778 ${CVSROOT_DIRNAME}
30779 ${username}
30780 Ay::'d
30781 END AUTH REQUEST
30782 Root ${CVSROOT_DIRNAME}
30783 version
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
30789 error " <<EOF
30790 BEGIN AUTH REQUEST
30791 ${CVSROOT_DIRNAME}
30792 ${username}
30793 Anything
30794 END AUTH REQUEST
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
30803 # Clean up.
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"
30810 dokeep
30811 cd ../..
30812 rm -r 1
30813 restore_adm
30814 servercvs=$save_servercvs
30815 fi # skip the whole thing for local
30820 server)
30821 # Some tests of the server (independent of the client).
30822 if $remote; then
30823 save_servercvs=$servercvs
30824 servercvs=$testcvs
30825 dotest server-1 "${servercvs} server" \
30826 "E Protocol error: Root request missing
30827 error " <<EOF
30828 Directory bogus
30829 mumble/bar
30830 update
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
30836 Set OTHER=variable
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).
30843 ${AWK} 'BEGIN { \
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
30851 UseUnchanged
30852 gzip-file-contents 3
30853 Argument -m
30854 Argument msg
30855 Argumentx
30856 Argument dir1
30857 Argument tag1
30858 Argument tag2
30859 Directory .
30860 ${TESTDIR}/crerepos
30861 Modified file1
30862 u=rw,g=r,o=r
30865 cat gzipped.dat >>session.dat
30866 echo import >>session.dat
30867 dotest server-4 "${servercvs} server" \
30868 "M N dir1/file1
30870 M No conflicts created by this import
30872 ok" <session.dat
30873 dotest server-5 \
30874 "${testcvs} -q -d ${TESTDIR}/crerepos co -p dir1/file1" "test"
30876 # OK, here are some notify tests.
30877 dotest server-6 "${servercvs} server" \
30878 "Notified \./
30879 ${TESTDIR}/crerepos/dir1/file1
30880 ok" <<EOF
30881 Root ${TESTDIR}/crerepos
30882 Directory .
30883 ${TESTDIR}/crerepos/dir1
30884 Notify file1
30885 E Fri May 7 13:21:09 1999 -0000 myhost some-work-dir EUC
30886 noop
30888 # Sending the second "noop" before waiting for the output
30889 # from the first is bogus but hopefully we can get away
30890 # with it.
30891 dotest server-7 "${servercvs} server" \
30892 "M file1 $username Fri May 7 13:21:09 1999 -0000 myhost some-work-dir
30893 Notified \./
30894 ${TESTDIR}/crerepos/dir1/file1
30896 M file1 $username Fri May 7 13:21:09 1999 -0000 myhost some-work-dir
30897 Notified \./
30898 ${TESTDIR}/crerepos/dir1/file1
30899 ok" <<EOF
30900 Root ${TESTDIR}/crerepos
30901 Directory .
30902 ${TESTDIR}/crerepos/dir1
30903 Notify file1
30904 E Fri May 7 13:21:09 1999 -0000 myhost some-work-dir EUC
30905 noop
30906 Notify file1
30907 E The 57th day of Discord in the YOLD 3165 myhost some-work-dir EUC
30908 noop
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
30916 Notified \./
30917 ${TESTDIR}/crerepos/dir1/file1
30918 ok" <<EOF
30919 Root ${TESTDIR}/crerepos
30920 Directory .
30921 ${TESTDIR}/crerepos/dir1
30922 Notify file1
30923 E Setting Orange, the 52th day of Discord in the YOLD 3165 myhost some-work-dir EUC
30924 noop
30927 dotest server-9 "${servercvs} server" \
30928 "E Protocol error; misformed Notify request
30929 error " <<EOF
30930 Root ${TESTDIR}/crerepos
30931 Directory .
30932 ${TESTDIR}/crerepos/dir1
30933 Notify file1
30934 E Setting Orange+57th day of Discord myhost some-work-dir EUC
30935 noop
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
30945 Directory .
30946 ${TESTDIR}/crerepos/dir1
30947 watchers
30949 # See if "watchers" and "editors" display the right thing.
30950 dotest server-11 "${servercvs} server" \
30951 "M file1 ${username} tedit tunedit tcommit
30952 ok" <<EOF
30953 Root ${TESTDIR}/crerepos
30954 Directory .
30955 ${TESTDIR}/crerepos/dir1
30956 Entry /file1/1.1////
30957 watchers
30959 dotest server-12 "${servercvs} server" \
30960 "M file1 ${username} The 57th day of Discord in the YOLD 3165 myhost some-work-dir
30961 ok" <<EOF
30962 Root ${TESTDIR}/crerepos
30963 Directory .
30964 ${TESTDIR}/crerepos/dir1
30965 Entry /file1/1.1////
30966 editors
30969 # Now do an unedit.
30970 dotest server-13 "${servercvs} server" \
30971 "Notified \./
30972 ${TESTDIR}/crerepos/dir1/file1
30973 ok" <<EOF
30974 Root ${TESTDIR}/crerepos
30975 Directory .
30976 ${TESTDIR}/crerepos/dir1
30977 Notify file1
30978 U 7 May 1999 15:00 -0000 myhost some-work-dir EUC
30979 noop
30982 # Now try "watchers" and "editors" again.
30983 dotest server-14 "${servercvs} server" "ok" <<EOF
30984 Root ${TESTDIR}/crerepos
30985 Directory .
30986 ${TESTDIR}/crerepos/dir1
30987 watchers
30989 dotest server-15 "${servercvs} server" "ok" <<EOF
30990 Root ${TESTDIR}/crerepos
30991 Directory .
30992 ${TESTDIR}/crerepos/dir1
30993 editors
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\.
30999 ok" <<EOF
31000 Global_option -l
31001 noop
31004 # There used to be some exploits based on malformed Entry requests
31005 dotest server-17 "$testcvs server" \
31006 "E protocol error: Malformed Entry
31007 error " <<EOF
31008 Root $TESTDIR/crerepos
31009 Directory .
31010 $TESTDIR/crerepos/dir1
31011 Entry X/file1/1.1////
31012 noop
31015 dotest server-18 "$testcvs server" \
31016 "E protocol error: Malformed Entry
31017 error " <<EOF
31018 Root $TESTDIR/crerepos
31019 Directory .
31020 $TESTDIR/crerepos/dir1
31021 Entry /CC/CC/CC
31022 noop
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" \
31028 "ok" <<EOF
31029 Root $TESTDIR/crerepos
31030 Directory .
31031 $TESTDIR/crerepos
31032 noop
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
31038 Directory .
31039 $TESTDIR/crerepos
31040 noop
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
31046 Directory .
31047 $TESTDIR/crerepos
31048 noop
31051 # Now make sure that the config file can't be set via the user's
31052 # .cvsrc.
31053 echo server -c $TESTDIR/newconfig >$HOME/.cvsrc
31054 dotest server-22 "$testcvs server" \
31055 "ok" <<EOF
31056 Root $TESTDIR/crerepos
31057 Directory .
31058 $TESTDIR/crerepos
31059 noop
31062 dokeep
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
31072 server2)
31073 # More server tests, in particular testing that various
31074 # possible security holes are plugged.
31075 if $remote; then
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.)
31082 continue
31084 save_servercvs=$servercvs
31085 servercvs=$testcvs
31086 dotest server2-1 "${servercvs} server" \
31087 "E protocol error: directory '${CVSROOT_DIRNAME}/\.\./dir1' not within root '${CVSROOT_DIRNAME}'
31088 error " <<EOF
31089 Root ${CVSROOT_DIRNAME}
31090 Directory .
31091 ${CVSROOT_DIRNAME}/../dir1
31092 noop
31095 dotest server2-2 "${servercvs} server" \
31096 "E protocol error: directory '${CVSROOT_DIRNAME}dir1' not within root '${CVSROOT_DIRNAME}'
31097 error " <<EOF
31098 Root ${CVSROOT_DIRNAME}
31099 Directory .
31100 ${CVSROOT_DIRNAME}dir1
31101 noop
31104 dotest 2-3 "${servercvs} server" \
31105 "E protocol error: directory '${TESTDIR}' not within root '${CVSROOT_DIRNAME}'
31106 error " <<EOF
31107 Root ${CVSROOT_DIRNAME}
31108 Directory .
31109 ${TESTDIR}
31110 noop
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
31119 error " <<EOF
31120 Root ${CVSROOT_DIRNAME}
31121 Directory .
31122 ${CVSROOT_DIRNAME}
31123 Unchanged foo/bar
31124 noop
31126 servercvs=$save_servercvs
31132 client)
31133 # Some tests of the client (independent of the server).
31134 if $remote; then :; else
31135 remoteonly client
31136 continue
31139 if $proxy; then
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.
31144 notproxy client
31145 continue
31148 cat >$TESTDIR/serveme <<EOF
31149 #!$TESTSHELL
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"
31156 echo "ok"
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"
31162 echo "4"
31163 echo "xyz"
31164 echo "ok"
31165 cat >/dev/null
31167 # Cygwin. Pthffffffffft!
31168 if test -n "$remotehost"; then
31169 $CVS_RSH $remotehost "chmod +x $TESTDIR/serveme"
31170 else
31171 chmod +x $TESTDIR/serveme
31173 save_CVS_SERVER=$CVS_SERVER
31174 CVS_SERVER=$TESTDIR/serveme; export CVS_SERVER
31175 mkdir 1; cd 1
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
31181 #!$TESTSHELL
31182 echo "Valid-requests Root Valid-responses valid-requests Directory Entry Modified Unchanged Argument Argumentx ci co update"
31183 echo "ok"
31184 echo "M merge-it"
31185 echo "Copy-file ./"
31186 echo "$CVSROOT_DIRNAME/first-dir/file1"
31187 echo "$TESTDIR/bogus/.#file1.1.1"
31188 echo "Merged ./"
31189 echo "$CVSROOT_DIRNAME/first-dir/file1"
31190 echo "/file1/1.2///"
31191 echo "u=rw,g=rw,o=rw"
31192 echo "4"
31193 echo "abd"
31194 echo "ok"
31195 cat >/dev/null
31197 cd first-dir
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" \
31202 "merge-it
31203 $CPROG \[update aborted\]: protocol error: Copy-file tried to specify director$DOTSTAR"
31204 cat >$TESTDIR/serveme <<EOF
31205 #!$TESTSHELL
31206 echo "Valid-requests Root Valid-responses valid-requests Directory Entry Modified Unchanged Argument Argumentx ci co update"
31207 echo "ok"
31208 echo "M merge-it"
31209 echo "Copy-file ./"
31210 echo "$CVSROOT_DIRNAME/first-dir/file1"
31211 echo ".#file1.1.1"
31212 echo "Merged ./"
31213 echo "$CVSROOT_DIRNAME/first-dir/file1"
31214 echo "/file1/1.2///"
31215 echo "u=rw,g=rw,o=rw"
31216 echo "4"
31217 echo "abc"
31218 echo "ok"
31219 cat >/dev/null
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
31228 #!$TESTSHELL
31229 echo "Valid-requests Root Valid-responses valid-requests Directory Entry Modified Unchanged Argument Argumentx ci co update"
31230 echo "ok"
31231 echo "M OK, whatever"
31232 echo "ok"
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 ]*
31243 valid-requests
31244 Argument -D
31245 Argument [34] Oct 1999 [0-9][0-9]:00:00 -0000
31246 Argument --
31247 Directory \.
31248 $CVSROOT_DIRNAME/first-dir
31249 Entry /file1/1\.2///
31250 Modified file1
31251 u=rw,g=,o=
31254 update" \
31255 "Root $CVSROOT_DIRNAME
31256 Valid-responses [-a-zA-Z ]*
31257 valid-requests
31258 Argument -D
31259 Argument [34] Oct 1999 [0-9][0-9]:00:00 -0000
31260 Argument --
31261 Directory \.
31262 $CVSROOT_DIRNAME/first-dir
31263 Entry /file1/1\.2///
31264 Modified file1
31265 u=rw,g=r,o=r
31268 update"
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
31274 # user's sandbox.
31275 cat >$HOME/.bashrc <<EOF
31276 #!$TESTSHELL
31277 # This is where login scripts would usually be
31278 # stored.
31280 cat >$TESTDIR/serveme <<EOF
31281 #!$TESTSHELL
31282 echo "Valid-requests Root Valid-responses valid-requests Directory Entry Modified Unchanged Argument Argumentx ci co update"
31283 echo "ok"
31284 echo "Rcs-diff $HOME/"
31285 echo "$HOME/.bashrc"
31286 echo "/.bashrc/73.50///"
31287 echo "u=rw,g=rw,o=rw"
31288 echo "20"
31289 echo "a1 1"
31290 echo "echo 'gotcha!'"
31291 echo "ok"
31292 cat >/dev/null
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
31300 # works.
31302 # Incidentally, I can reproduce this behavior with Linux 2.4.20 and
31303 # Bash 2.05 or Bash 2.05b.
31304 sleep 1
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
31312 #!$TESTSHELL
31313 echo "Valid-requests Root Valid-responses valid-requests Directory Entry Modified Unchanged Argument Argumentx ci co update"
31314 echo "ok"
31315 echo "Rcs-diff ./"
31316 echo "$HOME/.bashrc"
31317 echo "/.bashrc/73.50///"
31318 echo "u=rw,g=rw,o=rw"
31319 echo "20"
31320 echo "a1 1"
31321 echo "echo 'gotcha!'"
31322 echo "ok"
31323 cat >/dev/null
31325 sleep 1
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
31330 # client-10.
31331 cat >$TESTDIR/serveme <<EOF
31332 #!$TESTSHELL
31333 echo "Valid-requests Root Valid-responses valid-requests Directory Entry Modified Unchanged Argument Argumentx ci co update"
31334 echo "ok"
31335 echo "Rcs-diff ../../home/"
31336 echo "../../.bashrc"
31337 echo "/.bashrc/73.50///"
31338 echo "u=rw,g=rw,o=rw"
31339 echo "20"
31340 echo "a1 1"
31341 echo "echo 'gotcha!'"
31342 echo "ok"
31343 cat >/dev/null
31345 sleep 1
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
31352 #!$TESTSHELL
31353 echo "Valid-requests Root Valid-responses valid-requests Directory Entry Modified Unchanged Argument Argumentx ci co update"
31354 echo "ok"
31355 echo "Created $HOME/"
31356 echo "$HOME/.bashrc"
31357 echo "/.bashrc/73.50///"
31358 echo "u=rw,g=rw,o=rw"
31359 echo "26"
31360 echo "#! $TESTSHELL"
31361 echo "echo 'gotcha!'"
31362 echo "ok"
31363 cat >/dev/null
31365 sleep 1
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
31372 #!$TESTSHELL
31373 echo "Valid-requests Root Valid-responses valid-requests Directory Entry Modified Unchanged Argument Argumentx ci co update"
31374 echo "ok"
31375 echo "Update-existing ../../home/"
31376 echo "../../home/.bashrc"
31377 echo "/.bashrc/73.50///"
31378 echo "u=rw,g=rw,o=rw"
31379 echo "26"
31380 echo "#! $TESTSHELL"
31381 echo "echo 'gotcha!'"
31382 echo "ok"
31383 cat >/dev/null
31385 sleep 1
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
31392 #!$TESTSHELL
31393 echo "Valid-requests Root Valid-responses valid-requests Directory Entry Modified Unchanged Argument Argumentx ci co update"
31394 echo "ok"
31395 echo "Merged $HOME/"
31396 echo "$HOME/.bashrc"
31397 echo "/.bashrc/73.50///"
31398 echo "u=rw,g=rw,o=rw"
31399 echo "26"
31400 echo "#! $TESTSHELL"
31401 echo "echo 'gotcha!'"
31402 echo "ok"
31403 cat >/dev/null
31405 sleep 1
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
31412 #!$TESTSHELL
31413 echo "Valid-requests Root Valid-responses valid-requests Directory Entry Modified Unchanged Argument Argumentx ci co update"
31414 echo "ok"
31415 echo "Updated ../../home/"
31416 echo "../../home/.bashrc"
31417 echo "/.bashrc/73.50///"
31418 echo "u=rw,g=rw,o=rw"
31419 echo "26"
31420 echo "#! $TESTSHELL"
31421 echo "echo 'gotcha!'"
31422 echo "ok"
31423 cat >/dev/null
31425 sleep 1
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
31433 #!$TESTSHELL
31434 echo "Valid-requests Root Valid-responses valid-requests Directory Entry Modified Unchanged Argument Argumentx ci co update"
31435 echo "ok"
31436 echo "Created ."
31437 echo "./innocuous"
31438 echo "/innocuous/73.50///"
31439 echo "u=rw,g=rw,o=rw"
31440 echo "26"
31441 echo "#! $TESTSHELL"
31442 echo "echo 'gotcha!'"
31443 echo "Copy-file ."
31444 echo "./innocuous"
31445 echo "$HOME/innocuous"
31446 echo "ok"
31447 cat >/dev/null
31449 sleep 1
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" \
31455 "#!$TESTSHELL
31456 # This is where login scripts would usually be
31457 # stored\."
31459 # Check that the client detects redirect loops.
31460 cat >$TESTDIR/serveme <<EOF
31461 #!$TESTSHELL
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"
31463 echo "ok"
31464 echo "Redirect $CVSROOT"
31466 # Eat up data from the client to avoid broken pipe errors.
31467 cat >/dev/null
31469 echo newstuff >file1
31470 sleep 1
31471 dotest_fail client-20 "$testcvs ci" \
31472 "$CPROG commit: Examining \.
31473 $CPROG \[commit aborted\]: \`Redirect' loop detected\. Server misconfiguration$QUESTION"
31475 dokeep
31476 cd ../..
31477 rm -r 1
31478 rmdir $TESTDIR/bogus
31479 rm $TESTDIR/serveme $HOME/.bashrc
31480 CVS_SERVER=$save_CVS_SERVER; export CVS_SERVER
31485 dottedroot)
31486 # Check that a CVSROOT with a "." in the name will work.
31488 if $proxy; then
31489 # don't even try
31490 continue
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" ""
31499 mkdir dir1
31500 mkdir dir1/dir2
31501 echo version1 >dir1/dir2/file1
31502 cd dir1
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"
31508 cd ..
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"
31517 dokeep
31519 rm -rf ${CVSROOT_DIRNAME}
31520 rm -r dir1 module1
31521 CVSROOT_DIRNAME=${CVSROOT_DIRNAME_save}
31522 CVSROOT=${CVSROOT_save}
31527 fork)
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.
31536 if $remote; then
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.
31540 continue
31542 mkdir fork; cd fork
31543 save_CVS_SERVER=$CVS_SERVER
31544 unset CVS_SERVER
31545 # So looking through $PATH for cvs won't work...
31546 echo "echo junk" >cvs
31547 chmod a+x cvs
31548 save_PATH=$PATH; PATH=.:$PATH
31549 # The second error message below is for testing clients without
31550 # server support.
31551 if ${testcvs_server_support}; then
31552 dotest fork-1 "$testcvs -d:fork:$CVSROOT_DIRNAME version" \
31553 'Client: \(.*\)
31554 Server: \1'
31555 else
31556 dotest_fail fork-1-noss \
31557 "$testcvs -d:fork:$CVSROOT_DIRNAME version" \
31558 "Client: .*
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
31568 dokeep
31569 cd ..
31570 rm -r fork
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.
31580 mkdir 1; cd 1
31581 module=c-a-m
31582 echo > unused-file
31583 dotest commit-add-missing-1 \
31584 "$testcvs -Q import -m. $module X Y" ''
31586 file=F
31587 # Check it out and tag it.
31588 dotest commit-add-missing-2 "$testcvs -Q co $module" ''
31589 cd $module
31590 dotest commit-add-missing-3 "$testcvs -Q tag -b B" ''
31591 echo v1 > $file
31592 dotest commit-add-missing-4 "$testcvs -Q add $file" ''
31593 rm -f $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!"
31598 dotest
31599 cd ../..
31600 rm -rf 1
31601 modify_repo rm -rf $CVSROOT_DIRNAME/$module
31606 commit-d)
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" ""
31614 cd 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"
31624 dokeep
31625 cd ../..
31626 rm -rf 1 cvsroot/c-d-c
31631 template)
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" ''
31646 rm -fr first
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" ''
31654 cd 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?
31660 if $remote; then
31661 dotest template-rcsinfo-4r \
31662 "cmp CVS/Template ${TESTDIR}/template/temp.def" ''
31663 else
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?
31671 if $remote; then
31672 dotest template-rcsinfo-5r \
31673 "cmp CVS/Template ${TESTDIR}/template/temp.def" ''
31674 else
31675 dotest template-rcsinfo-5 \
31676 "test ! -f CVS/Template" ''
31678 cd ..
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"
31687 if $remote; then
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" ''
31700 else
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
31709 cd second
31710 mkdir otherdir
31711 dotest template-add-1 "${testcvs} add otherdir" \
31712 "Directory ${CVSROOT_DIRNAME}/second/otherdir added to the repository"
31713 if $remote; then
31714 dotest template-add-2r \
31715 "cmp otherdir/CVS/Template ${TESTDIR}/template/temp.def" ''
31716 else
31717 dotest_fail template-add-2 "test -f otherdir/CVS/Template" ''
31719 cd ..
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"
31733 if $remote; then
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" ''
31742 else
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"
31756 if $remote; then
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" ''
31759 else
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
31766 if $remote; then
31767 cd second
31768 echo hello > file1
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
31773 cd ..
31774 rm -fr second
31775 dotest template-tag-r-4 "${testcvs} -Q co -rtag second" ''
31778 cd CVSROOT
31779 dotest template-norcsinfo-1 "${testcvs} up" \
31780 "${SPROG} update: Updating \."
31781 # Did the CVSROOT/CVS/Template file get the updated version?
31782 if $remote; then
31783 dotest template-norcsinfo-r-2 \
31784 "cmp CVS/Template ${TESTDIR}/template/temp.def" ''
31785 else
31786 dotest_fail template-norcsinfo-2 "test -f CVS/Template" ''
31789 : > rcsinfo
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" ''
31795 cd ..
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" ''
31808 dokeep
31810 # cleanup
31811 modify_repo rm -rf $CVSROOT_DIRNAME/first $CVSROOT_DIRNAME/second
31812 restore_adm
31813 cd ..
31814 rm -rf template
31819 writeproxy)
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
31826 continue
31829 if $noredirect; then
31830 notnoredirect writeproxy
31831 continue
31834 require_rsync
31835 if test $? -eq 77; then
31836 skip writeproxy "$skipreason"
31837 continue
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"
31854 cd 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
31859 cat >>config <<EOF
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
31874 ok" \
31875 << EOF
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
31878 valid-requests
31879 UseUnchanged
31880 Command-prep commit
31881 Global_option -q
31882 Global_option -Q
31883 Argument -m
31884 Argument configure-writeproxy
31885 Argument --
31886 Directory .
31887 CVSROOT
31888 Entry /checkoutlist/1.1///
31889 Modified checkoutlist
31890 u=rw,g=rw,o=r
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
31898 # be checked out.
31900 # File format:
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
31917 cd ../..
31918 mkdir secondary; cd secondary
31919 dotest writeproxy-1 "$testcvs -qd$SECONDARY_CVSROOT co CVSROOT" \
31920 "U CVSROOT/checkoutlist
31921 U CVSROOT/commitinfo
31922 U CVSROOT/config
31923 U CVSROOT/cvswrappers
31924 U CVSROOT/loginfo
31925 U CVSROOT/modules
31926 U CVSROOT/notify
31927 U CVSROOT/postadmin
31928 U CVSROOT/postproxy
31929 U CVSROOT/posttag
31930 U CVSROOT/postwatch
31931 U CVSROOT/preproxy
31932 U CVSROOT/rcsinfo
31933 U CVSROOT/taginfo
31934 U CVSROOT/verifymsg"
31936 # Confirm data present
31937 cd CVSROOT
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" \
31941 "${DOTSTAR}
31942 PrimaryServer=$PRIMARY_CVSROOT"
31944 # Checkin to secondary
31945 cd ..
31946 dotest writeproxy-4 "$testcvs -Qd$SECONDARY_CVSROOT co -ldtop ."
31947 cd top
31948 mkdir firstdir
31950 # Have to move the primary root back before we can perform write
31951 # operations.
31952 mv $TESTDIR/save-root $PRIMARY_CVSROOT_DIRNAME
31954 dotest writeproxy-5 "$testcvs -Q add firstdir"
31955 cd 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" \
31980 "U firstdir/file1"
31982 # Confirm data present
31983 # - This test indirectly confirms that the commit did not take
31984 # place on the secondary.
31985 cd firstdir
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" \
31995 "U file1"
31997 # Confirm data present
31998 dotest writeproxy-12 "cat file1" "now you see me again"
32000 # Test a failing rsync
32001 cd ../../CVSROOT
32002 sed \$d <loginfo >tmp
32003 mv tmp loginfo
32004 echo >>loginfo \
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!"
32011 touch loginfo
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"
32016 dokeep
32017 cd ../../..
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
32042 continue
32045 require_rsync
32046 if test $? -eq 77; then
32047 skip writeproxy-noredirect "$skipreason"
32048 continue
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"
32065 cd CVSROOT
32066 cat >>loginfo <<EOF
32067 ALL $RSYNC -gopr --delete $PRIMARY_CVSROOT_DIRNAME/ $SECONDARY_CVSROOT_DIRNAME
32069 cat >>config <<EOF
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
32083 # secondary.
32084 cat <<EOF >$TESTDIR/writeproxy-secondary-wrapper
32085 #! $TESTSHELL
32086 CVS_SERVER=$TESTDIR/writeproxy-primary-wrapper
32087 export CVS_SERVER
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
32095 #! $TESTSHELL
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
32107 # above.
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
32115 cd ../..
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
32121 U CVSROOT/config
32122 U CVSROOT/cvswrappers
32123 U CVSROOT/loginfo
32124 U CVSROOT/modules
32125 U CVSROOT/notify
32126 U CVSROOT/postadmin
32127 U CVSROOT/postproxy
32128 U CVSROOT/posttag
32129 U CVSROOT/postwatch
32130 U CVSROOT/preproxy
32131 U CVSROOT/rcsinfo
32132 U CVSROOT/taginfo
32133 U CVSROOT/verifymsg"
32135 # Confirm data present
32136 cd CVSROOT
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" \
32140 "${DOTSTAR}
32141 PrimaryServer=$PRIMARY_CVSROOT"
32143 # Checkin to secondary
32144 cd ..
32145 dotest writeproxy-noredirect-4 \
32146 "$testcvs -Qd'$PRIMARY_CVSROOT' co -ldtop ."
32147 cd top
32148 mkdir firstdir
32150 # Have to move the primary root back before we can perform write
32151 # operations.
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/
32160 firstdir/
32161 ok" \
32162 << EOF
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
32165 valid-requests
32166 UseUnchanged
32167 Command-prep add
32168 Global_option -q
32169 Global_option -Q
32170 wrapper-sendme-rcsOptions
32171 Argument --
32172 Directory firstdir
32173 firstdir
32174 Directory .
32176 Argument firstdir
32180 # Gotta update the workspace ourselves since we bypassed the client.
32181 cp -R CVS firstdir/CVS
32182 echo "firstdir" >firstdir/CVS/Repository
32184 cd firstdir
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
32191 Checked-in \./
32192 firstdir/file1
32193 /file1/0///
32194 ok" \
32195 << EOF
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
32198 valid-requests
32199 UseUnchanged
32200 Command-prep add
32201 Global_option -q
32202 Global_option -Q
32203 wrapper-sendme-rcsOptions
32204 Argument --
32205 Directory .
32206 firstdir
32207 Is-modified file1
32208 Argument file1
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
32220 Mode u=rw,g=rw,o=r
32221 Checked-in \./
32222 firstdir/file1
32223 /file1/1\.1///
32224 ok" \
32225 << EOF
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
32228 valid-requests
32229 UseUnchanged
32230 Command-prep commit
32231 Global_option -q
32232 Global_option -Q
32233 Argument -m
32234 Argument first-file
32235 Argument --
32236 Directory .
32237 firstdir
32238 Entry /file1/0/+modified//
32239 Modified file1
32240 u=rw,g=rw,o=r
32242 now you see me
32243 Argument file1
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" \
32260 "U firstdir/file1"
32262 # Confirm data present
32263 # - This test indirectly confirms that the commit did not take
32264 # place on the secondary.
32265 cd firstdir
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"
32280 dokeep
32281 cd ../../../..
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
32294 writeproxy-ssh)
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
32302 continue
32305 if $noredirect; then
32306 notnoredirect writeproxy-ssh
32307 continue
32310 require_rsh "$CVS_RSH"
32311 if test $? -eq 77; then
32312 skip writeproxy-ssh "$skipreason"
32313 continue
32316 require_rsync
32317 if test $? -eq 77; then
32318 skip writeproxy-ssh "$skipreason"
32319 continue
32322 # Save old roots.
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
32328 # Set new roots.
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"
32339 cd 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
32346 cat >>config <<EOF
32347 PrimaryServer=$PRIMARY_CVSROOT
32349 dotest writeproxy-ssh-init-3 \
32350 "$testcvs -Q ci -mconfigure-writeproxy-ssh" \
32351 "Referrer=NONE"
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
32363 cd ../..
32364 save_CVSROOT=$CVSROOT
32365 CVSROOT=$SECONDARY_CVSROOT
32366 export CVSROOT
32367 dotest writeproxy-ssh-1 "$testcvs -Q co -ldtop ."
32368 CVSROOT=$save_CVSROOT
32369 export CVSROOT
32370 cd top
32371 mkdir firstdir
32373 # Have to move the primary root back before we can perform write
32374 # operations.
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"
32380 cd firstdir
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"
32386 dokeep
32387 cd ../../..
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
32406 continue
32409 require_rsh "$CVS_RSH"
32410 if test $? -eq 77; then
32411 skip writeproxy-ssh-noredirect "$skipreason"
32412 continue
32415 require_rsync
32416 if test $? -eq 77; then
32417 skip writeproxy-ssh-noredirect "$skipreason"
32418 continue
32421 # Save old roots.
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
32427 # Set new roots.
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"
32440 cd 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
32447 cat >>config <<EOF
32448 PrimaryServer=$PRIMARY_CVSROOT
32450 dotest writeproxy-ssh-noredirect-init-3 \
32451 "$testcvs -Q ci -mconfigure-writeproxy-ssh-noredirect" \
32452 "Referrer=NONE"
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
32458 # secondary.
32459 cat <<EOF >$TESTDIR/writeproxy-secondary-wrapper
32460 #! $TESTSHELL
32461 CVS_SERVER=$TESTDIR/writeproxy-primary-wrapper
32462 export CVS_SERVER
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
32470 #! $TESTSHELL
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
32491 cd ../..
32492 dotest writeproxy-ssh-noredirect-1 \
32493 "$testcvs -qd '$SECONDARY_CVSROOT' co -ldtop ."
32495 cd top
32496 mkdir firstdir
32498 # Have to move the primary root back before we can perform write
32499 # operations.
32500 mv $TESTDIR/save-root $PRIMARY_CVSROOT_DIRNAME
32502 dotest writeproxy-ssh-noredirect-2 "$testcvs -Q add firstdir" \
32503 "Referrer=NONE"
32505 cd 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" \
32510 "Referrer=NONE"
32512 dokeep
32513 cd ../../..
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
32527 trace)
32528 # Check that there are no core dumps lurking in the trace
32529 # options.
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
32540 touch file1
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} )
32562 *-> remove_locks()
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" \
32659 *-> Lock_Cleanup()
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} )
32665 *-> remove_locks()
32666 *-> safe_location( where=(null) )
32667 *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
32668 *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
32669 N trace/file1
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} )
32681 N trace/file1
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()"
32700 cd ..
32701 rm -fr imp
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
32709 *-> Create_Admin
32710 *-> Create_Admin (\., trace, ${CVSROOT_DIRNAME}/trace, , , 0, 0, 1)
32711 *-> Leaving do_recursion ( frame=${PFMT} )
32712 *-> Leaving do_recursion ( frame=${PFMT} )
32713 *-> Lock_Cleanup()
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} )
32730 *-> remove_locks()
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} )
32746 U trace/file1
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
32754 *-> Create_Admin
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\.
32773 S -> Create_Admin
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} )
32818 U trace/file1
32819 ${SPROG} checkout: Updating trace"
32821 cd trace
32822 mkdir subdir
32823 dotest_sort trace-4 "${testcvs} -t -t -t add subdir" \
32824 " *-> Create_Admin
32825 *-> Create_Admin (\., subdir, ${CVSROOT_DIRNAME}/trace/subdir, , , 0, 0, 1)
32826 *-> Lock_Cleanup()
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} )
32831 *-> remove_locks()
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)
32846 *-> Create_Admin
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} )"
32897 touch file2
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} )
32904 *-> remove_locks()
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} )
32973 *-> Lock_Cleanup()
32974 *-> Lock_Cleanup()
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)
33010 *-> rcs_cleanup()
33011 *-> readers_exist (${CVSROOT_DIRNAME}/trace)
33012 *-> remove_locks()
33013 *-> remove_locks()
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)
33140 S -> rcs_cleanup()
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} )
33200 *-> Lock_Cleanup()
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)
33245 *-> rcs_cleanup()
33246 *-> readers_exist (${CVSROOT_DIRNAME}/trace)
33247 *-> readers_exist (${CVSROOT_DIRNAME}/trace/subdir)
33248 *-> remove_locks()
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} )
33289 T file1
33290 T file2
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)
33389 S -> rcs_cleanup()
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} )
33441 T file1
33442 T file2
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} )
33465 *-> Lock_Cleanup()
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)
33510 *-> rcs_cleanup()
33511 *-> readers_exist (${CVSROOT_DIRNAME}/trace)
33512 *-> readers_exist (${CVSROOT_DIRNAME}/trace/subdir)
33513 *-> remove_locks()
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} )
33554 T file1
33555 T file2
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)
33654 S -> rcs_cleanup()
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} )
33708 T file1
33709 T file2
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} )
33723 *-> Lock_Cleanup()
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} )
33740 *-> remove_locks()
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} )
33764 MYVENDOR: 1\.1\.1
33765 bp: 1\.1
33766 bp: 1\.1\.1\.1
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 =============================================================================
33775 Initial revision
33776 RCS file: ${CVSROOT_DIRNAME}/trace/file1,v
33777 RCS file: ${CVSROOT_DIRNAME}/trace/file2,v
33778 Working file: file1
33779 Working file: file2
33780 access list:
33781 access list:
33782 branch:
33783 branch: 1\.1\.1
33784 branches: 1\.1\.1;
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};
33790 description:
33791 description:
33792 head: 1\.1
33793 head: 1\.1
33794 import
33795 keyword substitution: kv
33796 keyword substitution: kv
33797 locks: strict
33798 locks: strict
33799 new-file
33800 revision 1\.1
33801 revision 1\.1
33802 revision 1\.1\.1\.1
33803 symbolic names:
33804 symbolic names:
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} )
33842 MYVENDOR: 1\.1\.1
33843 bp: 1\.1
33844 bp: 1\.1\.1\.1
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 =============================================================================
33853 Initial revision
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
33917 access list:
33918 access list:
33919 branch:
33920 branch: 1\.1\.1
33921 branches: 1\.1\.1;
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};
33927 description:
33928 description:
33929 head: 1\.1
33930 head: 1\.1
33931 import
33932 keyword substitution: kv
33933 keyword substitution: kv
33934 locks: strict
33935 locks: strict
33936 new-file
33937 revision 1\.1
33938 revision 1\.1
33939 revision 1\.1\.1\.1
33940 symbolic names:
33941 symbolic names:
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} )
33953 *-> Lock_Cleanup()
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} )
33963 *-> remove_locks()
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} )"
34023 dotest_sort \
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} )
34052 *-> Lock_Cleanup()
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)
34112 *-> rcs_cleanup()
34113 *-> readers_exist (${CVSROOT_DIRNAME}/trace)
34114 *-> readers_exist (${CVSROOT_DIRNAME}/trace/subdir)
34115 *-> remove_locks()
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)
34258 S -> rcs_cleanup()
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)
34322 Sticky Tag: (none)
34323 Working revision: 1\.1\.1\.1 ${DATE}
34324 *-> Leaving do_recursion ( frame=${PFMT} )
34325 *-> Lock_Cleanup()
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} )
34335 *-> remove_locks()
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)
34360 Sticky Tag: (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} )"
34401 echo foo >> file1
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} )
34409 *-> Lock_Cleanup()
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} )
34426 *-> remove_locks()
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)
34439 U file1" \
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} )
34502 U file1"
34503 echo foo >> file1
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} )
34523 *-> Lock_Cleanup()
34524 *-> Lock_Cleanup()
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)
34563 *-> rcs_cleanup()
34564 *-> readers_exist (${CVSROOT_DIRNAME}/trace)
34565 *-> remove_locks()
34566 *-> remove_locks()
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)
34695 S -> rcs_cleanup()
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} )
34744 *-> Lock_Cleanup()
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} )
34759 *-> remove_locks()
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 ===================================================================
34769 > foo
34770 Index: file1
34771 RCS file: ${CVSROOT_DIRNAME}/trace/file1,v
34772 diff -r1\.1 -r1\.2
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 ===================================================================
34800 > foo
34801 Index: file1
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} )
34834 diff -r1\.1 -r1\.2
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} )
34846 *-> Lock_Cleanup()
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 )
34860 *-> remove_locks()
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} )
34868 \*\*\* 0 \*\*\*\*
34869 \*\*\* trace/file1:1\.1\.1\.1 ${DATE}
34870 \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*
34871 ${PLUS} foo
34872 --- 1 ----
34873 --- trace/file1 ${DATE}
34874 Index: trace/file1
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} )
34889 \*\*\* 0 \*\*\*\*
34890 \*\*\* trace/file1:1\.1\.1\.1 ${DATE}
34891 \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*
34892 ${PLUS} foo
34893 --- 1 ----
34894 --- trace/file1 ${DATE}
34895 Index: trace/file1
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} )
34933 *-> Lock_Cleanup()
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} )
34944 *-> remove_locks()
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} )
35045 *-> Lock_Cleanup()
35046 *-> Lock_Cleanup()
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)
35082 *-> rcs_cleanup()
35083 *-> readers_exist (${CVSROOT_DIRNAME}/trace)
35084 *-> remove_locks()
35085 *-> remove_locks()
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)
35223 S -> rcs_cleanup()
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} )
35276 done
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} )
35289 *-> remove_locks()
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()"
35310 rm stderr19
35312 cd ..
35313 dotest_sort \
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} )
35339 *-> Lock_Cleanup()
35340 *-> Lock_Cleanup()
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)
35397 *-> remove_locks()
35398 *-> remove_locks()
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\."
35503 dokeep
35504 cd ..
35505 rm -fr trace
35506 modify_repo rm -fr $CVSROOT_DIRNAME/trace
35512 echo $what is not the name of a test -- ignored
35514 esac
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.
35521 # FIXME?
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
35525 # A Solaris issue.
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.
35532 if $proxy; then
35533 problem=false
35534 for file in \
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
35547 else
35548 echo "\`$file' and \`$TESTDIR/`basename $file`-clean' differ." \
35549 >>$LOGFILE
35550 problem=:
35552 done
35553 if $problem; then
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.
35571 skippedoutput=
35572 warningsoutput=
35573 extendedinfo=
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
35589 extendedinfo=" ("
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."
35604 # TODO:
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
35609 # thing.
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
35629 # same).
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.
35646 # Fix it.
35647 # End of TODO list.
35649 # Exit if keep set
35650 dokeep
35652 # Remove the test directory, but first change out of it.
35653 if $TIMING; then
35654 echo "exiting without removing test dir in order to preserve timing information."
35655 else
35656 cd `dirname $TESTDIR`
35657 rm -rf $TESTDIR
35660 # end of sanity.sh