{"thread":{"id":"24961","subject":"[PATCH] Add unit test for check_cherry_pick","startedAt":"2010-09-03T18:52:15Z","lastAt":"2010-09-03T20:48:51Z","messageCount":4,"participants":["Steven Walter","Ævar Arnfjörð Bjarmason","Eric Wong"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"149776","messageId":"1283539935-14672-1-git-send-email-stevenrwalter@gmail.com","threadId":"24961","inReplyTo":"AANLkTikuY28wwccxekDXD1WGtaOoF3JG7ZBfm6vjapwt@mail.gmail.com","subject":"[PATCH] Add unit test for check_cherry_pick","fromName":"Steven Walter","fromEmail":"stevenrwalter@gmail.com","sentAt":"2010-09-03T18:52:15Z","receivedAt":"2010-09-03T18:52:15Z","isPatch":true,"sender":{"key":"stevenrwalter@gmail.com","avatar":"https://avatars.githubusercontent.com/u/79127?v=4"},"body":"\nSigned-off-by: Steven Walter <stevenrwalter@gmail.com>\n---\n t/t9155-git-svn-fetch-merge.sh |   65 ++++++++++++++++++++++++++++++++++++++++\n 1 files changed, 65 insertions(+), 0 deletions(-)\n create mode 100644 t/t9155-git-svn-fetch-merge.sh\n\ndiff --git a/t/t9155-git-svn-fetch-merge.sh b/t/t9155-git-svn-fetch-merge.sh\nnew file mode 100644\nindex 0000000..1c87986\n--- /dev/null\n+++ b/t/t9155-git-svn-fetch-merge.sh\n@@ -0,0 +1,65 @@\n+#!/bin/sh\n+#\n+# Copyright (c) 2010 Steven Walter\n+#\n+\n+test_description='git svn merge detection'\n+\n+GIT_SVN_LC_ALL=${LC_ALL:-$LANG}\n+\n+. ./lib-git-svn.sh\n+\n+say 'define NO_SVN_TESTS to skip git svn tests'\n+\n+case \"$GIT_SVN_LC_ALL\" in\n+*.UTF-8)\n+\ttest_set_prereq UTF8\n+\t;;\n+*)\n+\tsay \"UTF-8 locale not set, some tests skipped ($GIT_SVN_LC_ALL)\"\n+\t;;\n+esac\n+\n+test_expect_success \\\n+    'initialize source svn repo' '\n+        svn_cmd mkdir -m x \"$svnrepo\"/trunk &&\n+        svn_cmd mkdir -m x \"$svnrepo\"/branches &&\n+        svn_cmd co \"$svnrepo\"/trunk \"$SVN_TREE\" &&\n+\tcd \"$SVN_TREE\" &&\n+\ttouch foo &&\n+\tsvn add foo &&\n+\tsvn commit -m \"initial commit\" &&\n+\tsvn cp -m branch \"$svnrepo\"/trunk \"$svnrepo\"/branches/branch1 &&\n+\ttouch bar &&\n+\tsvn add bar &&\n+\tsvn commit -m x &&\n+\tsvn cp -m branch \"$svnrepo\"/trunk \"$svnrepo\"/branches/branch2 &&\n+\tsvn switch \"$svnrepo\"/branches/branch1 &&\n+\ttouch baz &&\n+\tsvn add baz &&\n+\tsvn commit -m x &&\n+\tsvn switch \"$svnrepo\"/trunk &&\n+\tsvn merge \"$svnrepo\"/branches/branch1 &&\n+\tsvn commit -m \"merge\" &&\n+\tsvn switch \"$svnrepo\"/branches/branch1 &&\n+\tsvn commit -m x &&\n+\tsvn switch \"$svnrepo\"/branches/branch2 &&\n+\tsvn merge \"$svnrepo\"/branches/branch1 &&\n+\tsvn commit -m \"merge branch1\" &&\n+\tsvn switch \"$svnrepo\"/trunk &&\n+\tsvn merge \"$svnrepo\"/branches/branch2 &&\n+\tsvn resolved baz &&\n+\tsvn commit -m \"merge branch2\" &&\n+\tcd .. &&\n+\trm -rf \"$SVN_TREE\"'\n+\n+test_expect_success \\\n+    'clone svn repo' '\n+        git svn init -s \"$svnrepo\" &&\n+\tgit svn fetch'\n+\n+test_expect_success \\\n+    'verify merge commit' '\n+        git rev-parse HEAD^2'\n+\n+test_done\n-- \n1.7.0.5.gbc75a\n"},{"id":"149777","messageId":"AANLkTikjGgzOxNz-Fepcg2ALqdWurzMyQUmRgqyxQN5L@mail.gmail.com","threadId":"24961","inReplyTo":"1283539935-14672-1-git-send-email-stevenrwalter@gmail.com","subject":"Re: [PATCH] Add unit test for check_cherry_pick","fromName":"Ævar Arnfjörð Bjarmason","fromEmail":"avarab@gmail.com","sentAt":"2010-09-03T19:12:36Z","receivedAt":"2010-09-03T19:12:36Z","isPatch":true,"sender":{"key":"avarab@gmail.com","avatar":"https://avatars.githubusercontent.com/u/45301?v=4"},"body":"On Fri, Sep 3, 2010 at 18:52, Steven Walter <stevenrwalter@gmail.com> wrote:\n\n> +GIT_SVN_LC_ALL=${LC_ALL:-$LANG}\n\nWhat's this about?\n\n> +. ./lib-git-svn.sh\n> +\n> +say 'define NO_SVN_TESTS to skip git svn tests'\n> +\n> +case \"$GIT_SVN_LC_ALL\" in\n> +*.UTF-8)\n> +       test_set_prereq UTF8\n\nYou never use this prereq?\n"},{"id":"149778","messageId":"AANLkTik5kcD1reuGfq4k_Oidkx00MY8E+Ucf+Ef_gCDD@mail.gmail.com","threadId":"24961","inReplyTo":"AANLkTikjGgzOxNz-Fepcg2ALqdWurzMyQUmRgqyxQN5L@mail.gmail.com","subject":"Re: [PATCH] Add unit test for check_cherry_pick","fromName":"Steven Walter","fromEmail":"stevenrwalter@gmail.com","sentAt":"2010-09-03T19:26:09Z","receivedAt":"2010-09-03T19:26:09Z","isPatch":true,"sender":{"key":"stevenrwalter@gmail.com","avatar":"https://avatars.githubusercontent.com/u/79127?v=4"},"body":"On Fri, Sep 3, 2010 at 3:12 PM, Ævar Arnfjörð Bjarmason\n<avarab@gmail.com> wrote:\n> On Fri, Sep 3, 2010 at 18:52, Steven Walter <stevenrwalter@gmail.com> wrote:\n>\n>> +GIT_SVN_LC_ALL=${LC_ALL:-$LANG}\n>\n> What's this about?\n>\n>> +. ./lib-git-svn.sh\n>> +\n>> +say 'define NO_SVN_TESTS to skip git svn tests'\n>> +\n>> +case \"$GIT_SVN_LC_ALL\" in\n>> +*.UTF-8)\n>> +       test_set_prereq UTF8\n>\n> You never use this prereq?\n\nI'll admit that I copied these from t9100.  I assumed they were\nnecessary for correct operation.  If that's not the case, then they\ncan be removed.\n-- \n-Steven Walter <stevenrwalter@gmail.com>\n"},{"id":"149785","messageId":"20100903204851.GA16831@dcvr.yhbt.net","threadId":"24961","inReplyTo":"AANLkTik5kcD1reuGfq4k_Oidkx00MY8E+Ucf+Ef_gCDD@mail.gmail.com","subject":"Re: [PATCH] Add unit test for check_cherry_pick","fromName":"Eric Wong","fromEmail":"normalperson@yhbt.net","sentAt":"2010-09-03T20:48:51Z","receivedAt":"2010-09-03T20:48:51Z","isPatch":true,"sender":{"key":"e@80x24.org","avatar":null},"body":"Steven Walter <stevenrwalter@gmail.com> wrote:\n> On Fri, Sep 3, 2010 at 3:12 PM, Ævar Arnfjörð Bjarmason wrote:\n> > On Fri, Sep 3, 2010 at 18:52, Steven Walter <stevenrwalter@gmail.com> wrote:\n> >> +GIT_SVN_LC_ALL=${LC_ALL:-$LANG}\n> >\n> > What's this about?\n> \n> I'll admit that I copied these from t9100.  I assumed they were\n> necessary for correct operation.  If that's not the case, then they\n> can be removed.\n\nHi Steven, I've squashed your test case along with the following change\nand pushed the original commit up to git://git.bogomips.org/git-svn\n\nHere's the intermediate diff -w of changes I made\n(all space indentations were convert to tabs, too):\n\ndiff --git a/t/t9157-git-svn-fetch-merge.sh b/t/t9157-git-svn-fetch-merge.sh\nindex 1c87986..da582c5 100644\n--- a/t/t9157-git-svn-fetch-merge.sh\n+++ b/t/t9157-git-svn-fetch-merge.sh\n@@ -4,27 +4,13 @@\n #\n \n test_description='git svn merge detection'\n-\n-GIT_SVN_LC_ALL=${LC_ALL:-$LANG}\n-\n . ./lib-git-svn.sh\n \n-say 'define NO_SVN_TESTS to skip git svn tests'\n-\n-case \"$GIT_SVN_LC_ALL\" in\n-*.UTF-8)\n-\ttest_set_prereq UTF8\n-\t;;\n-*)\n-\tsay \"UTF-8 locale not set, some tests skipped ($GIT_SVN_LC_ALL)\"\n-\t;;\n-esac\n-\n-test_expect_success \\\n-    'initialize source svn repo' '\n+test_expect_success 'initialize source svn repo' '\n         svn_cmd mkdir -m x \"$svnrepo\"/trunk &&\n         svn_cmd mkdir -m x \"$svnrepo\"/branches &&\n         svn_cmd co \"$svnrepo\"/trunk \"$SVN_TREE\" &&\n+\t(\n \tcd \"$SVN_TREE\" &&\n \ttouch foo &&\n \tsvn add foo &&\n@@ -49,17 +35,16 @@ test_expect_success \\\n \tsvn switch \"$svnrepo\"/trunk &&\n \tsvn merge \"$svnrepo\"/branches/branch2 &&\n \tsvn resolved baz &&\n-\tsvn commit -m \"merge branch2\" &&\n-\tcd .. &&\n-\trm -rf \"$SVN_TREE\"'\n+\t\tsvn commit -m \"merge branch2\"\n+\t) &&\n+\trm -rf \"$SVN_TREE\"\n+'\n \n-test_expect_success \\\n-    'clone svn repo' '\n+test_expect_success 'clone svn repo' '\n         git svn init -s \"$svnrepo\" &&\n-\tgit svn fetch'\n+\tgit svn fetch\n+'\n \n-test_expect_success \\\n-    'verify merge commit' '\n-        git rev-parse HEAD^2'\n+test_expect_success 'verify merge commit' 'git rev-parse HEAD^2'\n \n test_done\n\n-- \nEric Wong\n"}]}