diff -ru cvs-1.11.21_orig/src/sanity.sh cvs-1.11.21/src/sanity.sh --- cvs-1.11.21_orig/src/sanity.sh 2005-09-22 12:09:18.000000000 -0500 +++ cvs-1.11.21/src/sanity.sh 2006-12-28 11:53:49.000000000 -0600 @@ -6975,6 +6975,93 @@ rm -r trunk b1a b1b ;; + branches3) + # test new faster branching code to make sure it doesn't reuse a previously used magic branch tag + mkdir ${CVSROOT_DIRNAME}/first-dir + dotest branches3-1 "${testcvs} -q co first-dir" '' + cd first-dir + echo 1:ancest >file1 + echo 2:ancest >file2 + dotest branches3-2 "${testcvs} add file1 file2" \ +"${PROG}"' add: scheduling file `file1'\'' for addition +'"${PROG}"' add: scheduling file `file2'\'' for addition +'"${PROG}"' add: use .'"${PROG}"' commit. to add these files permanently' + dotest branches3-2a "${testcvs} -n -q ci -m dont-commit" "" + dotest_lit branches3-3a "${testcvs} -q ci -m add-it" <file1 + dotest branches3-4c "${testcvs} -q ci -m modify" \ +"Checking in file1; +${CVSROOT_DIRNAME}/first-dir/file1,v <-- file1 +new revision: 1\.1\.2\.1; previous revision: 1\.1 +done" + + # Second branch gets no commits + dotest branches3-5a "${testcvs} -q update -r HEAD" 'U file1' + dotest branches3-5b "${testcvs} -q tag -b br3br2" 'T file1 +T file2' + + # Third branch gets a commit + dotest branches3-6a "${testcvs} -q update -r HEAD" '' + dotest branches3-6b "${testcvs} -q tag -b br3br3" 'T file1 +T file2' + dotest branches3-6c "${testcvs} -q update -r br3br3" '' + echo 1:br3br3 >file1 + dotest branches3-6d "${testcvs} -q ci -m modify" \ +"Checking in file1; +${CVSROOT_DIRNAME}/first-dir/file1,v <-- file1 +new revision: 1\.1\.6\.1; previous revision: 1\.1 +done" + + # Delete first branch's tag + dotest branches3-4d "${testcvs} tag -d -B br3br1 file1 file2" 'D file1 +D file2' + + # Create the fourth branch, ensure that it gets the correct magic branch tag + dotest branches3-7a "${testcvs} -q update -r HEAD" 'U file1' + dotest branches3-7b "${testcvs} -q tag -b br3br4" 'T file1 +T file2' + dotest branches3-7c "${testcvs} -q update -r br3br4" '' + echo 1:br3br4 >file1 + dotest branches3-7d "${testcvs} -q ci -m modify" \ +"Checking in file1; +${CVSROOT_DIRNAME}/first-dir/file1,v <-- file1 +new revision: 1\.1\.8\.1; previous revision: 1\.1 +done" + + + # clean up after this test + cd .. + + if $keep; then + echo Keeping ${TESTDIR} and exiting due to --keep + exit 0 + fi + + rm -rf ${CVSROOT_DIRNAME}/first-dir + rm -r first-dir + ;; + + tagc) # Test the tag -c option. mkdir 1; cd 1