{"thread":{"id":"32601","subject":"[PATCH v2] t9605: test for cvsps commit ordering bug","startedAt":"2013-01-12T04:39:16Z","lastAt":"2013-12-15T00:35:18Z","messageCount":2,"participants":["Chris Rorvick","Eric S. Raymond"],"isPatch":true,"patchVersion":2,"patchTotal":null},"messages":[{"id":"206573","messageId":"1357965556-25761-1-git-send-email-chris@rorvick.com","threadId":"32601","inReplyTo":null,"subject":"[PATCH v2] t9605: test for cvsps commit ordering bug","fromName":"Chris Rorvick","fromEmail":"chris@rorvick.com","sentAt":"2013-01-12T04:39:16Z","receivedAt":"2013-01-12T04:39:16Z","isPatch":true,"sender":{"key":"chris@rorvick.com","avatar":"https://avatars.githubusercontent.com/u/824726?v=4"},"body":"Import of a trivial CVS repository fails due to a cvsps bug.  Given the\nfollowing series of commits:\n\n    timestamp             a    b    c   message\n    -------------------  ---  ---  ---  -------\n    2012/12/12 21:09:39  1.1            changes are done\n    2012/12/12 21:09:44            1.1  changes\n    2012/12/12 21:09:46            1.2  changes\n    2012/12/12 21:09:50       1.1  1.3  changes are done\n\ncvsps mangles the commit ordering (edited for brevity):\n\n    ---------------------\n    PatchSet 1\n    Date: 2012/12/12 15:09:39\n    Log:\n    changes are done\n\n    Members:\n    \ta:INITIAL->1.1\n    \tb:INITIAL->1.1\n    \tc:1.2->1.3\n\n    ---------------------\n    PatchSet 2\n    Date: 2012/12/12 15:09:44\n    Log:\n    changes\n\n    Members:\n    \tc:INITIAL->1.1\n\n    ---------------------\n    PatchSet 3\n    Date: 2012/12/12 15:09:46\n    Log:\n    changes\n\n    Members:\n    \tc:1.1->1.2\n\nThis is seen in cvsps versions 2.x and up through at least 3.7.\n\nSigned-off-by: Chris Rorvick <chris@rorvick.com>\n---\n\nIt actually does fail without the \"&& false\" at the end.  :-P  Sorry for\nthe noise.\n\n t/t9605-cvsimport-commit-order.sh  | 24 +++++++++++++++\n t/t9605/cvsroot/.gitattributes     |  1 +\n t/t9605/cvsroot/CVSROOT/.gitignore |  2 ++\n t/t9605/cvsroot/module/a,v         | 24 +++++++++++++++\n t/t9605/cvsroot/module/b,v         | 24 +++++++++++++++\n t/t9605/cvsroot/module/c,v         | 62 ++++++++++++++++++++++++++++++++++++++\n 6 files changed, 137 insertions(+)\n create mode 100755 t/t9605-cvsimport-commit-order.sh\n create mode 100644 t/t9605/cvsroot/.gitattributes\n create mode 100644 t/t9605/cvsroot/CVSROOT/.gitignore\n create mode 100644 t/t9605/cvsroot/module/a,v\n create mode 100644 t/t9605/cvsroot/module/b,v\n create mode 100644 t/t9605/cvsroot/module/c,v\n\ndiff --git a/t/t9605-cvsimport-commit-order.sh b/t/t9605-cvsimport-commit-order.sh\nnew file mode 100755\nindex 0000000..86aafd1\n--- /dev/null\n+++ b/t/t9605-cvsimport-commit-order.sh\n@@ -0,0 +1,24 @@\n+#!/bin/sh\n+\n+test_description='git cvsimport commit order'\n+. ./lib-cvs.sh\n+\n+setup_cvs_test_repository t9605\n+\n+test_expect_success 'checkout with CVS' '\n+\n+\techo CVSROOT=$CVSROOT &&\n+\tcvs checkout -d module-cvs module\n+'\n+\n+test_expect_failure 'import into git (commit order mangled)' '\n+\n+\tgit cvsimport -R -a -p\"-x\" -C module-git module &&\n+\t(\n+\t\tcd module-git &&\n+\t\tgit merge origin\n+\t) &&\n+\ttest_cmp module-cvs/c module-git/c\n+'\n+\n+test_done\ndiff --git a/t/t9605/cvsroot/.gitattributes b/t/t9605/cvsroot/.gitattributes\nnew file mode 100644\nindex 0000000..562b12e\n--- /dev/null\n+++ b/t/t9605/cvsroot/.gitattributes\n@@ -0,0 +1 @@\n+* -whitespace\ndiff --git a/t/t9605/cvsroot/CVSROOT/.gitignore b/t/t9605/cvsroot/CVSROOT/.gitignore\nnew file mode 100644\nindex 0000000..3bb9b34\n--- /dev/null\n+++ b/t/t9605/cvsroot/CVSROOT/.gitignore\n@@ -0,0 +1,2 @@\n+history\n+val-tags\ndiff --git a/t/t9605/cvsroot/module/a,v b/t/t9605/cvsroot/module/a,v\nnew file mode 100644\nindex 0000000..6455911\n--- /dev/null\n+++ b/t/t9605/cvsroot/module/a,v\n@@ -0,0 +1,24 @@\n+head\t1.1;\n+access;\n+symbols;\n+locks; strict;\n+comment\t@# @;\n+\n+\n+1.1\n+date\t2012.12.12.21.09.39;\tauthor tester;\tstate Exp;\n+branches;\n+next\t;\n+\n+\n+desc\n+@@\n+\n+\n+1.1\n+log\n+@changes are done\n+@\n+text\n+@file a\n+@\ndiff --git a/t/t9605/cvsroot/module/b,v b/t/t9605/cvsroot/module/b,v\nnew file mode 100644\nindex 0000000..55545c8\n--- /dev/null\n+++ b/t/t9605/cvsroot/module/b,v\n@@ -0,0 +1,24 @@\n+head\t1.1;\n+access;\n+symbols;\n+locks; strict;\n+comment\t@# @;\n+\n+\n+1.1\n+date\t2012.12.12.21.09.50;\tauthor tester;\tstate Exp;\n+branches;\n+next\t;\n+\n+\n+desc\n+@@\n+\n+\n+1.1\n+log\n+@changes are done\n+@\n+text\n+@file b\n+@\ndiff --git a/t/t9605/cvsroot/module/c,v b/t/t9605/cvsroot/module/c,v\nnew file mode 100644\nindex 0000000..d3eac77\n--- /dev/null\n+++ b/t/t9605/cvsroot/module/c,v\n@@ -0,0 +1,62 @@\n+head\t1.3;\n+access;\n+symbols;\n+locks; strict;\n+comment\t@# @;\n+\n+\n+1.3\n+date\t2012.12.12.21.09.50;\tauthor tester;\tstate Exp;\n+branches;\n+next\t1.2;\n+\n+1.2\n+date\t2012.12.12.21.09.46;\tauthor tester;\tstate Exp;\n+branches;\n+next\t1.1;\n+\n+1.1\n+date\t2012.12.12.21.09.44;\tauthor tester;\tstate Exp;\n+branches;\n+next\t;\n+\n+\n+desc\n+@@\n+\n+\n+1.3\n+log\n+@changes are done\n+@\n+text\n+@file c\n+line two\n+line three\n+line four\n+line five\n+@\n+\n+\n+1.2\n+log\n+@changes\n+@\n+text\n+@d2 4\n+a5 4\n+line 2\n+line 3\n+line 4\n+line 5\n+@\n+\n+\n+1.1\n+log\n+@changes\n+@\n+text\n+@d2 4\n+@\n+\n-- \n1.8.1.rc3.335.g88a67d6\n"},{"id":"232037","messageId":"20131215003518.GA18327@thyrsus.com","threadId":"32601","inReplyTo":"1357965556-25761-1-git-send-email-chris@rorvick.com","subject":"Re: [PATCH v2] t9605: test for cvsps commit ordering bug","fromName":"Eric S. Raymond","fromEmail":"esr@thyrsus.com","sentAt":"2013-12-15T00:35:18Z","receivedAt":"2013-12-15T00:35:18Z","isPatch":true,"sender":{"key":"esr@thyrsus.com","avatar":"https://avatars.githubusercontent.com/u/727961?v=4"},"body":"Replying to very old but newly relevant mail:\n\nChris Rorvick <chris@rorvick.com>:\n> Import of a trivial CVS repository fails due to a cvsps bug.\n\nThe t9605 test you sent me is now part of cvs-fast-export's \nregression-test suite, along with suitably adapted versions of\nt960[1-4] from the git tree.  Here is a summary of the results:\n\nt9601:\n|========================================================================\n|                                            | cvsps    | cvs-fast-export\n|import a module with a vendor branch        | Succeeds | Succeeds \n|check master out of git repository          | Succeeds | Succeeds \n|check a file imported once                  | Fails    | Succeeds \n|check a file imported twice                 | Succeeds | Succeeds \n|check a file imported then modified on HEAD | Succeeds | Succeeds \n|...imported, modified, then imported again  | Succeeds | Succeeds \n|check a file added to HEAD then imported    | Succeeds | Fails\n| a vendor branch whose tag has been removed | Succeeds | Succeeds\n|========================================================================\n\nt9602:\n|========================================================================\n|                                            | cvsps    | cvs-fast-export\n|import module                               | Succeeds | Succeeds \n|test branch master                          | Succeeds | Succeeds \n|test branch vendorbranch                    | Succeeds | Fails\n|test_branch B_FROM_INITIALS                 | Fails    | Succeeds\n|test_branch B_FROM_INITIALS_BUT_ONE         | Fails    | Fails\n|test_branch B_MIXED                         | Fails    | Succeeds\n|test_branch B_SPLI                          | Succeeds | Succeeds\n|test branch vendortag                       | Fails    | Succeeds\n|test tag T_ALL_INITIAL_FILES                | Succeeds | Succeeds\n|test tag T_ALL_INITIAL_FILES_BUT_ONE        | Fails    | Fails\n|test_tag T_MIXED                            | Fails    | Succeeds\n|========================================================================\n\nt9603:\n\tcvsps fails this test; cvs-fast-export succeeds.\n\nt9604:\n\tcvsps and cvs-fast-export both succeed at this test.\n\nt9605:\n\tcvsps fails this test; cvs-fast-export succeeds.\n-- \n\t\t<a href=\"http://www.catb.org/~esr/\">Eric S. Raymond</a>\n"}]}