{"thread":{"id":"17934","subject":"[PATCH v2 0/4] Add more tests of cvsimport","startedAt":"2009-02-21T13:04:35Z","lastAt":"2009-02-23T05:08:14Z","messageCount":14,"participants":["Michael Haggerty","Junio C Hamano"],"isPatch":true,"patchVersion":2,"patchTotal":4},"messages":[{"id":"105708","messageId":"1235221480-31473-1-git-send-email-mhagger@alum.mit.edu","threadId":"17934","inReplyTo":null,"subject":"[PATCH v2 0/4] Add more tests of cvsimport","fromName":"Michael Haggerty","fromEmail":"mhagger@alum.mit.edu","sentAt":"2009-02-21T13:04:35Z","receivedAt":"2009-02-21T13:04:35Z","isPatch":true,"sender":{"key":"mhagger@alum.mit.edu","avatar":"https://avatars.githubusercontent.com/u/119718?v=4"},"body":"Thanks for all the feedback.  I think I have incorporated it all:\n\n- Renamed the library from t/t96xx/cvs-lib.sh to t/lib-cvs.sh.\n\n- Added t/t9601/cvsroot/.gitattributes to avoid whitespace warnings.\n\n- Fixed the \"cvs co\" command for when checking out a branch/tag.\n\n- Implemented a recursive diff in test_cmp_branch_tree rather than\n  relying on GNU diff features.  It is only a dozen lines of code, but\n  please review this carefully as I'm not such a shell jockey.\n\n  I tried using \"git diff\" but it didn't seem to work for this\n  purpose, even if I deleted the CVS directories manually to avoid the\n  need for \"-x\" functionality:\n\n  - If I used --no-index, it insisted on showing differences within\n    the .git directory.\n\n  - It didn't seem to find any differences (even when there were some)\n    when I didn't use --no-index.\n\n  - I couldn't see any documentation that the return value is nonzero\n    iff differences are found.  In my tests the return value was\n    always zero.\n\n  The library can always be changed later to use \"git diff\", but I\n  don't see this as urgent.  It would also have the disadvantage of\n  making \"git cvsimport\" tests fail if there are bugs in \"git diff\".\n\nI also added another test script, t9602, in the (new) 5th patch in the\nseries.  It tests \"git cvsimport\"'s handling of branches and tags.\nOnly 5/11 of the tests in this script pass.\n\nCheers,\nMichael\n"},{"id":"105712","messageId":"ee46eff8fc1cb2d0ad3d8dfac2fbe4d79f225e3a.1235220105.git.mhagger@alum.mit.edu","threadId":"17934","inReplyTo":"1235221480-31473-1-git-send-email-mhagger@alum.mit.edu","subject":"[PATCH v2 1/5] Start a library for cvsimport-related tests","fromName":"Michael Haggerty","fromEmail":"mhagger@alum.mit.edu","sentAt":"2009-02-21T13:04:36Z","receivedAt":"2009-02-21T13:04:36Z","isPatch":true,"sender":{"key":"mhagger@alum.mit.edu","avatar":"https://avatars.githubusercontent.com/u/119718?v=4"},"body":"For now the \"library\" just includes code (moved from\nt/t9600-cvsimport.sh) that checks whether the prerequisites for \"git\ncvsimport\" are installed.\n\nSigned-off-by: Michael Haggerty <mhagger@alum.mit.edu>\n---\n t/lib-cvs.sh         |   31 +++++++++++++++++++++++++++++++\n t/t9600-cvsimport.sh |   29 +----------------------------\n 2 files changed, 32 insertions(+), 28 deletions(-)\n create mode 100644 t/lib-cvs.sh\n\ndiff --git a/t/lib-cvs.sh b/t/lib-cvs.sh\nnew file mode 100644\nindex 0000000..bfc1c12\n--- /dev/null\n+++ b/t/lib-cvs.sh\n@@ -0,0 +1,31 @@\n+#!/bin/sh\n+\n+. ./test-lib.sh\n+\n+unset CVS_SERVER\n+# for clean cvsps cache\n+HOME=$(pwd)\n+export HOME\n+\n+if ! type cvs >/dev/null 2>&1\n+then\n+\tsay 'skipping cvsimport tests, cvs not found'\n+\ttest_done\n+\texit\n+fi\n+\n+cvsps_version=`cvsps -h 2>&1 | sed -ne 's/cvsps version //p'`\n+case \"$cvsps_version\" in\n+2.1 | 2.2*)\n+\t;;\n+'')\n+\tsay 'skipping cvsimport tests, cvsps not found'\n+\ttest_done\n+\texit\n+\t;;\n+*)\n+\tsay 'skipping cvsimport tests, unsupported cvsps version'\n+\ttest_done\n+\texit\n+\t;;\n+esac\ndiff --git a/t/t9600-cvsimport.sh b/t/t9600-cvsimport.sh\nindex d2379e7..98077ab 100755\n--- a/t/t9600-cvsimport.sh\n+++ b/t/t9600-cvsimport.sh\n@@ -1,37 +1,10 @@\n #!/bin/sh\n \n test_description='git cvsimport basic tests'\n-. ./test-lib.sh\n+. ./lib-cvs.sh\n \n CVSROOT=$(pwd)/cvsroot\n export CVSROOT\n-unset CVS_SERVER\n-# for clean cvsps cache\n-HOME=$(pwd)\n-export HOME\n-\n-if ! type cvs >/dev/null 2>&1\n-then\n-\tsay 'skipping cvsimport tests, cvs not found'\n-\ttest_done\n-\texit\n-fi\n-\n-cvsps_version=`cvsps -h 2>&1 | sed -ne 's/cvsps version //p'`\n-case \"$cvsps_version\" in\n-2.1 | 2.2*)\n-\t;;\n-'')\n-\tsay 'skipping cvsimport tests, cvsps not found'\n-\ttest_done\n-\texit\n-\t;;\n-*)\n-\tsay 'skipping cvsimport tests, unsupported cvsps version'\n-\ttest_done\n-\texit\n-\t;;\n-esac\n \n test_expect_success 'setup cvsroot' 'cvs init'\n \n-- \n1.6.1.3\n"},{"id":"105710","messageId":"7d834a5a7542df6bfa8963bb6440cc4b4531ead7.1235220105.git.mhagger@alum.mit.edu","threadId":"17934","inReplyTo":"ee46eff8fc1cb2d0ad3d8dfac2fbe4d79f225e3a.1235220105.git.mhagger@alum.mit.edu","subject":"[PATCH v2 2/5] Use CVS's -f option if available (ignore user's ~/.cvsrc file)","fromName":"Michael Haggerty","fromEmail":"mhagger@alum.mit.edu","sentAt":"2009-02-21T13:04:37Z","receivedAt":"2009-02-21T13:04:37Z","isPatch":true,"sender":{"key":"mhagger@alum.mit.edu","avatar":"https://avatars.githubusercontent.com/u/119718?v=4"},"body":"A user's ~/.cvsrc file can change the basic behavior of CVS commands.\nTherefore we should ignore it in order to ensure consistent results\nfrom the test suite.\n\nSigned-off-by: Michael Haggerty <mhagger@alum.mit.edu>\n---\n t/lib-cvs.sh         |    3 +++\n t/t9600-cvsimport.sh |   16 ++++++++--------\n 2 files changed, 11 insertions(+), 8 deletions(-)\n\ndiff --git a/t/lib-cvs.sh b/t/lib-cvs.sh\nindex bfc1c12..6738901 100644\n--- a/t/lib-cvs.sh\n+++ b/t/lib-cvs.sh\n@@ -14,6 +14,9 @@ then\n \texit\n fi\n \n+CVS=\"cvs -f\"\n+export CVS\n+\n cvsps_version=`cvsps -h 2>&1 | sed -ne 's/cvsps version //p'`\n case \"$cvsps_version\" in\n 2.1 | 2.2*)\ndiff --git a/t/t9600-cvsimport.sh b/t/t9600-cvsimport.sh\nindex 98077ab..3110a8c 100755\n--- a/t/t9600-cvsimport.sh\n+++ b/t/t9600-cvsimport.sh\n@@ -6,12 +6,12 @@ test_description='git cvsimport basic tests'\n CVSROOT=$(pwd)/cvsroot\n export CVSROOT\n \n-test_expect_success 'setup cvsroot' 'cvs init'\n+test_expect_success 'setup cvsroot' '$CVS init'\n \n test_expect_success 'setup a cvs module' '\n \n \tmkdir \"$CVSROOT/module\" &&\n-\tcvs co -d module-cvs module &&\n+\t$CVS co -d module-cvs module &&\n \tcd module-cvs &&\n \tcat <<EOF >o_fortuna &&\n O Fortuna\n@@ -30,13 +30,13 @@ egestatem,\n potestatem\n dissolvit ut glaciem.\n EOF\n-\tcvs add o_fortuna &&\n+\t$CVS add o_fortuna &&\n \tcat <<EOF >message &&\n add \"O Fortuna\" lyrics\n \n These public domain lyrics make an excellent sample text.\n EOF\n-\tcvs commit -F message &&\n+\t$CVS commit -F message &&\n \tcd ..\n '\n \n@@ -74,7 +74,7 @@ translate to English\n \n My Latin is terrible.\n EOF\n-\tcvs commit -F message &&\n+\t$CVS commit -F message &&\n \tcd ..\n '\n \n@@ -92,8 +92,8 @@ test_expect_success 'update cvs module' '\n \n \tcd module-cvs &&\n \t\techo 1 >tick &&\n-\t\tcvs add tick &&\n-\t\tcvs commit -m 1\n+\t\t$CVS add tick &&\n+\t\t$CVS commit -m 1\n \tcd ..\n \n '\n@@ -111,7 +111,7 @@ test_expect_success 'cvsimport.module config works' '\n \n test_expect_success 'import from a CVS working tree' '\n \n-\tcvs co -d import-from-wt module &&\n+\t$CVS co -d import-from-wt module &&\n \tcd import-from-wt &&\n \t\tgit cvsimport -a -z0 &&\n \t\techo 1 >expect &&\n-- \n1.6.1.3\n"},{"id":"105709","messageId":"cda1b6751447f990ca0e45e2e54f62ae9c53e6c1.1235220105.git.mhagger@alum.mit.edu","threadId":"17934","inReplyTo":"7d834a5a7542df6bfa8963bb6440cc4b4531ead7.1235220105.git.mhagger@alum.mit.edu","subject":"[PATCH v2 3/5] Test contents of entire cvsimported \"master\" tree contents","fromName":"Michael Haggerty","fromEmail":"mhagger@alum.mit.edu","sentAt":"2009-02-21T13:04:38Z","receivedAt":"2009-02-21T13:04:38Z","isPatch":true,"sender":{"key":"mhagger@alum.mit.edu","avatar":"https://avatars.githubusercontent.com/u/119718?v=4"},"body":"Test added for completeness (it passes).\n\nSigned-off-by: Michael Haggerty <mhagger@alum.mit.edu>\n---\n t/lib-cvs.sh         |   41 +++++++++++++++++++++++++++++++++++++++++\n t/t9600-cvsimport.sh |    2 ++\n 2 files changed, 43 insertions(+), 0 deletions(-)\n\ndiff --git a/t/lib-cvs.sh b/t/lib-cvs.sh\nindex 6738901..47f0e55 100644\n--- a/t/lib-cvs.sh\n+++ b/t/lib-cvs.sh\n@@ -32,3 +32,44 @@ case \"$cvsps_version\" in\n \texit\n \t;;\n esac\n+\n+test_cvs_export () {\n+\t# Usage: test_cvs_export BRANCH_NAME\n+\trm -rf module-cvs-\"$1\"\n+\tif [ \"$1\" = \"master\" ]\n+\tthen\n+\t\t$CVS co -P -d module-cvs-\"$1\" -A module\n+\telse\n+\t\t$CVS co -P -d module-cvs-\"$1\" -r \"$1\" module\n+\tfi\n+\t# Remove the CVS directories to make directory comparisons\n+\t# easier:\n+\tfind module-cvs-\"$1\" -type d -name CVS -exec rm -rf '{}' ';' -prune\n+}\n+\n+test_git_co_branch () {\n+\t# Usage: test_git_co BRANCH_NAME\n+\t(cd module-git && git checkout \"$1\")\n+}\n+\n+test_cmp_branch_tree () {\n+\t# Usage: test_cmp_branch_tree BRANCH_NAME\n+\t# Check BRANCH_NAME out of CVS and git and make sure that all\n+\t# of the files and directories are identical.\n+\n+\ttest_cvs_export \"$1\" &&\n+\ttest_git_co_branch \"$1\" &&\n+\t(\n+\t\tcd module-cvs-\"$1\"\n+\t\tfind . -type d -name CVS -prune -o -type f -print\n+\t) | sort >module-cvs-\"$1\".list &&\n+\t(\n+\t\tcd module-git\n+\t\tfind . -type d -name .git -prune -o -type f -print\n+\t) | sort >module-git-\"$1\".list &&\n+\ttest_cmp module-cvs-\"$1\".list module-git-\"$1\".list &&\n+\tcat module-cvs-\"$1\".list | while read f\n+\tdo\n+\t\ttest_cmp_branch_file \"$1\" \"$f\" || return 1\n+\tdone\n+}\ndiff --git a/t/t9600-cvsimport.sh b/t/t9600-cvsimport.sh\nindex 3110a8c..e3734b3 100755\n--- a/t/t9600-cvsimport.sh\n+++ b/t/t9600-cvsimport.sh\n@@ -121,4 +121,6 @@ test_expect_success 'import from a CVS working tree' '\n \n '\n \n+test_expect_success 'test entire HEAD' 'test_cmp_branch_tree master'\n+\n test_done\n-- \n1.6.1.3\n"},{"id":"105711","messageId":"62960fa97012833859a8f4f8d68a625f8851f8be.1235220105.git.mhagger@alum.mit.edu","threadId":"17934","inReplyTo":"cda1b6751447f990ca0e45e2e54f62ae9c53e6c1.1235220105.git.mhagger@alum.mit.edu","subject":"[PATCH v2 4/5] Add some tests of git-cvsimport's handling of vendor branches","fromName":"Michael Haggerty","fromEmail":"mhagger@alum.mit.edu","sentAt":"2009-02-21T13:04:39Z","receivedAt":"2009-02-21T13:04:39Z","isPatch":true,"sender":{"key":"mhagger@alum.mit.edu","avatar":"https://avatars.githubusercontent.com/u/119718?v=4"},"body":"CVS's handling of vendor branches is tricky; add some tests to check\nwhether revisions added via \"cvs imports\" then imported to git via\n\"git cvsimport\" are reflected correctly on master.\n\nOne of these tests fail and is therefore marked \"test_expect_failure\".\nCvsimport doesn't realize that subsequent changes on a vendor branch\naffect master as long as the vendor branch is the default branch.\n\nThe test CVS repository used for these tests is derived from cvs2svn's\ntest suite.\n\nSigned-off-by: Michael Haggerty <mhagger@alum.mit.edu>\n---\n t/lib-cvs.sh                                       |    6 ++\n t/t9601-cvsimport-vendor-branch.sh                 |   86 ++++++++++++++++++++\n t/t9601/cvsroot/.gitattributes                     |    1 +\n t/t9601/cvsroot/CVSROOT/.gitignore                 |    1 +\n t/t9601/cvsroot/module/added-imported.txt,v        |   44 ++++++++++\n t/t9601/cvsroot/module/imported-anonymously.txt,v  |   42 ++++++++++\n .../module/imported-modified-imported.txt,v        |   76 +++++++++++++++++\n t/t9601/cvsroot/module/imported-modified.txt,v     |   59 +++++++++++++\n t/t9601/cvsroot/module/imported-once.txt,v         |   43 ++++++++++\n t/t9601/cvsroot/module/imported-twice.txt,v        |   60 ++++++++++++++\n 10 files changed, 418 insertions(+), 0 deletions(-)\n create mode 100755 t/t9601-cvsimport-vendor-branch.sh\n create mode 100644 t/t9601/cvsroot/.gitattributes\n create mode 100644 t/t9601/cvsroot/CVSROOT/.gitignore\n create mode 100644 t/t9601/cvsroot/module/added-imported.txt,v\n create mode 100644 t/t9601/cvsroot/module/imported-anonymously.txt,v\n create mode 100644 t/t9601/cvsroot/module/imported-modified-imported.txt,v\n create mode 100644 t/t9601/cvsroot/module/imported-modified.txt,v\n create mode 100644 t/t9601/cvsroot/module/imported-once.txt,v\n create mode 100644 t/t9601/cvsroot/module/imported-twice.txt,v\n\ndiff --git a/t/lib-cvs.sh b/t/lib-cvs.sh\nindex 47f0e55..5c74f8d 100644\n--- a/t/lib-cvs.sh\n+++ b/t/lib-cvs.sh\n@@ -52,6 +52,12 @@ test_git_co_branch () {\n \t(cd module-git && git checkout \"$1\")\n }\n \n+test_cmp_branch_file () {\n+\t# Usage: test_cmp_branch_file BRANCH_NAME PATH\n+\t# The branch must already be checked out of CVS and git.\n+\ttest_cmp module-cvs-\"$1\"/\"$2\" module-git/\"$2\"\n+}\n+\n test_cmp_branch_tree () {\n \t# Usage: test_cmp_branch_tree BRANCH_NAME\n \t# Check BRANCH_NAME out of CVS and git and make sure that all\ndiff --git a/t/t9601-cvsimport-vendor-branch.sh b/t/t9601-cvsimport-vendor-branch.sh\nnew file mode 100755\nindex 0000000..9ee6843\n--- /dev/null\n+++ b/t/t9601-cvsimport-vendor-branch.sh\n@@ -0,0 +1,86 @@\n+#!/bin/sh\n+\n+# Description of the files in the repository:\n+#\n+#    imported-once.txt:\n+#\n+#       Imported once.  1.1 and 1.1.1.1 should be identical.\n+#\n+#    imported-twice.txt:\n+#\n+#       Imported twice.  HEAD should reflect the contents of the\n+#       second import (i.e., have the same contents as 1.1.1.2).\n+#\n+#    imported-modified.txt:\n+#\n+#       Imported, then modified on HEAD.  HEAD should reflect the\n+#       modification.\n+#\n+#    imported-modified-imported.txt:\n+#\n+#       Imported, then modified on HEAD, then imported again.\n+#\n+#    added-imported.txt,v:\n+#\n+#       Added with 'cvs add' to create 1.1, then imported with\n+#       completely different contents to create 1.1.1.1, therefore the\n+#       vendor branch was never the default branch.\n+#\n+#    imported-anonymously.txt:\n+#\n+#       Like imported-twice.txt, but with a vendor branch whose branch\n+#       tag has been removed.\n+\n+test_description='git cvsimport handling of vendor branches'\n+. ./lib-cvs.sh\n+\n+CVSROOT=\"$TEST_DIRECTORY\"/t9601/cvsroot\n+export CVSROOT\n+\n+test_expect_success 'import a module with a vendor branch' '\n+\n+\tgit cvsimport -C module-git module\n+\n+'\n+\n+test_expect_success 'check HEAD out of cvs repository' 'test_cvs_co master'\n+\n+test_expect_success 'check master out of git repository' 'test_git_co_branch master'\n+\n+test_expect_success 'check a file that was imported once' '\n+\n+\ttest_cmp_branch_file master imported-once.txt\n+\n+'\n+\n+test_expect_failure 'check a file that was imported twice' '\n+\n+\ttest_cmp_branch_file master imported-twice.txt\n+\n+'\n+\n+test_expect_success 'check a file that was imported then modified on HEAD' '\n+\n+\ttest_cmp_branch_file master imported-modified.txt\n+\n+'\n+\n+test_expect_success 'check a file that was imported, modified, then imported again' '\n+\n+\ttest_cmp_branch_file master imported-modified-imported.txt\n+\n+'\n+\n+test_expect_success 'check a file that was added to HEAD then imported' '\n+\n+\ttest_cmp_branch_file master added-imported.txt\n+\n+'\n+\n+test_expect_success 'a vendor branch whose tag has been removed' '\n+\n+\ttest_cmp_branch_file master imported-anonymously.txt\n+\n+'\n+\n+test_done\ndiff --git a/t/t9601/cvsroot/.gitattributes b/t/t9601/cvsroot/.gitattributes\nnew file mode 100644\nindex 0000000..562b12e\n--- /dev/null\n+++ b/t/t9601/cvsroot/.gitattributes\n@@ -0,0 +1 @@\n+* -whitespace\ndiff --git a/t/t9601/cvsroot/CVSROOT/.gitignore b/t/t9601/cvsroot/CVSROOT/.gitignore\nnew file mode 100644\nindex 0000000..c375d5b\n--- /dev/null\n+++ b/t/t9601/cvsroot/CVSROOT/.gitignore\n@@ -0,0 +1 @@\n+history\ndiff --git a/t/t9601/cvsroot/module/added-imported.txt,v b/t/t9601/cvsroot/module/added-imported.txt,v\nnew file mode 100644\nindex 0000000..5f83072\n--- /dev/null\n+++ b/t/t9601/cvsroot/module/added-imported.txt,v\n@@ -0,0 +1,44 @@\n+head\t1.1;\n+access;\n+symbols\n+\tvtag-4:1.1.1.1\n+\tvbranchA:1.1.1;\n+locks; strict;\n+comment\t@# @;\n+\n+\n+1.1\n+date\t2004.02.09.15.43.15;\tauthor kfogel;\tstate Exp;\n+branches\n+\t1.1.1.1;\n+next\t;\n+\n+1.1.1.1\n+date\t2004.02.09.15.43.16;\tauthor kfogel;\tstate Exp;\n+branches;\n+next\t;\n+\n+\n+desc\n+@@\n+\n+\n+1.1\n+log\n+@Add a file to the working copy.\n+@\n+text\n+@Adding this file, before importing it with different contents.\n+@\n+\n+\n+1.1.1.1\n+log\n+@Import (vbranchA, vtag-4).\n+@\n+text\n+@d1 1\n+a1 1\n+This is vtag-4 (on vbranchA) of added-then-imported.txt.\n+@\n+\ndiff --git a/t/t9601/cvsroot/module/imported-anonymously.txt,v b/t/t9601/cvsroot/module/imported-anonymously.txt,v\nnew file mode 100644\nindex 0000000..55e1b0c\n--- /dev/null\n+++ b/t/t9601/cvsroot/module/imported-anonymously.txt,v\n@@ -0,0 +1,42 @@\n+head\t1.1;\n+branch\t1.1.1;\n+access;\n+symbols\n+\tvtag-1:1.1.1.1;\n+locks; strict;\n+comment\t@# @;\n+\n+\n+1.1\n+date\t2004.02.09.15.43.13;\tauthor kfogel;\tstate Exp;\n+branches\n+\t1.1.1.1;\n+next\t;\n+\n+1.1.1.1\n+date\t2004.02.09.15.43.13;\tauthor kfogel;\tstate Exp;\n+branches;\n+next\t;\n+\n+\n+desc\n+@@\n+\n+\n+1.1\n+log\n+@Initial revision\n+@\n+text\n+@This is vtag-1 (on vbranchA) of imported-anonymously.txt.\n+@\n+\n+\n+1.1.1.1\n+log\n+@Import (vbranchA, vtag-1).\n+@\n+text\n+@@\n+\n+\ndiff --git a/t/t9601/cvsroot/module/imported-modified-imported.txt,v b/t/t9601/cvsroot/module/imported-modified-imported.txt,v\nnew file mode 100644\nindex 0000000..e5830ae\n--- /dev/null\n+++ b/t/t9601/cvsroot/module/imported-modified-imported.txt,v\n@@ -0,0 +1,76 @@\n+head\t1.2;\n+access;\n+symbols\n+\tvtag-2:1.1.1.2\n+\tvtag-1:1.1.1.1\n+\tvbranchA:1.1.1;\n+locks; strict;\n+comment\t@# @;\n+\n+\n+1.2\n+date\t2004.02.09.15.43.14;\tauthor kfogel;\tstate Exp;\n+branches;\n+next\t1.1;\n+\n+1.1\n+date\t2004.02.09.15.43.13;\tauthor kfogel;\tstate Exp;\n+branches\n+\t1.1.1.1;\n+next\t;\n+\n+1.1.1.1\n+date\t2004.02.09.15.43.13;\tauthor kfogel;\tstate Exp;\n+branches;\n+next\t1.1.1.2;\n+\n+1.1.1.2\n+date\t2004.02.09.15.43.13;\tauthor kfogel;\tstate Exp;\n+branches;\n+next\t;\n+\n+\n+desc\n+@@\n+\n+\n+1.2\n+log\n+@First regular commit, to imported-modified-imported.txt, on HEAD.\n+@\n+text\n+@This is a modification of imported-modified-imported.txt on HEAD.\n+It should supersede the version from the vendor branch.\n+@\n+\n+\n+1.1\n+log\n+@Initial revision\n+@\n+text\n+@d1 2\n+a2 1\n+This is vtag-1 (on vbranchA) of imported-modified-imported.txt.\n+@\n+\n+\n+1.1.1.1\n+log\n+@Import (vbranchA, vtag-1).\n+@\n+text\n+@@\n+\n+\n+1.1.1.2\n+log\n+@Import (vbranchA, vtag-2).\n+@\n+text\n+@d1 1\n+a1 1\n+This is vtag-2 (on vbranchA) of imported-modified-imported.txt.\n+@\n+\n+\ndiff --git a/t/t9601/cvsroot/module/imported-modified.txt,v b/t/t9601/cvsroot/module/imported-modified.txt,v\nnew file mode 100644\nindex 0000000..bbcfe44\n--- /dev/null\n+++ b/t/t9601/cvsroot/module/imported-modified.txt,v\n@@ -0,0 +1,59 @@\n+head\t1.2;\n+access;\n+symbols\n+\tvtag-1:1.1.1.1\n+\tvbranchA:1.1.1;\n+locks; strict;\n+comment\t@# @;\n+\n+\n+1.2\n+date\t2004.02.09.15.43.14;\tauthor kfogel;\tstate Exp;\n+branches;\n+next\t1.1;\n+\n+1.1\n+date\t2004.02.09.15.43.13;\tauthor kfogel;\tstate Exp;\n+branches\n+\t1.1.1.1;\n+next\t;\n+\n+1.1.1.1\n+date\t2004.02.09.15.43.13;\tauthor kfogel;\tstate Exp;\n+branches;\n+next\t;\n+\n+\n+desc\n+@@\n+\n+\n+1.2\n+log\n+@Commit on HEAD.\n+@\n+text\n+@This is a modification of imported-modified.txt on HEAD.\n+It should supersede the version from the vendor branch.\n+@\n+\n+\n+1.1\n+log\n+@Initial revision\n+@\n+text\n+@d1 2\n+a2 1\n+This is vtag-1 (on vbranchA) of imported-modified.txt.\n+@\n+\n+\n+1.1.1.1\n+log\n+@Import (vbranchA, vtag-1).\n+@\n+text\n+@@\n+\n+\ndiff --git a/t/t9601/cvsroot/module/imported-once.txt,v b/t/t9601/cvsroot/module/imported-once.txt,v\nnew file mode 100644\nindex 0000000..c5dd82b\n--- /dev/null\n+++ b/t/t9601/cvsroot/module/imported-once.txt,v\n@@ -0,0 +1,43 @@\n+head\t1.1;\n+branch\t1.1.1;\n+access;\n+symbols\n+\tvtag-1:1.1.1.1\n+\tvbranchA:1.1.1;\n+locks; strict;\n+comment\t@# @;\n+\n+\n+1.1\n+date\t2004.02.09.15.43.13;\tauthor kfogel;\tstate Exp;\n+branches\n+\t1.1.1.1;\n+next\t;\n+\n+1.1.1.1\n+date\t2004.02.09.15.43.13;\tauthor kfogel;\tstate Exp;\n+branches;\n+next\t;\n+\n+\n+desc\n+@@\n+\n+\n+1.1\n+log\n+@Initial revision\n+@\n+text\n+@This is vtag-1 (on vbranchA) of imported-once.txt.\n+@\n+\n+\n+1.1.1.1\n+log\n+@Import (vbranchA, vtag-1).\n+@\n+text\n+@@\n+\n+\ndiff --git a/t/t9601/cvsroot/module/imported-twice.txt,v b/t/t9601/cvsroot/module/imported-twice.txt,v\nnew file mode 100644\nindex 0000000..d1f3f1b\n--- /dev/null\n+++ b/t/t9601/cvsroot/module/imported-twice.txt,v\n@@ -0,0 +1,60 @@\n+head\t1.1;\n+branch\t1.1.1;\n+access;\n+symbols\n+\tvtag-2:1.1.1.2\n+\tvtag-1:1.1.1.1\n+\tvbranchA:1.1.1;\n+locks; strict;\n+comment\t@# @;\n+\n+\n+1.1\n+date\t2004.02.09.15.43.13;\tauthor kfogel;\tstate Exp;\n+branches\n+\t1.1.1.1;\n+next\t;\n+\n+1.1.1.1\n+date\t2004.02.09.15.43.13;\tauthor kfogel;\tstate Exp;\n+branches;\n+next\t1.1.1.2;\n+\n+1.1.1.2\n+date\t2004.02.09.15.43.13;\tauthor kfogel;\tstate Exp;\n+branches;\n+next\t;\n+\n+\n+desc\n+@@\n+\n+\n+1.1\n+log\n+@Initial revision\n+@\n+text\n+@This is vtag-1 (on vbranchA) of imported-twice.txt.\n+@\n+\n+\n+1.1.1.1\n+log\n+@Import (vbranchA, vtag-1).\n+@\n+text\n+@@\n+\n+\n+1.1.1.2\n+log\n+@Import (vbranchA, vtag-2).\n+@\n+text\n+@d1 1\n+a1 1\n+This is vtag-2 (on vbranchA) of imported-twice.txt.\n+@\n+\n+\n-- \n1.6.1.3\n"},{"id":"105713","messageId":"81bc906e87dd8bf0a4d94922a9bc3ecbfd629c82.1235220105.git.mhagger@alum.mit.edu","threadId":"17934","inReplyTo":"62960fa97012833859a8f4f8d68a625f8851f8be.1235220105.git.mhagger@alum.mit.edu","subject":"[PATCH v2 5/5] Add a test of \"git cvsimport\"'s handling of tags and branches","fromName":"Michael Haggerty","fromEmail":"mhagger@alum.mit.edu","sentAt":"2009-02-21T13:04:40Z","receivedAt":"2009-02-21T13:04:40Z","isPatch":true,"sender":{"key":"mhagger@alum.mit.edu","avatar":"https://avatars.githubusercontent.com/u/119718?v=4"},"body":"6 out of 11 of these tests fail.\n\nThe test CVS repository used for these tests is derived from one in\ncvs2svn's test suite.\n\nSigned-off-by: Michael Haggerty <mhagger@alum.mit.edu>\n---\n t/t9602-cvsimport-branches-tags.sh                 |   79 ++++++++++++++\n t/t9602/README                                     |   62 +++++++++++\n t/t9602/cvsroot/.gitattributes                     |    1 +\n t/t9602/cvsroot/CVSROOT/.gitignore                 |    1 +\n t/t9602/cvsroot/module/default,v                   |  102 +++++++++++++++++++\n t/t9602/cvsroot/module/sub1/default,v              |  102 +++++++++++++++++++\n t/t9602/cvsroot/module/sub1/subsubA/default,v      |  101 ++++++++++++++++++\n t/t9602/cvsroot/module/sub1/subsubB/default,v      |  107 ++++++++++++++++++++\n .../module/sub2/Attic/branch_B_MIXED_only,v        |   59 +++++++++++\n t/t9602/cvsroot/module/sub2/default,v              |  102 +++++++++++++++++++\n t/t9602/cvsroot/module/sub2/subsubA/default,v      |  102 +++++++++++++++++++\n t/t9602/cvsroot/module/sub3/default,v              |  102 +++++++++++++++++++\n 12 files changed, 920 insertions(+), 0 deletions(-)\n create mode 100755 t/t9602-cvsimport-branches-tags.sh\n create mode 100644 t/t9602/README\n create mode 100644 t/t9602/cvsroot/.gitattributes\n create mode 100644 t/t9602/cvsroot/CVSROOT/.gitignore\n create mode 100644 t/t9602/cvsroot/module/default,v\n create mode 100644 t/t9602/cvsroot/module/sub1/default,v\n create mode 100644 t/t9602/cvsroot/module/sub1/subsubA/default,v\n create mode 100644 t/t9602/cvsroot/module/sub1/subsubB/default,v\n create mode 100644 t/t9602/cvsroot/module/sub2/Attic/branch_B_MIXED_only,v\n create mode 100644 t/t9602/cvsroot/module/sub2/default,v\n create mode 100644 t/t9602/cvsroot/module/sub2/subsubA/default,v\n create mode 100644 t/t9602/cvsroot/module/sub3/default,v\n\ndiff --git a/t/t9602-cvsimport-branches-tags.sh b/t/t9602-cvsimport-branches-tags.sh\nnew file mode 100755\nindex 0000000..67878b2\n--- /dev/null\n+++ b/t/t9602-cvsimport-branches-tags.sh\n@@ -0,0 +1,79 @@\n+#!/bin/sh\n+\n+# A description of the repository used for this test can be found in\n+# t9602/README.\n+\n+test_description='git cvsimport handling of branches and tags'\n+. ./lib-cvs.sh\n+\n+CVSROOT=\"$TEST_DIRECTORY\"/t9602/cvsroot\n+export CVSROOT\n+\n+test_expect_success 'import module' '\n+\n+\tgit cvsimport -C module-git module\n+\n+'\n+\n+test_expect_success 'test branch master' '\n+\n+\ttest_cmp_branch_tree master\n+\n+'\n+\n+test_expect_success 'test branch vendorbranch' '\n+\n+\ttest_cmp_branch_tree vendorbranch\n+\n+'\n+\n+test_expect_failure 'test branch B_FROM_INITIALS' '\n+\n+\ttest_cmp_branch_tree B_FROM_INITIALS\n+\n+'\n+\n+test_expect_failure 'test branch B_FROM_INITIALS_BUT_ONE' '\n+\n+\ttest_cmp_branch_tree B_FROM_INITIALS_BUT_ONE\n+\n+'\n+\n+test_expect_failure 'test branch B_MIXED' '\n+\n+\ttest_cmp_branch_tree B_MIXED\n+\n+'\n+\n+test_expect_success 'test branch B_SPLIT' '\n+\n+\ttest_cmp_branch_tree B_SPLIT\n+\n+'\n+\n+test_expect_failure 'test tag vendortag' '\n+\n+\ttest_cmp_branch_tree vendortag\n+\n+'\n+\n+test_expect_success 'test tag T_ALL_INITIAL_FILES' '\n+\n+\ttest_cmp_branch_tree T_ALL_INITIAL_FILES\n+\n+'\n+\n+test_expect_failure 'test tag T_ALL_INITIAL_FILES_BUT_ONE' '\n+\n+\ttest_cmp_branch_tree T_ALL_INITIAL_FILES_BUT_ONE\n+\n+'\n+\n+test_expect_failure 'test tag T_MIXED' '\n+\n+\ttest_cmp_branch_tree T_MIXED\n+\n+'\n+\n+\n+test_done\ndiff --git a/t/t9602/README b/t/t9602/README\nnew file mode 100644\nindex 0000000..c231e0f\n--- /dev/null\n+++ b/t/t9602/README\n@@ -0,0 +1,62 @@\n+This repository is for testing the ability to group revisions\n+correctly along tags and branches.  Here is its history:\n+\n+  1.  The initial import (revision 1.1 of everybody) created a\n+      directory structure with a file named `default' in each dir:\n+\n+            ./\n+              default\n+              sub1/default\n+                   subsubA/default\n+                   subsubB/default\n+              sub2/default\n+                   subsubA/default\n+              sub3/default\n+\n+  2.  Then tagged everyone with T_ALL_INITIAL_FILES.\n+\n+  3.  Then tagged everyone except sub1/subsubB/default with\n+      T_ALL_INITIAL_FILES_BUT_ONE.\n+\n+  4.  Then created branch B_FROM_INITIALS on everyone.\n+\n+  5.  Then created branch B_FROM_INITIALS_BUT_ONE on everyone except\n+      /sub1/subsubB/default.\n+\n+  6.  Then committed modifications to two files: sub3/default, and\n+      sub1/subsubA/default.\n+\n+  7.  Then committed a modification to all 7 files.\n+\n+  8.  Then backdated sub3/default to revision 1.2, and\n+      sub2/subsubA/default to revision 1.1, and tagged with T_MIXED.\n+\n+  9.  Same as 8, but tagged with -b to create branch B_MIXED.\n+\n+  10. Switched the working copy to B_MIXED, and added\n+      sub2/branch_B_MIXED_only.  (That's why the RCS file is in\n+      sub2/Attic/ -- it never existed on trunk.)\n+\n+  11. In one commit, modified default, sub1/default, and\n+      sub2/subsubA/default, on branch B_MIXED.\n+\n+  12. Did \"cvs up -A\" on sub2/default, then in one commit, made a\n+      change to sub2/default and sub2/branch_B_MIXED_only.  So this\n+      commit should be spread between the branch and the trunk.\n+\n+  13. Do \"cvs up -A\" to get everyone back to trunk, then make a new\n+      branch B_SPLIT on everyone except sub1/subsubB/default,v.\n+\n+  14. Switch to branch B_SPLIT (see sub1/subsubB/default disappear)\n+      and commit a change that affects everyone except sub3/default.\n+\n+  15. An hour or so later, \"cvs up -A\" to get sub1/subsubB/default\n+      back, then commit a change on that file, on trunk.  (It's\n+      important that this change happened after the previous commits\n+      on B_SPLIT.)\n+\n+  16. Branch sub1/subsubB/default to B_SPLIT, then \"cvs up -r B_SPLIT\"\n+      to switch the whole working copy to the branch.\n+\n+  17. Commit a change on B_SPLIT, to sub1/subsubB/default and\n+      sub3/default.\ndiff --git a/t/t9602/cvsroot/.gitattributes b/t/t9602/cvsroot/.gitattributes\nnew file mode 100644\nindex 0000000..562b12e\n--- /dev/null\n+++ b/t/t9602/cvsroot/.gitattributes\n@@ -0,0 +1 @@\n+* -whitespace\ndiff --git a/t/t9602/cvsroot/CVSROOT/.gitignore b/t/t9602/cvsroot/CVSROOT/.gitignore\nnew file mode 100644\nindex 0000000..c375d5b\n--- /dev/null\n+++ b/t/t9602/cvsroot/CVSROOT/.gitignore\n@@ -0,0 +1 @@\n+history\ndiff --git a/t/t9602/cvsroot/module/default,v b/t/t9602/cvsroot/module/default,v\nnew file mode 100644\nindex 0000000..3b68382\n--- /dev/null\n+++ b/t/t9602/cvsroot/module/default,v\n@@ -0,0 +1,102 @@\n+head\t1.2;\n+access;\n+symbols\n+\tB_SPLIT:1.2.0.4\n+\tB_MIXED:1.2.0.2\n+\tT_MIXED:1.2\n+\tB_FROM_INITIALS_BUT_ONE:1.1.1.1.0.4\n+\tB_FROM_INITIALS:1.1.1.1.0.2\n+\tT_ALL_INITIAL_FILES_BUT_ONE:1.1.1.1\n+\tT_ALL_INITIAL_FILES:1.1.1.1\n+\tvendortag:1.1.1.1\n+\tvendorbranch:1.1.1;\n+locks; strict;\n+comment\t@# @;\n+\n+\n+1.2\n+date\t2003.05.23.00.17.53;\tauthor jrandom;\tstate Exp;\n+branches\n+\t1.2.2.1\n+\t1.2.4.1;\n+next\t1.1;\n+\n+1.1\n+date\t2003.05.22.23.20.19;\tauthor jrandom;\tstate Exp;\n+branches\n+\t1.1.1.1;\n+next\t;\n+\n+1.1.1.1\n+date\t2003.05.22.23.20.19;\tauthor jrandom;\tstate Exp;\n+branches;\n+next\t;\n+\n+1.2.2.1\n+date\t2003.05.23.00.31.36;\tauthor jrandom;\tstate Exp;\n+branches;\n+next\t;\n+\n+1.2.4.1\n+date\t2003.06.03.03.20.31;\tauthor jrandom;\tstate Exp;\n+branches;\n+next\t;\n+\n+\n+desc\n+@@\n+\n+\n+1.2\n+log\n+@Second commit to proj, affecting all 7 files.\n+@\n+text\n+@This is the file `default' in the top level of the project.\n+\n+Every directory in the `proj' project has a file named `default'.\n+\n+This line was added in the second commit (affecting all 7 files).\n+@\n+\n+\n+1.2.4.1\n+log\n+@First change on branch B_SPLIT.\n+\n+This change excludes sub3/default, because it was not part of this\n+commit, and sub1/subsubB/default, which is not even on the branch yet.\n+@\n+text\n+@a5 2\n+\n+First change on branch B_SPLIT.\n+@\n+\n+\n+1.2.2.1\n+log\n+@Modify three files, on branch B_MIXED.\n+@\n+text\n+@a5 2\n+\n+This line was added on branch B_MIXED only (affecting 3 files).\n+@\n+\n+\n+1.1\n+log\n+@Initial revision\n+@\n+text\n+@d4 2\n+@\n+\n+\n+1.1.1.1\n+log\n+@Initial import.\n+@\n+text\n+@@\ndiff --git a/t/t9602/cvsroot/module/sub1/default,v b/t/t9602/cvsroot/module/sub1/default,v\nnew file mode 100644\nindex 0000000..b7fdccd\n--- /dev/null\n+++ b/t/t9602/cvsroot/module/sub1/default,v\n@@ -0,0 +1,102 @@\n+head\t1.2;\n+access;\n+symbols\n+\tB_SPLIT:1.2.0.4\n+\tB_MIXED:1.2.0.2\n+\tT_MIXED:1.2\n+\tB_FROM_INITIALS_BUT_ONE:1.1.1.1.0.4\n+\tB_FROM_INITIALS:1.1.1.1.0.2\n+\tT_ALL_INITIAL_FILES_BUT_ONE:1.1.1.1\n+\tT_ALL_INITIAL_FILES:1.1.1.1\n+\tvendortag:1.1.1.1\n+\tvendorbranch:1.1.1;\n+locks; strict;\n+comment\t@# @;\n+\n+\n+1.2\n+date\t2003.05.23.00.17.53;\tauthor jrandom;\tstate Exp;\n+branches\n+\t1.2.2.1\n+\t1.2.4.1;\n+next\t1.1;\n+\n+1.1\n+date\t2003.05.22.23.20.19;\tauthor jrandom;\tstate Exp;\n+branches\n+\t1.1.1.1;\n+next\t;\n+\n+1.1.1.1\n+date\t2003.05.22.23.20.19;\tauthor jrandom;\tstate Exp;\n+branches;\n+next\t;\n+\n+1.2.2.1\n+date\t2003.05.23.00.31.36;\tauthor jrandom;\tstate Exp;\n+branches;\n+next\t;\n+\n+1.2.4.1\n+date\t2003.06.03.03.20.31;\tauthor jrandom;\tstate Exp;\n+branches;\n+next\t;\n+\n+\n+desc\n+@@\n+\n+\n+1.2\n+log\n+@Second commit to proj, affecting all 7 files.\n+@\n+text\n+@This is sub1/default.\n+\n+Every directory in the `proj' project has a file named `default'.\n+\n+This line was added in the second commit (affecting all 7 files).\n+@\n+\n+\n+1.2.4.1\n+log\n+@First change on branch B_SPLIT.\n+\n+This change excludes sub3/default, because it was not part of this\n+commit, and sub1/subsubB/default, which is not even on the branch yet.\n+@\n+text\n+@a5 2\n+\n+First change on branch B_SPLIT.\n+@\n+\n+\n+1.2.2.1\n+log\n+@Modify three files, on branch B_MIXED.\n+@\n+text\n+@a5 2\n+\n+This line was added on branch B_MIXED only (affecting 3 files).\n+@\n+\n+\n+1.1\n+log\n+@Initial revision\n+@\n+text\n+@d4 2\n+@\n+\n+\n+1.1.1.1\n+log\n+@Initial import.\n+@\n+text\n+@@\ndiff --git a/t/t9602/cvsroot/module/sub1/subsubA/default,v b/t/t9602/cvsroot/module/sub1/subsubA/default,v\nnew file mode 100644\nindex 0000000..472b7b2\n--- /dev/null\n+++ b/t/t9602/cvsroot/module/sub1/subsubA/default,v\n@@ -0,0 +1,101 @@\n+head\t1.3;\n+access;\n+symbols\n+\tB_SPLIT:1.3.0.4\n+\tB_MIXED:1.3.0.2\n+\tT_MIXED:1.3\n+\tB_FROM_INITIALS_BUT_ONE:1.1.1.1.0.4\n+\tB_FROM_INITIALS:1.1.1.1.0.2\n+\tT_ALL_INITIAL_FILES_BUT_ONE:1.1.1.1\n+\tT_ALL_INITIAL_FILES:1.1.1.1\n+\tvendortag:1.1.1.1\n+\tvendorbranch:1.1.1;\n+locks; strict;\n+comment\t@# @;\n+\n+\n+1.3\n+date\t2003.05.23.00.17.53;\tauthor jrandom;\tstate Exp;\n+branches\n+\t1.3.4.1;\n+next\t1.2;\n+\n+1.2\n+date\t2003.05.23.00.15.26;\tauthor jrandom;\tstate Exp;\n+branches;\n+next\t1.1;\n+\n+1.1\n+date\t2003.05.22.23.20.19;\tauthor jrandom;\tstate Exp;\n+branches\n+\t1.1.1.1;\n+next\t;\n+\n+1.1.1.1\n+date\t2003.05.22.23.20.19;\tauthor jrandom;\tstate Exp;\n+branches;\n+next\t;\n+\n+1.3.4.1\n+date\t2003.06.03.03.20.31;\tauthor jrandom;\tstate Exp;\n+branches;\n+next\t;\n+\n+\n+desc\n+@@\n+\n+\n+1.3\n+log\n+@Second commit to proj, affecting all 7 files.\n+@\n+text\n+@This is sub1/subsubA/default.\n+\n+Every directory in the `proj' project has a file named `default'.\n+\n+This line was added by the first commit (affecting two files).\n+\n+This line was added in the second commit (affecting all 7 files).\n+@\n+\n+\n+1.3.4.1\n+log\n+@First change on branch B_SPLIT.\n+\n+This change excludes sub3/default, because it was not part of this\n+commit, and sub1/subsubB/default, which is not even on the branch yet.\n+@\n+text\n+@a7 2\n+\n+First change on branch B_SPLIT.\n+@\n+\n+\n+1.2\n+log\n+@First commit to proj, affecting two files.\n+@\n+text\n+@d6 2\n+@\n+\n+\n+1.1\n+log\n+@Initial revision\n+@\n+text\n+@d4 2\n+@\n+\n+\n+1.1.1.1\n+log\n+@Initial import.\n+@\n+text\n+@@\ndiff --git a/t/t9602/cvsroot/module/sub1/subsubB/default,v b/t/t9602/cvsroot/module/sub1/subsubB/default,v\nnew file mode 100644\nindex 0000000..fe6efa4\n--- /dev/null\n+++ b/t/t9602/cvsroot/module/sub1/subsubB/default,v\n@@ -0,0 +1,107 @@\n+head\t1.3;\n+access;\n+symbols\n+\tB_SPLIT:1.3.0.2\n+\tB_MIXED:1.2.0.2\n+\tT_MIXED:1.2\n+\tB_FROM_INITIALS:1.1.1.1.0.2\n+\tT_ALL_INITIAL_FILES:1.1.1.1\n+\tvendortag:1.1.1.1\n+\tvendorbranch:1.1.1;\n+locks; strict;\n+comment\t@# @;\n+\n+\n+1.3\n+date\t2003.06.03.04.29.14;\tauthor jrandom;\tstate Exp;\n+branches\n+\t1.3.2.1;\n+next\t1.2;\n+\n+1.2\n+date\t2003.05.23.00.17.53;\tauthor jrandom;\tstate Exp;\n+branches;\n+next\t1.1;\n+\n+1.1\n+date\t2003.05.22.23.20.19;\tauthor jrandom;\tstate Exp;\n+branches\n+\t1.1.1.1;\n+next\t;\n+\n+1.1.1.1\n+date\t2003.05.22.23.20.19;\tauthor jrandom;\tstate Exp;\n+branches;\n+next\t;\n+\n+1.3.2.1\n+date\t2003.06.03.04.33.13;\tauthor jrandom;\tstate Exp;\n+branches;\n+next\t;\n+\n+\n+desc\n+@@\n+\n+\n+1.3\n+log\n+@A trunk change to sub1/subsubB/default.  This was committed about an\n+hour after an earlier change that affected most files on branch\n+B_SPLIT.  This file is not on that branch yet, but after this commit,\n+we'll branch to B_SPLIT, albeit rooted in a revision that didn't exist\n+at the time the rest of B_SPLIT was created.\n+@\n+text\n+@This is sub1/subsubB/default.\n+\n+Every directory in the `proj' project has a file named `default'.\n+\n+This line was added in the second commit (affecting all 7 files).\n+\n+This bit was committed on trunk about an hour after an earlier change\n+to everyone else on branch B_SPLIT.  Afterwards, we'll finally branch\n+this file to B_SPLIT, but rooted in a revision that didn't exist at\n+the time the rest of B_SPLIT was created.\n+@\n+\n+\n+1.3.2.1\n+log\n+@This change affects sub3/default and sub1/subsubB/default, on branch\n+B_SPLIT.  Note that the latter file did not even exist on this branch\n+until after some other files had had revisions committed on B_SPLIT.\n+@\n+text\n+@a10 4\n+\n+This change affects sub3/default and sub1/subsubB/default, on branch\n+B_SPLIT.  Note that the latter file did not even exist on this branch\n+until after some other files had had revisions committed on B_SPLIT.\n+@\n+\n+\n+1.2\n+log\n+@Second commit to proj, affecting all 7 files.\n+@\n+text\n+@d6 5\n+@\n+\n+\n+1.1\n+log\n+@Initial revision\n+@\n+text\n+@d4 2\n+@\n+\n+\n+1.1.1.1\n+log\n+@Initial import.\n+@\n+text\n+@@\ndiff --git a/t/t9602/cvsroot/module/sub2/Attic/branch_B_MIXED_only,v b/t/t9602/cvsroot/module/sub2/Attic/branch_B_MIXED_only,v\nnew file mode 100644\nindex 0000000..34c9789\n--- /dev/null\n+++ b/t/t9602/cvsroot/module/sub2/Attic/branch_B_MIXED_only,v\n@@ -0,0 +1,59 @@\n+head\t1.1;\n+access;\n+symbols\n+\tB_MIXED:1.1.0.2;\n+locks; strict;\n+comment\t@# @;\n+\n+\n+1.1\n+date\t2003.05.23.00.25.26;\tauthor jrandom;\tstate dead;\n+branches\n+\t1.1.2.1;\n+next\t;\n+\n+1.1.2.1\n+date\t2003.05.23.00.25.26;\tauthor jrandom;\tstate Exp;\n+branches;\n+next\t1.1.2.2;\n+\n+1.1.2.2\n+date\t2003.05.23.00.48.51;\tauthor jrandom;\tstate Exp;\n+branches;\n+next\t;\n+\n+\n+desc\n+@@\n+\n+\n+1.1\n+log\n+@file branch_B_MIXED_only was initially added on branch B_MIXED.\n+@\n+text\n+@@\n+\n+\n+1.1.2.1\n+log\n+@Add a file on branch B_MIXED.\n+@\n+text\n+@a0 1\n+This file was added on branch B_MIXED.  It never existed on trunk.\n+@\n+\n+\n+1.1.2.2\n+log\n+@A single commit affecting one file on branch B_MIXED and one on trunk.\n+@\n+text\n+@a1 3\n+\n+The same commit added these two lines here on branch B_MIXED, and two\n+similar lines to ./default on trunk.\n+@\n+\n+\ndiff --git a/t/t9602/cvsroot/module/sub2/default,v b/t/t9602/cvsroot/module/sub2/default,v\nnew file mode 100644\nindex 0000000..018f7f8\n--- /dev/null\n+++ b/t/t9602/cvsroot/module/sub2/default,v\n@@ -0,0 +1,102 @@\n+head\t1.3;\n+access;\n+symbols\n+\tB_SPLIT:1.3.0.2\n+\tB_MIXED:1.2.0.2\n+\tT_MIXED:1.2\n+\tB_FROM_INITIALS_BUT_ONE:1.1.1.1.0.4\n+\tB_FROM_INITIALS:1.1.1.1.0.2\n+\tT_ALL_INITIAL_FILES_BUT_ONE:1.1.1.1\n+\tT_ALL_INITIAL_FILES:1.1.1.1\n+\tvendortag:1.1.1.1\n+\tvendorbranch:1.1.1;\n+locks; strict;\n+comment\t@# @;\n+\n+\n+1.3\n+date\t2003.05.23.00.48.51;\tauthor jrandom;\tstate Exp;\n+branches\n+\t1.3.2.1;\n+next\t1.2;\n+\n+1.2\n+date\t2003.05.23.00.17.53;\tauthor jrandom;\tstate Exp;\n+branches;\n+next\t1.1;\n+\n+1.1\n+date\t2003.05.22.23.20.19;\tauthor jrandom;\tstate Exp;\n+branches\n+\t1.1.1.1;\n+next\t;\n+\n+1.1.1.1\n+date\t2003.05.22.23.20.19;\tauthor jrandom;\tstate Exp;\n+branches;\n+next\t;\n+\n+1.3.2.1\n+date\t2003.06.03.03.20.31;\tauthor jrandom;\tstate Exp;\n+branches;\n+next\t;\n+\n+\n+desc\n+@@\n+\n+\n+1.3\n+log\n+@A single commit affecting one file on branch B_MIXED and one on trunk.\n+@\n+text\n+@This is sub2/default.\n+\n+Every directory in the `proj' project has a file named `default'.\n+\n+This line was added in the second commit (affecting all 7 files).\n+\n+The same commit added these two lines here on trunk, and two similar\n+lines to ./branch_B_MIXED_only on branch B_MIXED.\n+@\n+\n+\n+1.3.2.1\n+log\n+@First change on branch B_SPLIT.\n+\n+This change excludes sub3/default, because it was not part of this\n+commit, and sub1/subsubB/default, which is not even on the branch yet.\n+@\n+text\n+@a8 2\n+\n+First change on branch B_SPLIT.\n+@\n+\n+\n+1.2\n+log\n+@Second commit to proj, affecting all 7 files.\n+@\n+text\n+@d6 3\n+@\n+\n+\n+1.1\n+log\n+@Initial revision\n+@\n+text\n+@d4 2\n+@\n+\n+\n+1.1.1.1\n+log\n+@Initial import.\n+@\n+text\n+@@\ndiff --git a/t/t9602/cvsroot/module/sub2/subsubA/default,v b/t/t9602/cvsroot/module/sub2/subsubA/default,v\nnew file mode 100644\nindex 0000000..d13242c\n--- /dev/null\n+++ b/t/t9602/cvsroot/module/sub2/subsubA/default,v\n@@ -0,0 +1,102 @@\n+head\t1.2;\n+access;\n+symbols\n+\tB_SPLIT:1.2.0.2\n+\tB_MIXED:1.1.0.2\n+\tT_MIXED:1.1\n+\tB_FROM_INITIALS_BUT_ONE:1.1.1.1.0.4\n+\tB_FROM_INITIALS:1.1.1.1.0.2\n+\tT_ALL_INITIAL_FILES_BUT_ONE:1.1.1.1\n+\tT_ALL_INITIAL_FILES:1.1.1.1\n+\tvendortag:1.1.1.1\n+\tvendorbranch:1.1.1;\n+locks; strict;\n+comment\t@# @;\n+\n+\n+1.2\n+date\t2003.05.23.00.17.53;\tauthor jrandom;\tstate Exp;\n+branches\n+\t1.2.2.1;\n+next\t1.1;\n+\n+1.1\n+date\t2003.05.22.23.20.19;\tauthor jrandom;\tstate Exp;\n+branches\n+\t1.1.1.1\n+\t1.1.2.1;\n+next\t;\n+\n+1.1.1.1\n+date\t2003.05.22.23.20.19;\tauthor jrandom;\tstate Exp;\n+branches;\n+next\t;\n+\n+1.1.2.1\n+date\t2003.05.23.00.31.36;\tauthor jrandom;\tstate Exp;\n+branches;\n+next\t;\n+\n+1.2.2.1\n+date\t2003.06.03.03.20.31;\tauthor jrandom;\tstate Exp;\n+branches;\n+next\t;\n+\n+\n+desc\n+@@\n+\n+\n+1.2\n+log\n+@Second commit to proj, affecting all 7 files.\n+@\n+text\n+@This is sub2/subsub2/default.\n+\n+Every directory in the `proj' project has a file named `default'.\n+\n+This line was added in the second commit (affecting all 7 files).\n+@\n+\n+\n+1.2.2.1\n+log\n+@First change on branch B_SPLIT.\n+\n+This change excludes sub3/default, because it was not part of this\n+commit, and sub1/subsubB/default, which is not even on the branch yet.\n+@\n+text\n+@a5 2\n+\n+First change on branch B_SPLIT.\n+@\n+\n+\n+1.1\n+log\n+@Initial revision\n+@\n+text\n+@d4 2\n+@\n+\n+\n+1.1.2.1\n+log\n+@Modify three files, on branch B_MIXED.\n+@\n+text\n+@a3 2\n+\n+This line was added on branch B_MIXED only (affecting 3 files).\n+@\n+\n+\n+1.1.1.1\n+log\n+@Initial import.\n+@\n+text\n+@@\ndiff --git a/t/t9602/cvsroot/module/sub3/default,v b/t/t9602/cvsroot/module/sub3/default,v\nnew file mode 100644\nindex 0000000..88e4567\n--- /dev/null\n+++ b/t/t9602/cvsroot/module/sub3/default,v\n@@ -0,0 +1,102 @@\n+head\t1.3;\n+access;\n+symbols\n+\tB_SPLIT:1.3.0.2\n+\tB_MIXED:1.2.0.2\n+\tT_MIXED:1.2\n+\tB_FROM_INITIALS_BUT_ONE:1.1.1.1.0.4\n+\tB_FROM_INITIALS:1.1.1.1.0.2\n+\tT_ALL_INITIAL_FILES_BUT_ONE:1.1.1.1\n+\tT_ALL_INITIAL_FILES:1.1.1.1\n+\tvendortag:1.1.1.1\n+\tvendorbranch:1.1.1;\n+locks; strict;\n+comment\t@# @;\n+\n+\n+1.3\n+date\t2003.05.23.00.17.53;\tauthor jrandom;\tstate Exp;\n+branches\n+\t1.3.2.1;\n+next\t1.2;\n+\n+1.2\n+date\t2003.05.23.00.15.26;\tauthor jrandom;\tstate Exp;\n+branches;\n+next\t1.1;\n+\n+1.1\n+date\t2003.05.22.23.20.19;\tauthor jrandom;\tstate Exp;\n+branches\n+\t1.1.1.1;\n+next\t;\n+\n+1.1.1.1\n+date\t2003.05.22.23.20.19;\tauthor jrandom;\tstate Exp;\n+branches;\n+next\t;\n+\n+1.3.2.1\n+date\t2003.06.03.04.33.13;\tauthor jrandom;\tstate Exp;\n+branches;\n+next\t;\n+\n+\n+desc\n+@@\n+\n+\n+1.3\n+log\n+@Second commit to proj, affecting all 7 files.\n+@\n+text\n+@This is sub3/default.\n+\n+Every directory in the `proj' project has a file named `default'.\n+\n+This line was added by the first commit (affecting two files).\n+\n+This line was added in the second commit (affecting all 7 files).\n+@\n+\n+\n+1.3.2.1\n+log\n+@This change affects sub3/default and sub1/subsubB/default, on branch\n+B_SPLIT.  Note that the latter file did not even exist on this branch\n+until after some other files had had revisions committed on B_SPLIT.\n+@\n+text\n+@a7 4\n+\n+This change affects sub3/default and sub1/subsubB/default, on branch\n+B_SPLIT.  Note that the latter file did not even exist on this branch\n+until after some other files had had revisions committed on B_SPLIT.\n+@\n+\n+\n+1.2\n+log\n+@First commit to proj, affecting two files.\n+@\n+text\n+@d6 2\n+@\n+\n+\n+1.1\n+log\n+@Initial revision\n+@\n+text\n+@d4 2\n+@\n+\n+\n+1.1.1.1\n+log\n+@Initial import.\n+@\n+text\n+@@\n-- \n1.6.1.3\n"},{"id":"105777","messageId":"7vhc2m2z9l.fsf@gitster.siamese.dyndns.org","threadId":"17934","inReplyTo":"1235221480-31473-1-git-send-email-mhagger@alum.mit.edu","subject":"Re: [PATCH v2 0/4] Add more tests of cvsimport","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2009-02-22T16:48:54Z","receivedAt":"2009-02-22T16:48:54Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Michael Haggerty <mhagger@alum.mit.edu> writes:\n\n> Thanks for all the feedback.  I think I have incorporated it all:\n>\n> - Renamed the library from t/t96xx/cvs-lib.sh to t/lib-cvs.sh.\n>\n> - Added t/t9601/cvsroot/.gitattributes to avoid whitespace warnings.\n>\n> - Fixed the \"cvs co\" command for when checking out a branch/tag.\n>\n> - Implemented a recursive diff in test_cmp_branch_tree rather than\n>   relying on GNU diff features.  It is only a dozen lines of code, but\n>   please review this carefully as I'm not such a shell jockey.\n\nThanks.\n\n>   ....  It would also have the disadvantage of\n>   making \"git cvsimport\" tests fail if there are bugs in \"git diff\".\n\nThis is very true and for the same reason we tend to avoid using it\n(especially \"git diff --no-index\").  The tests are not making sure nobody\nhas broken \"git diff\" after all.\n"},{"id":"105781","messageId":"7vzlge1kob.fsf@gitster.siamese.dyndns.org","threadId":"17934","inReplyTo":"62960fa97012833859a8f4f8d68a625f8851f8be.1235220105.git.mhagger@alum.mit.edu","subject":"Re: [PATCH v2 4/5] Add some tests of git-cvsimport's handling of vendor branches","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2009-02-22T16:49:24Z","receivedAt":"2009-02-22T16:49:24Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Michael Haggerty <mhagger@alum.mit.edu> writes:\n\n> CVS's handling of vendor branches is tricky; add some tests to check\n> whether revisions added via \"cvs imports\" then imported to git via\n> \"git cvsimport\" are reflected correctly on master.\n> ...\n> One of these tests fail and is therefore marked \"test_expect_failure\".\n\nIn addition to the one marked with expect-failure, 2, 4, 6, 7, 8 and 9\nseems to fail for me as well.\n\n    $ sh t9601-cvsimport-vendor-branch.sh -i -v\n    Initialized empty Git repository in /git/git.git/t/trash directory.t9601-cvsimport-vendor-branch/.git/\n    * expecting success:\n\n            git cvsimport -C module-git module\n\n\n    Initialized empty Git repository in /git/git.git/t/trash directory.t9601-cvsimport-vendor-branch/module-git/.git/\n    Skipping #CVSPS_NO_BRANCH\n    *   ok 1: import a module with a vendor branch\n\n    * expecting success: test_cvs_co master\n    ./test-lib.sh: line 256: test_cvs_co: command not found\n    * FAIL 2: check HEAD out of cvs repository\n            test_cvs_co master\n\nThe reported line is where the broken test is actually \"eval\"ed; the \nsecond test tries to use the undefined test_cvs_co function.\n"},{"id":"105844","messageId":"1235365694-28935-1-git-send-email-mhagger@alum.mit.edu","threadId":"17934","inReplyTo":"7vzlge1kob.fsf@gitster.siamese.dyndns.org","subject":"[PATCH v3 0/5] Add more tests of cvsimport","fromName":"Michael Haggerty","fromEmail":"mhagger@alum.mit.edu","sentAt":"2009-02-23T05:08:09Z","receivedAt":"2009-02-23T05:08:09Z","isPatch":true,"sender":{"key":"mhagger@alum.mit.edu","avatar":"https://avatars.githubusercontent.com/u/119718?v=4"},"body":"@Junio, sorry for the screwup.  The attached patch series definitely\nworks on my machine (Linux, cvsps 2.1).\n\nJunio C Hamano wrote:\n> Thanks, both.  I generally am not very fond of adding tests without\n> intention to look into fixes, but if they make outstanding bugs more\n> visible, they may have the effect of shaming the original authors\n> badly enough to step in in the effort of fixing them :-)\n\nPlease note that the new tests only check the very basic minimal\nfunctionality of a conversion tool: that all of the CVS branches are\npresent, and that the tips of the branches have the same content as\nthose in the original CVS repository.  So far they cover perhaps 5% of\nthe cvs2svn/cvs2git test repository.\n\nI am convinced that robust cvsps-based repository conversion is so\nfundamentally impossible [1] that I am not interested in working on\nit.  If people absolutely need incremental conversions, then let them\nstruggle on.  But let them be warned :-)\n\nCheers,\nMichael\n\n[1] http://selenic.com/pipermail/mercurial-devel/2008-February/004975.html\n"},{"id":"105845","messageId":"ee46eff8fc1cb2d0ad3d8dfac2fbe4d79f225e3a.1235364493.git.mhagger@alum.mit.edu","threadId":"17934","inReplyTo":"1235365694-28935-1-git-send-email-mhagger@alum.mit.edu","subject":"[PATCH v3 1/5] Start a library for cvsimport-related tests","fromName":"Michael Haggerty","fromEmail":"mhagger@alum.mit.edu","sentAt":"2009-02-23T05:08:10Z","receivedAt":"2009-02-23T05:08:10Z","isPatch":true,"sender":{"key":"mhagger@alum.mit.edu","avatar":"https://avatars.githubusercontent.com/u/119718?v=4"},"body":"For now the \"library\" just includes code (moved from\nt/t9600-cvsimport.sh) that checks whether the prerequisites for \"git\ncvsimport\" are installed.\n\nSigned-off-by: Michael Haggerty <mhagger@alum.mit.edu>\n---\n t/lib-cvs.sh         |   31 +++++++++++++++++++++++++++++++\n t/t9600-cvsimport.sh |   29 +----------------------------\n 2 files changed, 32 insertions(+), 28 deletions(-)\n create mode 100644 t/lib-cvs.sh\n\ndiff --git a/t/lib-cvs.sh b/t/lib-cvs.sh\nnew file mode 100644\nindex 0000000..bfc1c12\n--- /dev/null\n+++ b/t/lib-cvs.sh\n@@ -0,0 +1,31 @@\n+#!/bin/sh\n+\n+. ./test-lib.sh\n+\n+unset CVS_SERVER\n+# for clean cvsps cache\n+HOME=$(pwd)\n+export HOME\n+\n+if ! type cvs >/dev/null 2>&1\n+then\n+\tsay 'skipping cvsimport tests, cvs not found'\n+\ttest_done\n+\texit\n+fi\n+\n+cvsps_version=`cvsps -h 2>&1 | sed -ne 's/cvsps version //p'`\n+case \"$cvsps_version\" in\n+2.1 | 2.2*)\n+\t;;\n+'')\n+\tsay 'skipping cvsimport tests, cvsps not found'\n+\ttest_done\n+\texit\n+\t;;\n+*)\n+\tsay 'skipping cvsimport tests, unsupported cvsps version'\n+\ttest_done\n+\texit\n+\t;;\n+esac\ndiff --git a/t/t9600-cvsimport.sh b/t/t9600-cvsimport.sh\nindex d2379e7..98077ab 100755\n--- a/t/t9600-cvsimport.sh\n+++ b/t/t9600-cvsimport.sh\n@@ -1,37 +1,10 @@\n #!/bin/sh\n \n test_description='git cvsimport basic tests'\n-. ./test-lib.sh\n+. ./lib-cvs.sh\n \n CVSROOT=$(pwd)/cvsroot\n export CVSROOT\n-unset CVS_SERVER\n-# for clean cvsps cache\n-HOME=$(pwd)\n-export HOME\n-\n-if ! type cvs >/dev/null 2>&1\n-then\n-\tsay 'skipping cvsimport tests, cvs not found'\n-\ttest_done\n-\texit\n-fi\n-\n-cvsps_version=`cvsps -h 2>&1 | sed -ne 's/cvsps version //p'`\n-case \"$cvsps_version\" in\n-2.1 | 2.2*)\n-\t;;\n-'')\n-\tsay 'skipping cvsimport tests, cvsps not found'\n-\ttest_done\n-\texit\n-\t;;\n-*)\n-\tsay 'skipping cvsimport tests, unsupported cvsps version'\n-\ttest_done\n-\texit\n-\t;;\n-esac\n \n test_expect_success 'setup cvsroot' 'cvs init'\n \n-- \n1.6.1.3\n"},{"id":"105847","messageId":"7d834a5a7542df6bfa8963bb6440cc4b4531ead7.1235364493.git.mhagger@alum.mit.edu","threadId":"17934","inReplyTo":"ee46eff8fc1cb2d0ad3d8dfac2fbe4d79f225e3a.1235364493.git.mhagger@alum.mit.edu","subject":"[PATCH v3 2/5] Use CVS's -f option if available (ignore user's ~/.cvsrc file)","fromName":"Michael Haggerty","fromEmail":"mhagger@alum.mit.edu","sentAt":"2009-02-23T05:08:11Z","receivedAt":"2009-02-23T05:08:11Z","isPatch":true,"sender":{"key":"mhagger@alum.mit.edu","avatar":"https://avatars.githubusercontent.com/u/119718?v=4"},"body":"A user's ~/.cvsrc file can change the basic behavior of CVS commands.\nTherefore we should ignore it in order to ensure consistent results\nfrom the test suite.\n\nSigned-off-by: Michael Haggerty <mhagger@alum.mit.edu>\n---\n t/lib-cvs.sh         |    3 +++\n t/t9600-cvsimport.sh |   16 ++++++++--------\n 2 files changed, 11 insertions(+), 8 deletions(-)\n\ndiff --git a/t/lib-cvs.sh b/t/lib-cvs.sh\nindex bfc1c12..6738901 100644\n--- a/t/lib-cvs.sh\n+++ b/t/lib-cvs.sh\n@@ -14,6 +14,9 @@ then\n \texit\n fi\n \n+CVS=\"cvs -f\"\n+export CVS\n+\n cvsps_version=`cvsps -h 2>&1 | sed -ne 's/cvsps version //p'`\n case \"$cvsps_version\" in\n 2.1 | 2.2*)\ndiff --git a/t/t9600-cvsimport.sh b/t/t9600-cvsimport.sh\nindex 98077ab..3110a8c 100755\n--- a/t/t9600-cvsimport.sh\n+++ b/t/t9600-cvsimport.sh\n@@ -6,12 +6,12 @@ test_description='git cvsimport basic tests'\n CVSROOT=$(pwd)/cvsroot\n export CVSROOT\n \n-test_expect_success 'setup cvsroot' 'cvs init'\n+test_expect_success 'setup cvsroot' '$CVS init'\n \n test_expect_success 'setup a cvs module' '\n \n \tmkdir \"$CVSROOT/module\" &&\n-\tcvs co -d module-cvs module &&\n+\t$CVS co -d module-cvs module &&\n \tcd module-cvs &&\n \tcat <<EOF >o_fortuna &&\n O Fortuna\n@@ -30,13 +30,13 @@ egestatem,\n potestatem\n dissolvit ut glaciem.\n EOF\n-\tcvs add o_fortuna &&\n+\t$CVS add o_fortuna &&\n \tcat <<EOF >message &&\n add \"O Fortuna\" lyrics\n \n These public domain lyrics make an excellent sample text.\n EOF\n-\tcvs commit -F message &&\n+\t$CVS commit -F message &&\n \tcd ..\n '\n \n@@ -74,7 +74,7 @@ translate to English\n \n My Latin is terrible.\n EOF\n-\tcvs commit -F message &&\n+\t$CVS commit -F message &&\n \tcd ..\n '\n \n@@ -92,8 +92,8 @@ test_expect_success 'update cvs module' '\n \n \tcd module-cvs &&\n \t\techo 1 >tick &&\n-\t\tcvs add tick &&\n-\t\tcvs commit -m 1\n+\t\t$CVS add tick &&\n+\t\t$CVS commit -m 1\n \tcd ..\n \n '\n@@ -111,7 +111,7 @@ test_expect_success 'cvsimport.module config works' '\n \n test_expect_success 'import from a CVS working tree' '\n \n-\tcvs co -d import-from-wt module &&\n+\t$CVS co -d import-from-wt module &&\n \tcd import-from-wt &&\n \t\tgit cvsimport -a -z0 &&\n \t\techo 1 >expect &&\n-- \n1.6.1.3\n"},{"id":"105846","messageId":"24f32b195f4dbfa0e1dda8b30097becdb3c2d3b7.1235364493.git.mhagger@alum.mit.edu","threadId":"17934","inReplyTo":"7d834a5a7542df6bfa8963bb6440cc4b4531ead7.1235364493.git.mhagger@alum.mit.edu","subject":"[PATCH v3 3/5] Test contents of entire cvsimported \"master\" tree contents","fromName":"Michael Haggerty","fromEmail":"mhagger@alum.mit.edu","sentAt":"2009-02-23T05:08:12Z","receivedAt":"2009-02-23T05:08:12Z","isPatch":true,"sender":{"key":"mhagger@alum.mit.edu","avatar":"https://avatars.githubusercontent.com/u/119718?v=4"},"body":"Test added for completeness (it passes).\n\nSigned-off-by: Michael Haggerty <mhagger@alum.mit.edu>\n---\n t/lib-cvs.sh         |   44 ++++++++++++++++++++++++++++++++++++++++++++\n t/t9600-cvsimport.sh |    2 ++\n 2 files changed, 46 insertions(+), 0 deletions(-)\n\ndiff --git a/t/lib-cvs.sh b/t/lib-cvs.sh\nindex 6738901..1f73c07 100644\n--- a/t/lib-cvs.sh\n+++ b/t/lib-cvs.sh\n@@ -32,3 +32,47 @@ case \"$cvsps_version\" in\n \texit\n \t;;\n esac\n+\n+test_cvs_co () {\n+\t# Usage: test_cvs_co BRANCH_NAME\n+\trm -rf module-cvs-\"$1\"\n+\tif [ \"$1\" = \"master\" ]\n+\tthen\n+\t\t$CVS co -P -d module-cvs-\"$1\" -A module\n+\telse\n+\t\t$CVS co -P -d module-cvs-\"$1\" -r \"$1\" module\n+\tfi\n+}\n+\n+test_git_co () {\n+\t# Usage: test_git_co BRANCH_NAME\n+\t(cd module-git && git checkout \"$1\")\n+}\n+\n+test_cmp_branch_file () {\n+\t# Usage: test_cmp_branch_file BRANCH_NAME PATH\n+\t# The branch must already be checked out of CVS and git.\n+\ttest_cmp module-cvs-\"$1\"/\"$2\" module-git/\"$2\"\n+}\n+\n+test_cmp_branch_tree () {\n+\t# Usage: test_cmp_branch_tree BRANCH_NAME\n+\t# Check BRANCH_NAME out of CVS and git and make sure that all\n+\t# of the files and directories are identical.\n+\n+\ttest_cvs_co \"$1\" &&\n+\ttest_git_co \"$1\" &&\n+\t(\n+\t\tcd module-cvs-\"$1\"\n+\t\tfind . -type d -name CVS -prune -o -type f -print\n+\t) | sort >module-cvs-\"$1\".list &&\n+\t(\n+\t\tcd module-git\n+\t\tfind . -type d -name .git -prune -o -type f -print\n+\t) | sort >module-git-\"$1\".list &&\n+\ttest_cmp module-cvs-\"$1\".list module-git-\"$1\".list &&\n+\tcat module-cvs-\"$1\".list | while read f\n+\tdo\n+\t\ttest_cmp_branch_file \"$1\" \"$f\" || return 1\n+\tdone\n+}\ndiff --git a/t/t9600-cvsimport.sh b/t/t9600-cvsimport.sh\nindex 3110a8c..e3734b3 100755\n--- a/t/t9600-cvsimport.sh\n+++ b/t/t9600-cvsimport.sh\n@@ -121,4 +121,6 @@ test_expect_success 'import from a CVS working tree' '\n \n '\n \n+test_expect_success 'test entire HEAD' 'test_cmp_branch_tree master'\n+\n test_done\n-- \n1.6.1.3\n"},{"id":"105848","messageId":"0ceb6eefc5d16857dfe4c3433a0e4339381a929f.1235364493.git.mhagger@alum.mit.edu","threadId":"17934","inReplyTo":"24f32b195f4dbfa0e1dda8b30097becdb3c2d3b7.1235364493.git.mhagger@alum.mit.edu","subject":"[PATCH v3 4/5] Add some tests of git-cvsimport's handling of vendor branches","fromName":"Michael Haggerty","fromEmail":"mhagger@alum.mit.edu","sentAt":"2009-02-23T05:08:13Z","receivedAt":"2009-02-23T05:08:13Z","isPatch":true,"sender":{"key":"mhagger@alum.mit.edu","avatar":"https://avatars.githubusercontent.com/u/119718?v=4"},"body":"CVS's handling of vendor branches is tricky; add some tests to check\nwhether revisions added via \"cvs imports\" then imported to git via\n\"git cvsimport\" are reflected correctly on master.\n\nOne of these tests fail and is therefore marked \"test_expect_failure\".\nCvsimport doesn't realize that subsequent changes on a vendor branch\naffect master as long as the vendor branch is the default branch.\n\nThe test CVS repository used for these tests is derived from cvs2svn's\ntest suite.\n\nSigned-off-by: Michael Haggerty <mhagger@alum.mit.edu>\n---\n t/t9601-cvsimport-vendor-branch.sh                 |   86 ++++++++++++++++++++\n t/t9601/cvsroot/.gitattributes                     |    1 +\n t/t9601/cvsroot/CVSROOT/.gitignore                 |    2 +\n t/t9601/cvsroot/module/added-imported.txt,v        |   44 ++++++++++\n t/t9601/cvsroot/module/imported-anonymously.txt,v  |   42 ++++++++++\n .../module/imported-modified-imported.txt,v        |   76 +++++++++++++++++\n t/t9601/cvsroot/module/imported-modified.txt,v     |   59 +++++++++++++\n t/t9601/cvsroot/module/imported-once.txt,v         |   43 ++++++++++\n t/t9601/cvsroot/module/imported-twice.txt,v        |   60 ++++++++++++++\n 9 files changed, 413 insertions(+), 0 deletions(-)\n create mode 100755 t/t9601-cvsimport-vendor-branch.sh\n create mode 100644 t/t9601/cvsroot/.gitattributes\n create mode 100644 t/t9601/cvsroot/CVSROOT/.gitignore\n create mode 100644 t/t9601/cvsroot/module/added-imported.txt,v\n create mode 100644 t/t9601/cvsroot/module/imported-anonymously.txt,v\n create mode 100644 t/t9601/cvsroot/module/imported-modified-imported.txt,v\n create mode 100644 t/t9601/cvsroot/module/imported-modified.txt,v\n create mode 100644 t/t9601/cvsroot/module/imported-once.txt,v\n create mode 100644 t/t9601/cvsroot/module/imported-twice.txt,v\n\ndiff --git a/t/t9601-cvsimport-vendor-branch.sh b/t/t9601-cvsimport-vendor-branch.sh\nnew file mode 100755\nindex 0000000..3afaf56\n--- /dev/null\n+++ b/t/t9601-cvsimport-vendor-branch.sh\n@@ -0,0 +1,86 @@\n+#!/bin/sh\n+\n+# Description of the files in the repository:\n+#\n+#    imported-once.txt:\n+#\n+#       Imported once.  1.1 and 1.1.1.1 should be identical.\n+#\n+#    imported-twice.txt:\n+#\n+#       Imported twice.  HEAD should reflect the contents of the\n+#       second import (i.e., have the same contents as 1.1.1.2).\n+#\n+#    imported-modified.txt:\n+#\n+#       Imported, then modified on HEAD.  HEAD should reflect the\n+#       modification.\n+#\n+#    imported-modified-imported.txt:\n+#\n+#       Imported, then modified on HEAD, then imported again.\n+#\n+#    added-imported.txt,v:\n+#\n+#       Added with 'cvs add' to create 1.1, then imported with\n+#       completely different contents to create 1.1.1.1, therefore the\n+#       vendor branch was never the default branch.\n+#\n+#    imported-anonymously.txt:\n+#\n+#       Like imported-twice.txt, but with a vendor branch whose branch\n+#       tag has been removed.\n+\n+test_description='git cvsimport handling of vendor branches'\n+. ./lib-cvs.sh\n+\n+CVSROOT=\"$TEST_DIRECTORY\"/t9601/cvsroot\n+export CVSROOT\n+\n+test_expect_success 'import a module with a vendor branch' '\n+\n+\tgit cvsimport -C module-git module\n+\n+'\n+\n+test_expect_success 'check HEAD out of cvs repository' 'test_cvs_co master'\n+\n+test_expect_success 'check master out of git repository' 'test_git_co master'\n+\n+test_expect_success 'check a file that was imported once' '\n+\n+\ttest_cmp_branch_file master imported-once.txt\n+\n+'\n+\n+test_expect_failure 'check a file that was imported twice' '\n+\n+\ttest_cmp_branch_file master imported-twice.txt\n+\n+'\n+\n+test_expect_success 'check a file that was imported then modified on HEAD' '\n+\n+\ttest_cmp_branch_file master imported-modified.txt\n+\n+'\n+\n+test_expect_success 'check a file that was imported, modified, then imported again' '\n+\n+\ttest_cmp_branch_file master imported-modified-imported.txt\n+\n+'\n+\n+test_expect_success 'check a file that was added to HEAD then imported' '\n+\n+\ttest_cmp_branch_file master added-imported.txt\n+\n+'\n+\n+test_expect_success 'a vendor branch whose tag has been removed' '\n+\n+\ttest_cmp_branch_file master imported-anonymously.txt\n+\n+'\n+\n+test_done\ndiff --git a/t/t9601/cvsroot/.gitattributes b/t/t9601/cvsroot/.gitattributes\nnew file mode 100644\nindex 0000000..562b12e\n--- /dev/null\n+++ b/t/t9601/cvsroot/.gitattributes\n@@ -0,0 +1 @@\n+* -whitespace\ndiff --git a/t/t9601/cvsroot/CVSROOT/.gitignore b/t/t9601/cvsroot/CVSROOT/.gitignore\nnew file mode 100644\nindex 0000000..3bb9b34\n--- /dev/null\n+++ b/t/t9601/cvsroot/CVSROOT/.gitignore\n@@ -0,0 +1,2 @@\n+history\n+val-tags\ndiff --git a/t/t9601/cvsroot/module/added-imported.txt,v b/t/t9601/cvsroot/module/added-imported.txt,v\nnew file mode 100644\nindex 0000000..5f83072\n--- /dev/null\n+++ b/t/t9601/cvsroot/module/added-imported.txt,v\n@@ -0,0 +1,44 @@\n+head\t1.1;\n+access;\n+symbols\n+\tvtag-4:1.1.1.1\n+\tvbranchA:1.1.1;\n+locks; strict;\n+comment\t@# @;\n+\n+\n+1.1\n+date\t2004.02.09.15.43.15;\tauthor kfogel;\tstate Exp;\n+branches\n+\t1.1.1.1;\n+next\t;\n+\n+1.1.1.1\n+date\t2004.02.09.15.43.16;\tauthor kfogel;\tstate Exp;\n+branches;\n+next\t;\n+\n+\n+desc\n+@@\n+\n+\n+1.1\n+log\n+@Add a file to the working copy.\n+@\n+text\n+@Adding this file, before importing it with different contents.\n+@\n+\n+\n+1.1.1.1\n+log\n+@Import (vbranchA, vtag-4).\n+@\n+text\n+@d1 1\n+a1 1\n+This is vtag-4 (on vbranchA) of added-then-imported.txt.\n+@\n+\ndiff --git a/t/t9601/cvsroot/module/imported-anonymously.txt,v b/t/t9601/cvsroot/module/imported-anonymously.txt,v\nnew file mode 100644\nindex 0000000..55e1b0c\n--- /dev/null\n+++ b/t/t9601/cvsroot/module/imported-anonymously.txt,v\n@@ -0,0 +1,42 @@\n+head\t1.1;\n+branch\t1.1.1;\n+access;\n+symbols\n+\tvtag-1:1.1.1.1;\n+locks; strict;\n+comment\t@# @;\n+\n+\n+1.1\n+date\t2004.02.09.15.43.13;\tauthor kfogel;\tstate Exp;\n+branches\n+\t1.1.1.1;\n+next\t;\n+\n+1.1.1.1\n+date\t2004.02.09.15.43.13;\tauthor kfogel;\tstate Exp;\n+branches;\n+next\t;\n+\n+\n+desc\n+@@\n+\n+\n+1.1\n+log\n+@Initial revision\n+@\n+text\n+@This is vtag-1 (on vbranchA) of imported-anonymously.txt.\n+@\n+\n+\n+1.1.1.1\n+log\n+@Import (vbranchA, vtag-1).\n+@\n+text\n+@@\n+\n+\ndiff --git a/t/t9601/cvsroot/module/imported-modified-imported.txt,v b/t/t9601/cvsroot/module/imported-modified-imported.txt,v\nnew file mode 100644\nindex 0000000..e5830ae\n--- /dev/null\n+++ b/t/t9601/cvsroot/module/imported-modified-imported.txt,v\n@@ -0,0 +1,76 @@\n+head\t1.2;\n+access;\n+symbols\n+\tvtag-2:1.1.1.2\n+\tvtag-1:1.1.1.1\n+\tvbranchA:1.1.1;\n+locks; strict;\n+comment\t@# @;\n+\n+\n+1.2\n+date\t2004.02.09.15.43.14;\tauthor kfogel;\tstate Exp;\n+branches;\n+next\t1.1;\n+\n+1.1\n+date\t2004.02.09.15.43.13;\tauthor kfogel;\tstate Exp;\n+branches\n+\t1.1.1.1;\n+next\t;\n+\n+1.1.1.1\n+date\t2004.02.09.15.43.13;\tauthor kfogel;\tstate Exp;\n+branches;\n+next\t1.1.1.2;\n+\n+1.1.1.2\n+date\t2004.02.09.15.43.13;\tauthor kfogel;\tstate Exp;\n+branches;\n+next\t;\n+\n+\n+desc\n+@@\n+\n+\n+1.2\n+log\n+@First regular commit, to imported-modified-imported.txt, on HEAD.\n+@\n+text\n+@This is a modification of imported-modified-imported.txt on HEAD.\n+It should supersede the version from the vendor branch.\n+@\n+\n+\n+1.1\n+log\n+@Initial revision\n+@\n+text\n+@d1 2\n+a2 1\n+This is vtag-1 (on vbranchA) of imported-modified-imported.txt.\n+@\n+\n+\n+1.1.1.1\n+log\n+@Import (vbranchA, vtag-1).\n+@\n+text\n+@@\n+\n+\n+1.1.1.2\n+log\n+@Import (vbranchA, vtag-2).\n+@\n+text\n+@d1 1\n+a1 1\n+This is vtag-2 (on vbranchA) of imported-modified-imported.txt.\n+@\n+\n+\ndiff --git a/t/t9601/cvsroot/module/imported-modified.txt,v b/t/t9601/cvsroot/module/imported-modified.txt,v\nnew file mode 100644\nindex 0000000..bbcfe44\n--- /dev/null\n+++ b/t/t9601/cvsroot/module/imported-modified.txt,v\n@@ -0,0 +1,59 @@\n+head\t1.2;\n+access;\n+symbols\n+\tvtag-1:1.1.1.1\n+\tvbranchA:1.1.1;\n+locks; strict;\n+comment\t@# @;\n+\n+\n+1.2\n+date\t2004.02.09.15.43.14;\tauthor kfogel;\tstate Exp;\n+branches;\n+next\t1.1;\n+\n+1.1\n+date\t2004.02.09.15.43.13;\tauthor kfogel;\tstate Exp;\n+branches\n+\t1.1.1.1;\n+next\t;\n+\n+1.1.1.1\n+date\t2004.02.09.15.43.13;\tauthor kfogel;\tstate Exp;\n+branches;\n+next\t;\n+\n+\n+desc\n+@@\n+\n+\n+1.2\n+log\n+@Commit on HEAD.\n+@\n+text\n+@This is a modification of imported-modified.txt on HEAD.\n+It should supersede the version from the vendor branch.\n+@\n+\n+\n+1.1\n+log\n+@Initial revision\n+@\n+text\n+@d1 2\n+a2 1\n+This is vtag-1 (on vbranchA) of imported-modified.txt.\n+@\n+\n+\n+1.1.1.1\n+log\n+@Import (vbranchA, vtag-1).\n+@\n+text\n+@@\n+\n+\ndiff --git a/t/t9601/cvsroot/module/imported-once.txt,v b/t/t9601/cvsroot/module/imported-once.txt,v\nnew file mode 100644\nindex 0000000..c5dd82b\n--- /dev/null\n+++ b/t/t9601/cvsroot/module/imported-once.txt,v\n@@ -0,0 +1,43 @@\n+head\t1.1;\n+branch\t1.1.1;\n+access;\n+symbols\n+\tvtag-1:1.1.1.1\n+\tvbranchA:1.1.1;\n+locks; strict;\n+comment\t@# @;\n+\n+\n+1.1\n+date\t2004.02.09.15.43.13;\tauthor kfogel;\tstate Exp;\n+branches\n+\t1.1.1.1;\n+next\t;\n+\n+1.1.1.1\n+date\t2004.02.09.15.43.13;\tauthor kfogel;\tstate Exp;\n+branches;\n+next\t;\n+\n+\n+desc\n+@@\n+\n+\n+1.1\n+log\n+@Initial revision\n+@\n+text\n+@This is vtag-1 (on vbranchA) of imported-once.txt.\n+@\n+\n+\n+1.1.1.1\n+log\n+@Import (vbranchA, vtag-1).\n+@\n+text\n+@@\n+\n+\ndiff --git a/t/t9601/cvsroot/module/imported-twice.txt,v b/t/t9601/cvsroot/module/imported-twice.txt,v\nnew file mode 100644\nindex 0000000..d1f3f1b\n--- /dev/null\n+++ b/t/t9601/cvsroot/module/imported-twice.txt,v\n@@ -0,0 +1,60 @@\n+head\t1.1;\n+branch\t1.1.1;\n+access;\n+symbols\n+\tvtag-2:1.1.1.2\n+\tvtag-1:1.1.1.1\n+\tvbranchA:1.1.1;\n+locks; strict;\n+comment\t@# @;\n+\n+\n+1.1\n+date\t2004.02.09.15.43.13;\tauthor kfogel;\tstate Exp;\n+branches\n+\t1.1.1.1;\n+next\t;\n+\n+1.1.1.1\n+date\t2004.02.09.15.43.13;\tauthor kfogel;\tstate Exp;\n+branches;\n+next\t1.1.1.2;\n+\n+1.1.1.2\n+date\t2004.02.09.15.43.13;\tauthor kfogel;\tstate Exp;\n+branches;\n+next\t;\n+\n+\n+desc\n+@@\n+\n+\n+1.1\n+log\n+@Initial revision\n+@\n+text\n+@This is vtag-1 (on vbranchA) of imported-twice.txt.\n+@\n+\n+\n+1.1.1.1\n+log\n+@Import (vbranchA, vtag-1).\n+@\n+text\n+@@\n+\n+\n+1.1.1.2\n+log\n+@Import (vbranchA, vtag-2).\n+@\n+text\n+@d1 1\n+a1 1\n+This is vtag-2 (on vbranchA) of imported-twice.txt.\n+@\n+\n+\n-- \n1.6.1.3\n"},{"id":"105849","messageId":"9e78f6376c3ca9127728cdf9c4c3a869df73ed51.1235364493.git.mhagger@alum.mit.edu","threadId":"17934","inReplyTo":"0ceb6eefc5d16857dfe4c3433a0e4339381a929f.1235364493.git.mhagger@alum.mit.edu","subject":"[PATCH v3 5/5] Add a test of \"git cvsimport\"'s handling of tags and branches","fromName":"Michael Haggerty","fromEmail":"mhagger@alum.mit.edu","sentAt":"2009-02-23T05:08:14Z","receivedAt":"2009-02-23T05:08:14Z","isPatch":true,"sender":{"key":"mhagger@alum.mit.edu","avatar":"https://avatars.githubusercontent.com/u/119718?v=4"},"body":"6 out of 11 of these tests fail.\n\nThe test CVS repository used for these tests is derived from one in\ncvs2svn's test suite.\n\nSigned-off-by: Michael Haggerty <mhagger@alum.mit.edu>\n---\n t/t9602-cvsimport-branches-tags.sh                 |   79 ++++++++++++++\n t/t9602/README                                     |   62 +++++++++++\n t/t9602/cvsroot/.gitattributes                     |    1 +\n t/t9602/cvsroot/CVSROOT/.gitignore                 |    2 +\n t/t9602/cvsroot/module/default,v                   |  102 +++++++++++++++++++\n t/t9602/cvsroot/module/sub1/default,v              |  102 +++++++++++++++++++\n t/t9602/cvsroot/module/sub1/subsubA/default,v      |  101 ++++++++++++++++++\n t/t9602/cvsroot/module/sub1/subsubB/default,v      |  107 ++++++++++++++++++++\n .../module/sub2/Attic/branch_B_MIXED_only,v        |   59 +++++++++++\n t/t9602/cvsroot/module/sub2/default,v              |  102 +++++++++++++++++++\n t/t9602/cvsroot/module/sub2/subsubA/default,v      |  102 +++++++++++++++++++\n t/t9602/cvsroot/module/sub3/default,v              |  102 +++++++++++++++++++\n 12 files changed, 921 insertions(+), 0 deletions(-)\n create mode 100755 t/t9602-cvsimport-branches-tags.sh\n create mode 100644 t/t9602/README\n create mode 100644 t/t9602/cvsroot/.gitattributes\n create mode 100644 t/t9602/cvsroot/CVSROOT/.gitignore\n create mode 100644 t/t9602/cvsroot/module/default,v\n create mode 100644 t/t9602/cvsroot/module/sub1/default,v\n create mode 100644 t/t9602/cvsroot/module/sub1/subsubA/default,v\n create mode 100644 t/t9602/cvsroot/module/sub1/subsubB/default,v\n create mode 100644 t/t9602/cvsroot/module/sub2/Attic/branch_B_MIXED_only,v\n create mode 100644 t/t9602/cvsroot/module/sub2/default,v\n create mode 100644 t/t9602/cvsroot/module/sub2/subsubA/default,v\n create mode 100644 t/t9602/cvsroot/module/sub3/default,v\n\ndiff --git a/t/t9602-cvsimport-branches-tags.sh b/t/t9602-cvsimport-branches-tags.sh\nnew file mode 100755\nindex 0000000..67878b2\n--- /dev/null\n+++ b/t/t9602-cvsimport-branches-tags.sh\n@@ -0,0 +1,79 @@\n+#!/bin/sh\n+\n+# A description of the repository used for this test can be found in\n+# t9602/README.\n+\n+test_description='git cvsimport handling of branches and tags'\n+. ./lib-cvs.sh\n+\n+CVSROOT=\"$TEST_DIRECTORY\"/t9602/cvsroot\n+export CVSROOT\n+\n+test_expect_success 'import module' '\n+\n+\tgit cvsimport -C module-git module\n+\n+'\n+\n+test_expect_success 'test branch master' '\n+\n+\ttest_cmp_branch_tree master\n+\n+'\n+\n+test_expect_success 'test branch vendorbranch' '\n+\n+\ttest_cmp_branch_tree vendorbranch\n+\n+'\n+\n+test_expect_failure 'test branch B_FROM_INITIALS' '\n+\n+\ttest_cmp_branch_tree B_FROM_INITIALS\n+\n+'\n+\n+test_expect_failure 'test branch B_FROM_INITIALS_BUT_ONE' '\n+\n+\ttest_cmp_branch_tree B_FROM_INITIALS_BUT_ONE\n+\n+'\n+\n+test_expect_failure 'test branch B_MIXED' '\n+\n+\ttest_cmp_branch_tree B_MIXED\n+\n+'\n+\n+test_expect_success 'test branch B_SPLIT' '\n+\n+\ttest_cmp_branch_tree B_SPLIT\n+\n+'\n+\n+test_expect_failure 'test tag vendortag' '\n+\n+\ttest_cmp_branch_tree vendortag\n+\n+'\n+\n+test_expect_success 'test tag T_ALL_INITIAL_FILES' '\n+\n+\ttest_cmp_branch_tree T_ALL_INITIAL_FILES\n+\n+'\n+\n+test_expect_failure 'test tag T_ALL_INITIAL_FILES_BUT_ONE' '\n+\n+\ttest_cmp_branch_tree T_ALL_INITIAL_FILES_BUT_ONE\n+\n+'\n+\n+test_expect_failure 'test tag T_MIXED' '\n+\n+\ttest_cmp_branch_tree T_MIXED\n+\n+'\n+\n+\n+test_done\ndiff --git a/t/t9602/README b/t/t9602/README\nnew file mode 100644\nindex 0000000..c231e0f\n--- /dev/null\n+++ b/t/t9602/README\n@@ -0,0 +1,62 @@\n+This repository is for testing the ability to group revisions\n+correctly along tags and branches.  Here is its history:\n+\n+  1.  The initial import (revision 1.1 of everybody) created a\n+      directory structure with a file named `default' in each dir:\n+\n+            ./\n+              default\n+              sub1/default\n+                   subsubA/default\n+                   subsubB/default\n+              sub2/default\n+                   subsubA/default\n+              sub3/default\n+\n+  2.  Then tagged everyone with T_ALL_INITIAL_FILES.\n+\n+  3.  Then tagged everyone except sub1/subsubB/default with\n+      T_ALL_INITIAL_FILES_BUT_ONE.\n+\n+  4.  Then created branch B_FROM_INITIALS on everyone.\n+\n+  5.  Then created branch B_FROM_INITIALS_BUT_ONE on everyone except\n+      /sub1/subsubB/default.\n+\n+  6.  Then committed modifications to two files: sub3/default, and\n+      sub1/subsubA/default.\n+\n+  7.  Then committed a modification to all 7 files.\n+\n+  8.  Then backdated sub3/default to revision 1.2, and\n+      sub2/subsubA/default to revision 1.1, and tagged with T_MIXED.\n+\n+  9.  Same as 8, but tagged with -b to create branch B_MIXED.\n+\n+  10. Switched the working copy to B_MIXED, and added\n+      sub2/branch_B_MIXED_only.  (That's why the RCS file is in\n+      sub2/Attic/ -- it never existed on trunk.)\n+\n+  11. In one commit, modified default, sub1/default, and\n+      sub2/subsubA/default, on branch B_MIXED.\n+\n+  12. Did \"cvs up -A\" on sub2/default, then in one commit, made a\n+      change to sub2/default and sub2/branch_B_MIXED_only.  So this\n+      commit should be spread between the branch and the trunk.\n+\n+  13. Do \"cvs up -A\" to get everyone back to trunk, then make a new\n+      branch B_SPLIT on everyone except sub1/subsubB/default,v.\n+\n+  14. Switch to branch B_SPLIT (see sub1/subsubB/default disappear)\n+      and commit a change that affects everyone except sub3/default.\n+\n+  15. An hour or so later, \"cvs up -A\" to get sub1/subsubB/default\n+      back, then commit a change on that file, on trunk.  (It's\n+      important that this change happened after the previous commits\n+      on B_SPLIT.)\n+\n+  16. Branch sub1/subsubB/default to B_SPLIT, then \"cvs up -r B_SPLIT\"\n+      to switch the whole working copy to the branch.\n+\n+  17. Commit a change on B_SPLIT, to sub1/subsubB/default and\n+      sub3/default.\ndiff --git a/t/t9602/cvsroot/.gitattributes b/t/t9602/cvsroot/.gitattributes\nnew file mode 100644\nindex 0000000..562b12e\n--- /dev/null\n+++ b/t/t9602/cvsroot/.gitattributes\n@@ -0,0 +1 @@\n+* -whitespace\ndiff --git a/t/t9602/cvsroot/CVSROOT/.gitignore b/t/t9602/cvsroot/CVSROOT/.gitignore\nnew file mode 100644\nindex 0000000..3bb9b34\n--- /dev/null\n+++ b/t/t9602/cvsroot/CVSROOT/.gitignore\n@@ -0,0 +1,2 @@\n+history\n+val-tags\ndiff --git a/t/t9602/cvsroot/module/default,v b/t/t9602/cvsroot/module/default,v\nnew file mode 100644\nindex 0000000..3b68382\n--- /dev/null\n+++ b/t/t9602/cvsroot/module/default,v\n@@ -0,0 +1,102 @@\n+head\t1.2;\n+access;\n+symbols\n+\tB_SPLIT:1.2.0.4\n+\tB_MIXED:1.2.0.2\n+\tT_MIXED:1.2\n+\tB_FROM_INITIALS_BUT_ONE:1.1.1.1.0.4\n+\tB_FROM_INITIALS:1.1.1.1.0.2\n+\tT_ALL_INITIAL_FILES_BUT_ONE:1.1.1.1\n+\tT_ALL_INITIAL_FILES:1.1.1.1\n+\tvendortag:1.1.1.1\n+\tvendorbranch:1.1.1;\n+locks; strict;\n+comment\t@# @;\n+\n+\n+1.2\n+date\t2003.05.23.00.17.53;\tauthor jrandom;\tstate Exp;\n+branches\n+\t1.2.2.1\n+\t1.2.4.1;\n+next\t1.1;\n+\n+1.1\n+date\t2003.05.22.23.20.19;\tauthor jrandom;\tstate Exp;\n+branches\n+\t1.1.1.1;\n+next\t;\n+\n+1.1.1.1\n+date\t2003.05.22.23.20.19;\tauthor jrandom;\tstate Exp;\n+branches;\n+next\t;\n+\n+1.2.2.1\n+date\t2003.05.23.00.31.36;\tauthor jrandom;\tstate Exp;\n+branches;\n+next\t;\n+\n+1.2.4.1\n+date\t2003.06.03.03.20.31;\tauthor jrandom;\tstate Exp;\n+branches;\n+next\t;\n+\n+\n+desc\n+@@\n+\n+\n+1.2\n+log\n+@Second commit to proj, affecting all 7 files.\n+@\n+text\n+@This is the file `default' in the top level of the project.\n+\n+Every directory in the `proj' project has a file named `default'.\n+\n+This line was added in the second commit (affecting all 7 files).\n+@\n+\n+\n+1.2.4.1\n+log\n+@First change on branch B_SPLIT.\n+\n+This change excludes sub3/default, because it was not part of this\n+commit, and sub1/subsubB/default, which is not even on the branch yet.\n+@\n+text\n+@a5 2\n+\n+First change on branch B_SPLIT.\n+@\n+\n+\n+1.2.2.1\n+log\n+@Modify three files, on branch B_MIXED.\n+@\n+text\n+@a5 2\n+\n+This line was added on branch B_MIXED only (affecting 3 files).\n+@\n+\n+\n+1.1\n+log\n+@Initial revision\n+@\n+text\n+@d4 2\n+@\n+\n+\n+1.1.1.1\n+log\n+@Initial import.\n+@\n+text\n+@@\ndiff --git a/t/t9602/cvsroot/module/sub1/default,v b/t/t9602/cvsroot/module/sub1/default,v\nnew file mode 100644\nindex 0000000..b7fdccd\n--- /dev/null\n+++ b/t/t9602/cvsroot/module/sub1/default,v\n@@ -0,0 +1,102 @@\n+head\t1.2;\n+access;\n+symbols\n+\tB_SPLIT:1.2.0.4\n+\tB_MIXED:1.2.0.2\n+\tT_MIXED:1.2\n+\tB_FROM_INITIALS_BUT_ONE:1.1.1.1.0.4\n+\tB_FROM_INITIALS:1.1.1.1.0.2\n+\tT_ALL_INITIAL_FILES_BUT_ONE:1.1.1.1\n+\tT_ALL_INITIAL_FILES:1.1.1.1\n+\tvendortag:1.1.1.1\n+\tvendorbranch:1.1.1;\n+locks; strict;\n+comment\t@# @;\n+\n+\n+1.2\n+date\t2003.05.23.00.17.53;\tauthor jrandom;\tstate Exp;\n+branches\n+\t1.2.2.1\n+\t1.2.4.1;\n+next\t1.1;\n+\n+1.1\n+date\t2003.05.22.23.20.19;\tauthor jrandom;\tstate Exp;\n+branches\n+\t1.1.1.1;\n+next\t;\n+\n+1.1.1.1\n+date\t2003.05.22.23.20.19;\tauthor jrandom;\tstate Exp;\n+branches;\n+next\t;\n+\n+1.2.2.1\n+date\t2003.05.23.00.31.36;\tauthor jrandom;\tstate Exp;\n+branches;\n+next\t;\n+\n+1.2.4.1\n+date\t2003.06.03.03.20.31;\tauthor jrandom;\tstate Exp;\n+branches;\n+next\t;\n+\n+\n+desc\n+@@\n+\n+\n+1.2\n+log\n+@Second commit to proj, affecting all 7 files.\n+@\n+text\n+@This is sub1/default.\n+\n+Every directory in the `proj' project has a file named `default'.\n+\n+This line was added in the second commit (affecting all 7 files).\n+@\n+\n+\n+1.2.4.1\n+log\n+@First change on branch B_SPLIT.\n+\n+This change excludes sub3/default, because it was not part of this\n+commit, and sub1/subsubB/default, which is not even on the branch yet.\n+@\n+text\n+@a5 2\n+\n+First change on branch B_SPLIT.\n+@\n+\n+\n+1.2.2.1\n+log\n+@Modify three files, on branch B_MIXED.\n+@\n+text\n+@a5 2\n+\n+This line was added on branch B_MIXED only (affecting 3 files).\n+@\n+\n+\n+1.1\n+log\n+@Initial revision\n+@\n+text\n+@d4 2\n+@\n+\n+\n+1.1.1.1\n+log\n+@Initial import.\n+@\n+text\n+@@\ndiff --git a/t/t9602/cvsroot/module/sub1/subsubA/default,v b/t/t9602/cvsroot/module/sub1/subsubA/default,v\nnew file mode 100644\nindex 0000000..472b7b2\n--- /dev/null\n+++ b/t/t9602/cvsroot/module/sub1/subsubA/default,v\n@@ -0,0 +1,101 @@\n+head\t1.3;\n+access;\n+symbols\n+\tB_SPLIT:1.3.0.4\n+\tB_MIXED:1.3.0.2\n+\tT_MIXED:1.3\n+\tB_FROM_INITIALS_BUT_ONE:1.1.1.1.0.4\n+\tB_FROM_INITIALS:1.1.1.1.0.2\n+\tT_ALL_INITIAL_FILES_BUT_ONE:1.1.1.1\n+\tT_ALL_INITIAL_FILES:1.1.1.1\n+\tvendortag:1.1.1.1\n+\tvendorbranch:1.1.1;\n+locks; strict;\n+comment\t@# @;\n+\n+\n+1.3\n+date\t2003.05.23.00.17.53;\tauthor jrandom;\tstate Exp;\n+branches\n+\t1.3.4.1;\n+next\t1.2;\n+\n+1.2\n+date\t2003.05.23.00.15.26;\tauthor jrandom;\tstate Exp;\n+branches;\n+next\t1.1;\n+\n+1.1\n+date\t2003.05.22.23.20.19;\tauthor jrandom;\tstate Exp;\n+branches\n+\t1.1.1.1;\n+next\t;\n+\n+1.1.1.1\n+date\t2003.05.22.23.20.19;\tauthor jrandom;\tstate Exp;\n+branches;\n+next\t;\n+\n+1.3.4.1\n+date\t2003.06.03.03.20.31;\tauthor jrandom;\tstate Exp;\n+branches;\n+next\t;\n+\n+\n+desc\n+@@\n+\n+\n+1.3\n+log\n+@Second commit to proj, affecting all 7 files.\n+@\n+text\n+@This is sub1/subsubA/default.\n+\n+Every directory in the `proj' project has a file named `default'.\n+\n+This line was added by the first commit (affecting two files).\n+\n+This line was added in the second commit (affecting all 7 files).\n+@\n+\n+\n+1.3.4.1\n+log\n+@First change on branch B_SPLIT.\n+\n+This change excludes sub3/default, because it was not part of this\n+commit, and sub1/subsubB/default, which is not even on the branch yet.\n+@\n+text\n+@a7 2\n+\n+First change on branch B_SPLIT.\n+@\n+\n+\n+1.2\n+log\n+@First commit to proj, affecting two files.\n+@\n+text\n+@d6 2\n+@\n+\n+\n+1.1\n+log\n+@Initial revision\n+@\n+text\n+@d4 2\n+@\n+\n+\n+1.1.1.1\n+log\n+@Initial import.\n+@\n+text\n+@@\ndiff --git a/t/t9602/cvsroot/module/sub1/subsubB/default,v b/t/t9602/cvsroot/module/sub1/subsubB/default,v\nnew file mode 100644\nindex 0000000..fe6efa4\n--- /dev/null\n+++ b/t/t9602/cvsroot/module/sub1/subsubB/default,v\n@@ -0,0 +1,107 @@\n+head\t1.3;\n+access;\n+symbols\n+\tB_SPLIT:1.3.0.2\n+\tB_MIXED:1.2.0.2\n+\tT_MIXED:1.2\n+\tB_FROM_INITIALS:1.1.1.1.0.2\n+\tT_ALL_INITIAL_FILES:1.1.1.1\n+\tvendortag:1.1.1.1\n+\tvendorbranch:1.1.1;\n+locks; strict;\n+comment\t@# @;\n+\n+\n+1.3\n+date\t2003.06.03.04.29.14;\tauthor jrandom;\tstate Exp;\n+branches\n+\t1.3.2.1;\n+next\t1.2;\n+\n+1.2\n+date\t2003.05.23.00.17.53;\tauthor jrandom;\tstate Exp;\n+branches;\n+next\t1.1;\n+\n+1.1\n+date\t2003.05.22.23.20.19;\tauthor jrandom;\tstate Exp;\n+branches\n+\t1.1.1.1;\n+next\t;\n+\n+1.1.1.1\n+date\t2003.05.22.23.20.19;\tauthor jrandom;\tstate Exp;\n+branches;\n+next\t;\n+\n+1.3.2.1\n+date\t2003.06.03.04.33.13;\tauthor jrandom;\tstate Exp;\n+branches;\n+next\t;\n+\n+\n+desc\n+@@\n+\n+\n+1.3\n+log\n+@A trunk change to sub1/subsubB/default.  This was committed about an\n+hour after an earlier change that affected most files on branch\n+B_SPLIT.  This file is not on that branch yet, but after this commit,\n+we'll branch to B_SPLIT, albeit rooted in a revision that didn't exist\n+at the time the rest of B_SPLIT was created.\n+@\n+text\n+@This is sub1/subsubB/default.\n+\n+Every directory in the `proj' project has a file named `default'.\n+\n+This line was added in the second commit (affecting all 7 files).\n+\n+This bit was committed on trunk about an hour after an earlier change\n+to everyone else on branch B_SPLIT.  Afterwards, we'll finally branch\n+this file to B_SPLIT, but rooted in a revision that didn't exist at\n+the time the rest of B_SPLIT was created.\n+@\n+\n+\n+1.3.2.1\n+log\n+@This change affects sub3/default and sub1/subsubB/default, on branch\n+B_SPLIT.  Note that the latter file did not even exist on this branch\n+until after some other files had had revisions committed on B_SPLIT.\n+@\n+text\n+@a10 4\n+\n+This change affects sub3/default and sub1/subsubB/default, on branch\n+B_SPLIT.  Note that the latter file did not even exist on this branch\n+until after some other files had had revisions committed on B_SPLIT.\n+@\n+\n+\n+1.2\n+log\n+@Second commit to proj, affecting all 7 files.\n+@\n+text\n+@d6 5\n+@\n+\n+\n+1.1\n+log\n+@Initial revision\n+@\n+text\n+@d4 2\n+@\n+\n+\n+1.1.1.1\n+log\n+@Initial import.\n+@\n+text\n+@@\ndiff --git a/t/t9602/cvsroot/module/sub2/Attic/branch_B_MIXED_only,v b/t/t9602/cvsroot/module/sub2/Attic/branch_B_MIXED_only,v\nnew file mode 100644\nindex 0000000..34c9789\n--- /dev/null\n+++ b/t/t9602/cvsroot/module/sub2/Attic/branch_B_MIXED_only,v\n@@ -0,0 +1,59 @@\n+head\t1.1;\n+access;\n+symbols\n+\tB_MIXED:1.1.0.2;\n+locks; strict;\n+comment\t@# @;\n+\n+\n+1.1\n+date\t2003.05.23.00.25.26;\tauthor jrandom;\tstate dead;\n+branches\n+\t1.1.2.1;\n+next\t;\n+\n+1.1.2.1\n+date\t2003.05.23.00.25.26;\tauthor jrandom;\tstate Exp;\n+branches;\n+next\t1.1.2.2;\n+\n+1.1.2.2\n+date\t2003.05.23.00.48.51;\tauthor jrandom;\tstate Exp;\n+branches;\n+next\t;\n+\n+\n+desc\n+@@\n+\n+\n+1.1\n+log\n+@file branch_B_MIXED_only was initially added on branch B_MIXED.\n+@\n+text\n+@@\n+\n+\n+1.1.2.1\n+log\n+@Add a file on branch B_MIXED.\n+@\n+text\n+@a0 1\n+This file was added on branch B_MIXED.  It never existed on trunk.\n+@\n+\n+\n+1.1.2.2\n+log\n+@A single commit affecting one file on branch B_MIXED and one on trunk.\n+@\n+text\n+@a1 3\n+\n+The same commit added these two lines here on branch B_MIXED, and two\n+similar lines to ./default on trunk.\n+@\n+\n+\ndiff --git a/t/t9602/cvsroot/module/sub2/default,v b/t/t9602/cvsroot/module/sub2/default,v\nnew file mode 100644\nindex 0000000..018f7f8\n--- /dev/null\n+++ b/t/t9602/cvsroot/module/sub2/default,v\n@@ -0,0 +1,102 @@\n+head\t1.3;\n+access;\n+symbols\n+\tB_SPLIT:1.3.0.2\n+\tB_MIXED:1.2.0.2\n+\tT_MIXED:1.2\n+\tB_FROM_INITIALS_BUT_ONE:1.1.1.1.0.4\n+\tB_FROM_INITIALS:1.1.1.1.0.2\n+\tT_ALL_INITIAL_FILES_BUT_ONE:1.1.1.1\n+\tT_ALL_INITIAL_FILES:1.1.1.1\n+\tvendortag:1.1.1.1\n+\tvendorbranch:1.1.1;\n+locks; strict;\n+comment\t@# @;\n+\n+\n+1.3\n+date\t2003.05.23.00.48.51;\tauthor jrandom;\tstate Exp;\n+branches\n+\t1.3.2.1;\n+next\t1.2;\n+\n+1.2\n+date\t2003.05.23.00.17.53;\tauthor jrandom;\tstate Exp;\n+branches;\n+next\t1.1;\n+\n+1.1\n+date\t2003.05.22.23.20.19;\tauthor jrandom;\tstate Exp;\n+branches\n+\t1.1.1.1;\n+next\t;\n+\n+1.1.1.1\n+date\t2003.05.22.23.20.19;\tauthor jrandom;\tstate Exp;\n+branches;\n+next\t;\n+\n+1.3.2.1\n+date\t2003.06.03.03.20.31;\tauthor jrandom;\tstate Exp;\n+branches;\n+next\t;\n+\n+\n+desc\n+@@\n+\n+\n+1.3\n+log\n+@A single commit affecting one file on branch B_MIXED and one on trunk.\n+@\n+text\n+@This is sub2/default.\n+\n+Every directory in the `proj' project has a file named `default'.\n+\n+This line was added in the second commit (affecting all 7 files).\n+\n+The same commit added these two lines here on trunk, and two similar\n+lines to ./branch_B_MIXED_only on branch B_MIXED.\n+@\n+\n+\n+1.3.2.1\n+log\n+@First change on branch B_SPLIT.\n+\n+This change excludes sub3/default, because it was not part of this\n+commit, and sub1/subsubB/default, which is not even on the branch yet.\n+@\n+text\n+@a8 2\n+\n+First change on branch B_SPLIT.\n+@\n+\n+\n+1.2\n+log\n+@Second commit to proj, affecting all 7 files.\n+@\n+text\n+@d6 3\n+@\n+\n+\n+1.1\n+log\n+@Initial revision\n+@\n+text\n+@d4 2\n+@\n+\n+\n+1.1.1.1\n+log\n+@Initial import.\n+@\n+text\n+@@\ndiff --git a/t/t9602/cvsroot/module/sub2/subsubA/default,v b/t/t9602/cvsroot/module/sub2/subsubA/default,v\nnew file mode 100644\nindex 0000000..d13242c\n--- /dev/null\n+++ b/t/t9602/cvsroot/module/sub2/subsubA/default,v\n@@ -0,0 +1,102 @@\n+head\t1.2;\n+access;\n+symbols\n+\tB_SPLIT:1.2.0.2\n+\tB_MIXED:1.1.0.2\n+\tT_MIXED:1.1\n+\tB_FROM_INITIALS_BUT_ONE:1.1.1.1.0.4\n+\tB_FROM_INITIALS:1.1.1.1.0.2\n+\tT_ALL_INITIAL_FILES_BUT_ONE:1.1.1.1\n+\tT_ALL_INITIAL_FILES:1.1.1.1\n+\tvendortag:1.1.1.1\n+\tvendorbranch:1.1.1;\n+locks; strict;\n+comment\t@# @;\n+\n+\n+1.2\n+date\t2003.05.23.00.17.53;\tauthor jrandom;\tstate Exp;\n+branches\n+\t1.2.2.1;\n+next\t1.1;\n+\n+1.1\n+date\t2003.05.22.23.20.19;\tauthor jrandom;\tstate Exp;\n+branches\n+\t1.1.1.1\n+\t1.1.2.1;\n+next\t;\n+\n+1.1.1.1\n+date\t2003.05.22.23.20.19;\tauthor jrandom;\tstate Exp;\n+branches;\n+next\t;\n+\n+1.1.2.1\n+date\t2003.05.23.00.31.36;\tauthor jrandom;\tstate Exp;\n+branches;\n+next\t;\n+\n+1.2.2.1\n+date\t2003.06.03.03.20.31;\tauthor jrandom;\tstate Exp;\n+branches;\n+next\t;\n+\n+\n+desc\n+@@\n+\n+\n+1.2\n+log\n+@Second commit to proj, affecting all 7 files.\n+@\n+text\n+@This is sub2/subsub2/default.\n+\n+Every directory in the `proj' project has a file named `default'.\n+\n+This line was added in the second commit (affecting all 7 files).\n+@\n+\n+\n+1.2.2.1\n+log\n+@First change on branch B_SPLIT.\n+\n+This change excludes sub3/default, because it was not part of this\n+commit, and sub1/subsubB/default, which is not even on the branch yet.\n+@\n+text\n+@a5 2\n+\n+First change on branch B_SPLIT.\n+@\n+\n+\n+1.1\n+log\n+@Initial revision\n+@\n+text\n+@d4 2\n+@\n+\n+\n+1.1.2.1\n+log\n+@Modify three files, on branch B_MIXED.\n+@\n+text\n+@a3 2\n+\n+This line was added on branch B_MIXED only (affecting 3 files).\n+@\n+\n+\n+1.1.1.1\n+log\n+@Initial import.\n+@\n+text\n+@@\ndiff --git a/t/t9602/cvsroot/module/sub3/default,v b/t/t9602/cvsroot/module/sub3/default,v\nnew file mode 100644\nindex 0000000..88e4567\n--- /dev/null\n+++ b/t/t9602/cvsroot/module/sub3/default,v\n@@ -0,0 +1,102 @@\n+head\t1.3;\n+access;\n+symbols\n+\tB_SPLIT:1.3.0.2\n+\tB_MIXED:1.2.0.2\n+\tT_MIXED:1.2\n+\tB_FROM_INITIALS_BUT_ONE:1.1.1.1.0.4\n+\tB_FROM_INITIALS:1.1.1.1.0.2\n+\tT_ALL_INITIAL_FILES_BUT_ONE:1.1.1.1\n+\tT_ALL_INITIAL_FILES:1.1.1.1\n+\tvendortag:1.1.1.1\n+\tvendorbranch:1.1.1;\n+locks; strict;\n+comment\t@# @;\n+\n+\n+1.3\n+date\t2003.05.23.00.17.53;\tauthor jrandom;\tstate Exp;\n+branches\n+\t1.3.2.1;\n+next\t1.2;\n+\n+1.2\n+date\t2003.05.23.00.15.26;\tauthor jrandom;\tstate Exp;\n+branches;\n+next\t1.1;\n+\n+1.1\n+date\t2003.05.22.23.20.19;\tauthor jrandom;\tstate Exp;\n+branches\n+\t1.1.1.1;\n+next\t;\n+\n+1.1.1.1\n+date\t2003.05.22.23.20.19;\tauthor jrandom;\tstate Exp;\n+branches;\n+next\t;\n+\n+1.3.2.1\n+date\t2003.06.03.04.33.13;\tauthor jrandom;\tstate Exp;\n+branches;\n+next\t;\n+\n+\n+desc\n+@@\n+\n+\n+1.3\n+log\n+@Second commit to proj, affecting all 7 files.\n+@\n+text\n+@This is sub3/default.\n+\n+Every directory in the `proj' project has a file named `default'.\n+\n+This line was added by the first commit (affecting two files).\n+\n+This line was added in the second commit (affecting all 7 files).\n+@\n+\n+\n+1.3.2.1\n+log\n+@This change affects sub3/default and sub1/subsubB/default, on branch\n+B_SPLIT.  Note that the latter file did not even exist on this branch\n+until after some other files had had revisions committed on B_SPLIT.\n+@\n+text\n+@a7 4\n+\n+This change affects sub3/default and sub1/subsubB/default, on branch\n+B_SPLIT.  Note that the latter file did not even exist on this branch\n+until after some other files had had revisions committed on B_SPLIT.\n+@\n+\n+\n+1.2\n+log\n+@First commit to proj, affecting two files.\n+@\n+text\n+@d6 2\n+@\n+\n+\n+1.1\n+log\n+@Initial revision\n+@\n+text\n+@d4 2\n+@\n+\n+\n+1.1.1.1\n+log\n+@Initial import.\n+@\n+text\n+@@\n-- \n1.6.1.3\n"}]}