{"thread":{"id":"34483","subject":"[PATCH] git p4 test: Check ignore files with client spec","startedAt":"2013-07-18T23:04:53Z","lastAt":"2013-07-20T14:59:05Z","messageCount":3,"participants":["Vitor Antunes","Pete Wyckoff"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"223719","messageId":"1374188693-547-1-git-send-email-vitor.hda@gmail.com","threadId":"34483","inReplyTo":null,"subject":"[PATCH] git p4 test: Check ignore files with client spec","fromName":"Vitor Antunes","fromEmail":"vitor.hda@gmail.com","sentAt":"2013-07-18T23:04:53Z","receivedAt":"2013-07-18T23:04:53Z","isPatch":true,"sender":{"key":"vitor.hda@gmail.com","avatar":"https://avatars.githubusercontent.com/u/606876?v=4"},"body":"This test confirms that a file can be ignored during git p4 sync if if is\nexcluded in P4 client specification.\n\nSigned-off-by: Vitor Antunes <vitor.hda@gmail.com>\n---\n t/t9801-git-p4-branch.sh | 23 ++++++++++++++++++++---\n 1 file changed, 20 insertions(+), 3 deletions(-)\n\ndiff --git a/t/t9801-git-p4-branch.sh b/t/t9801-git-p4-branch.sh\nindex 9730821..2bf142d 100755\n--- a/t/t9801-git-p4-branch.sh\n+++ b/t/t9801-git-p4-branch.sh\n@@ -469,9 +469,11 @@ test_expect_success 'use-client-spec detect-branches skips branches setup' '\n \t\tView: //depot/usecs/b1/... //depot/usecs/b3/...\n \t\tEOF\n \n-\t\techo b3/b3-file3 >b3/b3-file3 &&\n-\t\tp4 add b3/b3-file3 &&\n-\t\tp4 submit -d \"b3/b3-file3\"\n+\t\techo b3/b3-file3_1 >b3/b3-file3_1 &&\n+\t\techo b3/b3-file3_2 >b3/b3-file3_2 &&\n+\t\tp4 add b3/b3-file3_1 &&\n+\t\tp4 add b3/b3-file3_2 &&\n+\t\tp4 submit -d \"b3/b3-file3_1 b3/b3-file3_2\"\n \t)\n '\n \n@@ -487,6 +489,21 @@ test_expect_success 'use-client-spec detect-branches skips branches' '\n \t)\n '\n \n+test_expect_success 'use-client-spec detect-branches skips files in branches' '\n+\tclient_view \"//depot/usecs/... //client/...\" \\\n+\t\t    \"-//depot/usecs/b3/b3-file3_1 //client/b3/b3-file3_1\" &&\n+\ttest_when_finished cleanup_git &&\n+\ttest_create_repo \"$git\" &&\n+\t(\n+\t\tcd \"$git\" &&\n+\t\tgit p4 sync --detect-branches --use-client-spec //depot/usecs@all &&\n+\t\tgit checkout -b master p4/usecs/b3 &&\n+\t\ttest_path_is_file b1-file1 &&\n+\t\ttest_path_is_file b3-file3_2 &&\n+\t\ttest_path_is_missing b3-file3_1\n+\t)\n+'\n+\n test_expect_success 'kill p4d' '\n \tkill_p4d\n '\n-- \n1.8.3.2\n"},{"id":"223848","messageId":"20130720134837.GB18479@padd.com","threadId":"34483","inReplyTo":"1374188693-547-1-git-send-email-vitor.hda@gmail.com","subject":"Re: [PATCH] git p4 test: Check ignore files with client spec","fromName":"Pete Wyckoff","fromEmail":"pw@padd.com","sentAt":"2013-07-20T13:48:37Z","receivedAt":"2013-07-20T13:48:37Z","isPatch":true,"sender":{"key":"pw@padd.com","avatar":null},"body":"vitor.hda@gmail.com wrote on Fri, 19 Jul 2013 00:04 +0100:\n> This test confirms that a file can be ignored during git p4 sync if if is\n> excluded in P4 client specification.\n\nThis is a good check to have, and I'm glad it happens to work.  :)\n\nI'd forgotten during your conversation with Matthieu that we\ndid indeed have tests for detect-branches with use-client-spec.\nThis test sure seems like it should cover that situation though.\n\nAcked-by: Pete Wyckoff <pw@padd.com>\n\n> ---\n>  t/t9801-git-p4-branch.sh | 23 ++++++++++++++++++++---\n>  1 file changed, 20 insertions(+), 3 deletions(-)\n> \n> diff --git a/t/t9801-git-p4-branch.sh b/t/t9801-git-p4-branch.sh\n> index 9730821..2bf142d 100755\n> --- a/t/t9801-git-p4-branch.sh\n> +++ b/t/t9801-git-p4-branch.sh\n> @@ -469,9 +469,11 @@ test_expect_success 'use-client-spec detect-branches skips branches setup' '\n>  \t\tView: //depot/usecs/b1/... //depot/usecs/b3/...\n>  \t\tEOF\n>  \n> -\t\techo b3/b3-file3 >b3/b3-file3 &&\n> -\t\tp4 add b3/b3-file3 &&\n> -\t\tp4 submit -d \"b3/b3-file3\"\n> +\t\techo b3/b3-file3_1 >b3/b3-file3_1 &&\n> +\t\techo b3/b3-file3_2 >b3/b3-file3_2 &&\n> +\t\tp4 add b3/b3-file3_1 &&\n> +\t\tp4 add b3/b3-file3_2 &&\n> +\t\tp4 submit -d \"b3/b3-file3_1 b3/b3-file3_2\"\n>  \t)\n>  '\n>  \n> @@ -487,6 +489,21 @@ test_expect_success 'use-client-spec detect-branches skips branches' '\n>  \t)\n>  '\n>  \n> +test_expect_success 'use-client-spec detect-branches skips files in branches' '\n> +\tclient_view \"//depot/usecs/... //client/...\" \\\n> +\t\t    \"-//depot/usecs/b3/b3-file3_1 //client/b3/b3-file3_1\" &&\n> +\ttest_when_finished cleanup_git &&\n> +\ttest_create_repo \"$git\" &&\n> +\t(\n> +\t\tcd \"$git\" &&\n> +\t\tgit p4 sync --detect-branches --use-client-spec //depot/usecs@all &&\n> +\t\tgit checkout -b master p4/usecs/b3 &&\n> +\t\ttest_path_is_file b1-file1 &&\n> +\t\ttest_path_is_file b3-file3_2 &&\n> +\t\ttest_path_is_missing b3-file3_1\n> +\t)\n> +'\n> +\n>  test_expect_success 'kill p4d' '\n>  \tkill_p4d\n>  '\n> -- \n> 1.8.3.2\n> \n> --\n> To unsubscribe from this list: send the line \"unsubscribe git\" in\n> the body of a message to majordomo@vger.kernel.org\n> More majordomo info at  http://vger.kernel.org/majordomo-info.html\n> \n"},{"id":"223849","messageId":"CAOpHH-VSGZMNHwto-JwuiEyGHA9zvSRz-2BX=u1YU6CGarbyeg@mail.gmail.com","threadId":"34483","inReplyTo":"20130720134837.GB18479@padd.com","subject":"Re: [PATCH] git p4 test: Check ignore files with client spec","fromName":"Vitor Antunes","fromEmail":"vitor.hda@gmail.com","sentAt":"2013-07-20T14:59:05Z","receivedAt":"2013-07-20T14:59:05Z","isPatch":true,"sender":{"key":"vitor.hda@gmail.com","avatar":"https://avatars.githubusercontent.com/u/606876?v=4"},"body":"On Sat, Jul 20, 2013 at 2:48 PM, Pete Wyckoff <pw@padd.com> wrote:\n> I'd forgotten during your conversation with Matthieu that we\n> did indeed have tests for detect-branches with use-client-spec.\n> This test sure seems like it should cover that situation though.\n\nIt was good that you had some tests implemented, otherwise it would\nhave taken me much more time to implement this ;)\n"}]}