aboutsummaryrefslogtreecommitdiff
path: root/contrib/cvs/src/sanity.sh
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/cvs/src/sanity.sh')
-rwxr-xr-xcontrib/cvs/src/sanity.sh6365
1 files changed, 4200 insertions, 2165 deletions
diff --git a/contrib/cvs/src/sanity.sh b/contrib/cvs/src/sanity.sh
index 84e67ccd6630..727e33a5fa32 100755
--- a/contrib/cvs/src/sanity.sh
+++ b/contrib/cvs/src/sanity.sh
@@ -18,10 +18,18 @@
#
# Original Author: K. Richard Pixley
-# usage: sanity.sh [-r] @var{cvs-to-test} @var{tests-to-run}
-# -r means to test remote instead of local cvs.
-# @var{tests-to-run} are the names of the tests to run; if omitted run all
-# tests.
+# usage:
+exit_usage ()
+{
+ echo "Usage: `basename $0` [-kr] [-f FROM-TEST] CVS-TO-TEST [TESTS-TO-RUN...]" 1>&2
+ exit 2
+}
+# -r test remote instead of local cvs.
+# -k try to keep directories created by individual tests around
+# -f FROM-TEST run TESTS-TO-RUN, skipping all tests in the list before
+# FROM-TEST
+#
+# TESTS-TO-RUN are the names of the tests to run; if omitted default to all tests.
# See TODO list at end of file.
@@ -37,55 +45,46 @@ unset CVSREAD
LC_ALL=C
export LC_ALL
-# The default value of /tmp/cvs-sanity for TESTDIR is dubious,
-# because it loses if two people/scripts try to run the tests
-# at the same time. Some possible solutions:
-# 1. Use /tmp/cvs-test$$. One disadvantage is that the old
-# cvs-test* directories would pile up, because they wouldn't
-# necessarily get removed.
-# 2. Have everyone/everything running the testsuite set
-# TESTDIR to some appropriate directory.
-# 3. Have the default value of TESTDIR be some variation of
-# `pwd`/cvs-sanity. The biggest problem here is that we have
-# been fairly careful to test that CVS prints in messages the
-# actual pathnames that we pass to it, rather than a different
-# pathname for the same directory, as may come out of `pwd`.
-# So this would be lost if everything was `pwd`-based. I suppose
-# if we wanted to get baroque we could start making symlinks
-# to ensure the two are different.
-tmp=`(cd /tmp; /bin/pwd || pwd) 2>/dev/null`
-: ${TESTDIR=$tmp/cvs-sanity}
-# "debugger"
-#set -x
-
-echo 'This test should produce no other output than this line, and a final "OK".'
-
-if test x"$1" = x"-r"; then
- shift
- remote=yes
-else
- remote=no
-fi
-# The --keep option will eventually cause all the tests to leave around the
-# contents of the /tmp directory; right now only some implement it. Not
-# useful if you are running more than one test.
-# FIXME: need some real option parsing so this doesn't depend on the order
-# in which they are specified.
-if test x"$1" = x"--keep"; then
- shift
- keep=yes
-else
- keep=no
-fi
+#
+# read our options
+#
+unset fromtest
+keep=false
+remote=false
+while getopts f:kr option ; do
+ case "$option" in
+ f)
+ fromtest="$OPTARG"
+ ;;
+ k)
+ # The -k (keep) option will eventually cause all the tests to leave around the
+ # contents of the /tmp directory; right now only some implement it. Not
+ # originally intended to be useful with more than one test, but this should work
+ # if each test uses a uniquely named dir (use the name of the test).
+ keep=:
+ ;;
+ r)
+ remote=:
+ ;;
+ \?)
+ exit_usage
+ ;;
+ esac
+done
+
+# boot the arguments we used above
+while test $OPTIND -gt 1 ; do
+ shift
+ OPTIND=`expr $OPTIND - 1`
+done
# Use full path for CVS executable, so that CVS_SERVER gets set properly
# for remote.
case $1 in
"")
- echo "Usage: `basename $0` [-r] [--keep] CVS-TO-TEST [TESTS-TO-RUN...]" 1>&2
- exit 1
+ exit_usage
;;
/*)
testcvs=$1
@@ -94,9 +93,19 @@ case $1 in
testcvs=`pwd`/$1
;;
esac
-
shift
+
+
+###
+### GUTS
+###
+
+# "debugger"
+#set -x
+
+echo 'This test should produce no other output than this line, and a final "OK".'
+
# Regexp to match what CVS will call itself in output that it prints.
# FIXME: we don't properly quote this--if the name contains . we'll
# just spuriously match a few things; if the name contains other regexp
@@ -108,17 +117,22 @@ PROG=`basename ${testcvs}`
# not allowed in usernames. Other than that I'm not sure.
username="[-a-zA-Z0-9][-a-zA-Z0-9]*"
author="[-a-zA-Z0-9][-a-zA-Z0-9]*"
+hostname="[-_.a-zA-Z0-9]*"
# Regexp to match the name of a temporary file (from cvs_temp_name).
# This appears in certain diff output.
tempname="[-a-zA-Z0-9/.%_]*"
+# Regexp to match a date in RFC822 format (as amended by RFC1123).
+RFCDATE="[a-zA-Z0-9 ][a-zA-Z0-9 ]* [0-9:][0-9:]* -0000"
+RFCDATE_EPOCH="1 Jan 1970 00:00:00 -0000"
+
# On cygwin32, we may not have /bin/sh.
-if [ -r /bin/sh ]; then
+if test -r /bin/sh; then
TESTSHELL="/bin/sh"
else
TESTSHELL=`type -p sh 2>/dev/null`
- if [ ! -r "$TESTSHELL" ]; then
+ if test ! -r "$TESTSHELL"; then
TESTSHELL="/bin/sh"
fi
fi
@@ -141,13 +155,48 @@ if test -f check.log; then
mv check.log check.plog
fi
+# The default value of /tmp/cvs-sanity for TESTDIR is dubious,
+# because it loses if two people/scripts try to run the tests
+# at the same time. Some possible solutions:
+# 1. Use /tmp/cvs-test$$. One disadvantage is that the old
+# cvs-test* directories would pile up, because they wouldn't
+# necessarily get removed.
+# 2. Have everyone/everything running the testsuite set
+# TESTDIR to some appropriate directory.
+# 3. Have the default value of TESTDIR be some variation of
+# `pwd`/cvs-sanity. The biggest problem here is that we have
+# been fairly careful to test that CVS prints in messages the
+# actual pathnames that we pass to it, rather than a different
+# pathname for the same directory, as may come out of `pwd`.
+# So this would be lost if everything was `pwd`-based. I suppose
+# if we wanted to get baroque we could start making symlinks
+# to ensure the two are different.
+tmp=`(cd /tmp; /bin/pwd || pwd) 2>/dev/null`
+
+# Now:
+# 1) Set TESTDIR if it's not set already
+# 2) Remove any old test remnants
+# 3) Create $TESTDIR
+# 4) Normalize TESTDIR with `cd && (/bin/pwd || pwd)`
+# (This will match CVS output later)
+: ${TESTDIR=$tmp/cvs-sanity}
# clean any old remnants (we need the chmod because some tests make
# directories read-only)
if test -d ${TESTDIR}; then
chmod -R a+wx ${TESTDIR}
rm -rf ${TESTDIR}
fi
-mkdir ${TESTDIR}
+# These exits are important. The first time I tried this, if the `mkdir && cd`
+# failed then the build directory would get blown away. Some people probably
+# wouldn't appreciate that.
+mkdir ${TESTDIR} || exit 1
+cd ${TESTDIR} || exit 1
+TESTDIR=`(/bin/pwd || pwd) 2>/dev/null`
+# Ensure $TESTDIR is absolute
+if test -z "${TESTDIR}" || echo "${TESTDIR}" |grep '^[^/]'; then
+ echo "Unable to resolve TESTDIR to an absolute directory." >&2
+ exit 1
+fi
cd ${TESTDIR}
# Make sure various tools work the way we expect, or try to find
@@ -159,17 +208,19 @@ cd ${TESTDIR}
find_tool ()
{
- GLOCS="`echo $PATH | sed 's/:/ /g'` /usr/local/bin /usr/contrib/bin /usr/gnu/bin /local/bin /local/gnu/bin /gun/bin"
+ GLOCS="`echo $PATH | sed 's/:/ /g'` /usr/local/bin /usr/contrib/bin /usr/gnu/bin /local/bin /local/gnu/bin /gnu/bin"
TOOL=""
for path in $GLOCS ; do
if test -x $path/g$1 ; then
- if test "X`$path/g$1 --version`" != "X--version" ; then
+ RES="`$path/g$1 --version </dev/null 2>/dev/null`"
+ if test "X$RES" != "X--version" && test "X$RES" != "X" ; then
TOOL=$path/g$1
break
fi
fi
if test -x $path/$1 ; then
- if test "X`$path/$1 --version`" != "X--version" ; then
+ RES="`$path/$1 --version </dev/null 2>/dev/null`"
+ if test "X$RES" != "X--version" && test "X$RES" != "X" ; then
TOOL=$path/$1
break
fi
@@ -178,30 +229,41 @@ find_tool ()
if test -z "$TOOL"; then
:
else
- echo "Notice: The default version of $1 is defective, using" >&2
- echo "$TOOL instead." >&2
+ echo "Notice: The default version of \`$1' is defective, using" >&2
+ echo "\`$TOOL' instead." >&2
fi
echo "$TOOL"
}
# You can't run CVS as root; print a nice error message here instead
# of somewhere later, after making a mess.
-case "`$ID -u`" in
- "0")
- echo "Test suite does not work correctly when run as root" >&2
- exit 1
- ;;
-
- "")
- ID=`find_tool id`
- if test -z "$ID" ; then
- echo 'Running these tests requires an "id" program that understands the' >&2
- echo '-u and -n flags. Make sure that such an id (GNU, or many but not' >&2
- echo 'all vendor-supplied versions) is in your path.' >&2
+#
+# FIXME - find_tool() finds the 'gid' from GNU id-utils if I pull 'id' out of
+# my path.
+for pass in false :; do
+ case "`$ID -u 2>/dev/null`" in
+ "0")
+ echo "Test suite does not work correctly when run as root" >&2
exit 1
- fi
- ;;
-esac
+ ;;
+
+ "")
+ if $pass; then :; else
+ ID=`find_tool id`
+ fi
+ if $pass || test -z "$ID" ; then
+ echo "Running these tests requires an \`id' program that understands the" >&2
+ echo "-u and -n flags. Make sure that such an id (GNU, or many but not" >&2
+ echo "all vendor-supplied versions) is in your path." >&2
+ exit 1
+ fi
+ ;;
+
+ *)
+ break
+ ;;
+ esac
+done
username=`$ID -un`
if $EXPR "${username}" : "${username}" >/dev/null; then
: good, it works
@@ -269,7 +331,6 @@ if $EXPR "`cat ${TESTDIR}/bar`x" : "`cat ${TESTDIR}/bar`y" >/dev/null; then
else
: good, it works
fi
-rm -f ${TESTDIR}/foo ${TESTDIR}/bar
# That we should have to do this is total bogosity, but GNU expr
# version 1.9.4-1.12 uses the emacs definition of "$" instead of the unix
@@ -299,6 +360,21 @@ else
\)*'
fi
+# Now that we have DOTSTAR, make sure it works with big matches
+if $EXPR "`cat ${TESTDIR}/bar`" : "${DOTSTAR}xyzABC${DOTSTAR}$" >/dev/null; then
+ : good, it works
+else
+ EXPR=`find_tool expr`
+ if test -z "$EXPR" ; then
+ echo 'Warning: you are using a version of expr which does not correctly'
+ echo 'match large patterns. Some tests may spuriously fail.'
+ echo 'You may wish to make sure GNU expr is in your path.'
+ EXPR=expr
+ fi
+fi
+
+rm -f ${TESTDIR}/foo ${TESTDIR}/bar
+
# Work around yet another GNU expr (version 1.10) bug/incompatibility.
# "+" is a special character, yet for unix expr (e.g. SunOS 4.1.3)
# it is not. I doubt that POSIX allows us to use \+ and assume it means
@@ -350,67 +426,45 @@ fail ()
# of the implementation common to the two).
dotest_internal ()
{
+ if $EXPR "`cat ${TESTDIR}/dotest.tmp`" : "$3${ENDANCHOR}" >/dev/null; then
+ # Why, I hear you ask, do we write this to the logfile
+ # even when the test passes? The reason is that the test
+ # may give us the regexp which we were supposed to match,
+ # but sometimes it may be useful to look at the exact
+ # text which was output. For example, suppose one wants
+ # to grep for a particular warning, and make _sure_ that
+ # CVS never hits it (even in cases where the tests might
+ # match it with .*). Or suppose one wants to see the exact
+ # date format output in a certain case (where the test will
+ # surely use a somewhat non-specific pattern).
+ cat ${TESTDIR}/dotest.tmp >>${LOGFILE}
+ pass "$1"
# expr can't distinguish between "zero characters matched" and "no match",
# so special-case it.
- if test -z "$3"; then
- if test -s ${TESTDIR}/dotest.tmp; then
- if test x"$4" != x; then
- # We want to match either the empty string or $4.
- dotest_internal "$1" "$2" "$4"
- else
- echo "** expected: " >>${LOGFILE}
- echo "$3" >>${LOGFILE}
- echo "$3" > ${TESTDIR}/dotest.exp
- rm -f ${TESTDIR}/dotest.ex2
- echo "** got: " >>${LOGFILE}
- cat ${TESTDIR}/dotest.tmp >>${LOGFILE}
- fail "$1"
- fi
- else
- pass "$1"
- fi
- else
- if $EXPR "`cat ${TESTDIR}/dotest.tmp`" : \
- "$3"${ENDANCHOR} >/dev/null; then
- # See below about writing this to the logfile.
+ elif test -z "$3" && test ! -s ${TESTDIR}/dotest.tmp; then
+ pass "$1"
+ elif test x"$4" != x; then
+ if $EXPR "`cat ${TESTDIR}/dotest.tmp`" : "$4${ENDANCHOR}" >/dev/null; then
cat ${TESTDIR}/dotest.tmp >>${LOGFILE}
pass "$1"
else
- if test x"$4" != x; then
- if $EXPR "`cat ${TESTDIR}/dotest.tmp`" : \
- "$4"${ENDANCHOR} >/dev/null; then
- # Why, I hear you ask, do we write this to the logfile
- # even when the test passes? The reason is that the test
- # may give us the regexp which we were supposed to match,
- # but sometimes it may be useful to look at the exact
- # text which was output. For example, suppose one wants
- # to grep for a particular warning, and make _sure_ that
- # CVS never hits it (even in cases where the tests might
- # match it with .*). Or suppose one wants to see the exact
- # date format output in a certain case (where the test will
- # surely use a somewhat non-specific pattern).
- cat ${TESTDIR}/dotest.tmp >>${LOGFILE}
- pass "$1"
- else
- echo "** expected: " >>${LOGFILE}
- echo "$3" >>${LOGFILE}
- echo "$3" > ${TESTDIR}/dotest.ex1
- echo "** or: " >>${LOGFILE}
- echo "$4" >>${LOGFILE}
- echo "$4" > ${TESTDIR}/dotest.ex2
- echo "** got: " >>${LOGFILE}
- cat ${TESTDIR}/dotest.tmp >>${LOGFILE}
- fail "$1"
- fi
- else
- echo "** expected: " >>${LOGFILE}
- echo "$3" >>${LOGFILE}
- echo "$3" > ${TESTDIR}/dotest.exp
- echo "** got: " >>${LOGFILE}
- cat ${TESTDIR}/dotest.tmp >>${LOGFILE}
- fail "$1"
- fi
+ echo "** expected: " >>${LOGFILE}
+ echo "$3" >>${LOGFILE}
+ echo "$3" > ${TESTDIR}/dotest.ex1
+ echo "** or: " >>${LOGFILE}
+ echo "$4" >>${LOGFILE}
+ echo "$4" > ${TESTDIR}/dotest.ex2
+ echo "** got: " >>${LOGFILE}
+ cat ${TESTDIR}/dotest.tmp >>${LOGFILE}
+ fail "$1"
fi
+ else
+ echo "** expected: " >>${LOGFILE}
+ echo "$3" >>${LOGFILE}
+ echo "$3" > ${TESTDIR}/dotest.exp
+ echo "** got: " >>${LOGFILE}
+ cat ${TESTDIR}/dotest.tmp >>${LOGFILE}
+ fail "$1"
fi
}
@@ -432,6 +486,9 @@ dotest_line_by_line ()
if $EXPR "`sed -n ${line}p ${TESTDIR}/dotest.tmp`" : \
"`sed -n ${line}p ${TESTDIR}/dotest.exp`" >/dev/null; then
:
+ elif test -z "`sed -n ${line}p ${TESTDIR}/dotest.tmp`" &&
+ test -z "`sed -n ${line}p ${TESTDIR}/dotest.exp`"; then
+ :
else
echo "Line $line:" >> ${LOGFILE}
echo "**** expected: " >>${LOGFILE}
@@ -512,10 +569,9 @@ dotest_internal_debug ()
dotest ()
{
rm -f ${TESTDIR}/dotest.ex? 2>&1
- if eval "$2" >${TESTDIR}/dotest.tmp 2>&1; then
- : so far so good
- else
- status=$?
+ eval "$2" >${TESTDIR}/dotest.tmp 2>&1
+ status=$?
+ if test "$status" != 0; then
cat ${TESTDIR}/dotest.tmp >>${LOGFILE}
echo "exit status was $status" >>${LOGFILE}
fail "$1"
@@ -527,10 +583,9 @@ dotest ()
dotest_lit ()
{
rm -f ${TESTDIR}/dotest.ex? 2>&1
- if eval "$2" >${TESTDIR}/dotest.tmp 2>&1; then
- : so far so good
- else
- status=$?
+ eval "$2" >${TESTDIR}/dotest.tmp 2>&1
+ status=$?
+ if test "$status" != 0; then
cat ${TESTDIR}/dotest.tmp >>${LOGFILE}
echo "exit status was $status" >>${LOGFILE}
fail "$1"
@@ -551,15 +606,13 @@ dotest_lit ()
dotest_fail ()
{
rm -f ${TESTDIR}/dotest.ex? 2>&1
- if eval "$2" >${TESTDIR}/dotest.tmp 2>&1; then
- status=$?
+ eval "$2" >${TESTDIR}/dotest.tmp 2>&1
+ status=$?
+ if test "$status" = 0; then
cat ${TESTDIR}/dotest.tmp >>${LOGFILE}
echo "exit status was $status" >>${LOGFILE}
fail "$1"
- else
- : so far so good
- fi 2>${TESTDIR}/dotest.tmp1
- cat ${TESTDIR}/dotest.tmp1 >>${TESTDIR}/dotest.tmp
+ fi
dotest_internal "$@"
}
@@ -568,9 +621,7 @@ dotest_status ()
{
eval "$3" >${TESTDIR}/dotest.tmp 2>&1
status=$?
- if test "$status" = "$2"; then
- : so far so good
- else
+ if test "$status" != "$2"; then
cat ${TESTDIR}/dotest.tmp >>${LOGFILE}
echo "exit status was $status; expected $2" >>${LOGFILE}
fail "$1"
@@ -582,10 +633,9 @@ dotest_status ()
dotest_sort ()
{
rm -f ${TESTDIR}/dotest.ex? 2>&1
- if eval "$2" >${TESTDIR}/dotest.tmp1 2>&1; then
- : so far so good
- else
- status=$?
+ eval "$2" >${TESTDIR}/dotest.tmp1 2>&1
+ status=$?
+ if test "$status" != 0; then
cat ${TESTDIR}/dotest.tmp1 >>${LOGFILE}
echo "exit status was $status" >>${LOGFILE}
fail "$1"
@@ -594,21 +644,6 @@ dotest_sort ()
dotest_internal "$@"
}
-# This will show up in cvs history output where it prints the working
-# directory. It should *not* appear in any cvs output referring to the
-# repository; cvs should use the name of the repository as specified.
-#
-# Note that using pwd here rather than /bin/pwd will make it even less
-# likely that we test whether CVS is distinguishing between TMPPWD
-# and TESTDIR. However, there is no guarantee that will test it anyway.
-# If we really care, we should do something along the lines of:
-# cd /tmp/cvs-sanity # In reality, overridable with environment variable?
-# mkdir realdir
-# ln -s realdir testdir
-# TESTDIR=/tmp/cvs-sanity/testdir
-# TMPPWD=/tmp/cvs-sanity/realdir
-TMPPWD=`pwd`
-
# Avoid picking up any stray .cvsrc, etc., from the user running the tests
mkdir home
HOME=${TESTDIR}/home; export HOME
@@ -627,14 +662,15 @@ RCSINIT=; export RCSINIT
if test x"$*" = x; then
# Basic/miscellaneous functionality
- tests="basica basicb basicc basic1 deep basic2"
+ tests="version basica basicb basicc basic1 deep basic2"
tests="${tests} files spacefiles commit-readonly"
# Branching, tagging, removing, adding, multiple directories
- tests="${tests} rdiff diff death death2 rmadd rmadd2 dirs dirs2"
- tests="${tests} branches branches2 tagc tagf"
+ tests="${tests} rdiff diff death death2 rm-update-message rmadd rmadd2"
+ tests="${tests} dirs dirs2 branches branches2 tagc tagf"
tests="${tests} rcslib multibranch import importb importc"
tests="${tests} import-after-initial"
- tests="${tests} join join2 join3 join-readonly-conflict join-admin"
+ tests="${tests} join join2 join3 join-readonly-conflict"
+ tests="${tests} join-admin join-admin-2"
tests="${tests} new newb conflicts conflicts2 conflicts3"
tests="${tests} clean"
# Checking out various places (modules, checkout -d, &c)
@@ -642,11 +678,11 @@ if test x"$*" = x; then
tests="${tests} mkmodules-temp-file-removal"
tests="${tests} cvsadm emptydir abspath toplevel toplevel2"
# Log messages, error messages.
- tests="${tests} mflag editor errmsg1 errmsg2"
+ tests="${tests} mflag editor errmsg1 errmsg2 adderrmsg"
# Watches, binary files, history browsing, &c.
tests="${tests} devcom devcom2 devcom3 watch4 watch5"
tests="${tests} unedit-without-baserev"
- tests="${tests} ignore binfiles binfiles2 binfiles3"
+ tests="${tests} ignore ignore-on-branch binfiles binfiles2 binfiles3"
tests="${tests} mcopy binwrap binwrap2"
tests="${tests} binwrap3 mwrap info taginfo config"
tests="${tests} serverpatch log log2 logopt ann ann-id"
@@ -670,21 +706,20 @@ if test x"$*" = x; then
# Multiple root directories and low-level protocol tests.
tests="${tests} multiroot multiroot2 multiroot3 multiroot4"
tests="${tests} rmroot reposmv pserver server server2 client"
+ tests="${tests} fork"
else
tests="$*"
fi
# a simple function to compare directory contents
#
-# Returns: {nothing}
-# Side Effects: ISDIFF := true|false
+# Returns: 0 for same, 1 for different
#
directory_cmp ()
{
OLDPWD=`pwd`
DIR_1=$1
DIR_2=$2
- ISDIFF=false
cd $DIR_1
find . -print | fgrep -v /CVS | sort > /tmp/dc$$d1
@@ -698,8 +733,7 @@ directory_cmp ()
then
:
else
- ISDIFF=true
- return
+ return 1
fi
cd $OLDPWD
while read a
@@ -707,17 +741,821 @@ directory_cmp ()
if test -f $DIR_1/"$a" ; then
cmp -s $DIR_1/"$a" $DIR_2/"$a"
if test $? -ne 0 ; then
- ISDIFF=true
+ return 1
fi
fi
done < /tmp/dc$$d1
rm -f /tmp/dc$$*
+ return 0
+}
+
+
+
+#
+# The following 4 functions are used by the diffmerge1 test case. They set up,
+# respectively, the four versions of the files necessary:
+#
+# 1. Ancestor revisions.
+# 2. "Your" changes.
+# 3. "My" changes.
+# 4. Expected merge result.
+#
+
+# Create ancestor revisions for diffmerge1
+diffmerge_create_older_files() {
+ # This test case was supplied by Noah Friedman:
+ cat >testcase01 <<EOF
+// Button.java
+
+package random.application;
+
+import random.util.*;
+
+public class Button
+{
+ /* Instantiates a Button with origin (0, 0) and zero width and height.
+ * You must call an initializer method to properly initialize the Button.
+ */
+ public Button ()
+ {
+ super ();
+
+ _titleColor = Color.black;
+ _disabledTitleColor = Color.gray;
+ _titleFont = Font.defaultFont ();
+ }
+
+ /* Convenience constructor for instantiating a Button with
+ * bounds x, y, width, and height. Equivalent to
+ * foo = new Button ();
+ * foo.init (x, y, width, height);
+ */
+ public Button (int x, int y, int width, int height)
+ {
+ this ();
+ init (x, y, width, height);
+ }
+}
+EOF
+
+ # This test case was supplied by Jacob Burckhardt:
+ cat >testcase02 <<EOF
+a
+a
+a
+a
+a
+EOF
+
+ # This test case was supplied by Karl Tomlinson who also wrote the
+ # patch which lets CVS correctly handle this and several other cases:
+ cat >testcase03 <<EOF
+x
+s
+a
+b
+s
+y
+EOF
+
+ # This test case was supplied by Karl Tomlinson:
+ cat >testcase04 <<EOF
+s
+x
+m
+m
+x
+s
+v
+s
+x
+m
+m
+x
+s
+EOF
+
+ # This test case was supplied by Karl Tomlinson:
+ cat >testcase05 <<EOF
+s
+x
+m
+m
+x
+x
+x
+x
+x
+x
+x
+x
+x
+x
+s
+s
+s
+s
+s
+s
+s
+s
+s
+s
+v
+EOF
+
+ # This test case was supplied by Jacob Burckhardt:
+ cat >testcase06 <<EOF
+g
+
+
+
+
+
+
+
+
+
+
+
+i
+EOF
+
+ # This test is supposed to verify that the horizon lines are the same
+ # for both 2-way diffs, but unfortunately, it does not fail with the
+ # old version of cvs. However, Karl Tomlinson still thought it would
+ # be good to test it anyway:
+ cat >testcase07 <<EOF
+h
+f
+
+
+
+
+
+
+
+
+
+g
+r
+
+
+
+i
+
+
+
+
+
+
+
+
+
+
+i
+EOF
+
+ # This test case was supplied by Jacob Burckhardt:
+ cat >testcase08 <<EOF
+Both changes move this line to the end of the file.
+
+no
+changes
+here
+
+First change will delete this line.
+
+First change will also delete this line.
+
+ no
+ changes
+ here
+
+Second change will change it here.
+
+ no
+ changes
+ here
+EOF
+
+ # This test case was supplied by Jacob Burckhardt. Note that I do not
+ # think cvs has ever failed with this case, but I include it anyway,
+ # since I think it is a hard case. It is hard because Peter Miller's
+ # fmerge utility fails on it:
+ cat >testcase09 <<EOF
+m
+a
+{
+}
+b
+{
+}
+EOF
+
+ # This test case was supplied by Martin Dorey and simplified by Jacob
+ # Burckhardt:
+ cat >testcase10 <<EOF
+
+ petRpY ( MtatRk );
+ fV ( MtatRk != Zy ) UDTXUK_DUUZU ( BGKT_ZFDK_qjT_HGTG );
+
+ MtatRk = MQfr_GttpfIRte_MtpeaL ( &acI, jfle_Uecopd_KRLIep * jfle_Uecopd_MfJe_fY_nEtek );
+ OjZy MtatRk = Uead_GttpfIRte_MtpeaL ( &acI, jfle_Uecopd_MfJe_fY_nEtek, nRVVep );
+
+ Bloke_GttpfIRte_MtpeaL ( &acI );
+MTGTXM Uead_Ktz_qjT_jfle_Uecopd ( fYt Y, uofd *nRVVep )
+{
+ fV ( Y < 16 )
+ {
+ petRpY ( Uead_Mectopk ( noot_Uecopd.qVtHatabcY0 * noot_Uecopd.MectopkFepBlRktep +
+ Y * jfle_Uecopd_MfJe_fY_Mectopk,
+ jfle_Uecopd_MfJe_fY_Mectopk,
+ nRVVep ) );
+ }
+ elke
+ {
+ petRpY ( Uead_Mectopk ( noot_Uecopd.qVtqfppHatabcY0 * noot_Uecopd.MectopkFepBlRktep +
+ ( Y - 16 ) * jfle_Uecopd_MfJe_fY_Mectopk,
+ jfle_Uecopd_MfJe_fY_Mectopk,
+ nRVVep ) );
+ }
+
+}
+
+
+/****************************************************************************
+* *
+* Uead Mectopk ( Uelatfue to tze cRppeYt raptftfoY ) *
+* *
+****************************************************************************/
+
+MTGTXM Uead_Mectopk ( RfYt64 Mtapt_Mectop, RfYt64 KRL_Mectopk, uofd *nRVVep )
+{
+MTGTXM MtatRk = Zy;
+
+ MtatRk = Uead_HfkQ ( FaptftfoY_TaIle.Uelatfue_Mectop + Mtapt_Mectop, KRL_Mectopk, nRVVep );
+
+ petRpY ( MtatRk );
+
+}
+ HfkQipfte ( waYdle, /* waYdle */
+ waYdleFok, /* ZVVket VpoL ktapt oV dfkQ */
+ (coYkt RfYt8*) nRVVep, /* nRVVep */
+ 0, /* MRrepVlRoRk KfxoYfkL */
+ beYgtz /* nEtek to Apfte */
+ );
+
+ petRpY ( Zy );
+}
+EOF
+}
+
+# Create "your" revisions for diffmerge1
+diffmerge_create_your_files() {
+ # remove the Button() method
+ cat >testcase01 <<\EOF
+// Button.java
+
+package random.application;
+
+import random.util.*;
+
+public class Button
+{
+ /* Instantiates a Button with origin (0, 0) and zero width and height.
+ * You must call an initializer method to properly initialize the Button.
+ */
+ public Button ()
+ {
+ super ();
+
+ _titleColor = Color.black;
+ _disabledTitleColor = Color.gray;
+ _titleFont = Font.defaultFont ();
+ }
+}
+EOF
+
+ cat >testcase02 <<\EOF
+y
+a
+a
+a
+a
+EOF
+
+ cat >testcase03 <<\EOF
+x
+s
+a
+b
+s
+b
+s
+y
+EOF
+
+ cat >testcase04 <<\EOF
+s
+m
+s
+v
+s
+m
+s
+EOF
+
+ cat >testcase05 <<\EOF
+v
+s
+m
+s
+s
+s
+s
+s
+s
+s
+s
+s
+s
+v
+EOF
+
+ # Test case 6 and test case 7 both use the same input files, but they
+ # order the input files differently. In one case, a certain file is
+ # used as the older file, but in the other test case, that same file
+ # is used as the file which has changes. I could have put echo
+ # commands here, but since the echo lines would be the same as those
+ # in the previous function, I decided to save space and avoid repeating
+ # several lines of code. Instead, I merely swap the files:
+ mv testcase07 tmp
+ mv testcase06 testcase07
+ mv tmp testcase06
+
+ # Make the date newer so that cvs thinks that the files are changed:
+ touch testcase06 testcase07
+
+ cat >testcase08 <<\EOF
+no
+changes
+here
+
+First change has now added this in.
+
+ no
+ changes
+ here
+
+Second change will change it here.
+
+ no
+ changes
+ here
+
+Both changes move this line to the end of the file.
+EOF
+
+ cat >testcase09 <<\EOF
+
+m
+a
+{
+}
+b
+{
+}
+c
+{
+}
+EOF
+
+ cat >testcase10 <<\EOF
+
+ fV ( BzQkV_URYYfYg ) (*jfle_Uecopdk)[0].jfle_Uecopd_KRLIep = ZpfgfYal_jUK;
+
+ petRpY ( MtatRk );
+ fV ( MtatRk != Zy ) UDTXUK_DUUZU ( BGKT_ZFDK_qjT_HGTG );
+
+ fV ( jfle_Uecopd_KRLIep < 16 )
+ {
+ MtatRk = Uead_Ktz_qjT_jfle_Uecopd ( jfle_Uecopd_KRLIep, (uofd*)nRVVep );
+ }
+ elke
+ {
+ MtatRk = ZreY_GttpfIRte_MtpeaL ( qjT_jfle_Uecopdk, qjT_jfle_Uecopd_BoRYt, HGTG_TvFD, KXbb, KXbb, &acI );
+ fV ( MtatRk != Zy ) UDTXUK_DUUZU ( BGKT_ZFDK_qjT_HGTG );
+
+ MtatRk = MQfr_GttpfIRte_MtpeaL ( &acI, jfle_Uecopd_KRLIep * jfle_Uecopd_MfJe_fY_nEtek );
+ OjZy MtatRk = Uead_GttpfIRte_MtpeaL ( &acI, jfle_Uecopd_MfJe_fY_nEtek, nRVVep );
+
+ Bloke_GttpfIRte_MtpeaL ( &acI );
+MTGTXM Uead_Ktz_qjT_jfle_Uecopd ( fYt Y, uofd *nRVVep )
+{
+MTGTXM MtatRk = Zy;
+
+ fV ( Y < 16 )
+ {
+ petRpY ( Uead_Mectopk ( noot_Uecopd.qVtHatabcY0 * noot_Uecopd.MectopkFepBlRktep +
+ Y * jfle_Uecopd_MfJe_fY_Mectopk,
+ jfle_Uecopd_MfJe_fY_Mectopk,
+ nRVVep ) );
+ }
+ elke
+ {
+ petRpY ( Uead_Mectopk ( noot_Uecopd.qVtqfppHatabcY0 * noot_Uecopd.MectopkFepBlRktep +
+ ( Y - 16 ) * jfle_Uecopd_MfJe_fY_Mectopk,
+ jfle_Uecopd_MfJe_fY_Mectopk,
+ nRVVep ) );
+ }
+
+ petRpY ( MtatRk );
+
+}
+
+
+/****************************************************************************
+* *
+* Uead Mectopk ( Uelatfue to tze cRppeYt raptftfoY ) *
+* *
+****************************************************************************/
+
+MTGTXM Uead_Mectopk ( RfYt64 Mtapt_Mectop, RfYt64 KRL_Mectopk, uofd *nRVVep )
+{
+MTGTXM MtatRk = Zy;
+
+ MtatRk = Uead_HfkQ ( FaptftfoY_TaIle.Uelatfue_Mectop + Mtapt_Mectop, KRL_Mectopk, nRVVep );
+
+ petRpY ( MtatRk );
+
+}
+ HfkQipfte ( waYdle, /* waYdle */
+ waYdleFok, /* ZVVket VpoL ktapt oV dfkQ */
+ (coYkt RfYt8*) nRVVep, /* nRVVep */
+ 0, /* MRrepVlRoRk KfxoYfkL */
+ beYgtz /* nEtek to Apfte */
+ );
+
+ petRpY ( Zy );
+}
+
+EOF
+}
+
+# Create "my" revisions for diffmerge1
+diffmerge_create_my_files() {
+ # My working copy still has the Button() method, but I
+ # comment out some code at the top of the class.
+ cat >testcase01 <<\EOF
+// Button.java
+
+package random.application;
+
+import random.util.*;
+
+public class Button
+{
+ /* Instantiates a Button with origin (0, 0) and zero width and height.
+ * You must call an initializer method to properly initialize the Button.
+ */
+ public Button ()
+ {
+ super ();
+
+ // _titleColor = Color.black;
+ // _disabledTitleColor = Color.gray;
+ // _titleFont = Font.defaultFont ();
+ }
+
+ /* Convenience constructor for instantiating a Button with
+ * bounds x, y, width, and height. Equivalent to
+ * foo = new Button ();
+ * foo.init (x, y, width, height);
+ */
+ public Button (int x, int y, int width, int height)
+ {
+ this ();
+ init (x, y, width, height);
+ }
+}
+EOF
+
+ cat >testcase02 <<\EOF
+a
+a
+a
+a
+m
+EOF
+
+ cat >testcase03 <<\EOF
+x
+s
+c
+s
+b
+s
+y
+EOF
+
+ cat >testcase04 <<\EOF
+v
+s
+x
+m
+m
+x
+s
+v
+s
+x
+m
+m
+x
+s
+v
+EOF
+
+ # Note that in test case 5, there are no changes in the "mine"
+ # section, which explains why there is no command here which writes to
+ # file testcase05.
+
+ # no changes for testcase06
+
+ # The two branches make the same changes:
+ cp ../yours/testcase07 .
+
+ cat >testcase08 <<\EOF
+no
+changes
+here
+
+First change will delete this line.
+
+First change will also delete this line.
+
+ no
+ changes
+ here
+
+Second change has now changed it here.
+
+ no
+ changes
+ here
+
+Both changes move this line to the end of the file.
+EOF
+
+ cat >testcase09 <<\EOF
+m
+a
+{
+}
+b
+{
+}
+c
+{
+}
+EOF
+
+ cat >testcase10 <<\EOF
+
+ petRpY ( MtatRk );
+ fV ( MtatRk != Zy ) UDTXUK_DUUZU ( BGKT_ZFDK_qjT_HGTG );
+
+ MtatRk = MQfr_GttpfIRte_MtpeaL ( &acI, jfle_Uecopd_KRLIep * jfle_Uecopd_MfJe_fY_nEtek );
+ OjZy MtatRk = Uead_GttpfIRte_MtpeaL ( &acI, jfle_Uecopd_MfJe_fY_nEtek, nRVVep );
+
+ Bloke_GttpfIRte_MtpeaL ( &acI );
+MTGTXM Uead_Ktz_qjT_jfle_Uecopd ( fYt Y, uofd *nRVVep )
+{
+ fV ( Y < 16 )
+ {
+ petRpY ( Uead_Mectopk ( noot_Uecopd.qVtHatabcY0 * noot_Uecopd.MectopkFepBlRktep +
+ Y * jfle_Uecopd_MfJe_fY_Mectopk,
+ jfle_Uecopd_MfJe_fY_Mectopk,
+ nRVVep ) );
+ }
+ elke
+ {
+ petRpY ( Uead_Mectopk ( noot_Uecopd.qVtqfppHatabcY0 * noot_Uecopd.MectopkFepBlRktep +
+ ( Y - 16 ) * jfle_Uecopd_MfJe_fY_Mectopk,
+ jfle_Uecopd_MfJe_fY_Mectopk,
+ nRVVep ) );
+ }
+
+}
+
+
+/****************************************************************************
+* *
+* Uead Mectopk ( Uelatfue to tze cRppeYt raptftfoY ) *
+* *
+****************************************************************************/
+
+MTGTXM Uead_Mectopk ( RfYt64 Mtapt_Mectop, RfYt64 KRL_Mectopk, uofd *nRVVep )
+{
+MTGTXM MtatRk = Zy;
+
+ MtatRk = Uead_HfkQ ( FaptftfoY_TaIle.Uelatfue_Mectop + Mtapt_Mectop, KRL_Mectopk, nRVVep );
+
+ petRpY ( MtatRk );
+
+}
+ HfkQipfte ( waYdle, /* waYdle */
+ waYdleFok, /* ZVVket VpoL ktapt oV dfkQ */
+ (coYkt RfYt8*) nRVVep, /* nRVVep */
+ beYgtz /* nEtek to Apfte */
+ );
+
+ petRpY ( Zy );
+}
+
+EOF
+}
+
+# Create expected results of merge for diffmerge1
+diffmerge_create_expected_files() {
+ cat >testcase01 <<\EOF
+// Button.java
+
+package random.application;
+
+import random.util.*;
+
+public class Button
+{
+ /* Instantiates a Button with origin (0, 0) and zero width and height.
+ * You must call an initializer method to properly initialize the Button.
+ */
+ public Button ()
+ {
+ super ();
+
+ // _titleColor = Color.black;
+ // _disabledTitleColor = Color.gray;
+ // _titleFont = Font.defaultFont ();
+ }
+}
+EOF
+
+ cat >testcase02 <<\EOF
+y
+a
+a
+a
+m
+EOF
+
+ cat >testcase03 <<\EOF
+x
+s
+c
+s
+b
+s
+b
+s
+y
+EOF
+
+ cat >testcase04 <<\EOF
+v
+s
+m
+s
+v
+s
+m
+s
+v
+EOF
+
+ # Since there are no changes in the "mine" section, just take exactly
+ # the version in the "yours" section:
+ cp ../yours/testcase05 .
+
+ cp ../yours/testcase06 .
+
+ # Since the two branches make the same changes, the result should be
+ # the same as both branches. Here, I happen to pick yours to copy from,
+ # but I could have also picked mine, since the source of the copy is
+ # the same in either case. However, the mine has already been
+ # altered by the update command, so don't use it. Instead, use the
+ # yours section which has not had an update on it and so is unchanged:
+ cp ../yours/testcase07 .
+
+ cat >testcase08 <<\EOF
+no
+changes
+here
+
+First change has now added this in.
+
+ no
+ changes
+ here
+
+Second change has now changed it here.
+
+ no
+ changes
+ here
+
+Both changes move this line to the end of the file.
+EOF
+
+ cat >testcase09 <<\EOF
+
+m
+a
+{
+}
+b
+{
+}
+c
+{
+}
+EOF
+
+ cat >testcase10 <<\EOF
+
+ fV ( BzQkV_URYYfYg ) (*jfle_Uecopdk)[0].jfle_Uecopd_KRLIep = ZpfgfYal_jUK;
+
+ petRpY ( MtatRk );
+ fV ( MtatRk != Zy ) UDTXUK_DUUZU ( BGKT_ZFDK_qjT_HGTG );
+
+ fV ( jfle_Uecopd_KRLIep < 16 )
+ {
+ MtatRk = Uead_Ktz_qjT_jfle_Uecopd ( jfle_Uecopd_KRLIep, (uofd*)nRVVep );
+ }
+ elke
+ {
+ MtatRk = ZreY_GttpfIRte_MtpeaL ( qjT_jfle_Uecopdk, qjT_jfle_Uecopd_BoRYt, HGTG_TvFD, KXbb, KXbb, &acI );
+ fV ( MtatRk != Zy ) UDTXUK_DUUZU ( BGKT_ZFDK_qjT_HGTG );
+
+ MtatRk = MQfr_GttpfIRte_MtpeaL ( &acI, jfle_Uecopd_KRLIep * jfle_Uecopd_MfJe_fY_nEtek );
+ OjZy MtatRk = Uead_GttpfIRte_MtpeaL ( &acI, jfle_Uecopd_MfJe_fY_nEtek, nRVVep );
+
+ Bloke_GttpfIRte_MtpeaL ( &acI );
+MTGTXM Uead_Ktz_qjT_jfle_Uecopd ( fYt Y, uofd *nRVVep )
+{
+MTGTXM MtatRk = Zy;
+
+ fV ( Y < 16 )
+ {
+ petRpY ( Uead_Mectopk ( noot_Uecopd.qVtHatabcY0 * noot_Uecopd.MectopkFepBlRktep +
+ Y * jfle_Uecopd_MfJe_fY_Mectopk,
+ jfle_Uecopd_MfJe_fY_Mectopk,
+ nRVVep ) );
+ }
+ elke
+ {
+ petRpY ( Uead_Mectopk ( noot_Uecopd.qVtqfppHatabcY0 * noot_Uecopd.MectopkFepBlRktep +
+ ( Y - 16 ) * jfle_Uecopd_MfJe_fY_Mectopk,
+ jfle_Uecopd_MfJe_fY_Mectopk,
+ nRVVep ) );
+ }
+
+ petRpY ( MtatRk );
+
+}
+
+
+/****************************************************************************
+* *
+* Uead Mectopk ( Uelatfue to tze cRppeYt raptftfoY ) *
+* *
+****************************************************************************/
+
+MTGTXM Uead_Mectopk ( RfYt64 Mtapt_Mectop, RfYt64 KRL_Mectopk, uofd *nRVVep )
+{
+MTGTXM MtatRk = Zy;
+
+ MtatRk = Uead_HfkQ ( FaptftfoY_TaIle.Uelatfue_Mectop + Mtapt_Mectop, KRL_Mectopk, nRVVep );
+
+ petRpY ( MtatRk );
+
+}
+ HfkQipfte ( waYdle, /* waYdle */
+ waYdleFok, /* ZVVket VpoL ktapt oV dfkQ */
+ (coYkt RfYt8*) nRVVep, /* nRVVep */
+ beYgtz /* nEtek to Apfte */
+ );
+
+ petRpY ( Zy );
+}
+
+EOF
}
# Set up CVSROOT (the crerepos tests will test operating without CVSROOT set).
CVSROOT_DIRNAME=${TESTDIR}/cvsroot
-CVSROOT=${CVSROOT_DIRNAME} ; export CVSROOT
-if test "x$remote" = xyes; then
+if $remote; then
# Currently we test :fork: and :ext: (see crerepos test).
# Testing :pserver: would be hard (inetd issues).
# Also :ext: and :fork support CVS_SERVER in a convenient way.
@@ -726,6 +1564,8 @@ if test "x$remote" = xyes; then
# difference in modes-15 (see comments there).
CVSROOT=:fork:${CVSROOT_DIRNAME} ; export CVSROOT
CVS_SERVER=${testcvs}; export CVS_SERVER
+else
+ CVSROOT=${CVSROOT_DIRNAME} ; export CVSROOT
fi
dotest 1 "${testcvs} init" ''
@@ -733,7 +1573,40 @@ dotest 1a "${testcvs} init" ''
### The big loop
for what in $tests; do
+ if test -n "$fromtest" ; then
+ if test $fromtest = $what ; then
+ unset fromtest
+ else
+ continue
+ fi
+ fi
case $what in
+
+ version)
+ # We've had cases where the version command started dumping core,
+ # so we might as well test it
+ dotest version-1 "${testcvs} --version" \
+'
+Concurrent Versions System (CVS) [0-9.]*.*
+
+Copyright (c) [-0-9]* Brian Berliner, david d .zoo. zuhn,
+ Jeff Polk, and other authors
+
+CVS may be copied only under the terms of the GNU General Public License,
+a copy of which can be found with the CVS distribution kit.
+
+Specify the --help option for further information about CVS'
+
+ if $remote; then
+ dotest version-2r "${testcvs} version" \
+'Client: Concurrent Versions System (CVS) [0-9.]* (client/server)
+Server: Concurrent Versions System (CVS) [0-9.]* (client/server)'
+ else
+ dotest version-2 "${testcvs} version" \
+'Concurrent Versions System (CVS) [0-9.]*.*'
+ fi
+ ;;
+
basica)
# Similar in spirit to some of the basic1, and basic2
# tests, but hopefully a lot faster. Also tests operating on
@@ -748,7 +1621,7 @@ for what in $tests; do
dotest basica-0a "${testcvs} -q co -l ." ''
mkdir first-dir
dotest basica-0b "${testcvs} add first-dir" \
-"Directory ${TESTDIR}/cvsroot/first-dir added to the repository"
+"Directory ${CVSROOT_DIRNAME}/first-dir added to the repository"
cd ..
rm -r 1
@@ -765,17 +1638,17 @@ for what in $tests; do
# Remote CVS gives the "cannot open CVS/Entries" error, which is
# clearly a bug, but not a simple one to fix.
dotest basica-1a10 "${testcvs} -n add sdir" \
-"Directory ${TESTDIR}/cvsroot/first-dir/sdir added to the repository" \
+"Directory ${CVSROOT_DIRNAME}/first-dir/sdir added to the repository" \
"${PROG} add: cannot open CVS/Entries for reading: No such file or directory
-Directory ${TESTDIR}/cvsroot/first-dir/sdir added to the repository"
+Directory ${CVSROOT_DIRNAME}/first-dir/sdir added to the repository"
dotest_fail basica-1a11 \
"test -d ${CVSROOT_DIRNAME}/first-dir/sdir" ''
dotest basica-2 "${testcvs} add sdir" \
-"Directory ${TESTDIR}/cvsroot/first-dir/sdir added to the repository"
+"Directory ${CVSROOT_DIRNAME}/first-dir/sdir added to the repository"
cd sdir
mkdir ssdir
dotest basica-3 "${testcvs} add ssdir" \
-"Directory ${TESTDIR}/cvsroot/first-dir/sdir/ssdir added to the repository"
+"Directory ${CVSROOT_DIRNAME}/first-dir/sdir/ssdir added to the repository"
cd ssdir
echo ssfile >ssfile
@@ -797,16 +1670,16 @@ ${PROG}"' \[[a-z]* aborted\]: correct above errors first!' \
${PROG} "'\[[a-z]* aborted\]: correct the above errors first!'
cd ../..
dotest basica-5 "${testcvs} -q ci -m add-it" \
-"RCS file: ${TESTDIR}/cvsroot/first-dir/sdir/ssdir/ssfile,v
+"RCS file: ${CVSROOT_DIRNAME}/first-dir/sdir/ssdir/ssfile,v
done
Checking in sdir/ssdir/ssfile;
-${TESTDIR}/cvsroot/first-dir/sdir/ssdir/ssfile,v <-- ssfile
+${CVSROOT_DIRNAME}/first-dir/sdir/ssdir/ssfile,v <-- ssfile
initial revision: 1\.1
done"
dotest_fail basica-5a \
"${testcvs} -q tag BASE sdir/ssdir/ssfile" \
"${PROG} [a-z]*: Attempt to add reserved tag name BASE
-${PROG} \[[a-z]* aborted\]: failed to set tag BASE to revision 1\.1 in ${TESTDIR}/cvsroot/first-dir/sdir/ssdir/ssfile,v"
+${PROG} \[[a-z]* aborted\]: failed to set tag BASE to revision 1\.1 in ${CVSROOT_DIRNAME}/first-dir/sdir/ssdir/ssfile,v"
dotest basica-5b "${testcvs} -q tag NOT_RESERVED" \
'T sdir/ssdir/ssfile'
@@ -815,11 +1688,11 @@ ${PROG} \[[a-z]* aborted\]: failed to set tag BASE to revision 1\.1 in ${TESTDIR
dotest_status basica-6.2 1 "${testcvs} -q diff -c" \
"Index: sdir/ssdir/ssfile
===================================================================
-RCS file: ${TESTDIR}/cvsroot/first-dir/sdir/ssdir/ssfile,v
+RCS file: ${CVSROOT_DIRNAME}/first-dir/sdir/ssdir/ssfile,v
retrieving revision 1\.1
diff -c -r1\.1 ssfile
-\*\*\* sdir/ssdir/ssfile [0-9/]* [0-9:]* 1\.1
---- sdir/ssdir/ssfile [0-9/]* [0-9:]*
+\*\*\* sdir/ssdir/ssfile ${RFCDATE} 1\.1
+--- sdir/ssdir/ssfile ${RFCDATE}
\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*
\*\*\* 1 \*\*\*\*
--- 1,2 ----
@@ -828,11 +1701,11 @@ ${PLUS} ssfile line 2"
dotest_status basica-6.3 1 "${testcvs} -q diff -c -rBASE" \
"Index: sdir/ssdir/ssfile
===================================================================
-RCS file: ${TESTDIR}/cvsroot/first-dir/sdir/ssdir/ssfile,v
+RCS file: ${CVSROOT_DIRNAME}/first-dir/sdir/ssdir/ssfile,v
retrieving revision 1\.1
diff -c -r1\.1 ssfile
-\*\*\* sdir/ssdir/ssfile [0-9/]* [0-9:]* 1\.1
---- sdir/ssdir/ssfile [0-9/]* [0-9:]*
+\*\*\* sdir/ssdir/ssfile ${RFCDATE} 1\.1
+--- sdir/ssdir/ssfile ${RFCDATE}
\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*
\*\*\* 1 \*\*\*\*
--- 1,2 ----
@@ -840,7 +1713,7 @@ diff -c -r1\.1 ssfile
${PLUS} ssfile line 2"
dotest basica-7 "${testcvs} -q ci -m modify-it" \
"Checking in sdir/ssdir/ssfile;
-${TESTDIR}/cvsroot/first-dir/sdir/ssdir/ssfile,v <-- ssfile
+${CVSROOT_DIRNAME}/first-dir/sdir/ssdir/ssfile,v <-- ssfile
new revision: 1\.2; previous revision: 1\.1
done"
dotest_fail basica-nonexist "${testcvs} -q ci nonexist" \
@@ -853,31 +1726,31 @@ done"
dotest basica-8a0 "${testcvs} -q ci -m not-modified ssfile" ''
dotest basica-8a "${testcvs} -q ci -f -m force-it" \
"Checking in ssfile;
-${TESTDIR}/cvsroot/first-dir/sdir/ssdir/ssfile,v <-- ssfile
+${CVSROOT_DIRNAME}/first-dir/sdir/ssdir/ssfile,v <-- ssfile
new revision: 1\.3; previous revision: 1\.2
done"
dotest basica-8a1 "${testcvs} -q ci -m bump-it -r 2.0" \
"Checking in ssfile;
-${TESTDIR}/cvsroot/first-dir/sdir/ssdir/ssfile,v <-- ssfile
+${CVSROOT_DIRNAME}/first-dir/sdir/ssdir/ssfile,v <-- ssfile
new revision: 2\.0; previous revision: 1\.3
done"
# -f should not be necessary, but it should be harmless.
# Also test the "-r 3" (rather than "-r 3.0") usage.
dotest basica-8a2 "${testcvs} -q ci -m bump-it -f -r 3" \
"Checking in ssfile;
-${TESTDIR}/cvsroot/first-dir/sdir/ssdir/ssfile,v <-- ssfile
+${CVSROOT_DIRNAME}/first-dir/sdir/ssdir/ssfile,v <-- ssfile
new revision: 3\.1; previous revision: 2\.0
done"
# Test using -r to create a branch
dotest_fail basica-8a3 "${testcvs} -q ci -m bogus -r 3.0.0" \
"Checking in ssfile;
-${TESTDIR}/cvsroot/first-dir/sdir/ssdir/ssfile,v <-- ssfile
-${PROG} [a-z]*: ${TESTDIR}/cvsroot/first-dir/sdir/ssdir/ssfile,v: can't find branch point 3\.0
+${CVSROOT_DIRNAME}/first-dir/sdir/ssdir/ssfile,v <-- ssfile
+${PROG} [a-z]*: ${CVSROOT_DIRNAME}/first-dir/sdir/ssdir/ssfile,v: can't find branch point 3\.0
${PROG} [a-z]*: could not check in ssfile"
dotest basica-8a4 "${testcvs} -q ci -m valid -r 3.1.2" \
"Checking in ssfile;
-${TESTDIR}/cvsroot/first-dir/sdir/ssdir/ssfile,v <-- ssfile
+${CVSROOT_DIRNAME}/first-dir/sdir/ssdir/ssfile,v <-- ssfile
new revision: 3\.1\.2\.1; previous revision: 3\.1
done"
# now get rid of the sticky tag and go back to the trunk
@@ -887,7 +1760,7 @@ done"
dotest basica-8b "${testcvs} -q diff -r1.2 -r1.3" \
"Index: sdir/ssdir/ssfile
===================================================================
-RCS file: ${TESTDIR}/cvsroot/first-dir/sdir/ssdir/ssfile,v
+RCS file: ${CVSROOT_DIRNAME}/first-dir/sdir/ssdir/ssfile,v
retrieving revision 1\.2
retrieving revision 1\.3
diff -r1\.2 -r1\.3"
@@ -895,7 +1768,7 @@ diff -r1\.2 -r1\.3"
dotest_fail basica-8b1 "${testcvs} -q diff -r1.2 -r1.3 -C 3isacrowd" \
"Index: sdir/ssdir/ssfile
===================================================================
-RCS file: ${TESTDIR}/cvsroot/first-dir/sdir/ssdir/ssfile,v
+RCS file: ${CVSROOT_DIRNAME}/first-dir/sdir/ssdir/ssfile,v
retrieving revision 1\.2
retrieving revision 1\.3
diff -C3isacrowd -r1\.2 -r1\.3
@@ -916,6 +1789,27 @@ ${PROG} [a-z]*: invalid context length argument"
1\.1 .'"${username}"' *[0-9a-zA-Z-]*.: ssfile
1\.2 .'"${username}"' *[0-9a-zA-Z-]*.: ssfile line 2'
+ # Test resurrecting with strange revision numbers
+ cd sdir/ssdir
+ dotest basica-r1 "${testcvs} rm -f ssfile" \
+"${PROG} [a-z]*: scheduling .ssfile. for removal
+${PROG} [a-z]*: use .${PROG} commit. to remove this file permanently"
+ dotest basica-r2 "${testcvs} -q ci -m remove" \
+"Removing ssfile;
+${CVSROOT_DIRNAME}/first-dir/sdir/ssdir/ssfile,v <-- ssfile
+new revision: delete; previous revision: 3\.1
+done"
+ dotest basica-r3 "${testcvs} -q up -p -r 3.1 ssfile >ssfile" ""
+ dotest basica-r4 "${testcvs} add ssfile" \
+"${PROG} [a-z]*: re-adding file ssfile (in place of dead revision 3\.2)
+${PROG} [a-z]*: use .${PROG} commit. to add this file permanently"
+ dotest basica-r5 "${testcvs} -q ci -m resurrect" \
+"Checking in ssfile;
+${CVSROOT_DIRNAME}/first-dir/sdir/ssdir/ssfile,v <-- ssfile
+new revision: 3\.3; previous revision: 3\.2
+done"
+ cd ../..
+
# As long as we have a file with a few revisions, test
# a few "cvs admin -o" invocations.
cd sdir/ssdir
@@ -923,40 +1817,42 @@ ${PROG} [a-z]*: invalid context length argument"
"${PROG} [a-z]*: while processing more than one file:
${PROG} \[[a-z]* aborted\]: attempt to specify a numeric revision"
dotest basica-o2 "${testcvs} admin -o 1.2::1.2 ssfile" \
-"RCS file: ${TESTDIR}/cvsroot/first-dir/sdir/ssdir/ssfile,v
+"RCS file: ${CVSROOT_DIRNAME}/first-dir/sdir/ssdir/ssfile,v
done"
dotest basica-o2a "${testcvs} admin -o 1.1::NOT_RESERVED ssfile" \
-"RCS file: ${TESTDIR}/cvsroot/first-dir/sdir/ssdir/ssfile,v
+"RCS file: ${CVSROOT_DIRNAME}/first-dir/sdir/ssdir/ssfile,v
done"
dotest_fail basica-o2b "${testcvs} admin -o 1.1::NOT_EXIST ssfile" \
-"RCS file: ${TESTDIR}/cvsroot/first-dir/sdir/ssdir/ssfile,v
-${PROG} [a-z]*: ${TESTDIR}/cvsroot/first-dir/sdir/ssdir/ssfile,v: Revision NOT_EXIST doesn't exist.
-${PROG} [a-z]*: cannot modify RCS file for .ssfile."
+"RCS file: ${CVSROOT_DIRNAME}/first-dir/sdir/ssdir/ssfile,v
+${PROG} [a-z]*: ${CVSROOT_DIRNAME}/first-dir/sdir/ssdir/ssfile,v: Revision NOT_EXIST doesn't exist.
+${PROG} [a-z]*: RCS file for .ssfile. not modified\."
dotest basica-o3 "${testcvs} admin -o 1.2::1.3 ssfile" \
-"RCS file: ${TESTDIR}/cvsroot/first-dir/sdir/ssdir/ssfile,v
+"RCS file: ${CVSROOT_DIRNAME}/first-dir/sdir/ssdir/ssfile,v
done"
dotest basica-o4 "${testcvs} admin -o 3.1:: ssfile" \
-"RCS file: ${TESTDIR}/cvsroot/first-dir/sdir/ssdir/ssfile,v
+"RCS file: ${CVSROOT_DIRNAME}/first-dir/sdir/ssdir/ssfile,v
+deleting revision 3\.3
+deleting revision 3\.2
done"
dotest basica-o5 "${testcvs} admin -o ::1.1 ssfile" \
-"RCS file: ${TESTDIR}/cvsroot/first-dir/sdir/ssdir/ssfile,v
+"RCS file: ${CVSROOT_DIRNAME}/first-dir/sdir/ssdir/ssfile,v
done"
dotest basica-o5a "${testcvs} -n admin -o 1.2::3.1 ssfile" \
-"RCS file: ${TESTDIR}/cvsroot/first-dir/sdir/ssdir/ssfile,v
+"RCS file: ${CVSROOT_DIRNAME}/first-dir/sdir/ssdir/ssfile,v
deleting revision 2\.0
deleting revision 1\.3
done"
dotest basica-o6 "${testcvs} admin -o 1.2::3.1 ssfile" \
-"RCS file: ${TESTDIR}/cvsroot/first-dir/sdir/ssdir/ssfile,v
+"RCS file: ${CVSROOT_DIRNAME}/first-dir/sdir/ssdir/ssfile,v
deleting revision 2\.0
deleting revision 1\.3
done"
dotest basica-o6a "${testcvs} admin -o 3.1.2: ssfile" \
-"RCS file: ${TESTDIR}/cvsroot/first-dir/sdir/ssdir/ssfile,v
+"RCS file: ${CVSROOT_DIRNAME}/first-dir/sdir/ssdir/ssfile,v
deleting revision 3\.1\.2\.1
done"
dotest basica-o7 "${testcvs} log -N ssfile" "
-RCS file: ${TESTDIR}/cvsroot/first-dir/sdir/ssdir/ssfile,v
+RCS file: ${CVSROOT_DIRNAME}/first-dir/sdir/ssdir/ssfile,v
Working file: ssfile
head: 3\.1
branch:
@@ -996,10 +1892,10 @@ add-it
"${PROG} [a-z]*: scheduling file .topfile. for addition
${PROG} [a-z]*: use .${PROG} commit. to add this file permanently"
dotest basicb-0c "${testcvs} -q ci -m add-it topfile" \
-"RCS file: ${TESTDIR}/cvsroot/topfile,v
+"RCS file: ${CVSROOT_DIRNAME}/topfile,v
done
Checking in topfile;
-${TESTDIR}/cvsroot/topfile,v <-- topfile
+${CVSROOT_DIRNAME}/topfile,v <-- topfile
initial revision: 1\.1
done"
cd ..
@@ -1015,7 +1911,7 @@ done"
dotest basicb-0d0 "${testcvs} -q co -l ." ""
mkdir first-dir
dotest basicb-0e "${testcvs} add first-dir" \
-"Directory ${TESTDIR}/cvsroot/first-dir added to the repository"
+"Directory ${CVSROOT_DIRNAME}/first-dir added to the repository"
cd ..
rm -r 2
@@ -1032,10 +1928,10 @@ done"
# (we're using relative paths).
: dotest basicb-1b "cat CVS/Repository" \
-"${TESTDIR}/cvsroot/\." \
+"${CVSROOT_DIRNAME}/\." \
"\."
dotest basicb-1c "cat first-dir/CVS/Repository" \
-"${TESTDIR}/cvsroot/first-dir" \
+"${CVSROOT_DIRNAME}/first-dir" \
"first-dir"
cd first-dir
@@ -1044,8 +1940,8 @@ done"
# special only when it is directly in $CVSROOT/CVSROOT.
mkdir Emptydir sdir2
dotest basicb-2 "${testcvs} add Emptydir sdir2" \
-"Directory ${TESTDIR}/cvsroot/first-dir/Emptydir added to the repository
-Directory ${TESTDIR}/cvsroot/first-dir/sdir2 added to the repository"
+"Directory ${CVSROOT_DIRNAME}/first-dir/Emptydir added to the repository
+Directory ${CVSROOT_DIRNAME}/first-dir/sdir2 added to the repository"
cd Emptydir
echo sfile1 starts >sfile1
dotest basicb-2a10 "${testcvs} -n add sfile1" \
@@ -1081,22 +1977,22 @@ ${PROG} [a-z]*: use .${PROG} commit. to add this file permanently"
${PROG} [a-z]*: but CVS uses CVS for its own purposes; skipping CVS directory"
cd ..
dotest basicb-5 "${testcvs} -q ci -m add" \
-"RCS file: ${TESTDIR}/cvsroot/first-dir/Emptydir/sfile1,v
+"RCS file: ${CVSROOT_DIRNAME}/first-dir/Emptydir/sfile1,v
done
Checking in Emptydir/sfile1;
-${TESTDIR}/cvsroot/first-dir/Emptydir/sfile1,v <-- sfile1
+${CVSROOT_DIRNAME}/first-dir/Emptydir/sfile1,v <-- sfile1
initial revision: 1\.1
done
-RCS file: ${TESTDIR}/cvsroot/first-dir/sdir2/sfile2,v
+RCS file: ${CVSROOT_DIRNAME}/first-dir/sdir2/sfile2,v
done
Checking in sdir2/sfile2;
-${TESTDIR}/cvsroot/first-dir/sdir2/sfile2,v <-- sfile2
+${CVSROOT_DIRNAME}/first-dir/sdir2/sfile2,v <-- sfile2
initial revision: 1\.1
done"
echo sfile1 develops >Emptydir/sfile1
dotest basicb-6 "${testcvs} -q ci -m modify" \
"Checking in Emptydir/sfile1;
-${TESTDIR}/cvsroot/first-dir/Emptydir/sfile1,v <-- sfile1
+${CVSROOT_DIRNAME}/first-dir/Emptydir/sfile1,v <-- sfile1
new revision: 1\.2; previous revision: 1\.1
done"
dotest basicb-7 "${testcvs} -q tag release-1" 'T Emptydir/sfile1
@@ -1104,7 +2000,7 @@ T sdir2/sfile2'
echo not in time for release-1 >sdir2/sfile2
dotest basicb-8 "${testcvs} -q ci -m modify-2" \
"Checking in sdir2/sfile2;
-${TESTDIR}/cvsroot/first-dir/sdir2/sfile2,v <-- sfile2
+${CVSROOT_DIRNAME}/first-dir/sdir2/sfile2,v <-- sfile2
new revision: 1\.2; previous revision: 1\.1
done"
# See if CVS can correctly notice when an invalid numeric
@@ -1146,19 +2042,19 @@ U newdir/first-dir/sdir2/sfile2'
# is defined (we're using relative paths).
: dotest basicb-9b "cat CVS/Repository" \
-"${TESTDIR}/cvsroot/\." \
+"${CVSROOT_DIRNAME}/\." \
"\."
dotest basicb-9c "cat newdir/CVS/Repository" \
-"${TESTDIR}/cvsroot/\." \
+"${CVSROOT_DIRNAME}/\." \
"\."
dotest basicb-9d "cat newdir/first-dir/CVS/Repository" \
-"${TESTDIR}/cvsroot/first-dir" \
+"${CVSROOT_DIRNAME}/first-dir" \
"first-dir"
dotest basicb-9e "cat newdir/first-dir/Emptydir/CVS/Repository" \
-"${TESTDIR}/cvsroot/first-dir/Emptydir" \
+"${CVSROOT_DIRNAME}/first-dir/Emptydir" \
"first-dir/Emptydir"
dotest basicb-9f "cat newdir/first-dir/sdir2/CVS/Repository" \
-"${TESTDIR}/cvsroot/first-dir/sdir2" \
+"${CVSROOT_DIRNAME}/first-dir/sdir2" \
"first-dir/sdir2"
dotest basicb-10 "cat newdir/first-dir/Emptydir/sfile1 newdir/first-dir/sdir2/sfile2" \
@@ -1188,24 +2084,24 @@ U sub1/sub2/sdir2/sfile2"
dotest basicb-14 "${testcvs} -q co -l ." 'U topfile'
mkdir second-dir
dotest basicb-15 "${testcvs} add second-dir" \
-"Directory ${TESTDIR}/cvsroot/second-dir added to the repository"
+"Directory ${CVSROOT_DIRNAME}/second-dir added to the repository"
cd second-dir
touch aa
dotest basicb-16 "${testcvs} add aa" \
"${PROG} [a-z]*: scheduling file .aa. for addition
${PROG} [a-z]*: use .${PROG} commit. to add this file permanently"
dotest basicb-17 "${testcvs} -q ci -m add" \
-"RCS file: ${TESTDIR}/cvsroot/second-dir/aa,v
+"RCS file: ${CVSROOT_DIRNAME}/second-dir/aa,v
done
Checking in aa;
-${TESTDIR}/cvsroot/second-dir/aa,v <-- aa
+${CVSROOT_DIRNAME}/second-dir/aa,v <-- aa
initial revision: 1\.1
done"
cd ..
# Try to remove all revisions in a file.
dotest_fail basicb-o1 "${testcvs} admin -o1.1 topfile" \
-"RCS file: ${TESTDIR}/cvsroot/topfile,v
+"RCS file: ${CVSROOT_DIRNAME}/topfile,v
deleting revision 1\.1
${PROG} \[[a-z]* aborted\]: attempt to delete all revisions"
dotest basicb-o2 "${testcvs} -q update -d first-dir" \
@@ -1213,7 +2109,7 @@ ${PROG} \[[a-z]* aborted\]: attempt to delete all revisions"
U first-dir/sdir2/sfile2"
dotest_fail basicb-o3 \
"${testcvs} admin -o1.1:1.2 first-dir/sdir2/sfile2" \
-"RCS file: ${TESTDIR}/cvsroot/first-dir/sdir2/sfile2,v
+"RCS file: ${CVSROOT_DIRNAME}/first-dir/sdir2/sfile2,v
deleting revision 1\.2
deleting revision 1\.1
${PROG} \[[a-z]* aborted\]: attempt to delete all revisions"
@@ -1234,7 +2130,7 @@ ${PROG} \[admin aborted\]: specify ${PROG} -H admin for usage information"
cd ..
rmdir 1
- if test "$keep" = yes; then
+ if $keep; then
echo Keeping ${TESTDIR} and exiting due to --keep
exit 0
fi
@@ -1253,8 +2149,8 @@ ${PROG} \[[a-z]* aborted\]: there is no version here; run .${PROG} checkout. fir
dotest basicc-2 "${testcvs} -q co -l ." ''
mkdir first-dir second-dir
dotest basicc-3 "${testcvs} add first-dir second-dir" \
-"Directory ${TESTDIR}/cvsroot/first-dir added to the repository
-Directory ${TESTDIR}/cvsroot/second-dir added to the repository"
+"Directory ${CVSROOT_DIRNAME}/first-dir added to the repository
+Directory ${CVSROOT_DIRNAME}/second-dir added to the repository"
# Old versions of CVS often didn't create this top-level CVS
# directory in the first place. I think that maybe the only
# way to get it to work currently is to let CVS create it,
@@ -1311,7 +2207,7 @@ ${PROG} [a-z]*: Updating second-dir"
basic1)
# first dive - add a files, first singly, then in a group.
mkdir ${CVSROOT_DIRNAME}/first-dir
- mkdir 1; cd 1
+ mkdir basic1; cd basic1
# check out an empty directory
dotest basic1-1 "${testcvs} -q co first-dir" ''
@@ -1444,28 +2340,28 @@ A first-dir/file5"
cd first-dir
dotest basic1-14-add-ci \
"${testcvs} commit -m test file2 file3 file4 file5" \
-"RCS file: ${TESTDIR}/cvsroot/first-dir/file2,v
+"RCS file: ${CVSROOT_DIRNAME}/first-dir/file2,v
done
Checking in file2;
-${TESTDIR}/cvsroot/first-dir/file2,v <-- file2
+${CVSROOT_DIRNAME}/first-dir/file2,v <-- file2
initial revision: 1\.1
done
-RCS file: ${TESTDIR}/cvsroot/first-dir/file3,v
+RCS file: ${CVSROOT_DIRNAME}/first-dir/file3,v
done
Checking in file3;
-${TESTDIR}/cvsroot/first-dir/file3,v <-- file3
+${CVSROOT_DIRNAME}/first-dir/file3,v <-- file3
initial revision: 1\.1
done
-RCS file: ${TESTDIR}/cvsroot/first-dir/file4,v
+RCS file: ${CVSROOT_DIRNAME}/first-dir/file4,v
done
Checking in file4;
-${TESTDIR}/cvsroot/first-dir/file4,v <-- file4
+${CVSROOT_DIRNAME}/first-dir/file4,v <-- file4
initial revision: 1\.1
done
-RCS file: ${TESTDIR}/cvsroot/first-dir/file5,v
+RCS file: ${CVSROOT_DIRNAME}/first-dir/file5,v
done
Checking in file5;
-${TESTDIR}/cvsroot/first-dir/file5,v <-- file5
+${CVSROOT_DIRNAME}/first-dir/file5,v <-- file5
initial revision: 1\.1
done"
dotest basic1-15-add-ci \
@@ -1476,7 +2372,7 @@ done"
File: file2 Status: Up-to-date
Working revision: 1\.1.*
- Repository revision: 1\.1 ${TESTDIR}/cvsroot/first-dir/file2,v
+ Repository revision: 1\.1 ${CVSROOT_DIRNAME}/first-dir/file2,v
Sticky Tag: (none)
Sticky Date: (none)
Sticky Options: (none)
@@ -1485,7 +2381,7 @@ File: file2 Status: Up-to-date
File: file3 Status: Up-to-date
Working revision: 1\.1.*
- Repository revision: 1\.1 ${TESTDIR}/cvsroot/first-dir/file3,v
+ Repository revision: 1\.1 ${CVSROOT_DIRNAME}/first-dir/file3,v
Sticky Tag: (none)
Sticky Date: (none)
Sticky Options: (none)
@@ -1494,7 +2390,7 @@ File: file3 Status: Up-to-date
File: file4 Status: Up-to-date
Working revision: 1\.1.*
- Repository revision: 1\.1 ${TESTDIR}/cvsroot/first-dir/file4,v
+ Repository revision: 1\.1 ${CVSROOT_DIRNAME}/first-dir/file4,v
Sticky Tag: (none)
Sticky Date: (none)
Sticky Options: (none)
@@ -1503,7 +2399,7 @@ File: file4 Status: Up-to-date
File: file5 Status: Up-to-date
Working revision: 1\.1.*
- Repository revision: 1\.1 ${TESTDIR}/cvsroot/first-dir/file5,v
+ Repository revision: 1\.1 ${CVSROOT_DIRNAME}/first-dir/file5,v
Sticky Tag: (none)
Sticky Date: (none)
Sticky Options: (none)"
@@ -1561,7 +2457,7 @@ R file5"
File: no file file2 Status: Locally Removed
Working revision: -1\.1.*
- Repository revision: 1\.1 ${TESTDIR}/cvsroot/first-dir/file2,v
+ Repository revision: 1\.1 ${CVSROOT_DIRNAME}/first-dir/file2,v
Sticky Tag: (none)
Sticky Date: (none)
Sticky Options: (none)
@@ -1570,7 +2466,7 @@ File: no file file2 Status: Locally Removed
File: no file file3 Status: Locally Removed
Working revision: -1\.1.*
- Repository revision: 1\.1 ${TESTDIR}/cvsroot/first-dir/file3,v
+ Repository revision: 1\.1 ${CVSROOT_DIRNAME}/first-dir/file3,v
Sticky Tag: (none)
Sticky Date: (none)
Sticky Options: (none)
@@ -1579,7 +2475,7 @@ File: no file file3 Status: Locally Removed
File: no file file4 Status: Locally Removed
Working revision: -1\.1.*
- Repository revision: 1\.1 ${TESTDIR}/cvsroot/first-dir/file4,v
+ Repository revision: 1\.1 ${CVSROOT_DIRNAME}/first-dir/file4,v
Sticky Tag: (none)
Sticky Date: (none)
Sticky Options: (none)
@@ -1588,7 +2484,7 @@ File: no file file4 Status: Locally Removed
File: no file file5 Status: Locally Removed
Working revision: -1\.1.*
- Repository revision: 1\.1 ${TESTDIR}/cvsroot/first-dir/file5,v
+ Repository revision: 1\.1 ${CVSROOT_DIRNAME}/first-dir/file5,v
Sticky Tag: (none)
Sticky Date: (none)
Sticky Options: (none)"
@@ -1628,19 +2524,19 @@ R first-dir/file5"
cd first-dir
dotest basic1-14-rm-ci "${testcvs} -q commit -m test" \
"Removing file2;
-${TESTDIR}/cvsroot/first-dir/file2,v <-- file2
+${CVSROOT_DIRNAME}/first-dir/file2,v <-- file2
new revision: delete; previous revision: 1\.1
done
Removing file3;
-${TESTDIR}/cvsroot/first-dir/file3,v <-- file3
+${CVSROOT_DIRNAME}/first-dir/file3,v <-- file3
new revision: delete; previous revision: 1\.1
done
Removing file4;
-${TESTDIR}/cvsroot/first-dir/file4,v <-- file4
+${CVSROOT_DIRNAME}/first-dir/file4,v <-- file4
new revision: delete; previous revision: 1\.1
done
Removing file5;
-${TESTDIR}/cvsroot/first-dir/file5,v <-- file5
+${CVSROOT_DIRNAME}/first-dir/file5,v <-- file5
new revision: delete; previous revision: 1\.1
done"
dotest basic1-15-rm-ci \
@@ -1674,12 +2570,12 @@ done"
cd ..
cd ..
- if test "$keep" = yes; then
+ if $keep; then
echo Keeping ${TESTDIR} and exiting due to --keep
exit 0
fi
- rm -r 1
+ rm -r basic1
rm -rf ${CVSROOT_DIRNAME}/first-dir
;;
@@ -1691,7 +2587,7 @@ done"
for i in dir1 dir2 dir3 dir4 dir5 dir6 dir7 dir8; do
mkdir $i
dotest deep-2-$i "${testcvs} add $i" \
-"Directory ${TESTDIR}/cvsroot/first-dir/dir1[/dir0-9]* added to the repository"
+"Directory ${CVSROOT_DIRNAME}/first-dir/dir1[/dir0-9]* added to the repository"
cd $i
echo file1 >file1
dotest deep-3-$i "${testcvs} add file1" \
@@ -1700,52 +2596,52 @@ done"
done
cd ../../../../../../../../..
dotest_lit deep-4 "${testcvs} -q ci -m add-them first-dir" <<HERE
-RCS file: ${TESTDIR}/cvsroot/first-dir/dir1/file1,v
+RCS file: ${CVSROOT_DIRNAME}/first-dir/dir1/file1,v
done
Checking in first-dir/dir1/file1;
-${TESTDIR}/cvsroot/first-dir/dir1/file1,v <-- file1
+${CVSROOT_DIRNAME}/first-dir/dir1/file1,v <-- file1
initial revision: 1.1
done
-RCS file: ${TESTDIR}/cvsroot/first-dir/dir1/dir2/file1,v
+RCS file: ${CVSROOT_DIRNAME}/first-dir/dir1/dir2/file1,v
done
Checking in first-dir/dir1/dir2/file1;
-${TESTDIR}/cvsroot/first-dir/dir1/dir2/file1,v <-- file1
+${CVSROOT_DIRNAME}/first-dir/dir1/dir2/file1,v <-- file1
initial revision: 1.1
done
-RCS file: ${TESTDIR}/cvsroot/first-dir/dir1/dir2/dir3/file1,v
+RCS file: ${CVSROOT_DIRNAME}/first-dir/dir1/dir2/dir3/file1,v
done
Checking in first-dir/dir1/dir2/dir3/file1;
-${TESTDIR}/cvsroot/first-dir/dir1/dir2/dir3/file1,v <-- file1
+${CVSROOT_DIRNAME}/first-dir/dir1/dir2/dir3/file1,v <-- file1
initial revision: 1.1
done
-RCS file: ${TESTDIR}/cvsroot/first-dir/dir1/dir2/dir3/dir4/file1,v
+RCS file: ${CVSROOT_DIRNAME}/first-dir/dir1/dir2/dir3/dir4/file1,v
done
Checking in first-dir/dir1/dir2/dir3/dir4/file1;
-${TESTDIR}/cvsroot/first-dir/dir1/dir2/dir3/dir4/file1,v <-- file1
+${CVSROOT_DIRNAME}/first-dir/dir1/dir2/dir3/dir4/file1,v <-- file1
initial revision: 1.1
done
-RCS file: ${TESTDIR}/cvsroot/first-dir/dir1/dir2/dir3/dir4/dir5/file1,v
+RCS file: ${CVSROOT_DIRNAME}/first-dir/dir1/dir2/dir3/dir4/dir5/file1,v
done
Checking in first-dir/dir1/dir2/dir3/dir4/dir5/file1;
-${TESTDIR}/cvsroot/first-dir/dir1/dir2/dir3/dir4/dir5/file1,v <-- file1
+${CVSROOT_DIRNAME}/first-dir/dir1/dir2/dir3/dir4/dir5/file1,v <-- file1
initial revision: 1.1
done
-RCS file: ${TESTDIR}/cvsroot/first-dir/dir1/dir2/dir3/dir4/dir5/dir6/file1,v
+RCS file: ${CVSROOT_DIRNAME}/first-dir/dir1/dir2/dir3/dir4/dir5/dir6/file1,v
done
Checking in first-dir/dir1/dir2/dir3/dir4/dir5/dir6/file1;
-${TESTDIR}/cvsroot/first-dir/dir1/dir2/dir3/dir4/dir5/dir6/file1,v <-- file1
+${CVSROOT_DIRNAME}/first-dir/dir1/dir2/dir3/dir4/dir5/dir6/file1,v <-- file1
initial revision: 1.1
done
-RCS file: ${TESTDIR}/cvsroot/first-dir/dir1/dir2/dir3/dir4/dir5/dir6/dir7/file1,v
+RCS file: ${CVSROOT_DIRNAME}/first-dir/dir1/dir2/dir3/dir4/dir5/dir6/dir7/file1,v
done
Checking in first-dir/dir1/dir2/dir3/dir4/dir5/dir6/dir7/file1;
-${TESTDIR}/cvsroot/first-dir/dir1/dir2/dir3/dir4/dir5/dir6/dir7/file1,v <-- file1
+${CVSROOT_DIRNAME}/first-dir/dir1/dir2/dir3/dir4/dir5/dir6/dir7/file1,v <-- file1
initial revision: 1.1
done
-RCS file: ${TESTDIR}/cvsroot/first-dir/dir1/dir2/dir3/dir4/dir5/dir6/dir7/dir8/file1,v
+RCS file: ${CVSROOT_DIRNAME}/first-dir/dir1/dir2/dir3/dir4/dir5/dir6/dir7/dir8/file1,v
done
Checking in first-dir/dir1/dir2/dir3/dir4/dir5/dir6/dir7/dir8/file1;
-${TESTDIR}/cvsroot/first-dir/dir1/dir2/dir3/dir4/dir5/dir6/dir7/dir8/file1,v <-- file1
+${CVSROOT_DIRNAME}/first-dir/dir1/dir2/dir3/dir4/dir5/dir6/dir7/dir8/file1,v <-- file1
initial revision: 1.1
done
HERE
@@ -1756,7 +2652,7 @@ HERE
"${PROG} [a-z]*: scheduling .file1. for removal
${PROG} [a-z]*: use .${PROG} commit. to remove this file permanently"
dotest deep-4a1 "${testcvs} -q ci -m rm-it" "Removing file1;
-${TESTDIR}/cvsroot/first-dir/dir1/dir2/dir3/dir4/dir5/dir6/dir7/dir8/file1,v <-- file1
+${CVSROOT_DIRNAME}/first-dir/dir1/dir2/dir3/dir4/dir5/dir6/dir7/dir8/file1,v <-- file1
new revision: delete; previous revision: 1\.1
done"
cd ../../..
@@ -1789,7 +2685,7 @@ ${PROG} [a-z]*: use .${PROG} commit. to remove this file permanently"
dotest deep-rm2 "${testcvs} -q update -d -P" 'R dir7/file1'
dotest deep-rm3 "test -d dir7" ''
dotest deep-rm4 "${testcvs} -q ci -m rm-it" "Removing dir7/file1;
-${TESTDIR}/cvsroot/first-dir/dir1/dir2/dir3/dir4/dir5/dir6/dir7/file1,v <-- file1
+${CVSROOT_DIRNAME}/first-dir/dir1/dir2/dir3/dir4/dir5/dir6/dir7/file1,v <-- file1
new revision: delete; previous revision: 1\.1
done"
dotest deep-rm5 "${testcvs} -q update -d -P" ''
@@ -1805,11 +2701,11 @@ ${PROG} [a-z]*: scheduling .dir5/dir6/file1. for removal
${PROG} [a-z]*: use .${PROG} commit. to remove these files permanently"
dotest deep-rm8 "${testcvs} -q ci -m rm-it" \
"Removing dir5/file1;
-${TESTDIR}/cvsroot/first-dir/dir1/dir2/dir3/dir4/dir5/file1,v <-- file1
+${CVSROOT_DIRNAME}/first-dir/dir1/dir2/dir3/dir4/dir5/file1,v <-- file1
new revision: delete; previous revision: 1\.1
done
Removing dir5/dir6/file1;
-${TESTDIR}/cvsroot/first-dir/dir1/dir2/dir3/dir4/dir5/dir6/file1,v <-- file1
+${CVSROOT_DIRNAME}/first-dir/dir1/dir2/dir3/dir4/dir5/dir6/file1,v <-- file1
new revision: delete; previous revision: 1\.1
done"
dotest deep-rm9 "${testcvs} -q update -d -P" ''
@@ -1844,11 +2740,8 @@ done"
for i in first-dir dir1 dir2 ; do
if test ! -d $i ; then
mkdir $i
- if ${CVS} add $i >> ${LOGFILE}; then
- pass 29-$i
- else
- fail 29-$i
- fi
+ dotest basic2-2-$i "${testcvs} add $i" \
+"Directory ${CVSROOT_DIRNAME}/.*/$i added to the repository"
fi
cd $i
@@ -1857,31 +2750,93 @@ done"
echo $j > $j
done
- if ${CVS} add file6 file7 2>> ${LOGFILE}; then
- pass 30-$i-$j
- else
- fail 30-$i-$j
- fi
+ dotest basic2-3-$i "${testcvs} add file6 file7" \
+"${PROG} [a-z]*: scheduling file .file6. for addition
+${PROG} [a-z]*: scheduling file .file7. for addition
+${PROG} [a-z]*: use .${PROG} commit. to add these files permanently"
+
done
cd ../../..
- if ${CVS} update first-dir ; then
- pass 31
- else
- fail 31
- fi
+ dotest basic2-4 "${testcvs} update first-dir" \
+"${PROG} [a-z]*: Updating first-dir
+A first-dir/file6
+A first-dir/file7
+${PROG} [a-z]*: Updating first-dir/dir1
+A first-dir/dir1/file6
+A first-dir/dir1/file7
+${PROG} [a-z]*: Updating first-dir/dir1/dir2
+A first-dir/dir1/dir2/file6
+A first-dir/dir1/dir2/file7"
# fixme: doesn't work right for added files.
- if ${CVS} log first-dir >> ${LOGFILE}; then
- pass 32
- else
- fail 32
- fi
+ dotest basic2-5 "${testcvs} log first-dir" \
+"${PROG} [a-z]*: Logging first-dir
+${PROG} [a-z]*: file6 has been added, but not committed
+${PROG} [a-z]*: file7 has been added, but not committed
+${PROG} [a-z]*: Logging first-dir/dir1
+${PROG} [a-z]*: file6 has been added, but not committed
+${PROG} [a-z]*: file7 has been added, but not committed
+${PROG} [a-z]*: Logging first-dir/dir1/dir2
+${PROG} [a-z]*: file6 has been added, but not committed
+${PROG} [a-z]*: file7 has been added, but not committed"
+
+ dotest basic2-6 "${testcvs} status first-dir" \
+"${PROG} [a-z]*: Examining first-dir
+===================================================================
+File: file6 Status: Locally Added
- if ${CVS} status first-dir >> ${LOGFILE}; then
- pass 33
- else
- fail 33
- fi
+ Working revision: New file!
+ Repository revision: No revision control file
+ Sticky Tag: (none)
+ Sticky Date: (none)
+ Sticky Options: (none)
+
+===================================================================
+File: file7 Status: Locally Added
+
+ Working revision: New file!
+ Repository revision: No revision control file
+ Sticky Tag: (none)
+ Sticky Date: (none)
+ Sticky Options: (none)
+
+${PROG} [a-z]*: Examining first-dir/dir1
+===================================================================
+File: file6 Status: Locally Added
+
+ Working revision: New file!
+ Repository revision: No revision control file
+ Sticky Tag: (none)
+ Sticky Date: (none)
+ Sticky Options: (none)
+
+===================================================================
+File: file7 Status: Locally Added
+
+ Working revision: New file!
+ Repository revision: No revision control file
+ Sticky Tag: (none)
+ Sticky Date: (none)
+ Sticky Options: (none)
+
+${PROG} [a-z]*: Examining first-dir/dir1/dir2
+===================================================================
+File: file6 Status: Locally Added
+
+ Working revision: New file!
+ Repository revision: No revision control file
+ Sticky Tag: (none)
+ Sticky Date: (none)
+ Sticky Options: (none)
+
+===================================================================
+File: file7 Status: Locally Added
+
+ Working revision: New file!
+ Repository revision: No revision control file
+ Sticky Tag: (none)
+ Sticky Date: (none)
+ Sticky Options: (none)"
# XXX why is this commented out???
# if ${CVS} diff -u first-dir >> ${LOGFILE} || test $? = 1 ; then
@@ -1890,17 +2845,54 @@ done"
# fail 34
# fi
- if ${CVS} ci -m "second dive" first-dir >> ${LOGFILE} 2>&1; then
- pass 35
- else
- fail 35
- fi
+ dotest basic2-8 "${testcvs} -q ci -m 'second dive' first-dir" \
+"RCS file: ${CVSROOT_DIRNAME}/first-dir/file6,v
+done
+Checking in first-dir/file6;
+${CVSROOT_DIRNAME}/first-dir/file6,v <-- file6
+initial revision: 1\.1
+done
+RCS file: ${CVSROOT_DIRNAME}/first-dir/file7,v
+done
+Checking in first-dir/file7;
+${CVSROOT_DIRNAME}/first-dir/file7,v <-- file7
+initial revision: 1\.1
+done
+RCS file: ${CVSROOT_DIRNAME}/first-dir/dir1/file6,v
+done
+Checking in first-dir/dir1/file6;
+${CVSROOT_DIRNAME}/first-dir/dir1/file6,v <-- file6
+initial revision: 1\.1
+done
+RCS file: ${CVSROOT_DIRNAME}/first-dir/dir1/file7,v
+done
+Checking in first-dir/dir1/file7;
+${CVSROOT_DIRNAME}/first-dir/dir1/file7,v <-- file7
+initial revision: 1\.1
+done
+RCS file: ${CVSROOT_DIRNAME}/first-dir/dir1/dir2/file6,v
+done
+Checking in first-dir/dir1/dir2/file6;
+${CVSROOT_DIRNAME}/first-dir/dir1/dir2/file6,v <-- file6
+initial revision: 1\.1
+done
+RCS file: ${CVSROOT_DIRNAME}/first-dir/dir1/dir2/file7,v
+done
+Checking in first-dir/dir1/dir2/file7;
+${CVSROOT_DIRNAME}/first-dir/dir1/dir2/file7,v <-- file7
+initial revision: 1\.1
+done"
- if ${CVS} tag second-dive first-dir ; then
- pass 36
- else
- fail 36
- fi
+ dotest basic2-9 "${testcvs} tag second-dive first-dir" \
+"${PROG} [a-z]*: Tagging first-dir
+T first-dir/file6
+T first-dir/file7
+${PROG} [a-z]*: Tagging first-dir/dir1
+T first-dir/dir1/file6
+T first-dir/dir1/file7
+${PROG} [a-z]*: Tagging first-dir/dir1/dir2
+T first-dir/dir1/dir2/file6
+T first-dir/dir1/dir2/file7"
# third dive - in bunch o' directories, add bunch o' files,
# delete some, change some.
@@ -1914,40 +2906,228 @@ done"
# delete a file
rm file7
- if ${CVS} rm file7 2>> ${LOGFILE}; then
- pass 37-$i
- else
- fail 37-$i
- fi
+ dotest basic2-10-$i "${testcvs} rm file7" \
+"${PROG} [a-z]*: scheduling .file7. for removal
+${PROG} [a-z]*: use .${PROG} commit. to remove this file permanently"
# and add a new file
echo file14 >file14
- if ${CVS} add file14 2>> ${LOGFILE}; then
- pass 38-$i
- else
- fail 38-$i
- fi
+ dotest basic2-11-$i "${testcvs} add file14" \
+"${PROG} [a-z]*: scheduling file .file14. for addition
+${PROG} [a-z]*: use .${PROG} commit. to add this file permanently"
done
+
cd ../../..
- if ${CVS} update first-dir ; then
- pass 39
- else
- fail 39
- fi
+ dotest basic2-12 "${testcvs} update first-dir" \
+"${PROG} [a-z]*: Updating first-dir
+A first-dir/file14
+M first-dir/file6
+R first-dir/file7
+${PROG} [a-z]*: Updating first-dir/dir1
+A first-dir/dir1/file14
+M first-dir/dir1/file6
+R first-dir/dir1/file7
+${PROG} [a-z]*: Updating first-dir/dir1/dir2
+A first-dir/dir1/dir2/file14
+M first-dir/dir1/dir2/file6
+R first-dir/dir1/dir2/file7"
# FIXME: doesn't work right for added files
- if ${CVS} log first-dir >> ${LOGFILE}; then
- pass 40
- else
- fail 40
- fi
+ dotest basic2-13 "${testcvs} log first-dir" \
+"${PROG} [a-z]*: Logging first-dir
+${PROG} [a-z]*: file14 has been added, but not committed
- if ${CVS} status first-dir >> ${LOGFILE}; then
- pass 41
- else
- fail 41
- fi
+RCS file: ${CVSROOT_DIRNAME}/first-dir/file6,v
+Working file: first-dir/file6
+head: 1\.1
+branch:
+locks: strict
+access list:
+symbolic names:
+ second-dive: 1\.1
+keyword substitution: kv
+total revisions: 1; selected revisions: 1
+description:
+----------------------------
+revision 1\.1
+date: [0-9/]* [0-9:]*; author: ${username}; state: Exp;
+second dive
+=============================================================================
+
+RCS file: ${CVSROOT_DIRNAME}/first-dir/file7,v
+Working file: first-dir/file7
+head: 1\.1
+branch:
+locks: strict
+access list:
+symbolic names:
+ second-dive: 1\.1
+keyword substitution: kv
+total revisions: 1; selected revisions: 1
+description:
+----------------------------
+revision 1\.1
+date: [0-9/]* [0-9:]*; author: ${username}; state: Exp;
+second dive
+=============================================================================
+${PROG} [a-z]*: Logging first-dir/dir1
+${PROG} [a-z]*: file14 has been added, but not committed
+
+RCS file: ${CVSROOT_DIRNAME}/first-dir/dir1/file6,v
+Working file: first-dir/dir1/file6
+head: 1\.1
+branch:
+locks: strict
+access list:
+symbolic names:
+ second-dive: 1\.1
+keyword substitution: kv
+total revisions: 1; selected revisions: 1
+description:
+----------------------------
+revision 1\.1
+date: [0-9/]* [0-9:]*; author: ${username}; state: Exp;
+second dive
+=============================================================================
+
+RCS file: ${CVSROOT_DIRNAME}/first-dir/dir1/file7,v
+Working file: first-dir/dir1/file7
+head: 1\.1
+branch:
+locks: strict
+access list:
+symbolic names:
+ second-dive: 1\.1
+keyword substitution: kv
+total revisions: 1; selected revisions: 1
+description:
+----------------------------
+revision 1\.1
+date: [0-9/]* [0-9:]*; author: ${username}; state: Exp;
+second dive
+=============================================================================
+${PROG} [a-z]*: Logging first-dir/dir1/dir2
+${PROG} [a-z]*: file14 has been added, but not committed
+
+RCS file: ${CVSROOT_DIRNAME}/first-dir/dir1/dir2/file6,v
+Working file: first-dir/dir1/dir2/file6
+head: 1\.1
+branch:
+locks: strict
+access list:
+symbolic names:
+ second-dive: 1\.1
+keyword substitution: kv
+total revisions: 1; selected revisions: 1
+description:
+----------------------------
+revision 1\.1
+date: [0-9/]* [0-9:]*; author: ${username}; state: Exp;
+second dive
+=============================================================================
+
+RCS file: ${CVSROOT_DIRNAME}/first-dir/dir1/dir2/file7,v
+Working file: first-dir/dir1/dir2/file7
+head: 1\.1
+branch:
+locks: strict
+access list:
+symbolic names:
+ second-dive: 1\.1
+keyword substitution: kv
+total revisions: 1; selected revisions: 1
+description:
+----------------------------
+revision 1\.1
+date: [0-9/]* [0-9:]*; author: ${username}; state: Exp;
+second dive
+============================================================================="
+
+ dotest basic2-14 "${testcvs} status first-dir" \
+"${PROG} [a-z]*: Examining first-dir
+===================================================================
+File: file14 Status: Locally Added
+
+ Working revision: New file!
+ Repository revision: No revision control file
+ Sticky Tag: (none)
+ Sticky Date: (none)
+ Sticky Options: (none)
+
+===================================================================
+File: file6 Status: Locally Modified
+
+ Working revision: 1\.1.*
+ Repository revision: 1\.1 ${CVSROOT_DIRNAME}/first-dir/file6,v
+ Sticky Tag: (none)
+ Sticky Date: (none)
+ Sticky Options: (none)
+
+===================================================================
+File: no file file7 Status: Locally Removed
+
+ Working revision: -1\.1.*
+ Repository revision: 1\.1 ${CVSROOT_DIRNAME}/first-dir/file7,v
+ Sticky Tag: (none)
+ Sticky Date: (none)
+ Sticky Options: (none)
+
+${PROG} [a-z]*: Examining first-dir/dir1
+===================================================================
+File: file14 Status: Locally Added
+
+ Working revision: New file!
+ Repository revision: No revision control file
+ Sticky Tag: (none)
+ Sticky Date: (none)
+ Sticky Options: (none)
+
+===================================================================
+File: file6 Status: Locally Modified
+
+ Working revision: 1\.1.*
+ Repository revision: 1\.1 ${CVSROOT_DIRNAME}/first-dir/dir1/file6,v
+ Sticky Tag: (none)
+ Sticky Date: (none)
+ Sticky Options: (none)
+
+===================================================================
+File: no file file7 Status: Locally Removed
+
+ Working revision: -1\.1.*
+ Repository revision: 1\.1 ${CVSROOT_DIRNAME}/first-dir/dir1/file7,v
+ Sticky Tag: (none)
+ Sticky Date: (none)
+ Sticky Options: (none)
+
+${PROG} [a-z]*: Examining first-dir/dir1/dir2
+===================================================================
+File: file14 Status: Locally Added
+
+ Working revision: New file!
+ Repository revision: No revision control file
+ Sticky Tag: (none)
+ Sticky Date: (none)
+ Sticky Options: (none)
+
+===================================================================
+File: file6 Status: Locally Modified
+
+ Working revision: 1\.1.*
+ Repository revision: 1\.1 ${CVSROOT_DIRNAME}/first-dir/dir1/dir2/file6,v
+ Sticky Tag: (none)
+ Sticky Date: (none)
+ Sticky Options: (none)
+
+===================================================================
+File: no file file7 Status: Locally Removed
+
+ Working revision: -1\.1.*
+ Repository revision: 1\.1 ${CVSROOT_DIRNAME}/first-dir/dir1/dir2/file7,v
+ Sticky Tag: (none)
+ Sticky Date: (none)
+ Sticky Options: (none)"
# XXX why is this commented out?
# if ${CVS} diff -u first-dir >> ${LOGFILE} || test $? = 1 ; then
@@ -1956,113 +3136,213 @@ done"
# fail 42
# fi
- if ${CVS} ci -m "third dive" first-dir >>${LOGFILE} 2>&1; then
- pass 43
- else
- fail 43
- fi
- dotest 43.5 "${testcvs} -q update first-dir" ''
-
- if ${CVS} tag third-dive first-dir ; then
- pass 44
- else
- fail 44
- fi
+ dotest basic2-16 "${testcvs} ci -m 'third dive' first-dir" \
+"${PROG} [a-z]*: Examining first-dir
+${PROG} [a-z]*: Examining first-dir/dir1
+${PROG} [a-z]*: Examining first-dir/dir1/dir2
+RCS file: ${CVSROOT_DIRNAME}/first-dir/file14,v
+done
+Checking in first-dir/file14;
+${CVSROOT_DIRNAME}/first-dir/file14,v <-- file14
+initial revision: 1\.1
+done
+Checking in first-dir/file6;
+${CVSROOT_DIRNAME}/first-dir/file6,v <-- file6
+new revision: 1\.2; previous revision: 1\.1
+done
+Removing first-dir/file7;
+${CVSROOT_DIRNAME}/first-dir/file7,v <-- file7
+new revision: delete; previous revision: 1\.1
+done
+RCS file: ${CVSROOT_DIRNAME}/first-dir/dir1/file14,v
+done
+Checking in first-dir/dir1/file14;
+${CVSROOT_DIRNAME}/first-dir/dir1/file14,v <-- file14
+initial revision: 1\.1
+done
+Checking in first-dir/dir1/file6;
+${CVSROOT_DIRNAME}/first-dir/dir1/file6,v <-- file6
+new revision: 1\.2; previous revision: 1\.1
+done
+Removing first-dir/dir1/file7;
+${CVSROOT_DIRNAME}/first-dir/dir1/file7,v <-- file7
+new revision: delete; previous revision: 1\.1
+done
+RCS file: ${CVSROOT_DIRNAME}/first-dir/dir1/dir2/file14,v
+done
+Checking in first-dir/dir1/dir2/file14;
+${CVSROOT_DIRNAME}/first-dir/dir1/dir2/file14,v <-- file14
+initial revision: 1\.1
+done
+Checking in first-dir/dir1/dir2/file6;
+${CVSROOT_DIRNAME}/first-dir/dir1/dir2/file6,v <-- file6
+new revision: 1\.2; previous revision: 1\.1
+done
+Removing first-dir/dir1/dir2/file7;
+${CVSROOT_DIRNAME}/first-dir/dir1/dir2/file7,v <-- file7
+new revision: delete; previous revision: 1\.1
+done"
+ dotest basic2-17 "${testcvs} -q update first-dir" ''
- if echo "yes" | ${CVS} release -d first-dir ; then
- pass 45
- else
- fail 45
- fi
+ dotest basic2-18 "${testcvs} tag third-dive first-dir" \
+"${PROG} [a-z]*: Tagging first-dir
+T first-dir/file14
+T first-dir/file6
+${PROG} [a-z]*: Tagging first-dir/dir1
+T first-dir/dir1/file14
+T first-dir/dir1/file6
+${PROG} [a-z]*: Tagging first-dir/dir1/dir2
+T first-dir/dir1/dir2/file14
+T first-dir/dir1/dir2/file6"
+
+ dotest basic2-19 "echo yes | ${testcvs} release -d first-dir" \
+"You have \[0\] altered files in this repository\.
+Are you sure you want to release (and delete) directory .first-dir.: "
# end of third dive
- if test -d first-dir ; then
- fail 45.5
- else
- pass 45.5
- fi
+ dotest_fail basic2-20 "test -d first-dir" ""
# now try some rtags
# rtag HEADS
- if ${CVS} rtag rtagged-by-head first-dir ; then
- pass 46
- else
- fail 46
- fi
+ dotest basic2-21 "${testcvs} rtag rtagged-by-head first-dir" \
+"${PROG} [a-z]*: Tagging first-dir
+${PROG} [a-z]*: Tagging first-dir/dir1
+${PROG} [a-z]*: Tagging first-dir/dir1/dir2"
# tag by tag
- if ${CVS} rtag -r rtagged-by-head rtagged-by-tag first-dir ; then
- pass 47
- else
- fail 47
- fi
+ dotest basic2-22 "${testcvs} rtag -r rtagged-by-head rtagged-by-tag first-dir" \
+"${PROG} [a-z]*: Tagging first-dir
+${PROG} [a-z]*: Tagging first-dir/dir1
+${PROG} [a-z]*: Tagging first-dir/dir1/dir2"
# tag by revision
- if ${CVS} rtag -r1.1 rtagged-by-revision first-dir ; then
- pass 48
- else
- fail 48
- fi
+ dotest basic2-23 "${testcvs} rtag -r1.1 rtagged-by-revision first-dir" \
+"${PROG} [a-z]*: Tagging first-dir
+${PROG} [a-z]*: Tagging first-dir/dir1
+${PROG} [a-z]*: Tagging first-dir/dir1/dir2"
# rdiff by revision
- if ${CVS} rdiff -r1.1 -rrtagged-by-head first-dir >> ${LOGFILE} || test $? = 1 ; then
- pass 49
- else
- fail 49
- fi
-
+ dotest basic2-24 "${testcvs} rdiff -r1.1 -rrtagged-by-head first-dir" \
+"${PROG} [a-z]*: Diffing first-dir
+Index: first-dir/file6
+diff -c first-dir/file6:1\.1 first-dir/file6:1\.2
+\*\*\* first-dir/file6:1\.1 .*
+--- first-dir/file6 .*
+\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*
+\*\*\* 1 \*\*\*\*
+--- 1,2 ----
+ file6
+${PLUS} file6
+Index: first-dir/file7
+diff -c first-dir/file7:1\.1 first-dir/file7:removed
+\*\*\* first-dir/file7:1.1 .*
+--- first-dir/file7 .*
+\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*
+\*\*\* 1 \*\*\*\*
+- file7
+--- 0 ----
+${PROG} [a-z]*: Diffing first-dir/dir1
+Index: first-dir/dir1/file6
+diff -c first-dir/dir1/file6:1\.1 first-dir/dir1/file6:1\.2
+\*\*\* first-dir/dir1/file6:1\.1 .*
+--- first-dir/dir1/file6 .*
+\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*
+\*\*\* 1 \*\*\*\*
+--- 1,2 ----
+ file6
+${PLUS} file6
+Index: first-dir/dir1/file7
+diff -c first-dir/dir1/file7:1\.1 first-dir/dir1/file7:removed
+\*\*\* first-dir/dir1/file7:1\.1 .*
+--- first-dir/dir1/file7 .*
+\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*
+\*\*\* 1 \*\*\*\*
+- file7
+--- 0 ----
+${PROG} [a-z]*: Diffing first-dir/dir1/dir2
+Index: first-dir/dir1/dir2/file6
+diff -c first-dir/dir1/dir2/file6:1\.1 first-dir/dir1/dir2/file6:1\.2
+\*\*\* first-dir/dir1/dir2/file6:1\.1 .*
+--- first-dir/dir1/dir2/file6 .*
+\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*
+\*\*\* 1 \*\*\*\*
+--- 1,2 ----
+ file6
+${PLUS} file6
+Index: first-dir/dir1/dir2/file7
+diff -c first-dir/dir1/dir2/file7:1\.1 first-dir/dir1/dir2/file7:removed
+\*\*\* first-dir/dir1/dir2/file7:1\.1 .*
+--- first-dir/dir1/dir2/file7 .*
+\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*
+\*\*\* 1 \*\*\*\*
+- file7
+--- 0 ----"
# now export by rtagged-by-head and rtagged-by-tag and compare.
- if ${CVS} export -r rtagged-by-head first-dir ; then
- pass 50
- else
- fail 50
- fi
+ dotest basic2-25 "${testcvs} export -r rtagged-by-head first-dir" \
+"${PROG} [a-z]*: Updating first-dir
+U first-dir/file14
+U first-dir/file6
+${PROG} [a-z]*: Updating first-dir/dir1
+U first-dir/dir1/file14
+U first-dir/dir1/file6
+${PROG} [a-z]*: Updating first-dir/dir1/dir2
+U first-dir/dir1/dir2/file14
+U first-dir/dir1/dir2/file6"
mv first-dir 1dir
- if ${CVS} export -r rtagged-by-tag first-dir ; then
- pass 51
- else
- fail 51
- fi
-
- directory_cmp 1dir first-dir
-
- if $ISDIFF ; then
- fail 52
- else
- pass 52
- fi
+ dotest basic2-26 "${testcvs} export -r rtagged-by-tag first-dir" \
+"${PROG} [a-z]*: Updating first-dir
+U first-dir/file14
+U first-dir/file6
+${PROG} [a-z]*: Updating first-dir/dir1
+U first-dir/dir1/file14
+U first-dir/dir1/file6
+${PROG} [a-z]*: Updating first-dir/dir1/dir2
+U first-dir/dir1/dir2/file14
+U first-dir/dir1/dir2/file6"
+
+ dotest basic2-27 "directory_cmp 1dir first-dir"
rm -r 1dir first-dir
# checkout by revision vs export by rtagged-by-revision and compare.
- if ${CVS} export -rrtagged-by-revision -d export-dir first-dir ; then
- pass 53
- else
- fail 53
- fi
-
- if ${CVS} co -r1.1 first-dir ; then
- pass 54
- else
- fail 54
- fi
+ dotest basic2-28 "${testcvs} export -rrtagged-by-revision -d export-dir first-dir" \
+"${PROG} [a-z]*: Updating export-dir
+U export-dir/file14
+U export-dir/file6
+U export-dir/file7
+${PROG} [a-z]*: Updating export-dir/dir1
+U export-dir/dir1/file14
+U export-dir/dir1/file6
+U export-dir/dir1/file7
+${PROG} [a-z]*: Updating export-dir/dir1/dir2
+U export-dir/dir1/dir2/file14
+U export-dir/dir1/dir2/file6
+U export-dir/dir1/dir2/file7"
+
+ dotest basic2-29 "${testcvs} co -r1.1 first-dir" \
+"${PROG} [a-z]*: Updating first-dir
+U first-dir/file14
+U first-dir/file6
+U first-dir/file7
+${PROG} [a-z]*: Updating first-dir/dir1
+U first-dir/dir1/file14
+U first-dir/dir1/file6
+U first-dir/dir1/file7
+${PROG} [a-z]*: Updating first-dir/dir1/dir2
+U first-dir/dir1/dir2/file14
+U first-dir/dir1/dir2/file6
+U first-dir/dir1/dir2/file7"
# directory copies are done in an oblique way in order to avoid a bug in sun's tmp filesystem.
mkdir first-dir.cpy ; (cd first-dir ; tar cf - . | (cd ../first-dir.cpy ; tar xf -))
- directory_cmp first-dir export-dir
-
- if $ISDIFF ; then
- fail 55
- else
- pass 55
- fi
+ dotest basic2-30 "directory_cmp first-dir export-dir"
# interrupt, while we've got a clean 1.1 here, let's import it
# into a couple of other modules.
cd export-dir
- dotest_sort 56 "${testcvs} import -m first-import second-dir first-immigration immigration1 immigration1_0" \
+ dotest_sort basic2-31 "${testcvs} import -m first-import second-dir first-immigration immigration1 immigration1_0" \
"
N second-dir/dir1/dir2/file14
@@ -2075,23 +3355,25 @@ N second-dir/file14
N second-dir/file6
N second-dir/file7
No conflicts created by this import
-${PROG} [a-z]*: Importing ${TESTDIR}/cvsroot/second-dir/dir1
-${PROG} [a-z]*: Importing ${TESTDIR}/cvsroot/second-dir/dir1/dir2"
+${PROG} [a-z]*: Importing ${CVSROOT_DIRNAME}/second-dir/dir1
+${PROG} [a-z]*: Importing ${CVSROOT_DIRNAME}/second-dir/dir1/dir2"
cd ..
- if ${CVS} export -r HEAD second-dir ; then
- pass 57
- else
- fail 57
- fi
-
- directory_cmp first-dir second-dir
-
- if $ISDIFF ; then
- fail 58
- else
- pass 58
- fi
+ dotest basic2-32 "${testcvs} export -r HEAD second-dir" \
+"${PROG} [a-z]*: Updating second-dir
+U second-dir/file14
+U second-dir/file6
+U second-dir/file7
+${PROG} [a-z]*: Updating second-dir/dir1
+U second-dir/dir1/file14
+U second-dir/dir1/file6
+U second-dir/dir1/file7
+${PROG} [a-z]*: Updating second-dir/dir1/dir2
+U second-dir/dir1/dir2/file14
+U second-dir/dir1/dir2/file6
+U second-dir/dir1/dir2/file7"
+
+ dotest basic2-33 "directory_cmp first-dir second-dir"
rm -r second-dir
@@ -2101,49 +3383,39 @@ ${PROG} [a-z]*: Importing ${TESTDIR}/cvsroot/second-dir/dir1/dir2"
# update the top, cancelling sticky tags, retag, update other copy, compare.
cd first-dir
- if ${CVS} update -A -l *file* 2>> ${LOGFILE}; then
- pass 59
- else
- fail 59
- fi
+ dotest basic2-34 "${testcvs} update -A -l *file*" \
+"[UP] file6
+${PROG} [a-z]*: file7 is no longer in the repository"
# If we don't delete the tag first, cvs won't retag it.
# This would appear to be a feature.
- if ${CVS} tag -l -d rtagged-by-revision ; then
- pass 60a
- else
- fail 60a
- fi
- if ${CVS} tag -l rtagged-by-revision ; then
- pass 60b
- else
- fail 60b
- fi
+ dotest basic2-35 "${testcvs} tag -l -d rtagged-by-revision" \
+"${PROG} [a-z]*: Untagging \.
+D file14
+D file6"
+ dotest basic2-36 "${testcvs} tag -l rtagged-by-revision" \
+"${PROG} [a-z]*: Tagging \.
+T file14
+T file6"
cd ..
mv first-dir 1dir
mv first-dir.cpy first-dir
cd first-dir
- dotest 61 "${testcvs} -q diff -u" ''
+ dotest basic2-37 "${testcvs} -q diff -u" ''
- if ${CVS} update ; then
- pass 62
- else
- fail 62
- fi
+ dotest basic2-38 "${testcvs} update" \
+"${PROG} [a-z]*: Updating .
+${PROG} [a-z]*: Updating dir1
+${PROG} [a-z]*: Updating dir1/dir2"
cd ..
#### FIXME: is this expected to work??? Need to investigate
#### and fix or remove the test.
-# directory_cmp 1dir first-dir
-#
-# if $ISDIFF ; then
-# fail 63
-# else
-# pass 63
-# fi
+# dotest basic2-39 "directory_cmp 1dir first-dir"
+
rm -r 1dir first-dir
# Test the cvs history command.
@@ -2158,29 +3430,29 @@ ${PROG} [a-z]*: Importing ${TESTDIR}/cvsroot/second-dir/dir1/dir2"
# which don't exist in the remote output? would seem to be
# a CVS bug.
dotest basic2-64 "${testcvs} his -x TOFWUCGMAR -a" \
-"O [0-9-]* [0-9:]* ${PLUS}0000 ${username} first-dir =first-dir= ${TMPPWD}/\*
-A [0-9-]* [0-9:]* ${PLUS}0000 ${username} 1\.1 file6 first-dir == ${TMPPWD}
-A [0-9-]* [0-9:]* ${PLUS}0000 ${username} 1\.1 file7 first-dir == ${TMPPWD}
-A [0-9-]* [0-9:]* ${PLUS}0000 ${username} 1\.1 file6 first-dir/dir1 == ${TMPPWD}
-A [0-9-]* [0-9:]* ${PLUS}0000 ${username} 1\.1 file7 first-dir/dir1 == ${TMPPWD}
-A [0-9-]* [0-9:]* ${PLUS}0000 ${username} 1\.1 file6 first-dir/dir1/dir2 == ${TMPPWD}
-A [0-9-]* [0-9:]* ${PLUS}0000 ${username} 1\.1 file7 first-dir/dir1/dir2 == ${TMPPWD}
-A [0-9-]* [0-9:]* ${PLUS}0000 ${username} 1\.1 file14 first-dir == ${TMPPWD}
-M [0-9-]* [0-9:]* ${PLUS}0000 ${username} 1\.2 file6 first-dir == ${TMPPWD}
-R [0-9-]* [0-9:]* ${PLUS}0000 ${username} 1\.2 file7 first-dir == ${TMPPWD}
-A [0-9-]* [0-9:]* ${PLUS}0000 ${username} 1\.1 file14 first-dir/dir1 == ${TMPPWD}
-M [0-9-]* [0-9:]* ${PLUS}0000 ${username} 1\.2 file6 first-dir/dir1 == ${TMPPWD}
-R [0-9-]* [0-9:]* ${PLUS}0000 ${username} 1\.2 file7 first-dir/dir1 == ${TMPPWD}
-A [0-9-]* [0-9:]* ${PLUS}0000 ${username} 1\.1 file14 first-dir/dir1/dir2 == ${TMPPWD}
-M [0-9-]* [0-9:]* ${PLUS}0000 ${username} 1\.2 file6 first-dir/dir1/dir2 == ${TMPPWD}
-R [0-9-]* [0-9:]* ${PLUS}0000 ${username} 1\.2 file7 first-dir/dir1/dir2 == ${TMPPWD}
-F [0-9-]* [0-9:]* ${PLUS}0000 ${username} =first-dir= ${TMPPWD}/\*
+"O [0-9-]* [0-9:]* ${PLUS}0000 ${username} first-dir =first-dir= ${TESTDIR}/\*
+A [0-9-]* [0-9:]* ${PLUS}0000 ${username} 1\.1 file6 first-dir == ${TESTDIR}
+A [0-9-]* [0-9:]* ${PLUS}0000 ${username} 1\.1 file7 first-dir == ${TESTDIR}
+A [0-9-]* [0-9:]* ${PLUS}0000 ${username} 1\.1 file6 first-dir/dir1 == ${TESTDIR}
+A [0-9-]* [0-9:]* ${PLUS}0000 ${username} 1\.1 file7 first-dir/dir1 == ${TESTDIR}
+A [0-9-]* [0-9:]* ${PLUS}0000 ${username} 1\.1 file6 first-dir/dir1/dir2 == ${TESTDIR}
+A [0-9-]* [0-9:]* ${PLUS}0000 ${username} 1\.1 file7 first-dir/dir1/dir2 == ${TESTDIR}
+A [0-9-]* [0-9:]* ${PLUS}0000 ${username} 1\.1 file14 first-dir == ${TESTDIR}
+M [0-9-]* [0-9:]* ${PLUS}0000 ${username} 1\.2 file6 first-dir == ${TESTDIR}
+R [0-9-]* [0-9:]* ${PLUS}0000 ${username} 1\.2 file7 first-dir == ${TESTDIR}
+A [0-9-]* [0-9:]* ${PLUS}0000 ${username} 1\.1 file14 first-dir/dir1 == ${TESTDIR}
+M [0-9-]* [0-9:]* ${PLUS}0000 ${username} 1\.2 file6 first-dir/dir1 == ${TESTDIR}
+R [0-9-]* [0-9:]* ${PLUS}0000 ${username} 1\.2 file7 first-dir/dir1 == ${TESTDIR}
+A [0-9-]* [0-9:]* ${PLUS}0000 ${username} 1\.1 file14 first-dir/dir1/dir2 == ${TESTDIR}
+M [0-9-]* [0-9:]* ${PLUS}0000 ${username} 1\.2 file6 first-dir/dir1/dir2 == ${TESTDIR}
+R [0-9-]* [0-9:]* ${PLUS}0000 ${username} 1\.2 file7 first-dir/dir1/dir2 == ${TESTDIR}
+F [0-9-]* [0-9:]* ${PLUS}0000 ${username} =first-dir= ${TESTDIR}/\*
T [0-9-]* [0-9:]* ${PLUS}0000 ${username} first-dir \[rtagged-by-head:A\]
T [0-9-]* [0-9:]* ${PLUS}0000 ${username} first-dir \[rtagged-by-tag:rtagged-by-head\]
T [0-9-]* [0-9:]* ${PLUS}0000 ${username} first-dir \[rtagged-by-revision:1\.1\]
-O [0-9-]* [0-9:]* ${PLUS}0000 ${username} \[1\.1\] first-dir =first-dir= ${TMPPWD}/\*
-U [0-9-]* [0-9:]* ${PLUS}0000 ${username} 1\.2 file6 first-dir == ${TMPPWD}/first-dir
-U [0-9-]* [0-9:]* ${PLUS}0000 ${username} 1\.2 file7 first-dir == ${TMPPWD}/first-dir" \
+O [0-9-]* [0-9:]* ${PLUS}0000 ${username} \[1\.1\] first-dir =first-dir= ${TESTDIR}/\*
+U [0-9-]* [0-9:]* ${PLUS}0000 ${username} 1\.2 file6 first-dir == ${TESTDIR}/first-dir
+W [0-9-]* [0-9:]* ${PLUS}0000 ${username} file7 first-dir == ${TESTDIR}/first-dir" \
"O [0-9-]* [0-9:]* ${PLUS}0000 ${username} first-dir =first-dir= <remote>/\*
A [0-9-]* [0-9:]* ${PLUS}0000 ${username} 1\.1 file6 first-dir == <remote>
A [0-9-]* [0-9:]* ${PLUS}0000 ${username} 1\.1 file7 first-dir == <remote>
@@ -2201,7 +3473,8 @@ F [0-9-]* [0-9:]* ${PLUS}0000 ${username} =first-dir= <remot
T [0-9-]* [0-9:]* ${PLUS}0000 ${username} first-dir \[rtagged-by-head:A\]
T [0-9-]* [0-9:]* ${PLUS}0000 ${username} first-dir \[rtagged-by-tag:rtagged-by-head\]
T [0-9-]* [0-9:]* ${PLUS}0000 ${username} first-dir \[rtagged-by-revision:1\.1\]
-O [0-9-]* [0-9:]* ${PLUS}0000 ${username} \[1\.1\] first-dir =first-dir= <remote>/\*"
+O [0-9-]* [0-9:]* ${PLUS}0000 ${username} \[1\.1\] first-dir =first-dir= <remote>/\*
+W [0-9-]* [0-9:]* ${PLUS}0000 ${username} file7 first-dir == <remote>" \
rm -rf ${CVSROOT_DIRNAME}/first-dir
rm -rf ${CVSROOT_DIRNAME}/second-dir
@@ -2219,24 +3492,24 @@ O [0-9-]* [0-9:]* ${PLUS}0000 ${username} \[1\.1\] first-dir =first-di
dotest files-1 "${testcvs} -q co -l ." ""
mkdir first-dir
dotest files-2 "${testcvs} add first-dir" \
-"Directory ${TESTDIR}/cvsroot/first-dir added to the repository"
+"Directory ${CVSROOT_DIRNAME}/first-dir added to the repository"
cd first-dir
touch tfile
dotest files-3 "${testcvs} add tfile" \
"${PROG} [a-z]*: scheduling file .tfile. for addition
${PROG} [a-z]*: use .${PROG} commit. to add this file permanently"
dotest files-4 "${testcvs} -q ci -m add" \
-"RCS file: ${TESTDIR}/cvsroot/first-dir/tfile,v
+"RCS file: ${CVSROOT_DIRNAME}/first-dir/tfile,v
done
Checking in tfile;
-${TESTDIR}/cvsroot/first-dir/tfile,v <-- tfile
+${CVSROOT_DIRNAME}/first-dir/tfile,v <-- tfile
initial revision: 1\.1
done"
dotest files-5 "${testcvs} -q tag -b C" "T tfile"
dotest files-6 "${testcvs} -q update -r C" ""
mkdir dir
dotest files-7 "${testcvs} add dir" \
-"Directory ${TESTDIR}/cvsroot/first-dir/dir added to the repository
+"Directory ${CVSROOT_DIRNAME}/first-dir/dir added to the repository
--> Using per-directory sticky tag .C'"
cd dir
touch .file
@@ -2245,12 +3518,12 @@ done"
${PROG} [a-z]*: use .${PROG} commit. to add this file permanently"
mkdir sdir
dotest files-7 "${testcvs} add sdir" \
-"Directory ${TESTDIR}/cvsroot/first-dir/dir/sdir added to the repository
+"Directory ${CVSROOT_DIRNAME}/first-dir/dir/sdir added to the repository
--> Using per-directory sticky tag .C'"
cd sdir
mkdir ssdir
dotest files-8 "${testcvs} add ssdir" \
-"Directory ${TESTDIR}/cvsroot/first-dir/dir/sdir/ssdir added to the repository
+"Directory ${CVSROOT_DIRNAME}/first-dir/dir/sdir/ssdir added to the repository
--> Using per-directory sticky tag .C'"
cd ssdir
touch .file
@@ -2259,29 +3532,29 @@ ${PROG} [a-z]*: use .${PROG} commit. to add this file permanently"
${PROG} [a-z]*: use .${PROG} commit. to add this file permanently"
cd ../..
dotest files-10 "${testcvs} -q ci -m test" \
-"RCS file: ${TESTDIR}/cvsroot/first-dir/dir/Attic/\.file,v
+"RCS file: ${CVSROOT_DIRNAME}/first-dir/dir/Attic/\.file,v
done
Checking in \.file;
-${TESTDIR}/cvsroot/first-dir/dir/Attic/\.file,v <-- \.file
+${CVSROOT_DIRNAME}/first-dir/dir/Attic/\.file,v <-- \.file
new revision: 1\.1\.2\.1; previous revision: 1\.1
done
-RCS file: ${TESTDIR}/cvsroot/first-dir/dir/sdir/ssdir/Attic/\.file,v
+RCS file: ${CVSROOT_DIRNAME}/first-dir/dir/sdir/ssdir/Attic/\.file,v
done
Checking in sdir/ssdir/\.file;
-${TESTDIR}/cvsroot/first-dir/dir/sdir/ssdir/Attic/\.file,v <-- \.file
+${CVSROOT_DIRNAME}/first-dir/dir/sdir/ssdir/Attic/\.file,v <-- \.file
new revision: 1\.1\.2\.1; previous revision: 1\.1
done"
dotest files-11 \
"${testcvs} commit -m test -f ./.file ./sdir/ssdir/.file" \
"Checking in \.file;
-${TESTDIR}/cvsroot/first-dir/dir/Attic/\.file,v <-- \.file
+${CVSROOT_DIRNAME}/first-dir/dir/Attic/\.file,v <-- \.file
new revision: 1\.1\.2\.2; previous revision: 1\.1\.2\.1
done
Checking in \./sdir/ssdir/\.file;
-${TESTDIR}/cvsroot/first-dir/dir/sdir/ssdir/Attic/\.file,v <-- \.file
+${CVSROOT_DIRNAME}/first-dir/dir/sdir/ssdir/Attic/\.file,v <-- \.file
new revision: 1\.1\.2\.2; previous revision: 1\.1\.2\.1
done"
- if test "$remote" = yes; then
+ if $remote; then
# This is a bug, looks like that toplevel_repos cruft in
# client.c is coming back to haunt us.
# May want to think about the whole issue, toplevel_repos
@@ -2298,32 +3571,32 @@ ${PROG} \[server aborted\]: correct above errors first!"
dotest files-12-workaround \
"${testcvs} commit -f -m test sdir/ssdir/.file .file" \
"Checking in sdir/ssdir/\.file;
-${TESTDIR}/cvsroot/first-dir/dir/sdir/ssdir/Attic/\.file,v <-- \.file
+${CVSROOT_DIRNAME}/first-dir/dir/sdir/ssdir/Attic/\.file,v <-- \.file
new revision: 1\.1\.2\.3; previous revision: 1\.1\.2\.2
done
Checking in \.file;
-${TESTDIR}/cvsroot/first-dir/dir/Attic/\.file,v <-- \.file
+${CVSROOT_DIRNAME}/first-dir/dir/Attic/\.file,v <-- \.file
new revision: 1\.1\.2\.3; previous revision: 1\.1\.2\.2
done"
else
dotest files-12 \
"${testcvs} commit -f -m test ./sdir/ssdir/.file ./.file" \
"Checking in \./sdir/ssdir/\.file;
-${TESTDIR}/cvsroot/first-dir/dir/sdir/ssdir/Attic/\.file,v <-- \.file
+${CVSROOT_DIRNAME}/first-dir/dir/sdir/ssdir/Attic/\.file,v <-- \.file
new revision: 1\.1\.2\.3; previous revision: 1\.1\.2\.2
done
Checking in \.file;
-${TESTDIR}/cvsroot/first-dir/dir/Attic/\.file,v <-- \.file
+${CVSROOT_DIRNAME}/first-dir/dir/Attic/\.file,v <-- \.file
new revision: 1\.1\.2\.3; previous revision: 1\.1\.2\.2
done"
fi
dotest files-13 \
"${testcvs} commit -fmtest ./sdir/../sdir/ssdir/..///ssdir/.file" \
"Checking in \./sdir/\.\./sdir/ssdir/\.\.///ssdir/\.file;
-${TESTDIR}/cvsroot/first-dir/dir/sdir/ssdir/Attic/\.file,v <-- \.file
+${CVSROOT_DIRNAME}/first-dir/dir/sdir/ssdir/Attic/\.file,v <-- \.file
new revision: 1\.1\.2\.4; previous revision: 1\.1\.2\.3
done"
- if test "$remote" = yes; then
+ if $remote; then
dotest_fail files-14 \
"${testcvs} commit -fmtest ../../first-dir/dir/.file" \
"protocol error: .\.\./\.\./first-dir/dir' has too many \.\."
@@ -2331,7 +3604,7 @@ done"
dotest files-14 \
"${testcvs} commit -fmtest ../../first-dir/dir/.file" \
"Checking in \.\./\.\./first-dir/dir/\.file;
-${TESTDIR}/cvsroot/first-dir/dir/Attic/\.file,v <-- \.file
+${CVSROOT_DIRNAME}/first-dir/dir/Attic/\.file,v <-- \.file
new revision: 1\.1\.2\.4; previous revision: 1\.1\.2\.3
done"
fi
@@ -2350,7 +3623,7 @@ done"
# I wrote this test to worry about problems in do_module;
# but then I found that the CVS server has its own problems
# with filenames starting with "-". Work around it for now.
- if test "$remote" = yes; then
+ if $remote; then
dashb=dashb
dashc=dashc
else
@@ -2366,34 +3639,34 @@ done"
${PROG} [a-z]*: scheduling file .top. for addition
${PROG} [a-z]*: use .${PROG} commit. to add these files permanently"
dotest spacefiles-3 "${testcvs} -q ci -m add" \
-"RCS file: ${TESTDIR}/cvsroot/${dashc},v
+"RCS file: ${CVSROOT_DIRNAME}/${dashc},v
done
Checking in ${dashc};
-${TESTDIR}/cvsroot/${dashc},v <-- ${dashc}
+${CVSROOT_DIRNAME}/${dashc},v <-- ${dashc}
initial revision: 1\.1
done
-RCS file: ${TESTDIR}/cvsroot/top,v
+RCS file: ${CVSROOT_DIRNAME}/top,v
done
Checking in top;
-${TESTDIR}/cvsroot/top,v <-- top
+${CVSROOT_DIRNAME}/top,v <-- top
initial revision: 1\.1
done"
mkdir 'first dir'
dotest spacefiles-4 "${testcvs} add 'first dir'" \
-"Directory ${TESTDIR}/cvsroot/first dir added to the repository"
+"Directory ${CVSROOT_DIRNAME}/first dir added to the repository"
mkdir ./${dashb}
dotest spacefiles-5 "${testcvs} add -- ${dashb}" \
-"Directory ${TESTDIR}/cvsroot/${dashb} added to the repository"
+"Directory ${CVSROOT_DIRNAME}/${dashb} added to the repository"
cd 'first dir'
touch 'a file'
dotest spacefiles-6 "${testcvs} add 'a file'" \
"${PROG} [a-z]*: scheduling file .a file. for addition
${PROG} [a-z]*: use .${PROG} commit. to add this file permanently"
dotest spacefiles-7 "${testcvs} -q ci -m add" \
-"RCS file: ${TESTDIR}/cvsroot/first dir/a file,v
+"RCS file: ${CVSROOT_DIRNAME}/first dir/a file,v
done
Checking in a file;
-${TESTDIR}/cvsroot/first dir/a file,v <-- a file
+${CVSROOT_DIRNAME}/first dir/a file,v <-- a file
initial revision: 1\.1
done"
dotest spacefiles-8 "${testcvs} -q tag new-tag" "T a file"
@@ -2443,10 +3716,10 @@ done"
"${PROG} [a-z]*: scheduling file .$file. for addition
${PROG} [a-z]*: use .${PROG} commit. to add this file permanently"
dotest commit-readonly-4 "$testcvs -Q ci -m . $file" \
-"RCS file: ${TESTDIR}/cvsroot/$module/$file,v
+"RCS file: ${CVSROOT_DIRNAME}/$module/$file,v
done
Checking in $file;
-${TESTDIR}/cvsroot/$module/$file,v <-- $file
+${CVSROOT_DIRNAME}/$module/$file,v <-- $file
initial revision: 1\.1
done"
@@ -2456,7 +3729,7 @@ done"
dotest commit-readonly-5 "$testcvs -Q ci -m . $file" \
"Checking in $file;
-${TESTDIR}/cvsroot/$module/$file,v <-- $file
+${CVSROOT_DIRNAME}/$module/$file,v <-- $file
new revision: 1\.2; previous revision: 1\.1
done"
@@ -2494,7 +3767,7 @@ U trdiff/foo"
dotest rdiff-3 \
"${testcvs} ci -m added-something foo" \
"Checking in foo;
-${TESTDIR}/cvsroot/trdiff/foo,v <-- foo
+${CVSROOT_DIRNAME}/trdiff/foo,v <-- foo
new revision: 1\.2; previous revision: 1\.1
done"
echo '#ident "@(#)trdiff:$''Name$:$''Id$"' > new
@@ -2505,10 +3778,10 @@ done"
${PROG} [a-z]*: use .${PROG} commit. to add this file permanently"
dotest rdiff-5 \
"${testcvs} commit -m added-new-file new" \
-"RCS file: ${TESTDIR}/cvsroot/trdiff/new,v
+"RCS file: ${CVSROOT_DIRNAME}/trdiff/new,v
done
Checking in new;
-${TESTDIR}/cvsroot/trdiff/new,v <-- new
+${CVSROOT_DIRNAME}/trdiff/new,v <-- new
initial revision: 1\.1
done"
dotest rdiff-6 \
@@ -2523,7 +3796,7 @@ T new"
File: foo Status: Up-to-date
Working revision: 1\.2.*
- Repository revision: 1\.2 ${TESTDIR}/cvsroot/trdiff/foo,v
+ Repository revision: 1\.2 ${CVSROOT_DIRNAME}/trdiff/foo,v
Sticky Tag: (none)
Sticky Date: (none)
Sticky Options: -ko
@@ -2561,11 +3834,10 @@ diff -c /dev/null trdiff/new:1\.1
'"${PLUS}"' #ident "@(#)trdiff:\$''Name: local-v0 \$:\$''Id: new,v 1\.1 [0-9/]* [0-9:]* '"${username}"' Exp \$"
'"${PLUS}"' new file'
-# FIXME: will this work here?
-# if test "$keep" = yes; then
-# echo Keeping ${TESTDIR} and exiting due to --keep
-# exit 0
-# fi
+ if $keep; then
+ echo Keeping ${TESTDIR} and exiting due to --keep
+ exit 0
+ fi
cd ..
rm -r testimport
@@ -2583,7 +3855,7 @@ diff -c /dev/null trdiff/new:1\.1
dotest diff-1 "${testcvs} -q co -l ." ''
mkdir first-dir
dotest diff-2 "${testcvs} add first-dir" \
-"Directory ${TESTDIR}/cvsroot/first-dir added to the repository"
+"Directory ${CVSROOT_DIRNAME}/first-dir added to the repository"
cd first-dir
# diff is anomalous. Most CVS commands print the "nothing
@@ -2596,16 +3868,16 @@ diff -c /dev/null trdiff/new:1\.1
"${PROG} [a-z]*: scheduling file .abc. for addition
${PROG} [a-z]*: use .${PROG} commit. to add this file permanently"
dotest diff-5 "${testcvs} -q ci -mtest" \
-"RCS file: ${TESTDIR}/cvsroot/first-dir/abc,v
+"RCS file: ${CVSROOT_DIRNAME}/first-dir/abc,v
done
Checking in abc;
-${TESTDIR}/cvsroot/first-dir/abc,v <-- abc
+${CVSROOT_DIRNAME}/first-dir/abc,v <-- abc
initial revision: 1\.1
done"
echo "extern int gethostname ();" >abc
dotest diff-6 "${testcvs} -q ci -mtest" \
"Checking in abc;
-${TESTDIR}/cvsroot/first-dir/abc,v <-- abc
+${CVSROOT_DIRNAME}/first-dir/abc,v <-- abc
new revision: 1\.2; previous revision: 1\.1
done"
echo "#include <winsock.h>" >abc
@@ -2613,7 +3885,7 @@ done"
dotest_fail diff-7 "${testcvs} -q diff --ifdef=HAVE_WINSOCK_H" \
"Index: abc
===================================================================
-RCS file: ${TESTDIR}/cvsroot/first-dir/abc,v
+RCS file: ${CVSROOT_DIRNAME}/first-dir/abc,v
retrieving revision 1\.2
diff --ifdef=HAVE_WINSOCK_H -r1\.2 abc
#ifndef HAVE_WINSOCK_H
@@ -2622,7 +3894,7 @@ extern int gethostname ();
#include <winsock\.h>
#endif /\* HAVE_WINSOCK_H \*/"
- if test "$keep" = yes; then
+ if $keep; then
echo Keeping ${TESTDIR} and exiting due to --keep
exit 0
fi
@@ -2653,17 +3925,17 @@ extern int gethostname ();
# doesn't get confused by it.
mkdir subdir
dotest 65a0 "${testcvs} add subdir" \
-"Directory ${TESTDIR}/cvsroot/first-dir/subdir added to the repository"
+"Directory ${CVSROOT_DIRNAME}/first-dir/subdir added to the repository"
cd subdir
echo file in subdir >sfile
dotest 65a1 "${testcvs} add sfile" \
"${PROG}"' [a-z]*: scheduling file `sfile'\'' for addition
'"${PROG}"' [a-z]*: use .'"${PROG}"' commit. to add this file permanently'
dotest 65a2 "${testcvs} -q ci -m add-it" \
-"RCS file: ${TESTDIR}/cvsroot/first-dir/subdir/sfile,v
+"RCS file: ${CVSROOT_DIRNAME}/first-dir/subdir/sfile,v
done
Checking in sfile;
-${TESTDIR}/cvsroot/first-dir/subdir/sfile,v <-- sfile
+${CVSROOT_DIRNAME}/first-dir/subdir/sfile,v <-- sfile
initial revision: 1\.1
done"
rm sfile
@@ -2672,7 +3944,7 @@ done"
'"${PROG}"' [a-z]*: use .'"${PROG}"' commit. to remove this file permanently'
dotest 65a4 "${testcvs} -q ci -m remove-it" \
"Removing sfile;
-${TESTDIR}/cvsroot/first-dir/subdir/sfile,v <-- sfile
+${CVSROOT_DIRNAME}/first-dir/subdir/sfile,v <-- sfile
new revision: delete; previous revision: 1\.1
done"
cd ..
@@ -2746,10 +4018,10 @@ done"
"${PROG}"' [a-z]*: scheduling file `file4'\'' for addition
'"${PROG}"' [a-z]*: use .'"${PROG}"' commit. to add this file permanently'
dotest death-file4-ciadd "${testcvs} -q ci -m add file4" \
-"RCS file: ${TESTDIR}/cvsroot/first-dir/file4,v
+"RCS file: ${CVSROOT_DIRNAME}/first-dir/file4,v
done
Checking in file4;
-${TESTDIR}/cvsroot/first-dir/file4,v <-- file4
+${CVSROOT_DIRNAME}/first-dir/file4,v <-- file4
initial revision: 1\.1
done"
rm file4
@@ -2758,7 +4030,7 @@ done"
'"${PROG}"' [a-z]*: use .'"${PROG}"' commit. to remove this file permanently'
dotest death-file4-cirm "${testcvs} -q ci -m remove file4" \
"Removing file4;
-${TESTDIR}/cvsroot/first-dir/file4,v <-- file4
+${CVSROOT_DIRNAME}/first-dir/file4,v <-- file4
new revision: delete; previous revision: 1\.1
done"
@@ -2890,7 +4162,7 @@ diff -c first-dir/file3:1\.1\.2\.1 first-dir/file3:removed
# join
dotest 86 "${testcvs} -q update -j branch1" \
-"RCS file: ${TESTDIR}/cvsroot/first-dir/file1,v
+"RCS file: ${CVSROOT_DIRNAME}/first-dir/file1,v
retrieving revision 1\.3
retrieving revision 1\.3\.2\.1
Merging differences between 1\.3 and 1\.3\.2\.1 into file1
@@ -2922,15 +4194,15 @@ U file3"
# commit
dotest 89 "${testcvs} -q ci -m test" \
"Checking in file1;
-${TESTDIR}/cvsroot/first-dir/file1,v <-- file1
+${CVSROOT_DIRNAME}/first-dir/file1,v <-- file1
new revision: 1\.4; previous revision: 1\.3
done
Removing file2;
-${TESTDIR}/cvsroot/first-dir/file2,v <-- file2
+${CVSROOT_DIRNAME}/first-dir/file2,v <-- file2
new revision: delete; previous revision: 1\.1
done
Checking in file3;
-${TESTDIR}/cvsroot/first-dir/file3,v <-- file3
+${CVSROOT_DIRNAME}/first-dir/file3,v <-- file3
new revision: 1\.2; previous revision: 1\.1
done"
cd ..
@@ -3026,16 +4298,16 @@ U first-dir/file3'
'"${PROG}"' [a-z]*: use .'"${PROG}"' commit. to add these files permanently'
dotest death2-3 "${testcvs} -q commit -m add" \
-"RCS file: ${TESTDIR}/cvsroot/first-dir/file1,v
+"RCS file: ${CVSROOT_DIRNAME}/first-dir/file1,v
done
Checking in file1;
-${TESTDIR}/cvsroot/first-dir/file1,v <-- file1
+${CVSROOT_DIRNAME}/first-dir/file1,v <-- file1
initial revision: 1\.1
done
-RCS file: ${TESTDIR}/cvsroot/first-dir/file4,v
+RCS file: ${CVSROOT_DIRNAME}/first-dir/file4,v
done
Checking in file4;
-${TESTDIR}/cvsroot/first-dir/file4,v <-- file4
+${CVSROOT_DIRNAME}/first-dir/file4,v <-- file4
initial revision: 1\.1
done"
@@ -3068,8 +4340,8 @@ ${PROG} [a-z]*: use .${PROG} commit. to remove this file permanently"
===================================================================
RCS file: file1
diff -N file1
-\*\*\* ${tempname}[ ][ ]*[a-zA-Z0-9: ]*
---- /dev/null[ ][ ]*[a-zA-Z0-9: ]*
+\*\*\* file1 ${RFCDATE} [0-9.]*
+--- /dev/null ${RFCDATE_EPOCH}
\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*
\*\*\* 1 \*\*\*\*
- first revision
@@ -3077,7 +4349,7 @@ diff -N file1
dotest death2-8 "${testcvs} -q ci -m removed" \
"Removing file1;
-${TESTDIR}/cvsroot/first-dir/file1,v <-- file1
+${CVSROOT_DIRNAME}/first-dir/file1,v <-- file1
new revision: delete; previous revision: 1\.1\.2
done"
@@ -3092,8 +4364,8 @@ done"
===================================================================
RCS file: file1
diff -N file1
-\*\*\* ${tempname}[ ][ ]*[a-zA-Z0-9: ]*
---- /dev/null[ ][ ]*[a-zA-Z0-9: ]*
+\*\*\* file1 ${RFCDATE} [0-9.]*
+--- /dev/null ${RFCDATE_EPOCH}
\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*
\*\*\* 1 \*\*\*\*
- first revision
@@ -3107,8 +4379,8 @@ diff -N file1
===================================================================
RCS file: file1
diff -N file1
-\*\*\* ${tempname}[ ][ ]*[a-zA-Z0-9: ]*
---- /dev/null[ ][ ]*[a-zA-Z0-9: ]*
+\*\*\* file1 [-a-zA-Z0-9: ]* [0-9.]*
+--- /dev/null ${RFCDATE_EPOCH}
\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*
\*\*\* 1 \*\*\*\*
- first revision
@@ -3121,8 +4393,8 @@ diff -N file1
dotest death2-rdiff-2 "${testcvs} -q rdiff -rtag -rbranch first-dir" \
"Index: first-dir/file1
diff -c first-dir/file1:1\.1 first-dir/file1:removed
-\*\*\* first-dir/file1:1\.1[ ][ ]*[a-zA-Z0-9: ]*
---- first-dir/file1[ ][ ]*[a-zA-Z0-9: ]*
+\*\*\* first-dir/file1:1\.1 [a-zA-Z0-9: ]*
+--- first-dir/file1 [a-zA-Z0-9: ]*
\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*
\*\*\* 1 \*\*\*\*
- first revision
@@ -3143,8 +4415,8 @@ diff -c first-dir/file1:1\.1 first-dir/file1:removed
===================================================================
RCS file: file1
diff -N file1
-\*\*\* /dev/null[ ][ ]*[a-zA-Z0-9: ]*
---- ${tempname}[ ][ ]*[a-zA-Z0-9: ]*
+\*\*\* /dev/null ${RFCDATE_EPOCH}
+--- file1 ${RFCDATE}
\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*
\*\*\* 0 \*\*\*\*
--- 1 ----
@@ -3152,7 +4424,7 @@ ${PLUS} second revision"
dotest death2-10 "${testcvs} -q commit -m add" \
"Checking in file1;
-${TESTDIR}/cvsroot/first-dir/file1,v <-- file1
+${CVSROOT_DIRNAME}/first-dir/file1,v <-- file1
new revision: 1\.1\.2\.2; previous revision: 1\.1\.2\.1
done"
@@ -3162,7 +4434,7 @@ done"
${PROG} [a-z]*: use .${PROG} commit. to remove this file permanently"
dotest death2-10b "${testcvs} -q ci -m removed" \
"Removing file4;
-${TESTDIR}/cvsroot/first-dir/file4,v <-- file4
+${CVSROOT_DIRNAME}/first-dir/file4,v <-- file4
new revision: delete; previous revision: 1\.1\.2
done"
@@ -3177,10 +4449,10 @@ U file4"
"${PROG}"' [a-z]*: scheduling file `file2'\'' for addition
'"${PROG}"' [a-z]*: use .'"${PROG}"' commit. to add this file permanently'
dotest death2-13 "${testcvs} -q commit -m add" \
-"RCS file: ${TESTDIR}/cvsroot/first-dir/file2,v
+"RCS file: ${CVSROOT_DIRNAME}/first-dir/file2,v
done
Checking in file2;
-${TESTDIR}/cvsroot/first-dir/file2,v <-- file2
+${CVSROOT_DIRNAME}/first-dir/file2,v <-- file2
initial revision: 1\.1
done"
@@ -3188,7 +4460,7 @@ done"
echo "new file4 revision" > file4
dotest death2-13a "${testcvs} -q commit -m mod" \
"Checking in file4;
-${TESTDIR}/cvsroot/first-dir/file4,v <-- file4
+${CVSROOT_DIRNAME}/first-dir/file4,v <-- file4
new revision: 1\.2; previous revision: 1\.1
done"
@@ -3199,7 +4471,7 @@ done"
dotest death2-14 "${testcvs} -q update -r branch" \
"[UP] file1
${PROG} [a-z]*: file2 is no longer in the repository
-${PROG} [a-z]*: warning: file4 is not (any longer) pertinent"
+${PROG} [a-z]*: file4 is no longer in the repository"
# Add a file on the branch with the same name.
echo "branch revision" > file2
@@ -3208,7 +4480,7 @@ ${PROG} [a-z]*: warning: file4 is not (any longer) pertinent"
'"${PROG}"' [a-z]*: use .'"${PROG}"' commit. to add this file permanently'
dotest death2-16 "${testcvs} -q commit -m add" \
"Checking in file2;
-${TESTDIR}/cvsroot/first-dir/file2,v <-- file2
+${CVSROOT_DIRNAME}/first-dir/file2,v <-- file2
new revision: 1\.1\.2\.1; previous revision: 1\.1
done"
@@ -3218,10 +4490,10 @@ done"
"${PROG}"' [a-z]*: scheduling file `file3'\'' for addition on branch `branch'\''
'"${PROG}"' [a-z]*: use .'"${PROG}"' commit. to add this file permanently'
dotest death2-18 "${testcvs} -q commit -m add" \
-"RCS file: ${TESTDIR}/cvsroot/first-dir/Attic/file3,v
+"RCS file: ${CVSROOT_DIRNAME}/first-dir/Attic/file3,v
done
Checking in file3;
-${TESTDIR}/cvsroot/first-dir/Attic/file3,v <-- file3
+${CVSROOT_DIRNAME}/first-dir/Attic/file3,v <-- file3
new revision: 1\.1\.2\.1; previous revision: 1\.1
done"
@@ -3234,8 +4506,8 @@ done"
===================================================================
RCS file: file3
diff -N file3
-\*\*\* /dev/null[ ][ ]*[a-zA-Z0-9: ]*
---- ${tempname}[ ][ ]*[a-zA-Z0-9: ]*
+\*\*\* /dev/null ${RFCDATE_EPOCH}
+--- file3 ${RFCDATE} [0-9.]*
\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*
\*\*\* 0 \*\*\*\*
--- 1 ----
@@ -3244,12 +4516,12 @@ ${PLUS} first revision"
dotest_fail death2-diff-11 "${testcvs} -q diff -rtag -c ." \
"Index: file1
===================================================================
-RCS file: ${TESTDIR}/cvsroot/first-dir/file1,v
+RCS file: ${CVSROOT_DIRNAME}/first-dir/file1,v
retrieving revision 1\.1
retrieving revision 1\.1\.2\.2
diff -c -r1\.1 -r1\.1\.2\.2
-\*\*\* file1[ ][ ]*[a-zA-Z0-9:./ ]*
---- file1[ ][ ]*[a-zA-Z0-9:./ ]*
+\*\*\* file1 ${RFCDATE} [0-9.]*
+--- file1 ${RFCDATE} [0-9.]*
\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*
\*\*\* 1 \*\*\*\*
! first revision
@@ -3262,12 +4534,12 @@ ${PROG} [a-z]*: file4 no longer exists, no comparison available"
dotest_fail death2-diff-12 "${testcvs} -q diff -rtag -c -N ." \
"Index: file1
===================================================================
-RCS file: ${TESTDIR}/cvsroot/first-dir/file1,v
+RCS file: ${CVSROOT_DIRNAME}/first-dir/file1,v
retrieving revision 1\.1
retrieving revision 1\.1\.2\.2
diff -c -r1\.1 -r1\.1\.2\.2
-\*\*\* file1[ ][ ]*[a-zA-Z0-9:./ ]*
---- file1[ ][ ]*[a-zA-Z0-9:./ ]*
+\*\*\* file1 ${RFCDATE} [0-9.]*
+--- file1 ${RFCDATE} [0-9.]*
\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*
\*\*\* 1 \*\*\*\*
! first revision
@@ -3277,8 +4549,8 @@ Index: file2
===================================================================
RCS file: file2
diff -N file2
-\*\*\* /dev/null[ ][ ]*[a-zA-Z0-9: ]*
---- ${tempname}[ ][ ]*[a-zA-Z0-9: ]*
+\*\*\* /dev/null ${RFCDATE_EPOCH}
+--- file2 ${RFCDATE} [0-9.]*
\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*
\*\*\* 0 \*\*\*\*
--- 1 ----
@@ -3287,8 +4559,8 @@ Index: file3
===================================================================
RCS file: file3
diff -N file3
-\*\*\* /dev/null[ ][ ]*[a-zA-Z0-9: ]*
---- ${tempname}[ ][ ]*[a-zA-Z0-9: ]*
+\*\*\* /dev/null ${RFCDATE_EPOCH}
+--- file3 ${RFCDATE} [0-9.]*
\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*
\*\*\* 0 \*\*\*\*
--- 1 ----
@@ -3297,8 +4569,8 @@ Index: file4
===================================================================
RCS file: file4
diff -N file4
-\*\*\* ${tempname}[ ][ ]*[a-zA-Z0-9: ]*
---- /dev/null[ ][ ]*[a-zA-Z0-9: ]*
+\*\*\* file4 ${RFCDATE} [0-9.]*
+--- /dev/null ${RFCDATE_EPOCH}
\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*
\*\*\* 1 \*\*\*\*
- file4 first revision
@@ -3322,16 +4594,78 @@ U file4"
===================================================================
RCS file: file1
diff -N file1
-\*\*\* /dev/null[ ][ ]*[a-zA-Z0-9: ]*
---- ${tempname}[ ][ ]*[a-zA-Z0-9: ]*
+\*\*\* /dev/null ${RFCDATE_EPOCH}
+--- file1 ${RFCDATE} [0-9.]*
\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*
\*\*\* 0 \*\*\*\*
--- 1 ----
${PLUS} first revision"
+ # now back to the trunk
+ dotest death2-21 "${testcvs} -q update -A" \
+"U file2
+[UP] file4"
+
+ # test merging with a dead file
+ dotest death2-22 "${testcvs} -q co first-dir" \
+"U first-dir/file1
+U first-dir/file2
+U first-dir/file4"
+
+ cd first-dir
+ dotest death2-23 "${testcvs} rm -f file4" \
+"${PROG} [a-z]*: scheduling .file4. for removal
+${PROG} [a-z]*: use .${PROG} commit. to remove this file permanently"
+ dotest death2-24 "${testcvs} -q ci -m removed file4" \
+"Removing file4;
+${CVSROOT_DIRNAME}/first-dir/file4,v <-- file4
+new revision: delete; previous revision: 1\.2
+done"
+ cd ..
+ echo "new stuff" >file4
+ dotest_fail death2-25 "${testcvs} up file4" \
+"${PROG} [a-z]*: conflict: file4 is modified but no longer in the repository
+C file4"
+
cd .. ; rm -rf first-dir ${CVSROOT_DIRNAME}/first-dir
;;
+ rm-update-message)
+ # FIXME
+ # local CVS prints a warning message when update notices a missing
+ # file and client/server CVS doesn't. These should be identical.
+ mkdir rm-update-message; cd rm-update-message
+ mkdir $CVSROOT_DIRNAME/rm-update-message
+ dotest rm-update-message-setup-1 "$testcvs -q co rm-update-message" ''
+ cd rm-update-message
+ file=x
+ echo >$file
+ dotest rm-update-message-setup-2 "$testcvs -q add $file" \
+"$PROG [a-z]*: use .cvs commit. to add this file permanently"
+ dotest rm-update-message-setup-3 "$testcvs -q ci -mcreate $file" \
+"RCS file: $CVSROOT_DIRNAME/rm-update-message/$file,v
+done
+Checking in $file;
+$CVSROOT_DIRNAME/rm-update-message/$file,v <-- $file
+initial revision: 1\.1
+done"
+
+ rm $file
+ if $remote; then
+ dotest rm-update-message-1 "$testcvs up $file" "U $file"
+ else
+ dotest rm-update-message-1 "$testcvs up $file" \
+"$PROG [a-z]*: warning: $file was lost
+U $file"
+ fi
+
+ cd ../..
+ if $keep; then :; else
+ rm -rf rm-update-message
+ rm -rf $CVSROOT_DIRNAME/rm-update-message
+ fi
+ ;;
+
rmadd)
# More tests of adding and removing files.
# In particular ci -r.
@@ -3345,7 +4679,7 @@ ${PLUS} first revision"
dotest rmadd-1 "${testcvs} -q co -l ." ''
mkdir first-dir
dotest rmadd-2 "${testcvs} add first-dir" \
-"Directory ${TESTDIR}/cvsroot/first-dir added to the repository"
+"Directory ${CVSROOT_DIRNAME}/first-dir added to the repository"
cd first-dir
echo first file1 >file1
dotest rmadd-3 "${testcvs} add file1" \
@@ -3365,13 +4699,13 @@ ${PROG} \[[a-z]* aborted\]: correct above errors first!"
# bizarre behavior, but it would seem to be intentional
# (see commit.c). It probably could go away....
dotest rmadd-7 "${testcvs} -q ci -r 7.... -m add" \
-"RCS file: ${TESTDIR}/cvsroot/first-dir/file1,v
+"RCS file: ${CVSROOT_DIRNAME}/first-dir/file1,v
done
Checking in file1;
-${TESTDIR}/cvsroot/first-dir/file1,v <-- file1
+${CVSROOT_DIRNAME}/first-dir/file1,v <-- file1
initial revision: 7\.1
done"
- if test "$remote" = yes; then
+ if $remote; then
# I guess remote doesn't set a sticky tag in this case.
# Kind of odd, in the sense that rmadd-24a does set one
# both local and remote.
@@ -3395,10 +4729,10 @@ done"
${PROG} [a-z]*: use .${PROG} commit. to add this file permanently"
# As in the previous example, CVS is confused....
dotest rmadd-11 "${testcvs} -q ci -m add" \
-"RCS file: ${TESTDIR}/cvsroot/first-dir/file2,v
+"RCS file: ${CVSROOT_DIRNAME}/first-dir/file2,v
done
Checking in file2;
-${TESTDIR}/cvsroot/first-dir/file2,v <-- file2
+${CVSROOT_DIRNAME}/first-dir/file2,v <-- file2
initial revision: 7\.1
done"
@@ -3413,10 +4747,10 @@ ${PROG} [a-z]*: use .${PROG} commit. to add this file permanently"
${PROG} \[[a-z]* aborted\]: correct above errors first!"
# Whatever, let's not let file2 distract us....
dotest rmadd-15 "${testcvs} -q ci -r mybranch -m add file3" \
-"RCS file: ${TESTDIR}/cvsroot/first-dir/Attic/file3,v
+"RCS file: ${CVSROOT_DIRNAME}/first-dir/Attic/file3,v
done
Checking in file3;
-${TESTDIR}/cvsroot/first-dir/Attic/file3,v <-- file3
+${CVSROOT_DIRNAME}/first-dir/Attic/file3,v <-- file3
new revision: 1\.1\.2\.1; previous revision: 1\.1
done"
@@ -3445,10 +4779,10 @@ ${PROG} [a-z]*: use .${PROG} commit. to add this file permanently"
# a non-branch tag.
dotest rmadd-21 \
"${testcvs} -q ci -r mynonbranch -m add file4" \
-"RCS file: ${TESTDIR}/cvsroot/first-dir/Attic/file4,v
+"RCS file: ${CVSROOT_DIRNAME}/first-dir/Attic/file4,v
done
Checking in file4;
-${TESTDIR}/cvsroot/first-dir/Attic/file4,v <-- file4
+${CVSROOT_DIRNAME}/first-dir/Attic/file4,v <-- file4
new revision: 1\.1\.2\.1; previous revision: 1\.1
done"
@@ -3458,42 +4792,42 @@ done"
dotest rmadd-22 "${testcvs} add file5" \
"${PROG} [a-z]*: scheduling file .file5. for addition
${PROG} [a-z]*: use .${PROG} commit. to add this file permanently"
- if test "$remote" = yes; then
+ if $remote; then
# Interesting bug (or missing feature) here. findmaxrev
# gets the major revision from the Entries. Well, remote
# doesn't send the entries for files which are not involved.
- dotest rmadd-23 "${testcvs} -q ci -m add" \
-"RCS file: ${TESTDIR}/cvsroot/first-dir/file5,v
+ dotest rmadd-23r "${testcvs} -q ci -m add" \
+"RCS file: ${CVSROOT_DIRNAME}/first-dir/file5,v
done
Checking in file5;
-${TESTDIR}/cvsroot/first-dir/file5,v <-- file5
+${CVSROOT_DIRNAME}/first-dir/file5,v <-- file5
initial revision: 1\.1
done"
- dotest rmadd-23-workaround \
+ dotest rmadd-23-workaroundr \
"${testcvs} -q ci -r 7 -m bump-it file5" \
"Checking in file5;
-${TESTDIR}/cvsroot/first-dir/file5,v <-- file5
+${CVSROOT_DIRNAME}/first-dir/file5,v <-- file5
new revision: 7\.1; previous revision: 1\.1
done"
else
dotest rmadd-23 "${testcvs} -q ci -m add" \
-"RCS file: ${TESTDIR}/cvsroot/first-dir/file5,v
+"RCS file: ${CVSROOT_DIRNAME}/first-dir/file5,v
done
Checking in file5;
-${TESTDIR}/cvsroot/first-dir/file5,v <-- file5
+${CVSROOT_DIRNAME}/first-dir/file5,v <-- file5
initial revision: 7\.1
done"
fi
echo change it >file5
dotest_fail rmadd-24 "${testcvs} -q ci -r 4.8 -m change file5" \
"Checking in file5;
-${TESTDIR}/cvsroot/first-dir/file5,v <-- file5
-${PROG} [a-z]*: ${TESTDIR}/cvsroot/first-dir/file5,v: revision 4\.8 too low; must be higher than 7\.1
+${CVSROOT_DIRNAME}/first-dir/file5,v <-- file5
+${PROG} [a-z]*: ${CVSROOT_DIRNAME}/first-dir/file5,v: revision 4\.8 too low; must be higher than 7\.1
${PROG} [a-z]*: could not check in file5
7\.1 unlocked"
dotest rmadd-24a "${testcvs} -q ci -r 8.4 -m change file5" \
"Checking in file5;
-${TESTDIR}/cvsroot/first-dir/file5,v <-- file5
+${CVSROOT_DIRNAME}/first-dir/file5,v <-- file5
new revision: 8\.4; previous revision: 7\.1
done"
# I'm not really sure that a sticky tag make sense here.
@@ -3503,7 +4837,7 @@ done"
File: file5 Status: Up-to-date
Working revision: 8\.4.*
- Repository revision: 8\.4 ${TESTDIR}/cvsroot/first-dir/file5,v
+ Repository revision: 8\.4 ${CVSROOT_DIRNAME}/first-dir/file5,v
Sticky Tag: 8\.4
Sticky Date: (none)
Sticky Options: (none)"
@@ -3520,17 +4854,17 @@ File: file5 Status: Up-to-date
dotest rmadd2-1 "${testcvs} -q co -l ." ''
mkdir first-dir
dotest rmadd2-2 "${testcvs} add first-dir" \
-"Directory ${TESTDIR}/cvsroot/first-dir added to the repository"
+"Directory ${CVSROOT_DIRNAME}/first-dir added to the repository"
cd first-dir
echo 'initial contents' >file1
dotest rmadd2-3 "${testcvs} add file1" \
"${PROG} [a-z]*: scheduling file .file1. for addition
${PROG} [a-z]*: use .${PROG} commit. to add this file permanently"
dotest rmadd2-4 "${testcvs} -q ci -m add" \
-"RCS file: ${TESTDIR}/cvsroot/first-dir/file1,v
+"RCS file: ${CVSROOT_DIRNAME}/first-dir/file1,v
done
Checking in file1;
-${TESTDIR}/cvsroot/first-dir/file1,v <-- file1
+${CVSROOT_DIRNAME}/first-dir/file1,v <-- file1
initial revision: 1\.1
done"
dotest rmadd2-4a "${testcvs} -Q tag tagone" ""
@@ -3539,29 +4873,29 @@ done"
${PROG} [a-z]*: use .${PROG} commit. to remove this file permanently"
dotest rmadd2-6 "${testcvs} -q ci -m remove" \
"Removing file1;
-${TESTDIR}/cvsroot/first-dir/file1,v <-- file1
+${CVSROOT_DIRNAME}/first-dir/file1,v <-- file1
new revision: delete; previous revision: 1\.1
done"
dotest rmadd2-7 "${testcvs} -q update -j 1.2 -j 1.1 file1" "U file1"
dotest rmadd2-8 "${testcvs} -q ci -m readd" \
"Checking in file1;
-${TESTDIR}/cvsroot/first-dir/file1,v <-- file1
+${CVSROOT_DIRNAME}/first-dir/file1,v <-- file1
new revision: 1\.3; previous revision: 1\.2
done"
echo 'new contents' >file1
dotest rmadd2-9 "${testcvs} -q ci -m modify" \
"Checking in file1;
-${TESTDIR}/cvsroot/first-dir/file1,v <-- file1
+${CVSROOT_DIRNAME}/first-dir/file1,v <-- file1
new revision: 1\.4; previous revision: 1\.3
done"
dotest rmadd2-10 "${testcvs} -q update -j 1.4 -j 1.3 file1" \
-"RCS file: ${TESTDIR}/cvsroot/first-dir/file1,v
+"RCS file: ${CVSROOT_DIRNAME}/first-dir/file1,v
retrieving revision 1\.4
retrieving revision 1\.3
Merging differences between 1\.4 and 1\.3 into file1"
dotest rmadd2-11 "${testcvs} -q ci -m undo" \
"Checking in file1;
-${TESTDIR}/cvsroot/first-dir/file1,v <-- file1
+${CVSROOT_DIRNAME}/first-dir/file1,v <-- file1
new revision: 1\.5; previous revision: 1\.4
done"
dotest rmadd2-12 "cat file1" "initial contents"
@@ -3571,13 +4905,19 @@ done"
# the head.
dotest rmadd2-14 "${testcvs} -q update -j 1.3 -j 1.2 file1" \
"${PROG} [a-z]*: scheduling file1 for removal"
+
+ # Check that -p can get arbitrary revisions of a removed file
+ dotest rmadd2-14a "${testcvs} -q update -p" "initial contents"
+ dotest rmadd2-14b "${testcvs} -q update -p -r 1.5" "initial contents"
+ dotest rmadd2-14c "${testcvs} -q update -p -r 1.3" "initial contents"
+
dotest rmadd2-15 "${testcvs} -q ci -m re-remove" \
"Removing file1;
-${TESTDIR}/cvsroot/first-dir/file1,v <-- file1
+${CVSROOT_DIRNAME}/first-dir/file1,v <-- file1
new revision: delete; previous revision: 1\.5
done"
dotest rmadd2-16 "${testcvs} log -h file1" "
-RCS file: ${TESTDIR}/cvsroot/first-dir/Attic/file1,v
+RCS file: ${CVSROOT_DIRNAME}/first-dir/Attic/file1,v
Working file: file1
head: 1\.6
branch:
@@ -3593,7 +4933,7 @@ total revisions: 6
File: no file file1 Status: Up-to-date
Working revision: No entry for file1
- Repository revision: 1\.6 ${TESTDIR}/cvsroot/first-dir/Attic/file1,v
+ Repository revision: 1\.6 ${CVSROOT_DIRNAME}/first-dir/Attic/file1,v
Existing Tags:
tagone (revision: 1.1)"
@@ -3601,7 +4941,7 @@ File: no file file1 Status: Up-to-date
cd ../..
rm -r 1
- rm -rf ${TESTDIR}/cvsroot/first-dir
+ rm -rf ${CVSROOT_DIRNAME}/first-dir
;;
dirs)
@@ -3625,7 +4965,7 @@ File: no file file1 Status: Up-to-date
N dir1/file1
N dir1/sdir/sfile
No conflicts created by this import
-${PROG} [a-z]*: Importing ${TESTDIR}/cvsroot/dir1/sdir"
+${PROG} [a-z]*: Importing ${CVSROOT_DIRNAME}/dir1/sdir"
cd ..
mkdir 1; cd 1
@@ -3642,12 +4982,12 @@ ${PROG} [a-z]*: Importing ${TESTDIR}/cvsroot/dir1/sdir"
dotest dirs-3 "${testcvs} update" \
"${PROG} [a-z]*: Updating dir1
${PROG} [a-z]*: Updating dir1/sdir
-${PROG} [a-z]*: cannot open directory ${TESTDIR}/cvsroot/dir1/sdir: No such file or directory
+${PROG} [a-z]*: cannot open directory ${CVSROOT_DIRNAME}/dir1/sdir: No such file or directory
${PROG} [a-z]*: skipping directory dir1/sdir"
dotest dirs-3a "${testcvs} update -d" \
"${PROG} [a-z]*: Updating dir1
${PROG} [a-z]*: Updating dir1/sdir
-${PROG} [a-z]*: cannot open directory ${TESTDIR}/cvsroot/dir1/sdir: No such file or directory
+${PROG} [a-z]*: cannot open directory ${CVSROOT_DIRNAME}/dir1/sdir: No such file or directory
${PROG} [a-z]*: skipping directory dir1/sdir"
# If we say "yes", then CVS gives errors about not being able to
@@ -3655,7 +4995,7 @@ ${PROG} [a-z]*: skipping directory dir1/sdir"
# The fact that it says "skipping directory " rather than
# "skipping directory dir1/sdir" is some kind of bug.
echo no | dotest dirs-4 "${testcvs} release -d dir1/sdir" \
-"${PROG} [a-z]*: cannot open directory ${TESTDIR}/cvsroot/dir1/sdir: No such file or directory
+"${PROG} [a-z]*: cannot open directory ${CVSROOT_DIRNAME}/dir1/sdir: No such file or directory
${PROG} [a-z]*: skipping directory
You have \[0\] altered files in this repository\.
Are you sure you want to release (and delete) directory .dir1/sdir': .. .release' aborted by user choice."
@@ -3688,47 +5028,40 @@ D/sdir////"
dotest dirs2-1 "${testcvs} -q co -l ." ''
mkdir first-dir
dotest dirs2-2 "${testcvs} add first-dir" \
-"Directory ${TESTDIR}/cvsroot/first-dir added to the repository"
+"Directory ${CVSROOT_DIRNAME}/first-dir added to the repository"
cd first-dir
mkdir sdir
dotest dirs2-3 "${testcvs} add sdir" \
-"Directory ${TESTDIR}/cvsroot/first-dir/sdir added to the repository"
+"Directory ${CVSROOT_DIRNAME}/first-dir/sdir added to the repository"
touch sdir/file1
dotest dirs2-4 "${testcvs} add sdir/file1" \
"${PROG} [a-z]*: scheduling file .sdir/file1. for addition
${PROG} [a-z]*: use .${PROG} commit. to add this file permanently"
dotest dirs2-5 "${testcvs} -q ci -m add" \
-"RCS file: ${TESTDIR}/cvsroot/first-dir/sdir/file1,v
+"RCS file: ${CVSROOT_DIRNAME}/first-dir/sdir/file1,v
done
Checking in sdir/file1;
-${TESTDIR}/cvsroot/first-dir/sdir/file1,v <-- file1
+${CVSROOT_DIRNAME}/first-dir/sdir/file1,v <-- file1
initial revision: 1\.1
done"
rm -r sdir/CVS
- if test "$remote" = yes; then
+ if $remote; then
# This is just like conflicts3-23
dotest_fail dirs2-6 "${testcvs} update -d" \
"${QUESTION} sdir
${PROG} server: Updating \.
-${PROG} update: in directory sdir:
-${PROG} update: cannot open CVS/Entries for reading: No such file or directory
${PROG} server: Updating sdir
${PROG} update: move away sdir/file1; it is in the way
C sdir/file1"
rm sdir/file1
+ rm -r sdir/CVS
# This is where things are not just like conflicts3-23
- # As with conflicts3-23, all these CVS/Entries* warnings
- # are somewhat doubtful, and we probably should think some
- # about whether they should be changed/fixed.
dotest dirs2-7 "${testcvs} update -d" \
"${QUESTION} sdir
${PROG} server: Updating \.
-${PROG} update: in directory sdir:
-${PROG} update: cannot open CVS/Entries for reading: No such file or directory
${PROG} server: Updating sdir
-U sdir/file1
-${PROG} update: cannot open CVS/Entries.Log: No such file or directory"
+U sdir/file1"
else
dotest dirs2-6 "${testcvs} update -d" \
"${PROG} update: Updating \.
@@ -3746,7 +5079,7 @@ ${QUESTION} sdir"
cd first-dir
dotest dirs2-9 "${testcvs} -q tag -b br" "T sdir/file1"
rm -r sdir/CVS
- if test "$remote" = yes; then
+ if $remote; then
# Cute little quirk of val-tags; if we don't recurse into
# the directories where the tag is defined, val-tags won't
# get updated.
@@ -3759,14 +5092,9 @@ ${PROG} \[server aborted\]: no such tag br"
dotest_fail dirs2-10-again "${testcvs} update -d -r br" \
"${QUESTION} sdir
${PROG} server: Updating \.
-${PROG} update: in directory sdir:
-${PROG} update: cannot open CVS/Entries for reading: No such file or directory
-${PROG} update: cannot open CVS/Tag: No such file or directory
-${PROG} update: cannot open CVS/Tag: No such file or directory
${PROG} server: Updating sdir
${PROG} update: move away sdir/file1; it is in the way
-C sdir/file1
-${PROG} update: cannot open CVS/Tag: No such file or directory"
+C sdir/file1"
else
dotest_fail dirs2-10 "${testcvs} update -d -r br" \
"${PROG} update: in directory sdir:
@@ -3790,20 +5118,15 @@ ${PROG} \[update aborted\]: there is no version here; do '${PROG} checkout' firs
${PROG} [a-z]*: use .${PROG} commit. to remove this file permanently"
dotest dirs2-13 "${testcvs} -q ci -m remove" \
"Removing sdir/file1;
-${TESTDIR}/cvsroot/first-dir/sdir/file1,v <-- file1
+${CVSROOT_DIRNAME}/first-dir/sdir/file1,v <-- file1
new revision: delete; previous revision: 1\.1\.2
done"
cd ../../2/first-dir
- if test "$remote" = yes; then
+ if $remote; then
dotest dirs2-14 "${testcvs} update -d -r br" \
-"${QUESTION} sdir
+"${QUESTION} sdir/file1
${PROG} server: Updating \.
-${PROG} update: in directory sdir:
-${PROG} update: cannot open CVS/Entries for reading: No such file or directory
-${PROG} update: cannot open CVS/Tag: No such file or directory
-${PROG} update: cannot open CVS/Tag: No such file or directory
-${PROG} server: Updating sdir
-${PROG} update: cannot open CVS/Tag: No such file or directory"
+${PROG} server: Updating sdir"
else
dotest dirs2-14 "${testcvs} update -d -r br" \
"${PROG} update: Updating \.
@@ -3812,7 +5135,7 @@ ${QUESTION} sdir"
cd ../..
rm -r 1 2 3
- rm -rf ${TESTDIR}/cvsroot/first-dir
+ rm -rf ${CVSROOT_DIRNAME}/first-dir
;;
branches)
@@ -3832,35 +5155,35 @@ ${QUESTION} sdir"
'"${PROG}"' [a-z]*: use .'"${PROG}"' commit. to add these files permanently'
dotest branches-2a "${testcvs} -n -q ci -m dont-commit" ""
dotest_lit branches-3 "${testcvs} -q ci -m add-it" <<HERE
-RCS file: ${TESTDIR}/cvsroot/first-dir/file1,v
+RCS file: ${CVSROOT_DIRNAME}/first-dir/file1,v
done
Checking in file1;
-${TESTDIR}/cvsroot/first-dir/file1,v <-- file1
+${CVSROOT_DIRNAME}/first-dir/file1,v <-- file1
initial revision: 1.1
done
-RCS file: ${TESTDIR}/cvsroot/first-dir/file2,v
+RCS file: ${CVSROOT_DIRNAME}/first-dir/file2,v
done
Checking in file2;
-${TESTDIR}/cvsroot/first-dir/file2,v <-- file2
+${CVSROOT_DIRNAME}/first-dir/file2,v <-- file2
initial revision: 1.1
done
-RCS file: ${TESTDIR}/cvsroot/first-dir/file3,v
+RCS file: ${CVSROOT_DIRNAME}/first-dir/file3,v
done
Checking in file3;
-${TESTDIR}/cvsroot/first-dir/file3,v <-- file3
+${CVSROOT_DIRNAME}/first-dir/file3,v <-- file3
initial revision: 1.1
done
-RCS file: ${TESTDIR}/cvsroot/first-dir/file4,v
+RCS file: ${CVSROOT_DIRNAME}/first-dir/file4,v
done
Checking in file4;
-${TESTDIR}/cvsroot/first-dir/file4,v <-- file4
+${CVSROOT_DIRNAME}/first-dir/file4,v <-- file4
initial revision: 1.1
done
HERE
echo 4:trunk-2 >file4
dotest branches-3.2 "${testcvs} -q ci -m trunk-before-branch" \
"Checking in file4;
-${TESTDIR}/cvsroot/first-dir/file4,v <-- file4
+${CVSROOT_DIRNAME}/first-dir/file4,v <-- file4
new revision: 1\.2; previous revision: 1\.1
done"
# The "cvs log file4" in test branches-14.3 will test that we
@@ -3886,15 +5209,15 @@ M file1"
echo 4:br1 >file4
dotest branches-6 "${testcvs} -q ci -m modify" \
"Checking in file1;
-${TESTDIR}/cvsroot/first-dir/file1,v <-- file1
+${CVSROOT_DIRNAME}/first-dir/file1,v <-- file1
new revision: 1\.1\.2\.1; previous revision: 1\.1
done
Checking in file2;
-${TESTDIR}/cvsroot/first-dir/file2,v <-- file2
+${CVSROOT_DIRNAME}/first-dir/file2,v <-- file2
new revision: 1\.1\.2\.1; previous revision: 1\.1
done
Checking in file4;
-${TESTDIR}/cvsroot/first-dir/file4,v <-- file4
+${CVSROOT_DIRNAME}/first-dir/file4,v <-- file4
new revision: 1\.2\.2\.1; previous revision: 1\.2
done"
dotest branches-7 "${testcvs} -q tag -b brbr" 'T file1
@@ -3906,11 +5229,11 @@ T file4'
echo 4:brbr >file4
dotest branches-9 "${testcvs} -q ci -m modify" \
"Checking in file1;
-${TESTDIR}/cvsroot/first-dir/file1,v <-- file1
+${CVSROOT_DIRNAME}/first-dir/file1,v <-- file1
new revision: 1\.1\.2\.1\.2\.1; previous revision: 1\.1\.2\.1
done
Checking in file4;
-${TESTDIR}/cvsroot/first-dir/file4,v <-- file4
+${CVSROOT_DIRNAME}/first-dir/file4,v <-- file4
new revision: 1\.2\.2\.1\.2\.1; previous revision: 1\.2\.2\.1
done"
dotest branches-10 "cat file1 file2 file3 file4" '1:brbr
@@ -3927,7 +5250,7 @@ done"
echo 4:br1-2 >file4
dotest branches-12.2 "${testcvs} -q ci -m change-on-br1" \
"Checking in file4;
-${TESTDIR}/cvsroot/first-dir/file4,v <-- file4
+${CVSROOT_DIRNAME}/first-dir/file4,v <-- file4
new revision: 1\.2\.2\.2; previous revision: 1\.2\.2\.1
done"
dotest branches-13 "${testcvs} -q update -A" '[UP] file1
@@ -3941,12 +5264,12 @@ done"
dotest branches-14.2 \
"${testcvs} -q ci -m trunk-change-after-branch" \
"Checking in file4;
-${TESTDIR}/cvsroot/first-dir/file4,v <-- file4
+${CVSROOT_DIRNAME}/first-dir/file4,v <-- file4
new revision: 1\.3; previous revision: 1\.2
done"
dotest branches-14.3 "${testcvs} log file4" \
"
-RCS file: ${TESTDIR}/cvsroot/first-dir/file4,v
+RCS file: ${CVSROOT_DIRNAME}/first-dir/file4,v
Working file: file4
head: 1\.3
branch:
@@ -3989,12 +5312,12 @@ modify
"${testcvs} diff -c -r 1.1 -r 1.3 file4" \
"Index: file4
===================================================================
-RCS file: ${TESTDIR}/cvsroot/first-dir/file4,v
+RCS file: ${CVSROOT_DIRNAME}/first-dir/file4,v
retrieving revision 1\.1
retrieving revision 1\.3
diff -c -r1\.1 -r1\.3
-\*\*\* file4 [0-9/]* [0-9:]* 1\.1
---- file4 [0-9/]* [0-9:]* 1\.3
+\*\*\* file4 ${RFCDATE} 1\.1
+--- file4 ${RFCDATE} 1\.3
\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*
\*\*\* 1 \*\*\*\*
! 4:trunk-1
@@ -4004,12 +5327,12 @@ diff -c -r1\.1 -r1\.3
"${testcvs} diff -c -r 1.1 -r 1.2.2.1 file4" \
"Index: file4
===================================================================
-RCS file: ${TESTDIR}/cvsroot/first-dir/file4,v
+RCS file: ${CVSROOT_DIRNAME}/first-dir/file4,v
retrieving revision 1\.1
retrieving revision 1\.2\.2\.1
diff -c -r1\.1 -r1\.2\.2\.1
-\*\*\* file4 [0-9/]* [0-9:]* 1\.1
---- file4 [0-9/]* [0-9:]* 1\.2\.2\.1
+\*\*\* file4 ${RFCDATE} 1\.1
+--- file4 ${RFCDATE} 1\.2\.2\.1
\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*
\*\*\* 1 \*\*\*\*
! 4:trunk-1
@@ -4017,7 +5340,7 @@ diff -c -r1\.1 -r1\.2\.2\.1
! 4:br1"
dotest branches-15 \
"${testcvs} update -j 1.1.2.1 -j 1.1.2.1.2.1 file1" \
- "RCS file: ${TESTDIR}/cvsroot/first-dir/file1,v
+ "RCS file: ${CVSROOT_DIRNAME}/first-dir/file1,v
retrieving revision 1\.1\.2\.1
retrieving revision 1\.1\.2\.1\.2\.1
Merging differences between 1\.1\.2\.1 and 1\.1\.2\.1\.2\.1 into file1
@@ -4029,17 +5352,17 @@ rcsmerge: warning: conflicts during merge"
[>]>>>>>> 1\.1\.2\.1\.2\.1'
dotest branches-o1 "${testcvs} -q admin -o ::brbr" \
-"RCS file: ${TESTDIR}/cvsroot/first-dir/file1,v
+"RCS file: ${CVSROOT_DIRNAME}/first-dir/file1,v
done
-RCS file: ${TESTDIR}/cvsroot/first-dir/file2,v
+RCS file: ${CVSROOT_DIRNAME}/first-dir/file2,v
done
-RCS file: ${TESTDIR}/cvsroot/first-dir/file3,v
+RCS file: ${CVSROOT_DIRNAME}/first-dir/file3,v
done
-RCS file: ${TESTDIR}/cvsroot/first-dir/file4,v
+RCS file: ${CVSROOT_DIRNAME}/first-dir/file4,v
done"
cd ..
- if test "$keep" = yes; then
+ if $keep; then
echo Keeping ${TESTDIR} and exiting due to --keep
exit 0
fi
@@ -4066,10 +5389,10 @@ done"
"${PROG} [a-z]*: scheduling file .file1. for addition
${PROG} [a-z]*: use .${PROG} commit. to add this file permanently"
dotest branches2-3 "${testcvs} commit -m add file1" \
-"RCS file: ${TESTDIR}/cvsroot/first-dir/file1,v
+"RCS file: ${CVSROOT_DIRNAME}/first-dir/file1,v
done
Checking in file1;
-${TESTDIR}/cvsroot/first-dir/file1,v <-- file1
+${CVSROOT_DIRNAME}/first-dir/file1,v <-- file1
initial revision: 1\.1
done"
@@ -4092,23 +5415,23 @@ done"
'"${PROG}"' [a-z]*: use .'"${PROG}"' commit. to add this file permanently'
mkdir dir1
dotest branches2-9 "${testcvs} add dir1" \
-"Directory ${TESTDIR}/cvsroot/first-dir/dir1 added to the repository
+"Directory ${CVSROOT_DIRNAME}/first-dir/dir1 added to the repository
--> Using per-directory sticky tag "'`'"b1'"
echo "file3 first revision" > dir1/file3
dotest branches2-10 "${testcvs} add dir1/file3" \
"${PROG}"' [a-z]*: scheduling file `dir1/file3'\'' for addition on branch `b1'\''
'"${PROG}"' [a-z]*: use .'"${PROG}"' commit. to add this file permanently'
dotest branches2-11 "${testcvs} -q ci -madd ." \
-"RCS file: ${TESTDIR}/cvsroot/first-dir/Attic/file2,v
+"RCS file: ${CVSROOT_DIRNAME}/first-dir/Attic/file2,v
done
Checking in file2;
-${TESTDIR}/cvsroot/first-dir/Attic/file2,v <-- file2
+${CVSROOT_DIRNAME}/first-dir/Attic/file2,v <-- file2
new revision: 1\.1\.2\.1; previous revision: 1\.1
done
-RCS file: ${TESTDIR}/cvsroot/first-dir/dir1/Attic/file3,v
+RCS file: ${CVSROOT_DIRNAME}/first-dir/dir1/Attic/file3,v
done
Checking in dir1/file3;
-${TESTDIR}/cvsroot/first-dir/dir1/Attic/file3,v <-- file3
+${CVSROOT_DIRNAME}/first-dir/dir1/Attic/file3,v <-- file3
new revision: 1\.1\.2\.1; previous revision: 1\.1
done"
@@ -4128,7 +5451,7 @@ U dir1/file3"
File: file1 Status: Up-to-date
Working revision: 1\.1.*
- Repository revision: 1\.1 ${TESTDIR}/cvsroot/first-dir/file1,v
+ Repository revision: 1\.1 ${CVSROOT_DIRNAME}/first-dir/file1,v
Sticky Tag: b2 (branch: 1\.1\.4)
Sticky Date: (none)
Sticky Options: (none)
@@ -4137,7 +5460,7 @@ File: file1 Status: Up-to-date
File: file3 Status: Up-to-date
Working revision: 1\.1\.2\.1.*
- Repository revision: 1\.1\.2\.1 ${TESTDIR}/cvsroot/first-dir/dir1/Attic/file3,v
+ Repository revision: 1\.1\.2\.1 ${CVSROOT_DIRNAME}/first-dir/dir1/Attic/file3,v
Sticky Tag: b1 (branch: 1\.1\.2)
Sticky Date: (none)
Sticky Options: (none)"
@@ -4159,7 +5482,7 @@ U dir1/file3"
File: file1 Status: Up-to-date
Working revision: 1\.1.*
- Repository revision: 1\.1 ${TESTDIR}/cvsroot/first-dir/file1,v
+ Repository revision: 1\.1 ${CVSROOT_DIRNAME}/first-dir/file1,v
Sticky Tag: b2 (branch: 1\.1\.4)
Sticky Date: (none)
Sticky Options: (none)
@@ -4185,7 +5508,7 @@ U dir1/file3"
File: file1 Status: Up-to-date
Working revision: 1\.1.*
- Repository revision: 1\.1 ${TESTDIR}/cvsroot/first-dir/file1,v
+ Repository revision: 1\.1 ${CVSROOT_DIRNAME}/first-dir/file1,v
Sticky Tag: (none)
Sticky Date: (none)
Sticky Options: (none)
@@ -4194,7 +5517,7 @@ File: file1 Status: Up-to-date
File: file3 Status: Up-to-date
Working revision: 1\.1\.2\.1.*
- Repository revision: 1\.1\.2\.1 ${TESTDIR}/cvsroot/first-dir/dir1/Attic/file3,v
+ Repository revision: 1\.1\.2\.1 ${CVSROOT_DIRNAME}/first-dir/dir1/Attic/file3,v
Sticky Tag: b1 (branch: 1\.1\.2)
Sticky Date: (none)
Sticky Options: (none)"
@@ -4208,7 +5531,7 @@ U dir1/file3"
File: file1 Status: Up-to-date
Working revision: 1\.1.*
- Repository revision: 1\.1 ${TESTDIR}/cvsroot/first-dir/file1,v
+ Repository revision: 1\.1 ${CVSROOT_DIRNAME}/first-dir/file1,v
Sticky Tag: (none)
Sticky Date: (none)
Sticky Options: (none)
@@ -4217,7 +5540,7 @@ File: file1 Status: Up-to-date
File: file3 Status: Locally Added
Working revision: New file!
- Repository revision: 1\.1 ${TESTDIR}/cvsroot/first-dir/dir1/Attic/file3,v
+ Repository revision: 1\.1 ${CVSROOT_DIRNAME}/first-dir/dir1/Attic/file3,v
Sticky Tag: (none)
Sticky Date: (none)
Sticky Options: (none)"
@@ -4243,17 +5566,17 @@ U first-dir/dir1/file3'
cd first-dir
mkdir dir2
dotest branches2-25 "${testcvs} add dir2" \
-"Directory ${TESTDIR}/cvsroot/first-dir/dir2 added to the repository
+"Directory ${CVSROOT_DIRNAME}/first-dir/dir2 added to the repository
--> Using per-directory sticky tag "'`'"b1'"
echo "file4 first revision" > dir2/file4
dotest branches2-26 "${testcvs} add dir2/file4" \
"${PROG}"' [a-z]*: scheduling file `dir2/file4'\'' for addition on branch `b1'\''
'"${PROG}"' [a-z]*: use .'"${PROG}"' commit. to add this file permanently'
dotest branches2-27 "${testcvs} -q commit -madd" \
-"RCS file: ${TESTDIR}/cvsroot/first-dir/dir2/Attic/file4,v
+"RCS file: ${CVSROOT_DIRNAME}/first-dir/dir2/Attic/file4,v
done
Checking in dir2/file4;
-${TESTDIR}/cvsroot/first-dir/dir2/Attic/file4,v <-- file4
+${CVSROOT_DIRNAME}/first-dir/dir2/Attic/file4,v <-- file4
new revision: 1\.1\.2\.1; previous revision: 1\.1
done"
@@ -4267,7 +5590,7 @@ U dir2/file4"
File: file4 Status: Up-to-date
Working revision: 1\.1\.2\.1.*
- Repository revision: 1\.1\.2\.1 ${TESTDIR}/cvsroot/first-dir/dir2/Attic/file4,v
+ Repository revision: 1\.1\.2\.1 ${CVSROOT_DIRNAME}/first-dir/dir2/Attic/file4,v
Sticky Tag: b1 (branch: 1\.1\.2)
Sticky Date: (none)
Sticky Options: (none)"
@@ -4288,10 +5611,10 @@ File: file4 Status: Up-to-date
"${PROG}"' [a-z]*: scheduling file `file5'\'' for addition
'"${PROG}"' [a-z]*: use .'"${PROG}"' commit. to add this file permanently'
dotest branches2-35 "${testcvs} -q commit -madd" \
-"RCS file: ${TESTDIR}/cvsroot/first-dir/dir2/file5,v
+"RCS file: ${CVSROOT_DIRNAME}/first-dir/dir2/file5,v
done
Checking in file5;
-${TESTDIR}/cvsroot/first-dir/dir2/file5,v <-- file5
+${CVSROOT_DIRNAME}/first-dir/dir2/file5,v <-- file5
initial revision: 1\.1
done"
@@ -4303,7 +5626,7 @@ done"
File: file5 Status: Up-to-date
Working revision: 1\.1.*
- Repository revision: 1\.1 ${TESTDIR}/cvsroot/first-dir/dir2/file5,v
+ Repository revision: 1\.1 ${CVSROOT_DIRNAME}/first-dir/dir2/file5,v
Sticky Tag: (none)
Sticky Date: (none)
Sticky Options: (none)"
@@ -4320,17 +5643,17 @@ File: file5 Status: Up-to-date
dotest tagc-1 "${testcvs} -q co -l ." ''
mkdir first-dir
dotest tagc-2 "${testcvs} add first-dir" \
-"Directory ${TESTDIR}/cvsroot/first-dir added to the repository"
+"Directory ${CVSROOT_DIRNAME}/first-dir added to the repository"
cd first-dir
touch file1
dotest tagc-3 "${testcvs} add file1" \
"${PROG} [a-z]*: scheduling file .file1. for addition
${PROG} [a-z]*: use .${PROG} commit. to add this file permanently"
dotest tagc-4 "${testcvs} -q ci -m add" \
-"RCS file: ${TESTDIR}/cvsroot/first-dir/file1,v
+"RCS file: ${CVSROOT_DIRNAME}/first-dir/file1,v
done
Checking in file1;
-${TESTDIR}/cvsroot/first-dir/file1,v <-- file1
+${CVSROOT_DIRNAME}/first-dir/file1,v <-- file1
initial revision: 1\.1
done"
dotest tagc-5 "${testcvs} -q tag -c tag1" "T file1"
@@ -4350,16 +5673,11 @@ ${PROG} \[[a-z]* aborted\]: correct the above errors first!"
cd ../1/first-dir
dotest tagc-9 "${testcvs} -q ci -m modify" \
"Checking in file1;
-${TESTDIR}/cvsroot/first-dir/file1,v <-- file1
+${CVSROOT_DIRNAME}/first-dir/file1,v <-- file1
new revision: 1\.2; previous revision: 1\.1
done"
cd ../../2/first-dir
- # That this is an error is a bug. Although the bug has existed
- # since tag -c was created, I don't think there would be a
- # compatibility problem with just fixing it.
- dotest_fail tagc-10 "${testcvs} -q tag -c tag4" \
-"${PROG} [a-z]*: file1 is locally modified
-${PROG} \[[a-z]* aborted\]: correct the above errors first!"
+ dotest tagc-10 "${testcvs} -q tag -c tag4" "T file1"
cd ../..
rm -r 1 2
@@ -4375,7 +5693,7 @@ ${PROG} \[[a-z]* aborted\]: correct the above errors first!"
dotest tagf-1 "${testcvs} -q co -l ." ''
mkdir first-dir
dotest tagf-2 "${testcvs} add first-dir" \
-"Directory ${TESTDIR}/cvsroot/first-dir added to the repository"
+"Directory ${CVSROOT_DIRNAME}/first-dir added to the repository"
cd first-dir
touch file1 file2
dotest tagf-3 "${testcvs} add file1 file2" \
@@ -4383,16 +5701,16 @@ ${PROG} \[[a-z]* aborted\]: correct the above errors first!"
${PROG} [a-z]*: scheduling file .file2. for addition
${PROG} [a-z]*: use .${PROG} commit. to add these files permanently"
dotest tagf-4 "${testcvs} -q ci -m add" \
-"RCS file: ${TESTDIR}/cvsroot/first-dir/file1,v
+"RCS file: ${CVSROOT_DIRNAME}/first-dir/file1,v
done
Checking in file1;
-${TESTDIR}/cvsroot/first-dir/file1,v <-- file1
+${CVSROOT_DIRNAME}/first-dir/file1,v <-- file1
initial revision: 1\.1
done
-RCS file: ${TESTDIR}/cvsroot/first-dir/file2,v
+RCS file: ${CVSROOT_DIRNAME}/first-dir/file2,v
done
Checking in file2;
-${TESTDIR}/cvsroot/first-dir/file2,v <-- file2
+${CVSROOT_DIRNAME}/first-dir/file2,v <-- file2
initial revision: 1\.1
done"
@@ -4404,11 +5722,11 @@ T file2"
echo brmod >> file2
dotest tagf-7 "${testcvs} -q ci -m modify" \
"Checking in file1;
-${TESTDIR}/cvsroot/first-dir/file1,v <-- file1
+${CVSROOT_DIRNAME}/first-dir/file1,v <-- file1
new revision: 1\.1\.2\.1; previous revision: 1\.1
done
Checking in file2;
-${TESTDIR}/cvsroot/first-dir/file2,v <-- file2
+${CVSROOT_DIRNAME}/first-dir/file2,v <-- file2
new revision: 1\.1\.2\.1; previous revision: 1\.1
done"
# Here we make it a non-branch tag. Some think this should
@@ -4424,7 +5742,7 @@ T file2"
File: file1 Status: Locally Modified
Working revision: 1\.1\.2\.1.*
- Repository revision: 1\.1\.2\.1 ${TESTDIR}/cvsroot/first-dir/file1,v
+ Repository revision: 1\.1\.2\.1 ${CVSROOT_DIRNAME}/first-dir/file1,v
Sticky Tag: br (revision: 1\.1\.2\.1)
Sticky Date: (none)
Sticky Options: (none)
@@ -4441,13 +5759,13 @@ D file2"
dotest tagf-11 "${testcvs} -q tag -r 1.1 -b br file1" "T file1"
# Fix it with admin -n (cf admin-18, admin-26-4).
dotest tagf-12 "${testcvs} -q admin -nbr:1.1.2 file2" \
-"RCS file: ${TESTDIR}/cvsroot/first-dir/file2,v
+"RCS file: ${CVSROOT_DIRNAME}/first-dir/file2,v
done"
# Another variation on the file2 test would be to use two working
# directories so that the update -r br would need to
# a merge to get from 1.1.2.1 to the head of the 1.1.2 branch.
dotest tagf-13 "${testcvs} -q update -r br" \
-"RCS file: ${TESTDIR}/cvsroot/first-dir/file1,v
+"RCS file: ${CVSROOT_DIRNAME}/first-dir/file1,v
retrieving revision 1\.1\.2\.1
retrieving revision 1\.1
Merging differences between 1\.1\.2\.1 and 1\.1 into file1
@@ -4467,11 +5785,11 @@ moremod
echo resolve >file1
dotest tagf-15 "${testcvs} -q ci -m recovered" \
"Checking in file1;
-${TESTDIR}/cvsroot/first-dir/file1,v <-- file1
+${CVSROOT_DIRNAME}/first-dir/file1,v <-- file1
new revision: 1\.1\.4\.1; previous revision: 1\.1
done
Checking in file2;
-${TESTDIR}/cvsroot/first-dir/file2,v <-- file2
+${CVSROOT_DIRNAME}/first-dir/file2,v <-- file2
new revision: 1\.1\.2\.2; previous revision: 1\.1\.2\.1
done"
cd ../..
@@ -4495,17 +5813,17 @@ done"
"${PROG} [a-z]*: scheduling file .foo\.c. for addition
${PROG} [a-z]*: use .${PROG} commit. to add this file permanently"
dotest rcsdiff-3 "${testcvs} commit -m rev1 foo.c" \
-"RCS file: ${TESTDIR}/cvsroot/first-dir/foo\.c,v
+"RCS file: ${CVSROOT_DIRNAME}/first-dir/foo\.c,v
done
Checking in foo\.c;
-${TESTDIR}/cvsroot/first-dir/foo.c,v <-- foo\.c
+${CVSROOT_DIRNAME}/first-dir/foo.c,v <-- foo\.c
initial revision: 1\.1
done"
dotest rcsdiff-4 "${testcvs} tag first foo.c" "T foo\.c"
dotest rcsdiff-5 "${testcvs} update -p -r first foo.c" \
"===================================================================
Checking out foo\.c
-RCS: ${TESTDIR}/cvsroot/first-dir/foo\.c,v
+RCS: ${CVSROOT_DIRNAME}/first-dir/foo\.c,v
VERS: 1\.1
\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*
I am the first foo, and my name is \$""Name: first \$\."
@@ -4513,14 +5831,14 @@ I am the first foo, and my name is \$""Name: first \$\."
echo "I am the second foo, and my name is $""Name$." > foo.c
dotest rcsdiff-6 "${testcvs} commit -m rev2 foo.c" \
"Checking in foo\.c;
-${TESTDIR}/cvsroot/first-dir/foo\.c,v <-- foo\.c
+${CVSROOT_DIRNAME}/first-dir/foo\.c,v <-- foo\.c
new revision: 1\.2; previous revision: 1\.1
done"
dotest rcsdiff-7 "${testcvs} tag second foo.c" "T foo\.c"
dotest rcsdiff-8 "${testcvs} update -p -r second foo.c" \
"===================================================================
Checking out foo\.c
-RCS: ${TESTDIR}/cvsroot/first-dir/foo\.c,v
+RCS: ${CVSROOT_DIRNAME}/first-dir/foo\.c,v
VERS: 1\.2
\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*
I am the second foo, and my name is \$""Name: second \$\."
@@ -4529,7 +5847,7 @@ I am the second foo, and my name is \$""Name: second \$\."
"${PROG} [a-z]*: Diffing \.
Index: foo\.c
===================================================================
-RCS file: ${TESTDIR}/cvsroot/first-dir/foo\.c,v
+RCS file: ${CVSROOT_DIRNAME}/first-dir/foo\.c,v
retrieving revision 1\.1
retrieving revision 1\.2
diff -r1\.1 -r1\.2
@@ -4543,7 +5861,7 @@ diff -r1\.1 -r1\.2
"${PROG} [a-z]*: Diffing \.
Index: foo\.c
===================================================================
-RCS file: ${TESTDIR}/cvsroot/first-dir/foo\.c,v
+RCS file: ${CVSROOT_DIRNAME}/first-dir/foo\.c,v
retrieving revision 1\.1
diff -r1\.1 foo\.c
1c1
@@ -4570,10 +5888,10 @@ EOF
dotest rcslib-diffrgx-1 "${testcvs} -q add -m '' rgx.c" \
"${PROG} [a-z]*: use .${PROG} commit. to add this file permanently"
dotest rcslib-diffrgx-2 "${testcvs} -q ci -m '' rgx.c" \
-"RCS file: ${TESTDIR}/cvsroot/first-dir/rgx\.c,v
+"RCS file: ${CVSROOT_DIRNAME}/first-dir/rgx\.c,v
done
Checking in rgx\.c;
-${TESTDIR}/cvsroot/first-dir/rgx\.c,v <-- rgx\.c
+${CVSROOT_DIRNAME}/first-dir/rgx\.c,v <-- rgx\.c
initial revision: 1\.1
done"
cat >rgx.c <<EOF
@@ -4589,11 +5907,11 @@ EOF
dotest_fail rcslib-diffrgx-3 "${testcvs} diff -c -F'.*(' rgx.c" \
"Index: rgx\.c
===================================================================
-RCS file: ${TESTDIR}/cvsroot/first-dir/rgx\.c,v
+RCS file: ${CVSROOT_DIRNAME}/first-dir/rgx\.c,v
retrieving revision 1\.1
diff -c -F\.\*( -r1\.1 rgx\.c
-\*\*\* rgx\.c [0-9/]* [0-9:]* 1\.1
---- rgx\.c [0-9/]* [0-9:]*
+\*\*\* rgx\.c ${RFCDATE} 1\.1
+--- rgx\.c ${RFCDATE}
\*\*\*\*\*\*\*\*\*\*\*\*\*\*\* test_regex (whiz, bang)
\*\*\* 3,7 \*\*\*\*
foo;
@@ -4622,7 +5940,7 @@ diff -c -F\.\*( -r1\.1 rgx\.c
dotest rcslib-merge-1 "${testcvs} -q co -l ." ""
mkdir first-dir
dotest rcslib-merge-2 "${testcvs} -q add first-dir" \
-"Directory ${TESTDIR}/cvsroot.*/first-dir added to the repository"
+"Directory ${CVSROOT_DIRNAME}.*/first-dir added to the repository"
cd ..; rm -r 1
dotest rcslib-merge-3 "${testcvs} -q co first-dir" ""
@@ -4634,16 +5952,16 @@ diff -c -F\.\*( -r1\.1 rgx\.c
dotest rcslib-merge-4 "${testcvs} -q add file1" \
"${PROG} [a-z]*: use .${PROG} commit. to add this file permanently"
dotest rcslib-merge-5 "${testcvs} -q commit -m '' file1" \
-"RCS file: ${TESTDIR}/cvsroot/first-dir/file1,v
+"RCS file: ${CVSROOT_DIRNAME}/first-dir/file1,v
done
Checking in file1;
-${TESTDIR}/cvsroot/first-dir/file1,v <-- file1
+${CVSROOT_DIRNAME}/first-dir/file1,v <-- file1
initial revision: 1\.1
done"
sed -e 's/2/two/' file1 > f; mv f file1
dotest rcslib-merge-6 "${testcvs} -q commit -m '' file1" \
"Checking in file1;
-${TESTDIR}/cvsroot/first-dir/file1,v <-- file1
+${CVSROOT_DIRNAME}/first-dir/file1,v <-- file1
new revision: 1\.2; previous revision: 1\.1
done"
dotest rcslib-merge-7 "${testcvs} -q tag -b -r 1.1 patch1" "T file1"
@@ -4653,7 +5971,7 @@ done"
File: file1 Status: Up-to-date
Working revision: 1\.1.*
- Repository revision: 1\.1 ${TESTDIR}/cvsroot/first-dir/file1,v
+ Repository revision: 1\.1 ${CVSROOT_DIRNAME}/first-dir/file1,v
Sticky Tag: patch1 (branch: 1\.1\.2)
Sticky Date: (none)
Sticky Options: (none)"
@@ -4664,12 +5982,12 @@ File: file1 Status: Up-to-date
sed -e 's/3/three/' file1 > f; mv f file1
dotest rcslib-merge-11 "${testcvs} -q commit -m '' file1" \
"Checking in file1;
-${TESTDIR}/cvsroot/first-dir/file1,v <-- file1
+${CVSROOT_DIRNAME}/first-dir/file1,v <-- file1
new revision: 1\.1\.2\.1; previous revision: 1\.1
done"
dotest rcslib-merge-12 "${testcvs} -q update -kv -j1.2" \
"U file1
-RCS file: ${TESTDIR}/cvsroot/first-dir/file1,v
+RCS file: ${CVSROOT_DIRNAME}/first-dir/file1,v
retrieving revision 1\.1
retrieving revision 1\.2
Merging differences between 1\.1 and 1\.2 into file1
@@ -4691,7 +6009,7 @@ two
echo "This is a change" >> file2
dotest rcslib-symlink-3 "${testcvs} ci -m because file2" \
"Checking in file2;
-${TESTDIR}/cvsroot/first-dir/file1,v <-- file2
+${CVSROOT_DIRNAME}/first-dir/file1,v <-- file2
new revision: 1\.1\.2\.2; previous revision: 1\.1\.2\.1
done"
dotest rcslib-symlink-4 "ls -l $CVSROOT_DIRNAME/first-dir/file2,v" \
@@ -4722,7 +6040,7 @@ U first-dir/file2"
${PROG} [a-z]*: use .${PROG} commit. to remove this file permanently"
dotest rcslib-symlink-9 "${testcvs} -q ci -m rm-it" \
"Removing file2;
-${TESTDIR}/cvsroot/first-dir/file1,v <-- file2
+${CVSROOT_DIRNAME}/first-dir/file1,v <-- file2
new revision: delete; previous revision: 1\.2
done"
# OK, why this message happens twice is relatively clear
@@ -4737,7 +6055,7 @@ ${PROG} [a-z]*: could not read RCS file for first-dir/file2"
cd ..
- if test "$keep" = yes; then
+ if $keep; then
echo Keeping ${TESTDIR} and exiting due to --keep
exit 0
fi
@@ -4757,10 +6075,10 @@ ${PROG} [a-z]*: could not read RCS file for first-dir/file2"
"${PROG}"' [a-z]*: scheduling file `file1'\'' for addition
'"${PROG}"' [a-z]*: use .'"${PROG}"' commit. to add this file permanently'
dotest_lit multibranch-3 "${testcvs} -q ci -m add-it" <<HERE
-RCS file: ${TESTDIR}/cvsroot/first-dir/file1,v
+RCS file: ${CVSROOT_DIRNAME}/first-dir/file1,v
done
Checking in file1;
-${TESTDIR}/cvsroot/first-dir/file1,v <-- file1
+${CVSROOT_DIRNAME}/first-dir/file1,v <-- file1
initial revision: 1.1
done
HERE
@@ -4774,14 +6092,14 @@ T file1"
echo on-br1 >file1
dotest multibranch-7 "${testcvs} -q ci -m modify-on-br1" \
"Checking in file1;
-${TESTDIR}/cvsroot/first-dir/file1,v <-- file1
+${CVSROOT_DIRNAME}/first-dir/file1,v <-- file1
new revision: 1\.1\.2\.1; previous revision: 1\.1
done"
dotest multibranch-8 "${testcvs} -q update -r br2" '[UP] file1'
echo br2 adds a line >>file1
dotest multibranch-9 "${testcvs} -q ci -m modify-on-br2" \
"Checking in file1;
-${TESTDIR}/cvsroot/first-dir/file1,v <-- file1
+${CVSROOT_DIRNAME}/first-dir/file1,v <-- file1
new revision: 1\.1\.4\.1; previous revision: 1\.1
done"
dotest multibranch-10 "${testcvs} -q update -r br1" '[UP] file1'
@@ -4792,7 +6110,7 @@ br2 adds a line'
dotest multibranch-14 "${testcvs} log file1" \
"
-RCS file: ${TESTDIR}/cvsroot/first-dir/file1,v
+RCS file: ${CVSROOT_DIRNAME}/first-dir/file1,v
Working file: file1
head: 1\.1
branch:
@@ -4820,7 +6138,7 @@ modify-on-br1
============================================================================="
cd ..
- if test "$keep" = yes; then
+ if $keep; then
echo Keeping ${TESTDIR} and exiting due to --keep
exit 0
fi
@@ -4901,18 +6219,18 @@ U first-dir/imported-f4"
dotest import-100 "${testcvs} ci -m local-changes" \
"${PROG} [a-z]*: Examining .
Removing imported-f1;
-${TESTDIR}/cvsroot/first-dir/imported-f1,v <-- imported-f1
+${CVSROOT_DIRNAME}/first-dir/imported-f1,v <-- imported-f1
new revision: delete; previous revision: 1\.1\.1\.1
done
Checking in imported-f2;
-${TESTDIR}/cvsroot/first-dir/imported-f2,v <-- imported-f2
+${CVSROOT_DIRNAME}/first-dir/imported-f2,v <-- imported-f2
new revision: 1\.2; previous revision: 1\.1
done"
# log
dotest import-101 "${testcvs} log imported-f1" \
"
-RCS file: ${TESTDIR}/cvsroot/first-dir/Attic/imported-f1,v
+RCS file: ${CVSROOT_DIRNAME}/first-dir/Attic/imported-f1,v
Working file: imported-f1
head: 1\.2
branch:
@@ -4955,13 +6273,13 @@ first-import
dotest import-104 \
"${testcvs} ci -m vendor-removed imported-f4" \
"Removing imported-f4;
-${TESTDIR}/cvsroot/first-dir/imported-f4,v <-- imported-f4
+${CVSROOT_DIRNAME}/first-dir/imported-f4,v <-- imported-f4
new revision: delete; previous revision: 1\.1\.1\.1
done"
# update to main line
dotest import-105 "${testcvs} -q update -A" \
-"${PROG} [a-z]*: warning: imported-f1 is not (any longer) pertinent
+"${PROG} [a-z]*: imported-f1 is no longer in the repository
[UP] imported-f2"
# second import - file4 deliberately unchanged
@@ -5015,7 +6333,7 @@ Use the following command to help the merge:"
# update to main line
dotest import-112 "${testcvs} -q update -A" \
-"${PROG} [a-z]*: warning: imported-f1 is not (any longer) pertinent
+"${PROG} [a-z]*: imported-f1 is no longer in the repository
[UP] imported-f2"
cd ..
@@ -5023,7 +6341,7 @@ Use the following command to help the merge:"
dotest import-113 \
"${testcvs} -q co -jjunk-1_0 -jjunk-2_0 first-dir" \
"${PROG} [a-z]*: file first-dir/imported-f1 does not exist, but is present in revision junk-2_0
-RCS file: ${TESTDIR}/cvsroot/first-dir/imported-f2,v
+RCS file: ${CVSROOT_DIRNAME}/first-dir/imported-f2,v
retrieving revision 1\.1\.1\.1
retrieving revision 1\.1\.1\.2
Merging differences between 1\.1\.1\.1 and 1\.1\.1\.2 into imported-f2
@@ -5119,7 +6437,7 @@ No conflicts created by this import"
U first-dir/file2"
cd first-dir
dotest importb-5 "${testcvs} -q log file1" "
-RCS file: ${TESTDIR}/cvsroot/first-dir/file1,v
+RCS file: ${CVSROOT_DIRNAME}/first-dir/file1,v
Working file: file1
head: 1\.1
branch: 1\.1\.1
@@ -5182,13 +6500,13 @@ N first-dir/adir/sub2/file2
N first-dir/bdir/subdir/file1
N first-dir/cdir/cfile
No conflicts created by this import
-${PROG} [a-z]*: Importing ${TESTDIR}/cvsroot/first-dir/adir
-${PROG} [a-z]*: Importing ${TESTDIR}/cvsroot/first-dir/adir/sub1
-${PROG} [a-z]*: Importing ${TESTDIR}/cvsroot/first-dir/adir/sub1/ssdir
-${PROG} [a-z]*: Importing ${TESTDIR}/cvsroot/first-dir/adir/sub2
-${PROG} [a-z]*: Importing ${TESTDIR}/cvsroot/first-dir/bdir
-${PROG} [a-z]*: Importing ${TESTDIR}/cvsroot/first-dir/bdir/subdir
-${PROG} [a-z]*: Importing ${TESTDIR}/cvsroot/first-dir/cdir"
+${PROG} [a-z]*: Importing ${CVSROOT_DIRNAME}/first-dir/adir
+${PROG} [a-z]*: Importing ${CVSROOT_DIRNAME}/first-dir/adir/sub1
+${PROG} [a-z]*: Importing ${CVSROOT_DIRNAME}/first-dir/adir/sub1/ssdir
+${PROG} [a-z]*: Importing ${CVSROOT_DIRNAME}/first-dir/adir/sub2
+${PROG} [a-z]*: Importing ${CVSROOT_DIRNAME}/first-dir/bdir
+${PROG} [a-z]*: Importing ${CVSROOT_DIRNAME}/first-dir/bdir/subdir
+${PROG} [a-z]*: Importing ${CVSROOT_DIRNAME}/first-dir/cdir"
cd ..
mkdir 2; cd 2
dotest importc-2 "${testcvs} -q co first-dir" \
@@ -5211,7 +6529,14 @@ ${PROG} [a-z]*: Updating bdir/subdir"
"${testcvs} -q rtag -b -r release wip_test first-dir" ""
dotest importc-6 "${testcvs} -q update -r wip_test" "M cdir/cfile"
- if test "$remote" = no; then
+ if $remote; then
+ # Remote doesn't have the bug in the first place.
+ dotest importc-7r "${testcvs} -q ci -m modify -r wip_test" \
+"Checking in cdir/cfile;
+${CVSROOT_DIRNAME}/first-dir/cdir/cfile,v <-- cfile
+new revision: 1\.1\.1\.1\.2\.1; previous revision: 1\.1\.1\.1
+done"
+ else
# This checkin should just succeed. That it doesn't is a
# bug (CVS 1.9.16 through the present seem to have it; CVS
# 1.9 did not).
@@ -5221,14 +6546,7 @@ ${PROG} \[[a-z]* aborted\]: there is no version here; do .${PROG} checkout. firs
# The workaround is to leave off the "-r wip_test".
dotest importc-7a "${testcvs} -q ci -m modify" \
"Checking in cdir/cfile;
-${TESTDIR}/cvsroot/first-dir/cdir/cfile,v <-- cfile
-new revision: 1\.1\.1\.1\.2\.1; previous revision: 1\.1\.1\.1
-done"
- else
- # Remote doesn't have the bug in the first place.
- dotest importc-7r "${testcvs} -q ci -m modify -r wip_test" \
-"Checking in cdir/cfile;
-${TESTDIR}/cvsroot/first-dir/cdir/cfile,v <-- cfile
+${CVSROOT_DIRNAME}/first-dir/cdir/cfile,v <-- cfile
new revision: 1\.1\.1\.1\.2\.1; previous revision: 1\.1\.1\.1
done"
fi
@@ -5236,7 +6554,7 @@ done"
# TODO: should also be testing "import -d" when we update
# an existing file.
dotest importc-8 "${testcvs} -q log cdir/cfile" "
-RCS file: ${TESTDIR}/cvsroot/first-dir/cdir/cfile,v
+RCS file: ${CVSROOT_DIRNAME}/first-dir/cdir/cfile,v
Working file: cdir/cfile
head: 1\.1
branch: 1\.1\.1
@@ -5266,7 +6584,7 @@ modify
============================================================================="
dotest importc-9 "${testcvs} -q log bdir/subdir/file1" "
-RCS file: ${TESTDIR}/cvsroot/first-dir/bdir/subdir/file1,v
+RCS file: ${CVSROOT_DIRNAME}/first-dir/bdir/subdir/file1,v
Working file: bdir/subdir/file1
head: 1\.1
branch: 1\.1\.1
@@ -5328,13 +6646,12 @@ import-it
dotest import-after-initial-2 "$testcvs -Q co $module" ''
cd $module
echo original > $file
- dotest import-after-initial-3 "${testcvs} -Q add $file" \
-"${PROG}"' [a-z]*: use .'"${PROG}"' commit. to add this file permanently'
+ dotest import-after-initial-3 "${testcvs} -Q add $file" ""
dotest import-after-initial-4 "${testcvs} -Q ci -m. $file" \
-"RCS file: ${TESTDIR}/cvsroot/$module/$file,v
+"RCS file: ${CVSROOT_DIRNAME}/$module/$file,v
done
Checking in $file;
-${TESTDIR}/cvsroot/$module/$file,v <-- $file
+${CVSROOT_DIRNAME}/$module/$file,v <-- $file
initial revision: 1\.1
done"
@@ -5453,28 +6770,28 @@ done"
'"${PROG}"' [a-z]*: use .'"${PROG}"' commit. to add these files permanently'
dotest join-3 "${testcvs} -q commit -m add" \
-"RCS file: ${TESTDIR}/cvsroot/first-dir/file3,v
+"RCS file: ${CVSROOT_DIRNAME}/first-dir/file3,v
done
Checking in file3;
-${TESTDIR}/cvsroot/first-dir/file3,v <-- file3
+${CVSROOT_DIRNAME}/first-dir/file3,v <-- file3
initial revision: 1\.1
done
-RCS file: ${TESTDIR}/cvsroot/first-dir/file4,v
+RCS file: ${CVSROOT_DIRNAME}/first-dir/file4,v
done
Checking in file4;
-${TESTDIR}/cvsroot/first-dir/file4,v <-- file4
+${CVSROOT_DIRNAME}/first-dir/file4,v <-- file4
initial revision: 1\.1
done
-RCS file: ${TESTDIR}/cvsroot/first-dir/file6,v
+RCS file: ${CVSROOT_DIRNAME}/first-dir/file6,v
done
Checking in file6;
-${TESTDIR}/cvsroot/first-dir/file6,v <-- file6
+${CVSROOT_DIRNAME}/first-dir/file6,v <-- file6
initial revision: 1\.1
done
-RCS file: ${TESTDIR}/cvsroot/first-dir/file8,v
+RCS file: ${CVSROOT_DIRNAME}/first-dir/file8,v
done
Checking in file8;
-${TESTDIR}/cvsroot/first-dir/file8,v <-- file8
+${CVSROOT_DIRNAME}/first-dir/file8,v <-- file8
initial revision: 1\.1
done"
@@ -5499,28 +6816,28 @@ T file8'
'"${PROG}"' [a-z]*: scheduling `file8'\'' for removal
'"${PROG}"' [a-z]*: use .'"${PROG}"' commit. to remove these files permanently'
dotest join-7 "${testcvs} -q ci -mx ." \
-"RCS file: ${TESTDIR}/cvsroot/first-dir/file2,v
+"RCS file: ${CVSROOT_DIRNAME}/first-dir/file2,v
done
Checking in file2;
-${TESTDIR}/cvsroot/first-dir/file2,v <-- file2
+${CVSROOT_DIRNAME}/first-dir/file2,v <-- file2
initial revision: 1\.1
done
Checking in file4;
-${TESTDIR}/cvsroot/first-dir/file4,v <-- file4
+${CVSROOT_DIRNAME}/first-dir/file4,v <-- file4
new revision: 1\.2; previous revision: 1\.1
done
Removing file6;
-${TESTDIR}/cvsroot/first-dir/file6,v <-- file6
+${CVSROOT_DIRNAME}/first-dir/file6,v <-- file6
new revision: delete; previous revision: 1\.1
done
-RCS file: ${TESTDIR}/cvsroot/first-dir/file7,v
+RCS file: ${CVSROOT_DIRNAME}/first-dir/file7,v
done
Checking in file7;
-${TESTDIR}/cvsroot/first-dir/file7,v <-- file7
+${CVSROOT_DIRNAME}/first-dir/file7,v <-- file7
initial revision: 1\.1
done
Removing file8;
-${TESTDIR}/cvsroot/first-dir/file8,v <-- file8
+${CVSROOT_DIRNAME}/first-dir/file8,v <-- file8
new revision: delete; previous revision: 1\.1
done"
@@ -5547,21 +6864,21 @@ U first-dir/file8'
'"${PROG}"' [a-z]*: use .'"${PROG}"' commit. to add this file permanently'
dotest join-10 "${testcvs} -q ci -mx ." \
"Checking in file3;
-${TESTDIR}/cvsroot/first-dir/file3,v <-- file3
+${CVSROOT_DIRNAME}/first-dir/file3,v <-- file3
new revision: 1\.1\.2\.1; previous revision: 1\.1
done
Checking in file4;
-${TESTDIR}/cvsroot/first-dir/file4,v <-- file4
+${CVSROOT_DIRNAME}/first-dir/file4,v <-- file4
new revision: 1\.1\.2\.1; previous revision: 1\.1
done
-RCS file: ${TESTDIR}/cvsroot/first-dir/Attic/file5,v
+RCS file: ${CVSROOT_DIRNAME}/first-dir/Attic/file5,v
done
Checking in file5;
-${TESTDIR}/cvsroot/first-dir/Attic/file5,v <-- file5
+${CVSROOT_DIRNAME}/first-dir/Attic/file5,v <-- file5
new revision: 1\.1\.2\.1; previous revision: 1\.1
done
Checking in file6;
-${TESTDIR}/cvsroot/first-dir/Attic/file6,v <-- file6
+${CVSROOT_DIRNAME}/first-dir/Attic/file6,v <-- file6
new revision: 1\.1\.2\.1; previous revision: 1\.1
done"
@@ -5588,30 +6905,30 @@ T file8'
'"${PROG}"' [a-z]*: scheduling `file6'\'' for removal
'"${PROG}"' [a-z]*: use .'"${PROG}"' commit. to remove these files permanently'
dotest join-14 "${testcvs} -q ci -mx ." \
-"RCS file: ${TESTDIR}/cvsroot/first-dir/Attic/file1,v
+"RCS file: ${CVSROOT_DIRNAME}/first-dir/Attic/file1,v
done
Checking in file1;
-${TESTDIR}/cvsroot/first-dir/Attic/file1,v <-- file1
+${CVSROOT_DIRNAME}/first-dir/Attic/file1,v <-- file1
new revision: 1\.1\.2\.1; previous revision: 1\.1
done
Checking in file2;
-${TESTDIR}/cvsroot/first-dir/file2,v <-- file2
+${CVSROOT_DIRNAME}/first-dir/file2,v <-- file2
new revision: 1\.1\.2\.1; previous revision: 1\.1
done
Removing file3;
-${TESTDIR}/cvsroot/first-dir/file3,v <-- file3
+${CVSROOT_DIRNAME}/first-dir/file3,v <-- file3
new revision: delete; previous revision: 1\.1\.2\.1
done
Removing file4;
-${TESTDIR}/cvsroot/first-dir/file4,v <-- file4
+${CVSROOT_DIRNAME}/first-dir/file4,v <-- file4
new revision: delete; previous revision: 1\.1\.2\.1
done
Removing file5;
-${TESTDIR}/cvsroot/first-dir/Attic/file5,v <-- file5
+${CVSROOT_DIRNAME}/first-dir/Attic/file5,v <-- file5
new revision: delete; previous revision: 1\.1\.2\.1
done
Removing file6;
-${TESTDIR}/cvsroot/first-dir/Attic/file6,v <-- file6
+${CVSROOT_DIRNAME}/first-dir/Attic/file6,v <-- file6
new revision: delete; previous revision: 1\.1\.2\.1
done"
@@ -5674,7 +6991,7 @@ M file4'
dotest join-20 "${testcvs} -q co -jbranch first-dir" \
"U first-dir/file1
U first-dir/file2
-RCS file: ${TESTDIR}/cvsroot/first-dir/file2,v
+RCS file: ${CVSROOT_DIRNAME}/first-dir/file2,v
retrieving revision 1\.1
retrieving revision 1\.1\.2\.1
Merging differences between 1\.1 and 1\.1\.2\.1 into file2
@@ -5708,7 +7025,7 @@ U first-dir/file7'
echo 'third revision of file4' > file4
dotest join-23 "${testcvs} -q update -jbranch ." \
"U file1
-RCS file: ${TESTDIR}/cvsroot/first-dir/file2,v
+RCS file: ${CVSROOT_DIRNAME}/first-dir/file2,v
retrieving revision 1\.1
retrieving revision 1\.1\.2\.1
Merging differences between 1\.1 and 1\.1\.2\.1 into file2
@@ -5746,7 +7063,7 @@ T file7"
# the trunk (e.g. join-23).
dotest join-28 "${testcvs} -q update -j branch" \
"U file1
-RCS file: ${TESTDIR}/cvsroot/first-dir/file2,v
+RCS file: ${CVSROOT_DIRNAME}/first-dir/file2,v
retrieving revision 1.1
retrieving revision 1.1.2.1
Merging differences between 1.1 and 1.1.2.1 into file2
@@ -5760,6 +7077,41 @@ M file2
R file3
A file8"
+ # Checkout the mainline again to try updating and merging between two
+ # branches in the same step
+ # this seems a likely scenario - the user finishes up on branch and
+ # updates to br2 and merges in the same step - and there was a bug
+ # once that if the file was removed in the update then it wouldn't be
+ # readded in the merge
+ cd ..
+ rm -r first-dir
+ dotest join-twobranch-1 "${testcvs} -q co -rbranch first-dir" \
+'U first-dir/file1
+U first-dir/file2
+U first-dir/file8'
+ cd first-dir
+ dotest join-twobranch-2 "${testcvs} -q update -rbr2 -jbranch" \
+"cvs [a-z]*: file1 is no longer in the repository
+U file1
+U file2
+RCS file: ${CVSROOT_DIRNAME}/first-dir/file2,v
+retrieving revision 1\.1
+retrieving revision 1\.1\.2\.1
+Merging differences between 1\.1 and 1\.1\.2\.1 into file2
+U file3
+${PROG} [a-z]*: scheduling file3 for removal
+U file4
+${PROG} [a-z]*: file file4 has been modified, but has been removed in revision branch
+U file7
+${PROG} [a-z]*: file8 is no longer in the repository
+U file8"
+ # Verify that the right changes have been scheduled.
+ dotest join-twobranch-3 "${testcvs} -q update" \
+"A file1
+M file2
+R file3
+A file8"
+
# Checkout the mainline again to try merging from the trunk
# to a branch.
cd ..
@@ -5782,7 +7134,7 @@ T file7'
echo 'second revision of file7' > file7
dotest join-32 "${testcvs} -q ci -mx ." \
"Checking in file7;
-${TESTDIR}/cvsroot/first-dir/file7,v <-- file7
+${CVSROOT_DIRNAME}/first-dir/file7,v <-- file7
new revision: 1\.2; previous revision: 1\.1
done"
@@ -5808,7 +7160,7 @@ U file7"
# happens to do the right thing; see above join-20.
dotest join-36 "${testcvs} -q up -j T3 -j T4" \
"A file7
-RCS file: ${TESTDIR}/cvsroot/first-dir/file7,v
+RCS file: ${CVSROOT_DIRNAME}/first-dir/file7,v
retrieving revision 1\.1
retrieving revision 1\.2
Merging differences between 1\.1 and 1\.2 into file7"
@@ -5832,17 +7184,17 @@ Merging differences between 1\.1 and 1\.2 into file7"
dotest join2-1 "${testcvs} -q co -l ." ''
mkdir first-dir
dotest join2-2 "${testcvs} add first-dir" \
-"Directory ${TESTDIR}/cvsroot/first-dir added to the repository"
+"Directory ${CVSROOT_DIRNAME}/first-dir added to the repository"
cd first-dir
echo 'initial contents of file1' >file1
dotest join2-3 "${testcvs} add file1" \
"${PROG} [a-z]*: scheduling file .file1. for addition
${PROG} [a-z]*: use .${PROG} commit. to add this file permanently"
dotest join2-4 "${testcvs} -q ci -m add" \
-"RCS file: ${TESTDIR}/cvsroot/first-dir/file1,v
+"RCS file: ${CVSROOT_DIRNAME}/first-dir/file1,v
done
Checking in file1;
-${TESTDIR}/cvsroot/first-dir/file1,v <-- file1
+${CVSROOT_DIRNAME}/first-dir/file1,v <-- file1
initial revision: 1\.1
done"
dotest join2-5 "${testcvs} -q tag -b br1" "T file1"
@@ -5853,14 +7205,14 @@ done"
"${PROG} [a-z]*: scheduling file .bradd. for addition on branch .br1.
${PROG} [a-z]*: use .${PROG} commit. to add this file permanently"
dotest join2-7 "${testcvs} -q ci -m modify" \
-"RCS file: ${TESTDIR}/cvsroot/first-dir/Attic/bradd,v
+"RCS file: ${CVSROOT_DIRNAME}/first-dir/Attic/bradd,v
done
Checking in bradd;
-${TESTDIR}/cvsroot/first-dir/Attic/bradd,v <-- bradd
+${CVSROOT_DIRNAME}/first-dir/Attic/bradd,v <-- bradd
new revision: 1\.1\.2\.1; previous revision: 1\.1
done
Checking in file1;
-${TESTDIR}/cvsroot/first-dir/file1,v <-- file1
+${CVSROOT_DIRNAME}/first-dir/file1,v <-- file1
new revision: 1\.1\.2\.1; previous revision: 1\.1
done"
@@ -5872,14 +7224,14 @@ done"
File: file1 Status: Up-to-date
Working revision: 1\.1.*
- Repository revision: 1\.1 ${TESTDIR}/cvsroot/first-dir/file1,v
+ Repository revision: 1\.1 ${CVSROOT_DIRNAME}/first-dir/file1,v
Sticky Tag: (none)
Sticky Date: (none)
Sticky Options: (none)"
dotest join2-10 "cat CVS/Tag" "Tbr1"
dotest join2-11 "${testcvs} -q update -j br1 file1" \
-"RCS file: ${TESTDIR}/cvsroot/first-dir/file1,v
+"RCS file: ${CVSROOT_DIRNAME}/first-dir/file1,v
retrieving revision 1\.1
retrieving revision 1\.1\.2\.1
Merging differences between 1\.1 and 1\.1\.2\.1 into file1"
@@ -5891,7 +7243,7 @@ modify on branch"
File: file1 Status: Locally Modified
Working revision: 1\.1.*
- Repository revision: 1\.1 ${TESTDIR}/cvsroot/first-dir/file1,v
+ Repository revision: 1\.1 ${CVSROOT_DIRNAME}/first-dir/file1,v
Sticky Tag: (none)
Sticky Date: (none)
Sticky Options: (none)"
@@ -5899,7 +7251,7 @@ File: file1 Status: Locally Modified
# And the checkin should go to the trunk
dotest join2-15 "${testcvs} -q ci -m modify file1" \
"Checking in file1;
-${TESTDIR}/cvsroot/first-dir/file1,v <-- file1
+${CVSROOT_DIRNAME}/first-dir/file1,v <-- file1
new revision: 1\.2; previous revision: 1\.1
done"
@@ -5916,7 +7268,7 @@ done"
# CVS, would be a lot of work and I'm not sure this case justifies
# it.
dotest join2-17-circumvent "${testcvs} -q update -A" \
-"${PROG} [a-z]*: warning: bradd is not (any longer) pertinent
+"${PROG} [a-z]*: bradd is no longer in the repository
[UP] file1"
: dotest join2-17 "${testcvs} -q update -A bradd" \
"${PROG} [a-z]*: warning: bradd is not (any longer) pertinent"
@@ -5926,13 +7278,13 @@ done"
File: bradd Status: Locally Added
Working revision: New file!
- Repository revision: 1\.1 ${TESTDIR}/cvsroot/first-dir/Attic/bradd,v
+ Repository revision: 1\.1 ${CVSROOT_DIRNAME}/first-dir/Attic/bradd,v
Sticky Tag: (none)
Sticky Date: (none)
Sticky Options: (none)"
dotest join2-20 "${testcvs} -q ci -m modify bradd" \
"Checking in bradd;
-${TESTDIR}/cvsroot/first-dir/bradd,v <-- bradd
+${CVSROOT_DIRNAME}/first-dir/bradd,v <-- bradd
new revision: 1\.2; previous revision: 1\.1
done"
@@ -5949,17 +7301,17 @@ done"
dotest join3-1 "${testcvs} -q co -l ." ''
mkdir first-dir
dotest join3-2 "${testcvs} add first-dir" \
-"Directory ${TESTDIR}/cvsroot/first-dir added to the repository"
+"Directory ${CVSROOT_DIRNAME}/first-dir added to the repository"
cd first-dir
echo 'initial contents of file1' >file1
dotest join3-3 "${testcvs} add file1" \
"${PROG} [a-z]*: scheduling file .file1. for addition
${PROG} [a-z]*: use .${PROG} commit. to add this file permanently"
dotest join3-4 "${testcvs} -q ci -m add" \
-"RCS file: ${TESTDIR}/cvsroot/first-dir/file1,v
+"RCS file: ${CVSROOT_DIRNAME}/first-dir/file1,v
done
Checking in file1;
-${TESTDIR}/cvsroot/first-dir/file1,v <-- file1
+${CVSROOT_DIRNAME}/first-dir/file1,v <-- file1
initial revision: 1\.1
done"
dotest join3-5 "${testcvs} -q tag -b br1" "T file1"
@@ -5967,7 +7319,7 @@ done"
echo 'br1:line1' >>file1
dotest join3-7 "${testcvs} -q ci -m modify" \
"Checking in file1;
-${TESTDIR}/cvsroot/first-dir/file1,v <-- file1
+${CVSROOT_DIRNAME}/first-dir/file1,v <-- file1
new revision: 1\.1\.2\.1; previous revision: 1\.1
done"
@@ -5982,13 +7334,13 @@ ${PROG} [a-z]*: use .${PROG} commit. to add this file permanently"
echo 'trunk:line1' >>file1
dotest join3-9 "${testcvs} -q ci -m modify" \
"Checking in file1;
-${TESTDIR}/cvsroot/first-dir/file1,v <-- file1
+${CVSROOT_DIRNAME}/first-dir/file1,v <-- file1
new revision: 1\.2; previous revision: 1\.1
done
-RCS file: ${TESTDIR}/cvsroot/first-dir/file2,v
+RCS file: ${CVSROOT_DIRNAME}/first-dir/file2,v
done
Checking in file2;
-${TESTDIR}/cvsroot/first-dir/file2,v <-- file2
+${CVSROOT_DIRNAME}/first-dir/file2,v <-- file2
initial revision: 1\.1
done"
dotest join3-10 "${testcvs} -q tag -b br2" "T file1
@@ -5998,7 +7350,7 @@ T file2"
dotest join3-11 "${testcvs} -q update -r br1" "[UP] file1
${PROG} [a-z]*: file2 is no longer in the repository"
dotest join3-12 "${testcvs} -q update -j br2" \
-"RCS file: ${TESTDIR}/cvsroot/first-dir/file1,v
+"RCS file: ${CVSROOT_DIRNAME}/first-dir/file1,v
retrieving revision 1\.1
retrieving revision 1\.2
Merging differences between 1\.1 and 1\.2 into file1
@@ -6020,7 +7372,7 @@ U file1" "U file1"
echo 'br2:line1' >>file1
dotest join3-15 "${testcvs} -q ci -m modify file1" \
"Checking in file1;
-${TESTDIR}/cvsroot/first-dir/file1,v <-- file1
+${CVSROOT_DIRNAME}/first-dir/file1,v <-- file1
new revision: 1\.2\.2\.1; previous revision: 1\.2
done"
@@ -6031,7 +7383,7 @@ done"
# and so it merges both the 1.1->1.2 and 1.2->1.2.2.1 changes.
# This seems like a reasonably plausible behavior.
dotest join3-17 "${testcvs} -q update -j br2 file1" \
-"RCS file: ${TESTDIR}/cvsroot/first-dir/file1,v
+"RCS file: ${CVSROOT_DIRNAME}/first-dir/file1,v
retrieving revision 1\.1
retrieving revision 1\.2\.2\.1
Merging differences between 1\.1 and 1\.2\.2\.1 into file1
@@ -6051,6 +7403,9 @@ br2:line1
;;
join-readonly-conflict)
+ # Previously, only tests 1 & 11 were being tested. I added the
+ # intermediate dotest's to try and diagnose a different failure
+ #
# Demonstrate that cvs-1.9.29 can fail on 2nd and subsequent
# conflict-evoking join attempts.
# Even with that version of CVS, This test failed only in
@@ -6058,50 +7413,77 @@ br2:line1
# operation only for files that were read-only (either due to
# use of cvs' global -r option, setting the CVSREAD envvar,
# or use of watch lists).
- mkdir 1; cd 1
+ mkdir join-readonly-conflict; cd join-readonly-conflict
dotest join-readonly-conflict-1 "$testcvs -q co -l ." ''
- module=x
+ module=join-readonly-conflict
mkdir $module
$testcvs -q add $module >>$LOGFILE 2>&1
cd $module
file=m
echo trunk > $file
- $testcvs -q add $file >>$LOGFILE 2>&1
- $testcvs -q ci -m . $file >>$LOGFILE 2>&1
+ dotest join-readonly-conflict-2 "$testcvs -Q add $file" ''
- $testcvs tag -b B $file >>$LOGFILE 2>&1
- $testcvs -q update -rB $file >>$LOGFILE 2>&1
+ dotest join-readonly-conflict-3 "$testcvs -q ci -m . $file" \
+"RCS file: $CVSROOT_DIRNAME/$module/$file,v
+done
+Checking in $file;
+$CVSROOT_DIRNAME/$module/$file,v <-- $file
+initial revision: 1\.1
+done"
+
+ dotest join-readonly-conflict-4 "$testcvs tag -b B $file" "T $file"
+ dotest join-readonly-conflict-5 "$testcvs -q update -rB $file" ''
echo branch B > $file
- $testcvs ci -m . $file >>$LOGFILE 2>&1
+ dotest join-readonly-conflict-6 "$testcvs -q ci -m . $file" \
+"Checking in $file;
+$CVSROOT_DIRNAME/$module/$file,v <-- $file
+new revision: 1\.1\.2\.1; previous revision: 1\.1
+done"
rm $file
- $testcvs update -A $file >>$LOGFILE 2>&1
+ dotest join-readonly-conflict-7 "$testcvs -Q update -A $file" ''
# Make sure $file is read-only. This can happen more realistically
# via patch -- which could be used to apply a delta, yet would
# preserve a file's read-only permissions.
echo conflict > $file; chmod u-w $file
- $testcvs update -r B $file >>$LOGFILE 2>&1
+ dotest join-readonly-conflict-8 "$testcvs update -r B $file" \
+"RCS file: $CVSROOT_DIRNAME/$module/$file,v
+retrieving revision 1\.1
+retrieving revision 1\.1\.2\.1
+Merging differences between 1\.1 and 1\.1\.2\.1 into $file
+rcsmerge: warning: conflicts during merge
+$PROG [a-z]*: conflicts found in $file
+C $file"
+ # restore to the trunk
rm -f $file
- $testcvs update -A $file >>$LOGFILE 2>&1
+ dotest join-readonly-conflict-9 "$testcvs -Q update -A $file" ''
+
# This one would fail because cvs couldn't open the existing
# (and read-only) .# file for writing.
echo conflict > $file
- test -w ".#$file.1.1" && fail "$file is writable"
- dotest join-readonly-conflict-2 "$testcvs update -r B $file" \
-"RCS file: ${TESTDIR}/cvsroot/$module/$file,v
+ # verify that the backup file is writable
+ if test -w ".#$file.1.1"; then
+ fail "join-readonly-conflict-10 : .#$file.1.1 is writable"
+ else
+ pass "join-readonly-conflict-10"
+ fi
+ dotest join-readonly-conflict-11 "$testcvs update -r B $file" \
+"RCS file: $CVSROOT_DIRNAME/$module/$file,v
retrieving revision 1\.1
retrieving revision 1\.1\.2\.1
Merging differences between 1\.1 and 1\.1\.2\.1 into $file
rcsmerge: warning: conflicts during merge
-${PROG} [a-z]*: conflicts found in $file
+$PROG [a-z]*: conflicts found in $file
C m"
cd ../..
- rm -rf 1
- rm -rf ${CVSROOT_DIRNAME}/$module
+ if $keep; then :; else
+ rm -rf join-readonly-conflict
+ rm -rf $CVSROOT_DIRNAME/$module
+ fi
;;
join-admin)
@@ -6137,7 +7519,7 @@ C m"
File: b Status: Up-to-date
Working revision: 1\.1.*
- Repository revision: 1\.1 ${TESTDIR}/cvsroot/x/b,v
+ Repository revision: 1\.1 ${CVSROOT_DIRNAME}/x/b,v
Sticky Tag: (none)
Sticky Date: (none)
Sticky Options: (none)"
@@ -6147,6 +7529,87 @@ File: b Status: Up-to-date
rm -rf ${CVSROOT_DIRNAME}/$module
;;
+ join-admin-2)
+ # Show that when a merge (via update -kk -jtag1 -jtag2) first
+ # removes a file, then modifies another containing an $Id...$ line,
+ # the resulting file contains the unexpanded `$Id.$' string, as
+ # -kk requires.
+ mkdir 1; cd 1
+ dotest join-admin-2-1 "$testcvs -q co -l ." ''
+ module=x
+ mkdir $module
+ dotest join-admin-2-2 "$testcvs -q add $module" \
+"Directory ${CVSROOT_DIRNAME}/x added to the repository"
+ cd $module
+
+ # Create a file so applying the first tag works.
+ echo '$''Id$' > e0
+ cp e0 e
+ dotest join-admin-2-3 "$testcvs -Q add e" ''
+ dotest join-admin-2-4 "$testcvs -Q ci -m. e" \
+"RCS file: ${CVSROOT_DIRNAME}/x/e,v
+done
+Checking in e;
+${CVSROOT_DIRNAME}/x/e,v <-- e
+initial revision: 1\.1
+done"
+
+ dotest join-admin-2-5 "$testcvs -Q tag -b T" '' "${QUESTION} e0"
+ dotest join-admin-2-6 "$testcvs -Q update -r T" '' "${QUESTION} e0"
+ cp e0 e
+ dotest join-admin-2-7 "$testcvs -Q ci -m. e" \
+"Checking in e;
+${CVSROOT_DIRNAME}/x/e,v <-- e
+new revision: 1\.1\.2\.1; previous revision: 1\.1
+done"
+
+ dotest join-admin-2-8 "$testcvs -Q update -A" '' "${QUESTION} e0"
+ dotest join-admin-2-9 "$testcvs -Q tag -b M1" '' "${QUESTION} e0"
+
+ echo '$''Id$' > b
+ dotest join-admin-2-10 "$testcvs -Q add b" ''
+ cp e0 e
+ dotest join-admin-2-11 "$testcvs -Q ci -m. b e" \
+"RCS file: ${CVSROOT_DIRNAME}/x/b,v
+done
+Checking in b;
+${CVSROOT_DIRNAME}/x/b,v <-- b
+initial revision: 1\.1
+done
+Checking in e;
+${CVSROOT_DIRNAME}/x/e,v <-- e
+new revision: 1\.2; previous revision: 1\.1
+done"
+
+ dotest join-admin-2-12 "$testcvs -Q tag -b M2" '' "${QUESTION} e0"
+
+ dotest join-admin-2-13 "$testcvs -Q update -r T" '' "${QUESTION} e0"
+ dotest join-admin-2-14 "$testcvs update -kk -jM1 -jM2" \
+"${PROG} [a-z]*: Updating .
+U b
+U e
+RCS file: ${CVSROOT_DIRNAME}/x/e,v
+retrieving revision 1\.1
+retrieving revision 1\.2
+Merging differences between 1\.1 and 1\.2 into e
+${QUESTION} e0" \
+"${QUESTION} e0
+${PROG} [a-z]*: Updating .
+U b
+U e
+RCS file: ${CVSROOT_DIRNAME}/x/e,v
+retrieving revision 1\.1
+retrieving revision 1\.2
+Merging differences between 1\.1 and 1\.2 into e"
+
+ # Verify that the $Id.$ string is not expanded.
+ dotest join-admin-2-15 "cat e" '$''Id$'
+
+ cd ../..
+ rm -rf 1
+ rm -rf ${CVSROOT_DIRNAME}/$module
+ ;;
+
new) # look for stray "no longer pertinent" messages.
mkdir ${CVSROOT_DIRNAME}/first-dir
@@ -6218,10 +7681,10 @@ File: b Status: Up-to-date
"${PROG} [a-z]*: scheduling file .a. for addition
${PROG} [a-z]*: use .${PROG} commit. to add this file permanently"
dotest newb-123c "${testcvs} -q ci -m added" \
-"RCS file: ${TESTDIR}/cvsroot/first-dir/a,v
+"RCS file: ${CVSROOT_DIRNAME}/first-dir/a,v
done
Checking in a;
-${TESTDIR}/cvsroot/first-dir/a,v <-- a
+${CVSROOT_DIRNAME}/first-dir/a,v <-- a
initial revision: 1\.1
done"
@@ -6249,7 +7712,7 @@ done"
${PROG} [a-z]*: use .${PROG} commit. to remove this file permanently"
dotest newb-123h "${testcvs} -q ci -m removed" \
"Removing a;
-${TESTDIR}/cvsroot/first-dir/a,v <-- a
+${CVSROOT_DIRNAME}/first-dir/a,v <-- a
new revision: delete; previous revision: 1\.1\.2
done"
@@ -6263,29 +7726,20 @@ done"
# Update the other copy, and make sure that a is removed.
cd ../1/first-dir
- # "Needs Patch" is a rather strange output here. Something like
+ # "Entry Invalid" is a rather strange output here. Something like
# "Removed in Repository" would make more sense.
- # The "Need Checkout" output is what CVS does if configured
- # --disable-server.
dotest newb-123j0 "${testcvs} status a" \
-"===================================================================
-File: a Status: Needs Patch
-
- Working revision: 1\.1.*
- Repository revision: 1\.1\.2\.1 ${TESTDIR}/cvsroot/first-dir/a,v
- Sticky Tag: branch (branch: 1\.1\.2)
- Sticky Date: (none)
- Sticky Options: (none)" \
-"===================================================================
-File: a Status: Needs Checkout
+"${PROG} [a-z]*: a is no longer in the repository
+===================================================================
+File: a Status: Entry Invalid
Working revision: 1\.1.*
- Repository revision: 1\.1\.2\.1 ${TESTDIR}/cvsroot/first-dir/a,v
+ Repository revision: 1\.1\.2\.1 ${CVSROOT_DIRNAME}/first-dir/a,v
Sticky Tag: branch (branch: 1\.1\.2)
Sticky Date: (none)
Sticky Options: (none)"
dotest newb-123j "${testcvs} -q update" \
-"${PROG} [a-z]*: warning: a is not (any longer) pertinent"
+"${PROG} [a-z]*: a is no longer in the repository"
if test -f a; then
fail newb-123k
@@ -6313,10 +7767,10 @@ File: a Status: Needs Checkout
"${PROG} [a-z]*: scheduling file .a. for addition
${PROG} [a-z]*: use .${PROG} commit. to add this file permanently"
dotest conflicts-126 "${testcvs} -q ci -m added" \
-"RCS file: ${TESTDIR}/cvsroot/first-dir/a,v
+"RCS file: ${CVSROOT_DIRNAME}/first-dir/a,v
done
Checking in a;
-${TESTDIR}/cvsroot/first-dir/a,v <-- a
+${CVSROOT_DIRNAME}/first-dir/a,v <-- a
initial revision: 1\.1
done"
@@ -6324,13 +7778,11 @@ done"
mkdir 2
cd 2
- # The need for TMPPWD here is a (minor) CVS bug; the
- # output should use the name of the repository as specified.
dotest conflicts-126.5 "${testcvs} co -p first-dir" \
"${PROG} [a-z]*: Updating first-dir
===================================================================
Checking out first-dir/a
-RCS: ${TMPPWD}/cvsroot/first-dir/a,v
+RCS: ${CVSROOT_DIRNAME}/first-dir/a,v
VERS: 1\.1
\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*"
if ${CVS} co first-dir ; then
@@ -6349,10 +7801,10 @@ VERS: 1\.1
echo add a line >>a
mkdir dir1
dotest conflicts-127b "${testcvs} add dir1" \
-"Directory ${TESTDIR}/cvsroot/first-dir/dir1 added to the repository"
+"Directory ${CVSROOT_DIRNAME}/first-dir/dir1 added to the repository"
dotest conflicts-128 "${testcvs} -q ci -m changed" \
"Checking in a;
-${TESTDIR}/cvsroot/first-dir/a,v <-- a
+${CVSROOT_DIRNAME}/first-dir/a,v <-- a
new revision: 1\.2; previous revision: 1\.1
done"
cd ../..
@@ -6361,13 +7813,11 @@ done"
# contents.
mkdir 3
cd 3
- # The need for TMPPWD here is a (minor) CVS bug; the
- # output should use the name of the repository as specified.
dotest conflicts-128.5 "${testcvs} co -p -l first-dir" \
"${PROG} [a-z]*: Updating first-dir
===================================================================
Checking out first-dir/a
-RCS: ${TMPPWD}/cvsroot/first-dir/a,v
+RCS: ${CVSROOT_DIRNAME}/first-dir/a,v
VERS: 1\.2
\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*
add a line"
@@ -6388,12 +7838,12 @@ add a line"
File: a Status: Needs Merge
Working revision: 1\.1.*
- Repository revision: 1\.2 ${TESTDIR}/cvsroot/first-dir/a,v
+ Repository revision: 1\.2 ${CVSROOT_DIRNAME}/first-dir/a,v
Sticky Tag: (none)
Sticky Date: (none)
Sticky Options: (none)"
dotest conflicts-129a "${testcvs} -nq update a" \
-"RCS file: ${TESTDIR}/cvsroot/first-dir/a,v
+"RCS file: ${CVSROOT_DIRNAME}/first-dir/a,v
retrieving revision 1\.1
retrieving revision 1\.2
Merging differences between 1\.1 and 1\.2 into a
@@ -6401,7 +7851,7 @@ rcsmerge: warning: conflicts during merge
${PROG} [a-z]*: conflicts found in a
C a"
dotest conflicts-130 "${testcvs} -q update" \
-"RCS file: ${TESTDIR}/cvsroot/first-dir/a,v
+"RCS file: ${CVSROOT_DIRNAME}/first-dir/a,v
retrieving revision 1\.1
retrieving revision 1\.2
Merging differences between 1\.1 and 1\.2 into a
@@ -6412,7 +7862,7 @@ ${QUESTION} dir1
${QUESTION} sdir" \
"${QUESTION} dir1
${QUESTION} sdir
-RCS file: ${TESTDIR}/cvsroot/first-dir/a,v
+RCS file: ${CVSROOT_DIRNAME}/first-dir/a,v
retrieving revision 1\.1
retrieving revision 1\.2
Merging differences between 1\.1 and 1\.2 into a
@@ -6426,7 +7876,7 @@ C a"
File: a Status: File had conflicts on merge
Working revision: 1\.2.*
- Repository revision: 1\.2 ${TESTDIR}/cvsroot/first-dir/a,v
+ Repository revision: 1\.2 ${CVSROOT_DIRNAME}/first-dir/a,v
Sticky Tag: (none)
Sticky Date: (none)
Sticky Options: (none)"
@@ -6456,14 +7906,14 @@ ${PROG} \[[a-z]* aborted\]: correct above errors first!"
File: a Status: File had conflicts on merge
Working revision: 1\.2.*
- Repository revision: 1\.2 ${TESTDIR}/cvsroot/first-dir/a,v
+ Repository revision: 1\.2 ${CVSROOT_DIRNAME}/first-dir/a,v
Sticky Tag: (none)
Sticky Date: (none)
Sticky Options: (none)"
dotest conflicts-132 "${testcvs} -q ci -m try" \
"${PROG} [a-z]*: warning: file .a. seems to still contain conflict indicators
Checking in a;
-${TESTDIR}/cvsroot/first-dir/a,v <-- a
+${CVSROOT_DIRNAME}/first-dir/a,v <-- a
new revision: 1\.3; previous revision: 1\.2
done"
@@ -6475,13 +7925,13 @@ done"
File: a Status: Locally Modified
Working revision: 1\.3.*
- Repository revision: 1\.3 ${TESTDIR}/cvsroot/first-dir/a,v
+ Repository revision: 1\.3 ${CVSROOT_DIRNAME}/first-dir/a,v
Sticky Tag: (none)
Sticky Date: (none)
Sticky Options: (none)"
dotest conflicts-133 "${testcvs} -q ci -m resolved" \
"Checking in a;
-${TESTDIR}/cvsroot/first-dir/a,v <-- a
+${CVSROOT_DIRNAME}/first-dir/a,v <-- a
new revision: 1\.4; previous revision: 1\.3
done"
dotest conflicts-status-7 "${testcvs} status a" \
@@ -6489,7 +7939,7 @@ done"
File: a Status: Up-to-date
Working revision: 1\.4.*
- Repository revision: 1\.4 ${TESTDIR}/cvsroot/first-dir/a,v
+ Repository revision: 1\.4 ${CVSROOT_DIRNAME}/first-dir/a,v
Sticky Tag: (none)
Sticky Date: (none)
Sticky Options: (none)"
@@ -6584,16 +8034,16 @@ File: a Status: Up-to-date
${PROG} [a-z]*: scheduling file .abc. for addition
${PROG} [a-z]*: use .${PROG} commit. to add these files permanently"
dotest conflicts2-142a3 "${testcvs} -q ci -m added" \
-"RCS file: ${TESTDIR}/cvsroot/first-dir/a,v
+"RCS file: ${CVSROOT_DIRNAME}/first-dir/a,v
done
Checking in a;
-${TESTDIR}/cvsroot/first-dir/a,v <-- a
+${CVSROOT_DIRNAME}/first-dir/a,v <-- a
initial revision: 1\.1
done
-RCS file: ${TESTDIR}/cvsroot/first-dir/abc,v
+RCS file: ${CVSROOT_DIRNAME}/first-dir/abc,v
done
Checking in abc;
-${TESTDIR}/cvsroot/first-dir/abc,v <-- abc
+${CVSROOT_DIRNAME}/first-dir/abc,v <-- abc
initial revision: 1\.1
done"
@@ -6615,7 +8065,7 @@ U first-dir/abc'
echo modify a >>a
dotest conflicts2-142b2 "${testcvs} -q ci -m modify-a" \
"Checking in a;
-${TESTDIR}/cvsroot/first-dir/a,v <-- a
+${CVSROOT_DIRNAME}/first-dir/a,v <-- a
new revision: 1\.2; previous revision: 1\.1
done"
cd ../../2/first-dir
@@ -6638,7 +8088,13 @@ ${PROG} [a-z]*: a, version 1\.1, resurrected"
"${PROG} [a-z]*: scheduling .first-dir/a. for removal
${PROG} [a-z]*: use .${PROG} commit. to remove this file permanently"
- if test "$remote" = no; then
+ if $remote; then
+ # Haven't investigated this one.
+ dotest_fail conflicts2-142b8 "${testcvs} add first-dir/a" \
+"${PROG} add: in directory \.:
+${PROG} \[add aborted\]: there is no version here; do '${PROG} checkout' first"
+ cd first-dir
+ else
# The "nothing known" is a bug. Correct behavior is for a to get
# created, as above. Cause is pretty obvious - add.c
# calls update() without dealing with the fact we are chdir'd.
@@ -6656,12 +8112,6 @@ ${PROG} [a-z]*: first-dir/a, version 1\.2, resurrected"
dotest conflicts2-142b9 "${testcvs} rm -f a" \
"${PROG} [a-z]*: scheduling .a. for removal
${PROG} [a-z]*: use .${PROG} commit. to remove this file permanently"
- else
- # Haven't investigated this one.
- dotest_fail conflicts2-142b8 "${testcvs} add first-dir/a" \
-"${PROG} add: in directory \.:
-${PROG} \[add aborted\]: there is no version here; do '${PROG} checkout' first"
- cd first-dir
fi
# As before, 1.2 instead of 1.1 is a bug.
@@ -6682,7 +8132,7 @@ ${PROG} [a-z]*: a, version 1\.2, resurrected"
${PROG} [a-z]*: use .${PROG} commit. to remove this file permanently"
dotest conflicts2-142c1 "${testcvs} -q ci -m remove-abc" \
"Removing abc;
-${TESTDIR}/cvsroot/first-dir/abc,v <-- abc
+${CVSROOT_DIRNAME}/first-dir/abc,v <-- abc
new revision: delete; previous revision: 1\.1
done"
cd ../../2/first-dir
@@ -6704,16 +8154,16 @@ ${PROG} [a-z]*: use .${PROG} commit. to remove this file permanently"
${PROG} [a-z]*: scheduling file .same\.c. for addition
${PROG} [a-z]*: use .${PROG} commit. to add these files permanently"
dotest conflicts2-142d1 "${testcvs} -q ci -m added" \
-"RCS file: ${TESTDIR}/cvsroot/first-dir/aa\.c,v
+"RCS file: ${CVSROOT_DIRNAME}/first-dir/aa\.c,v
done
Checking in aa\.c;
-${TESTDIR}/cvsroot/first-dir/aa\.c,v <-- aa\.c
+${CVSROOT_DIRNAME}/first-dir/aa\.c,v <-- aa\.c
initial revision: 1\.1
done
-RCS file: ${TESTDIR}/cvsroot/first-dir/same\.c,v
+RCS file: ${CVSROOT_DIRNAME}/first-dir/same\.c,v
done
Checking in same\.c;
-${TESTDIR}/cvsroot/first-dir/same\.c,v <-- same\.c
+${CVSROOT_DIRNAME}/first-dir/same\.c,v <-- same\.c
initial revision: 1\.1
done"
cd ../../2/first-dir
@@ -6726,7 +8176,7 @@ done"
# cvs add just to get them in that habit (also, trying to implement
# the local CVS behavior for remote without the cvs add seems
# pretty difficult).
- if test "$remote" = yes; then
+ if $remote; then
dotest_fail conflicts2-142d2 "${testcvs} -q update" \
"${QUESTION} aa\.c
${QUESTION} same\.c
@@ -6746,7 +8196,7 @@ U same\.c"
File: aa\.c Status: Unresolved Conflict
Working revision: No entry for aa\.c
- Repository revision: 1\.1 ${TESTDIR}/cvsroot/first-dir/aa\.c,v"
+ Repository revision: 1\.1 ${CVSROOT_DIRNAME}/first-dir/aa\.c,v"
# Could also be testing the case in which the cvs add happened
# before the commit by the other user.
@@ -6789,7 +8239,7 @@ File: aa\.c Status: Unresolved Conflict
dotest conflicts3-1 "${testcvs} -q co -l ." ''
mkdir first-dir
dotest conflicts3-2 "${testcvs} add first-dir" \
-"Directory ${TESTDIR}/cvsroot/first-dir added to the repository"
+"Directory ${CVSROOT_DIRNAME}/first-dir added to the repository"
cd ..
mkdir 2; cd 2
dotest conflicts3-3 "${testcvs} -q co -l first-dir" ''
@@ -6800,16 +8250,16 @@ File: aa\.c Status: Unresolved Conflict
${PROG} [a-z]*: scheduling file .file2. for addition
${PROG} [a-z]*: use .${PROG} commit. to add these files permanently"
dotest conflicts3-5 "${testcvs} -q ci -m add-them" \
-"RCS file: ${TESTDIR}/cvsroot/first-dir/file1,v
+"RCS file: ${CVSROOT_DIRNAME}/first-dir/file1,v
done
Checking in file1;
-${TESTDIR}/cvsroot/first-dir/file1,v <-- file1
+${CVSROOT_DIRNAME}/first-dir/file1,v <-- file1
initial revision: 1\.1
done
-RCS file: ${TESTDIR}/cvsroot/first-dir/file2,v
+RCS file: ${CVSROOT_DIRNAME}/first-dir/file2,v
done
Checking in file2;
-${TESTDIR}/cvsroot/first-dir/file2,v <-- file2
+${CVSROOT_DIRNAME}/first-dir/file2,v <-- file2
initial revision: 1\.1
done"
cd ../../2/first-dir
@@ -6831,35 +8281,35 @@ ${PROG} [a-z]*: scheduling .file2. for removal
${PROG} [a-z]*: use .${PROG} commit. to remove these files permanently"
dotest conflicts3-11 "${testcvs} -q ci -m remove-them" \
"Removing file1;
-${TESTDIR}/cvsroot/first-dir/file1,v <-- file1
+${CVSROOT_DIRNAME}/first-dir/file1,v <-- file1
new revision: delete; previous revision: 1\.1
done
Removing file2;
-${TESTDIR}/cvsroot/first-dir/file2,v <-- file2
+${CVSROOT_DIRNAME}/first-dir/file2,v <-- file2
new revision: delete; previous revision: 1\.1
done"
cd ../../1/first-dir
dotest conflicts3-12 "${testcvs} -n -q update" \
-"${PROG} [a-z]*: warning: file1 is not (any longer) pertinent
-${PROG} [a-z]*: warning: file2 is not (any longer) pertinent"
+"${PROG} [a-z]*: file1 is no longer in the repository
+${PROG} [a-z]*: file2 is no longer in the repository"
dotest conflicts3-13 "${testcvs} -q update" \
-"${PROG} [a-z]*: warning: file1 is not (any longer) pertinent
-${PROG} [a-z]*: warning: file2 is not (any longer) pertinent"
+"${PROG} [a-z]*: file1 is no longer in the repository
+${PROG} [a-z]*: file2 is no longer in the repository"
# OK, now add a directory to both working directories
# and see that CVS doesn't lose its mind.
mkdir sdir
dotest conflicts3-14 "${testcvs} add sdir" \
-"Directory ${TESTDIR}/cvsroot/first-dir/sdir added to the repository"
+"Directory ${CVSROOT_DIRNAME}/first-dir/sdir added to the repository"
touch sdir/sfile
dotest conflicts3-14a "${testcvs} add sdir/sfile" \
"${PROG} [a-z]*: scheduling file .sdir/sfile. for addition
${PROG} [a-z]*: use .${PROG} commit. to add this file permanently"
dotest conflicts3-14b "${testcvs} -q ci -m add" \
-"RCS file: ${TESTDIR}/cvsroot/first-dir/sdir/sfile,v
+"RCS file: ${CVSROOT_DIRNAME}/first-dir/sdir/sfile,v
done
Checking in sdir/sfile;
-${TESTDIR}/cvsroot/first-dir/sdir/sfile,v <-- sfile
+${CVSROOT_DIRNAME}/first-dir/sdir/sfile,v <-- sfile
initial revision: 1\.1
done"
@@ -6876,7 +8326,7 @@ done"
# that sdir is even a directory (stat'ing everything would be
# too slow). The remote behavior makes more sense to me (but
# would this affect other cases?).
- if test "$remote" = yes; then
+ if $remote; then
dotest conflicts3-15 "${testcvs} -q update" \
"${QUESTION} sdir"
else
@@ -6923,16 +8373,9 @@ ${PROG} [a-z]*: ignoring first-dir/sdir (CVS/Entries missing)"
dotest conflicts3-21 "${testcvs} -q update -d sdir" "U sdir/sfile"
rm -r sdir/CVS
dotest conflicts3-22 "${testcvs} -q update" "${QUESTION} sdir"
- if test "x$remote" = xyes; then
- # It isn't particularly swift that CVS prints this
- # "cannot open CVS/Entries" where it has already printed
- # "? sdir". At least I don't think so. But do note: (1)
- # non-fatal error, and (2) tells us which directory has
- # the problem.
+ if $remote; then
dotest_fail conflicts3-23 "${testcvs} -q update -PdA" \
"${QUESTION} sdir
-${PROG} update: in directory sdir:
-${PROG} update: cannot open CVS/Entries for reading: No such file or directory
${PROG} update: move away sdir/sfile; it is in the way
C sdir/sfile"
else
@@ -6954,22 +8397,13 @@ C sdir/sfile"
${PROG} [a-z]*: use .${PROG} commit. to remove this file permanently"
dotest conflicts3-26 "${testcvs} ci -m remove sdir/sfile" \
"Removing sdir/sfile;
-${TESTDIR}/cvsroot/first-dir/sdir/sfile,v <-- sfile
+${CVSROOT_DIRNAME}/first-dir/sdir/sfile,v <-- sfile
new revision: delete; previous revision: 1\.1
done"
rm -r sdir/CVS
dotest conflicts3-27 "${testcvs} -q update" "${QUESTION} sdir"
- if test "x$remote" = xyes; then
- # Regarding "cannot open CVS/Entries", see comments at
- # conflicts3-23.
- dotest conflicts3-28 "${testcvs} -q update -PdA" \
-"${QUESTION} sdir
-${PROG} update: in directory sdir:
-${PROG} update: cannot open CVS/Entries for reading: No such file or directory"
- else
- dotest conflicts3-28 "${testcvs} -q update -PdA" \
+ dotest conflicts3-28 "${testcvs} -q update -PdA" \
"${QUESTION} sdir"
- fi
cd ../..
@@ -6983,17 +8417,17 @@ ${PROG} update: cannot open CVS/Entries for reading: No such file or directory"
dotest clean-1 "${testcvs} -q co -l ." ''
mkdir first-dir
dotest clean-2 "${testcvs} add first-dir" \
-"Directory ${TESTDIR}/cvsroot/first-dir added to the repository"
+"Directory ${CVSROOT_DIRNAME}/first-dir added to the repository"
cd first-dir
echo "The usual boring test text." > cleanme.txt
dotest clean-3 "${testcvs} add cleanme.txt" \
"${PROG} [a-z]*: scheduling file .cleanme\.txt. for addition
${PROG} [a-z]*: use .${PROG} commit. to add this file permanently"
dotest clean-4 "${testcvs} -q ci -m clean-3" \
-"RCS file: ${TESTDIR}/cvsroot/first-dir/cleanme\.txt,v
+"RCS file: ${CVSROOT_DIRNAME}/first-dir/cleanme\.txt,v
done
Checking in cleanme\.txt;
-${TESTDIR}/cvsroot/first-dir/cleanme\.txt,v <-- cleanme\.txt
+${CVSROOT_DIRNAME}/first-dir/cleanme\.txt,v <-- cleanme\.txt
initial revision: 1\.1
done"
# Okay, preparation is done, now test.
@@ -7027,10 +8461,38 @@ U cleanme\.txt"
"The usual boring test text\.
bluegill"
+ # Now try with conflicts
+ cd ..
+ dotest clean-15 "${testcvs} -q co -d second-dir first-dir" \
+'U second-dir/cleanme\.txt'
+ cd second-dir
+ echo "conflict test" >> cleanme.txt
+ dotest clean-16 "${testcvs} -q ci -m." \
+"Checking in cleanme\.txt;
+${CVSROOT_DIRNAME}/first-dir/cleanme\.txt,v <-- cleanme\.txt
+new revision: 1\.2; previous revision: 1\.1
+done"
+ cd ../first-dir
+ echo "fish" >> cleanme.txt
+ dotest clean-17 "${testcvs} -nq update" \
+"RCS file: ${CVSROOT_DIRNAME}/first-dir/cleanme\.txt,v
+retrieving revision 1\.1
+retrieving revision 1\.2
+Merging differences between 1\.1 and 1\.2 into cleanme\.txt
+rcsmerge: warning: conflicts during merge
+${PROG} [a-z]*: conflicts found in cleanme\.txt
+C cleanme\.txt"
+ dotest clean-18 "${testcvs} -q update -C" \
+"(Locally modified cleanme\.txt moved to \.#cleanme\.txt\.1\.1)
+U cleanme\.txt"
+ dotest clean-19 "cat .#cleanme.txt.1.1" \
+"The usual boring test text\.
+fish"
+
# Done. Clean up.
cd ../..
rm -rf 1
- rm -rf ${TESTDIR}/cvsroot/first-dir
+ rm -rf ${CVSROOT_DIRNAME}/first-dir
;;
modules)
@@ -7069,7 +8531,7 @@ U CVSROOT/verifymsg'
echo "# made a change" >>CVSROOT/modules
dotest modules-1d "${testcvs} -q ci -m add-modules" \
"Checking in CVSROOT/modules;
-${TESTDIR}/cvsroot/CVSROOT/modules,v <-- modules
+${CVSROOT_DIRNAME}/CVSROOT/modules,v <-- modules
new revision: 1\.[0-9]*; previous revision: 1\.[0-9]*
done
${PROG} [a-z]*: Rebuilding administrative file database"
@@ -7093,7 +8555,7 @@ U CVSROOT/verifymsg'
echo "# made a change" >>CVSROOT/modules
dotest modules-2d "${testcvs} -q ci -m add-modules" \
"Checking in CVSROOT/modules;
-${TESTDIR}/cvsroot/CVSROOT/modules,v <-- modules
+${CVSROOT_DIRNAME}/CVSROOT/modules,v <-- modules
new revision: 1\.[0-9]*; previous revision: 1\.[0-9]*
done
${PROG} [a-z]*: Rebuilding administrative file database"
@@ -7120,7 +8582,7 @@ U CVSROOT/verifymsg'
echo "# made a change" >>CVSROOT/modules
dotest modules-3g "${testcvs} -q ci -m add-modules" \
"Checking in CVSROOT/modules;
-${TESTDIR}/cvsroot/CVSROOT/modules,v <-- modules
+${CVSROOT_DIRNAME}/CVSROOT/modules,v <-- modules
new revision: 1\.[0-9]*; previous revision: 1\.[0-9]*
done
${PROG} [a-z]*: Rebuilding administrative file database"
@@ -7142,12 +8604,12 @@ ${PROG} [a-z]*: Rebuilding administrative file database"
cd first-dir
mkdir subdir
dotest modules-143a "${testcvs} add subdir" \
-"Directory ${TESTDIR}/cvsroot/first-dir/subdir added to the repository"
+"Directory ${CVSROOT_DIRNAME}/first-dir/subdir added to the repository"
cd subdir
mkdir ssdir
dotest modules-143b "${testcvs} add ssdir" \
-"Directory ${TESTDIR}/cvsroot/first-dir/subdir/ssdir added to the repository"
+"Directory ${CVSROOT_DIRNAME}/first-dir/subdir/ssdir added to the repository"
touch a b
@@ -7159,16 +8621,16 @@ ${PROG} [a-z]*: use .${PROG} commit. to add these files permanently"
dotest modules-145 "${testcvs} ci -m added" \
"${PROG} [a-z]*: Examining .
${PROG} [a-z]*: Examining ssdir
-RCS file: ${TESTDIR}/cvsroot/first-dir/subdir/a,v
+RCS file: ${CVSROOT_DIRNAME}/first-dir/subdir/a,v
done
Checking in a;
-${TESTDIR}/cvsroot/first-dir/subdir/a,v <-- a
+${CVSROOT_DIRNAME}/first-dir/subdir/a,v <-- a
initial revision: 1\.1
done
-RCS file: ${TESTDIR}/cvsroot/first-dir/subdir/b,v
+RCS file: ${CVSROOT_DIRNAME}/first-dir/subdir/b,v
done
Checking in b;
-${TESTDIR}/cvsroot/first-dir/subdir/b,v <-- b
+${CVSROOT_DIRNAME}/first-dir/subdir/b,v <-- b
initial revision: 1\.1
done"
@@ -7208,7 +8670,7 @@ bogusalias first-dir/subdir/a -a
EOF
dotest modules-148 "${testcvs} ci -m 'add modules' CVSROOT/modules" \
"Checking in CVSROOT/modules;
-${TESTDIR}/cvsroot/CVSROOT/modules,v <-- modules
+${CVSROOT_DIRNAME}/CVSROOT/modules,v <-- modules
new revision: 1\.[0-9]*; previous revision: 1\.[0-9]*
done
${PROG} [a-z]*: Rebuilding administrative file database"
@@ -7337,16 +8799,16 @@ U first-dir/subdir/b"
'"${PROG}"' [a-z]*: scheduling file `file2'\'' for addition
'"${PROG}"' [a-z]*: use .'"${PROG}"' commit. to add these files permanently'
dotest modules-155c3 "${testcvs} -q ci -m add-it" \
-"RCS file: ${TESTDIR}/cvsroot/first-dir/file1,v
+"RCS file: ${CVSROOT_DIRNAME}/first-dir/file1,v
done
Checking in file1;
-${TESTDIR}/cvsroot/first-dir/file1,v <-- file1
+${CVSROOT_DIRNAME}/first-dir/file1,v <-- file1
initial revision: 1\.1
done
-RCS file: ${TESTDIR}/cvsroot/first-dir/file2,v
+RCS file: ${CVSROOT_DIRNAME}/first-dir/file2,v
done
Checking in file2;
-${TESTDIR}/cvsroot/first-dir/file2,v <-- file2
+${CVSROOT_DIRNAME}/first-dir/file2,v <-- file2
initial revision: 1\.1
done"
@@ -7363,7 +8825,7 @@ U first-dir/file2"
"${PROG} [a-z]*: use .${PROG} commit. to remove this file permanently"
dotest modules-155c7 "${testcvs} -q ci -m remove-it" \
"Removing file1;
-${TESTDIR}/cvsroot/first-dir/file1,v <-- file1
+${CVSROOT_DIRNAME}/first-dir/file1,v <-- file1
new revision: delete; previous revision: 1\.1
done"
cd ..
@@ -7385,19 +8847,19 @@ U first-dir/file2"
mkdir first-dir second-dir third-dir
dotest modules2-setup-2 \
"${testcvs} add first-dir second-dir third-dir" \
-"Directory ${TESTDIR}/cvsroot/first-dir added to the repository
-Directory ${TESTDIR}/cvsroot/second-dir added to the repository
-Directory ${TESTDIR}/cvsroot/third-dir added to the repository"
+"Directory ${CVSROOT_DIRNAME}/first-dir added to the repository
+Directory ${CVSROOT_DIRNAME}/second-dir added to the repository
+Directory ${CVSROOT_DIRNAME}/third-dir added to the repository"
cd third-dir
touch file3
dotest modules2-setup-3 "${testcvs} add file3" \
"${PROG} [a-z]*: scheduling file .file3. for addition
${PROG} [a-z]*: use .${PROG} commit. to add this file permanently"
dotest modules2-setup-4 "${testcvs} -q ci -m add file3" \
-"RCS file: ${TESTDIR}/cvsroot/third-dir/file3,v
+"RCS file: ${CVSROOT_DIRNAME}/third-dir/file3,v
done
Checking in file3;
-${TESTDIR}/cvsroot/third-dir/file3,v <-- file3
+${CVSROOT_DIRNAME}/third-dir/file3,v <-- file3
initial revision: 1\.1
done"
cd ../..
@@ -7409,15 +8871,19 @@ done"
dotest modules2-1 "${testcvs} -q co CVSROOT/modules" \
'U CVSROOT/modules'
cd CVSROOT
- echo 'ampermodule &first-dir &second-dir' > modules
- echo 'combmodule third-dir file3 &first-dir' >> modules
- echo 'ampdirmod -d newdir &first-dir &second-dir' >> modules
- echo 'badmod -d newdir' >> modules
+ cat >> modules << EOF
+ampermodule &first-dir &second-dir
+combmodule third-dir file3 &first-dir
+ampdirmod -d newdir &first-dir &second-dir
+badmod -d newdir
+messymod first-dir &messymodchild
+messymodchild -d sdir/child second-dir
+EOF
# Depending on whether the user also ran the modules test
# we will be checking in revision 1.2 or 1.3.
dotest modules2-2 "${testcvs} -q ci -m add-modules" \
"Checking in modules;
-${TESTDIR}/cvsroot/CVSROOT/modules,v <-- modules
+${CVSROOT_DIRNAME}/CVSROOT/modules,v <-- modules
new revision: 1\.[0-9]*; previous revision: 1\.[0-9]*
done
${PROG} [a-z]*: Rebuilding administrative file database"
@@ -7445,6 +8911,26 @@ EOF
cd ..
+ # There used to be a nasty-hack that made CVS skip creation of the
+ # module dir (in this case ampermodule) when -n was specified
+ dotest modules2-ampermod-1 "${testcvs} -q co -n ampermodule" ''
+ dotest modules2-ampermod-2 "test -d ampermodule/first-dir" ''
+ dotest modules2-ampermod-3 "test -d ampermodule/second-dir" ''
+
+ # Test release of a module
+ if echo yes |${testcvs} release -d ampermodule >>${LOGFILE}; then
+ pass modules2-ampermod-release-1
+ else
+ fail modules2-ampermod-release-1
+ fi
+ dotest_fail modules2-ampermod-release-2 "test -d ampermodule" ''
+
+ # and the '-n' test again, but in conjunction with '-d'
+ dotest modules2-ampermod-4 "${testcvs} -q co -n -d newname ampermodule" ''
+ dotest modules2-ampermod-5 "test -d newname/first-dir" ''
+ dotest modules2-ampermod-6 "test -d newname/second-dir" ''
+ rm -rf newname
+
# Now we create another directory named first-dir and make
# sure that CVS doesn't get them mixed up.
mkdir first-dir
@@ -7468,12 +8954,12 @@ ${PROG} [a-z]*: use .${PROG} commit. to add this file permanently"
A first-dir/amper1
${PROG} [a-z]*: Updating second-dir"
- if test "$remote" = no; then
+ if $remote; then
dotest modules2-13 "${testcvs} -q ci -m add-it ampermodule" \
-"RCS file: ${TESTDIR}/cvsroot/first-dir/amper1,v
+"RCS file: ${CVSROOT_DIRNAME}/first-dir/amper1,v
done
Checking in ampermodule/first-dir/amper1;
-${TESTDIR}/cvsroot/first-dir/amper1,v <-- amper1
+${CVSROOT_DIRNAME}/first-dir/amper1,v <-- amper1
initial revision: 1\.1
done"
else
@@ -7481,10 +8967,10 @@ done"
# Work around this bug.
cd ampermodule
dotest modules2-13 "${testcvs} -q ci -m add-it" \
-"RCS file: ${TESTDIR}/cvsroot/first-dir/amper1,v
+"RCS file: ${CVSROOT_DIRNAME}/first-dir/amper1,v
done
Checking in first-dir/amper1;
-${TESTDIR}/cvsroot/first-dir/amper1,v <-- amper1
+${CVSROOT_DIRNAME}/first-dir/amper1,v <-- amper1
initial revision: 1\.1
done"
cd ..
@@ -7529,13 +9015,61 @@ U first-dir/amper1"
U first-dir/amper1
${PROG} [a-z]*: Updating second-dir"
dotest modules2-21 "test -f newdir/first-dir/amper1" ""
- dotest_fail modules2-22 "${testcvs} co badmod" \
+ dotest modules2-22 "test -d newdir/second-dir" ""
+ dotest_fail modules2-23 "${testcvs} co badmod" \
"${PROG} [a-z]*: modules file missing directory for module badmod" \
"${PROG} [a-z]*: modules file missing directory for module badmod
${PROG} \[[a-z]* aborted\]: cannot expand modules"
cd ..
rm -r 1
+ # Confirm that a rename with added depth nested in an ampersand
+ # module works.
+ mkdir 1; cd 1
+ dotest modules2-nestedrename-1 "${testcvs} -q co messymod" \
+"U messymod/amper1"
+ dotest modules2-nestedrename-2 "test -d messymod/sdir" ''
+ dotest modules2-nestedrename-3 "test -d messymod/sdir/CVS" ''
+ dotest modules2-nestedrename-4 "test -d messymod/sdir/child" ''
+ dotest modules2-nestedrename-5 "test -d messymod/sdir/child/CVS" ''
+ cd ..; rm -r 1
+
+ # FIXME: client/server has a bug. It should be working like a local
+ # repository in this case, but fails to check out the second module
+ # in the list when a branch is specified.
+ mkdir 1; cd 1
+ dotest modules2-ampertag-setup-1 \
+"${testcvs} -Q rtag tag first-dir second-dir third-dir" \
+''
+ dotest modules2-ampertag-1 "${testcvs} -q co -rtag ampermodule" \
+"U first-dir/amper1"
+ if $remote; then
+ dotest_fail modules2-ampertag-2 "test -d ampermodule/second-dir" ''
+ dotest_fail modules2-ampertag-3 "test -d ampermodule/second-dir/CVS" ''
+ else
+ dotest modules2-ampertag-2 "test -d ampermodule/second-dir" ''
+ dotest modules2-ampertag-3 "test -d ampermodule/second-dir/CVS" ''
+ fi
+ cd ..; rm -r 1
+
+ # Test for tag files when an ampermod is renamed with more path
+ # elements than it started with.
+ #
+ # FIXME: This is currently broken in the remote case, possibly only
+ # because the messymodchild isn't being checked out at all.
+ mkdir 1; cd 1
+# dotest modules2-tagfiles-setup-1 \
+#"${testcvs} -Q rtag -b branch first-dir second-dir" \
+#''
+ dotest modules2-tagfiles-1 "${testcvs} -q co -rtag messymod" \
+"U messymod/amper1"
+ if $remote; then
+ dotest_fail modules2-tagfiles-2r "test -d messymod/sdir" ''
+ else
+ dotest modules2-tagfiles-2 "cat messymod/sdir/CVS/Tag" 'Ttag'
+ fi
+ cd ..; rm -r 1
+
# Test that CVS gives an error if one combines -a with
# other options.
# Probably would be better to break this out into a separate
@@ -7548,7 +9082,7 @@ ${PROG} \[[a-z]* aborted\]: cannot expand modules"
echo 'aliasopt -a -d onedir first-dir' >modules
dotest modules2-a0 "${testcvs} -q ci -m add-modules" \
"Checking in modules;
-${TESTDIR}/cvsroot/CVSROOT/modules,v <-- modules
+${CVSROOT_DIRNAME}/CVSROOT/modules,v <-- modules
new revision: 1\.[0-9]*; previous revision: 1\.[0-9]*
done
${PROG} [a-z]*: Rebuilding administrative file database"
@@ -7557,11 +9091,9 @@ ${PROG} [a-z]*: Rebuilding administrative file database"
"${PROG} [a-z]*: -a cannot be specified in the modules file along with other options" \
"${PROG} [a-z]*: -a cannot be specified in the modules file along with other options
${PROG} \[[a-z]* aborted\]: cannot expand modules"
+ cd ..; rm -r 1
# Clean up.
- rm -r CVSROOT
- cd ..
- rm -r 1
rm -rf ${CVSROOT_DIRNAME}/first-dir
rm -rf ${CVSROOT_DIRNAME}/second-dir
rm -rf ${CVSROOT_DIRNAME}/third-dir
@@ -7577,7 +9109,7 @@ ${PROG} \[[a-z]* aborted\]: cannot expand modules"
dotest modules3-0 "${testcvs} -q co -l ." ''
mkdir first-dir
dotest modules3-1 "${testcvs} add first-dir" \
-"Directory ${TESTDIR}/cvsroot/first-dir added to the repository"
+"Directory ${CVSROOT_DIRNAME}/first-dir added to the repository"
cd first-dir
echo file1 >file1
@@ -7585,10 +9117,10 @@ ${PROG} \[[a-z]* aborted\]: cannot expand modules"
"${PROG}"' [a-z]*: scheduling file `file1'\'' for addition
'"${PROG}"' [a-z]*: use .'"${PROG}"' commit. to add this file permanently'
dotest modules3-3 "${testcvs} -q ci -m add-it" \
-"RCS file: ${TESTDIR}/cvsroot/first-dir/file1,v
+"RCS file: ${CVSROOT_DIRNAME}/first-dir/file1,v
done
Checking in file1;
-${TESTDIR}/cvsroot/first-dir/file1,v <-- file1
+${CVSROOT_DIRNAME}/first-dir/file1,v <-- file1
initial revision: 1\.1
done"
cd ..
@@ -7607,7 +9139,7 @@ another/path/test -d another/path/test first-dir
EOF
dotest modules3-5 "${testcvs} -q ci -m add-modules" \
"Checking in modules;
-${TESTDIR}/cvsroot/CVSROOT/modules,v <-- modules
+${CVSROOT_DIRNAME}/CVSROOT/modules,v <-- modules
new revision: 1\.[0-9]*; previous revision: 1\.[0-9]*
done
${PROG} [a-z]*: Rebuilding administrative file database"
@@ -7627,8 +9159,8 @@ ${PROG} [a-z]*: Rebuilding administrative file database"
# considering this is a documented technique and everything.
dotest modules3-7a \
"${testcvs} import -m add-dirs second-dir tag1 tag2" \
-"${PROG} [a-z]*: Importing ${TESTDIR}/cvsroot/second-dir/suba
-${PROG} [a-z]*: Importing ${TESTDIR}/cvsroot/second-dir/suba/subb
+"${PROG} [a-z]*: Importing ${CVSROOT_DIRNAME}/second-dir/suba
+${PROG} [a-z]*: Importing ${CVSROOT_DIRNAME}/second-dir/suba/subb
No conflicts created by this import" "
No conflicts created by this import"
@@ -7640,15 +9172,15 @@ ${PROG} [a-z]*: Updating second-dir/suba
${PROG} [a-z]*: Updating second-dir/suba/subb" \
"${PROG} server: Updating second-dir"
- if test "x$remote" = xyes; then
+ if $remote; then
cd second-dir
mkdir suba
dotest modules3-7-workaround1 "${testcvs} add suba" \
-"Directory ${TESTDIR}/cvsroot/second-dir/suba added to the repository"
+"Directory ${CVSROOT_DIRNAME}/second-dir/suba added to the repository"
cd suba
mkdir subb
dotest modules3-7-workaround2 "${testcvs} add subb" \
-"Directory ${TESTDIR}/cvsroot/second-dir/suba/subb added to the repository"
+"Directory ${CVSROOT_DIRNAME}/second-dir/suba/subb added to the repository"
cd ../..
fi
@@ -7658,10 +9190,10 @@ ${PROG} [a-z]*: Updating second-dir/suba/subb" \
"${PROG} [a-z]*: scheduling file .fileb. for addition
${PROG} [a-z]*: use .${PROG} commit. to add this file permanently"
dotest modules3-7d "${testcvs} -q ci -m add-it" \
-"RCS file: ${TESTDIR}/cvsroot/second-dir/suba/subb/fileb,v
+"RCS file: ${CVSROOT_DIRNAME}/second-dir/suba/subb/fileb,v
done
Checking in fileb;
-${TESTDIR}/cvsroot/second-dir/suba/subb/fileb,v <-- fileb
+${CVSROOT_DIRNAME}/second-dir/suba/subb/fileb,v <-- fileb
initial revision: 1\.1
done"
cd ../../..
@@ -7686,7 +9218,7 @@ done"
# While we are doing things like twisted uses of '/' (e.g.
# modules3-12), try this one.
- if test "x$remote" = xyes; then
+ if $remote; then
dotest_fail modules3-11b \
"${testcvs} -q update ${TESTDIR}/1/src/sub1/sub2/sub3/dir/file1" \
"absolute pathname .${TESTDIR}/1/src/sub1/sub2/sub3/dir. illegal for server"
@@ -7708,24 +9240,24 @@ done"
# instead of a real error).
# I'm tempted to just make it a fatal error to have '/' in a
# module name. But see comments at modules3-16.
- if test "x$remote" = xno; then
- mkdir 1; cd 1
- dotest modules3-12 "${testcvs} -q co path/in/modules" \
+ if $remote; then :; else
+ mkdir 1; cd 1
+ dotest modules3-12 "${testcvs} -q co path/in/modules" \
"U first-dir/file1"
- dotest modules3-13 "test -f path/in/modules/first-dir/file1" ''
- cd ..; rm -r 1
+ dotest modules3-13 "test -f path/in/modules/first-dir/file1" ''
+ cd ..; rm -r 1
+ fi # end of tests skipped for remote
- # Now here is where it gets seriously bogus.
+ # Now here is where it used to get seriously bogus.
mkdir 1; cd 1
dotest modules3-14 \
"${testcvs} -q rtag tag1 path/in/modules" ''
- # CVS creates this even though rtag should *never* affect
+ # CVS used to create this even though rtag should *never* affect
# the directory current when it is called!
- dotest modules3-15 "test -d path/in/modules" ''
- # Just for trivia's sake, rdiff is not similarly vulnerable
- # because it passes 0 for run_module_prog to do_module.
+ dotest_fail modules3-15 "test -d path/in/modules" ''
+ # Just for trivia's sake, rdiff was not similarly vulnerable
+ # because it passed 0 for run_module_prog to do_module.
cd ..; rm -r 1
- fi # end of tests skipped for remote
# Some people seem to want this to work. I still suspect there
# are dark corners in slashes in module names. This probably wants
@@ -7750,12 +9282,12 @@ done"
dotest modules4-1 "${testcvs} -q co -l ." ''
mkdir first-dir
dotest modules4-2 "${testcvs} add first-dir" \
-"Directory ${TESTDIR}/cvsroot/first-dir added to the repository"
+"Directory ${CVSROOT_DIRNAME}/first-dir added to the repository"
cd first-dir
mkdir subdir
dotest modules4-3 "${testcvs} add subdir" \
-"Directory ${TESTDIR}/cvsroot/first-dir/subdir added to the repository"
+"Directory ${CVSROOT_DIRNAME}/first-dir/subdir added to the repository"
echo file1 > file1
dotest modules4-4 "${testcvs} add file1" \
@@ -7768,16 +9300,16 @@ done"
'"${PROG}"' [a-z]*: use .'"${PROG}"' commit. to add this file permanently'
dotest modules4-6 "${testcvs} -q ci -m add-it" \
-"RCS file: ${TESTDIR}/cvsroot/first-dir/file1,v
+"RCS file: ${CVSROOT_DIRNAME}/first-dir/file1,v
done
Checking in file1;
-${TESTDIR}/cvsroot/first-dir/file1,v <-- file1
+${CVSROOT_DIRNAME}/first-dir/file1,v <-- file1
initial revision: 1\.1
done
-RCS file: ${TESTDIR}/cvsroot/first-dir/subdir/file2,v
+RCS file: ${CVSROOT_DIRNAME}/first-dir/subdir/file2,v
done
Checking in subdir/file2;
-${TESTDIR}/cvsroot/first-dir/subdir/file2,v <-- file2
+${CVSROOT_DIRNAME}/first-dir/subdir/file2,v <-- file2
initial revision: 1\.1
done"
@@ -7793,7 +9325,7 @@ somewhat -a first-dir !first-dir/subdir
EOF
dotest modules4-8 "${testcvs} -q ci -m add-modules" \
"Checking in modules;
-${TESTDIR}/cvsroot/CVSROOT/modules,v <-- modules
+${CVSROOT_DIRNAME}/CVSROOT/modules,v <-- modules
new revision: 1\.[0-9]*; previous revision: 1\.[0-9]*
done
${PROG} [a-z]*: Rebuilding administrative file database"
@@ -7811,7 +9343,11 @@ U first-dir/subdir/file2"
dotest_fail modules4-11 "test -d first-dir/subdir" ''
rm -r first-dir
- if test "$remote" = no; then
+ if $remote; then
+ # But remote seems to do it the other way.
+ dotest modules4-11a "${testcvs} -q co somewhat" "U first-dir/file1"
+ dotest_fail modules4-11b "test -d first-dir/subdir" ''
+ else
# This is strange behavior, in that the order of the
# "!first-dir/subdir" and "first-dir" matter, and it isn't
# clear that they should. I suspect it is long-standing
@@ -7819,10 +9355,6 @@ U first-dir/subdir/file2"
dotest modules4-11a "${testcvs} -q co somewhat" \
"U first-dir/file1
U first-dir/subdir/file2"
- else
- # But remote seems to do it the other way.
- dotest modules4-11a "${testcvs} -q co somewhat" "U first-dir/file1"
- dotest_fail modules4-11b "test -d first-dir/subdir" ''
fi
rm -r first-dir
@@ -7835,7 +9367,7 @@ ${PROG} [a-z]*: Ignoring first-dir/subdir"
cd 1/first-dir/subdir
dotest modules4-13 "${testcvs} log file2" "
-RCS file: ${TESTDIR}/cvsroot/first-dir/subdir/file2,v
+RCS file: ${CVSROOT_DIRNAME}/first-dir/subdir/file2,v
Working file: file2
head: 1\.1
branch:
@@ -7867,11 +9399,11 @@ add-it
cd first-dir
mkdir subdir
dotest modules5-2 "${testcvs} add subdir" \
-"Directory ${TESTDIR}/cvsroot/first-dir/subdir added to the repository"
+"Directory ${CVSROOT_DIRNAME}/first-dir/subdir added to the repository"
cd subdir
mkdir ssdir
dotest modules5-3 "${testcvs} add ssdir" \
-"Directory ${TESTDIR}/cvsroot/first-dir/subdir/ssdir added to the repository"
+"Directory ${CVSROOT_DIRNAME}/first-dir/subdir/ssdir added to the repository"
touch a b
dotest modules5-4 "${testcvs} add a b" \
"${PROG} [a-z]*: scheduling file .a. for addition
@@ -7881,16 +9413,16 @@ ${PROG} [a-z]*: use .${PROG} commit. to add these files permanently"
dotest modules5-5 "${testcvs} ci -m added" \
"${PROG} [a-z]*: Examining .
${PROG} [a-z]*: Examining ssdir
-RCS file: ${TESTDIR}/cvsroot/first-dir/subdir/a,v
+RCS file: ${CVSROOT_DIRNAME}/first-dir/subdir/a,v
done
Checking in a;
-${TESTDIR}/cvsroot/first-dir/subdir/a,v <-- a
+${CVSROOT_DIRNAME}/first-dir/subdir/a,v <-- a
initial revision: 1\.1
done
-RCS file: ${TESTDIR}/cvsroot/first-dir/subdir/b,v
+RCS file: ${CVSROOT_DIRNAME}/first-dir/subdir/b,v
done
Checking in b;
-${TESTDIR}/cvsroot/first-dir/subdir/b,v <-- b
+${CVSROOT_DIRNAME}/first-dir/subdir/b,v <-- b
initial revision: 1\.1
done"
@@ -7927,7 +9459,7 @@ EOF
dotest modules5-7 "${testcvs} ci -m 'add modules' CVSROOT/modules" \
"" \
"Checking in CVSROOT/modules;
-${TESTDIR}/cvsroot/CVSROOT/modules,v <-- modules
+${CVSROOT_DIRNAME}/CVSROOT/modules,v <-- modules
new revision: 1\.[0-9]*; previous revision: 1\.[0-9]*
done
${PROG} [a-z]*: Rebuilding administrative file database"
@@ -7935,7 +9467,7 @@ ${PROG} [a-z]*: Rebuilding administrative file database"
cd ..
rm -rf first-dir
# Test that real modules check out to realmodule/a, not subdir/a.
- if test "$remote" = "yes"; then
+ if $remote; then
dotest modules5-8 "${testcvs} co realmodule" \
"U realmodule/a
${PROG} [a-z]*: Executing ..${CVSROOT_DIRNAME}/checkout\.sh. .realmodule..
@@ -7950,7 +9482,7 @@ args: realmodule"
fi
dotest modules5-9 "test -d realmodule && test -f realmodule/a" ""
dotest_fail modules5-10 "test -f realmodule/b" ""
- if test "$remote" = "yes"; then
+ if $remote; then
dotest modules5-11 "${testcvs} -q co realmodule" \
"checkout script invoked in .*
args: realmodule"
@@ -7990,8 +9522,10 @@ args: ${CVSROOT_DIRNAME}/first-dir/subdir"
Are you sure you want to release (and delete) directory .realmodule.: "
dotest modules5-15 "${testcvs} -q rtag -Dnow MYTAG realmodule" \
"tag script invoked in ${TESTDIR}/1
+args: realmodule MYTAG" \
+"tag script invoked in $tmp/cvs-serv[0-9a-z]*
args: realmodule MYTAG"
- if test "$remote" = "yes"; then
+ if $remote; then
dotest modules5-16 "${testcvs} -q export -r MYTAG realmodule" \
"U realmodule/a
export script invoked in .*
@@ -8010,7 +9544,7 @@ args: realmodule"
# FIXCVS: The client gets confused in these cases and tries to
# store the scripts in the wrong places.
- if test "$remote" != "yes"; then
+ if $remote; then :; else
# Now test the ability to check out a single file from a directory
dotest modules5-18 "${testcvs} co dirmodule/a" \
"U dirmodule/a
@@ -8149,7 +9683,7 @@ $PROG [a-z]*: Rebuilding administrative file database"
echo "TopLevelAdmin=yes" >config
dotest cvsadm-setup-2 "${testcvs} -q ci -m yes-top-level" \
"Checking in config;
-${TESTDIR}/cvsroot/CVSROOT/config,v <-- config
+${CVSROOT_DIRNAME}/CVSROOT/config,v <-- config
new revision: 1\.[0-9]*; previous revision: 1\.[0-9]*
done
${PROG} [a-z]*: Rebuilding administrative file database"
@@ -8222,12 +9756,12 @@ ${PROG} [a-z]*: Examining CVSROOT"
mkdir mod2-2
mkdir mod2-2/sub2-2
dotest cvsadm-2a "${testcvs} add mod1 mod1-2 mod2 mod2/sub2 mod2-2 mod2-2/sub2-2" \
-"Directory ${TESTDIR}/cvsroot/mod1 added to the repository
-Directory ${TESTDIR}/cvsroot/mod1-2 added to the repository
-Directory ${TESTDIR}/cvsroot/mod2 added to the repository
-Directory ${TESTDIR}/cvsroot/mod2/sub2 added to the repository
-Directory ${TESTDIR}/cvsroot/mod2-2 added to the repository
-Directory ${TESTDIR}/cvsroot/mod2-2/sub2-2 added to the repository"
+"Directory ${CVSROOT_DIRNAME}/mod1 added to the repository
+Directory ${CVSROOT_DIRNAME}/mod1-2 added to the repository
+Directory ${CVSROOT_DIRNAME}/mod2 added to the repository
+Directory ${CVSROOT_DIRNAME}/mod2/sub2 added to the repository
+Directory ${CVSROOT_DIRNAME}/mod2-2 added to the repository
+Directory ${CVSROOT_DIRNAME}/mod2-2/sub2-2 added to the repository"
# Populate the directories for the halibut
echo "file1" > mod1/file1
@@ -8327,7 +9861,7 @@ U dir2d1/sub2d1/file1"
dotest cvsadm-7b "cat CVS/Repository" \
"${AREP}\."
dotest cvsadm-7d "cat dir2d1/CVS/Repository" \
-"${AREP}CVSROOT/Emptydir"
+"${AREP}\."
dotest cvsadm-7f "cat dir2d1/sub2d1/CVS/Repository" \
"${AREP}mod1"
rm -rf CVS dir2d1
@@ -8338,7 +9872,7 @@ U dir2d2/sub2d2/file2"
dotest cvsadm-8b "cat CVS/Repository" \
"${AREP}\."
dotest cvsadm-8d "cat dir2d2/CVS/Repository" \
-"${AREP}CVSROOT/Emptydir"
+"${AREP}mod2"
dotest cvsadm-8f "cat dir2d2/sub2d2/CVS/Repository" \
"${AREP}mod2/sub2"
rm -rf CVS dir2d2
@@ -8428,7 +9962,7 @@ U dir2d1/sub2d1/file1"
"${AREP}mod1"
# the usual for 2d1mod
dotest cvsadm-13f "cat dir2d1/CVS/Repository" \
-"${AREP}CVSROOT/Emptydir"
+"${AREP}."
dotest cvsadm-13h "cat dir2d1/sub2d1/CVS/Repository" \
"${AREP}mod1"
rm -rf CVS 1mod dir2d1
@@ -8446,7 +9980,7 @@ U dir2d2/sub2d2/file2"
"${AREP}mod1"
# the usual for 2d2mod
dotest cvsadm-14f "cat dir2d2/CVS/Repository" \
-"${AREP}CVSROOT/Emptydir"
+"${AREP}mod2"
dotest cvsadm-14h "cat dir2d2/sub2d2/CVS/Repository" \
"${AREP}mod2/sub2"
rm -rf CVS 1mod dir2d2
@@ -8516,7 +10050,7 @@ U dir2d1/sub2d1/file1"
"${AREP}mod2/sub2"
# the usual for 2d1mod
dotest cvsadm-18f "cat dir2d1/CVS/Repository" \
-"${AREP}CVSROOT/Emptydir"
+"${AREP}."
dotest cvsadm-18h "cat dir2d1/sub2d1/CVS/Repository" \
"${AREP}mod1"
rm -rf CVS 2mod dir2d1
@@ -8534,7 +10068,7 @@ U dir2d2/sub2d2/file2"
"${AREP}mod2/sub2"
# the usual for 2d2mod
dotest cvsadm-19f "cat dir2d2/CVS/Repository" \
-"${AREP}CVSROOT/Emptydir"
+"${AREP}mod2"
dotest cvsadm-19h "cat dir2d2/sub2d2/CVS/Repository" \
"${AREP}mod2/sub2"
rm -rf CVS 2mod dir2d2
@@ -8587,7 +10121,7 @@ U dir2d1/sub2d1/file1"
"${AREP}mod1"
# the usual for 2d1mod
dotest cvsadm-22f "cat dir2d1/CVS/Repository" \
-"${AREP}CVSROOT/Emptydir"
+"${AREP}\."
dotest cvsadm-22h "cat dir2d1/sub2d1/CVS/Repository" \
"${AREP}mod1"
rm -rf CVS dir1d1 dir2d1
@@ -8605,7 +10139,7 @@ U dir2d2/sub2d2/file2"
"${AREP}mod1"
# the usual for 2d2mod
dotest cvsadm-23f "cat dir2d2/CVS/Repository" \
-"${AREP}CVSROOT/Emptydir"
+"${AREP}mod2"
dotest cvsadm-23h "cat dir2d2/sub2d2/CVS/Repository" \
"${AREP}mod2/sub2"
rm -rf CVS dir1d1 dir2d2
@@ -8642,7 +10176,7 @@ U dir2d1/sub2d1/file1"
"${AREP}mod2/sub2"
# the usual for 2d1mod
dotest cvsadm-25f "cat dir2d1/CVS/Repository" \
-"${AREP}CVSROOT/Emptydir"
+"${AREP}\."
dotest cvsadm-25h "cat dir2d1/sub2d1/CVS/Repository" \
"${AREP}mod1"
rm -rf CVS dir1d2 dir2d1
@@ -8660,7 +10194,7 @@ U dir2d2/sub2d2/file2"
"${AREP}mod2/sub2"
# the usual for 2d2mod
dotest cvsadm-26f "cat dir2d2/CVS/Repository" \
-"${AREP}CVSROOT/Emptydir"
+"${AREP}mod2"
dotest cvsadm-26h "cat dir2d2/sub2d2/CVS/Repository" \
"${AREP}mod2/sub2"
rm -rf CVS dir1d2 dir2d2
@@ -8678,12 +10212,12 @@ U dir2d1-2/sub2d1-2/file1-2"
"${AREP}\."
# the usual for 2d1mod
dotest cvsadm-27d "cat dir2d1/CVS/Repository" \
-"${AREP}CVSROOT/Emptydir"
+"${AREP}\."
dotest cvsadm-27f "cat dir2d1/sub2d1/CVS/Repository" \
"${AREP}mod1"
# the usual for 2d1mod
dotest cvsadm-27h "cat dir2d1-2/CVS/Repository" \
-"${AREP}CVSROOT/Emptydir"
+"${AREP}\."
dotest cvsadm-27j "cat dir2d1-2/sub2d1-2/CVS/Repository" \
"${AREP}mod1-2"
rm -rf CVS dir2d1 dir2d1-2
@@ -8698,12 +10232,12 @@ U dir2d2/sub2d2/file2"
"${AREP}\."
# the usual for 2d1mod
dotest cvsadm-28d "cat dir2d1/CVS/Repository" \
-"${AREP}CVSROOT/Emptydir"
+"${AREP}\."
dotest cvsadm-28f "cat dir2d1/sub2d1/CVS/Repository" \
"${AREP}mod1"
# the usual for 2d2mod
dotest cvsadm-28h "cat dir2d2/CVS/Repository" \
-"${AREP}CVSROOT/Emptydir"
+"${AREP}mod2"
dotest cvsadm-28j "cat dir2d2/sub2d2/CVS/Repository" \
"${AREP}mod2/sub2"
rm -rf CVS dir2d1 dir2d2
@@ -8721,12 +10255,12 @@ U dir2d2-2/sub2d2-2/file2-2"
"${AREP}\."
# the usual for 2d2mod
dotest cvsadm-29d "cat dir2d2/CVS/Repository" \
-"${AREP}CVSROOT/Emptydir"
+"${AREP}mod2"
dotest cvsadm-29f "cat dir2d2/sub2d2/CVS/Repository" \
"${AREP}mod2/sub2"
# the usual for 2d2mod
dotest cvsadm-29h "cat dir2d2-2/CVS/Repository" \
-"${AREP}CVSROOT/Emptydir"
+"${AREP}mod2-2"
dotest cvsadm-29j "cat dir2d2-2/sub2d2-2/CVS/Repository" \
"${AREP}mod2-2/sub2-2"
rm -rf CVS dir2d2 dir2d2-2
@@ -8885,7 +10419,7 @@ U dir/dir2d1/sub2d1/file1"
"${AREP}mod1"
# the usual for 2d1mod
dotest cvsadm-1d13h "cat dir/dir2d1/CVS/Repository" \
-"${AREP}CVSROOT/Emptydir"
+"${AREP}\."
dotest cvsadm-1d13j "cat dir/dir2d1/sub2d1/CVS/Repository" \
"${AREP}mod1"
rm -rf CVS dir
@@ -8905,7 +10439,7 @@ U dir/dir2d2/sub2d2/file2"
"${AREP}mod1"
# the usual for 2d2mod
dotest cvsadm-1d14h "cat dir/dir2d2/CVS/Repository" \
-"${AREP}CVSROOT/Emptydir"
+"${AREP}mod2"
dotest cvsadm-1d14j "cat dir/dir2d2/sub2d2/CVS/Repository" \
"${AREP}mod2/sub2"
rm -rf CVS dir
@@ -8922,7 +10456,7 @@ U dir/2mod-2/file2-2"
"${AREP}\."
# the usual for the dir level
dotest cvsadm-1d15d "cat dir/CVS/Repository" \
-"${AREP}\."
+"${AREP}mod2"
# the usual for 2mod
dotest cvsadm-1d15f "cat dir/2mod/CVS/Repository" \
"${AREP}mod2/sub2"
@@ -8940,7 +10474,7 @@ U dir/dir1d1/file1"
"${AREP}\."
# the usual for the dir level
dotest cvsadm-1d16d "cat dir/CVS/Repository" \
-"${AREP}\."
+"${AREP}mod2"
# the usual for 2mod
dotest cvsadm-1d16f "cat dir/2mod/CVS/Repository" \
"${AREP}mod2/sub2"
@@ -8958,7 +10492,7 @@ U dir/dir1d2/file2"
"${AREP}\."
# the usual for the dir level
dotest cvsadm-1d17d "cat dir/CVS/Repository" \
-"${AREP}\."
+"${AREP}mod2"
# the usual for 2mod
dotest cvsadm-1d17f "cat dir/2mod/CVS/Repository" \
"${AREP}mod2/sub2"
@@ -8976,13 +10510,13 @@ U dir/dir2d1/sub2d1/file1"
"${AREP}\."
# the usual for the dir level
dotest cvsadm-1d18d "cat dir/CVS/Repository" \
-"${AREP}\."
+"${AREP}mod2"
# the usual for 2mod
dotest cvsadm-1d18f "cat dir/2mod/CVS/Repository" \
"${AREP}mod2/sub2"
# the usual for 2d1mod
dotest cvsadm-1d18h "cat dir/dir2d1/CVS/Repository" \
-"${AREP}CVSROOT/Emptydir"
+"${AREP}\."
dotest cvsadm-1d18j "cat dir/dir2d1/sub2d1/CVS/Repository" \
"${AREP}mod1"
rm -rf CVS dir
@@ -8996,13 +10530,13 @@ U dir/dir2d2/sub2d2/file2"
"${AREP}\."
# the usual for the dir level
dotest cvsadm-1d19d "cat dir/CVS/Repository" \
-"${AREP}\."
+"${AREP}mod2"
# the usual for 2mod
dotest cvsadm-1d19f "cat dir/2mod/CVS/Repository" \
"${AREP}mod2/sub2"
# the usual for 2d2mod
dotest cvsadm-1d19h "cat dir/dir2d2/CVS/Repository" \
-"${AREP}CVSROOT/Emptydir"
+"${AREP}mod2"
dotest cvsadm-1d19j "cat dir/dir2d2/sub2d2/CVS/Repository" \
"${AREP}mod2/sub2"
rm -rf CVS dir
@@ -9061,7 +10595,7 @@ U dir/dir2d1/sub2d1/file1"
"${AREP}mod1"
# the usual for 2d1mod
dotest cvsadm-1d22h "cat dir/dir2d1/CVS/Repository" \
-"${AREP}CVSROOT/Emptydir"
+"${AREP}\."
dotest cvsadm-1d22j "cat dir/dir2d1/sub2d1/CVS/Repository" \
"${AREP}mod1"
rm -rf CVS dir
@@ -9081,7 +10615,7 @@ U dir/dir2d2/sub2d2/file2"
"${AREP}mod1"
# the usual for 2d2mod
dotest cvsadm-1d23h "cat dir/dir2d2/CVS/Repository" \
-"${AREP}CVSROOT/Emptydir"
+"${AREP}mod2"
dotest cvsadm-1d23j "cat dir/dir2d2/sub2d2/CVS/Repository" \
"${AREP}mod2/sub2"
rm -rf CVS dir
@@ -9098,7 +10632,7 @@ U dir/dir1d2-2/file2-2"
"${AREP}\."
# the usual for the dir level
dotest cvsadm-1d24d "cat dir/CVS/Repository" \
-"${AREP}\."
+"${AREP}mod2"
# the usual for 1d2mod
dotest cvsadm-1d24f "cat dir/dir1d2/CVS/Repository" \
"${AREP}mod2/sub2"
@@ -9116,13 +10650,13 @@ U dir/dir2d1/sub2d1/file1"
"${AREP}\."
# the usual for the dir level
dotest cvsadm-1d25d "cat dir/CVS/Repository" \
-"${AREP}\."
+"${AREP}mod2"
# the usual for 1d2mod
dotest cvsadm-1d25f "cat dir/dir1d2/CVS/Repository" \
"${AREP}mod2/sub2"
# the usual for 2d1mod
dotest cvsadm-1d25h "cat dir/dir2d1/CVS/Repository" \
-"${AREP}CVSROOT/Emptydir"
+"${AREP}\."
dotest cvsadm-1d25j "cat dir/dir2d1/sub2d1/CVS/Repository" \
"${AREP}mod1"
rm -rf CVS dir
@@ -9136,13 +10670,13 @@ U dir/dir2d2/sub2d2/file2"
"${AREP}\."
# the usual for the dir level
dotest cvsadm-1d26d "cat dir/CVS/Repository" \
-"${AREP}\."
+"${AREP}mod2"
# the usual for 1d2mod
dotest cvsadm-1d26f "cat dir/dir1d2/CVS/Repository" \
"${AREP}mod2/sub2"
# the usual for 2d2mod
dotest cvsadm-1d26h "cat dir/dir2d2/CVS/Repository" \
-"${AREP}CVSROOT/Emptydir"
+"${AREP}mod2"
dotest cvsadm-1d26j "cat dir/dir2d2/sub2d2/CVS/Repository" \
"${AREP}mod2/sub2"
rm -rf CVS dir
@@ -9159,15 +10693,15 @@ U dir/dir2d1-2/sub2d1-2/file1-2"
"${AREP}\."
# the usual for the dir level
dotest cvsadm-1d27d "cat dir/CVS/Repository" \
-"${AREP}\."
+"${AREP}CVSROOT/Emptydir"
# the usual for 2d1mod
dotest cvsadm-1d27f "cat dir/dir2d1/CVS/Repository" \
-"${AREP}CVSROOT/Emptydir"
+"${AREP}\."
dotest cvsadm-1d27h "cat dir/dir2d1/sub2d1/CVS/Repository" \
"${AREP}mod1"
# the usual for 2d1mod
dotest cvsadm-1d27j "cat dir/dir2d1-2/CVS/Repository" \
-"${AREP}CVSROOT/Emptydir"
+"${AREP}\."
dotest cvsadm-1d27l "cat dir/dir2d1-2/sub2d1-2/CVS/Repository" \
"${AREP}mod1-2"
rm -rf CVS dir
@@ -9181,15 +10715,15 @@ U dir/dir2d2/sub2d2/file2"
"${AREP}\."
# the usual for the dir level
dotest cvsadm-1d28d "cat dir/CVS/Repository" \
-"${AREP}\."
+"${AREP}CVSROOT/Emptydir"
# the usual for 2d1mod
dotest cvsadm-1d28f "cat dir/dir2d1/CVS/Repository" \
-"${AREP}CVSROOT/Emptydir"
+"${AREP}\."
dotest cvsadm-1d28h "cat dir/dir2d1/sub2d1/CVS/Repository" \
"${AREP}mod1"
# the usual for 2d2mod
dotest cvsadm-1d28j "cat dir/dir2d2/CVS/Repository" \
-"${AREP}CVSROOT/Emptydir"
+"${AREP}mod2"
dotest cvsadm-1d28l "cat dir/dir2d2/sub2d2/CVS/Repository" \
"${AREP}mod2/sub2"
rm -rf CVS dir
@@ -9209,12 +10743,12 @@ U dir/dir2d2-2/sub2d2-2/file2-2"
"${AREP}\."
# the usual for 2d2mod
dotest cvsadm-1d29f "cat dir/dir2d2/CVS/Repository" \
-"${AREP}CVSROOT/Emptydir"
+"${AREP}mod2"
dotest cvsadm-1d29h "cat dir/dir2d2/sub2d2/CVS/Repository" \
"${AREP}mod2/sub2"
# the usual for 2d2mod
dotest cvsadm-1d29j "cat dir/dir2d2-2/CVS/Repository" \
-"${AREP}CVSROOT/Emptydir"
+"${AREP}mod2-2"
dotest cvsadm-1d29l "cat dir/dir2d2-2/sub2d2-2/CVS/Repository" \
"${AREP}mod2-2/sub2-2"
rm -rf CVS dir
@@ -9228,283 +10762,283 @@ U dir/dir2d2-2/sub2d2-2/file2-2"
"${PROG} [a-z]*: cannot chdir to dir: No such file or directory
${PROG} [a-z]*: ignoring module 1mod"
- if test "$remote" = no; then
- # Remote can't handle this, even with the "mkdir dir".
- # This was also true of CVS 1.9.
+ if $remote; then :; else
+ # Remote can't handle this, even with the "mkdir dir".
+ # This was also true of CVS 1.9.
- mkdir dir
- dotest cvsadm-2d3 "${testcvs} co -d dir/dir2 1mod" \
+ mkdir dir
+ dotest cvsadm-2d3 "${testcvs} co -d dir/dir2 1mod" \
"${PROG} [a-z]*: Updating dir/dir2
U dir/dir2/file1"
- dotest cvsadm-2d3b "cat CVS/Repository" \
+ dotest cvsadm-2d3b "cat CVS/Repository" \
"${AREP}\."
- dotest_fail cvsadm-2d3d "test -f dir/CVS/Repository" ""
- dotest cvsadm-2d3f "cat dir/dir2/CVS/Repository" \
+ dotest_fail cvsadm-2d3d "test -f dir/CVS/Repository" ""
+ dotest cvsadm-2d3f "cat dir/dir2/CVS/Repository" \
"${AREP}mod1"
- rm -rf CVS dir
+ rm -rf CVS dir
- mkdir dir
- dotest cvsadm-2d4 "${testcvs} co -d dir/dir2 2mod" \
+ mkdir dir
+ dotest cvsadm-2d4 "${testcvs} co -d dir/dir2 2mod" \
"${PROG} [a-z]*: Updating dir/dir2
U dir/dir2/file2"
- dotest cvsadm-2d4b "cat CVS/Repository" \
+ dotest cvsadm-2d4b "cat CVS/Repository" \
"${AREP}\."
- dotest cvsadm-2d4f "cat dir/dir2/CVS/Repository" \
+ dotest cvsadm-2d4f "cat dir/dir2/CVS/Repository" \
"${AREP}mod2/sub2"
- rm -rf CVS dir
+ rm -rf CVS dir
- mkdir dir
- dotest cvsadm-2d5 "${testcvs} co -d dir/dir2 1d1mod" \
+ mkdir dir
+ dotest cvsadm-2d5 "${testcvs} co -d dir/dir2 1d1mod" \
"${PROG} [a-z]*: Updating dir/dir2
U dir/dir2/file1"
- dotest cvsadm-2d5b "cat CVS/Repository" \
+ dotest cvsadm-2d5b "cat CVS/Repository" \
"${AREP}\."
- dotest cvsadm-2d5f "cat dir/dir2/CVS/Repository" \
+ dotest cvsadm-2d5f "cat dir/dir2/CVS/Repository" \
"${AREP}mod1"
- rm -rf CVS dir
+ rm -rf CVS dir
- mkdir dir
- dotest cvsadm-2d6 "${testcvs} co -d dir/dir2 1d2mod" \
+ mkdir dir
+ dotest cvsadm-2d6 "${testcvs} co -d dir/dir2 1d2mod" \
"${PROG} [a-z]*: Updating dir/dir2
U dir/dir2/file2"
- dotest cvsadm-2d6b "cat CVS/Repository" \
+ dotest cvsadm-2d6b "cat CVS/Repository" \
"${AREP}\."
- dotest cvsadm-2d6f "cat dir/dir2/CVS/Repository" \
+ dotest cvsadm-2d6f "cat dir/dir2/CVS/Repository" \
"${AREP}mod2/sub2"
- rm -rf CVS dir
+ rm -rf CVS dir
- mkdir dir
- dotest cvsadm-2d7 "${testcvs} co -d dir/dir2 2d1mod" \
+ mkdir dir
+ dotest cvsadm-2d7 "${testcvs} co -d dir/dir2 2d1mod" \
"${PROG} [a-z]*: Updating dir/dir2
U dir/dir2/file1"
- dotest cvsadm-2d7b "cat CVS/Repository" \
+ dotest cvsadm-2d7b "cat CVS/Repository" \
"${AREP}\."
- dotest cvsadm-2d7f "cat dir/dir2/CVS/Repository" \
+ dotest cvsadm-2d7f "cat dir/dir2/CVS/Repository" \
"${AREP}mod1"
- rm -rf CVS dir
+ rm -rf CVS dir
- mkdir dir
- dotest cvsadm-2d8 "${testcvs} co -d dir/dir2 2d2mod" \
+ mkdir dir
+ dotest cvsadm-2d8 "${testcvs} co -d dir/dir2 2d2mod" \
"${PROG} [a-z]*: Updating dir/dir2
U dir/dir2/file2"
- dotest cvsadm-2d8b "cat CVS/Repository" \
+ dotest cvsadm-2d8b "cat CVS/Repository" \
"${AREP}\."
- dotest cvsadm-2d8f "cat dir/dir2/CVS/Repository" \
+ dotest cvsadm-2d8f "cat dir/dir2/CVS/Repository" \
"${AREP}mod2/sub2"
- rm -rf CVS dir
+ rm -rf CVS dir
- ##################################################
- ## And now, a few of those tests revisited to
- ## test the behavior of the -N flag.
- ##################################################
+ ##################################################
+ ## And now, a few of those tests revisited to
+ ## test the behavior of the -N flag.
+ ##################################################
- dotest cvsadm-N3 "${testcvs} co -N 1mod" \
+ dotest cvsadm-N3 "${testcvs} co -N 1mod" \
"${PROG} [a-z]*: Updating 1mod
U 1mod/file1"
- dotest cvsadm-N3b "cat CVS/Repository" \
+ dotest cvsadm-N3b "cat CVS/Repository" \
"${AREP}\."
- dotest cvsadm-N3d "cat 1mod/CVS/Repository" \
+ dotest cvsadm-N3d "cat 1mod/CVS/Repository" \
"${AREP}mod1"
- rm -rf CVS 1mod
+ rm -rf CVS 1mod
- dotest cvsadm-N4 "${testcvs} co -N 2mod" \
+ dotest cvsadm-N4 "${testcvs} co -N 2mod" \
"${PROG} [a-z]*: Updating 2mod
U 2mod/file2"
- dotest cvsadm-N4b "cat CVS/Repository" \
+ dotest cvsadm-N4b "cat CVS/Repository" \
"${AREP}\."
- dotest cvsadm-N4d "cat 2mod/CVS/Repository" \
+ dotest cvsadm-N4d "cat 2mod/CVS/Repository" \
"${AREP}mod2/sub2"
- rm -rf CVS 2mod
+ rm -rf CVS 2mod
- dotest cvsadm-N5 "${testcvs} co -N 1d1mod" \
+ dotest cvsadm-N5 "${testcvs} co -N 1d1mod" \
"${PROG} [a-z]*: Updating dir1d1
U dir1d1/file1"
- dotest cvsadm-N5b "cat CVS/Repository" \
+ dotest cvsadm-N5b "cat CVS/Repository" \
"${AREP}\."
- dotest cvsadm-N5d "cat dir1d1/CVS/Repository" \
+ dotest cvsadm-N5d "cat dir1d1/CVS/Repository" \
"${AREP}mod1"
- rm -rf CVS dir1d1
+ rm -rf CVS dir1d1
- dotest cvsadm-N6 "${testcvs} co -N 1d2mod" \
+ dotest cvsadm-N6 "${testcvs} co -N 1d2mod" \
"${PROG} [a-z]*: Updating dir1d2
U dir1d2/file2"
- dotest cvsadm-N6b "cat CVS/Repository" \
+ dotest cvsadm-N6b "cat CVS/Repository" \
"${AREP}\."
- dotest cvsadm-N6d "cat dir1d2/CVS/Repository" \
+ dotest cvsadm-N6d "cat dir1d2/CVS/Repository" \
"${AREP}mod2/sub2"
- rm -rf CVS dir1d2
+ rm -rf CVS dir1d2
- dotest cvsadm-N7 "${testcvs} co -N 2d1mod" \
+ dotest cvsadm-N7 "${testcvs} co -N 2d1mod" \
"${PROG} [a-z]*: Updating dir2d1/sub2d1
U dir2d1/sub2d1/file1"
- dotest cvsadm-N7b "cat CVS/Repository" \
+ dotest cvsadm-N7b "cat CVS/Repository" \
"${AREP}\."
- dotest cvsadm-N7d "cat dir2d1/CVS/Repository" \
-"${AREP}CVSROOT/Emptydir"
- dotest cvsadm-N7f "cat dir2d1/sub2d1/CVS/Repository" \
+ dotest cvsadm-N7d "cat dir2d1/CVS/Repository" \
+"${AREP}\."
+ dotest cvsadm-N7f "cat dir2d1/sub2d1/CVS/Repository" \
"${AREP}mod1"
- rm -rf CVS dir2d1
+ rm -rf CVS dir2d1
- dotest cvsadm-N8 "${testcvs} co -N 2d2mod" \
+ dotest cvsadm-N8 "${testcvs} co -N 2d2mod" \
"${PROG} [a-z]*: Updating dir2d2/sub2d2
U dir2d2/sub2d2/file2"
- dotest cvsadm-N8b "cat CVS/Repository" \
+ dotest cvsadm-N8b "cat CVS/Repository" \
"${AREP}\."
- dotest cvsadm-N8d "cat dir2d2/CVS/Repository" \
-"${AREP}CVSROOT/Emptydir"
- dotest cvsadm-N8f "cat dir2d2/sub2d2/CVS/Repository" \
+ dotest cvsadm-N8d "cat dir2d2/CVS/Repository" \
+"${AREP}mod2"
+ dotest cvsadm-N8f "cat dir2d2/sub2d2/CVS/Repository" \
"${AREP}mod2/sub2"
- rm -rf CVS dir2d2
+ rm -rf CVS dir2d2
- ## the ones in one-deep directories
+ ## the ones in one-deep directories
- dotest cvsadm-N1d3 "${testcvs} co -N -d dir 1mod" \
+ dotest cvsadm-N1d3 "${testcvs} co -N -d dir 1mod" \
"${PROG} [a-z]*: Updating dir/1mod
U dir/1mod/file1"
- dotest cvsadm-N1d3b "cat CVS/Repository" \
+ dotest cvsadm-N1d3b "cat CVS/Repository" \
"${AREP}\."
- dotest cvsadm-N1d3d "cat dir/CVS/Repository" \
+ dotest cvsadm-N1d3d "cat dir/CVS/Repository" \
"${AREP}\."
- dotest cvsadm-N1d3f "cat dir/1mod/CVS/Repository" \
+ dotest cvsadm-N1d3f "cat dir/1mod/CVS/Repository" \
"${AREP}mod1"
- rm -rf CVS dir
+ rm -rf CVS dir
- dotest cvsadm-N1d4 "${testcvs} co -N -d dir 2mod" \
+ dotest cvsadm-N1d4 "${testcvs} co -N -d dir 2mod" \
"${PROG} [a-z]*: Updating dir/2mod
U dir/2mod/file2"
- dotest cvsadm-N1d4b "cat CVS/Repository" \
-"${AREP}\."
- dotest cvsadm-N1d4d "cat dir/CVS/Repository" \
+ dotest cvsadm-N1d4b "cat CVS/Repository" \
"${AREP}\."
- dotest cvsadm-N1d4f "cat dir/2mod/CVS/Repository" \
+ dotest cvsadm-N1d4d "cat dir/CVS/Repository" \
+"${AREP}mod2"
+ dotest cvsadm-N1d4f "cat dir/2mod/CVS/Repository" \
"${AREP}mod2/sub2"
- rm -rf CVS dir
+ rm -rf CVS dir
- dotest cvsadm-N1d5 "${testcvs} co -N -d dir 1d1mod" \
+ dotest cvsadm-N1d5 "${testcvs} co -N -d dir 1d1mod" \
"${PROG} [a-z]*: Updating dir/dir1d1
U dir/dir1d1/file1"
- dotest cvsadm-N1d5b "cat CVS/Repository" \
+ dotest cvsadm-N1d5b "cat CVS/Repository" \
"${AREP}\."
- dotest cvsadm-N1d5d "cat dir/CVS/Repository" \
+ dotest cvsadm-N1d5d "cat dir/CVS/Repository" \
"${AREP}\."
- dotest cvsadm-N1d5d "cat dir/dir1d1/CVS/Repository" \
+ dotest cvsadm-N1d5d "cat dir/dir1d1/CVS/Repository" \
"${AREP}mod1"
- rm -rf CVS dir
+ rm -rf CVS dir
- dotest cvsadm-N1d6 "${testcvs} co -N -d dir 1d2mod" \
+ dotest cvsadm-N1d6 "${testcvs} co -N -d dir 1d2mod" \
"${PROG} [a-z]*: Updating dir/dir1d2
U dir/dir1d2/file2"
- dotest cvsadm-N1d6b "cat CVS/Repository" \
-"${AREP}\."
- dotest cvsadm-N1d6d "cat dir/CVS/Repository" \
+ dotest cvsadm-N1d6b "cat CVS/Repository" \
"${AREP}\."
- dotest cvsadm-N1d6f "cat dir/dir1d2/CVS/Repository" \
+ dotest cvsadm-N1d6d "cat dir/CVS/Repository" \
+"${AREP}mod2"
+ dotest cvsadm-N1d6f "cat dir/dir1d2/CVS/Repository" \
"${AREP}mod2/sub2"
- rm -rf CVS dir
+ rm -rf CVS dir
- dotest cvsadm-N1d7 "${testcvs} co -N -d dir 2d1mod" \
+ dotest cvsadm-N1d7 "${testcvs} co -N -d dir 2d1mod" \
"${PROG} [a-z]*: Updating dir/dir2d1/sub2d1
U dir/dir2d1/sub2d1/file1"
- dotest cvsadm-N1d7b "cat CVS/Repository" \
-"${AREP}\."
- dotest cvsadm-N1d7d "cat dir/CVS/Repository" \
+ dotest cvsadm-N1d7b "cat CVS/Repository" \
"${AREP}\."
- dotest cvsadm-N1d7f "cat dir/dir2d1/CVS/Repository" \
+ dotest cvsadm-N1d7d "cat dir/CVS/Repository" \
"${AREP}CVSROOT/Emptydir"
- dotest cvsadm-N1d7h "cat dir/dir2d1/sub2d1/CVS/Repository" \
+ dotest cvsadm-N1d7f "cat dir/dir2d1/CVS/Repository" \
+"${AREP}\."
+ dotest cvsadm-N1d7h "cat dir/dir2d1/sub2d1/CVS/Repository" \
"${AREP}mod1"
- rm -rf CVS dir
+ rm -rf CVS dir
- dotest cvsadm-N1d8 "${testcvs} co -N -d dir 2d2mod" \
+ dotest cvsadm-N1d8 "${testcvs} co -N -d dir 2d2mod" \
"${PROG} [a-z]*: Updating dir/dir2d2/sub2d2
U dir/dir2d2/sub2d2/file2"
- dotest cvsadm-N1d8b "cat CVS/Repository" \
+ dotest cvsadm-N1d8b "cat CVS/Repository" \
"${AREP}\."
- dotest cvsadm-N1d8d "cat dir/CVS/Repository" \
+ dotest cvsadm-N1d8d "cat dir/CVS/Repository" \
"${AREP}\."
- dotest cvsadm-N1d8d "cat dir/dir2d2/CVS/Repository" \
-"${AREP}CVSROOT/Emptydir"
- dotest cvsadm-N1d8d "cat dir/dir2d2/sub2d2/CVS/Repository" \
+ dotest cvsadm-N1d8d "cat dir/dir2d2/CVS/Repository" \
+"${AREP}mod2"
+ dotest cvsadm-N1d8d "cat dir/dir2d2/sub2d2/CVS/Repository" \
"${AREP}mod2/sub2"
- rm -rf CVS dir
+ rm -rf CVS dir
- ## the ones in two-deep directories
+ ## the ones in two-deep directories
- mkdir dir
- dotest cvsadm-N2d3 "${testcvs} co -N -d dir/dir2 1mod" \
+ mkdir dir
+ dotest cvsadm-N2d3 "${testcvs} co -N -d dir/dir2 1mod" \
"${PROG} [a-z]*: Updating dir/dir2/1mod
U dir/dir2/1mod/file1"
- dotest cvsadm-N2d3b "cat CVS/Repository" \
+ dotest cvsadm-N2d3b "cat CVS/Repository" \
"${AREP}\."
- dotest cvsadm-N2d3f "cat dir/dir2/CVS/Repository" \
+ dotest cvsadm-N2d3f "cat dir/dir2/CVS/Repository" \
"${AREP}\."
- dotest cvsadm-N2d3h "cat dir/dir2/1mod/CVS/Repository" \
+ dotest cvsadm-N2d3h "cat dir/dir2/1mod/CVS/Repository" \
"${AREP}mod1"
- rm -rf CVS dir
+ rm -rf CVS dir
- mkdir dir
- dotest cvsadm-N2d4 "${testcvs} co -N -d dir/dir2 2mod" \
+ mkdir dir
+ dotest cvsadm-N2d4 "${testcvs} co -N -d dir/dir2 2mod" \
"${PROG} [a-z]*: Updating dir/dir2/2mod
U dir/dir2/2mod/file2"
- dotest cvsadm-N2d4b "cat CVS/Repository" \
-"${AREP}\."
- dotest cvsadm-N2d4f "cat dir/dir2/CVS/Repository" \
+ dotest cvsadm-N2d4b "cat CVS/Repository" \
"${AREP}\."
- dotest cvsadm-N2d4h "cat dir/dir2/2mod/CVS/Repository" \
+ dotest cvsadm-N2d4f "cat dir/dir2/CVS/Repository" \
+"${AREP}mod2"
+ dotest cvsadm-N2d4h "cat dir/dir2/2mod/CVS/Repository" \
"${AREP}mod2/sub2"
- rm -rf CVS dir
+ rm -rf CVS dir
- mkdir dir
- dotest cvsadm-N2d5 "${testcvs} co -N -d dir/dir2 1d1mod" \
+ mkdir dir
+ dotest cvsadm-N2d5 "${testcvs} co -N -d dir/dir2 1d1mod" \
"${PROG} [a-z]*: Updating dir/dir2/dir1d1
U dir/dir2/dir1d1/file1"
- dotest cvsadm-N2d5b "cat CVS/Repository" \
+ dotest cvsadm-N2d5b "cat CVS/Repository" \
"${AREP}\."
- dotest cvsadm-N2d5f "cat dir/dir2/CVS/Repository" \
+ dotest cvsadm-N2d5f "cat dir/dir2/CVS/Repository" \
"${AREP}\."
- dotest cvsadm-N2d5h "cat dir/dir2/dir1d1/CVS/Repository" \
+ dotest cvsadm-N2d5h "cat dir/dir2/dir1d1/CVS/Repository" \
"${AREP}mod1"
- rm -rf CVS dir
+ rm -rf CVS dir
- mkdir dir
- dotest cvsadm-N2d6 "${testcvs} co -N -d dir/dir2 1d2mod" \
+ mkdir dir
+ dotest cvsadm-N2d6 "${testcvs} co -N -d dir/dir2 1d2mod" \
"${PROG} [a-z]*: Updating dir/dir2/dir1d2
U dir/dir2/dir1d2/file2"
- dotest cvsadm-N2d6b "cat CVS/Repository" \
-"${AREP}\."
- dotest cvsadm-N2d6f "cat dir/dir2/CVS/Repository" \
+ dotest cvsadm-N2d6b "cat CVS/Repository" \
"${AREP}\."
- dotest cvsadm-N2d6h "cat dir/dir2/dir1d2/CVS/Repository" \
+ dotest cvsadm-N2d6f "cat dir/dir2/CVS/Repository" \
+"${AREP}mod2"
+ dotest cvsadm-N2d6h "cat dir/dir2/dir1d2/CVS/Repository" \
"${AREP}mod2/sub2"
- rm -rf CVS dir
+ rm -rf CVS dir
- mkdir dir
- dotest cvsadm-N2d7 "${testcvs} co -N -d dir/dir2 2d1mod" \
+ mkdir dir
+ dotest cvsadm-N2d7 "${testcvs} co -N -d dir/dir2 2d1mod" \
"${PROG} [a-z]*: Updating dir/dir2/dir2d1/sub2d1
U dir/dir2/dir2d1/sub2d1/file1"
- dotest cvsadm-N2d7b "cat CVS/Repository" \
-"${AREP}\."
- dotest cvsadm-N2d7f "cat dir/dir2/CVS/Repository" \
+ dotest cvsadm-N2d7b "cat CVS/Repository" \
"${AREP}\."
- dotest cvsadm-N2d7f "cat dir/dir2/dir2d1/CVS/Repository" \
+ dotest cvsadm-N2d7f "cat dir/dir2/CVS/Repository" \
"${AREP}CVSROOT/Emptydir"
- dotest cvsadm-N2d7h "cat dir/dir2/dir2d1/sub2d1/CVS/Repository" \
+ dotest cvsadm-N2d7g "cat dir/dir2/dir2d1/CVS/Repository" \
+"${AREP}\."
+ dotest cvsadm-N2d7h "cat dir/dir2/dir2d1/sub2d1/CVS/Repository" \
"${AREP}mod1"
- rm -rf CVS dir
+ rm -rf CVS dir
- mkdir dir
- dotest cvsadm-N2d8 "${testcvs} co -N -d dir/dir2 2d2mod" \
+ mkdir dir
+ dotest cvsadm-N2d8 "${testcvs} co -N -d dir/dir2 2d2mod" \
"${PROG} [a-z]*: Updating dir/dir2/dir2d2/sub2d2
U dir/dir2/dir2d2/sub2d2/file2"
- dotest cvsadm-N2d8b "cat CVS/Repository" \
+ dotest cvsadm-N2d8b "cat CVS/Repository" \
"${AREP}\."
- dotest cvsadm-N2d8f "cat dir/dir2/CVS/Repository" \
+ dotest cvsadm-N2d8f "cat dir/dir2/CVS/Repository" \
"${AREP}\."
- dotest cvsadm-N2d8h "cat dir/dir2/dir2d2/CVS/Repository" \
-"${AREP}CVSROOT/Emptydir"
- dotest cvsadm-N2d8j "cat dir/dir2/dir2d2/sub2d2/CVS/Repository" \
+ dotest cvsadm-N2d8h "cat dir/dir2/dir2d2/CVS/Repository" \
+"${AREP}mod2"
+ dotest cvsadm-N2d8j "cat dir/dir2/dir2d2/sub2d2/CVS/Repository" \
"${AREP}mod2/sub2"
- rm -rf CVS dir
+ rm -rf CVS dir
fi # end of tests to be skipped for remote
@@ -9518,7 +11052,7 @@ U dir/dir2/dir2d2/sub2d2/file2"
echo "# empty file" >config
dotest cvsadm-cleanup-2 "${testcvs} -q ci -m cvsadm-cleanup" \
"Checking in config;
-${TESTDIR}/cvsroot/CVSROOT/config,v <-- config
+${CVSROOT_DIRNAME}/CVSROOT/config,v <-- config
new revision: 1\.[0-9]*; previous revision: 1\.[0-9]*
done
${PROG} [a-z]*: Rebuilding administrative file database"
@@ -9547,9 +11081,10 @@ ${PROG} [a-z]*: Rebuilding administrative file database"
dotest emptydir-1 "${testcvs} co CVSROOT/modules" \
"U CVSROOT/modules"
echo "# Module defs for emptydir tests" > CVSROOT/modules
- echo "2d1mod -d dir2d1/sub2d1 mod1" >> CVSROOT/modules
+ echo "2d1mod -d dir2d1/sub/sub2d1 mod1" >> CVSROOT/modules
echo "2d1moda -d dir2d1/suba moda/modasub" >> CVSROOT/modules
- echo "comb -a 2d1mod 2d1moda" >> CVSROOT/modules
+ echo "2d1modb -d dir2d1/suba mod1" >> CVSROOT/modules
+ echo "comb -a 2d1modb 2d1moda" >> CVSROOT/modules
dotest emptydir-2 "${testcvs} ci -m add-modules" \
"${PROG} [a-z]*: Examining CVSROOT
@@ -9570,7 +11105,7 @@ ${PROG} [a-z]*: Updating moda"
echo "file1" > mod1/file1
mkdir moda/modasub
dotest emptydir-3b "${testcvs} add moda/modasub" \
-"Directory ${TESTDIR}/cvsroot/moda/modasub added to the repository"
+"Directory ${CVSROOT_DIRNAME}/moda/modasub added to the repository"
echo "filea" > moda/modasub/filea
dotest emptydir-4 "${testcvs} add mod1/file1 moda/modasub/filea" \
"${PROG} [a-z]*: scheduling file .mod1/file1. for addition
@@ -9593,8 +11128,8 @@ done"
# End Populate.
dotest emptydir-6 "${testcvs} co 2d1mod" \
-"${PROG} [a-z]*: Updating dir2d1/sub2d1
-U dir2d1/sub2d1/file1"
+"${PROG} [a-z]*: Updating dir2d1/sub/sub2d1
+U dir2d1/sub/sub2d1/file1"
cd dir2d1
touch emptyfile
# It doesn't make any sense to add a file (or do much of anything
@@ -9602,10 +11137,10 @@ U dir2d1/sub2d1/file1"
# the working directory doesn't correspond to anything in
# the repository.
dotest_fail emptydir-7 "${testcvs} add emptyfile" \
-"${PROG} \[[a-z]* aborted\]: cannot add to ${TESTDIR}/cvsroot/CVSROOT/Emptydir"
+"${PROG} \[[a-z]* aborted\]: cannot add to ${CVSROOT_DIRNAME}/CVSROOT/Emptydir"
mkdir emptydir
dotest_fail emptydir-8 "${testcvs} add emptydir" \
-"${PROG} \[[a-z]* aborted\]: cannot add to ${TESTDIR}/cvsroot/CVSROOT/Emptydir"
+"${PROG} \[[a-z]* aborted\]: cannot add to ${CVSROOT_DIRNAME}/CVSROOT/Emptydir"
cd ..
rm -rf CVS dir2d1
@@ -9626,15 +11161,16 @@ U dir2d1/sub2d1/file1"
mkdir 2; cd 2
dotest emptydir-12 "${testcvs} -q co 2d1moda" \
"U dir2d1/suba/filea"
- # OK, this is the crux of the matter. Some people think
- # it would be more logical if this showed "moda". But why
- # "moda" (from module 2d1moda) and not "." (from module 2d1mod)?
- dotest emptydir-13 "cat dir2d1/CVS/Repository" "CVSROOT/Emptydir"
- dotest emptydir-14 "${testcvs} co comb" \
-"${PROG} [a-z]*: Updating dir2d1/sub2d1
-U dir2d1/sub2d1/file1
+ # OK, this is the crux of the matter. This used to show "Emptydir",
+ # but everyone seemed to think it should show "moda". This
+ # usually works better, but not always as shown by the following
+ # test.
+ dotest emptydir-13 "cat dir2d1/CVS/Repository" "moda"
+ dotest_fail emptydir-14 "${testcvs} co comb" \
+"${PROG} [a-z]*: existing repository ${CVSROOT_DIRNAME}/moda/modasub does not match ${TESTDIR}/cvsroot/mod1
+${PROG} [a-z]*: ignoring module 2d1modb
${PROG} [a-z]*: Updating dir2d1/suba"
- dotest emptydir-15 "cat dir2d1/CVS/Repository" "CVSROOT/Emptydir"
+ dotest emptydir-15 "cat dir2d1/CVS/Repository" "moda"
cd ..
rm -r 1 2
@@ -9692,14 +11228,14 @@ done"
# Done.
# Try checking out the module in a local directory
- if test "$remote" = yes; then
+ if $remote; then
dotest_fail abspath-2a "${testcvs} co -d ${TESTDIR}/1 mod1" \
"${PROG} \[server aborted\]: absolute pathname .${TESTDIR}/1. illegal for server"
dotest abspath-2a-try2 "${testcvs} co -d 1 mod1" \
"${PROG} [a-z]*: Updating 1
U 1/file1"
else
- dotest abspath-2a "${testcvs} co -d ${TESTDIR}/1 mod1" \
+ dotest abspath-2a "${testcvs} co -d ${TESTDIR}/1 mod1" \
"${PROG} [a-z]*: Updating ${TESTDIR}/1
U ${TESTDIR}/1/file1"
fi # remote workaround
@@ -9731,8 +11267,8 @@ U ${TESTDIR}/1/file1"
# "touch 1/2/3" requires directories 1 and 1/2 to already
# exist, we expect ${TESTDIR}/1 to already exist. I believe
# this is the behavior of CVS 1.9 and earlier.
- if test "$remote" = no; then
- dotest_fail abspath-3.1 "${testcvs} co -d ${TESTDIR}/1/2 mod1" \
+ if $remote; then :; else
+ dotest_fail abspath-3.1 "${testcvs} co -d ${TESTDIR}/1/2 mod1" \
"${PROG} [a-z]*: cannot chdir to 1: No such file or directory
${PROG} [a-z]*: ignoring module mod1"
fi
@@ -9741,7 +11277,7 @@ ${PROG} [a-z]*: ignoring module mod1"
${PROG} [a-z]*: ignoring module mod1"
mkdir 1
- if test "$remote" = yes; then
+ if $remote; then
# The server wants the directory to exist, but that is
# a bug, it should only need to exist on the client side.
# See also cvsadm-2d3.
@@ -9774,8 +11310,8 @@ U ${TESTDIR}/1/2/file1"
# Now try someplace where we don't have permission.
mkdir ${TESTDIR}/barf
chmod -w ${TESTDIR}/barf
- if test "$remote" = yes; then
- dotest_fail abspath-4 "${testcvs} co -d ${TESTDIR}/barf/sub mod1" \
+ if $remote; then
+ dotest_fail abspath-4r "${testcvs} co -d ${TESTDIR}/barf/sub mod1" \
"${PROG} \[server aborted\]: absolute pathname .${TESTDIR}/barf/sub. illegal for server"
else
dotest_fail abspath-4 "${testcvs} co -d ${TESTDIR}/barf/sub mod1" \
@@ -9787,8 +11323,8 @@ U ${TESTDIR}/1/2/file1"
# Try checking out two modules into the same directory.
- if test "$remote" = yes; then
- dotest abspath-5a "${testcvs} co -d 1 mod1 mod2" \
+ if $remote; then
+ dotest abspath-5ar "${testcvs} co -d 1 mod1 mod2" \
"${PROG} [a-z]*: Updating 1/mod1
U 1/mod1/file1
${PROG} [a-z]*: Updating 1/mod2
@@ -9811,8 +11347,8 @@ U ${TESTDIR}/1/mod2/file2"
# Try checking out the top-level module.
- if test "$remote" = yes; then
- dotest abspath-6a "${testcvs} co -d 1 ." \
+ if $remote; then
+ dotest abspath-6ar "${testcvs} co -d 1 ." \
"${PROG} [a-z]*: Updating 1
${PROG} [a-z]*: Updating 1/CVSROOT
${DOTSTAR}
@@ -9845,25 +11381,25 @@ U ${TESTDIR}/1/mod2/file2"
# doesn't mess with the current working directory.
mkdir 1
cd 1
- if test "$remote" = yes; then
- dotest_fail abspath-7a "${testcvs} -q co -d ../2 mod2" \
+ if $remote; then
+ dotest_fail abspath-7ar "${testcvs} -q co -d ../2 mod2" \
"${PROG} server: protocol error: .\.\./2. contains more leading \.\.
${PROG} \[server aborted\]: than the 0 which Max-dotdot specified"
cd ..
- dotest abspath-7a-try2 "${testcvs} -q co -d 2 mod2" \
+ dotest abspath-7a-try2r "${testcvs} -q co -d 2 mod2" \
"U 2/file2"
cd 1
else
- dotest abspath-7a "${testcvs} -q co -d ${TESTDIR}/2 mod2" \
+ dotest abspath-7a "${testcvs} -q co -d ${TESTDIR}/2 mod2" \
"U ${TESTDIR}/2/file2"
fi # remote workaround
dotest abspath-7b "ls" ""
dotest abspath-7c "${testcvs} -q co mod1" \
"U mod1/file1"
cd mod1
- if test "$remote" = yes; then
+ if $remote; then
cd ../..
- dotest abspath-7d "${testcvs} -q co -d 3 mod2" \
+ dotest abspath-7dr "${testcvs} -q co -d 3 mod2" \
"U 3/file2"
cd 1/mod1
else
@@ -9902,7 +11438,7 @@ ${PROG} \[server aborted\]: than the 0 which Max-dotdot specified"
echo "TopLevelAdmin=yes" >config
dotest toplevel-1b "${testcvs} -q ci -m yes-top-level" \
"Checking in config;
-${TESTDIR}/cvsroot/CVSROOT/config,v <-- config
+${CVSROOT_DIRNAME}/CVSROOT/config,v <-- config
new revision: 1\.[0-9]*; previous revision: 1\.[0-9]*
done
${PROG} [a-z]*: Rebuilding administrative file database"
@@ -9913,8 +11449,8 @@ ${PROG} [a-z]*: Rebuilding administrative file database"
dotest toplevel-1 "${testcvs} -q co -l ." ''
mkdir top-dir second-dir
dotest toplevel-2 "${testcvs} add top-dir second-dir" \
-"Directory ${TESTDIR}/cvsroot/top-dir added to the repository
-Directory ${TESTDIR}/cvsroot/second-dir added to the repository"
+"Directory ${CVSROOT_DIRNAME}/top-dir added to the repository
+Directory ${CVSROOT_DIRNAME}/second-dir added to the repository"
cd top-dir
touch file1
@@ -9922,10 +11458,10 @@ Directory ${TESTDIR}/cvsroot/second-dir added to the repository"
"${PROG} [a-z]*: scheduling file .file1. for addition
${PROG} [a-z]*: use .${PROG} commit. to add this file permanently"
dotest toplevel-4 "${testcvs} -q ci -m add" \
-"RCS file: ${TESTDIR}/cvsroot/top-dir/file1,v
+"RCS file: ${CVSROOT_DIRNAME}/top-dir/file1,v
done
Checking in file1;
-${TESTDIR}/cvsroot/top-dir/file1,v <-- file1
+${CVSROOT_DIRNAME}/top-dir/file1,v <-- file1
initial revision: 1\.1
done"
cd ..
@@ -9936,10 +11472,10 @@ done"
"${PROG} [a-z]*: scheduling file .file2. for addition
${PROG} [a-z]*: use .${PROG} commit. to add this file permanently"
dotest toplevel-4s "${testcvs} -q ci -m add" \
-"RCS file: ${TESTDIR}/cvsroot/second-dir/file2,v
+"RCS file: ${CVSROOT_DIRNAME}/second-dir/file2,v
done
Checking in file2;
-${TESTDIR}/cvsroot/second-dir/file2,v <-- file2
+${CVSROOT_DIRNAME}/second-dir/file2,v <-- file2
initial revision: 1\.1
done"
@@ -9998,6 +11534,7 @@ U top-dir/file1"
"${PROG} [a-z]*: warning: cannot make directory CVS in \.: Permission denied
${PROG} [a-z]*: Updating top-dir" \
"${PROG} [a-z]*: warning: cannot make directory CVS in \.: Permission denied
+${PROG} [a-z]*: warning: cannot make directory CVS in \.: Permission denied
${PROG} [a-z]*: in directory \.:
${PROG} [a-z]*: cannot open CVS/Entries for reading: No such file or directory
${PROG} [a-z]*: Updating top-dir"
@@ -10010,7 +11547,7 @@ ${PROG} [a-z]*: Updating top-dir"
echo "# empty file" >config
dotest toplevel-cleanup-2 "${testcvs} -q ci -m toplevel-cleanup" \
"Checking in config;
-${TESTDIR}/cvsroot/CVSROOT/config,v <-- config
+${CVSROOT_DIRNAME}/CVSROOT/config,v <-- config
new revision: 1\.[0-9]*; previous revision: 1\.[0-9]*
done
${PROG} [a-z]*: Rebuilding administrative file database"
@@ -10031,7 +11568,7 @@ ${PROG} [a-z]*: Rebuilding administrative file database"
echo "TopLevelAdmin=no" >config
dotest toplevel2-1b "${testcvs} -q ci -m no-top-level" \
"Checking in config;
-${TESTDIR}/cvsroot/CVSROOT/config,v <-- config
+${CVSROOT_DIRNAME}/CVSROOT/config,v <-- config
new revision: 1\.[0-9]*; previous revision: 1\.[0-9]*
done
${PROG} [a-z]*: Rebuilding administrative file database"
@@ -10043,8 +11580,8 @@ ${PROG} [a-z]*: Rebuilding administrative file database"
dotest toplevel2-1 "${testcvs} -q co -l ." ''
mkdir top-dir second-dir
dotest toplevel2-2 "${testcvs} add top-dir second-dir" \
-"Directory ${TESTDIR}/cvsroot/top-dir added to the repository
-Directory ${TESTDIR}/cvsroot/second-dir added to the repository"
+"Directory ${CVSROOT_DIRNAME}/top-dir added to the repository
+Directory ${CVSROOT_DIRNAME}/second-dir added to the repository"
cd top-dir
touch file1
@@ -10052,10 +11589,10 @@ Directory ${TESTDIR}/cvsroot/second-dir added to the repository"
"${PROG} [a-z]*: scheduling file .file1. for addition
${PROG} [a-z]*: use .${PROG} commit. to add this file permanently"
dotest toplevel2-4 "${testcvs} -q ci -m add" \
-"RCS file: ${TESTDIR}/cvsroot/top-dir/file1,v
+"RCS file: ${CVSROOT_DIRNAME}/top-dir/file1,v
done
Checking in file1;
-${TESTDIR}/cvsroot/top-dir/file1,v <-- file1
+${CVSROOT_DIRNAME}/top-dir/file1,v <-- file1
initial revision: 1\.1
done"
cd ..
@@ -10066,10 +11603,10 @@ done"
"${PROG} [a-z]*: scheduling file .file2. for addition
${PROG} [a-z]*: use .${PROG} commit. to add this file permanently"
dotest toplevel2-4s "${testcvs} -q ci -m add" \
-"RCS file: ${TESTDIR}/cvsroot/second-dir/file2,v
+"RCS file: ${CVSROOT_DIRNAME}/second-dir/file2,v
done
Checking in file2;
-${TESTDIR}/cvsroot/second-dir/file2,v <-- file2
+${CVSROOT_DIRNAME}/second-dir/file2,v <-- file2
initial revision: 1\.1
done"
@@ -10106,7 +11643,7 @@ U top-dir/file1"
echo "# empty file" >config
dotest toplevel2-cleanup-2 "${testcvs} -q ci -m toplevel2-cleanup" \
"Checking in config;
-${TESTDIR}/cvsroot/CVSROOT/config,v <-- config
+${CVSROOT_DIRNAME}/CVSROOT/config,v <-- config
new revision: 1\.[0-9]*; previous revision: 1\.[0-9]*
done
${PROG} [a-z]*: Rebuilding administrative file database"
@@ -10190,7 +11727,7 @@ EOF
dotest editor-1 "${testcvs} -q co -l ." ''
mkdir first-dir
dotest editor-2 "${testcvs} add first-dir" \
-"Directory ${TESTDIR}/cvsroot/first-dir added to the repository"
+"Directory ${CVSROOT_DIRNAME}/first-dir added to the repository"
cd first-dir
touch file1 file2
dotest editor-3 "${testcvs} add file1 file2" \
@@ -10198,16 +11735,16 @@ EOF
${PROG} [a-z]*: scheduling file .file2. for addition
${PROG} [a-z]*: use .${PROG} commit. to add these files permanently"
dotest editor-4 "${testcvs} -e ${TESTDIR}/editme -q ci" \
-"RCS file: ${TESTDIR}/cvsroot/first-dir/file1,v
+"RCS file: ${CVSROOT_DIRNAME}/first-dir/file1,v
done
Checking in file1;
-${TESTDIR}/cvsroot/first-dir/file1,v <-- file1
+${CVSROOT_DIRNAME}/first-dir/file1,v <-- file1
initial revision: 1\.1
done
-RCS file: ${TESTDIR}/cvsroot/first-dir/file2,v
+RCS file: ${CVSROOT_DIRNAME}/first-dir/file2,v
done
Checking in file2;
-${TESTDIR}/cvsroot/first-dir/file2,v <-- file2
+${CVSROOT_DIRNAME}/first-dir/file2,v <-- file2
initial revision: 1\.1
done"
dotest editor-5 "${testcvs} -q tag -b br" "T file1
@@ -10216,7 +11753,7 @@ T file2"
echo modify >>file1
dotest editor-7 "${testcvs} -e ${TESTDIR}/editme -q ci" \
"Checking in file1;
-${TESTDIR}/cvsroot/first-dir/file1,v <-- file1
+${CVSROOT_DIRNAME}/first-dir/file1,v <-- file1
new revision: 1\.1\.2\.1; previous revision: 1\.1
done"
# OK, now we want to make sure "ci -r" puts in the branch
@@ -10228,12 +11765,12 @@ done"
echo add a line >>file2
dotest editor-9 "${testcvs} -q -e ${TESTDIR}/editme ci -rbr file2" \
"Checking in file2;
-${TESTDIR}/cvsroot/first-dir/file2,v <-- file2
+${CVSROOT_DIRNAME}/first-dir/file2,v <-- file2
new revision: 1\.1\.2\.1; previous revision: 1\.1
done"
dotest editor-log-file1 "${testcvs} log -N file1" "
-RCS file: ${TESTDIR}/cvsroot/first-dir/file1,v
+RCS file: ${CVSROOT_DIRNAME}/first-dir/file1,v
Working file: file1
head: 1\.1
branch:
@@ -10246,7 +11783,6 @@ description:
revision 1\.1
date: [0-9/]* [0-9:]*; author: ${username}; state: Exp;
branches: 1\.1\.2;
-x
xCVS: ----------------------------------------------------------------------
xCVS: Enter Log. Lines beginning with .CVS:. are removed automatically
xCVS:
@@ -10258,7 +11794,6 @@ xCVS: ----------------------------------------------------------------------
----------------------------
revision 1\.1\.2\.1
date: [0-9/]* [0-9:]*; author: ${username}; state: Exp; lines: ${PLUS}1 -0
-x
xCVS: ----------------------------------------------------------------------
xCVS: Enter Log. Lines beginning with .CVS:. are removed automatically
xCVS:
@@ -10273,7 +11808,7 @@ xCVS: ----------------------------------------------------------------------
# The only difference between the two expect strings is the
# presence or absence of "Committing in ." for 1.1.2.1.
dotest editor-log-file2 "${testcvs} log -N file2" "
-RCS file: ${TESTDIR}/cvsroot/first-dir/file2,v
+RCS file: ${CVSROOT_DIRNAME}/first-dir/file2,v
Working file: file2
head: 1\.1
branch:
@@ -10286,7 +11821,6 @@ description:
revision 1\.1
date: [0-9/]* [0-9:]*; author: ${username}; state: Exp;
branches: 1\.1\.2;
-x
xCVS: ----------------------------------------------------------------------
xCVS: Enter Log. Lines beginning with .CVS:. are removed automatically
xCVS:
@@ -10298,7 +11832,6 @@ xCVS: ----------------------------------------------------------------------
----------------------------
revision 1\.1\.2\.1
date: [0-9/]* [0-9:]*; author: ${username}; state: Exp; lines: ${PLUS}1 -0
-x
xCVS: ----------------------------------------------------------------------
xCVS: Enter Log. Lines beginning with .CVS:. are removed automatically
xCVS:
@@ -10307,7 +11840,7 @@ xCVS: Tag: br
xCVS: file2
xCVS: ----------------------------------------------------------------------
=============================================================================" "
-RCS file: ${TESTDIR}/cvsroot/first-dir/file2,v
+RCS file: ${CVSROOT_DIRNAME}/first-dir/file2,v
Working file: file2
head: 1\.1
branch:
@@ -10320,7 +11853,6 @@ description:
revision 1\.1
date: [0-9/]* [0-9:]*; author: ${username}; state: Exp;
branches: 1\.1\.2;
-x
xCVS: ----------------------------------------------------------------------
xCVS: Enter Log. Lines beginning with .CVS:. are removed automatically
xCVS:
@@ -10332,7 +11864,6 @@ xCVS: ----------------------------------------------------------------------
----------------------------
revision 1\.1\.2\.1
date: [0-9/]* [0-9:]*; author: ${username}; state: Exp; lines: ${PLUS}1 -0
-x
xCVS: ----------------------------------------------------------------------
xCVS: Enter Log. Lines beginning with .CVS:. are removed automatically
xCVS:
@@ -10393,20 +11924,11 @@ xCVS: ----------------------------------------------------------------------
fi
cd ../../2/1dir
- # FIXME: should be using dotest.
- ${testcvs} -q update 2>../tst167.err
- cat ../tst167.err >>${LOGFILE}
- cat <<EOF >../tst167.ans
-${PROG} server: warning: foo is not (any longer) pertinent
-${PROG} update: unable to remove ./foo: Permission denied
-EOF
- if cmp ../tst167.ans ../tst167.err >/dev/null ||
- ( echo "${PROG} [update aborted]: cannot rename file foo to CVS/,,foo: Permission denied" | cmp - ../tst167.err >/dev/null )
- then
- pass 168
- else
- fail 168
- fi
+ dotest 168 "${testcvs} -q update" \
+"${PROG} [a-z]*: foo is no longer in the repository
+${PROG} update: unable to remove foo: Permission denied" \
+"${PROG} [a-z]*: foo is no longer in the repository
+${PROG} update: unable to remove \./foo: Permission denied"
cd ..
chmod u+w 1dir
@@ -10428,7 +11950,7 @@ EOF
dotest errmsg2-1 "${testcvs} -q co -l ." ''
mkdir first-dir
dotest errmsg2-2 "${testcvs} add first-dir" \
-"Directory ${TESTDIR}/cvsroot/first-dir added to the repository"
+"Directory ${CVSROOT_DIRNAME}/first-dir added to the repository"
cd first-dir
dotest_fail errmsg2-3 "${testcvs} add CVS" \
"${PROG} [a-z]*: cannot add special file .CVS.; skipping"
@@ -10453,16 +11975,16 @@ ${PROG} [a-z]*: use .${PROG} commit. to add this file permanently"
# Make sure that none of the error messages left droppings
# which interfere with normal operation.
dotest errmsg2-7 "${testcvs} -q ci -m add-file1" \
-"RCS file: ${TESTDIR}/cvsroot/first-dir/file1,v
+"RCS file: ${CVSROOT_DIRNAME}/first-dir/file1,v
done
Checking in file1;
-${TESTDIR}/cvsroot/first-dir/file1,v <-- file1
+${CVSROOT_DIRNAME}/first-dir/file1,v <-- file1
initial revision: 1\.1
done"
mkdir sdir
cd ..
dotest errmsg2-8 "${testcvs} add first-dir/sdir" \
-"Directory ${TESTDIR}/cvsroot/first-dir/sdir added to the repository"
+"Directory ${CVSROOT_DIRNAME}/first-dir/sdir added to the repository"
# while we're here... check commit with no CVS directory
dotest_fail errmsg2-8a "${testcvs} -q ci first-dir nonexistant" \
"${PROG} [a-z]*: nothing known about .nonexistant'
@@ -10478,13 +12000,13 @@ ${PROG} \[[a-z]* aborted\]: correct above errors first!"
mkdir sdir10
dotest errmsg2-10 "${testcvs} add file10 sdir10" \
"${PROG} [a-z]*: scheduling file .file10. for addition
-Directory ${TESTDIR}/cvsroot/first-dir/sdir10 added to the repository
+Directory ${CVSROOT_DIRNAME}/first-dir/sdir10 added to the repository
${PROG} [a-z]*: use .${PROG} commit. to add this file permanently"
dotest errmsg2-11 "${testcvs} -q ci -m add-file10" \
-"RCS file: ${TESTDIR}/cvsroot/first-dir/file10,v
+"RCS file: ${CVSROOT_DIRNAME}/first-dir/file10,v
done
Checking in file10;
-${TESTDIR}/cvsroot/first-dir/file10,v <-- file10
+${CVSROOT_DIRNAME}/first-dir/file10,v <-- file10
initial revision: 1\.1
done"
# Try to see that there are no droppings left by
@@ -10496,7 +12018,7 @@ done"
cd ..
mkdir first-dir/sdir10/ssdir
dotest errmsg2-13 "${testcvs} add first-dir/sdir10/ssdir" \
-"Directory ${TESTDIR}/cvsroot/first-dir/sdir10/ssdir added to the repository"
+"Directory ${CVSROOT_DIRNAME}/first-dir/sdir10/ssdir added to the repository"
touch first-dir/sdir10/ssdir/ssfile
dotest errmsg2-14 \
@@ -10527,26 +12049,23 @@ ${PROG} \[add aborted\]: no repository"
# or directory which already is there.
dotest errmsg2-17 "${testcvs} -q ci -m checkin" \
-"RCS file: ${TESTDIR}/cvsroot/first-dir/file15,v
+"RCS file: ${CVSROOT_DIRNAME}/first-dir/file15,v
done
Checking in first-dir/file15;
-${TESTDIR}/cvsroot/first-dir/file15,v <-- file15
+${CVSROOT_DIRNAME}/first-dir/file15,v <-- file15
initial revision: 1\.1
done
-RCS file: ${TESTDIR}/cvsroot/first-dir/sdir10/ssdir/ssfile,v
+RCS file: ${CVSROOT_DIRNAME}/first-dir/sdir10/ssdir/ssfile,v
done
Checking in first-dir/sdir10/ssdir/ssfile;
-${TESTDIR}/cvsroot/first-dir/sdir10/ssdir/ssfile,v <-- ssfile
+${CVSROOT_DIRNAME}/first-dir/sdir10/ssdir/ssfile,v <-- ssfile
initial revision: 1\.1
done"
dotest errmsg2-18 "${testcvs} -Q tag test" ''
- dotest_fail errmsg2-19 "${testcvs} annotate -rtest -Dyesterday" \
-"${PROG} \[[a-z]* aborted\]: rcsbuf_open: internal error"
-
# trying to import the repository
- if test "$remote" = "no"; then
+ if $remote; then :; else
cd ${CVSROOT_DIRNAME}
dotest_fail errmsg2-20 "${testcvs} import -mtest . A B" \
"${PROG} \[[a-z]* aborted\]: attempt to import the repository"
@@ -10556,7 +12075,57 @@ done"
cd ..
rm -r 1
- rm -rf ${TESTDIR}/cvsroot/first-dir
+ rm -rf ${CVSROOT_DIRNAME}/first-dir
+ ;;
+
+ adderrmsg)
+ # Test some of the error messages the 'add' command can return and
+ # their reactions to '-q'.
+
+ # First the usual setup; create a directory first-dir.
+ mkdir 1; cd 1
+ dotest adderrmsg-init1 "${testcvs} -q co -l ." ''
+ mkdir adderrmsg-dir
+ dotest adderrmsg-init2 "${testcvs} add adderrmsg-dir" \
+"Directory ${CVSROOT_DIRNAME}/adderrmsg-dir added to the repository"
+ cd adderrmsg-dir
+
+ # try to add the admin dir
+ dotest_fail adderrmsg-1 "${testcvs} add CVS" \
+"${PROG} [a-z]*: cannot add special file .CVS.; skipping"
+ # might not want to see this message when you 'cvs add *'
+ dotest_fail adderrmsg-2 "${testcvs} -q add CVS" ""
+
+ # to test some other messages
+ touch file1
+ dotest adderrmsg-3 "${testcvs} add file1" \
+"${PROG} [a-z]*: scheduling file .file1. for addition
+${PROG} [a-z]*: use .${PROG} commit. to add this file permanently"
+
+ # add it twice
+ dotest_fail adderrmsg-4 "${testcvs} add file1" \
+"${PROG} [a-z]*: file1 has already been entered"
+ dotest_fail adderrmsg-5 "${testcvs} -q add file1" ""
+
+ dotest adderrmsg-6 "${testcvs} -q ci -madd" \
+"RCS file: ${CVSROOT_DIRNAME}/adderrmsg-dir/file1,v
+done
+Checking in file1;
+${CVSROOT_DIRNAME}/adderrmsg-dir/file1,v <-- file1
+initial revision: 1\.1
+done"
+
+ # file in Entries & repository
+ dotest_fail adderrmsg-7 "${testcvs} add file1" \
+"${PROG} [a-z]*: file1 already exists, with version number 1\.1"
+ dotest_fail adderrmsg-8 "${testcvs} -q add file1" ""
+
+ # clean up
+ cd ../..
+ if $keep; then :; else
+ rm -r 1
+ rm -rf ${CVSROOT_DIRNAME}/adderrmsg-dir
+ fi
;;
devcom)
@@ -10769,7 +12338,7 @@ U first-dir/abc'
dotest_fail devcom-some3 "test -w first-dir/abc" ''
cd ..
- if test "$keep" = yes; then
+ if $keep; then
echo Keeping ${TESTDIR} and exiting due to --keep
exit 0
fi
@@ -10922,7 +12491,7 @@ G@#..!@#=&"
# Now test disconnected "cvs edit" and the format of the
# CVS/Notify file.
- if test "$remote" = yes; then
+ if $remote; then
CVS_SERVER_SAVED=${CVS_SERVER}
CVS_SERVER=${TESTDIR}/cvs-none; export CVS_SERVER
@@ -10931,18 +12500,18 @@ G@#..!@#=&"
# (if the process doing the exec exits before the parent
# gets around to sending data to it) or "broken pipe" (if it
# is the other way around).
- dotest_fail devcom3-9a "${testcvs} edit w1" \
+ dotest_fail devcom3-9ar "${testcvs} edit w1" \
"${PROG} \[edit aborted\]: cannot exec ${TESTDIR}/cvs-none: ${DOTSTAR}"
- dotest devcom3-9b "test -w w1" ""
- dotest devcom3-9c "cat CVS/Notify" \
+ dotest devcom3-9br "test -w w1" ""
+ dotest devcom3-9cr "cat CVS/Notify" \
"Ew1 [SMTWF][uoehra][neduit] [JFAMSOND][aepuco][nbrylgptvc] [0-9 ][0-9] [0-9:]* [0-9][0-9][0-9][0-9] GMT [-a-zA-Z_.0-9]* ${TESTDIR}/1/first-dir EUC"
CVS_SERVER=${CVS_SERVER_SAVED}; export CVS_SERVER
- dotest devcom3-9d "${testcvs} -q update" ""
- dotest_fail devcom3-9e "test -f CVS/Notify" ""
- dotest devcom3-9f "${testcvs} watchers w1" \
+ dotest devcom3-9dr "${testcvs} -q update" ""
+ dotest_fail devcom3-9er "test -f CVS/Notify" ""
+ dotest devcom3-9fr "${testcvs} watchers w1" \
"w1 ${username} tedit tunedit tcommit"
- dotest devcom3-9g "${testcvs} unedit w1" ""
- dotest devcom3-9h "${testcvs} watchers w1" ""
+ dotest devcom3-9gr "${testcvs} unedit w1" ""
+ dotest devcom3-9hr "${testcvs} watchers w1" ""
fi
cd ../..
@@ -10969,7 +12538,7 @@ G@#..!@#=&"
dotest watch4-0a "${testcvs} -q co -l ." ''
mkdir first-dir
dotest watch4-0b "${testcvs} add first-dir" \
-"Directory ${TESTDIR}/cvsroot/first-dir added to the repository"
+"Directory ${CVSROOT_DIRNAME}/first-dir added to the repository"
cd first-dir
dotest watch4-1 "${testcvs} watch on" ''
@@ -10979,26 +12548,26 @@ G@#..!@#=&"
"${PROG} [a-z]*: scheduling file .file1. for addition
${PROG} [a-z]*: use .${PROG} commit. to add this file permanently"
dotest watch4-3 "${testcvs} -q ci -m add" \
-"RCS file: ${TESTDIR}/cvsroot/first-dir/file1,v
+"RCS file: ${CVSROOT_DIRNAME}/first-dir/file1,v
done
Checking in file1;
-${TESTDIR}/cvsroot/first-dir/file1,v <-- file1
+${CVSROOT_DIRNAME}/first-dir/file1,v <-- file1
initial revision: 1\.1
done"
# Now test the analogous behavior for directories.
mkdir subdir
dotest watch4-4 "${testcvs} add subdir" \
-"Directory ${TESTDIR}/cvsroot/first-dir/subdir added to the repository"
+"Directory ${CVSROOT_DIRNAME}/first-dir/subdir added to the repository"
cd subdir
touch sfile
dotest watch4-5 "${testcvs} add sfile" \
"${PROG} [a-z]*: scheduling file .sfile. for addition
${PROG} [a-z]*: use .${PROG} commit. to add this file permanently"
dotest watch4-6 "${testcvs} -q ci -m add" \
-"RCS file: ${TESTDIR}/cvsroot/first-dir/subdir/sfile,v
+"RCS file: ${CVSROOT_DIRNAME}/first-dir/subdir/sfile,v
done
Checking in sfile;
-${TESTDIR}/cvsroot/first-dir/subdir/sfile,v <-- sfile
+${CVSROOT_DIRNAME}/first-dir/subdir/sfile,v <-- sfile
initial revision: 1\.1
done"
cd ../../..
@@ -11017,13 +12586,13 @@ U first-dir/subdir/sfile"
echo 'edited in 1' >file1
dotest watch4-12 "${testcvs} -q ci -m edit-in-1" \
"Checking in file1;
-${TESTDIR}/cvsroot/first-dir/file1,v <-- file1
+${CVSROOT_DIRNAME}/first-dir/file1,v <-- file1
new revision: 1\.2; previous revision: 1\.1
done"
cd ../..
cd 2/first-dir
dotest watch4-13 "${testcvs} -q update" \
-"RCS file: ${TESTDIR}/cvsroot/first-dir/file1,v
+"RCS file: ${CVSROOT_DIRNAME}/first-dir/file1,v
retrieving revision 1\.1
retrieving revision 1\.2
Merging differences between 1\.1 and 1\.2 into file1
@@ -11075,7 +12644,7 @@ C file1"
dotest watch5-0a "${testcvs} -q co -l ." ''
mkdir first-dir
dotest watch5-0b "${testcvs} add first-dir" \
-"Directory ${TESTDIR}/cvsroot/first-dir added to the repository"
+"Directory ${CVSROOT_DIRNAME}/first-dir added to the repository"
cd first-dir
dotest watch5-1 "${testcvs} watch on" ''
@@ -11085,10 +12654,10 @@ C file1"
"${PROG} [a-z]*: scheduling file .file1. for addition
${PROG} [a-z]*: use .${PROG} commit. to add this file permanently"
dotest watch5-3 "${testcvs} -q ci -m add" \
-"RCS file: ${TESTDIR}/cvsroot/first-dir/file1,v
+"RCS file: ${CVSROOT_DIRNAME}/first-dir/file1,v
done
Checking in file1;
-${TESTDIR}/cvsroot/first-dir/file1,v <-- file1
+${CVSROOT_DIRNAME}/first-dir/file1,v <-- file1
initial revision: 1\.1
done"
dotest watch5-4 "${testcvs} edit file1" ''
@@ -11145,8 +12714,8 @@ ${PROG} unedit: run update to complete the unedit"
dotest unedit-without-baserev-5 "cat CVS/Entries" \
"/$file/1\.1\.1\.1/${DOTSTAR}"
- if test "$remote" = yes; then
- dotest unedit-without-baserev-6 "${testcvs} -q update" "U m"
+ if $remote; then
+ dotest unedit-without-baserev-6r "${testcvs} -q update" "U m"
else
dotest unedit-without-baserev-6 "${testcvs} -q update" \
"${PROG} update: warning: m was lost
@@ -11172,13 +12741,13 @@ U m"
echo 'edited in 1' >m
dotest unedit-without-baserev-12 "${testcvs} -q ci -m edit-in-1" \
"Checking in m;
-${TESTDIR}/cvsroot/x/m,v <-- m
+${CVSROOT_DIRNAME}/x/m,v <-- m
new revision: 1\.2; previous revision: 1\.1
done"
cd ../..
cd 2/x
dotest unedit-without-baserev-13 "${testcvs} -q update" \
-"RCS file: ${TESTDIR}/cvsroot/x/m,v
+"RCS file: ${CVSROOT_DIRNAME}/x/m,v
retrieving revision 1\.1\.1\.1
retrieving revision 1\.2
Merging differences between 1\.1\.1\.1 and 1\.2 into m
@@ -11189,8 +12758,8 @@ C m"
echo yes | dotest unedit-without-baserev-14 "${testcvs} unedit m" \
"m has been modified; revert changes${QUESTION} ${PROG} unedit: m not mentioned in CVS/Baserev
${PROG} unedit: run update to complete the unedit"
- if test "$remote" = yes; then
- dotest unedit-without-baserev-15 "${testcvs} -q update" "U m"
+ if $remote; then
+ dotest unedit-without-baserev-15r "${testcvs} -q update" "U m"
else
dotest unedit-without-baserev-15 "${testcvs} -q update" \
"${PROG} update: warning: m was lost
@@ -11213,32 +12782,32 @@ U m"
ignore)
# On Windows, we can't check out CVSROOT, because the case
# insensitivity means that this conflicts with cvsroot.
- mkdir wnt
- cd wnt
+ mkdir ignore
+ cd ignore
- dotest 187a1 "${testcvs} -q co CVSROOT" "U CVSROOT/${DOTSTAR}"
+ dotest ignore-1 "${testcvs} -q co CVSROOT" "U CVSROOT/${DOTSTAR}"
cd CVSROOT
echo rootig.c >cvsignore
- dotest 187a2 "${testcvs} add cvsignore" "${PROG}"' [a-z]*: scheduling file `cvsignore'"'"' for addition
+ dotest ignore-2 "${testcvs} add cvsignore" "${PROG}"' [a-z]*: scheduling file `cvsignore'"'"' for addition
'"${PROG}"' [a-z]*: use .'"${PROG}"' commit. to add this file permanently'
# As of Jan 96, local CVS prints "Examining ." and remote doesn't.
# Accept either.
- dotest 187a3 " ${testcvs} ci -m added" \
+ dotest ignore-3 " ${testcvs} ci -m added" \
"${PROG} [a-z]*: Examining \.
-RCS file: ${TESTDIR}/cvsroot/CVSROOT/cvsignore,v
+RCS file: ${CVSROOT_DIRNAME}/CVSROOT/cvsignore,v
done
Checking in cvsignore;
-${TESTDIR}/cvsroot/CVSROOT/cvsignore,v <-- cvsignore
+${CVSROOT_DIRNAME}/CVSROOT/cvsignore,v <-- cvsignore
initial revision: 1\.1
done
${PROG} [a-z]*: Rebuilding administrative file database"
cd ..
if echo "yes" | ${testcvs} release -d CVSROOT >>${LOGFILE} ; then
- pass 187a4
+ pass ignore-4
else
- fail 187a4
+ fail ignore-4
fi
# CVS looks at the home dir from getpwuid, not HOME (is that correct
@@ -11250,46 +12819,46 @@ ${PROG} [a-z]*: Rebuilding administrative file database"
touch foobar.c bar.c rootig.c defig.o envig.c optig.c
# We use sort because we can't predict the order in which
# the files will be listed.
- dotest_sort 188a "${testcvs} import -m m -I optig.c first-dir tag1 tag2" \
+ dotest_sort ignore-5 "${testcvs} import -m m -I optig.c ignore/first-dir tag1 tag2" \
'
-I first-dir/defig.o
-I first-dir/envig.c
-I first-dir/optig.c
-I first-dir/rootig.c
-N first-dir/bar.c
-N first-dir/foobar.c
+I ignore/first-dir/defig.o
+I ignore/first-dir/envig.c
+I ignore/first-dir/optig.c
+I ignore/first-dir/rootig.c
+N ignore/first-dir/bar.c
+N ignore/first-dir/foobar.c
No conflicts created by this import'
- dotest_sort 188b "${testcvs} import -m m -I ! second-dir tag3 tag4" \
+ dotest_sort ignore-6 "${testcvs} import -m m -I ! ignore/second-dir tag3 tag4" \
'
-N second-dir/bar.c
-N second-dir/defig.o
-N second-dir/envig.c
-N second-dir/foobar.c
-N second-dir/optig.c
-N second-dir/rootig.c
+N ignore/second-dir/bar.c
+N ignore/second-dir/defig.o
+N ignore/second-dir/envig.c
+N ignore/second-dir/foobar.c
+N ignore/second-dir/optig.c
+N ignore/second-dir/rootig.c
No conflicts created by this import'
cd ..
rm -r dir-to-import
mkdir 1
cd 1
- dotest 189a "${testcvs} -q co second-dir" \
+ dotest ignore-7 "${testcvs} -q co -dsecond-dir ignore/second-dir" \
'U second-dir/bar.c
U second-dir/defig.o
U second-dir/envig.c
U second-dir/foobar.c
U second-dir/optig.c
U second-dir/rootig.c'
- dotest 189b "${testcvs} -q co first-dir" 'U first-dir/bar.c
+ dotest ignore-8 "${testcvs} -q co -dfirst-dir ignore/first-dir" 'U first-dir/bar.c
U first-dir/foobar.c'
cd first-dir
touch rootig.c defig.o envig.c optig.c notig.c
- dotest 189c "${testcvs} -q update -I optig.c" "${QUESTION} notig.c"
+ dotest ignore-9 "${testcvs} -q update -I optig.c" "${QUESTION} notig.c"
# The fact that CVS requires us to specify -I CVS here strikes me
# as a bug.
- dotest_sort 189d "${testcvs} -q update -I ! -I CVS" \
+ dotest_sort ignore-10 "${testcvs} -q update -I ! -I CVS" \
"${QUESTION} defig.o
${QUESTION} envig.c
${QUESTION} notig.c
@@ -11300,8 +12869,8 @@ ${QUESTION} rootig.c"
# where appropriate. Only test this for remote, because local
# CVS only prints it on update.
rm optig.c
- if test "x$remote" = xyes; then
- dotest 189e "${testcvs} -q diff" "${QUESTION} notig.c"
+ if $remote; then
+ dotest ignore-11r "${testcvs} -q diff" "${QUESTION} notig.c"
# Force the server to be contacted. Ugh. Having CVS
# contact the server for the sole purpose of checking
@@ -11312,7 +12881,7 @@ ${QUESTION} rootig.c"
# contents.
touch bar.c
- dotest 189f "${testcvs} -q ci -m commit-it" "${QUESTION} notig.c"
+ dotest ignore-11r "${testcvs} -q ci -m commit-it" "${QUESTION} notig.c"
fi
# now test .cvsignore files
@@ -11320,11 +12889,11 @@ ${QUESTION} rootig.c"
echo notig.c >first-dir/.cvsignore
echo foobar.c >second-dir/.cvsignore
touch first-dir/notig.c second-dir/notig.c second-dir/foobar.c
- dotest_sort 190 "${testcvs} -qn update" \
+ dotest_sort ignore-12 "${testcvs} -qn update" \
"${QUESTION} first-dir/.cvsignore
${QUESTION} second-dir/.cvsignore
${QUESTION} second-dir/notig.c"
- dotest_sort 191 "${testcvs} -qn update -I! -I CVS" \
+ dotest_sort ignore-13 "${testcvs} -qn update -I! -I CVS" \
"${QUESTION} first-dir/.cvsignore
${QUESTION} first-dir/defig.o
${QUESTION} first-dir/envig.c
@@ -11332,22 +12901,93 @@ ${QUESTION} first-dir/rootig.c
${QUESTION} second-dir/.cvsignore
${QUESTION} second-dir/notig.c"
- echo yes | dotest ignore-192 "${testcvs} release -d first-dir" \
+ echo yes | dotest ignore-14 "${testcvs} release -d first-dir" \
"${QUESTION} \.cvsignore
You have \[0\] altered files in this repository.
Are you sure you want to release (and delete) directory .first-dir': "
echo add a line >>second-dir/foobar.c
rm second-dir/notig.c second-dir/.cvsignore
- echo yes | dotest ignore-194 "${testcvs} release -d second-dir" \
+ echo yes | dotest ignore-15 "${testcvs} release -d second-dir" \
"M foobar.c
You have \[1\] altered files in this repository.
Are you sure you want to release (and delete) directory .second-dir': "
+
+ cd ../..
+ if $keep; then :; else
+ rm -r ignore
+ rm -rf ${CVSROOT_DIRNAME}/ignore
+ fi
+ ;;
+
+ ignore-on-branch)
+ # Test that CVS _doesn't_ ignore files on branches because they were
+ # added to the trunk.
+ mkdir ignore-on-branch; cd ignore-on-branch
+ mkdir $CVSROOT_DIRNAME/ignore-on-branch
+
+ # create file1 & file2 on trunk
+ dotest ignore-on-branch-setup-1 "$testcvs -q co -dsetup ignore-on-branch" ''
+ cd setup
+ echo file1 >file1
+ dotest ignore-on-branch-setup-2 "$testcvs -q add file1" \
+"$PROG [a-z]*: use .cvs commit. to add this file permanently"
+ dotest ignore-on-branch-setup-3 "$testcvs -q ci -mfile1 file1" \
+"RCS file: $CVSROOT_DIRNAME/ignore-on-branch/file1,v
+done
+Checking in file1;
+$CVSROOT_DIRNAME/ignore-on-branch/file1,v <-- file1
+initial revision: 1\.1
+done"
+ dotest ignore-on-branch-setup-4 "$testcvs -q tag -b branch" 'T file1'
+ echo file2 >file2
+ dotest ignore-on-branch-setup-5 "$testcvs -q add file2" \
+"$PROG [a-z]*: use .cvs commit. to add this file permanently"
+ dotest ignore-on-branch-setup-6 "$testcvs -q ci -mtrunk file2" \
+"RCS file: $CVSROOT_DIRNAME/ignore-on-branch/file2,v
+done
+Checking in file2;
+$CVSROOT_DIRNAME/ignore-on-branch/file2,v <-- file2
+initial revision: 1\.1
+done"
+
cd ..
- rm -r 1
- cd ..
- rm -r wnt
- rm -rf ${CVSROOT_DIRNAME}/first-dir ${CVSROOT_DIRNAME}/second-dir
+
+ # Check out branch.
+ #
+ # - This was the original failure case - file2 would not be flagged
+ # with a '?'
+ dotest ignore-on-branch-1 "$testcvs -q co -rbranch ignore-on-branch" \
+'U ignore-on-branch/file1'
+ cd ignore-on-branch
+ echo file2 on branch >file2
+ dotest ignore-on-branch-2 "$testcvs -nq update" '? file2'
+
+ # Now set up for a join. One of the original fixes for this would
+ # print out a 'U' and a '?' during a join which added a file.
+ if $remote; then
+ dotest ignore-on-branch-3 "$testcvs -q tag -b branch2" \
+'? file2
+T file1'
+ else
+ dotest ignore-on-branch-3 "$testcvs -q tag -b branch2" 'T file1'
+ fi
+ dotest ignore-on-branch-4 "$testcvs -q add file2" \
+"$PROG [a-z]*: use .cvs commit. to add this file permanently"
+ dotest ignore-on-branch-5 "$testcvs -q ci -mbranch file2" \
+"Checking in file2;
+$CVSROOT_DIRNAME/ignore-on-branch/file2,v <-- file2
+new revision: 1\.1\.2\.1; previous revision: 1\.1
+done"
+ dotest ignore-on-branch-6 "$testcvs -q up -rbranch2" \
+"$PROG [a-z]*: file2 is no longer in the repository"
+ dotest ignore-on-branch-7 "$testcvs -q up -jbranch" 'U file2'
+
+ cd ../..
+ if $keep; then :; else
+ rm -r ignore-on-branch
+ rm -rf $CVSROOT_DIRNAME/ignore-on-branch
+ fi
;;
binfiles)
@@ -11371,10 +13011,10 @@ Are you sure you want to release (and delete) directory .second-dir': "
"${PROG}"' [a-z]*: scheduling file `binfile'\'' for addition
'"${PROG}"' [a-z]*: use .'"${PROG}"' commit. to add this file permanently'
dotest binfiles-3 "${testcvs} -q ci -m add-it" \
-"RCS file: ${TESTDIR}/cvsroot/first-dir/binfile,v
+"RCS file: ${CVSROOT_DIRNAME}/first-dir/binfile,v
done
Checking in binfile;
-${TESTDIR}/cvsroot/first-dir/binfile,v <-- binfile
+${CVSROOT_DIRNAME}/first-dir/binfile,v <-- binfile
initial revision: 1\.1
done"
cd ../..
@@ -11390,7 +13030,7 @@ done"
File: binfile Status: Up-to-date
Working revision: 1\.1.*
- Repository revision: 1\.1 ${TESTDIR}/cvsroot/first-dir/binfile,v
+ Repository revision: 1\.1 ${CVSROOT_DIRNAME}/first-dir/binfile,v
Sticky Tag: (none)
Sticky Date: (none)
Sticky Options: -kb"
@@ -11408,7 +13048,7 @@ File: binfile Status: Up-to-date
File: binfile Status: Up-to-date
Working revision: 1\.1.*
- Repository revision: 1\.1 ${TESTDIR}/cvsroot/first-dir/binfile,v
+ Repository revision: 1\.1 ${CVSROOT_DIRNAME}/first-dir/binfile,v
Sticky Tag: (none)
Sticky Date: (none)
Sticky Options: -kb"
@@ -11419,7 +13059,7 @@ File: binfile Status: Up-to-date
cp ../../1/binfile2.dat binfile
dotest binfiles-6 "${testcvs} -q ci -m modify-it" \
"Checking in binfile;
-${TESTDIR}/cvsroot/first-dir/binfile,v <-- binfile
+${CVSROOT_DIRNAME}/first-dir/binfile,v <-- binfile
new revision: 1\.2; previous revision: 1\.1
done"
cd ../../1/first-dir
@@ -11430,7 +13070,7 @@ done"
cp ../binfile.dat binfile
dotest binfiles-con0 "${testcvs} -q ci -m modify-it" \
"Checking in binfile;
-${TESTDIR}/cvsroot/first-dir/binfile,v <-- binfile
+${CVSROOT_DIRNAME}/first-dir/binfile,v <-- binfile
new revision: 1\.3; previous revision: 1\.2
done"
cd ../../2/first-dir
@@ -11447,7 +13087,7 @@ C binfile"
cp ../../1/binfile2.dat binfile
dotest binfiles-con4 "${testcvs} -q ci -m resolve-it" \
"Checking in binfile;
-${TESTDIR}/cvsroot/first-dir/binfile,v <-- binfile
+${CVSROOT_DIRNAME}/first-dir/binfile,v <-- binfile
new revision: 1\.4; previous revision: 1\.3
done"
cd ../../1/first-dir
@@ -11471,7 +13111,7 @@ done"
File: binfile Status: Up-to-date
Working revision: 1\.4.*
- Repository revision: 1\.4 ${TESTDIR}/cvsroot/first-dir/binfile,v
+ Repository revision: 1\.4 ${CVSROOT_DIRNAME}/first-dir/binfile,v
Sticky Tag: HEAD (revision: 1\.4)
Sticky Date: (none)
Sticky Options: -kb"
@@ -11482,7 +13122,7 @@ File: binfile Status: Up-to-date
echo 'this file is $''RCSfile$' >binfile
dotest binfiles-14a "${testcvs} -q ci -m modify-it" \
"Checking in binfile;
-${TESTDIR}/cvsroot/first-dir/binfile,v <-- binfile
+${CVSROOT_DIRNAME}/first-dir/binfile,v <-- binfile
new revision: 1\.5; previous revision: 1\.4
done"
dotest binfiles-14b "cat binfile" 'this file is $''RCSfile$'
@@ -11492,12 +13132,12 @@ done"
File: binfile Status: Up-to-date
Working revision: 1\.5.*
- Repository revision: 1\.5 ${TESTDIR}/cvsroot/first-dir/binfile,v
+ Repository revision: 1\.5 ${CVSROOT_DIRNAME}/first-dir/binfile,v
Sticky Tag: (none)
Sticky Date: (none)
Sticky Options: -kb"
dotest binfiles-14d "${testcvs} admin -kv binfile" \
-"RCS file: ${TESTDIR}/cvsroot/first-dir/binfile,v
+"RCS file: ${CVSROOT_DIRNAME}/first-dir/binfile,v
done"
# cvs admin doesn't change the checked-out file or its sticky
# kopts. There probably should be a way which does (but
@@ -11509,7 +13149,7 @@ done"
File: binfile Status: Up-to-date
Working revision: 1\.5.*
- Repository revision: 1\.5 ${TESTDIR}/cvsroot/first-dir/binfile,v
+ Repository revision: 1\.5 ${CVSROOT_DIRNAME}/first-dir/binfile,v
Sticky Tag: (none)
Sticky Date: (none)
Sticky Options: -kb"
@@ -11520,7 +13160,7 @@ File: binfile Status: Up-to-date
File: binfile Status: Up-to-date
Working revision: 1\.5.*
- Repository revision: 1\.5 ${TESTDIR}/cvsroot/first-dir/binfile,v
+ Repository revision: 1\.5 ${CVSROOT_DIRNAME}/first-dir/binfile,v
Sticky Tag: (none)
Sticky Date: (none)
Sticky Options: -kv"
@@ -11530,10 +13170,10 @@ File: binfile Status: Up-to-date
dotest binfiles-sticky1 "${testcvs} -q add nibfile" \
"${PROG} [a-z]*: use .${PROG} commit. to add this file permanently"
dotest binfiles-sticky2 "${testcvs} -q ci -m add-it nibfile" \
- "RCS file: ${TESTDIR}/cvsroot/first-dir/nibfile,v
+ "RCS file: ${CVSROOT_DIRNAME}/first-dir/nibfile,v
done
Checking in nibfile;
-${TESTDIR}/cvsroot/first-dir/nibfile,v <-- nibfile
+${CVSROOT_DIRNAME}/first-dir/nibfile,v <-- nibfile
initial revision: 1\.1
done"
dotest binfiles-sticky3 "${testcvs} -q update -kb nibfile" \
@@ -11543,7 +13183,7 @@ done"
File: nibfile Status: Up-to-date
Working revision: 1\.1.*
- Repository revision: 1\.1 ${TESTDIR}/cvsroot/first-dir/nibfile,v
+ Repository revision: 1\.1 ${CVSROOT_DIRNAME}/first-dir/nibfile,v
Sticky Tag: (none)
Sticky Date: (none)
Sticky Options: -kb"
@@ -11556,12 +13196,12 @@ File: nibfile Status: Up-to-date
File: nibfile Status: Up-to-date
Working revision: 1\.1.*
- Repository revision: 1\.1 ${TESTDIR}/cvsroot/first-dir/nibfile,v
+ Repository revision: 1\.1 ${CVSROOT_DIRNAME}/first-dir/nibfile,v
Sticky Tag: (none)
Sticky Date: (none)
Sticky Options: (none)"
dotest binfiles-15 "${testcvs} -q admin -kb nibfile" \
-"RCS file: ${TESTDIR}/cvsroot/first-dir/nibfile,v
+"RCS file: ${CVSROOT_DIRNAME}/first-dir/nibfile,v
done"
dotest binfiles-16 "${testcvs} -q update nibfile" "[UP] nibfile"
dotest binfiles-17 "${testcvs} -q status nibfile" \
@@ -11569,23 +13209,23 @@ done"
File: nibfile Status: Up-to-date
Working revision: 1\.1.*
- Repository revision: 1\.1 ${TESTDIR}/cvsroot/first-dir/nibfile,v
+ Repository revision: 1\.1 ${CVSROOT_DIRNAME}/first-dir/nibfile,v
Sticky Tag: (none)
Sticky Date: (none)
Sticky Options: -kb"
dotest binfiles-o1 "${testcvs} admin -o1.3:: binfile" \
-"RCS file: ${TESTDIR}/cvsroot/first-dir/binfile,v
+"RCS file: ${CVSROOT_DIRNAME}/first-dir/binfile,v
deleting revision 1\.5
deleting revision 1\.4
done"
dotest binfiles-o2 "${testcvs} admin -o::1.3 binfile" \
-"RCS file: ${TESTDIR}/cvsroot/first-dir/binfile,v
+"RCS file: ${CVSROOT_DIRNAME}/first-dir/binfile,v
deleting revision 1\.2
deleting revision 1\.1
done"
dotest binfiles-o3 "${testcvs} -q log -h -N binfile" "
-RCS file: ${TESTDIR}/cvsroot/first-dir/binfile,v
+RCS file: ${CVSROOT_DIRNAME}/first-dir/binfile,v
Working file: binfile
head: 1\.3
branch:
@@ -11652,22 +13292,22 @@ ${PROG} [a-z]*: scheduling file .brmod-trmod. for addition
${PROG} [a-z]*: scheduling file .brmod-wdmod. for addition
${PROG} [a-z]*: use .${PROG} commit. to add these files permanently"
dotest binfiles2-1b "${testcvs} -q ci -m add" \
-"RCS file: ${TESTDIR}/cvsroot/first-dir/brmod,v
+"RCS file: ${CVSROOT_DIRNAME}/first-dir/brmod,v
done
Checking in brmod;
-${TESTDIR}/cvsroot/first-dir/brmod,v <-- brmod
+${CVSROOT_DIRNAME}/first-dir/brmod,v <-- brmod
initial revision: 1\.1
done
-RCS file: ${TESTDIR}/cvsroot/first-dir/brmod-trmod,v
+RCS file: ${CVSROOT_DIRNAME}/first-dir/brmod-trmod,v
done
Checking in brmod-trmod;
-${TESTDIR}/cvsroot/first-dir/brmod-trmod,v <-- brmod-trmod
+${CVSROOT_DIRNAME}/first-dir/brmod-trmod,v <-- brmod-trmod
initial revision: 1\.1
done
-RCS file: ${TESTDIR}/cvsroot/first-dir/brmod-wdmod,v
+RCS file: ${CVSROOT_DIRNAME}/first-dir/brmod-wdmod,v
done
Checking in brmod-wdmod;
-${TESTDIR}/cvsroot/first-dir/brmod-wdmod,v <-- brmod-wdmod
+${CVSROOT_DIRNAME}/first-dir/brmod-wdmod,v <-- brmod-wdmod
initial revision: 1\.1
done"
dotest binfiles2-2 "${testcvs} -q tag -b br" 'T brmod
@@ -11682,26 +13322,26 @@ ${PROG} [a-z]*: use .${PROG} commit. to add this file permanently"
cp ../binfile2 brmod-trmod
cp ../binfile2 brmod-wdmod
dotest binfiles2-5 "${testcvs} -q ci -m br-changes" \
-"RCS file: ${TESTDIR}/cvsroot/first-dir/Attic/binfile\.dat,v
+"RCS file: ${CVSROOT_DIRNAME}/first-dir/Attic/binfile\.dat,v
done
Checking in binfile\.dat;
-${TESTDIR}/cvsroot/first-dir/Attic/binfile\.dat,v <-- binfile\.dat
+${CVSROOT_DIRNAME}/first-dir/Attic/binfile\.dat,v <-- binfile\.dat
new revision: 1\.1\.2\.1; previous revision: 1\.1
done
Checking in brmod;
-${TESTDIR}/cvsroot/first-dir/brmod,v <-- brmod
+${CVSROOT_DIRNAME}/first-dir/brmod,v <-- brmod
new revision: 1\.1\.2\.1; previous revision: 1\.1
done
Checking in brmod-trmod;
-${TESTDIR}/cvsroot/first-dir/brmod-trmod,v <-- brmod-trmod
+${CVSROOT_DIRNAME}/first-dir/brmod-trmod,v <-- brmod-trmod
new revision: 1\.1\.2\.1; previous revision: 1\.1
done
Checking in brmod-wdmod;
-${TESTDIR}/cvsroot/first-dir/brmod-wdmod,v <-- brmod-wdmod
+${CVSROOT_DIRNAME}/first-dir/brmod-wdmod,v <-- brmod-wdmod
new revision: 1\.1\.2\.1; previous revision: 1\.1
done"
dotest binfiles2-6 "${testcvs} -q update -A" \
-"${PROG} [a-z]*: warning: binfile\.dat is not (any longer) pertinent
+"${PROG} [a-z]*: binfile\.dat is no longer in the repository
[UP] brmod
[UP] brmod-trmod
[UP] brmod-wdmod"
@@ -11710,7 +13350,7 @@ done"
cp ../binfile3 brmod-trmod
dotest binfiles2-7a "${testcvs} -q ci -m tr-modify" \
"Checking in brmod-trmod;
-${TESTDIR}/cvsroot/first-dir/brmod-trmod,v <-- brmod-trmod
+${CVSROOT_DIRNAME}/first-dir/brmod-trmod,v <-- brmod-trmod
new revision: 1\.2; previous revision: 1\.1
done"
cp ../binfile3 brmod-wdmod
@@ -11738,38 +13378,38 @@ C brmod-wdmod"
# Test that everything was properly scheduled.
dotest binfiles2-10 "${testcvs} -q ci -m checkin" \
"Checking in binfile\.dat;
-${TESTDIR}/cvsroot/first-dir/binfile\.dat,v <-- binfile\.dat
+${CVSROOT_DIRNAME}/first-dir/binfile\.dat,v <-- binfile\.dat
new revision: 1\.2; previous revision: 1\.1
done
Checking in brmod;
-${TESTDIR}/cvsroot/first-dir/brmod,v <-- brmod
+${CVSROOT_DIRNAME}/first-dir/brmod,v <-- brmod
new revision: 1\.2; previous revision: 1\.1
done
Checking in brmod-trmod;
-${TESTDIR}/cvsroot/first-dir/brmod-trmod,v <-- brmod-trmod
+${CVSROOT_DIRNAME}/first-dir/brmod-trmod,v <-- brmod-trmod
new revision: 1\.3; previous revision: 1\.2
done
Checking in brmod-wdmod;
-${TESTDIR}/cvsroot/first-dir/brmod-wdmod,v <-- brmod-wdmod
+${CVSROOT_DIRNAME}/first-dir/brmod-wdmod,v <-- brmod-wdmod
new revision: 1\.2; previous revision: 1\.1
done"
dotest_fail binfiles2-o1 "${testcvs} -q admin -o :1.2 brmod-trmod" \
-"RCS file: ${TESTDIR}/cvsroot/first-dir/brmod-trmod,v
+"RCS file: ${CVSROOT_DIRNAME}/first-dir/brmod-trmod,v
deleting revision 1\.2
-${PROG} [a-z]*: ${TESTDIR}/cvsroot/first-dir/brmod-trmod,v: can't remove branch point 1\.1
-${PROG} [a-z]*: cannot modify RCS file for .brmod-trmod."
+${PROG} [a-z]*: ${CVSROOT_DIRNAME}/first-dir/brmod-trmod,v: can't remove branch point 1\.1
+${PROG} [a-z]*: RCS file for .brmod-trmod. not modified\."
dotest binfiles2-o2 "${testcvs} -q admin -o 1.1.2.1: brmod-trmod" \
-"RCS file: ${TESTDIR}/cvsroot/first-dir/brmod-trmod,v
+"RCS file: ${CVSROOT_DIRNAME}/first-dir/brmod-trmod,v
deleting revision 1\.1\.2\.1
done"
dotest binfiles2-o3 "${testcvs} -q admin -o :1.2 brmod-trmod" \
-"RCS file: ${TESTDIR}/cvsroot/first-dir/brmod-trmod,v
+"RCS file: ${CVSROOT_DIRNAME}/first-dir/brmod-trmod,v
deleting revision 1\.2
deleting revision 1\.1
done"
dotest binfiles2-o4 "${testcvs} -q log -N brmod-trmod" "
-RCS file: ${TESTDIR}/cvsroot/first-dir/brmod-trmod,v
+RCS file: ${CVSROOT_DIRNAME}/first-dir/brmod-trmod,v
Working file: brmod-trmod
head: 1\.3
branch:
@@ -11804,10 +13444,10 @@ checkin
"${PROG} [a-z]*: scheduling file .file1. for addition
${PROG} [a-z]*: use .${PROG} commit. to add this file permanently"
dotest binfiles3-3 "${testcvs} -q ci -m add-it" \
-"RCS file: ${TESTDIR}/cvsroot/first-dir/file1,v
+"RCS file: ${CVSROOT_DIRNAME}/first-dir/file1,v
done
Checking in file1;
-${TESTDIR}/cvsroot/first-dir/file1,v <-- file1
+${CVSROOT_DIRNAME}/first-dir/file1,v <-- file1
initial revision: 1\.1
done"
rm file1
@@ -11816,7 +13456,7 @@ done"
${PROG} [a-z]*: use .${PROG} commit. to remove this file permanently"
dotest binfiles3-5 "${testcvs} -q ci -m remove-it" \
"Removing file1;
-${TESTDIR}/cvsroot/first-dir/file1,v <-- file1
+${CVSROOT_DIRNAME}/first-dir/file1,v <-- file1
new revision: delete; previous revision: 1\.1
done"
cp ../binfile.dat file1
@@ -11835,11 +13475,11 @@ D"
dotest binfiles3-7 "${testcvs} -q ci -m readd-it" \
"${PROG} [a-z]*: changing keyword expansion mode to -kb
Checking in file1;
-${TESTDIR}/cvsroot/first-dir/file1,v <-- file1
+${CVSROOT_DIRNAME}/first-dir/file1,v <-- file1
new revision: 1\.3; previous revision: 1\.2
done"
dotest binfiles3-8 "${testcvs} -q log -h -N file1" "
-RCS file: ${TESTDIR}/cvsroot/first-dir/file1,v
+RCS file: ${CVSROOT_DIRNAME}/first-dir/file1,v
Working file: file1
head: 1\.3
branch:
@@ -11859,17 +13499,17 @@ total revisions: 3
cp ../binfile4.dat file1
dotest binfiles3-9 "${testcvs} -q ci -m change" \
"Checking in file1;
-${TESTDIR}/cvsroot/first-dir/file1,v <-- file1
+${CVSROOT_DIRNAME}/first-dir/file1,v <-- file1
new revision: 1\.4; previous revision: 1\.3
done"
cp ../binfile5.dat file1
dotest binfiles3-10 "${testcvs} -q ci -m change" \
"Checking in file1;
-${TESTDIR}/cvsroot/first-dir/file1,v <-- file1
+${CVSROOT_DIRNAME}/first-dir/file1,v <-- file1
new revision: 1\.5; previous revision: 1\.4
done"
dotest binfiles3-11 "${testcvs} admin -o 1.3::1.5 file1" \
-"RCS file: ${TESTDIR}/cvsroot/first-dir/file1,v
+"RCS file: ${CVSROOT_DIRNAME}/first-dir/file1,v
deleting revision 1\.4
done"
dotest binfiles3-12 "${testcvs} -q update -r 1.3 file1" "U file1"
@@ -11899,98 +13539,98 @@ done"
# For the moment, remote CVS can't pass wrappers from CVSWRAPPERS
# (see wrap_send). So skip these tests for remote.
- if test "x$remote" = xno; then
+ if $remote; then :; else
- mkdir ${CVSROOT_DIRNAME}/first-dir
- mkdir 1; cd 1
- dotest mcopy-1 "${testcvs} -q co first-dir" ''
- cd first-dir
+ mkdir ${CVSROOT_DIRNAME}/first-dir
+ mkdir 1; cd 1
+ dotest mcopy-1 "${testcvs} -q co first-dir" ''
+ cd first-dir
- # FIXCVS: unless a branch has at least one file on it,
- # tag_check_valid won't know it exists. So if brmod didn't
- # exist, we would have to invent it.
- echo 'brmod initial contents' >brmod
- echo 'brmod-trmod initial contents' >brmod-trmod
- echo 'brmod-wdmod initial contents' >brmod-wdmod
- echo "* -m 'COPY'" >.cvswrappers
- dotest mcopy-1a \
+ # FIXCVS: unless a branch has at least one file on it,
+ # tag_check_valid won't know it exists. So if brmod didn't
+ # exist, we would have to invent it.
+ echo 'brmod initial contents' >brmod
+ echo 'brmod-trmod initial contents' >brmod-trmod
+ echo 'brmod-wdmod initial contents' >brmod-wdmod
+ echo "* -m 'COPY'" >.cvswrappers
+ dotest mcopy-1a \
"${testcvs} add .cvswrappers brmod brmod-trmod brmod-wdmod" \
"${PROG} [a-z]*: scheduling file .\.cvswrappers. for addition
${PROG} [a-z]*: scheduling file .brmod. for addition
${PROG} [a-z]*: scheduling file .brmod-trmod. for addition
${PROG} [a-z]*: scheduling file .brmod-wdmod. for addition
${PROG} [a-z]*: use .${PROG} commit. to add these files permanently"
- dotest mcopy-1b "${testcvs} -q ci -m add" \
-"RCS file: ${TESTDIR}/cvsroot/first-dir/\.cvswrappers,v
+ dotest mcopy-1b "${testcvs} -q ci -m add" \
+"RCS file: ${CVSROOT_DIRNAME}/first-dir/\.cvswrappers,v
done
Checking in \.cvswrappers;
-${TESTDIR}/cvsroot/first-dir/\.cvswrappers,v <-- \.cvswrappers
+${CVSROOT_DIRNAME}/first-dir/\.cvswrappers,v <-- \.cvswrappers
initial revision: 1\.1
done
-RCS file: ${TESTDIR}/cvsroot/first-dir/brmod,v
+RCS file: ${CVSROOT_DIRNAME}/first-dir/brmod,v
done
Checking in brmod;
-${TESTDIR}/cvsroot/first-dir/brmod,v <-- brmod
+${CVSROOT_DIRNAME}/first-dir/brmod,v <-- brmod
initial revision: 1\.1
done
-RCS file: ${TESTDIR}/cvsroot/first-dir/brmod-trmod,v
+RCS file: ${CVSROOT_DIRNAME}/first-dir/brmod-trmod,v
done
Checking in brmod-trmod;
-${TESTDIR}/cvsroot/first-dir/brmod-trmod,v <-- brmod-trmod
+${CVSROOT_DIRNAME}/first-dir/brmod-trmod,v <-- brmod-trmod
initial revision: 1\.1
done
-RCS file: ${TESTDIR}/cvsroot/first-dir/brmod-wdmod,v
+RCS file: ${CVSROOT_DIRNAME}/first-dir/brmod-wdmod,v
done
Checking in brmod-wdmod;
-${TESTDIR}/cvsroot/first-dir/brmod-wdmod,v <-- brmod-wdmod
+${CVSROOT_DIRNAME}/first-dir/brmod-wdmod,v <-- brmod-wdmod
initial revision: 1\.1
done"
- # NOTE: .cvswrappers files are broken (see comment in
- # src/wrapper.c). So doing everything via the environment
- # variable is a workaround. Better would be to test them
- # both.
- CVSWRAPPERS="* -m 'COPY'"
- export CVSWRAPPERS
- dotest mcopy-2 "${testcvs} -q tag -b br" 'T \.cvswrappers
+ # NOTE: .cvswrappers files are broken (see comment in
+ # src/wrapper.c). So doing everything via the environment
+ # variable is a workaround. Better would be to test them
+ # both.
+ CVSWRAPPERS="* -m 'COPY'"
+ export CVSWRAPPERS
+ dotest mcopy-2 "${testcvs} -q tag -b br" 'T \.cvswrappers
T brmod
T brmod-trmod
T brmod-wdmod'
- dotest mcopy-3 "${testcvs} -q update -r br" ''
- echo 'modify brmod on br' >brmod
- echo 'modify brmod-trmod on br' >brmod-trmod
- echo 'modify brmod-wdmod on br' >brmod-wdmod
- dotest mcopy-5 "${testcvs} -q ci -m br-changes" \
+ dotest mcopy-3 "${testcvs} -q update -r br" ''
+ echo 'modify brmod on br' >brmod
+ echo 'modify brmod-trmod on br' >brmod-trmod
+ echo 'modify brmod-wdmod on br' >brmod-wdmod
+ dotest mcopy-5 "${testcvs} -q ci -m br-changes" \
"Checking in brmod;
-${TESTDIR}/cvsroot/first-dir/brmod,v <-- brmod
+${CVSROOT_DIRNAME}/first-dir/brmod,v <-- brmod
new revision: 1\.1\.2\.1; previous revision: 1\.1
done
Checking in brmod-trmod;
-${TESTDIR}/cvsroot/first-dir/brmod-trmod,v <-- brmod-trmod
+${CVSROOT_DIRNAME}/first-dir/brmod-trmod,v <-- brmod-trmod
new revision: 1\.1\.2\.1; previous revision: 1\.1
done
Checking in brmod-wdmod;
-${TESTDIR}/cvsroot/first-dir/brmod-wdmod,v <-- brmod-wdmod
+${CVSROOT_DIRNAME}/first-dir/brmod-wdmod,v <-- brmod-wdmod
new revision: 1\.1\.2\.1; previous revision: 1\.1
done"
- dotest mcopy-6 "${testcvs} -q update -A" \
+ dotest mcopy-6 "${testcvs} -q update -A" \
"[UP] brmod
[UP] brmod-trmod
[UP] brmod-wdmod"
- dotest mcopy-7 "cat brmod brmod-trmod brmod-wdmod" \
+ dotest mcopy-7 "cat brmod brmod-trmod brmod-wdmod" \
"brmod initial contents
brmod-trmod initial contents
brmod-wdmod initial contents"
- echo 'modify brmod-trmod again on trunk' >brmod-trmod
- dotest mcopy-7a "${testcvs} -q ci -m tr-modify" \
+ echo 'modify brmod-trmod again on trunk' >brmod-trmod
+ dotest mcopy-7a "${testcvs} -q ci -m tr-modify" \
"Checking in brmod-trmod;
-${TESTDIR}/cvsroot/first-dir/brmod-trmod,v <-- brmod-trmod
+${CVSROOT_DIRNAME}/first-dir/brmod-trmod,v <-- brmod-trmod
new revision: 1\.2; previous revision: 1\.1
done"
- echo 'modify brmod-wdmod in working dir' >brmod-wdmod
+ echo 'modify brmod-wdmod in working dir' >brmod-wdmod
- dotest mcopy-8 "${testcvs} -q update -j br" \
+ dotest mcopy-8 "${testcvs} -q update -j br" \
"U brmod
${PROG} [a-z]*: nonmergeable file needs merge
${PROG} [a-z]*: revision 1.1.2.1 from repository is now in brmod-trmod
@@ -12002,34 +13642,34 @@ ${PROG} [a-z]*: revision 1.1.2.1 from repository is now in brmod-wdmod
${PROG} [a-z]*: file from working directory is now in .#brmod-wdmod.1.1
C brmod-wdmod"
- dotest mcopy-9 "cat brmod brmod-trmod brmod-wdmod" \
+ dotest mcopy-9 "cat brmod brmod-trmod brmod-wdmod" \
"modify brmod on br
modify brmod-trmod on br
modify brmod-wdmod on br"
- dotest mcopy-9a "cat .#brmod-trmod.1.2 .#brmod-wdmod.1.1" \
+ dotest mcopy-9a "cat .#brmod-trmod.1.2 .#brmod-wdmod.1.1" \
"modify brmod-trmod again on trunk
modify brmod-wdmod in working dir"
- # Test that everything was properly scheduled.
- dotest mcopy-10 "${testcvs} -q ci -m checkin" \
+ # Test that everything was properly scheduled.
+ dotest mcopy-10 "${testcvs} -q ci -m checkin" \
"Checking in brmod;
-${TESTDIR}/cvsroot/first-dir/brmod,v <-- brmod
+${CVSROOT_DIRNAME}/first-dir/brmod,v <-- brmod
new revision: 1\.2; previous revision: 1\.1
done
Checking in brmod-trmod;
-${TESTDIR}/cvsroot/first-dir/brmod-trmod,v <-- brmod-trmod
+${CVSROOT_DIRNAME}/first-dir/brmod-trmod,v <-- brmod-trmod
new revision: 1\.3; previous revision: 1\.2
done
Checking in brmod-wdmod;
-${TESTDIR}/cvsroot/first-dir/brmod-wdmod,v <-- brmod-wdmod
+${CVSROOT_DIRNAME}/first-dir/brmod-wdmod,v <-- brmod-wdmod
new revision: 1\.2; previous revision: 1\.1
done"
- cd ..
- cd ..
+ cd ..
+ cd ..
- rm -rf ${CVSROOT_DIRNAME}/first-dir
- rm -r 1
- unset CVSWRAPPERS
+ rm -rf ${CVSROOT_DIRNAME}/first-dir
+ rm -r 1
+ unset CVSWRAPPERS
fi # end of tests to be skipped for remote
@@ -12063,7 +13703,7 @@ U first-dir/foo.exe'
File: foo\.c Status: Up-to-date
Working revision: 1\.1\.1\.1.*
- Repository revision: 1\.1\.1\.1 ${TESTDIR}/cvsroot/first-dir/foo\.c,v
+ Repository revision: 1\.1\.1\.1 ${CVSROOT_DIRNAME}/first-dir/foo\.c,v
Sticky Tag: (none)
Sticky Date: (none)
Sticky Options: (none)
@@ -12072,7 +13712,7 @@ File: foo\.c Status: Up-to-date
File: foo\.exe Status: Up-to-date
Working revision: 1\.1\.1\.1.*
- Repository revision: 1\.1\.1\.1 ${TESTDIR}/cvsroot/first-dir/foo\.exe,v
+ Repository revision: 1\.1\.1\.1 ${CVSROOT_DIRNAME}/first-dir/foo\.exe,v
Sticky Tag: (none)
Sticky Date: (none)
Sticky Options: -kb"
@@ -12108,7 +13748,7 @@ U first-dir/foo.exe'
File: foo\.c Status: Up-to-date
Working revision: 1\.1\.1\.1.*
- Repository revision: 1\.1\.1\.1 ${TESTDIR}/cvsroot/first-dir/foo\.c,v
+ Repository revision: 1\.1\.1\.1 ${CVSROOT_DIRNAME}/first-dir/foo\.c,v
Sticky Tag: (none)
Sticky Date: (none)
Sticky Options: -ko
@@ -12117,7 +13757,7 @@ File: foo\.c Status: Up-to-date
File: foo\.exe Status: Up-to-date
Working revision: 1\.1\.1\.1.*
- Repository revision: 1\.1\.1\.1 ${TESTDIR}/cvsroot/first-dir/foo\.exe,v
+ Repository revision: 1\.1\.1\.1 ${CVSROOT_DIRNAME}/first-dir/foo\.exe,v
Sticky Tag: (none)
Sticky Date: (none)
Sticky Options: -kb"
@@ -12231,7 +13871,7 @@ File: foo\.exe Status: Up-to-date
echo "foo*.sb -k 'b'" > cvswrappers
dotest binwrap3-2 "${testcvs} -q ci -m cvswrappers-mod" \
"Checking in cvswrappers;
-${TESTDIR}/cvsroot/CVSROOT/cvswrappers,v <-- cvswrappers
+${CVSROOT_DIRNAME}/CVSROOT/cvswrappers,v <-- cvswrappers
new revision: 1\.[0-9]*; previous revision: 1\.[0-9]*
done
${PROG} [a-z]*: Rebuilding administrative file database"
@@ -12265,16 +13905,16 @@ ${PROG} [a-z]*: Rebuilding administrative file database"
${PROG} [a-z]*: scheduling file .file1\.txt. for addition
${PROG} [a-z]*: use .${PROG} commit. to add these files permanently"
dotest binwrap3-2d "${testcvs} -q ci -m add" \
-"RCS file: ${TESTDIR}/cvsroot/binwrap3/sub2/file1\.newbin,v
+"RCS file: ${CVSROOT_DIRNAME}/binwrap3/sub2/file1\.newbin,v
done
Checking in file1\.newbin;
-${TESTDIR}/cvsroot/binwrap3/sub2/file1\.newbin,v <-- file1\.newbin
+${CVSROOT_DIRNAME}/binwrap3/sub2/file1\.newbin,v <-- file1\.newbin
initial revision: 1\.1
done
-RCS file: ${TESTDIR}/cvsroot/binwrap3/sub2/file1\.txt,v
+RCS file: ${CVSROOT_DIRNAME}/binwrap3/sub2/file1\.txt,v
done
Checking in file1\.txt;
-${TESTDIR}/cvsroot/binwrap3/sub2/file1\.txt,v <-- file1\.txt
+${CVSROOT_DIRNAME}/binwrap3/sub2/file1\.txt,v <-- file1\.txt
initial revision: 1\.1
done"
cd ..
@@ -12390,7 +14030,7 @@ done"
echo "* -m 'COPY'" >>cvswrappers
dotest mwrap-c2 "${testcvs} -q ci -m wrapper-mod" \
"Checking in cvswrappers;
-${TESTDIR}/cvsroot/CVSROOT/cvswrappers,v <-- cvswrappers
+${CVSROOT_DIRNAME}/CVSROOT/cvswrappers,v <-- cvswrappers
new revision: 1\.[0-9]*; previous revision: 1\.[0-9]*
done
${PROG} [a-z]*: Rebuilding administrative file database"
@@ -12399,17 +14039,17 @@ ${PROG} [a-z]*: Rebuilding administrative file database"
dotest mwrap-1 "${testcvs} -q co -l ." ''
mkdir first-dir
dotest mwrap-2 "${testcvs} add first-dir" \
-"Directory ${TESTDIR}/cvsroot/first-dir added to the repository"
+"Directory ${CVSROOT_DIRNAME}/first-dir added to the repository"
cd first-dir
touch aa
dotest mwrap-3 "${testcvs} add aa" \
"${PROG} [a-z]*: scheduling file .aa. for addition
${PROG} [a-z]*: use .${PROG} commit. to add this file permanently"
dotest mwrap-4 "${testcvs} -q ci -m add" \
-"RCS file: ${TESTDIR}/cvsroot/first-dir/aa,v
+"RCS file: ${CVSROOT_DIRNAME}/first-dir/aa,v
done
Checking in aa;
-${TESTDIR}/cvsroot/first-dir/aa,v <-- aa
+${CVSROOT_DIRNAME}/first-dir/aa,v <-- aa
initial revision: 1\.1
done"
cd ../..
@@ -12419,20 +14059,13 @@ done"
echo "changed in m2" >aa
dotest mwrap-6 "${testcvs} -q ci -m m2-mod" \
"Checking in aa;
-${TESTDIR}/cvsroot/first-dir/aa,v <-- aa
+${CVSROOT_DIRNAME}/first-dir/aa,v <-- aa
new revision: 1\.2; previous revision: 1\.1
done"
cd ../..
cd m1/first-dir
echo "changed in m1" >aa
- if test "$remote" = no; then
- dotest mwrap-7 "${testcvs} -nq update" \
-"U aa
-${PROG} [a-z]*: nonmergeable file needs merge
-${PROG} [a-z]*: revision 1\.2 from repository is now in aa
-${PROG} [a-z]*: file from working directory is now in \.#aa\.1\.1
-C aa"
- else
+ if $remote; then
# The tagged text code swallows up "U aa" but isn't yet up to
# trying to figure out how it interacts with the "C aa" and
# other stuff. The whole deal of having both is pretty iffy.
@@ -12442,6 +14075,13 @@ ${PROG} [a-z]*: revision 1\.2 from repository is now in aa
${PROG} [a-z]*: file from working directory is now in \.#aa\.1\.1
C aa
U aa"
+ else
+ dotest mwrap-7 "${testcvs} -nq update" \
+"U aa
+${PROG} [a-z]*: nonmergeable file needs merge
+${PROG} [a-z]*: revision 1\.2 from repository is now in aa
+${PROG} [a-z]*: file from working directory is now in \.#aa\.1\.1
+C aa"
fi
dotest mwrap-8 "${testcvs} -q update" \
"U aa
@@ -12456,7 +14096,7 @@ C aa"
echo '# comment out' >cvswrappers
dotest mwrap-ce "${testcvs} -q ci -m wrapper-mod" \
"Checking in cvswrappers;
-${TESTDIR}/cvsroot/CVSROOT/cvswrappers,v <-- cvswrappers
+${CVSROOT_DIRNAME}/CVSROOT/cvswrappers,v <-- cvswrappers
new revision: 1\.[0-9]*; previous revision: 1\.[0-9]*
done
${PROG} [a-z]*: Rebuilding administrative file database"
@@ -12505,7 +14145,7 @@ ${PROG} [a-z]*: Rebuilding administrative file database"
dotest info-3 "${testcvs} -q ci -m new-loginfo" \
"Checking in loginfo;
-${TESTDIR}/cvsroot/CVSROOT/loginfo,v <-- loginfo
+${CVSROOT_DIRNAME}/CVSROOT/loginfo,v <-- loginfo
new revision: 1\.[0-9]*; previous revision: 1\.[0-9]*
done
${PROG} [a-z]*: Rebuilding administrative file database"
@@ -12520,28 +14160,28 @@ ${PROG} [a-z]*: Rebuilding administrative file database"
'"${PROG}"' [a-z]*: use .'"${PROG}"' commit. to add this file permanently'
echo "cvs -s OTHER=not-this -s MYENV=env-" >>$HOME/.cvsrc
dotest info-6a "${testcvs} -q -s OTHER=value ci -m add-it" \
-"RCS file: ${TESTDIR}/cvsroot/first-dir/file1,v
+"RCS file: ${CVSROOT_DIRNAME}/first-dir/file1,v
done
Checking in file1;
-${TESTDIR}/cvsroot/first-dir/file1,v <-- file1
+${CVSROOT_DIRNAME}/first-dir/file1,v <-- file1
initial revision: 1\.1
done
${PROG} [a-z]*: loginfo:1: no such user variable \${=ZEE}"
echo line0 >>file1
dotest info-6b "${testcvs} -q -sOTHER=foo ci -m mod-it" \
"Checking in file1;
-${TESTDIR}/cvsroot/first-dir/file1,v <-- file1
+${CVSROOT_DIRNAME}/first-dir/file1,v <-- file1
new revision: 1\.2; previous revision: 1\.1
done
${PROG} [a-z]*: loginfo:1: no such user variable \${=ZEE}"
echo line1 >>file1
dotest info-7 "${testcvs} -q -s OTHER=value -s ZEE=z ci -m mod-it" \
"Checking in file1;
-${TESTDIR}/cvsroot/first-dir/file1,v <-- file1
+${CVSROOT_DIRNAME}/first-dir/file1,v <-- file1
new revision: 1\.3; previous revision: 1\.2
done"
cd ..
- dotest info-9 "cat $TESTDIR/testlog" "xenv-valueyz=${username}=${TESTDIR}/cvsroot="
+ dotest info-9 "cat $TESTDIR/testlog" "xenv-valueyz=${username}=${CVSROOT_DIRNAME}="
dotest info-10 "cat $TESTDIR/testlog2" 'first-dir file1,NONE,1.1
first-dir 1.1
first-dir file1
@@ -12562,7 +14202,7 @@ first-dir file1ux'
echo '# do nothing' >loginfo
dotest info-11 "${testcvs} -q -s ZEE=garbage ci -m nuke-loginfo" \
"Checking in loginfo;
-${TESTDIR}/cvsroot/CVSROOT/loginfo,v <-- loginfo
+${CVSROOT_DIRNAME}/CVSROOT/loginfo,v <-- loginfo
new revision: 1\.[0-9]*; previous revision: 1\.[0-9]*
done
${PROG} [a-z]*: Rebuilding administrative file database"
@@ -12582,7 +14222,7 @@ EOF
echo "^first-dir ${TESTDIR}/vscript" >>verifymsg
dotest info-v1 "${testcvs} -q ci -m add-verification" \
"Checking in verifymsg;
-${TESTDIR}/cvsroot/CVSROOT/verifymsg,v <-- verifymsg
+${CVSROOT_DIRNAME}/CVSROOT/verifymsg,v <-- verifymsg
new revision: 1\.[0-9]*; previous revision: 1\.[0-9]*
done
${PROG} [a-z]*: Rebuilding administrative file database"
@@ -12599,7 +14239,7 @@ and many more lines after it
EOF
dotest info-v3 "${testcvs} -q ci -F ${TESTDIR}/comment.tmp" \
"Checking in file1;
-${TESTDIR}/cvsroot/first-dir/file1,v <-- file1
+${CVSROOT_DIRNAME}/first-dir/file1,v <-- file1
new revision: 1\.4; previous revision: 1\.3
done"
cd ..
@@ -12618,7 +14258,7 @@ ${PROG} \[[a-z]* aborted\]: Message verification failed"
echo '# do nothing' >verifymsg
dotest info-cleanup-verifymsg "${testcvs} -q ci -m nuke-verifymsg" \
"Checking in verifymsg;
-${TESTDIR}/cvsroot/CVSROOT/verifymsg,v <-- verifymsg
+${CVSROOT_DIRNAME}/CVSROOT/verifymsg,v <-- verifymsg
new revision: 1\.[0-9]*; previous revision: 1\.[0-9]*
done
${PROG} [a-z]*: Rebuilding administrative file database"
@@ -12666,7 +14306,7 @@ EOF
echo "ALL ${TESTDIR}/1/loggit" >taginfo
dotest taginfo-2 "${testcvs} -q ci -m check-in-taginfo" \
"Checking in taginfo;
-${TESTDIR}/cvsroot/CVSROOT/taginfo,v <-- taginfo
+${CVSROOT_DIRNAME}/CVSROOT/taginfo,v <-- taginfo
new revision: 1\.2; previous revision: 1\.1
done
${PROG} [a-z]*: Rebuilding administrative file database"
@@ -12685,10 +14325,10 @@ ${PROG} [a-z]*: Rebuilding administrative file database"
"${PROG} [a-z]*: scheduling file .file1. for addition
${PROG} [a-z]*: use .${PROG} commit. to add this file permanently"
dotest taginfo-5 "${testcvs} -q ci -m add-it" \
-"RCS file: ${TESTDIR}/cvsroot/first-dir/file1,v
+"RCS file: ${CVSROOT_DIRNAME}/first-dir/file1,v
done
Checking in file1;
-${TESTDIR}/cvsroot/first-dir/file1,v <-- file1
+${CVSROOT_DIRNAME}/first-dir/file1,v <-- file1
initial revision: 1\.1
done"
dotest taginfo-6 "${testcvs} -q tag tag1" "T file1"
@@ -12697,7 +14337,7 @@ done"
echo add text on branch >>file1
dotest taginfo-9 "${testcvs} -q ci -m modify-on-br" \
"Checking in file1;
-${TESTDIR}/cvsroot/first-dir/file1,v <-- file1
+${CVSROOT_DIRNAME}/first-dir/file1,v <-- file1
new revision: 1\.1\.2\.1; previous revision: 1\.1
done"
dotest taginfo-10 "${testcvs} -q tag -F -c brtag" "T file1"
@@ -12738,21 +14378,21 @@ ${PROG} \[[a-z]* aborted\]: correct the above errors first!"
# I suppose passing "1.1.branch" or "branch" for "br"
# would be an improvement.
dotest taginfo-examine "cat ${TESTDIR}/1/taglog" \
-"tag1 add ${TESTDIR}/cvsroot/first-dir file1 1.1
-br add ${TESTDIR}/cvsroot/first-dir file1 1.1
-brtag mov ${TESTDIR}/cvsroot/first-dir file1 1.1.2.1
-tag1 del ${TESTDIR}/cvsroot/first-dir file1 1.1
-tag1 del ${TESTDIR}/cvsroot/first-dir
-tag1 add ${TESTDIR}/cvsroot/first-dir file1 1.1
-tag1 del ${TESTDIR}/cvsroot/first-dir file1 1.1
-tag1 del ${TESTDIR}/cvsroot/first-dir"
+"tag1 add ${CVSROOT_DIRNAME}/first-dir file1 1.1
+br add ${CVSROOT_DIRNAME}/first-dir file1 1.1
+brtag mov ${CVSROOT_DIRNAME}/first-dir file1 1.1.2.1
+tag1 del ${CVSROOT_DIRNAME}/first-dir file1 1.1
+tag1 del ${CVSROOT_DIRNAME}/first-dir
+tag1 add ${CVSROOT_DIRNAME}/first-dir file1 1.1
+tag1 del ${CVSROOT_DIRNAME}/first-dir file1 1.1
+tag1 del ${CVSROOT_DIRNAME}/first-dir"
cd ..
cd CVSROOT
echo '# Keep life simple' > taginfo
dotest taginfo-cleanup-1 "${testcvs} -q ci -m check-in-taginfo" \
"Checking in taginfo;
-${TESTDIR}/cvsroot/CVSROOT/taginfo,v <-- taginfo
+${CVSROOT_DIRNAME}/CVSROOT/taginfo,v <-- taginfo
new revision: 1\.3; previous revision: 1\.2
done
${PROG} [a-z]*: Rebuilding administrative file database"
@@ -12778,23 +14418,23 @@ ${PROG} [a-z]*: Rebuilding administrative file database"
# might need to modify CVSROOT/config
dotest config-3 "${testcvs} -q ci -m change-to-bogus-line" \
"Checking in config;
-${TESTDIR}/cvsroot/CVSROOT/config,v <-- config
+${CVSROOT_DIRNAME}/CVSROOT/config,v <-- config
new revision: 1\.[0-9]*; previous revision: 1\.[0-9]*
done
${PROG} [a-z]*: Rebuilding administrative file database"
echo 'BogusOption=yes' >config
dotest config-4 "${testcvs} -q ci -m change-to-bogus-opt" \
-"${PROG} [a-z]*: syntax error in ${TESTDIR}/cvsroot/CVSROOT/config: line 'bogus line' is missing '='
+"${PROG} [a-z]*: syntax error in ${CVSROOT_DIRNAME}/CVSROOT/config: line 'bogus line' is missing '='
Checking in config;
-${TESTDIR}/cvsroot/CVSROOT/config,v <-- config
+${CVSROOT_DIRNAME}/CVSROOT/config,v <-- config
new revision: 1\.[0-9]*; previous revision: 1\.[0-9]*
done
${PROG} [a-z]*: Rebuilding administrative file database"
echo '# No config is a good config' > config
dotest config-5 "${testcvs} -q ci -m change-to-comment" \
-"${PROG} [a-z]*: ${TESTDIR}/cvsroot/CVSROOT/config: unrecognized keyword 'BogusOption'
+"${PROG} [a-z]*: ${CVSROOT_DIRNAME}/CVSROOT/config: unrecognized keyword 'BogusOption'
Checking in config;
-${TESTDIR}/cvsroot/CVSROOT/config,v <-- config
+${CVSROOT_DIRNAME}/CVSROOT/config,v <-- config
new revision: 1\.[0-9]*; previous revision: 1\.[0-9]*
done
${PROG} [a-z]*: Rebuilding administrative file database"
@@ -12826,10 +14466,10 @@ ${PROG} [a-z]*: Rebuilding administrative file database"
'"${PROG}"' [a-z]*: use .'"${PROG}"' commit. to add this file permanently'
dotest serverpatch-3 "${testcvs} -q commit -m add" \
-"RCS file: ${TESTDIR}/cvsroot/first-dir/file1,v
+"RCS file: ${CVSROOT_DIRNAME}/first-dir/file1,v
done
Checking in file1;
-${TESTDIR}/cvsroot/first-dir/file1,v <-- file1
+${CVSROOT_DIRNAME}/first-dir/file1,v <-- file1
initial revision: 1\.1
done"
@@ -12852,7 +14492,7 @@ done"
echo '2' >> file1
dotest serverpatch-7 "${testcvs} -q ci -mx file1" \
"Checking in file1;
-${TESTDIR}/cvsroot/first-dir/file1,v <-- file1
+${CVSROOT_DIRNAME}/first-dir/file1,v <-- file1
new revision: 1\.2; previous revision: 1\.1
done"
@@ -12903,10 +14543,10 @@ U file1'
echo ' ' >>${TESTDIR}/comment.tmp
echo ' ' >>${TESTDIR}/comment.tmp
dotest log-3 "${testcvs} -q commit -F ${TESTDIR}/comment.tmp" \
-"RCS file: ${TESTDIR}/cvsroot/first-dir/file1,v
+"RCS file: ${CVSROOT_DIRNAME}/first-dir/file1,v
done
Checking in file1;
-${TESTDIR}/cvsroot/first-dir/file1,v <-- file1
+${CVSROOT_DIRNAME}/first-dir/file1,v <-- file1
initial revision: 1\.1
done"
rm -f ${TESTDIR}/comment.tmp
@@ -12914,7 +14554,7 @@ done"
echo 'second revision' > file1
dotest log-4 "${testcvs} -q ci -m2 file1" \
"Checking in file1;
-${TESTDIR}/cvsroot/first-dir/file1,v <-- file1
+${CVSROOT_DIRNAME}/first-dir/file1,v <-- file1
new revision: 1\.2; previous revision: 1\.1
done"
@@ -12923,7 +14563,7 @@ done"
echo 'third revision' > file1
dotest log-6 "${testcvs} -q ci -m3 file1" \
"Checking in file1;
-${TESTDIR}/cvsroot/first-dir/file1,v <-- file1
+${CVSROOT_DIRNAME}/first-dir/file1,v <-- file1
new revision: 1\.3; previous revision: 1\.2
done"
@@ -12932,7 +14572,7 @@ done"
echo 'first branch revision' > file1
dotest log-8 "${testcvs} -q ci -m1b file1" \
"Checking in file1;
-${TESTDIR}/cvsroot/first-dir/file1,v <-- file1
+${CVSROOT_DIRNAME}/first-dir/file1,v <-- file1
new revision: 1\.2\.2\.1; previous revision: 1\.2
done"
@@ -12941,19 +14581,25 @@ done"
echo 'second branch revision' > file1
dotest log-10 "${testcvs} -q ci -m2b file1" \
"Checking in file1;
-${TESTDIR}/cvsroot/first-dir/file1,v <-- file1
+${CVSROOT_DIRNAME}/first-dir/file1,v <-- file1
new revision: 1\.2\.2\.2; previous revision: 1\.2\.2\.1
done"
# Set up a bunch of shell variables to make the later tests
# easier to describe.=
log_header="
-RCS file: ${TESTDIR}/cvsroot/first-dir/file1,v
+RCS file: ${CVSROOT_DIRNAME}/first-dir/file1,v
Working file: file1
head: 1\.3
branch:
locks: strict
access list:"
+ rlog_header="
+RCS file: ${CVSROOT_DIRNAME}/first-dir/file1,v
+head: 1\.3
+branch:
+locks: strict
+access list:"
log_tags='symbolic names:
tag: 1\.2\.2\.1
branch: 1\.2\.0\.2'
@@ -13077,6 +14723,13 @@ total revisions: 5; selected revisions: 1
description:
${log_rev3}
${log_trailer}"
+ dotest log-14f "${testcvs} log -r:: file1" \
+"${log_header}
+${log_tags}
+${log_header2}
+total revisions: 5; selected revisions: 0
+description:
+${log_trailer}"
dotest log-15 "${testcvs} log -r1.2 file1" \
"${log_header}
@@ -13151,6 +14804,15 @@ ${log_rev3}
${log_rev2}
${log_trailer}"
+ dotest log-20a "${testcvs} log -r1.2:: file1" \
+"${log_header}
+${log_tags}
+${log_header2}
+total revisions: 5; selected revisions: 1
+description:
+${log_rev3}
+${log_trailer}"
+
dotest log-21 "${testcvs} log -r:1.2 file1" \
"${log_header}
${log_tags}
@@ -13161,6 +14823,15 @@ ${log_rev2}
${log_rev1}
${log_trailer}"
+ dotest log-21a "${testcvs} log -r::1.2 file1" \
+"${log_header}
+${log_tags}
+${log_header2}
+total revisions: 5; selected revisions: 1
+description:
+${log_rev1}
+${log_trailer}"
+
dotest log-22 "${testcvs} log -r1.1:1.2 file1" \
"${log_header}
${log_tags}
@@ -13171,14 +14842,253 @@ ${log_rev2}
${log_rev1}
${log_trailer}"
+ dotest log-22a "${testcvs} log -r1.1::1.2 file1" \
+"${log_header}
+${log_tags}
+${log_header2}
+total revisions: 5; selected revisions: 0
+description:
+${log_trailer}"
+
+ dotest log-22b "${testcvs} log -r1.1::1.3 file1" \
+"${log_header}
+${log_tags}
+${log_header2}
+total revisions: 5; selected revisions: 1
+description:
+${log_rev2}
+${log_trailer}"
+
+ # Now the same tests but with rlog
+
+ dotest log-r11 "${testcvs} rlog first-dir/file1" \
+"${rlog_header}
+${log_tags}
+${log_header2}
+total revisions: 5; selected revisions: 5
+description:
+${log_rev3}
+${log_rev2}
+${log_rev1}
+${log_rev2b}
+${log_rev1b}
+${log_trailer}"
+
+ dotest log-r12 "${testcvs} rlog -N first-dir/file1" \
+"${rlog_header}
+${log_header2}
+total revisions: 5; selected revisions: 5
+description:
+${log_rev3}
+${log_rev2}
+${log_rev1}
+${log_rev2b}
+${log_rev1b}
+${log_trailer}"
+
+ dotest log-r13 "${testcvs} rlog -b first-dir/file1" \
+"${rlog_header}
+${log_tags}
+${log_header2}
+total revisions: 5; selected revisions: 3
+description:
+${log_rev3}
+${log_rev2}
+${log_rev1}
+${log_trailer}"
+
+ dotest log-r14 "${testcvs} rlog -r first-dir/file1" \
+"${rlog_header}
+${log_tags}
+${log_header2}
+total revisions: 5; selected revisions: 1
+description:
+${log_rev3}
+${log_trailer}"
+
+ dotest log-r14a "${testcvs} rlog -rHEAD first-dir/file1" \
+"${rlog_header}
+${log_tags}
+${log_header2}
+total revisions: 5; selected revisions: 1
+description:
+${log_rev3}
+${log_trailer}"
+
+ dotest_fail log-r14b "${testcvs} rlog -r HEAD first-dir/file1" \
+"${PROG} [a-z]*: cannot find module .HEAD. - ignored
+${rlog_header}
+${log_tags}
+${log_header2}
+total revisions: 5; selected revisions: 1
+description:
+${log_rev3}
+${log_trailer}"
+
+ dotest log-r14c "${testcvs} rlog -r: first-dir/file1" \
+"${rlog_header}
+${log_tags}
+${log_header2}
+total revisions: 5; selected revisions: 1
+description:
+${log_rev3}
+${log_trailer}"
+ dotest log-r14d "${testcvs} rlog -r, first-dir/file1" \
+"${rlog_header}
+${log_tags}
+${log_header2}
+total revisions: 5; selected revisions: 1
+description:
+${log_rev3}
+${log_trailer}"
+ dotest log-r14e "${testcvs} rlog -r. first-dir/file1" \
+"${rlog_header}
+${log_tags}
+${log_header2}
+total revisions: 5; selected revisions: 1
+description:
+${log_rev3}
+${log_trailer}"
+ dotest log-r14f "${testcvs} rlog -r:: first-dir/file1" \
+"${rlog_header}
+${log_tags}
+${log_header2}
+total revisions: 5; selected revisions: 0
+description:
+${log_trailer}"
+
+ dotest log-r15 "${testcvs} rlog -r1.2 first-dir/file1" \
+"${rlog_header}
+${log_tags}
+${log_header2}
+total revisions: 5; selected revisions: 1
+description:
+${log_rev2}
+${log_trailer}"
+
+ dotest log-r16 "${testcvs} rlog -r1.2.2 first-dir/file1" \
+"${rlog_header}
+${log_tags}
+${log_header2}
+total revisions: 5; selected revisions: 2
+description:
+${log_rev2b}
+${log_rev1b}
+${log_trailer}"
+
+ dotest log-r17 "${testcvs} rlog -rbranch first-dir/file1" \
+"${rlog_header}
+${log_tags}
+${log_header2}
+total revisions: 5; selected revisions: 2
+description:
+${log_rev2b}
+${log_rev1b}
+${log_trailer}"
+
+ dotest log-r18 "${testcvs} rlog -r1.2.2. first-dir/file1" \
+"${rlog_header}
+${log_tags}
+${log_header2}
+total revisions: 5; selected revisions: 1
+description:
+${log_rev2b}
+${log_trailer}"
+
+ dotest log-r18a "${testcvs} rlog -r1.2.2.2 -r1.3:1.3 first-dir/file1" \
+"${rlog_header}
+${log_tags}
+${log_header2}
+total revisions: 5; selected revisions: 2
+description:
+${log_rev3}
+${log_rev2b}
+${log_trailer}"
+
+ dotest log-r19 "${testcvs} rlog -rbranch. first-dir/file1" \
+"${rlog_header}
+${log_tags}
+${log_header2}
+total revisions: 5; selected revisions: 1
+description:
+${log_rev2b}
+${log_trailer}"
+
+ dotest log-r20 "${testcvs} rlog -r1.2: first-dir/file1" \
+"${rlog_header}
+${log_tags}
+${log_header2}
+total revisions: 5; selected revisions: 2
+description:
+${log_rev3}
+${log_rev2}
+${log_trailer}"
+
+ dotest log-r20a "${testcvs} rlog -r1.2:: first-dir/file1" \
+"${rlog_header}
+${log_tags}
+${log_header2}
+total revisions: 5; selected revisions: 1
+description:
+${log_rev3}
+${log_trailer}"
+
+ dotest log-r21 "${testcvs} rlog -r:1.2 first-dir/file1" \
+"${rlog_header}
+${log_tags}
+${log_header2}
+total revisions: 5; selected revisions: 2
+description:
+${log_rev2}
+${log_rev1}
+${log_trailer}"
+
+ dotest log-r21a "${testcvs} rlog -r::1.2 first-dir/file1" \
+"${rlog_header}
+${log_tags}
+${log_header2}
+total revisions: 5; selected revisions: 1
+description:
+${log_rev1}
+${log_trailer}"
+
+ dotest log-r22 "${testcvs} rlog -r1.1:1.2 first-dir/file1" \
+"${rlog_header}
+${log_tags}
+${log_header2}
+total revisions: 5; selected revisions: 2
+description:
+${log_rev2}
+${log_rev1}
+${log_trailer}"
+
+ dotest log-r22a "${testcvs} rlog -r1.1::1.2 first-dir/file1" \
+"${rlog_header}
+${log_tags}
+${log_header2}
+total revisions: 5; selected revisions: 0
+description:
+${log_trailer}"
+
+ dotest log-r22b "${testcvs} rlog -r1.1::1.3 first-dir/file1" \
+"${rlog_header}
+${log_tags}
+${log_header2}
+total revisions: 5; selected revisions: 1
+description:
+${log_rev2}
+${log_trailer}"
+
+ # Now test outdating revisions
+
dotest log-o0 "${testcvs} admin -o 1.2.2.2:: file1" \
-"RCS file: ${TESTDIR}/cvsroot/first-dir/file1,v
+"RCS file: ${CVSROOT_DIRNAME}/first-dir/file1,v
done"
dotest log-o1 "${testcvs} admin -o ::1.2.2.1 file1" \
-"RCS file: ${TESTDIR}/cvsroot/first-dir/file1,v
+"RCS file: ${CVSROOT_DIRNAME}/first-dir/file1,v
done"
dotest log-o2 "${testcvs} admin -o 1.2.2.1:: file1" \
-"RCS file: ${TESTDIR}/cvsroot/first-dir/file1,v
+"RCS file: ${CVSROOT_DIRNAME}/first-dir/file1,v
deleting revision 1\.2\.2\.2
done"
dotest log-o3 "${testcvs} log file1" \
@@ -13192,6 +15102,17 @@ ${log_rev2}
${log_rev1}
${log_rev1b}
${log_trailer}"
+ dotest log-ro3 "${testcvs} rlog first-dir/file1" \
+"${rlog_header}
+${log_tags}
+${log_header2}
+total revisions: 4; selected revisions: 4
+description:
+${log_rev3}
+${log_rev2}
+${log_rev1}
+${log_rev1b}
+${log_trailer}"
dotest log-o4 "${testcvs} -q update -p -r 1.2.2.1 file1" \
"first branch revision"
cd ..
@@ -13211,18 +15132,18 @@ ${log_trailer}"
"${PROG}"' [a-z]*: scheduling file `file1'\'' for addition
'"${PROG}"' [a-z]*: use .'"${PROG}"' commit. to add this file permanently'
dotest log2-3 "${testcvs} -q commit -m 1" \
-"RCS file: ${TESTDIR}/cvsroot/first-dir/file1,v
+"RCS file: ${CVSROOT_DIRNAME}/first-dir/file1,v
done
Checking in file1;
-${TESTDIR}/cvsroot/first-dir/file1,v <-- file1
+${CVSROOT_DIRNAME}/first-dir/file1,v <-- file1
initial revision: 1\.1
done"
# Setting the file description with add -m doesn't yet work
# client/server, so skip log2-4 for remote.
- if test "x$remote" = xno; then
+ if $remote; then :; else
- dotest log2-4 "${testcvs} log -N file1" "
-RCS file: ${TESTDIR}/cvsroot/first-dir/file1,v
+ dotest log2-4 "${testcvs} log -N file1" "
+RCS file: ${CVSROOT_DIRNAME}/first-dir/file1,v
Working file: file1
head: 1\.1
branch:
@@ -13241,10 +15162,10 @@ date: [0-9/]* [0-9:]*; author: ${username}; state: Exp;
fi # end of tests skipped for remote
dotest log2-5 "${testcvs} admin -t-change-description file1" \
-"RCS file: ${TESTDIR}/cvsroot/first-dir/file1,v
+"RCS file: ${CVSROOT_DIRNAME}/first-dir/file1,v
done"
dotest log2-6 "${testcvs} log -N file1" "
-RCS file: ${TESTDIR}/cvsroot/first-dir/file1,v
+RCS file: ${CVSROOT_DIRNAME}/first-dir/file1,v
Working file: file1
head: 1\.1
branch:
@@ -13263,12 +15184,12 @@ date: [0-9/]* [0-9:]*; author: ${username}; state: Exp;
echo 'longer description' >${TESTDIR}/descrip
echo 'with two lines' >>${TESTDIR}/descrip
dotest log2-7 "${testcvs} admin -t${TESTDIR}/descrip file1" \
-"RCS file: ${TESTDIR}/cvsroot/first-dir/file1,v
+"RCS file: ${CVSROOT_DIRNAME}/first-dir/file1,v
done"
dotest_fail log2-7a "${testcvs} admin -t${TESTDIR}/nonexist file1" \
"${PROG} \[[a-z]* aborted\]: can't stat ${TESTDIR}/nonexist: No such file or directory"
dotest log2-8 "${testcvs} log -N file1" "
-RCS file: ${TESTDIR}/cvsroot/first-dir/file1,v
+RCS file: ${CVSROOT_DIRNAME}/first-dir/file1,v
Working file: file1
head: 1\.1
branch:
@@ -13292,7 +15213,7 @@ date: [0-9/]* [0-9:]*; author: ${username}; state: Exp;
dotest log2-9 "echo change from stdin | ${testcvs} admin -t -q file1" ""
dotest log2-10 "${testcvs} log -N file1" "
-RCS file: ${TESTDIR}/cvsroot/first-dir/file1,v
+RCS file: ${CVSROOT_DIRNAME}/first-dir/file1,v
Working file: file1
head: 1\.1
branch:
@@ -13321,17 +15242,17 @@ date: [0-9/]* [0-9:]*; author: ${username}; state: Exp;
dotest logopt-1 "${testcvs} -q co -l ." ''
mkdir first-dir
dotest logopt-2 "${testcvs} add first-dir" \
-"Directory ${TESTDIR}/cvsroot/first-dir added to the repository"
+"Directory ${CVSROOT_DIRNAME}/first-dir added to the repository"
cd first-dir
echo hi >file1
dotest logopt-3 "${testcvs} add file1" \
"${PROG} [a-z]*: scheduling file .file1. for addition
${PROG} [a-z]*: use .${PROG} commit. to add this file permanently"
dotest logopt-4 "${testcvs} -q ci -m add file1" \
-"RCS file: ${TESTDIR}/cvsroot/first-dir/file1,v
+"RCS file: ${CVSROOT_DIRNAME}/first-dir/file1,v
done
Checking in file1;
-${TESTDIR}/cvsroot/first-dir/file1,v <-- file1
+${CVSROOT_DIRNAME}/first-dir/file1,v <-- file1
initial revision: 1\.1
done"
cd ..
@@ -13339,19 +15260,19 @@ done"
dotest logopt-5 "${testcvs} log -R -d 2038-01-01" \
"${PROG} [a-z]*: Logging \.
${PROG} [a-z]*: Logging first-dir
-${TESTDIR}/cvsroot/first-dir/file1,v"
+${CVSROOT_DIRNAME}/first-dir/file1,v"
dotest logopt-6 "${testcvs} log -d 2038-01-01 -R" \
"${PROG} [a-z]*: Logging \.
${PROG} [a-z]*: Logging first-dir
-${TESTDIR}/cvsroot/first-dir/file1,v"
+${CVSROOT_DIRNAME}/first-dir/file1,v"
dotest logopt-6a "${testcvs} log -Rd 2038-01-01" \
"${PROG} [a-z]*: Logging \.
${PROG} [a-z]*: Logging first-dir
-${TESTDIR}/cvsroot/first-dir/file1,v"
+${CVSROOT_DIRNAME}/first-dir/file1,v"
dotest logopt-7 "${testcvs} log -s Exp -R" \
"${PROG} [a-z]*: Logging \.
${PROG} [a-z]*: Logging first-dir
-${TESTDIR}/cvsroot/first-dir/file1,v"
+${CVSROOT_DIRNAME}/first-dir/file1,v"
cd ..
rm -r 1
@@ -13367,7 +15288,7 @@ ${TESTDIR}/cvsroot/first-dir/file1,v"
dotest ann-1 "${testcvs} -q co -l ." ''
mkdir first-dir
dotest ann-2 "${testcvs} add first-dir" \
-"Directory ${TESTDIR}/cvsroot/first-dir added to the repository"
+"Directory ${CVSROOT_DIRNAME}/first-dir added to the repository"
cd first-dir
cat >file1 <<EOF
this
@@ -13380,10 +15301,10 @@ EOF
"${PROG} [a-z]*: scheduling file .file1. for addition
${PROG} [a-z]*: use .${PROG} commit. to add this file permanently"
dotest ann-4 "${testcvs} -q ci -m add file1" \
-"RCS file: ${TESTDIR}/cvsroot/first-dir/file1,v
+"RCS file: ${CVSROOT_DIRNAME}/first-dir/file1,v
done
Checking in file1;
-${TESTDIR}/cvsroot/first-dir/file1,v <-- file1
+${CVSROOT_DIRNAME}/first-dir/file1,v <-- file1
initial revision: 1\.1
done"
cat >file1 <<EOF
@@ -13399,7 +15320,7 @@ line
EOF
dotest ann-5 "${testcvs} -q ci -m modify file1" \
"Checking in file1;
-${TESTDIR}/cvsroot/first-dir/file1,v <-- file1
+${CVSROOT_DIRNAME}/first-dir/file1,v <-- file1
new revision: 1\.2; previous revision: 1\.1
done"
dotest ann-6 "${testcvs} -q tag -b br" "T file1"
@@ -13416,7 +15337,7 @@ line
EOF
dotest ann-7 "${testcvs} -q ci -m modify file1" \
"Checking in file1;
-${TESTDIR}/cvsroot/first-dir/file1,v <-- file1
+${CVSROOT_DIRNAME}/first-dir/file1,v <-- file1
new revision: 1\.3; previous revision: 1\.2
done"
dotest ann-8 "${testcvs} -q update -r br" "[UP] file1"
@@ -13435,7 +15356,7 @@ branched content
EOF
dotest ann-9 "${testcvs} -q ci -m modify" \
"Checking in file1;
-${TESTDIR}/cvsroot/first-dir/file1,v <-- file1
+${CVSROOT_DIRNAME}/first-dir/file1,v <-- file1
new revision: 1\.2\.2\.1; previous revision: 1\.2
done"
# Note that this annotates the trunk despite the presence
@@ -13487,8 +15408,54 @@ done"
dotest_fail ann-14 "${testcvs} ann -r bill-clintons-chastity file1" \
"${PROG} \[[a-z]* aborted\]: no such tag bill-clintons-chastity"
+ # Now get rid of the working directory and test rannotate
+
cd ../..
rm -r 1
+ dotest ann-r10 "${testcvs} rann first-dir" \
+"Annotations for first-dir/file1
+\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*
+1\.1 (${username} *[0-9a-zA-Z-]*): this
+1\.1 (${username} *[0-9a-zA-Z-]*): is
+1\.2 (${username} *[0-9a-zA-Z-]*): a
+1\.3 (${username} *[0-9a-zA-Z-]*): trunk file
+1\.2 (${username} *[0-9a-zA-Z-]*):
+1\.2 (${username} *[0-9a-zA-Z-]*): with
+1\.2 (${username} *[0-9a-zA-Z-]*): a
+1\.2 (${username} *[0-9a-zA-Z-]*): blank
+1\.2 (${username} *[0-9a-zA-Z-]*): line"
+ dotest ann-r11 "${testcvs} rann -r br first-dir" \
+"Annotations for first-dir/file1
+\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*
+1\.1 (${username} *[0-9a-zA-Z-]*): this
+1\.1 (${username} *[0-9a-zA-Z-]*): is
+1\.2 (${username} *[0-9a-zA-Z-]*): a
+1\.1 (${username} *[0-9a-zA-Z-]*): file
+1\.2 (${username} *[0-9a-zA-Z-]*):
+1\.2 (${username} *[0-9a-zA-Z-]*): with
+1\.2 (${username} *[0-9a-zA-Z-]*): a
+1\.2 (${username} *[0-9a-zA-Z-]*): blank
+1\.2 (${username} *[0-9a-zA-Z-]*): line
+1\.2\.2\.1 (${username} *[0-9a-zA-Z-]*): and some
+1\.2\.2\.1 (${username} *[0-9a-zA-Z-]*): branched content"
+ dotest ann-r12 "${testcvs} rann -r 1.2.0.2 first-dir/file1" ""
+ dotest ann-r13 "${testcvs} rann -r 1.2.2 first-dir/file1" \
+"Annotations for first-dir/file1
+\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*
+1\.1 (${username} *[0-9a-zA-Z-]*): this
+1\.1 (${username} *[0-9a-zA-Z-]*): is
+1\.2 (${username} *[0-9a-zA-Z-]*): a
+1\.1 (${username} *[0-9a-zA-Z-]*): file
+1\.2 (${username} *[0-9a-zA-Z-]*):
+1\.2 (${username} *[0-9a-zA-Z-]*): with
+1\.2 (${username} *[0-9a-zA-Z-]*): a
+1\.2 (${username} *[0-9a-zA-Z-]*): blank
+1\.2 (${username} *[0-9a-zA-Z-]*): line
+1\.2\.2\.1 (${username} *[0-9a-zA-Z-]*): and some
+1\.2\.2\.1 (${username} *[0-9a-zA-Z-]*): branched content"
+ dotest_fail ann-r14 "${testcvs} rann -r bill-clintons-chastity first-dir/file1" \
+"${PROG} \[[a-z]* aborted\]: no such tag bill-clintons-chastity"
+
rm -rf ${CVSROOT_DIRNAME}/first-dir
;;
@@ -13502,7 +15469,7 @@ done"
module=x
mkdir $module
dotest ann-id-2 "${testcvs} add $module" \
-"Directory ${TESTDIR}/cvsroot/$module added to the repository"
+"Directory ${CVSROOT_DIRNAME}/$module added to the repository"
cd $module
file=m
@@ -13512,17 +15479,17 @@ done"
"${PROG} [a-z]*: scheduling file .$file. for addition
${PROG} [a-z]*: use .${PROG} commit. to add this file permanently"
dotest ann-id-4 "$testcvs -Q ci -m . $file" \
-"RCS file: ${TESTDIR}/cvsroot/$module/$file,v
+"RCS file: ${CVSROOT_DIRNAME}/$module/$file,v
done
Checking in $file;
-${TESTDIR}/cvsroot/$module/$file,v <-- $file
+${CVSROOT_DIRNAME}/$module/$file,v <-- $file
initial revision: 1\.1
done"
echo line2 >> $file
dotest ann-id-5 "$testcvs -Q ci -m . $file" \
"Checking in $file;
-${TESTDIR}/cvsroot/$module/$file,v <-- $file
+${CVSROOT_DIRNAME}/$module/$file,v <-- $file
new revision: 1\.2; previous revision: 1\.1
done"
@@ -13546,7 +15513,36 @@ done"
# Because this test is all about -d options and such, it
# at least to some extent needs to be different for remote vs.
# local.
- if test "x$remote" = "xno"; then
+ if $remote; then
+
+ # For remote, just create the repository. We don't yet do
+ # the various other tests above for remote but that should be
+ # changed.
+ mkdir crerepos
+ mkdir crerepos/CVSROOT
+
+ # Use :ext: rather than :fork:. Most of the tests use :fork:,
+ # so we want to make sure that we test :ext: _somewhere_.
+
+ # Maybe a bit dubious in the sense that people need to
+ # have rsh working to run the tests, but at least it
+ # isn't inetd :-). Might want to think harder about this -
+ # maybe try :ext:, and if it fails, print a (single, nice)
+ # message and fall back to :fork:. Maybe testing :ext:
+ # with our own CVS_RSH rather than worrying about a system one
+ # would do the trick.
+
+ # Note that we set CVS_SERVER at the beginning.
+ CREREPOS_ROOT=:ext:`hostname`:${TESTDIR}/crerepos
+
+ # If we're going to do remote testing, make sure 'rsh' works first.
+ host="`hostname`"
+ if test "x`${CVS_RSH-rsh} $host -n 'echo hi'`" != "xhi"; then
+ echo "ERROR: cannot test remote CVS, because \`${CVS_RSH-rsh} $host' fails." >&2
+ exit 1
+ fi
+
+ else
# First, if the repository doesn't exist at all...
dotest_fail crerepos-1 \
@@ -13587,65 +15583,47 @@ ${testcvs} -d ${TESTDIR}/crerepos release -d CVSROOT >>${LOGFILE}; then
CREREPOS_ROOT=${TESTDIR}/crerepos
- else
- # For remote, just create the repository. We don't yet do
- # the various other tests above for remote but that should be
- # changed.
- mkdir crerepos
- mkdir crerepos/CVSROOT
-
- # Use :ext: rather than :fork:. Most of the tests use :fork:,
- # so we want to make sure that we test :ext: _somewhere_.
-
- # Maybe a bit dubious in the sense that people need to
- # have rsh working to run the tests, but at least it
- # isn't inetd :-). Might want to think harder about this -
- # maybe try :ext:, and if it fails, print a (single, nice)
- # message and fall back to :fork:. Maybe testing :ext:
- # with our own CVS_RSH rather than worrying about a system one
- # would do the trick.
-
- # Note that we set CVS_SERVER at the beginning.
- CREREPOS_ROOT=:ext:`hostname`:${TESTDIR}/crerepos
-
- # If we're going to do remote testing, make sure 'rsh' works first.
- host="`hostname`"
- if test "x`${CVS_RSH-rsh} $host -n 'echo hi'`" != "xhi"; then
- echo "ERROR: cannot test remote CVS, because \`rsh $host' fails." >&2
- exit 1
- fi
fi
- if test "x$remote" = "xno"; then
+ if $remote; then
# Test that CVS rejects a relative path in CVSROOT.
mkdir 1; cd 1
- dotest_fail crerepos-6a "${testcvs} -q -d ../crerepos get ." \
-"${PROG} \[[a-z]* aborted\]: CVSROOT ../crerepos must be an absolute pathname"
+ # Note that having the client reject the pathname (as :fork:
+ # does), does _not_ test for the bugs we are trying to catch
+ # here. The point is that malicious clients might send all
+ # manner of things and the server better protect itself.
+ dotest_fail crerepos-6a-r \
+"${testcvs} -q -d :ext:`hostname`:../crerepos get ." \
+"${PROG} [a-z]*: CVSROOT (\":ext:${hostname}:\.\./crerepos\")
+${PROG} [a-z]*: may only specify a positive, non-zero, integer port (not \"\.\.\")\.
+${PROG} [a-z]*: perhaps you entered a relative pathname${QUESTION}
+${PROG} \[[a-z]* aborted\]: Bad CVSROOT\."
cd ..
rm -r 1
mkdir 1; cd 1
- dotest_fail crerepos-6b "${testcvs} -d crerepos init" \
-"${PROG} \[[a-z]* aborted\]: CVSROOT crerepos must be an absolute pathname"
+ dotest_fail crerepos-6b-r \
+"${testcvs} -d :ext:`hostname`:crerepos init" \
+"${PROG} [a-z]*: CVSROOT (\":ext:${hostname}:crerepos\")
+${PROG} [a-z]*: requires a path spec
+${PROG} [a-z]*: :(gserver|kserver|pserver):\[\[user\]\[:password\]@\]host\[:\[port\]\]/path
+${PROG} [a-z]*: \[:(ext|server):\]\[\[user\]@\]host\[:\]/path
+${PROG} \[[a-z]* aborted\]: Bad CVSROOT\."
cd ..
rm -r 1
- else # remote
+ else # local
# Test that CVS rejects a relative path in CVSROOT.
mkdir 1; cd 1
- # Note that having the client reject the pathname (as :fork:
- # does), does _not_ test for the bugs we are trying to catch
- # here. The point is that malicious clients might send all
- # manner of things and the server better protect itself.
- dotest_fail crerepos-6a \
-"${testcvs} -q -d :ext:`hostname`:../crerepos get ." \
-"Root ../crerepos must be an absolute pathname"
+ # piping the output of this test to /dev/null since we have no way of knowing
+ # what error messages different rsh implementations will output.
+ dotest_fail crerepos-6a "${testcvs} -q -d ../crerepos get . >/dev/null 2>&1" ""
cd ..
rm -r 1
mkdir 1; cd 1
- dotest_fail crerepos-6b \
-"${testcvs} -d :ext:`hostname`:crerepos init" \
-"Root crerepos must be an absolute pathname"
+ dotest_fail crerepos-6b "${testcvs} -d crerepos init" \
+"${PROG} [a-z]*: CVSROOT \"crerepos\" must be an absolute pathname
+${PROG} \[[a-z]* aborted\]: Bad CVSROOT\."
cd ..
rm -r 1
fi # end of tests to be skipped for remote
@@ -13662,17 +15640,17 @@ ${testcvs} -d ${TESTDIR}/crerepos release -d CVSROOT >>${LOGFILE}; then
dotest crerepos-8 "${testcvs} -q co -l ." ''
mkdir first-dir
dotest crerepos-9 "${testcvs} add first-dir" \
-"Directory ${TESTDIR}/cvsroot/first-dir added to the repository"
+"Directory ${CVSROOT_DIRNAME}/first-dir added to the repository"
cd first-dir
touch file1
dotest crerepos-10 "${testcvs} add file1" \
"${PROG} [a-z]*: scheduling file .file1. for addition
${PROG} [a-z]*: use .${PROG} commit. to add this file permanently"
dotest crerepos-11 "${testcvs} -q ci -m add-it" \
-"RCS file: ${TESTDIR}/cvsroot/first-dir/file1,v
+"RCS file: ${CVSROOT_DIRNAME}/first-dir/file1,v
done
Checking in file1;
-${TESTDIR}/cvsroot/first-dir/file1,v <-- file1
+${CVSROOT_DIRNAME}/first-dir/file1,v <-- file1
initial revision: 1\.1
done"
cd ../..
@@ -13711,7 +15689,7 @@ ${PROG} [a-z]*: Updating crerepos-dir"
cd ..
- if test "$keep" = yes; then
+ if $keep; then
echo Keeping ${TESTDIR} and exiting due to --keep
exit 0
fi
@@ -13820,7 +15798,7 @@ EOF
dotest rcs-1 "${testcvs} -q co first-dir" 'U first-dir/file1'
cd first-dir
dotest rcs-2 "${testcvs} -q log" "
-RCS file: ${TESTDIR}/cvsroot/first-dir/file1,v
+RCS file: ${CVSROOT_DIRNAME}/first-dir/file1,v
Working file: file1
head: 1\.3
branch:
@@ -13854,7 +15832,7 @@ add file1
# ISO8601 format. There are many, many, other variations
# specified by ISO8601 which we should be testing too.
dotest rcs-3 "${testcvs} -q log -d '1996-12-11<'" "
-RCS file: ${TESTDIR}/cvsroot/first-dir/file1,v
+RCS file: ${CVSROOT_DIRNAME}/first-dir/file1,v
Working file: file1
head: 1\.3
branch:
@@ -13874,7 +15852,7 @@ delete second line; modify twelfth line
# RFC822 format (as amended by RFC1123).
dotest rcs-4 "${testcvs} -q log -d '<3 Apr 2000 00:00'" \
"
-RCS file: ${TESTDIR}/cvsroot/first-dir/file1,v
+RCS file: ${CVSROOT_DIRNAME}/first-dir/file1,v
Working file: file1
head: 1\.3
branch:
@@ -13966,13 +15944,13 @@ EOF
echo "next branch revision" > file2
dotest rcs-6b "${testcvs} -q ci -m mod file2" \
"Checking in file2;
-${TESTDIR}/cvsroot/first-dir/file2,v <-- file2
+${CVSROOT_DIRNAME}/first-dir/file2,v <-- file2
new revision: 1\.2\.6\.2; previous revision: 1\.2\.6\.1
done"
# Now get rid of the default branch, it will get in the way.
dotest rcs-7 "${testcvs} admin -b file2" \
-"RCS file: ${TESTDIR}/cvsroot/first-dir/file2,v
+"RCS file: ${CVSROOT_DIRNAME}/first-dir/file2,v
done"
# But we do want to make sure that "cvs admin" leaves the newphrases
# in the file.
@@ -14118,7 +16096,7 @@ next branch revision
# OK, now make sure cvs log doesn't have any trouble with the
# newphrases and such.
dotest rcs-14 "${testcvs} -q log file2" "
-RCS file: ${TESTDIR}/cvsroot/first-dir/file2,v
+RCS file: ${CVSROOT_DIRNAME}/first-dir/file2,v
Working file: file2
head: 1\.5
branch:
@@ -14304,14 +16282,14 @@ EOF
# question one way or the other (it has a grammar but almost
# nothing about lexical analysis).
dotest_fail rcs3-1 "${testcvs} -q co first-dir" \
-"${PROG} \[[a-z]* aborted\]: EOF while looking for value in RCS file ${TESTDIR}/cvsroot/first-dir/file1,v"
+"${PROG} \[[a-z]* aborted\]: EOF while looking for value in RCS file ${CVSROOT_DIRNAME}/first-dir/file1,v"
cat <<EOF >${CVSROOT_DIRNAME}/first-dir/file1,v
head 1.1; access; symbols; locks; expand o; 1.1 date 2007.03.20.04.03.02
; author jeremiah ;state ; branches; next;desc @@1.1log@@text@head@
EOF
# Whitespace issues, likewise.
dotest_fail rcs3-2 "${testcvs} -q co first-dir" \
-"${PROG} \[[a-z]* aborted\]: unexpected '.x6c' reading revision number in RCS file ${TESTDIR}/cvsroot/first-dir/file1,v"
+"${PROG} \[[a-z]* aborted\]: unexpected '.x6c' reading revision number in RCS file ${CVSROOT_DIRNAME}/first-dir/file1,v"
cat <<EOF >${CVSROOT_DIRNAME}/first-dir/file1,v
head 1.1; access; symbols; locks; expand o; 1.1 date 2007.03.20.04.03.02
; author jeremiah ;state ; branches; next;desc @@1.1 log@@text@head@
@@ -14319,7 +16297,7 @@ EOF
# Charming array of different messages for similar
# whitespace issues (depending on where the whitespace is).
dotest_fail rcs3-3 "${testcvs} -q co first-dir" \
-"${PROG} \[[a-z]* aborted\]: EOF while looking for value in RCS file ${TESTDIR}/cvsroot/first-dir/file1,v"
+"${PROG} \[[a-z]* aborted\]: EOF while looking for value in RCS file ${CVSROOT_DIRNAME}/first-dir/file1,v"
cat <<EOF >${CVSROOT_DIRNAME}/first-dir/file1,v
head 1.1; access; symbols; locks; expand o; 1.1 date 2007.03.20.04.03.02
; author jeremiah ;state ; branches; next;desc @@1.1 log @@text @head@
@@ -14338,13 +16316,13 @@ EOF
# See remote code above for rationale for cd.
cd first-dir
dotest rcs3-6 "${testcvs} log -R file1" \
-"${TESTDIR}/cvsroot/first-dir/file1,v"
+"${CVSROOT_DIRNAME}/first-dir/file1,v"
# OK, now put an extraneous '\0' at the end.
${AWK} </dev/null 'BEGIN { printf "@%c", 10 }' | ${TR} '@' '\000' \
>>${CVSROOT_DIRNAME}/first-dir/file1,v
dotest_fail rcs3-7 "${testcvs} log -s nostate file1" \
-"${PROG} \[[a-z]* aborted\]: unexpected '.x0' reading revision number in RCS file ${TESTDIR}/cvsroot/first-dir/file1,v"
+"${PROG} \[[a-z]* aborted\]: unexpected '.x0' reading revision number in RCS file ${CVSROOT_DIRNAME}/first-dir/file1,v"
cd ../..
rm -r 1
@@ -14373,7 +16351,7 @@ EOF
echo "LockDir=${TESTDIR}/locks" >config
dotest lockfiles-4 "${testcvs} -q ci -m config-it" \
"Checking in config;
-${TESTDIR}/cvsroot/CVSROOT/config,v <-- config
+${CVSROOT_DIRNAME}/CVSROOT/config,v <-- config
new revision: 1\.[0-9]*; previous revision: 1\.[0-9]*
done
${PROG} [a-z]*: Rebuilding administrative file database"
@@ -14410,7 +16388,7 @@ ${PROG} \[[a-z]* aborted\]: cannot stat ${TESTDIR}/locks: No such file or direct
echo "# nobody here but us comments" >config
dotest lockfiles-cleanup-1 "${testcvs} -q ci -m config-it" \
"Checking in config;
-${TESTDIR}/cvsroot/CVSROOT/config,v <-- config
+${CVSROOT_DIRNAME}/CVSROOT/config,v <-- config
new revision: 1\.[0-9]*; previous revision: 1\.[0-9]*
done
${PROG} [a-z]*: Rebuilding administrative file database"
@@ -14450,25 +16428,25 @@ ${PROG} [a-z]*: Rebuilding administrative file database"
dotest backuprecover-1 "${testcvs} -q co -l ." ''
mkdir first-dir
dotest backuprecover-2 "${testcvs} add first-dir" \
-"Directory ${TESTDIR}/cvsroot/first-dir added to the repository"
+"Directory ${CVSROOT_DIRNAME}/first-dir added to the repository"
cd first-dir
mkdir dir
dotest backuprecover-3 "${testcvs} add dir" \
-"Directory ${TESTDIR}/cvsroot/first-dir/dir added to the repository"
+"Directory ${CVSROOT_DIRNAME}/first-dir/dir added to the repository"
touch file1 dir/file2
dotest backuprecover-4 "${testcvs} -q add file1 dir/file2" \
"${PROG} [a-z]*: use '${PROG} commit' to add these files permanently"
dotest backuprecover-5 "${testcvs} -q ci -mtest" \
-"RCS file: ${TESTDIR}/cvsroot/first-dir/file1,v
+"RCS file: ${CVSROOT_DIRNAME}/first-dir/file1,v
done
Checking in file1;
-${TESTDIR}/cvsroot/first-dir/file1,v <-- file1
+${CVSROOT_DIRNAME}/first-dir/file1,v <-- file1
initial revision: 1\.1
done
-RCS file: ${TESTDIR}/cvsroot/first-dir/dir/file2,v
+RCS file: ${CVSROOT_DIRNAME}/first-dir/dir/file2,v
done
Checking in dir/file2;
-${TESTDIR}/cvsroot/first-dir/dir/file2,v <-- file2
+${CVSROOT_DIRNAME}/first-dir/dir/file2,v <-- file2
initial revision: 1\.1
done"
echo "Line one" >>file1
@@ -14485,11 +16463,11 @@ done"
echo " God only knows" >>dir/file2
dotest backuprecover-6 "${testcvs} -q ci -mtest" \
"Checking in file1;
-${TESTDIR}/cvsroot/first-dir/file1,v <-- file1
+${CVSROOT_DIRNAME}/first-dir/file1,v <-- file1
new revision: 1\.2; previous revision: 1\.1
done
Checking in dir/file2;
-${TESTDIR}/cvsroot/first-dir/dir/file2,v <-- file2
+${CVSROOT_DIRNAME}/first-dir/dir/file2,v <-- file2
new revision: 1\.2; previous revision: 1\.1
done"
@@ -14499,8 +16477,8 @@ done"
mkdir 2; cd 2
dotest backuprecover-7 "${testcvs} -Q co first-dir" ''
cd first-dir
- sed -e"s/looks like/just looks like/" file1 >tmp; mv tmp file1
- sed -e"s/don't use/don't just use/" dir/file2 >tmp; mv tmp dir/file2
+ sed -e "s/looks like/just looks like/" file1 >tmp; mv tmp file1
+ sed -e "s/don't use/don't just use/" dir/file2 >tmp; mv tmp dir/file2
# developer 1 is on a roll
cd ../../1/first-dir
@@ -14512,16 +16490,16 @@ done"
echo " a word that fits here would be something like dials" >>dir/file2
dotest backuprecover-8 "${testcvs} -q ci -mtest" \
"Checking in file1;
-${TESTDIR}/cvsroot/first-dir/file1,v <-- file1
+${CVSROOT_DIRNAME}/first-dir/file1,v <-- file1
new revision: 1\.3; previous revision: 1\.2
done
Checking in dir/file2;
-${TESTDIR}/cvsroot/first-dir/dir/file2,v <-- file2
+${CVSROOT_DIRNAME}/first-dir/dir/file2,v <-- file2
new revision: 1\.3; previous revision: 1\.2
done"
# Save a backup copy
- cp -r ${TESTDIR}/cvsroot/first-dir ${TESTDIR}/cvsroot/backup
+ cp -r ${CVSROOT_DIRNAME}/first-dir ${TESTDIR}/cvsroot/backup
# Simulate developer 3
cd ../..
@@ -14536,11 +16514,11 @@ done"
echo " I think you should quit and get a job in the foundry" >>dir/file2
dotest backuprecover-9b "${testcvs} -q ci -mtest" \
"Checking in file1;
-${TESTDIR}/cvsroot/first-dir/file1,v <-- file1
+${CVSROOT_DIRNAME}/first-dir/file1,v <-- file1
new revision: 1\.4; previous revision: 1\.3
done
Checking in dir/file2;
-${TESTDIR}/cvsroot/first-dir/dir/file2,v <-- file2
+${CVSROOT_DIRNAME}/first-dir/dir/file2,v <-- file2
new revision: 1\.4; previous revision: 1\.3
done"
@@ -14549,7 +16527,7 @@ done"
mkdir 4; cd 4
dotest backuprecover-10 "${testcvs} -Q co first-dir" ''
cd first-dir
- sed -e"s/quit and/be fired so he can/" dir/file2 >tmp; mv tmp dir/file2
+ sed -e "s/quit and/be fired so he can/" dir/file2 >tmp; mv tmp dir/file2
# And back to developer 1
cd ../../1/first-dir
@@ -14566,21 +16544,21 @@ done"
echo " once you find what's in store!" >>dir/file2
dotest backuprecover-12 "${testcvs} -q ci -mtest" \
"Checking in file1;
-${TESTDIR}/cvsroot/first-dir/file1,v <-- file1
+${CVSROOT_DIRNAME}/first-dir/file1,v <-- file1
new revision: 1\.5; previous revision: 1\.4
done
Checking in dir/file2;
-${TESTDIR}/cvsroot/first-dir/dir/file2,v <-- file2
+${CVSROOT_DIRNAME}/first-dir/dir/file2,v <-- file2
new revision: 1\.5; previous revision: 1\.4
done"
# developer 3'll do a bit of work that never gets checked in
cd ../../3/first-dir
dotest backuprecover-13 "${testcvs} -Q update" ''
- sed -e"s/very/some extremely/" file1 >tmp; mv tmp file1
+ sed -e "s/very/some extremely/" file1 >tmp; mv tmp file1
dotest backuprecover-14 "${testcvs} -q ci -mtest" \
"Checking in file1;
-${TESTDIR}/cvsroot/first-dir/file1,v <-- file1
+${CVSROOT_DIRNAME}/first-dir/file1,v <-- file1
new revision: 1\.6; previous revision: 1\.5
done"
echo >>file1
@@ -14591,8 +16569,8 @@ done"
echo " You've got an ill, and I have the cure!" >>dir/file2
# Slag the original and restore it a few revisions back
- rm -rf ${TESTDIR}/cvsroot/first-dir
- mv ${TESTDIR}/cvsroot/backup ${TESTDIR}/cvsroot/first-dir
+ rm -rf ${CVSROOT_DIRNAME}/first-dir
+ mv ${CVSROOT_DIRNAME}/backup ${TESTDIR}/cvsroot/first-dir
# Have developer 1 try an update and lose some data
#
@@ -14610,7 +16588,7 @@ U dir/file2"
cd ../../3/first-dir
dotest_fail backuprecover-16 "${testcvs} update" \
"${PROG} [a-z]*: Updating \.
-${PROG} \[[a-z]* aborted\]: could not find desired version 1\.6 in ${TESTDIR}/cvsroot/first-dir/file1,v"
+${PROG} \[[a-z]* aborted\]: could not find desired version 1\.6 in ${CVSROOT_DIRNAME}/first-dir/file1,v"
# create our workspace fixin' script
cd ../..
@@ -14645,11 +16623,11 @@ done" >fixit
cd first-dir
dotest backuprecover-19 "${testcvs} -q ci -mrecover/merge" \
"Checking in file1;
-${TESTDIR}/cvsroot/first-dir/file1,v <-- file1
+${CVSROOT_DIRNAME}/first-dir/file1,v <-- file1
new revision: 1\.4; previous revision: 1\.3
done
Checking in dir/file2;
-${TESTDIR}/cvsroot/first-dir/dir/file2,v <-- file2
+${CVSROOT_DIRNAME}/first-dir/dir/file2,v <-- file2
new revision: 1\.4; previous revision: 1\.3
done"
@@ -14657,7 +16635,7 @@ done"
cd ../../4/first-dir
dotest backuprecover-20 "${testcvs} update" \
"${PROG} [a-z]*: Updating \.
-RCS file: ${TESTDIR}/cvsroot/first-dir/file1,v
+RCS file: ${CVSROOT_DIRNAME}/first-dir/file1,v
retrieving revision 1\.3
retrieving revision 1\.4
Merging differences between 1\.3 and 1\.4 into file1
@@ -14665,7 +16643,7 @@ rcsmerge: warning: conflicts during merge
${PROG} [a-z]*: conflicts found in file1
C file1
${PROG} [a-z]*: Updating dir
-RCS file: ${TESTDIR}/cvsroot/first-dir/dir/file2,v
+RCS file: ${CVSROOT_DIRNAME}/first-dir/dir/file2,v
retrieving revision 1\.3
retrieving revision 1\.4
Merging differences between 1\.3 and 1\.4 into file2
@@ -14681,28 +16659,28 @@ C dir/file2"
s/quit and/be fired so he can/" dir/file2 >tmp; mv tmp dir/file2
dotest backuprecover-21 "${testcvs} -q ci -mrecover/merge" \
"Checking in dir/file2;
-${TESTDIR}/cvsroot/first-dir/dir/file2,v <-- file2
+${CVSROOT_DIRNAME}/first-dir/dir/file2,v <-- file2
new revision: 1\.5; previous revision: 1\.4
done"
# go back and commit developer 2's stuff to prove it can still be done
cd ../../2/first-dir
dotest backuprecover-22 "${testcvs} -Q update" \
-"RCS file: ${TESTDIR}/cvsroot/first-dir/file1,v
+"RCS file: ${CVSROOT_DIRNAME}/first-dir/file1,v
retrieving revision 1\.2
retrieving revision 1\.4
Merging differences between 1\.2 and 1\.4 into file1
-RCS file: ${TESTDIR}/cvsroot/first-dir/dir/file2,v
+RCS file: ${CVSROOT_DIRNAME}/first-dir/dir/file2,v
retrieving revision 1\.2
retrieving revision 1\.5
Merging differences between 1\.2 and 1\.5 into file2"
dotest backuprecover-23 "${testcvs} -q ci -mtest" \
"Checking in file1;
-${TESTDIR}/cvsroot/first-dir/file1,v <-- file1
+${CVSROOT_DIRNAME}/first-dir/file1,v <-- file1
new revision: 1\.5; previous revision: 1\.4
done
Checking in dir/file2;
-${TESTDIR}/cvsroot/first-dir/dir/file2,v <-- file2
+${CVSROOT_DIRNAME}/first-dir/dir/file2,v <-- file2
new revision: 1\.6; previous revision: 1\.5
done"
@@ -14829,10 +16807,10 @@ O 1997-06-06 08:12 ${PLUS}0000 kingdon ccvs =ccvs= <remote>/\*"
"${PROG} [a-z]*: scheduling file .file1. for addition
${PROG} [a-z]*: use .${PROG} commit. to add this file permanently"
dotest big-3 "${testcvs} -q ci -m add" \
-"RCS file: ${TESTDIR}/cvsroot/first-dir/file1,v
+"RCS file: ${CVSROOT_DIRNAME}/first-dir/file1,v
done
Checking in file1;
-${TESTDIR}/cvsroot/first-dir/file1,v <-- file1
+${CVSROOT_DIRNAME}/first-dir/file1,v <-- file1
initial revision: 1\.1
done"
cd ..
@@ -14843,7 +16821,7 @@ done"
echo "add a line to the end" >>file1
dotest big-5 "${testcvs} -q ci -m modify" \
"Checking in file1;
-${TESTDIR}/cvsroot/first-dir/file1,v <-- file1
+${CVSROOT_DIRNAME}/first-dir/file1,v <-- file1
new revision: 1\.2; previous revision: 1\.1
done"
cd ../2/first-dir
@@ -14852,7 +16830,7 @@ done"
dotest big-6 "${testcvs} -q update" "[UP] file1"
cd ../..
- if test "$keep" = yes; then
+ if $keep; then
echo Keeping ${TESTDIR} and exiting due to --keep
exit 0
fi
@@ -14879,20 +16857,20 @@ done"
dotest modes-1 "${testcvs} -q co -l ." ''
mkdir first-dir
dotest modes-2 "${testcvs} add first-dir" \
-"Directory ${TESTDIR}/cvsroot/first-dir added to the repository"
+"Directory ${CVSROOT_DIRNAME}/first-dir added to the repository"
cd first-dir
touch aa
dotest modes-3 "${testcvs} add aa" \
"${PROG} [a-z]*: scheduling file .aa. for addition
${PROG} [a-z]*: use .${PROG} commit. to add this file permanently"
dotest modes-4 "${testcvs} -q ci -m add" \
-"RCS file: ${TESTDIR}/cvsroot/first-dir/aa,v
+"RCS file: ${CVSROOT_DIRNAME}/first-dir/aa,v
done
Checking in aa;
-${TESTDIR}/cvsroot/first-dir/aa,v <-- aa
+${CVSROOT_DIRNAME}/first-dir/aa,v <-- aa
initial revision: 1\.1
done"
- dotest modes-5 "ls -l ${TESTDIR}/cvsroot/first-dir/aa,v" \
+ dotest modes-5 "ls -l ${CVSROOT_DIRNAME}/first-dir/aa,v" \
"-r--r--r-- .*"
# Test for whether we can set the execute bit.
@@ -14900,24 +16878,24 @@ done"
echo change it >>aa
dotest modes-6 "${testcvs} -q ci -m set-execute-bit" \
"Checking in aa;
-${TESTDIR}/cvsroot/first-dir/aa,v <-- aa
+${CVSROOT_DIRNAME}/first-dir/aa,v <-- aa
new revision: 1\.2; previous revision: 1\.1
done"
# If CVS let us update the execute bit, it would be set here.
# But it doesn't, and as far as I know that is longstanding
# CVS behavior.
- dotest modes-7 "ls -l ${TESTDIR}/cvsroot/first-dir/aa,v" \
+ dotest modes-7 "ls -l ${CVSROOT_DIRNAME}/first-dir/aa,v" \
"-r--r--r-- .*"
# OK, now manually change the modes and see what happens.
- chmod g=r,o= ${TESTDIR}/cvsroot/first-dir/aa,v
+ chmod g=r,o= ${CVSROOT_DIRNAME}/first-dir/aa,v
echo second line >>aa
dotest modes-7a "${testcvs} -q ci -m set-execute-bit" \
"Checking in aa;
-${TESTDIR}/cvsroot/first-dir/aa,v <-- aa
+${CVSROOT_DIRNAME}/first-dir/aa,v <-- aa
new revision: 1\.3; previous revision: 1\.2
done"
- dotest modes-7b "ls -l ${TESTDIR}/cvsroot/first-dir/aa,v" \
+ dotest modes-7b "ls -l ${CVSROOT_DIRNAME}/first-dir/aa,v" \
"-r--r----- .*"
CVSUMASK=007
@@ -14929,20 +16907,20 @@ done"
"${PROG} [a-z]*: scheduling file .ab. for addition
${PROG} [a-z]*: use .${PROG} commit. to add this file permanently"
dotest modes-9 "${testcvs} -q ci -m add" \
-"RCS file: ${TESTDIR}/cvsroot/first-dir/ab,v
+"RCS file: ${CVSROOT_DIRNAME}/first-dir/ab,v
done
Checking in ab;
-${TESTDIR}/cvsroot/first-dir/ab,v <-- ab
+${CVSROOT_DIRNAME}/first-dir/ab,v <-- ab
initial revision: 1\.1
done"
- if test "x$remote" = xyes; then
+ if $remote; then
# The problem here is that the CVSUMASK environment variable
# needs to be set on the server (e.g. .bashrc). This is, of
# course, bogus, but that is the way it is currently.
- dotest modes-10 "ls -l ${TESTDIR}/cvsroot/first-dir/ab,v" \
+ dotest modes-10r "ls -l ${CVSROOT_DIRNAME}/first-dir/ab,v" \
"-r-xr-x---.*" "-r-xr-xr-x.*"
else
- dotest modes-10 "ls -l ${TESTDIR}/cvsroot/first-dir/ab,v" \
+ dotest modes-10 "ls -l ${CVSROOT_DIRNAME}/first-dir/ab,v" \
"-r-xr-x---.*"
fi
@@ -14959,25 +16937,25 @@ ${PROG} [a-z]*: use .${PROG} commit. to add this file permanently"
# when we are just now adding the file; as far as I know
# that is longstanding CVS behavior, for what it's worth.
dotest modes-14 "${testcvs} -q ci -m add" \
-"RCS file: ${TESTDIR}/cvsroot/first-dir/Attic/ac,v
+"RCS file: ${CVSROOT_DIRNAME}/first-dir/Attic/ac,v
done
Checking in ac;
-${TESTDIR}/cvsroot/first-dir/Attic/ac,v <-- ac
+${CVSROOT_DIRNAME}/first-dir/Attic/ac,v <-- ac
new revision: 1\.1\.2\.1; previous revision: 1\.1
done"
- if test "x$remote" = xyes; then
+ if $remote; then
# The problem here is that the CVSUMASK environment variable
# needs to be set on the server (e.g. .bashrc). This is, of
# course, bogus, but that is the way it is currently. The
# first match is for the :ext: method (where the CVSUMASK
# won't be set), while the second is for the :fork: method
# (where it will be).
- dotest modes-15 \
-"ls -l ${TESTDIR}/cvsroot/first-dir/Attic/ac,v" \
+ dotest modes-15r \
+"ls -l ${CVSROOT_DIRNAME}/first-dir/Attic/ac,v" \
"-r--r--r--.*" "-r--r-----.*"
else
dotest modes-15 \
-"ls -l ${TESTDIR}/cvsroot/first-dir/Attic/ac,v" \
+"ls -l ${CVSROOT_DIRNAME}/first-dir/Attic/ac,v" \
"-r--r-----.*"
fi
@@ -14997,23 +16975,23 @@ done"
dotest modes2-1 "${testcvs} -q co -l ." ''
mkdir first-dir
dotest modes2-2 "${testcvs} add first-dir" \
-"Directory ${TESTDIR}/cvsroot/first-dir added to the repository"
+"Directory ${CVSROOT_DIRNAME}/first-dir added to the repository"
cd first-dir
touch aa
dotest modes2-3 "${testcvs} add aa" \
"${PROG} [a-z]*: scheduling file .aa. for addition
${PROG} [a-z]*: use .${PROG} commit. to add this file permanently"
dotest modes2-4 "${testcvs} -q ci -m add" \
-"RCS file: ${TESTDIR}/cvsroot/first-dir/aa,v
+"RCS file: ${CVSROOT_DIRNAME}/first-dir/aa,v
done
Checking in aa;
-${TESTDIR}/cvsroot/first-dir/aa,v <-- aa
+${CVSROOT_DIRNAME}/first-dir/aa,v <-- aa
initial revision: 1\.1
done"
echo "more money" >> aa
dotest modes2-5 "${testcvs} -q ci -m add" \
"Checking in aa;
-${TESTDIR}/cvsroot/first-dir/aa,v <-- aa
+${CVSROOT_DIRNAME}/first-dir/aa,v <-- aa
new revision: 1\.2; previous revision: 1\.1
done"
@@ -15044,31 +17022,31 @@ done"
dotest modes3-1 "${testcvs} -q co -l ." ''
mkdir first-dir second-dir
dotest modes3-2 "${testcvs} add first-dir second-dir" \
-"Directory ${TESTDIR}/cvsroot/first-dir added to the repository
-Directory ${TESTDIR}/cvsroot/second-dir added to the repository"
+"Directory ${CVSROOT_DIRNAME}/first-dir added to the repository
+Directory ${CVSROOT_DIRNAME}/second-dir added to the repository"
touch first-dir/aa second-dir/ab
dotest modes3-3 "${testcvs} add first-dir/aa second-dir/ab" \
"${PROG} [a-z]*: scheduling file .first-dir/aa. for addition
${PROG} [a-z]*: scheduling file .second-dir/ab. for addition
${PROG} [a-z]*: use .${PROG} commit. to add these files permanently"
dotest modes3-4 "${testcvs} -q ci -m add" \
-"RCS file: ${TESTDIR}/cvsroot/first-dir/aa,v
+"RCS file: ${CVSROOT_DIRNAME}/first-dir/aa,v
done
Checking in first-dir/aa;
-${TESTDIR}/cvsroot/first-dir/aa,v <-- aa
+${CVSROOT_DIRNAME}/first-dir/aa,v <-- aa
initial revision: 1\.1
done
-RCS file: ${TESTDIR}/cvsroot/second-dir/ab,v
+RCS file: ${CVSROOT_DIRNAME}/second-dir/ab,v
done
Checking in second-dir/ab;
-${TESTDIR}/cvsroot/second-dir/ab,v <-- ab
+${CVSROOT_DIRNAME}/second-dir/ab,v <-- ab
initial revision: 1\.1
done"
- chmod a= ${TESTDIR}/cvsroot/first-dir
+ chmod a= ${CVSROOT_DIRNAME}/first-dir
dotest modes3-5 "${testcvs} update" \
"${PROG} [a-z]*: Updating \.
${PROG} [a-z]*: Updating first-dir
-${PROG} [a-z]*: cannot open directory ${TESTDIR}/cvsroot/first-dir: Permission denied
+${PROG} [a-z]*: cannot open directory ${CVSROOT_DIRNAME}/first-dir: Permission denied
${PROG} [a-z]*: skipping directory first-dir
${PROG} [a-z]*: Updating second-dir"
@@ -15082,14 +17060,14 @@ ${PROG} [a-z]*: Updating second-dir"
${PROG} [a-z]*: Updating CVSROOT
U ${DOTSTAR}
${PROG} [a-z]*: Updating first-dir
-${PROG} [a-z]*: cannot open directory ${TESTDIR}/cvsroot/first-dir: Permission denied
+${PROG} [a-z]*: cannot open directory ${CVSROOT_DIRNAME}/first-dir: Permission denied
${PROG} [a-z]*: skipping directory first-dir
${PROG} [a-z]*: Updating second-dir"
cd ..
rm -r 1
- chmod u+rwx ${TESTDIR}/cvsroot/first-dir
- rm -rf ${TESTDIR}/cvsroot/first-dir ${TESTDIR}/cvsroot/second-dir
+ chmod u+rwx ${CVSROOT_DIRNAME}/first-dir
+ rm -rf ${CVSROOT_DIRNAME}/first-dir ${TESTDIR}/cvsroot/second-dir
;;
stamps)
@@ -15098,7 +17076,7 @@ ${PROG} [a-z]*: Updating second-dir"
dotest stamps-1 "${testcvs} -q co -l ." ''
mkdir first-dir
dotest stamps-2 "${testcvs} add first-dir" \
-"Directory ${TESTDIR}/cvsroot/first-dir added to the repository"
+"Directory ${CVSROOT_DIRNAME}/first-dir added to the repository"
cd first-dir
touch aa
echo '$''Id$' >kw
@@ -15121,16 +17099,16 @@ ${PROG} [a-z]*: use .${PROG} commit. to add these files permanently"
"cmp ${TESTDIR}/1/stamp.kw.touch ${TESTDIR}/1/stamp.kw.add" ''
sleep 60
dotest stamps-5 "${testcvs} -q ci -m add" \
-"RCS file: ${TESTDIR}/cvsroot/first-dir/aa,v
+"RCS file: ${CVSROOT_DIRNAME}/first-dir/aa,v
done
Checking in aa;
-${TESTDIR}/cvsroot/first-dir/aa,v <-- aa
+${CVSROOT_DIRNAME}/first-dir/aa,v <-- aa
initial revision: 1\.1
done
-RCS file: ${TESTDIR}/cvsroot/first-dir/kw,v
+RCS file: ${CVSROOT_DIRNAME}/first-dir/kw,v
done
Checking in kw;
-${TESTDIR}/cvsroot/first-dir/kw,v <-- kw
+${CVSROOT_DIRNAME}/first-dir/kw,v <-- kw
initial revision: 1\.1
done"
ls -l aa >${TESTDIR}/1/stamp.aa.ci
@@ -15177,11 +17155,11 @@ U first-dir/kw"
echo add a line >>kw
dotest stamps-9 "${testcvs} -q ci -m change-them" \
"Checking in aa;
-${TESTDIR}/cvsroot/first-dir/aa,v <-- aa
+${CVSROOT_DIRNAME}/first-dir/aa,v <-- aa
new revision: 1\.2; previous revision: 1\.1
done
Checking in kw;
-${TESTDIR}/cvsroot/first-dir/kw,v <-- kw
+${CVSROOT_DIRNAME}/first-dir/kw,v <-- kw
new revision: 1\.2; previous revision: 1\.1
done"
ls -l aa >${TESTDIR}/1/stamp.aa.ci2
@@ -15223,7 +17201,7 @@ done"
cd ../..
- if test "$keep" = yes; then
+ if $keep; then
echo Keeping ${TESTDIR} and exiting due to --keep
exit 0
fi
@@ -15242,7 +17220,7 @@ done"
dotest perms-1 "${testcvs} -q co -l ." ''
mkdir first-dir
dotest perms-2 "${testcvs} add first-dir" \
-"Directory ${TESTDIR}/cvsroot/first-dir added to the repository"
+"Directory ${CVSROOT_DIRNAME}/first-dir added to the repository"
cd first-dir
touch foo
@@ -15254,7 +17232,7 @@ ${PROG} [a-z]*: use .${PROG} commit. to add this file permanently"
"RCS file: ${CVSROOT_DIRNAME}/first-dir/foo,v
done
Checking in foo;
-${TESTDIR}/cvsroot/first-dir/foo,v <-- foo
+${CVSROOT_DIRNAME}/first-dir/foo,v <-- foo
initial revision: 1\.1
done"
@@ -15263,7 +17241,7 @@ done"
mkdir 2; cd 2
dotest perms-5 "${testcvs} -q co first-dir" "U first-dir/foo"
cd first-dir
- if test "$remote" = no; then
+ if $remote; then :; else
# PreservePermissions not yet implemented for remote.
dotest perms-6 "ls -l foo" "-r---wx--x .* foo"
fi
@@ -15287,24 +17265,24 @@ done"
dotest symlinks-1 "${testcvs} -q co -l ." ''
mkdir first-dir
dotest symlinks-2 "${testcvs} add first-dir" \
-"Directory ${TESTDIR}/cvsroot/first-dir added to the repository"
+"Directory ${CVSROOT_DIRNAME}/first-dir added to the repository"
cd first-dir
dotest symlinks-2.1 "ln -s ${TESTDIR}/fumble slink" ""
dotest symlinks-3 "${testcvs} add slink" \
"${PROG} [a-z]*: scheduling file .slink. for addition
${PROG} [a-z]*: use .${PROG} commit. to add this file permanently"
- if test "$remote" = yes; then
+ if $remote; then
# Remote doesn't implement PreservePermissions, and in its
# absence the correct behavior is to follow the symlink.
- dotest_fail symlinks-4 "${testcvs} -q ci -m ''" \
+ dotest_fail symlinks-4r "${testcvs} -q ci -m ''" \
"${PROG} \[commit aborted\]: reading slink: No such file or directory"
else
dotest symlinks-4 "${testcvs} -q ci -m ''" \
"RCS file: ${CVSROOT_DIRNAME}/first-dir/slink,v
done
Checking in slink;
-${TESTDIR}/cvsroot/first-dir/slink,v <-- slink
+${CVSROOT_DIRNAME}/first-dir/slink,v <-- slink
initial revision: 1\.1
done"
@@ -15334,7 +17312,7 @@ done"
dotest symlinks2-1 "${testcvs} -q co -l ." ''
mkdir first-dir
dotest symlinks2-2 "${testcvs} add first-dir" \
-"Directory ${TESTDIR}/cvsroot/first-dir added to the repository"
+"Directory ${CVSROOT_DIRNAME}/first-dir added to the repository"
cd first-dir
echo nonsymlink > slink
dotest symlinks2-3 "${testcvs} add slink" \
@@ -15344,7 +17322,7 @@ ${PROG} [a-z]*: use .${PROG} commit. to add this file permanently"
"RCS file: ${CVSROOT_DIRNAME}/first-dir/slink,v
done
Checking in slink;
-${TESTDIR}/cvsroot/first-dir/slink,v <-- slink
+${CVSROOT_DIRNAME}/first-dir/slink,v <-- slink
initial revision: 1\.1
done"
rm slink
@@ -15353,7 +17331,7 @@ done"
dotest symlinks2-5 "ln -s cvslog.file2 slink" ""
dotest symlinks2-6 "${testcvs} -q ci -m linkify" \
"Checking in slink;
-${TESTDIR}/cvsroot/first-dir/slink,v <-- slink
+${CVSROOT_DIRNAME}/first-dir/slink,v <-- slink
new revision: 1\.2; previous revision: 1\.1
done"
dotest symlinks2-7 "${testcvs} -q update -r 1.1 slink" "[UP] slink"
@@ -15375,7 +17353,7 @@ done"
dotest hardlinks-1 "${testcvs} -q co -l ." ''
mkdir first-dir
dotest hardlinks-2 "${testcvs} add first-dir" \
-"Directory ${TESTDIR}/cvsroot/first-dir added to the repository"
+"Directory ${CVSROOT_DIRNAME}/first-dir added to the repository"
cd first-dir
# Make up some ugly filenames, to test that they get
@@ -15411,32 +17389,32 @@ ${PROG} [a-z]*: use .${PROG} commit. to add these files permanently"
"RCS file: ${CVSROOT_DIRNAME}/first-dir/aaaa,v
done
Checking in aaaa;
-${TESTDIR}/cvsroot/first-dir/aaaa,v <-- aaaa
+${CVSROOT_DIRNAME}/first-dir/aaaa,v <-- aaaa
initial revision: 1\.1
done
RCS file: ${CVSROOT_DIRNAME}/first-dir/b\.b\.b\.b,v
done
Checking in b\.b\.b\.b;
-${TESTDIR}/cvsroot/first-dir/b\.b\.b\.b,v <-- b\.b\.b\.b
+${CVSROOT_DIRNAME}/first-dir/b\.b\.b\.b,v <-- b\.b\.b\.b
initial revision: 1\.1
done
RCS file: ${CVSROOT_DIRNAME}/first-dir/dd dd dd,v
done
Checking in dd dd dd;
-${TESTDIR}/cvsroot/first-dir/dd dd dd,v <-- dd dd dd
+${CVSROOT_DIRNAME}/first-dir/dd dd dd,v <-- dd dd dd
initial revision: 1\.1
done"
# Test checking out hardlinked files.
cd ../..
mkdir 2; cd 2
- if test "$remote" = yes; then
+ if $remote; then
# Remote does not implement PreservePermissions.
- dotest hardlinks-5 "${testcvs} -q co first-dir" \
+ dotest hardlinks-5r "${testcvs} -q co first-dir" \
"U first-dir/aaaa
U first-dir/b\.b\.b\.b
U first-dir/dd dd dd"
cd first-dir
- dotest hardlinks-6 "ls -l [abd]*" \
+ dotest hardlinks-6r "ls -l [abd]*" \
"-[rwx\-]* *1 .* aaaa
-[rwx\-]* *1 .* b\.b\.b\.b
-[rwx\-]* *1 .* dd dd dd"
@@ -15476,7 +17454,7 @@ U first-dir/dd dd dd"
dotest sticky-1 "${testcvs} -q co -l ." ''
mkdir first-dir
dotest sticky-2 "${testcvs} add first-dir" \
-"Directory ${TESTDIR}/cvsroot/first-dir added to the repository"
+"Directory ${CVSROOT_DIRNAME}/first-dir added to the repository"
cd first-dir
touch file1
@@ -15484,17 +17462,17 @@ U first-dir/dd dd dd"
"${PROG} [a-z]*: scheduling file .file1. for addition
${PROG} [a-z]*: use .${PROG} commit. to add this file permanently"
dotest sticky-4 "${testcvs} -q ci -m add" \
-"RCS file: ${TESTDIR}/cvsroot/first-dir/file1,v
+"RCS file: ${CVSROOT_DIRNAME}/first-dir/file1,v
done
Checking in file1;
-${TESTDIR}/cvsroot/first-dir/file1,v <-- file1
+${CVSROOT_DIRNAME}/first-dir/file1,v <-- file1
initial revision: 1\.1
done"
dotest sticky-5 "${testcvs} -q tag tag1" "T file1"
echo add a line >>file1
dotest sticky-6 "${testcvs} -q ci -m modify" \
"Checking in file1;
-${TESTDIR}/cvsroot/first-dir/file1,v <-- file1
+${CVSROOT_DIRNAME}/first-dir/file1,v <-- file1
new revision: 1\.2; previous revision: 1\.1
done"
dotest sticky-7 "${testcvs} -q update -r tag1" "[UP] file1"
@@ -15511,10 +17489,10 @@ ${QUESTION} file2" "${QUESTION} file2
"${PROG} [a-z]*: scheduling file .file2. for addition
${PROG} [a-z]*: use .${PROG} commit. to add this file permanently"
dotest sticky-14 "${testcvs} -q ci -m add" \
-"RCS file: ${TESTDIR}/cvsroot/first-dir/file2,v
+"RCS file: ${CVSROOT_DIRNAME}/first-dir/file2,v
done
Checking in file2;
-${TESTDIR}/cvsroot/first-dir/file2,v <-- file2
+${CVSROOT_DIRNAME}/first-dir/file2,v <-- file2
initial revision: 1\.1
done"
@@ -15580,7 +17558,7 @@ U file1" "U file1"
dotest keyword-1 "${testcvs} -q co -l ." ''
mkdir first-dir
dotest keyword-2 "${testcvs} add first-dir" \
-"Directory ${TESTDIR}/cvsroot/first-dir added to the repository"
+"Directory ${CVSROOT_DIRNAME}/first-dir added to the repository"
cd first-dir
echo '$''Author$' > file1
@@ -15605,22 +17583,22 @@ U file1" "U file1"
"${PROG} [a-z]*: scheduling file .file1. for addition
${PROG} [a-z]*: use .${PROG} commit. to add this file permanently"
dotest keyword-4 "${testcvs} -q ci -m add" \
-"RCS file: ${TESTDIR}/cvsroot/first-dir/file1,v
+"RCS file: ${CVSROOT_DIRNAME}/first-dir/file1,v
done
Checking in file1;
-${TESTDIR}/cvsroot/first-dir/file1,v <-- file1
+${CVSROOT_DIRNAME}/first-dir/file1,v <-- file1
initial revision: 1\.1
done"
dotest keyword-5 "cat file1" \
'\$'"Author: ${username} "'\$'"
"'\$'"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] "'\$'"
-"'\$'"Header: ${TESTDIR}/cvsroot/first-dir/file1,v 1\.1 [0-9/]* [0-9:]* ${username} Exp "'\$'"
+"'\$'"Header: ${CVSROOT_DIRNAME}/first-dir/file1,v 1\.1 [0-9/]* [0-9:]* ${username} Exp "'\$'"
"'\$'"Id: file1,v 1\.1 [0-9/]* [0-9:]* ${username} Exp "'\$'"
"'\$'"Locker: "'\$'"
"'\$'"Name: "'\$'"
"'\$'"RCSfile: file1,v "'\$'"
"'\$'"Revision: 1\.1 "'\$'"
-"'\$'"Source: ${TESTDIR}/cvsroot/first-dir/file1,v "'\$'"
+"'\$'"Source: ${CVSROOT_DIRNAME}/first-dir/file1,v "'\$'"
"'\$'"State: Exp "'\$'"
"'\$'"Nonkey"'\$'"
"'\$'"Date
@@ -15634,7 +17612,7 @@ xx"
# vs. -kkv. CVS does not normally lock RCS files, but some
# people use cvs admin to enforce reserved checkouts.
dotest keyword-6 "${testcvs} admin -l file1" \
-"RCS file: ${TESTDIR}/cvsroot/first-dir/file1,v
+"RCS file: ${CVSROOT_DIRNAME}/first-dir/file1,v
1\.1 locked
done"
@@ -15642,13 +17620,13 @@ done"
dotest keyword-8 "cat file1" \
'\$'"Author: ${username} "'\$'"
"'\$'"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] "'\$'"
-"'\$'"Header: ${TESTDIR}/cvsroot/first-dir/file1,v 1\.1 [0-9/]* [0-9:]* ${username} Exp "'\$'"
+"'\$'"Header: ${CVSROOT_DIRNAME}/first-dir/file1,v 1\.1 [0-9/]* [0-9:]* ${username} Exp "'\$'"
"'\$'"Id: file1,v 1\.1 [0-9/]* [0-9:]* ${username} Exp "'\$'"
"'\$'"Locker: "'\$'"
"'\$'"Name: "'\$'"
"'\$'"RCSfile: file1,v "'\$'"
"'\$'"Revision: 1\.1 "'\$'"
-"'\$'"Source: ${TESTDIR}/cvsroot/first-dir/file1,v "'\$'"
+"'\$'"Source: ${CVSROOT_DIRNAME}/first-dir/file1,v "'\$'"
"'\$'"State: Exp "'\$'"
"'\$'"Nonkey"'\$'"
"'\$'"Date
@@ -15662,13 +17640,13 @@ xx"
dotest keyword-10 "cat file1" \
'\$'"Author: ${username} "'\$'"
"'\$'"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] "'\$'"
-"'\$'"Header: ${TESTDIR}/cvsroot/first-dir/file1,v 1\.1 [0-9/]* [0-9:]* ${username} Exp ${username} "'\$'"
+"'\$'"Header: ${CVSROOT_DIRNAME}/first-dir/file1,v 1\.1 [0-9/]* [0-9:]* ${username} Exp ${username} "'\$'"
"'\$'"Id: file1,v 1\.1 [0-9/]* [0-9:]* ${username} Exp ${username} "'\$'"
"'\$'"Locker: ${username} "'\$'"
"'\$'"Name: "'\$'"
"'\$'"RCSfile: file1,v "'\$'"
"'\$'"Revision: 1\.1 "'\$'"
-"'\$'"Source: ${TESTDIR}/cvsroot/first-dir/file1,v "'\$'"
+"'\$'"Source: ${CVSROOT_DIRNAME}/first-dir/file1,v "'\$'"
"'\$'"State: Exp "'\$'"
"'\$'"Nonkey"'\$'"
"'\$'"Date
@@ -15702,13 +17680,13 @@ xx"
dotest keyword-14 "cat file1" \
"${username}
[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]
-${TESTDIR}/cvsroot/first-dir/file1,v 1\.1 [0-9/]* [0-9:]* ${username} Exp
+${CVSROOT_DIRNAME}/first-dir/file1,v 1\.1 [0-9/]* [0-9:]* ${username} Exp
file1,v 1\.1 [0-9/]* [0-9:]* ${username} Exp
file1,v
1\.1
-${TESTDIR}/cvsroot/first-dir/file1,v
+${CVSROOT_DIRNAME}/first-dir/file1,v
Exp
"'\$'"Nonkey"'\$'"
"'\$'"Date
@@ -15742,24 +17720,24 @@ xx "'\$'"Log"'\$'
echo '$''Name$' > file1
dotest keyword-18 "${testcvs} ci -m modify file1" \
"Checking in file1;
-${TESTDIR}/cvsroot/first-dir/file1,v <-- file1
+${CVSROOT_DIRNAME}/first-dir/file1,v <-- file1
new revision: 1\.2; previous revision: 1\.1
done"
dotest keyword-19 "${testcvs} -q tag tag1" "T file1"
echo "change" >> file1
dotest keyword-20 "${testcvs} -q ci -m mod2 file1" \
"Checking in file1;
-${TESTDIR}/cvsroot/first-dir/file1,v <-- file1
+${CVSROOT_DIRNAME}/first-dir/file1,v <-- file1
new revision: 1\.3; previous revision: 1\.2
done"
dotest keyword-21 "${testcvs} -q update -r tag1" "[UP] file1"
dotest keyword-22 "cat file1" '\$'"Name: tag1 "'\$'
- if test "$remote" = yes; then
+ if $remote; then
# Like serverpatch-8. Not sure there is anything much we
# can or should do about this.
- dotest keyword-23 "${testcvs} update -A file1" "P file1
+ dotest keyword-23r "${testcvs} update -A file1" "P file1
${PROG} update: checksum failure after patch to \./file1; will refetch
${PROG} client: refetching unpatchable files
U file1"
@@ -15780,7 +17758,7 @@ change"
dotest keywordlog-1 "${testcvs} -q co -l ." ''
mkdir first-dir
dotest keywordlog-2 "${testcvs} add first-dir" \
-"Directory ${TESTDIR}/cvsroot/first-dir added to the repository"
+"Directory ${CVSROOT_DIRNAME}/first-dir added to the repository"
cd first-dir
echo initial >file1
dotest keywordlog-3 "${testcvs} add file1" \
@@ -15789,10 +17767,10 @@ ${PROG} [a-z]*: use .${PROG} commit. to add this file permanently"
# See "rmadd" for a list of other tests of cvs ci -r.
dotest keywordlog-4 "${testcvs} -q ci -r 1.3 -m add file1" \
-"RCS file: ${TESTDIR}/cvsroot/first-dir/file1,v
+"RCS file: ${CVSROOT_DIRNAME}/first-dir/file1,v
done
Checking in file1;
-${TESTDIR}/cvsroot/first-dir/file1,v <-- file1
+${CVSROOT_DIRNAME}/first-dir/file1,v <-- file1
initial revision: 1\.3
done"
@@ -15815,7 +17793,7 @@ ${PROG} \[[a-z]* aborted\]: correct above errors first!"
dotest keywordlog-5 "${testcvs} ci -F ${TESTDIR}/comment.tmp file1" \
"Checking in file1;
-${TESTDIR}/cvsroot/first-dir/file1,v <-- file1
+${CVSROOT_DIRNAME}/first-dir/file1,v <-- file1
new revision: 1\.4; previous revision: 1\.3
done"
rm -f ${TESTDIR}/comment.tmp
@@ -15842,7 +17820,7 @@ xx"
echo "change" >> file1
dotest keywordlog-10 "${testcvs} ci -m modify file1" \
"Checking in file1;
-${TESTDIR}/cvsroot/first-dir/file1,v <-- file1
+${CVSROOT_DIRNAME}/first-dir/file1,v <-- file1
new revision: 1\.5; previous revision: 1\.4
done"
dotest keywordlog-11 "cat file1" \
@@ -15876,7 +17854,7 @@ change"
echo br-change >>file1
dotest keywordlog-15 "${testcvs} -q ci -m br-modify" \
"Checking in file1;
-${TESTDIR}/cvsroot/first-dir/file1,v <-- file1
+${CVSROOT_DIRNAME}/first-dir/file1,v <-- file1
new revision: 1\.4\.2\.1; previous revision: 1\.4
done"
dotest keywordlog-16 "cat file1" \
@@ -15973,7 +17951,7 @@ xx"
dotest keywordlog-24 \
"${testcvs} admin -oHEAD 1/first-dir/file1" \
-"RCS file: ${TESTDIR}/cvsroot/first-dir/file1,v
+"RCS file: ${CVSROOT_DIRNAME}/first-dir/file1,v
deleting revision 1\.5
done"
@@ -15986,7 +17964,7 @@ xx First log line
xx Second log line
xx"
- if test $keep = yes; then
+ if $keep; then
echo Keeping ${TESTDIR} and exiting due to --keep
exit 0
fi
@@ -16009,7 +17987,7 @@ xx"
dotest keyword2-1 "${testcvs} -q co -l ." ''
mkdir first-dir
dotest keyword2-2 "${testcvs} add first-dir" \
-"Directory ${TESTDIR}/cvsroot/first-dir added to the repository"
+"Directory ${CVSROOT_DIRNAME}/first-dir added to the repository"
cd first-dir
echo '$''Revision$' >> file1
@@ -16039,16 +18017,16 @@ ${PROG} [a-z]*: use .${PROG} commit. to add this file permanently"
${PROG} [a-z]*: use .${PROG} commit. to add this file permanently"
dotest keyword2-6 "${testcvs} -q ci -m add" \
-"RCS file: ${TESTDIR}/cvsroot/first-dir/binfile\.dat,v
+"RCS file: ${CVSROOT_DIRNAME}/first-dir/binfile\.dat,v
done
Checking in binfile\.dat;
-${TESTDIR}/cvsroot/first-dir/binfile\.dat,v <-- binfile\.dat
+${CVSROOT_DIRNAME}/first-dir/binfile\.dat,v <-- binfile\.dat
initial revision: 1\.1
done
-RCS file: ${TESTDIR}/cvsroot/first-dir/file1,v
+RCS file: ${CVSROOT_DIRNAME}/first-dir/file1,v
done
Checking in file1;
-${TESTDIR}/cvsroot/first-dir/file1,v <-- file1
+${CVSROOT_DIRNAME}/first-dir/file1,v <-- file1
initial revision: 1\.1
done"
@@ -16059,7 +18037,7 @@ T file1"
sed -e 's/our/the best of and the worst of/' file1 >f; mv f file1
dotest keyword2-8 "${testcvs} -q ci -m change" \
"Checking in file1;
-${TESTDIR}/cvsroot/first-dir/file1,v <-- file1
+${CVSROOT_DIRNAME}/first-dir/file1,v <-- file1
new revision: 1\.2; previous revision: 1\.1
done"
@@ -16068,14 +18046,14 @@ done"
echo "what else do we have?" >>file1
dotest keyword2-10 "${testcvs} -q ci -m change" \
"Checking in file1;
-${TESTDIR}/cvsroot/first-dir/file1,v <-- file1
+${CVSROOT_DIRNAME}/first-dir/file1,v <-- file1
new revision: 1\.1\.2\.1; previous revision: 1\.1
done"
# Okay, first a conflict in file1 - should be okay with binfile.dat
dotest keyword2-11 "${testcvs} -q update -A -j branch" \
"U file1
-RCS file: ${TESTDIR}/cvsroot/first-dir/file1,v
+RCS file: ${CVSROOT_DIRNAME}/first-dir/file1,v
retrieving revision 1\.1
retrieving revision 1\.1\.2\.1
Merging differences between 1\.1 and 1\.1\.2\.1 into file1
@@ -16084,7 +18062,7 @@ rcsmerge: warning: conflicts during merge"
dotest_fail keyword2-12 "${testcvs} diff file1" \
"Index: file1
===================================================================
-RCS file: ${TESTDIR}/cvsroot/first-dir/file1,v
+RCS file: ${CVSROOT_DIRNAME}/first-dir/file1,v
retrieving revision 1\.2
diff -r1\.2 file1
0a1
@@ -16098,11 +18076,11 @@ diff -r1\.2 file1
# Here's the problem... shouldn't -kk a binary file...
rm file1
- if test "$remote" = yes; then
- dotest keyword2-13 "${testcvs} -q update -A -kk -j branch" \
+ if $remote; then
+ dotest keyword2-13r "${testcvs} -q update -A -kk -j branch" \
"U binfile.dat
U file1
-RCS file: ${TESTDIR}/cvsroot/first-dir/file1,v
+RCS file: ${CVSROOT_DIRNAME}/first-dir/file1,v
retrieving revision 1\.1
retrieving revision 1\.1\.2\.1
Merging differences between 1\.1 and 1\.1\.2\.1 into file1"
@@ -16111,7 +18089,7 @@ Merging differences between 1\.1 and 1\.1\.2\.1 into file1"
"U binfile.dat
${PROG} [a-z]*: warning: file1 was lost
U file1
-RCS file: ${TESTDIR}/cvsroot/first-dir/file1,v
+RCS file: ${CVSROOT_DIRNAME}/first-dir/file1,v
retrieving revision 1\.1
retrieving revision 1\.1\.2\.1
Merging differences between 1\.1 and 1\.1\.2\.1 into file1"
@@ -16121,7 +18099,7 @@ Merging differences between 1\.1 and 1\.1\.2\.1 into file1"
# have been checked in if it had changed on the branch...
dotest keyword2-14 "${testcvs} -q ci -m change" \
"Checking in file1;
-${TESTDIR}/cvsroot/first-dir/file1,v <-- file1
+${CVSROOT_DIRNAME}/first-dir/file1,v <-- file1
new revision: 1\.3; previous revision: 1\.2
done"
@@ -16141,12 +18119,12 @@ T file1"
</dev/null | ${TR} '@' '\000' >>binfile.dat
dotest keyword2-19 "${testcvs} -q ci -m badbadbad" \
"Checking in binfile\.dat;
-${TESTDIR}/cvsroot/first-dir/binfile\.dat,v <-- binfile\.dat
+${CVSROOT_DIRNAME}/first-dir/binfile\.dat,v <-- binfile\.dat
new revision: 1\.1\.4\.1; previous revision: 1\.1
done"
dotest keyword2-20 "${testcvs} -q update -A -kk -j branch2" \
"U binfile\.dat
-RCS file: ${TESTDIR}/cvsroot/first-dir/binfile\.dat,v
+RCS file: ${CVSROOT_DIRNAME}/first-dir/binfile\.dat,v
retrieving revision 1\.1
retrieving revision 1\.1\.4\.1
Merging differences between 1\.1 and 1\.1\.4\.1 into binfile\.dat
@@ -16190,7 +18168,7 @@ U first-dir/file2"
echo 'add a line on trunk' >> file1
dotest head-3 "${testcvs} -q ci -m modify" \
"Checking in file1;
-${TESTDIR}/cvsroot/first-dir/file1,v <-- file1
+${CVSROOT_DIRNAME}/first-dir/file1,v <-- file1
new revision: 1\.2; previous revision: 1\.1
done"
dotest head-4 "${testcvs} -q tag trunktag" "T file1
@@ -16198,7 +18176,7 @@ T file2"
echo 'add a line on trunk after trunktag' >> file1
dotest head-5 "${testcvs} -q ci -m modify" \
"Checking in file1;
-${TESTDIR}/cvsroot/first-dir/file1,v <-- file1
+${CVSROOT_DIRNAME}/first-dir/file1,v <-- file1
new revision: 1\.3; previous revision: 1\.2
done"
dotest head-6 "${testcvs} -q tag -b br1" "T file1
@@ -16207,7 +18185,7 @@ T file2"
echo 'modify on branch' >>file1
dotest head-8 "${testcvs} -q ci -m modify" \
"Checking in file1;
-${TESTDIR}/cvsroot/first-dir/file1,v <-- file1
+${CVSROOT_DIRNAME}/first-dir/file1,v <-- file1
new revision: 1\.3\.2\.1; previous revision: 1\.3
done"
dotest head-9 "${testcvs} -q tag brtag" "T file1
@@ -16215,7 +18193,7 @@ T file2"
echo 'modify on branch after brtag' >>file1
dotest head-10 "${testcvs} -q ci -m modify" \
"Checking in file1;
-${TESTDIR}/cvsroot/first-dir/file1,v <-- file1
+${CVSROOT_DIRNAME}/first-dir/file1,v <-- file1
new revision: 1\.3\.2\.2; previous revision: 1\.3\.2\.1
done"
# With no sticky tags, HEAD is the head of the trunk.
@@ -16229,12 +18207,12 @@ add a line on trunk after trunktag"
dotest_fail head-trunk-diff "${testcvs} -q diff -c -r HEAD -r br1" \
"Index: file1
===================================================================
-RCS file: ${TESTDIR}/cvsroot/first-dir/file1,v
+RCS file: ${CVSROOT_DIRNAME}/first-dir/file1,v
retrieving revision 1\.3
retrieving revision 1\.3\.2\.2
diff -c -r1\.3 -r1\.3\.2\.2
-\*\*\* file1 [0-9/]* [0-9:]* 1\.3
---- file1 [0-9/]* [0-9:]* 1\.3\.2\.2
+\*\*\* file1 ${RFCDATE} 1\.3
+--- file1 ${RFCDATE} 1\.3\.2\.2
\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*
\*\*\* 1,3 \*\*\*\*
--- 1,5 ----
@@ -16282,12 +18260,12 @@ add a line on trunk after trunktag"
"${testcvs} -q diff -c -r HEAD -r br1" \
"Index: file1
===================================================================
-RCS file: ${TESTDIR}/cvsroot/first-dir/file1,v
+RCS file: ${CVSROOT_DIRNAME}/first-dir/file1,v
retrieving revision 1\.3
retrieving revision 1\.3\.2\.2
diff -c -r1\.3 -r1\.3\.2\.2
-\*\*\* file1 [0-9/]* [0-9:]* 1\.3
---- file1 [0-9/]* [0-9:]* 1\.3\.2\.2
+\*\*\* file1 ${RFCDATE} 1\.3
+--- file1 ${RFCDATE} 1\.3\.2\.2
\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*
\*\*\* 1,3 \*\*\*\*
--- 1,5 ----
@@ -16306,10 +18284,10 @@ ${PLUS} modify on branch after brtag"
# a revision (file1) and the case where it does not (file2)
dotest_fail head-o0a "${testcvs} admin -o ::br1" \
"${PROG} [a-z]*: Administrating \.
-RCS file: ${TESTDIR}/cvsroot/first-dir/file1,v
+RCS file: ${CVSROOT_DIRNAME}/first-dir/file1,v
${PROG} [a-z]*: cannot remove revision 1\.3\.2\.1 because it has tags
-${PROG} [a-z]*: cannot modify RCS file for .file1.
-RCS file: ${TESTDIR}/cvsroot/first-dir/file2,v
+${PROG} [a-z]*: RCS file for .file1. not modified\.
+RCS file: ${CVSROOT_DIRNAME}/first-dir/file2,v
done"
dotest head-o0b "${testcvs} tag -d brtag" \
"${PROG} [a-z]*: Untagging \.
@@ -16317,10 +18295,10 @@ D file1
D file2"
dotest head-o1 "${testcvs} admin -o ::br1" \
"${PROG} [a-z]*: Administrating \.
-RCS file: ${TESTDIR}/cvsroot/first-dir/file1,v
+RCS file: ${CVSROOT_DIRNAME}/first-dir/file1,v
deleting revision 1\.3\.2\.1
done
-RCS file: ${TESTDIR}/cvsroot/first-dir/file2,v
+RCS file: ${CVSROOT_DIRNAME}/first-dir/file2,v
done"
cd ../..
rm -r 1
@@ -16348,7 +18326,7 @@ done"
dotest tagdate-1 "${testcvs} -q co -l ." ''
mkdir first-dir
dotest tagdate-2 "${testcvs} add first-dir" \
-"Directory ${TESTDIR}/cvsroot/first-dir added to the repository"
+"Directory ${CVSROOT_DIRNAME}/first-dir added to the repository"
cd first-dir
echo trunk-1 >file1
@@ -16356,10 +18334,10 @@ done"
"${PROG} [a-z]*: scheduling file .file1. for addition
${PROG} [a-z]*: use .${PROG} commit. to add this file permanently"
dotest tagdate-4 "${testcvs} -q ci -m add" \
-"RCS file: ${TESTDIR}/cvsroot/first-dir/file1,v
+"RCS file: ${CVSROOT_DIRNAME}/first-dir/file1,v
done
Checking in file1;
-${TESTDIR}/cvsroot/first-dir/file1,v <-- file1
+${CVSROOT_DIRNAME}/first-dir/file1,v <-- file1
initial revision: 1\.1
done"
dotest tagdate-5 "${testcvs} -q tag -b br1" "T file1"
@@ -16367,7 +18345,7 @@ done"
echo trunk-2 >file1
dotest tagdate-7 "${testcvs} -q ci -m modify-on-trunk" \
"Checking in file1;
-${TESTDIR}/cvsroot/first-dir/file1,v <-- file1
+${CVSROOT_DIRNAME}/first-dir/file1,v <-- file1
new revision: 1\.2; previous revision: 1\.1
done"
# We are testing -r -D where br1 is a (magic) branch without
@@ -16378,7 +18356,7 @@ done"
echo br2-1 >file1
dotest tagdate-10 "${testcvs} -q ci -m modify-on-br2" \
"Checking in file1;
-${TESTDIR}/cvsroot/first-dir/file1,v <-- file1
+${CVSROOT_DIRNAME}/first-dir/file1,v <-- file1
new revision: 1\.1\.4\.1; previous revision: 1\.1
done"
@@ -16406,7 +18384,7 @@ done"
echo br2-2 >file1
dotest tagdate-13 "${testcvs} -q ci -m modify-2-on-br2" \
"Checking in file1;
-${TESTDIR}/cvsroot/first-dir/file1,v <-- file1
+${CVSROOT_DIRNAME}/first-dir/file1,v <-- file1
new revision: 1\.1\.4\.2; previous revision: 1\.1\.4\.1
done"
cd ../..
@@ -16427,7 +18405,7 @@ done"
\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*
1\.1\.4\.2 (${username} *[0-9a-zA-Z-]*): br2-2"
- if test $keep = yes; then
+ if $keep; then
echo Keeping ${TESTDIR} and exiting due to --keep
exit 0
fi
@@ -16446,7 +18424,7 @@ done"
dotest multibranch2-1 "${testcvs} -q co -l ." ''
mkdir first-dir
dotest multibranch2-2 "${testcvs} add first-dir" \
-"Directory ${TESTDIR}/cvsroot/first-dir added to the repository"
+"Directory ${CVSROOT_DIRNAME}/first-dir added to the repository"
cd first-dir
echo trunk-1 >file1
@@ -16456,16 +18434,16 @@ done"
${PROG} [a-z]*: scheduling file .file2. for addition
${PROG} [a-z]*: use .${PROG} commit. to add these files permanently"
dotest multibranch2-4 "${testcvs} -q ci -m add" \
-"RCS file: ${TESTDIR}/cvsroot/first-dir/file1,v
+"RCS file: ${CVSROOT_DIRNAME}/first-dir/file1,v
done
Checking in file1;
-${TESTDIR}/cvsroot/first-dir/file1,v <-- file1
+${CVSROOT_DIRNAME}/first-dir/file1,v <-- file1
initial revision: 1\.1
done
-RCS file: ${TESTDIR}/cvsroot/first-dir/file2,v
+RCS file: ${CVSROOT_DIRNAME}/first-dir/file2,v
done
Checking in file2;
-${TESTDIR}/cvsroot/first-dir/file2,v <-- file2
+${CVSROOT_DIRNAME}/first-dir/file2,v <-- file2
initial revision: 1\.1
done"
dotest multibranch2-5 "${testcvs} -q tag -b A" "T file1
@@ -16478,11 +18456,11 @@ T file2"
echo branch-B >file2
dotest multibranch2-8 "${testcvs} -q ci -m modify-on-B" \
"Checking in file1;
-${TESTDIR}/cvsroot/first-dir/file1,v <-- file1
+${CVSROOT_DIRNAME}/first-dir/file1,v <-- file1
new revision: 1\.1\.4\.1; previous revision: 1\.1
done
Checking in file2;
-${TESTDIR}/cvsroot/first-dir/file2,v <-- file2
+${CVSROOT_DIRNAME}/first-dir/file2,v <-- file2
new revision: 1\.1\.4\.1; previous revision: 1\.1
done"
@@ -16492,13 +18470,13 @@ done"
# When using cvs-1.9.20, this commit gets a failed assertion in rcs.c.
dotest multibranch2-10 "${testcvs} -q ci -m modify-on-A" \
"Checking in file1;
-${TESTDIR}/cvsroot/first-dir/file1,v <-- file1
+${CVSROOT_DIRNAME}/first-dir/file1,v <-- file1
new revision: 1\.1\.2\.1; previous revision: 1\.1
done"
dotest multibranch2-11 "${testcvs} -q log file1" \
"
-RCS file: ${TESTDIR}/cvsroot/first-dir/file1,v
+RCS file: ${CVSROOT_DIRNAME}/first-dir/file1,v
Working file: file1
head: 1\.1
branch:
@@ -16528,7 +18506,7 @@ modify-on-A
# This one is more concise.
dotest multibranch2-12 "${testcvs} -q log -r1.1 file1" \
"
-RCS file: ${TESTDIR}/cvsroot/first-dir/file1,v
+RCS file: ${CVSROOT_DIRNAME}/first-dir/file1,v
Working file: file1
head: 1\.1
branch:
@@ -16555,13 +18533,13 @@ add
[UP] file2"
dotest multibranch2-14 "${testcvs} -q update -r A -j B file2" \
"[UP] file2
-RCS file: ${TESTDIR}/cvsroot/first-dir/file2,v
+RCS file: ${CVSROOT_DIRNAME}/first-dir/file2,v
retrieving revision 1.1
retrieving revision 1.1.4.1
Merging differences between 1.1 and 1.1.4.1 into file2"
dotest multibranch2-15 "${testcvs} -q ci -m commit-on-A file2" \
"Checking in file2;
-${TESTDIR}/cvsroot/first-dir/file2,v <-- file2
+${CVSROOT_DIRNAME}/first-dir/file2,v <-- file2
new revision: 1\.1\.2\.1; previous revision: 1\.1
done"
cd ../..
@@ -16594,10 +18572,10 @@ done"
"${PROG} [a-z]*: scheduling file .$file. for addition
${PROG} [a-z]*: use .${PROG} commit. to add this file permanently"
dotest tag8k-4 "$testcvs -Q ci -m . $file" \
-"RCS file: ${TESTDIR}/cvsroot/$module/$file,v
+"RCS file: ${CVSROOT_DIRNAME}/$module/$file,v
done
Checking in $file;
-${TESTDIR}/cvsroot/$module/$file,v <-- $file
+${CVSROOT_DIRNAME}/$module/$file,v <-- $file
initial revision: 1\.1
done"
@@ -16605,7 +18583,7 @@ done"
echo a > $file
dotest tag8k-5 "$testcvs -Q ci -m . $file" \
"Checking in $file;
-${TESTDIR}/cvsroot/$module/$file,v <-- $file
+${CVSROOT_DIRNAME}/$module/$file,v <-- $file
new revision: 1\.2; previous revision: 1\.1
done"
@@ -16629,7 +18607,7 @@ done"
dotest tag8k-16 "$testcvs -Q tag $t-a $file" ''
# Extract the author value.
- name=`sed -n 's/.*; author \([^;]*\);.*/\1/p' ${TESTDIR}/cvsroot/$module/$file,v|head -1`
+ name=`sed -n 's/.*; author \([^;]*\);.*/\1/p' ${CVSROOT_DIRNAME}/$module/$file,v|head -1`
# Form a suffix string of length (16 - length($name)).
# CAREFUL: this will lose if $name is longer than 16.
@@ -16645,7 +18623,7 @@ done"
echo a >> $file
dotest tag8k-18 "$testcvs -Q ci -m . $file" \
"Checking in $file;
-${TESTDIR}/cvsroot/$module/$file,v <-- $file
+${CVSROOT_DIRNAME}/$module/$file,v <-- $file
new revision: 1\.3; previous revision: 1\.2
done"
cd ../..
@@ -16682,7 +18660,7 @@ done"
dotest admin-1 "${testcvs} -q co -l ." ''
mkdir first-dir
dotest admin-2 "${testcvs} add first-dir" \
-"Directory ${TESTDIR}/cvsroot/first-dir added to the repository"
+"Directory ${CVSROOT_DIRNAME}/first-dir added to the repository"
cd first-dir
dotest_fail admin-3 "${testcvs} -q admin -i file1" \
@@ -16700,16 +18678,16 @@ ${PROG} \[admin aborted\]: specify ${PROG} -H admin for usage information"
${PROG} [a-z]*: scheduling file .file2. for addition
${PROG} [a-z]*: use .${PROG} commit. to add these files permanently"
dotest admin-6 "${testcvs} -q ci -m add" \
-"RCS file: ${TESTDIR}/cvsroot/first-dir/file1,v
+"RCS file: ${CVSROOT_DIRNAME}/first-dir/file1,v
done
Checking in file1;
-${TESTDIR}/cvsroot/first-dir/file1,v <-- file1
+${CVSROOT_DIRNAME}/first-dir/file1,v <-- file1
initial revision: 1\.1
done
-RCS file: ${TESTDIR}/cvsroot/first-dir/file2,v
+RCS file: ${CVSROOT_DIRNAME}/first-dir/file2,v
done
Checking in file2;
-${TESTDIR}/cvsroot/first-dir/file2,v <-- file2
+${CVSROOT_DIRNAME}/first-dir/file2,v <-- file2
initial revision: 1\.1
done"
dotest admin-7 "${testcvs} -q tag -b br" "T file1
@@ -16718,7 +18696,7 @@ T file2"
echo 'add a line on the branch' >> file1
dotest admin-9 "${testcvs} -q ci -m modify-on-branch" \
"Checking in file1;
-${TESTDIR}/cvsroot/first-dir/file1,v <-- file1
+${CVSROOT_DIRNAME}/first-dir/file1,v <-- file1
new revision: 1\.1\.2\.1; previous revision: 1\.1
done"
dotest admin-10 "${testcvs} -q update -A" "U file1"
@@ -16735,12 +18713,12 @@ ${PROG} \[[a-z]* aborted\]: attempt to specify a numeric revision"
# try a bad symbolic revision
dotest_fail admin-10c "${testcvs} -q admin -bBOGUS" \
-"RCS file: ${TESTDIR}/cvsroot/first-dir/file1,v
-${PROG} [a-z]*: ${TESTDIR}/cvsroot/first-dir/file1,v: Symbolic name BOGUS is undefined.
-${PROG} [a-z]*: cannot modify RCS file for .file1.
-RCS file: ${TESTDIR}/cvsroot/first-dir/file2,v
-${PROG} [a-z]*: ${TESTDIR}/cvsroot/first-dir/file2,v: Symbolic name BOGUS is undefined.
-${PROG} [a-z]*: cannot modify RCS file for .file2."
+"RCS file: ${CVSROOT_DIRNAME}/first-dir/file1,v
+${PROG} [a-z]*: ${CVSROOT_DIRNAME}/first-dir/file1,v: Symbolic name BOGUS is undefined.
+${PROG} [a-z]*: RCS file for .file1. not modified\.
+RCS file: ${CVSROOT_DIRNAME}/first-dir/file2,v
+${PROG} [a-z]*: ${CVSROOT_DIRNAME}/first-dir/file2,v: Symbolic name BOGUS is undefined.
+${PROG} [a-z]*: RCS file for .file2. not modified\."
# Note that -s option applies to the new default branch, not
# the old one.
@@ -16749,10 +18727,10 @@ ${PROG} [a-z]*: cannot modify RCS file for .file2."
# to change that once CVS parses options.
dotest admin-11 "${testcvs} -q admin -afoo,bar -abaz \
-b1.1.2 -cxx -U -sfoo file1" \
-"RCS file: ${TESTDIR}/cvsroot/first-dir/file1,v
+"RCS file: ${CVSROOT_DIRNAME}/first-dir/file1,v
done"
dotest admin-11a "${testcvs} log -N file1" "
-RCS file: ${TESTDIR}/cvsroot/first-dir/file1,v
+RCS file: ${CVSROOT_DIRNAME}/first-dir/file1,v
Working file: file1
head: 1\.1
branch: 1\.1\.2
@@ -16775,10 +18753,10 @@ date: [0-9/]* [0-9:]*; author: ${username}; state: foo; lines: ${PLUS}1 -0
modify-on-branch
============================================================================="
dotest admin-12 "${testcvs} -q admin -bbr file1" \
-"RCS file: ${TESTDIR}/cvsroot/first-dir/file1,v
+"RCS file: ${CVSROOT_DIRNAME}/first-dir/file1,v
done"
dotest admin-12a "${testcvs} log -N file1" "
-RCS file: ${TESTDIR}/cvsroot/first-dir/file1,v
+RCS file: ${CVSROOT_DIRNAME}/first-dir/file1,v
Working file: file1
head: 1\.1
branch: 1\.1\.2
@@ -16859,10 +18837,10 @@ add a line on the branch
@"
dotest admin-14 "${testcvs} -q admin -aauth3 -aauth2,foo \
-soneone:1.1 -m1.1:changed-log-message -ntagone: file2" \
-"RCS file: ${TESTDIR}/cvsroot/first-dir/file2,v
+"RCS file: ${CVSROOT_DIRNAME}/first-dir/file2,v
done"
dotest admin-15 "${testcvs} -q log file2" "
-RCS file: ${TESTDIR}/cvsroot/first-dir/file2,v
+RCS file: ${CVSROOT_DIRNAME}/first-dir/file2,v
Working file: file2
head: 1\.1
branch:
@@ -16885,10 +18863,10 @@ changed-log-message
dotest admin-16 "${testcvs} -q admin \
-A${CVSROOT_DIRNAME}/first-dir/file2,v -b -L -Nbr:1.1 file1" \
-"RCS file: ${TESTDIR}/cvsroot/first-dir/file1,v
+"RCS file: ${CVSROOT_DIRNAME}/first-dir/file1,v
done"
dotest admin-17 "${testcvs} -q log file1" "
-RCS file: ${TESTDIR}/cvsroot/first-dir/file1,v
+RCS file: ${CVSROOT_DIRNAME}/first-dir/file1,v
Working file: file1
head: 1\.1
branch:
@@ -16916,14 +18894,14 @@ modify-on-branch
============================================================================="
dotest_fail admin-18 "${testcvs} -q admin -nbr:1.1.2 file1" \
-"RCS file: ${TESTDIR}/cvsroot/first-dir/file1,v
-${PROG} [a-z]*: ${TESTDIR}/cvsroot/first-dir/file1,v: symbolic name br already bound to 1\.1
-${PROG} [a-z]*: cannot modify RCS file for .file1."
+"RCS file: ${CVSROOT_DIRNAME}/first-dir/file1,v
+${PROG} [a-z]*: ${CVSROOT_DIRNAME}/first-dir/file1,v: symbolic name br already bound to 1\.1
+${PROG} [a-z]*: RCS file for .file1. not modified\."
dotest admin-19 "${testcvs} -q admin -ebaz -ebar,auth3 -nbr file1" \
-"RCS file: ${TESTDIR}/cvsroot/first-dir/file1,v
+"RCS file: ${CVSROOT_DIRNAME}/first-dir/file1,v
done"
dotest admin-20 "${testcvs} -q log file1" "
-RCS file: ${TESTDIR}/cvsroot/first-dir/file1,v
+RCS file: ${CVSROOT_DIRNAME}/first-dir/file1,v
Working file: file1
head: 1\.1
branch:
@@ -16952,19 +18930,18 @@ modify-on-branch
# relative pathnames in admin -A?
dotest_fail admin-19a-nonexist \
"${testcvs} -q admin -A${TESTDIR}/foo/bar file1" \
-"RCS file: ${TESTDIR}/cvsroot/first-dir/file1,v
+"RCS file: ${CVSROOT_DIRNAME}/first-dir/file1,v
${PROG} [a-z]*: Couldn't open rcs file .${TESTDIR}/foo/bar.: No such file or directory
${PROG} \[[a-z]* aborted\]: cannot continue"
# In the remote case, we are cd'd off into the temp directory
# and so these tests give "No such file or directory" errors.
- if test "x$remote" = xno; then
-
- dotest admin-19a-admin "${testcvs} -q admin -A../../cvsroot/first-dir/file2,v file1" \
-"RCS file: ${TESTDIR}/cvsroot/first-dir/file1,v
+ if $remote; then :; else
+ dotest admin-19a-admin "${testcvs} -q admin -A../../cvsroot/first-dir/file2,v file1" \
+"RCS file: ${CVSROOT_DIRNAME}/first-dir/file1,v
done"
- dotest admin-19a-log "${testcvs} -q log -h -N file1" "
-RCS file: ${TESTDIR}/cvsroot/first-dir/file1,v
+ dotest admin-19a-log "${testcvs} -q log -h -N file1" "
+RCS file: ${CVSROOT_DIRNAME}/first-dir/file1,v
Working file: file1
head: 1\.1
branch:
@@ -16980,10 +18957,10 @@ total revisions: 2
# Now test that plain -e works right.
dotest admin-19a-2 "${testcvs} -q admin -e file1" \
-"RCS file: ${TESTDIR}/cvsroot/first-dir/file1,v
+"RCS file: ${CVSROOT_DIRNAME}/first-dir/file1,v
done"
dotest admin-19a-3 "${testcvs} -q log -h -N file1" "
-RCS file: ${TESTDIR}/cvsroot/first-dir/file1,v
+RCS file: ${CVSROOT_DIRNAME}/first-dir/file1,v
Working file: file1
head: 1\.1
branch:
@@ -16995,18 +18972,18 @@ total revisions: 2
# Put the access list back, to avoid special cases later.
dotest admin-19a-4 "${testcvs} -q admin -afoo,auth2 file1" \
-"RCS file: ${TESTDIR}/cvsroot/first-dir/file1,v
+"RCS file: ${CVSROOT_DIRNAME}/first-dir/file1,v
done"
# Add another revision to file2, so we can delete one.
echo 'add a line' >> file2
dotest admin-21 "${testcvs} -q ci -m modify file2" \
"Checking in file2;
-${TESTDIR}/cvsroot/first-dir/file2,v <-- file2
+${CVSROOT_DIRNAME}/first-dir/file2,v <-- file2
new revision: 1\.2; previous revision: 1\.1
done"
dotest admin-22 "${testcvs} -q admin -o1.1 file2" \
-"RCS file: ${TESTDIR}/cvsroot/first-dir/file2,v
+"RCS file: ${CVSROOT_DIRNAME}/first-dir/file2,v
deleting revision 1\.1
done"
# Test admin -o. More variants that we could be testing:
@@ -17020,48 +18997,48 @@ done"
"${PROG} [a-z]*: scheduling file .aaa. for addition
${PROG} [a-z]*: use .${PROG} commit. to add this file permanently"
dotest admin-22-o2 "${testcvs} -q ci -m first aaa" \
-"RCS file: ${TESTDIR}/cvsroot/first-dir/aaa,v
+"RCS file: ${CVSROOT_DIRNAME}/first-dir/aaa,v
done
Checking in aaa;
-${TESTDIR}/cvsroot/first-dir/aaa,v <-- aaa
+${CVSROOT_DIRNAME}/first-dir/aaa,v <-- aaa
initial revision: 1\.1
done"
echo second rev >> aaa
dotest admin-22-o3 "${testcvs} -q ci -m second aaa" \
"Checking in aaa;
-${TESTDIR}/cvsroot/first-dir/aaa,v <-- aaa
+${CVSROOT_DIRNAME}/first-dir/aaa,v <-- aaa
new revision: 1\.2; previous revision: 1\.1
done"
echo third rev >> aaa
dotest admin-22-o4 "${testcvs} -q ci -m third aaa" \
"Checking in aaa;
-${TESTDIR}/cvsroot/first-dir/aaa,v <-- aaa
+${CVSROOT_DIRNAME}/first-dir/aaa,v <-- aaa
new revision: 1\.3; previous revision: 1\.2
done"
echo fourth rev >> aaa
dotest admin-22-o5 "${testcvs} -q ci -m fourth aaa" \
"Checking in aaa;
-${TESTDIR}/cvsroot/first-dir/aaa,v <-- aaa
+${CVSROOT_DIRNAME}/first-dir/aaa,v <-- aaa
new revision: 1\.4; previous revision: 1\.3
done"
echo fifth rev >>aaa
dotest admin-22-o6 "${testcvs} -q ci -m fifth aaa" \
"Checking in aaa;
-${TESTDIR}/cvsroot/first-dir/aaa,v <-- aaa
+${CVSROOT_DIRNAME}/first-dir/aaa,v <-- aaa
new revision: 1\.5; previous revision: 1\.4
done"
echo sixth rev >> aaa
dotest admin-22-o7 "${testcvs} -q ci -m sixth aaa" \
"Checking in aaa;
-${TESTDIR}/cvsroot/first-dir/aaa,v <-- aaa
+${CVSROOT_DIRNAME}/first-dir/aaa,v <-- aaa
new revision: 1\.6; previous revision: 1\.5
done"
dotest admin-22-o8 "${testcvs} admin -l1.6 aaa" \
-"RCS file: ${TESTDIR}/cvsroot/first-dir/aaa,v
+"RCS file: ${CVSROOT_DIRNAME}/first-dir/aaa,v
1\.6 locked
done"
dotest admin-22-o9 "${testcvs} log -r1.6 aaa" "
-RCS file: ${TESTDIR}/cvsroot/first-dir/aaa,v
+RCS file: ${CVSROOT_DIRNAME}/first-dir/aaa,v
Working file: aaa
head: 1\.6
branch:
@@ -17078,20 +19055,20 @@ date: [0-9/]* [0-9:]*; author: ${username}; state: Exp; lines: ${PLUS}1 -0
sixth
============================================================================="
dotest_fail admin-22-o10 "${testcvs} admin -o1.5: aaa" \
-"RCS file: ${TESTDIR}/cvsroot/first-dir/aaa,v
-${PROG} [a-z]*: ${TESTDIR}/cvsroot/first-dir/aaa,v: can't remove locked revision 1\.6
-${PROG} [a-z]*: cannot modify RCS file for .aaa."
+"RCS file: ${CVSROOT_DIRNAME}/first-dir/aaa,v
+${PROG} [a-z]*: ${CVSROOT_DIRNAME}/first-dir/aaa,v: can't remove locked revision 1\.6
+${PROG} [a-z]*: RCS file for .aaa. not modified\."
dotest admin-22-o11 "${testcvs} admin -u aaa" \
-"RCS file: ${TESTDIR}/cvsroot/first-dir/aaa,v
+"RCS file: ${CVSROOT_DIRNAME}/first-dir/aaa,v
1\.6 unlocked
done"
dotest admin-22-o12 "${testcvs} admin -o1.5: aaa" \
-"RCS file: ${TESTDIR}/cvsroot/first-dir/aaa,v
+"RCS file: ${CVSROOT_DIRNAME}/first-dir/aaa,v
deleting revision 1\.6
deleting revision 1\.5
done"
dotest admin-22-o13 "${testcvs} log aaa" "
-RCS file: ${TESTDIR}/cvsroot/first-dir/aaa,v
+RCS file: ${CVSROOT_DIRNAME}/first-dir/aaa,v
Working file: aaa
head: 1\.4
branch:
@@ -17124,18 +19101,18 @@ first
echo new branch rev >> aaa
dotest admin-22-o16 "${testcvs} ci -m new-branch aaa" \
"Checking in aaa;
-${TESTDIR}/cvsroot/first-dir/aaa,v <-- aaa
+${CVSROOT_DIRNAME}/first-dir/aaa,v <-- aaa
new revision: 1\.3\.2\.1; previous revision: 1\.3
done"
dotest_fail admin-22-o17 "${testcvs} admin -o1.2:1.4 aaa" \
-"RCS file: ${TESTDIR}/cvsroot/first-dir/aaa,v
+"RCS file: ${CVSROOT_DIRNAME}/first-dir/aaa,v
deleting revision 1\.4
-${PROG} [a-z]*: ${TESTDIR}/cvsroot/first-dir/aaa,v: can't remove branch point 1\.3
-${PROG} [a-z]*: cannot modify RCS file for .aaa."
+${PROG} [a-z]*: ${CVSROOT_DIRNAME}/first-dir/aaa,v: can't remove branch point 1\.3
+${PROG} [a-z]*: RCS file for .aaa. not modified\."
dotest admin-22-o18 "${testcvs} update -p -r1.4 aaa" \
"===================================================================
Checking out aaa
-RCS: ${TESTDIR}/cvsroot/first-dir/aaa,v
+RCS: ${CVSROOT_DIRNAME}/first-dir/aaa,v
VERS: 1\.4
\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*
first rev
@@ -17145,29 +19122,29 @@ fourth rev"
echo second branch rev >> aaa
dotest admin-22-o19 "${testcvs} ci -m branch-two aaa" \
"Checking in aaa;
-${TESTDIR}/cvsroot/first-dir/aaa,v <-- aaa
+${CVSROOT_DIRNAME}/first-dir/aaa,v <-- aaa
new revision: 1\.3\.2\.2; previous revision: 1\.3\.2\.1
done"
echo third branch rev >> aaa
dotest admin-22-o20 "${testcvs} ci -m branch-three aaa" \
"Checking in aaa;
-${TESTDIR}/cvsroot/first-dir/aaa,v <-- aaa
+${CVSROOT_DIRNAME}/first-dir/aaa,v <-- aaa
new revision: 1\.3\.2\.3; previous revision: 1\.3\.2\.2
done"
echo fourth branch rev >> aaa
dotest admin-22-o21 "${testcvs} ci -m branch-four aaa" \
"Checking in aaa;
-${TESTDIR}/cvsroot/first-dir/aaa,v <-- aaa
+${CVSROOT_DIRNAME}/first-dir/aaa,v <-- aaa
new revision: 1\.3\.2\.4; previous revision: 1\.3\.2\.3
done"
dotest admin-22-o22 "${testcvs} admin -o:1.3.2.3 aaa" \
-"RCS file: ${TESTDIR}/cvsroot/first-dir/aaa,v
+"RCS file: ${CVSROOT_DIRNAME}/first-dir/aaa,v
deleting revision 1\.3\.2\.1
deleting revision 1\.3\.2\.2
deleting revision 1\.3\.2\.3
done"
dotest admin-22-o23 "${testcvs} log aaa" "
-RCS file: ${TESTDIR}/cvsroot/first-dir/aaa,v
+RCS file: ${CVSROOT_DIRNAME}/first-dir/aaa,v
Working file: aaa
head: 1\.4
branch:
@@ -17215,7 +19192,7 @@ fourth branch rev"
# wonder whether the "cvs admin -o" should give a warning in
# this case.
dotest admin-23 "${testcvs} -q log file2" "
-RCS file: ${TESTDIR}/cvsroot/first-dir/file2,v
+RCS file: ${CVSROOT_DIRNAME}/first-dir/file2,v
Working file: file2
head: 1\.2
branch:
@@ -17287,27 +19264,27 @@ add a line on the branch
# tagtwo should be a revision
#
dotest admin-26-1 "${testcvs} admin -ntagtwo:tagone file2" \
-"RCS file: ${TESTDIR}/cvsroot/first-dir/file2,v
+"RCS file: ${CVSROOT_DIRNAME}/first-dir/file2,v
done"
# br1 should be a branch
#
dotest admin-26-2 "${testcvs} admin -nbr1:br file2" \
-"RCS file: ${TESTDIR}/cvsroot/first-dir/file2,v
+"RCS file: ${CVSROOT_DIRNAME}/first-dir/file2,v
done"
# Attach some tags using RCS versions
#
dotest admin-26-3 "${testcvs} admin -ntagthree:1.1 file2" \
-"RCS file: ${TESTDIR}/cvsroot/first-dir/file2,v
+"RCS file: ${CVSROOT_DIRNAME}/first-dir/file2,v
done"
dotest admin-26-4 "${testcvs} admin -nbr2:1.1.2 file2" \
-"RCS file: ${TESTDIR}/cvsroot/first-dir/file2,v
+"RCS file: ${CVSROOT_DIRNAME}/first-dir/file2,v
done"
dotest admin-26-5 "${testcvs} admin -nbr4:1.1.0.2 file2" \
-"RCS file: ${TESTDIR}/cvsroot/first-dir/file2,v
+"RCS file: ${CVSROOT_DIRNAME}/first-dir/file2,v
done"
# Check results so far
@@ -17317,7 +19294,7 @@ done"
File: file2 Status: Up-to-date
Working revision: 1\.2.*
- Repository revision: 1\.2 ${TESTDIR}/cvsroot/first-dir/file2,v
+ Repository revision: 1\.2 ${CVSROOT_DIRNAME}/first-dir/file2,v
Sticky Tag: (none)
Sticky Date: (none)
Sticky Options: (none)
@@ -17337,68 +19314,74 @@ File: file2 Status: Up-to-date
echo "nuthr_line" >> file2
dotest admin-27-1 "${testcvs} commit -m nuthr_line file2" \
"Checking in file2;
-${TESTDIR}/cvsroot/first-dir/file2,v <-- file2
+${CVSROOT_DIRNAME}/first-dir/file2,v <-- file2
new revision: 1\.3; previous revision: 1\.2
done"
echo "yet_another" >> file2
dotest admin-27-2 "${testcvs} commit -m yet_another file2" \
"Checking in file2;
-${TESTDIR}/cvsroot/first-dir/file2,v <-- file2
+${CVSROOT_DIRNAME}/first-dir/file2,v <-- file2
new revision: 1\.4; previous revision: 1\.3
done"
# Fail trying to reattach existing tag with -n
#
dotest admin-27-3 "${testcvs} admin -ntagfour:1.1 file2" \
-"RCS file: ${TESTDIR}/cvsroot/first-dir/file2,v
+"RCS file: ${CVSROOT_DIRNAME}/first-dir/file2,v
done"
dotest_fail admin-27-4 "${testcvs} admin -ntagfour:1.3 file2" \
-"RCS file: ${TESTDIR}/cvsroot/first-dir/file2,v
-${PROG} [a-z]*: ${TESTDIR}/cvsroot/first-dir/file2,v: symbolic name tagfour already bound to 1\.1
-${PROG} [a-z]*: cannot modify RCS file for .file2."
+"RCS file: ${CVSROOT_DIRNAME}/first-dir/file2,v
+${PROG} [a-z]*: ${CVSROOT_DIRNAME}/first-dir/file2,v: symbolic name tagfour already bound to 1\.1
+${PROG} [a-z]*: RCS file for .file2. not modified\."
# Succeed at reattaching existing tag, using -N
#
dotest admin-27-5 "${testcvs} admin -Ntagfour:1.3 file2" \
-"RCS file: ${TESTDIR}/cvsroot/first-dir/file2,v
+"RCS file: ${CVSROOT_DIRNAME}/first-dir/file2,v
done"
# Fail on some bogus operations
# Try to attach to nonexistant tag
#
- dotest_fail admin-28-1 "${testcvs} admin -ntagsix:tagfive file2" \
-"RCS file: ${TESTDIR}/cvsroot/first-dir/file2,v
-${PROG} \[[a-z]* aborted\]: tag .tagfive. does not exist"
+ dotest_fail admin-28-1 "${testcvs} admin -ntagsix:tagfive file2" \
+"RCS file: ${CVSROOT_DIRNAME}/first-dir/file2,v
+${PROG} [a-z]*: ${CVSROOT_DIRNAME}/first-dir/file2,v: Symbolic name or revision tagfive is undefined\.
+${PROG} [a-z]*: RCS file for .file2. not modified\."
# Try a some nonexisting numeric target tags
#
dotest_fail admin-28-2 "${testcvs} admin -ntagseven:2.1 file2" \
-"RCS file: ${TESTDIR}/cvsroot/first-dir/file2,v
+"RCS file: ${CVSROOT_DIRNAME}/first-dir/file2,v
${PROG} \[[a-z]* aborted\]: revision .2\.1. does not exist"
dotest_fail admin-28-3 "${testcvs} admin -ntageight:2.1.2 file2" \
-"RCS file: ${TESTDIR}/cvsroot/first-dir/file2,v
+"RCS file: ${CVSROOT_DIRNAME}/first-dir/file2,v
${PROG} \[[a-z]* aborted\]: revision .2\.1\.2. does not exist"
# Try some invalid targets
#
dotest_fail admin-28-4 "${testcvs} admin -ntagnine:1.a.2 file2" \
-"RCS file: ${TESTDIR}/cvsroot/first-dir/file2,v
+"RCS file: ${CVSROOT_DIRNAME}/first-dir/file2,v
${PROG} \[[a-z]* aborted\]: tag .1\.a\.2. must start with a letter"
- dotest_fail admin-28-5 "${testcvs} admin -ntagten:BO+GUS file2" \
-"RCS file: ${TESTDIR}/cvsroot/first-dir/file2,v
-${PROG} \[[a-z]* aborted\]: tag .BO${PLUS}GUS. does not exist"
-
+ # Confirm that a missing tag is not a fatal error.
+ dotest admin-28-5.1 "${testcvs} -Q tag BO+GUS file1" ''
+ dotest_fail admin-28-5.2 "${testcvs} admin -ntagten:BO+GUS file2 file1" \
+"RCS file: ${CVSROOT_DIRNAME}/first-dir/file2,v
+${PROG} [a-z]*: ${CVSROOT_DIRNAME}/first-dir/file2,v: Symbolic name or revision BO${PLUS}GUS is undefined\.
+${PROG} [a-z]*: RCS file for .file2. not modified\.
+RCS file: ${CVSROOT_DIRNAME}/first-dir/file1,v
+done"
+
dotest_fail admin-28-6 "${testcvs} admin -nq.werty:tagfour file2" \
-"RCS file: ${TESTDIR}/cvsroot/first-dir/file2,v
+"RCS file: ${CVSROOT_DIRNAME}/first-dir/file2,v
${PROG} \[[a-z]* aborted\]: tag .q\.werty. must not contain the characters ..*"
# Verify the archive
#
- dotest admin-29 "cat ${TESTDIR}/cvsroot/first-dir/file2,v" \
+ dotest admin-29 "cat ${CVSROOT_DIRNAME}/first-dir/file2,v" \
"head 1\.4;
access
auth3
@@ -17487,26 +19470,26 @@ text
dotest reserved-1 "${testcvs} -q co -l ." ''
mkdir first-dir
dotest reserved-2 "${testcvs} add first-dir" \
-"Directory ${TESTDIR}/cvsroot/first-dir added to the repository"
+"Directory ${CVSROOT_DIRNAME}/first-dir added to the repository"
cd first-dir
touch file1
dotest reserved-3 "${testcvs} add file1" \
"${PROG} [a-z]*: scheduling file .file1. for addition
${PROG} [a-z]*: use .${PROG} commit. to add this file permanently"
dotest reserved-4 "${testcvs} -q ci -m add" \
-"RCS file: ${TESTDIR}/cvsroot/first-dir/file1,v
+"RCS file: ${CVSROOT_DIRNAME}/first-dir/file1,v
done
Checking in file1;
-${TESTDIR}/cvsroot/first-dir/file1,v <-- file1
+${CVSROOT_DIRNAME}/first-dir/file1,v <-- file1
initial revision: 1\.1
done"
dotest reserved-5 "${testcvs} -q admin -l file1" \
-"RCS file: ${TESTDIR}/cvsroot/first-dir/file1,v
+"RCS file: ${CVSROOT_DIRNAME}/first-dir/file1,v
1\.1 locked
done"
dotest reserved-6 "${testcvs} log -N file1" "
-RCS file: ${TESTDIR}/cvsroot/first-dir/file1,v
+RCS file: ${CVSROOT_DIRNAME}/first-dir/file1,v
Working file: file1
head: 1\.1
branch:
@@ -17525,12 +19508,12 @@ add
# Note that this just tests the owner of the lock giving
# it up. It doesn't test breaking a lock.
dotest reserved-7 "${testcvs} -q admin -u file1" \
-"RCS file: ${TESTDIR}/cvsroot/first-dir/file1,v
+"RCS file: ${CVSROOT_DIRNAME}/first-dir/file1,v
1\.1 unlocked
done"
dotest reserved-8 "${testcvs} log -N file1" "
-RCS file: ${TESTDIR}/cvsroot/first-dir/file1,v
+RCS file: ${CVSROOT_DIRNAME}/first-dir/file1,v
Working file: file1
head: 1\.1
branch:
@@ -17562,7 +19545,7 @@ if test -z "\$line"; then
else
user=\`echo \$line | sed -e 's/locks \\(${author}\\):[0-9.]*;.*/\\1/'\`
version=\`echo \$line | sed -e 's/locks ${author}:\\([0-9.]*\\);.*/\\1/'\`
- echo "\$user has file a-lock locked for version \$version"
+ echo "\$user has file a-lock locked for version \$version" >&2
exit 1
fi
EOF
@@ -17573,10 +19556,10 @@ EOF
"${PROG} [a-z]*: scheduling file .a-lock. for addition
${PROG} [a-z]*: use .${PROG} commit. to add this file permanently"
dotest reserved-10 "${testcvs} -q ci -m new a-lock" \
-"RCS file: ${TESTDIR}/cvsroot/first-dir/a-lock,v
+"RCS file: ${CVSROOT_DIRNAME}/first-dir/a-lock,v
done
Checking in a-lock;
-${TESTDIR}/cvsroot/first-dir/a-lock,v <-- a-lock
+${CVSROOT_DIRNAME}/first-dir/a-lock,v <-- a-lock
initial revision: 1\.1
done"
# FIXME: the contents of CVSROOT fluctuate a lot
@@ -17593,7 +19576,7 @@ done"
echo "DEFAULT ${TESTDIR}/lockme" >>commitinfo
dotest reserved-12 "${testcvs} -q ci -m rcslock commitinfo" \
"Checking in commitinfo;
-${TESTDIR}/cvsroot/CVSROOT/commitinfo,v <-- commitinfo
+${CVSROOT_DIRNAME}/CVSROOT/commitinfo,v <-- commitinfo
new revision: 1\.2; previous revision: 1\.1
done
${PROG} [a-z]*: Rebuilding administrative file database"
@@ -17601,10 +19584,10 @@ ${PROG} [a-z]*: Rebuilding administrative file database"
# Simulate (approximately) what a-lock would look like
# if someone else had locked revision 1.1.
- sed -e 's/locks; strict;/locks fred:1.1; strict;/' ${TESTDIR}/cvsroot/first-dir/a-lock,v > a-lock,v
- chmod 644 ${TESTDIR}/cvsroot/first-dir/a-lock,v
- dotest reserved-13 "mv a-lock,v ${TESTDIR}/cvsroot/first-dir/a-lock,v"
- chmod 444 ${TESTDIR}/cvsroot/first-dir/a-lock,v
+ sed -e 's/locks; strict;/locks fred:1.1; strict;/' ${CVSROOT_DIRNAME}/first-dir/a-lock,v > a-lock,v
+ chmod 644 ${CVSROOT_DIRNAME}/first-dir/a-lock,v
+ dotest reserved-13 "mv a-lock,v ${CVSROOT_DIRNAME}/first-dir/a-lock,v"
+ chmod 444 ${CVSROOT_DIRNAME}/first-dir/a-lock,v
echo more stuff >> a-lock
dotest_fail reserved-13b "${testcvs} ci -m '' a-lock" \
"fred has file a-lock locked for version 1\.1
@@ -17613,31 +19596,31 @@ ${PROG} \[[a-z]* aborted\]: correct above errors first!"
# OK, now test "cvs admin -l" in the case where someone
# else has the file locked.
dotest_fail reserved-13c "${testcvs} admin -l a-lock" \
-"RCS file: ${TESTDIR}/cvsroot/first-dir/a-lock,v
+"RCS file: ${CVSROOT_DIRNAME}/first-dir/a-lock,v
${PROG} \[[a-z]* aborted\]: Revision 1\.1 is already locked by fred"
dotest reserved-14 "${testcvs} admin -u1.1 a-lock" \
-"RCS file: ${TESTDIR}/cvsroot/first-dir/a-lock,v
+"RCS file: ${CVSROOT_DIRNAME}/first-dir/a-lock,v
1\.1 unlocked
done"
dotest reserved-15 "${testcvs} -q ci -m success a-lock" \
"Checking in a-lock;
-${TESTDIR}/cvsroot/first-dir/a-lock,v <-- a-lock
+${CVSROOT_DIRNAME}/first-dir/a-lock,v <-- a-lock
new revision: 1\.2; previous revision: 1\.1
done"
# Now test for a bug involving branches and locks
- sed -e 's/locks; strict;/locks fred:1.2; strict;/' ${TESTDIR}/cvsroot/first-dir/a-lock,v > a-lock,v
- chmod 644 ${TESTDIR}/cvsroot/first-dir/a-lock,v
+ sed -e 's/locks; strict;/locks fred:1.2; strict;/' ${CVSROOT_DIRNAME}/first-dir/a-lock,v > a-lock,v
+ chmod 644 ${CVSROOT_DIRNAME}/first-dir/a-lock,v
dotest reserved-16 \
-"mv a-lock,v ${TESTDIR}/cvsroot/first-dir/a-lock,v" ""
- chmod 444 ${TESTDIR}/cvsroot/first-dir/a-lock,v
+"mv a-lock,v ${CVSROOT_DIRNAME}/first-dir/a-lock,v" ""
+ chmod 444 ${CVSROOT_DIRNAME}/first-dir/a-lock,v
dotest reserved-17 "${testcvs} -q tag -b br a-lock" "T a-lock"
dotest reserved-18 "${testcvs} -q update -r br a-lock" ""
echo edit it >>a-lock
dotest reserved-19 "${testcvs} -q ci -m modify a-lock" \
"Checking in a-lock;
-${TESTDIR}/cvsroot/first-dir/a-lock,v <-- a-lock
+${CVSROOT_DIRNAME}/first-dir/a-lock,v <-- a-lock
new revision: 1\.2\.2\.1; previous revision: 1\.2
done"
@@ -17646,7 +19629,7 @@ done"
echo '# vanilla commitinfo' >commitinfo
dotest reserved-cleanup-1 "${testcvs} -q ci -m back commitinfo" \
"Checking in commitinfo;
-${TESTDIR}/cvsroot/CVSROOT/commitinfo,v <-- commitinfo
+${CVSROOT_DIRNAME}/CVSROOT/commitinfo,v <-- commitinfo
new revision: 1\.3; previous revision: 1\.2
done
${PROG} [a-z]*: Rebuilding administrative file database"
@@ -17691,149 +19674,152 @@ ${PROG} [a-z]*: Rebuilding administrative file database"
mkdir diffmerge1
cd diffmerge1
- # The text of the file is inlined here because `echo' loses
- # newlines, and I don't know how portable the -e flag is.
- #
- # This is the file we both start out with:
- echo "// Button.java
-
-package random.application;
-
-import random.util.star;
-
-public class Button
-{
- /star Instantiates a Button with origin (0, 0) and zero width and height.
- star You must call an initializer method to properly initialize the Button.
- star/
- public Button ()
- {
- super ();
-
- _titleColor = Color.black;
- _disabledTitleColor = Color.gray;
- _titleFont = Font.defaultFont ();
- }
-
- /star Convenience constructor for instantiating a Button with
- star bounds x, y, width, and height. Equivalent to
- star foo = new Button ();
- star foo.init (x, y, width, height);
- star/
- public Button (int x, int y, int width, int height)
- {
- this ();
- init (x, y, width, height);
- }
-}" > the_file
+ # These are the files we both start out with:
+ mkdir import
+ cd import
+ diffmerge_create_older_files
dotest diffmerge1_import \
"${testcvs} import -m import diffmerge1 tag1 tag2" \
"${DOTSTAR}No conflicts created by this import"
cd ..
- rm -rf diffmerge1
- # Check out two working copies, one for "you" and one for "me"
- ${testcvs} checkout diffmerge1 >/dev/null 2>&1
- mv diffmerge1 diffmerge1_yours
+ # Check out two working copies, one for "you" and one for
+ # "me". If no branch is used and cvs detects that only one
+ # of the two people made changes, then cvs does not run the
+ # merge algorithm. But if a branch is used, then cvs does run
+ # the merge algorithm (even in this case of only one of the two
+ # people having made changes). CVS used to have a bug in this
+ # case. Therefore, it is important to test this case by
+ # using a branch:
+ ${testcvs} rtag -b tag diffmerge1 >/dev/null 2>&1
+ ${testcvs} checkout -r tag diffmerge1 >/dev/null 2>&1
+ mv diffmerge1 yours
${testcvs} checkout diffmerge1 >/dev/null 2>&1
- mv diffmerge1 diffmerge1_mine
-
- # In your working copy, you'll remove the Button() method, and
- # then check in your change before I check in mine:
- cd diffmerge1_yours
- echo "// Button.java
-
-package random.application;
-
-import random.util.star;
-
-public class Button
-{
- /star Instantiates a Button with origin (0, 0) and zero width and height.
- star You must call an initializer method to properly initialize the Button.
- star/
- public Button ()
- {
- super ();
-
- _titleColor = Color.black;
- _disabledTitleColor = Color.gray;
- _titleFont = Font.defaultFont ();
- }
-}" > the_file
- dotest diffmerge1_yours \
- "${testcvs} ci -m yours" \
- "${DOTSTAR}hecking in ${DOTSTAR}"
+ mv diffmerge1 mine
+
+ # In your working copy, you'll make changes, and
+ # then check in your changes before I check in mine:
+ cd yours
+ diffmerge_create_your_files
+ dotest diffmerge1_yours "${testcvs} -q ci -m yours" \
+"Checking in testcase01;
+${CVSROOT_DIRNAME}/diffmerge1/testcase01,v <-- testcase01
+new revision: 1\.1\.1\.1\.2\.1; previous revision: 1\.1\.1\.1
+done
+Checking in testcase02;
+${CVSROOT_DIRNAME}/diffmerge1/testcase02,v <-- testcase02
+new revision: 1\.1\.1\.1\.2\.1; previous revision: 1\.1\.1\.1
+done
+Checking in testcase03;
+${CVSROOT_DIRNAME}/diffmerge1/testcase03,v <-- testcase03
+new revision: 1\.1\.1\.1\.2\.1; previous revision: 1\.1\.1\.1
+done
+Checking in testcase04;
+${CVSROOT_DIRNAME}/diffmerge1/testcase04,v <-- testcase04
+new revision: 1\.1\.1\.1\.2\.1; previous revision: 1\.1\.1\.1
+done
+Checking in testcase05;
+${CVSROOT_DIRNAME}/diffmerge1/testcase05,v <-- testcase05
+new revision: 1\.1\.1\.1\.2\.1; previous revision: 1\.1\.1\.1
+done
+Checking in testcase06;
+${CVSROOT_DIRNAME}/diffmerge1/testcase06,v <-- testcase06
+new revision: 1\.1\.1\.1\.2\.1; previous revision: 1\.1\.1\.1
+done
+Checking in testcase07;
+${CVSROOT_DIRNAME}/diffmerge1/testcase07,v <-- testcase07
+new revision: 1\.1\.1\.1\.2\.1; previous revision: 1\.1\.1\.1
+done
+Checking in testcase08;
+${CVSROOT_DIRNAME}/diffmerge1/testcase08,v <-- testcase08
+new revision: 1\.1\.1\.1\.2\.1; previous revision: 1\.1\.1\.1
+done
+Checking in testcase09;
+${CVSROOT_DIRNAME}/diffmerge1/testcase09,v <-- testcase09
+new revision: 1\.1\.1\.1\.2\.1; previous revision: 1\.1\.1\.1
+done
+Checking in testcase10;
+${CVSROOT_DIRNAME}/diffmerge1/testcase10,v <-- testcase10
+new revision: 1\.1\.1\.1\.2\.1; previous revision: 1\.1\.1\.1
+done"
- # My working copy still has the Button() method, but I
- # comment out some code at the top of the class. Then I
+ # Change my copy. Then I
# update, after both my modifications and your checkin:
- cd ../diffmerge1_mine
- echo "// Button.java
-
-package random.application;
-
-import random.util.star;
-
-public class Button
-{
- /star Instantiates a Button with origin (0, 0) and zero width and height.
- star You must call an initializer method to properly initialize the Button.
- star/
- public Button ()
- {
- super ();
-
- // _titleColor = Color.black;
- // _disabledTitleColor = Color.gray;
- // _titleFont = Font.defaultFont ();
- }
-
- /star Convenience constructor for instantiating a Button with
- star bounds x, y, width, and height. Equivalent to
- star foo = new Button ();
- star foo.init (x, y, width, height);
- star/
- public Button (int x, int y, int width, int height)
- {
- this ();
- init (x, y, width, height);
- }
-}" > the_file
- dotest diffmerge1_mine \
- "${testcvs} update" \
- "${DOTSTAR}erging${DOTSTAR}"
+ cd ../mine
+ diffmerge_create_my_files
+ dotest diffmerge1_mine "${testcvs} -q update -j tag" \
+"M testcase01
+RCS file: ${CVSROOT_DIRNAME}/diffmerge1/testcase01,v
+retrieving revision 1\.1\.1\.1
+retrieving revision 1\.1\.1\.1\.2\.1
+Merging differences between 1\.1\.1\.1 and 1\.1\.1\.1\.2\.1 into testcase01
+M testcase02
+RCS file: ${CVSROOT_DIRNAME}/diffmerge1/testcase02,v
+retrieving revision 1\.1\.1\.1
+retrieving revision 1\.1\.1\.1\.2\.1
+Merging differences between 1\.1\.1\.1 and 1\.1\.1\.1\.2\.1 into testcase02
+M testcase03
+RCS file: ${CVSROOT_DIRNAME}/diffmerge1/testcase03,v
+retrieving revision 1\.1\.1\.1
+retrieving revision 1\.1\.1\.1\.2\.1
+Merging differences between 1\.1\.1\.1 and 1\.1\.1\.1\.2\.1 into testcase03
+M testcase04
+RCS file: ${CVSROOT_DIRNAME}/diffmerge1/testcase04,v
+retrieving revision 1\.1\.1\.1
+retrieving revision 1\.1\.1\.1\.2\.1
+Merging differences between 1\.1\.1\.1 and 1\.1\.1\.1\.2\.1 into testcase04
+RCS file: ${CVSROOT_DIRNAME}/diffmerge1/testcase05,v
+retrieving revision 1\.1\.1\.1
+retrieving revision 1\.1\.1\.1\.2\.1
+Merging differences between 1\.1\.1\.1 and 1\.1\.1\.1\.2\.1 into testcase05
+RCS file: ${CVSROOT_DIRNAME}/diffmerge1/testcase06,v
+retrieving revision 1\.1\.1\.1
+retrieving revision 1\.1\.1\.1\.2\.1
+Merging differences between 1\.1\.1\.1 and 1\.1\.1\.1\.2\.1 into testcase06
+M testcase07
+RCS file: ${CVSROOT_DIRNAME}/diffmerge1/testcase07,v
+retrieving revision 1\.1\.1\.1
+retrieving revision 1\.1\.1\.1\.2\.1
+Merging differences between 1\.1\.1\.1 and 1\.1\.1\.1\.2\.1 into testcase07
+M testcase08
+RCS file: ${CVSROOT_DIRNAME}/diffmerge1/testcase08,v
+retrieving revision 1\.1\.1\.1
+retrieving revision 1\.1\.1\.1\.2\.1
+Merging differences between 1\.1\.1\.1 and 1\.1\.1\.1\.2\.1 into testcase08
+M testcase09
+RCS file: ${CVSROOT_DIRNAME}/diffmerge1/testcase09,v
+retrieving revision 1\.1\.1\.1
+retrieving revision 1\.1\.1\.1\.2\.1
+Merging differences between 1\.1\.1\.1 and 1\.1\.1\.1\.2\.1 into testcase09
+M testcase10
+RCS file: ${CVSROOT_DIRNAME}/diffmerge1/testcase10,v
+retrieving revision 1\.1\.1\.1
+retrieving revision 1\.1\.1\.1\.2\.1
+Merging differences between 1\.1\.1\.1 and 1\.1\.1\.1\.2\.1 into testcase10"
# So if your changes didn't make it into my working copy, or
- # in any case if the file does not look like the final text as
- # quoted below, then the test flunks:
- echo "// Button.java
-
-package random.application;
-
-import random.util.star;
-
-public class Button
-{
- /star Instantiates a Button with origin (0, 0) and zero width and height.
- star You must call an initializer method to properly initialize the Button.
- star/
- public Button ()
- {
- super ();
+ # in any case if the files do not look like the final text
+ # in the files in directory comp_me, then the test flunks:
+ cd ..
+ mkdir comp_me
+ cd comp_me
+ diffmerge_create_expected_files
+ cd ..
+ rm mine/.#*
- // _titleColor = Color.black;
- // _disabledTitleColor = Color.gray;
- // _titleFont = Font.defaultFont ();
- }
-}" > comp_me
- dotest diffmerge1_cmp "cmp the_file comp_me" ''
+ # If you have GNU's version of diff, you may try
+ # uncommenting the following line which will give more
+ # fine-grained information about how cvs differed from the
+ # correct result:
+ #dotest diffmerge1_cmp "diff -u --recursive --exclude=CVS comp_me mine" ''
+ dotest diffmerge1_cmp "directory_cmp comp_me mine"
# Clean up after ourselves:
cd ..
- rm -rf diffmerge1_yours diffmerge1_mine ${CVSROOT_DIRNAME}/diffmerge1
-
+ if $keep; then :; else
+ rm -rf diffmerge1 ${CVSROOT_DIRNAME}/diffmerge1
+ fi
;;
diffmerge2)
@@ -18537,18 +20523,18 @@ d472 12
dotest release-1 "${testcvs} -q co -l ." ''
mkdir first-dir
dotest release-2 "${testcvs} add first-dir" \
-"Directory ${TESTDIR}/cvsroot/first-dir added to the repository"
+"Directory ${CVSROOT_DIRNAME}/first-dir added to the repository"
cd first-dir
mkdir dir1
dotest release-3 "${testcvs} add dir1" \
-"Directory ${TESTDIR}/cvsroot/first-dir/dir1 added to the repository"
+"Directory ${CVSROOT_DIRNAME}/first-dir/dir1 added to the repository"
mkdir dir2
dotest release-4 "${testcvs} add dir2" \
-"Directory ${TESTDIR}/cvsroot/first-dir/dir2 added to the repository"
+"Directory ${CVSROOT_DIRNAME}/first-dir/dir2 added to the repository"
cd dir2
mkdir dir3
dotest release-5 "${testcvs} add dir3" \
-"Directory ${TESTDIR}/cvsroot/first-dir/dir2/dir3 added to the repository"
+"Directory ${CVSROOT_DIRNAME}/first-dir/dir2/dir3 added to the repository"
cd ../..
dotest release-6 "${testcvs} release -d first-dir/dir2/dir3 first-dir/dir1" \
@@ -18569,11 +20555,11 @@ ${PROG} [a-z]*: Updating first-dir/dir2"
cd first-dir
mkdir dir1
dotest release-10 "${testcvs} add dir1" \
-"Directory ${TESTDIR}/cvsroot/first-dir/dir1 added to the repository"
+"Directory ${CVSROOT_DIRNAME}/first-dir/dir1 added to the repository"
cd dir2
mkdir dir3
dotest release-11 "${testcvs} add dir3" \
-"Directory ${TESTDIR}/cvsroot/first-dir/dir2/dir3 added to the repository"
+"Directory ${CVSROOT_DIRNAME}/first-dir/dir2/dir3 added to the repository"
cd ../..
dotest release-12 "${testcvs} release first-dir/dir2/dir3 first-dir/dir1" \
@@ -18613,7 +20599,7 @@ ${PROG} [a-z]*: Updating first-dir"
CVSROOT2_DIRNAME=${TESTDIR}/root2
CVSROOT1=${CVSROOT1_DIRNAME} ; export CVSROOT1
CVSROOT2=${CVSROOT2_DIRNAME} ; export CVSROOT2
- if test "x$remote" = xyes; then
+ if $remote; then
CVSROOT1=:fork:${CVSROOT1_DIRNAME} ; export CVSROOT1
CVSROOT2=:fork:${CVSROOT2_DIRNAME} ; export CVSROOT2
fi
@@ -18808,7 +20794,11 @@ ${PROG} [a-z]*: cannot open directory ${TESTDIR}/root2/mod1-2: No such file or d
${PROG} [a-z]*: skipping directory mod2-2/mod1-2"
else
# non-RELATIVE_REPOS.
- if test "$remote" = no; then
+ if $remote; then
+ # Hmm, this one is specific to non-RELATIVE_REPOS too I think.
+ dotest_fail multiroot-update-1ar "${testcvs1} update" \
+"protocol error: directory '${TESTDIR}/root2/mod2-2' not within root '${TESTDIR}/root1'"
+ else
# The basic idea is that -d overrides CVS/Root.
# With RELATIVE_REPOS, CVS could print an error when it
# tries to recurse to mod2-2, which doesn't exist in
@@ -18823,14 +20813,13 @@ ${PROG} [a-z]*: Updating mod1-2/mod2-2
${PROG} [a-z]*: Updating mod2-1
${PROG} [a-z]*: Updating mod2-2
${PROG} [a-z]*: Updating mod2-2/mod1-2"
- else
- # Hmm, this one is specific to non-RELATIVE_REPOS too I think.
- dotest_fail multiroot-update-1a "${testcvs1} update" \
-"protocol error: directory '${TESTDIR}/root2/mod2-2' not within root '${TESTDIR}/root1'"
- fi # non-remote
+ fi # remote
# Same deal but with -d ${CVSROOT2}.
- if test "$remote" = no; then
+ if $remote; then
+ dotest_fail multiroot-update-1b "${testcvs2} update" \
+"protocol error: directory '${TESTDIR}/root1' not within root '${TESTDIR}/root2'"
+ else
dotest multiroot-update-1b "${testcvs2} update" \
"${PROG} update: Updating \.
${PROG} [a-z]*: Updating mod1-1
@@ -18839,10 +20828,7 @@ ${PROG} [a-z]*: Updating mod1-2/mod2-2
${PROG} [a-z]*: Updating mod2-1
${PROG} [a-z]*: Updating mod2-2
${PROG} [a-z]*: Updating mod2-2/mod1-2"
- else
- dotest_fail multiroot-update-1b "${testcvs2} update" \
-"protocol error: directory '${TESTDIR}/root1' not within root '${TESTDIR}/root2'"
- fi # non-remote
+ fi # remote
fi # non-RELATIVE_REPOS
# modify all files and do a diff
@@ -19005,31 +20991,31 @@ ${PROG} [a-z]*: Tagging mod2-2"
echo anotherfile1-2 > mod2-2/mod1-2/anotherfile1-2
echo anotherfile2-2 > mod1-2/mod2-2/anotherfile2-2
- if test "x$remote" = xno; then
- dotest multiroot-add-1 "${testcvs} add mod1-1/anotherfile1-1 mod2-1/anotherfile2-1 mod2-2/mod1-2/anotherfile1-2 mod1-2/mod2-2/anotherfile2-2" \
-"${PROG} [a-z]*: scheduling file .mod1-1/anotherfile1-1. for addition
-${PROG} [a-z]*: scheduling file .mod2-1/anotherfile2-1. for addition
-${PROG} [a-z]*: scheduling file .mod2-2/mod1-2/anotherfile1-2. for addition
-${PROG} [a-z]*: scheduling file .mod1-2/mod2-2/anotherfile2-2. for addition
-${PROG} [a-z]*: use .${PROG} commit. to add these files permanently"
- else
+ if $remote; then
cd mod1-1
- dotest multiroot-add-1a "${testcvs} add anotherfile1-1" \
+ dotest multiroot-add-1ar "${testcvs} add anotherfile1-1" \
"${PROG} [a-z]*: scheduling file .anotherfile1-1. for addition
${PROG} [a-z]*: use .${PROG} commit. to add this file permanently"
cd ../mod2-1
- dotest multiroot-add-1b "${testcvs} add anotherfile2-1" \
+ dotest multiroot-add-1br "${testcvs} add anotherfile2-1" \
"${PROG} [a-z]*: scheduling file .anotherfile2-1. for addition
${PROG} [a-z]*: use .${PROG} commit. to add this file permanently"
cd ../mod2-2/mod1-2
- dotest multiroot-add-1c "${testcvs} add anotherfile1-2" \
+ dotest multiroot-add-1cr "${testcvs} add anotherfile1-2" \
"${PROG} [a-z]*: scheduling file .anotherfile1-2. for addition
${PROG} [a-z]*: use .${PROG} commit. to add this file permanently"
cd ../../mod1-2/mod2-2
- dotest multiroot-add-1d "${testcvs} add anotherfile2-2" \
+ dotest multiroot-add-1dr "${testcvs} add anotherfile2-2" \
"${PROG} [a-z]*: scheduling file .anotherfile2-2. for addition
${PROG} [a-z]*: use .${PROG} commit. to add this file permanently"
cd ../..
+ else
+ dotest multiroot-add-1 "${testcvs} add mod1-1/anotherfile1-1 mod2-1/anotherfile2-1 mod2-2/mod1-2/anotherfile1-2 mod1-2/mod2-2/anotherfile2-2" \
+"${PROG} [a-z]*: scheduling file .mod1-1/anotherfile1-1. for addition
+${PROG} [a-z]*: scheduling file .mod2-1/anotherfile2-1. for addition
+${PROG} [a-z]*: scheduling file .mod2-2/mod1-2/anotherfile1-2. for addition
+${PROG} [a-z]*: scheduling file .mod1-2/mod2-2/anotherfile2-2. for addition
+${PROG} [a-z]*: use .${PROG} commit. to add these files permanently"
fi
dotest multiroot-status-1 "${testcvs} status -v" \
@@ -19786,7 +21772,7 @@ anyone
# refer to parts of our checked-out tree (e.g. "cvs update
# mod1-1 mod2-2")
- if test "$keep" = yes; then
+ if $keep; then
echo Keeping ${TESTDIR} and exiting due to --keep
exit 0
fi
@@ -19806,7 +21792,7 @@ anyone
CVSROOT2_DIRNAME=${TESTDIR}/root2
CVSROOT1=${CVSROOT1_DIRNAME} ; export CVSROOT1
CVSROOT2=${CVSROOT2_DIRNAME} ; export CVSROOT2
- if test "x$remote" = xyes; then
+ if $remote; then
CVSROOT1=:fork:${CVSROOT1_DIRNAME} ; export CVSROOT1
CVSROOT2=:fork:${CVSROOT2_DIRNAME} ; export CVSROOT2
fi
@@ -19869,12 +21855,12 @@ ${PROG} server: Updating dir1/sdir/ssdir"
# also prints some trace messages, and (2) the server trace
# messages are subject to out-of-order bugs (this one is hard
# to work around).
- if test "$remote" = no; then
+ if $remote; then :; else
dotest multiroot2-9 "${testcvs} -t update" \
-"${PROG} update: notice: main loop with CVSROOT=${TESTDIR}/root1
+" -> main loop with CVSROOT=${TESTDIR}/root1
${PROG} update: Updating \.
${PROG} update: Updating dir1
-${PROG} update: notice: main loop with CVSROOT=${TESTDIR}/root2
+ -> main loop with CVSROOT=${TESTDIR}/root2
${PROG} update: Updating dir1/sdir
${PROG} update: Updating dir1/sdir/ssdir"
fi
@@ -19906,8 +21892,8 @@ RCS file: ${TESTDIR}/root1/dir1/file1,v
retrieving revision 1\.1\.1\.1
retrieving revision 1\.2
diff -u -r1\.1\.1\.1 -r1\.2
---- dir1/file1 [0-9/]* [0-9:]* 1\.1\.1\.1
-${PLUS}${PLUS}${PLUS} dir1/file1 [0-9/]* [0-9:]* 1\.2
+--- dir1/file1 ${RFCDATE} 1\.1\.1\.1
+${PLUS}${PLUS}${PLUS} dir1/file1 ${RFCDATE} 1\.2
@@ -1 ${PLUS}1,2 @@
file1
${PLUS}change it
@@ -19917,13 +21903,13 @@ RCS file: ${TESTDIR}/root2/sdir/sfile,v
retrieving revision 1\.1\.1\.1
retrieving revision 1\.2
diff -u -r1\.1\.1\.1 -r1\.2
---- dir1/sdir/sfile [0-9/]* [0-9:]* 1\.1\.1\.1
-${PLUS}${PLUS}${PLUS} dir1/sdir/sfile [0-9/]* [0-9:]* 1\.2
+--- dir1/sdir/sfile ${RFCDATE} 1\.1\.1\.1
+${PLUS}${PLUS}${PLUS} dir1/sdir/sfile ${RFCDATE} 1\.2
@@ -1 ${PLUS}1,2 @@
sfile
${PLUS}change him too"
- if test "$keep" = yes; then
+ if $keep; then
echo Keeping ${TESTDIR} and exiting due to --keep
exit 0
fi
@@ -19941,7 +21927,7 @@ ${PLUS}change him too"
# Not drastically different from multiroot but it covers somewhat
# different stuff.
- if test "x$remote" = xyes; then
+ if $remote; then
CVSROOT1=:fork:${TESTDIR}/root1 ; export CVSROOT1
CVSROOT2=:fork:${TESTDIR}/root2 ; export CVSROOT2
else
@@ -19964,7 +21950,7 @@ ${PLUS}change him too"
# I suppose because of the "rm -r".
# For local this fixes it up.
dotest multiroot3-6 "${testcvs} -d ${CVSROOT1} -q co dir1" ""
- if test "$remote" = yes; then
+ if $remote; then
# For remote that doesn't do it. Use the quick and dirty fix.
echo "D/dir1////" >CVS/Entries
echo "D/dir2////" >>CVS/Entries
@@ -19974,7 +21960,7 @@ ${PLUS}change him too"
"Directory ${TESTDIR}/root2/dir2 added to the repository"
touch dir1/file1 dir2/file2
- if test "$remote" = yes; then
+ if $remote; then
# Trying to add them both in one command doesn't work,
# because add.c doesn't do multiroot (it doesn't use recurse.c).
# Furthermore, it can't deal with the parent directory
@@ -20019,7 +22005,7 @@ ${PROG} [a-z]*: failed to obtain dir lock in repository .${TESTDIR}/root1/dir2'
${PROG} \[[a-z]* aborted\]: read lock failed - giving up"
else
# Not RELATIVE_REPOS.
- if test "$remote" = yes; then
+ if $remote; then
# This is good behavior - we are asking CVS to do something
# which doesn't make sense.
dotest_fail multiroot3-10 \
@@ -20067,7 +22053,7 @@ ${PROG} \[[a-z]* aborted\]: illegal source repository"
cd ../..
- if test "$keep" = yes; then
+ if $keep; then
echo Keeping ${TESTDIR} and exiting due to --keep
exit 0
fi
@@ -20082,7 +22068,7 @@ ${PROG} \[[a-z]* aborted\]: illegal source repository"
# More multiroot tests, in particular we have two roots with
# similarly-named directories and we try to see that CVS can
# keep them separate.
- if test "x$remote" = xyes; then
+ if $remote; then
CVSROOT1=:fork:${TESTDIR}/root1 ; export CVSROOT1
CVSROOT2=:fork:${TESTDIR}/root2 ; export CVSROOT2
else
@@ -20163,7 +22149,7 @@ done"
dotest rmroot-setup-1 "${testcvs} -q co -l ." ''
mkdir first-dir
dotest rmroot-setup-2 "${testcvs} add first-dir" \
-"Directory ${TESTDIR}/cvsroot/first-dir added to the repository"
+"Directory ${CVSROOT_DIRNAME}/first-dir added to the repository"
cd first-dir
touch file1 file2
dotest rmroot-setup-3 "${testcvs} add file1 file2" \
@@ -20171,16 +22157,16 @@ done"
${PROG} [a-z]*: scheduling file .file2. for addition
${PROG} [a-z]*: use .${PROG} commit. to add these files permanently"
dotest rmroot-setup-4 "${testcvs} -q commit -minit" \
-"RCS file: ${TESTDIR}/cvsroot/first-dir/file1,v
+"RCS file: ${CVSROOT_DIRNAME}/first-dir/file1,v
done
Checking in file1;
-${TESTDIR}/cvsroot/first-dir/file1,v <-- file1
+${CVSROOT_DIRNAME}/first-dir/file1,v <-- file1
initial revision: 1\.1
done
-RCS file: ${TESTDIR}/cvsroot/first-dir/file2,v
+RCS file: ${CVSROOT_DIRNAME}/first-dir/file2,v
done
Checking in file2;
-${TESTDIR}/cvsroot/first-dir/file2,v <-- file2
+${CVSROOT_DIRNAME}/first-dir/file2,v <-- file2
initial revision: 1\.1
done"
rm CVS/Root
@@ -20195,7 +22181,7 @@ done"
# Similar to crerepos but that test is probably getting big
# enough.
- if test "x$remote" = xyes; then
+ if $remote; then
CVSROOT1=:fork:${TESTDIR}/root1 ; export CVSROOT1
CVSROOT_MOVED=:fork:${TESTDIR}/root-moved ; export CVSROOT1
else
@@ -20226,19 +22212,26 @@ No conflicts created by this import"
# There were some duplicated warnings and such; only test
# for the part of the error message which makes sense.
# Bug: "skipping directory " without filename.
- if test "$remote" = no; then
+ if $remote; then
+ dotest_fail reposmv-2r "${testcvs} update" \
+"Cannot access ${TESTDIR}/root1/CVSROOT
+No such file or directory"
+ else
dotest reposmv-2 "${testcvs} update" "${DOTSTAR}
${PROG} update: ignoring CVS/Root because it specifies a non-existent repository ${TESTDIR}/root1
-${PROG} update: cannot open directory ${TESTDIR}/cvsroot/dir1: No such file or directory
+${PROG} update: cannot open directory ${CVSROOT_DIRNAME}/dir1: No such file or directory
${PROG} update: skipping directory "
- else
- dotest_fail reposmv-2 "${testcvs} update" \
-"Cannot access ${TESTDIR}/root1/CVSROOT
-No such file or directory"
fi
# CVS/Root overrides $CVSROOT
- if test "$remote" = no; then
+ if $remote; then
+ CVSROOT_SAVED=${CVSROOT}
+ CVSROOT=:fork:${TESTDIR}/root-moved; export CVSROOT
+ dotest_fail reposmv-3r "${testcvs} update" \
+"Cannot access ${TESTDIR}/root1/CVSROOT
+No such file or directory"
+ CVSROOT=${CVSROOT_SAVED}; export CVSROOT
+ else
CVSROOT_SAVED=${CVSROOT}
CVSROOT=${TESTDIR}/root-moved; export CVSROOT
dotest reposmv-3 "${testcvs} update" \
@@ -20247,16 +22240,16 @@ ${PROG} update: ignoring CVS/Root because it specifies a non-existent repository
${PROG} update: Updating \.
${DOTSTAR}"
CVSROOT=${CVSROOT_SAVED}; export CVSROOT
- else
+ fi
+
+ if $remote; then
CVSROOT_SAVED=${CVSROOT}
- CVSROOT=:fork:${TESTDIR}/root-moved; export CVSROOT
- dotest_fail reposmv-3 "${testcvs} update" \
+ CVSROOT=:fork:${TESTDIR}/root-none; export CVSROOT
+ dotest_fail reposmv-4 "${testcvs} update" \
"Cannot access ${TESTDIR}/root1/CVSROOT
No such file or directory"
CVSROOT=${CVSROOT_SAVED}; export CVSROOT
- fi
-
- if test "$remote" = no; then
+ else
# CVS/Root doesn't seem to quite completely override $CVSROOT
# Bug? Not necessarily a big deal if it only affects error
# messages.
@@ -20267,13 +22260,6 @@ No such file or directory"
${PROG} update: ignoring CVS/Root because it specifies a non-existent repository ${TESTDIR}/root1
${PROG} \[update aborted\]: ${TESTDIR}/root-none/CVSROOT: No such file or directory"
CVSROOT=${CVSROOT_SAVED}; export CVSROOT
- else
- CVSROOT_SAVED=${CVSROOT}
- CVSROOT=:fork:${TESTDIR}/root-none; export CVSROOT
- dotest_fail reposmv-4 "${testcvs} update" \
-"Cannot access ${TESTDIR}/root1/CVSROOT
-No such file or directory"
- CVSROOT=${CVSROOT_SAVED}; export CVSROOT
fi
# -d overrides CVS/Root
@@ -20297,7 +22283,7 @@ No such file or directory"
pserver)
# Test basic pserver functionality.
- if test "$remote" = yes; then
+ if $remote; then
# First set SystemAuth=no. Not really necessary, I don't
# think, but somehow it seems like the clean thing for
# the testsuite.
@@ -20307,7 +22293,7 @@ No such file or directory"
echo "SystemAuth=no" >config
dotest pserver-2 "${testcvs} -q ci -m config-it" \
"Checking in config;
-${TESTDIR}/cvsroot/CVSROOT/config,v <-- config
+${CVSROOT_DIRNAME}/CVSROOT/config,v <-- config
new revision: 1\.[0-9]*; previous revision: 1\.[0-9]*
done
${PROG} [a-z]*: Rebuilding administrative file database"
@@ -20437,7 +22423,7 @@ EOF
echo "# comments only" >config
dotest pserver-cleanup-1 "${testcvs} -q ci -m config-it" \
"Checking in config;
-${TESTDIR}/cvsroot/CVSROOT/config,v <-- config
+${CVSROOT_DIRNAME}/CVSROOT/config,v <-- config
new revision: 1\.[0-9]*; previous revision: 1\.[0-9]*
done
${PROG} [a-z]*: Rebuilding administrative file database"
@@ -20449,7 +22435,7 @@ ${PROG} [a-z]*: Rebuilding administrative file database"
server)
# Some tests of the server (independent of the client).
- if test "$remote" = yes; then
+ if $remote; then
dotest server-1 "${testcvs} server" \
"E Protocol error: Root request missing
error " <<EOF
@@ -20618,7 +22604,7 @@ ${TESTDIR}/crerepos/dir1
editors
EOF
- if test "$keep" = yes; then
+ if $keep; then
echo Keeping ${TESTDIR} and exiting due to --keep
exit 0
fi
@@ -20631,29 +22617,29 @@ EOF
server2)
# More server tests, in particular testing that various
# possible security holes are plugged.
- if test "$remote" = yes; then
+ if $remote; then
dotest server2-1 "${testcvs} server" \
-"E protocol error: directory '${TESTDIR}/cvsroot/\.\./dir1' not within root '${TESTDIR}/cvsroot'
+"E protocol error: directory '${CVSROOT_DIRNAME}/\.\./dir1' not within root '${TESTDIR}/cvsroot'
error " <<EOF
-Root ${TESTDIR}/cvsroot
+Root ${CVSROOT_DIRNAME}
Directory .
-${TESTDIR}/cvsroot/../dir1
+${CVSROOT_DIRNAME}/../dir1
noop
EOF
dotest server2-2 "${testcvs} server" \
-"E protocol error: directory '${TESTDIR}/cvsrootdir1' not within root '${TESTDIR}/cvsroot'
+"E protocol error: directory '${CVSROOT_DIRNAME}dir1' not within root '${TESTDIR}/cvsroot'
error " <<EOF
-Root ${TESTDIR}/cvsroot
+Root ${CVSROOT_DIRNAME}
Directory .
-${TESTDIR}/cvsrootdir1
+${CVSROOT_DIRNAME}dir1
noop
EOF
dotest 2-3 "${testcvs} server" \
-"E protocol error: directory '${TESTDIR}' not within root '${TESTDIR}/cvsroot'
+"E protocol error: directory '${TESTDIR}' not within root '${CVSROOT_DIRNAME}'
error " <<EOF
-Root ${TESTDIR}/cvsroot
+Root ${CVSROOT_DIRNAME}
Directory .
${TESTDIR}
noop
@@ -20666,9 +22652,9 @@ EOF
dotest server2-4 "${testcvs} server" \
"E protocol error: directory 'foo/bar' not within current directory
error " <<EOF
-Root ${TESTDIR}/cvsroot
+Root ${CVSROOT_DIRNAME}
Directory .
-${TESTDIR}/cvsroot
+${CVSROOT_DIRNAME}
Unchanged foo/bar
noop
EOF
@@ -20677,7 +22663,7 @@ EOF
client)
# Some tests of the client (independent of the server).
- if test "$remote" = yes; then
+ if $remote; then
cat >${TESTDIR}/serveme <<EOF
#!${TESTSHELL}
# This is admittedly a bit cheezy, in the sense that we make lots
@@ -20689,7 +22675,7 @@ echo "Valid-requests Root Valid-responses valid-requests Directory Entry Modifie
echo "ok"
echo "M special message"
echo "Created first-dir/"
-echo "${TESTDIR}/cvsroot/first-dir/file1"
+echo "${CVSROOT_DIRNAME}/first-dir/file1"
echo "/file1/1.1///"
echo "u=rw,g=rw,o=rw"
echo "4"
@@ -20710,10 +22696,10 @@ echo "Valid-requests Root Valid-responses valid-requests Directory Entry Modifie
echo "ok"
echo "M merge-it"
echo "Copy-file ./"
-echo "${TESTDIR}/cvsroot/first-dir/file1"
+echo "${CVSROOT_DIRNAME}/first-dir/file1"
echo "${TESTDIR}/bogus/.#file1.1.1"
echo "Merged ./"
-echo "${TESTDIR}/cvsroot/first-dir/file1"
+echo "${CVSROOT_DIRNAME}/first-dir/file1"
echo "/file1/1.2///"
echo "u=rw,g=rw,o=rw"
echo "4"
@@ -20733,10 +22719,10 @@ echo "Valid-requests Root Valid-responses valid-requests Directory Entry Modifie
echo "ok"
echo "M merge-it"
echo "Copy-file ./"
-echo "${TESTDIR}/cvsroot/first-dir/file1"
+echo "${CVSROOT_DIRNAME}/first-dir/file1"
echo ".#file1.1.1"
echo "Merged ./"
-echo "${TESTDIR}/cvsroot/first-dir/file1"
+echo "${CVSROOT_DIRNAME}/first-dir/file1"
echo "/file1/1.2///"
echo "u=rw,g=rw,o=rw"
echo "4"
@@ -20763,13 +22749,13 @@ EOF
# know exactly how that will translate to GMT.
dotest client-8 "${testcvs} update -D 99-10-04" "OK, whatever"
dotest client-9 "cat ${TESTDIR}/client.tmp" \
-"Root ${TESTDIR}/cvsroot
+"Root ${CVSROOT_DIRNAME}
Valid-responses [-a-zA-Z ]*
valid-requests
Argument -D
Argument [34] Oct 1999 [0-9][0-9]:00:00 -0000
Directory \.
-${TESTDIR}/cvsroot/first-dir
+${CVSROOT_DIRNAME}/first-dir
Entry /file1/1\.2///
Modified file1
u=rw,g=,o=
@@ -20785,16 +22771,51 @@ update"
fi # skip the whole thing for local
;;
+ fork)
+ # Test that the server defaults to the correct executable in :fork:
+ # mode. See the note in the TODO at the end of this file about this.
+ #
+ # This test and client should be left after all other references to
+ # CVS_SERVER are removed from this script.
+ #
+ # The client series of tests already tests that CVS_SERVER is
+ # working, but that test might be better here.
+ if $remote; then
+ mkdir fork; cd fork
+ unset CVS_SERVER
+ # So looking through $PATH for cvs won't work...
+ echo "echo junk" >cvs
+ chmod a+x cvs
+ save_PATH=$PATH; PATH=.:$PATH
+ dotest fork-1 "$testcvs -d:fork:$CVSROOT_DIRNAME version" \
+'Client: \(.*\)
+Server: \1'
+ CVS_SERVER=${testcvs}; export CVS_SERVER
+ PATH=$save_PATH; unset save_PATH
+ cd ..
+ if $keep; then :; else
+ rm -rf fork
+ fi
+ fi
+ ;;
+
*)
echo $what is not the name of a test -- ignored
;;
esac
done
+# Sanity check sanity.sh. :)
+#
+# Test our exit directory so that tests that exit in an incorrect directory are
+# noticed during single test runs.
+if test "x$TESTDIR" != "x`pwd`"; then
+ fail "cleanup: PWD != TESTDIR (\``pwd`' != \`$TESTDIR')"
+fi
+
echo "OK, all tests completed."
# TODO:
-# * use "test" not "[" and see if all test's support `-z'
# * Test `cvs update -d foo' (where foo does not exist).
# * Test `cvs update foo bar' (where foo and bar are both from the
# same directory in the repository). Suppose one is a branch--make
@@ -20829,10 +22850,24 @@ echo "OK, all tests completed."
# this needs to be documented in cvs.texinfo, but is not)
# - Test that unrecognized files in CVS directories (e.g. CVS/Foobar)
# are ignored (per cvs.texinfo).
+# - Test 'cvs history' with symlinks in the path to the working directory.
+# - Remove most of the CVS_SERVER stuff after a reasonable amount of time.
+# The "fork" & "client" series of tests should be left. 4/2/00, CVS
+# 1.11.0.1 was altered so that it would default to program_name (set from
+# argv[0]) rather than "cvs", but I'd like this script to work on legacy
+# versions of CVS for awhile.
+# - Testsuite doesn't work with usernames over eight characters in length.
+# Fix it.
# End of TODO list.
+# Exit if keep set
+if $keep; then
+ echo "Keeping ${TESTDIR} and exiting due to -k (keep) option."
+ exit 0
+fi
+
# Remove the test directory, but first change out of it.
-cd /tmp
+cd `dirname ${TESTDIR}`
rm -rf ${TESTDIR}
# end of sanity.sh