[The short summary is that "cvs get -d .": * works for CVS 1.9, non-client/server * is broken for CVS 1.9, client/server * is broken for CVS 1.9.28 or so, both non-client/server and client/server. -kingdon] 1998-07-18 Jim Kingdon * sanity.sh (getd): New tests, for "cvs get -d". Index: sanity.sh =================================================================== RCS file: /home2/cvsroot/ccvs/src/sanity.sh,v retrieving revision 1.412 diff -c -r1.412 sanity.sh *** sanity.sh 1998/07/15 01:58:43 1.412 --- sanity.sh 1998/07/19 02:49:45 *************** *** 557,563 **** tests="${tests} new newb conflicts conflicts2 conflicts3" # Checking out various places (modules, checkout -d, &c) tests="${tests} modules modules2 modules3 modules4" ! tests="${tests} cvsadm emptydir abspath toplevel" # Log messages, error messages. tests="${tests} mflag editor errmsg1 errmsg2" # Watches, binary files, history browsing, &c. --- 557,563 ---- tests="${tests} new newb conflicts conflicts2 conflicts3" # Checking out various places (modules, checkout -d, &c) tests="${tests} modules modules2 modules3 modules4" ! tests="${tests} cvsadm getd emptydir abspath toplevel" # Log messages, error messages. tests="${tests} mflag editor errmsg1 errmsg2" # Watches, binary files, history browsing, &c. *************** *** 7709,7714 **** --- 7709,7767 ---- rm -rf ${CVSROOT_DIRNAME}/mod1-2 rm -rf ${CVSROOT_DIRNAME}/mod2 rm -rf ${CVSROOT_DIRNAME}/mod2-2 + ;; + + getd) + # Various tests of the "get -d" option: + # basicb: a few basic tests + # cvsadm: interactions with many types of modules + # abspath: get -d + # getd: get -d . + mkdir 1; cd 1 + dotest getd-1 "${testcvs} -q co -l ." '' + mkdir first-dir + # Second pattern is for CVS 1.9 + dotest getd-2 "${testcvs} add first-dir" \ + "Directory ${TESTDIR}/cvsroot/first-dir added to the repository" \ + "Directory ${TESTDIR}/cvsroot/..first-dir added to the repository" + cd first-dir + echo some contents >file1 + # Second pattern is for CVS 1.9 + dotest getd-3 "${testcvs} add file1" \ + "${PROG} [a-z]*: scheduling file .file1. for addition + ${PROG} [a-z]*: use .${PROG} commit. to add this file permanently" \ + "${PROG} [a-z]*: scheduling file .file1. for addition + ${PROG} [a-z]*: use .cvs commit. to add this file permanently" + dotest getd-4 "${testcvs} -q ci -m add-it file1" \ + "RCS file: ${TESTDIR}/cvsroot/first-dir/file1,v + done + Checking in file1; + ${TESTDIR}/cvsroot/first-dir/file1,v <-- file1 + initial revision: 1\.1 + done" + cd ../.. + rm -r 1 + + mkdir 2; cd 2 + if true; then + # CVS 1.9 behavior. + if test "$remote" = yes; then + dotest_fail getd-5 "${testcvs} -q get -d . first-dir" \ + "${PROG} [a-z]*: existing repository ${TESTDIR}/cvsroot/. does not match ${TESTDIR}/cvsroot/first-dir + ${PROG} [a-z]*: ignoring module first-dir" + else + dotest getd-5 "${testcvs} -q get -d . first-dir" "U file1" + fi + else + # Current, buggy, behavior. + dotest_fail getd-5 "${testcvs} -q get -d . first-dir" \ + "${PROG} [a-z]*: existing repository ${TESTDIR}/cvsroot does not match ${TESTDIR}/cvsroot/first-dir + ${PROG} [a-z]*: ignoring module first-dir" + fi + + cd .. + rm -r 2 + rm -rf ${CVSROOT_DIRNAME}/first-dir ;; emptydir)