{"thread":{"id":"30596","subject":"[PATCH 0/2] git-p4: New test cases for branch detection","startedAt":"2012-05-22T23:38:09Z","lastAt":"2012-05-25T08:32:29Z","messageCount":8,"participants":["Vitor Antunes","Pete Wyckoff","Junio C Hamano"],"isPatch":true,"patchVersion":1,"patchTotal":2},"messages":[{"id":"191961","messageId":"1337729891-27648-1-git-send-email-vitor.hda@gmail.com","threadId":"30596","inReplyTo":null,"subject":"[PATCH 0/2] git-p4: New test cases for branch detection","fromName":"Vitor Antunes","fromEmail":"vitor.hda@gmail.com","sentAt":"2012-05-22T23:38:09Z","receivedAt":"2012-05-22T23:38:09Z","isPatch":true,"sender":{"key":"vitor.hda@gmail.com","avatar":"https://avatars.githubusercontent.com/u/606876?v=4"},"body":"Two new test cases to verify branch detection functionality. The first\nis working properly and I think it is a good idea to make sure this is\nnot broken in the future. The second test case shows a limitation in the\ncurrent algorithm for new branch detection.\n\nVitor Antunes (2):\n  git-p4: Test changelists touching two branches\n  git-p4: Verify detection of \"empty\" branch creation\n\n t/t9801-git-p4-branch.sh |  110 ++++++++++++++++++++++++++++++++++++++++++++++\n 1 files changed, 110 insertions(+), 0 deletions(-)\n\n-- \n1.7.7.rc2.14.g5e044.dirty\n"},{"id":"191963","messageId":"1337729891-27648-2-git-send-email-vitor.hda@gmail.com","threadId":"30596","inReplyTo":"1337729891-27648-1-git-send-email-vitor.hda@gmail.com","subject":"[PATCH 1/2] git-p4: Test changelists touching two branches","fromName":"Vitor Antunes","fromEmail":"vitor.hda@gmail.com","sentAt":"2012-05-22T23:38:10Z","receivedAt":"2012-05-22T23:38:10Z","isPatch":true,"sender":{"key":"vitor.hda@gmail.com","avatar":"https://avatars.githubusercontent.com/u/606876?v=4"},"body":"It is possible to modify two different branches in P4 in a single\nchangelist. git-p4 correctly detects this and commits the relevant\nchanges to the different branches separately. This test proves that and\navoid future regressions in this behavior.\n\nSigned-off-by: Vitor Antunes <vitor.hda@gmail.com>\n---\n t/t9801-git-p4-branch.sh |   54 ++++++++++++++++++++++++++++++++++++++++++++++\n 1 files changed, 54 insertions(+), 0 deletions(-)\n\ndiff --git a/t/t9801-git-p4-branch.sh b/t/t9801-git-p4-branch.sh\nindex 2859256..89d8c59 100755\n--- a/t/t9801-git-p4-branch.sh\n+++ b/t/t9801-git-p4-branch.sh\n@@ -306,6 +306,60 @@ test_expect_success 'git p4 clone complex branches' '\n \t)\n '\n \n+# Move branch3/file3 to branch4/file3 in a single changelist\n+test_expect_success 'git p4 submit to two branches in a single changelist' '\n+\ttest_when_finished cleanup_git &&\n+\ttest_create_repo \"$git\" &&\n+\t(\n+\t\tcd \"$cli\" &&\n+\t\tp4 integrate //depot/branch3/file3 //depot/branch4/file3 &&\n+\t\tp4 delete //depot/branch3/file3 &&\n+\t\tp4 submit -d \"Move branch3/file3 to branch4/file3\"\n+\t)\n+'\n+\n+# Confirm that changes to two branches done in a single changelist\n+# are correctly imported by git p4\n+test_expect_success 'git p4 sync changes to two branches in the same changelist' '\n+\ttest_when_finished cleanup_git &&\n+\ttest_create_repo \"$git\" &&\n+\t(\n+\t\tcd \"$git\" &&\n+\t\tgit config git-p4.branchList branch1:branch2 &&\n+\t\tgit config --add git-p4.branchList branch1:branch3 &&\n+\t\tgit config --add git-p4.branchList branch1:branch4 &&\n+\t\tgit config --add git-p4.branchList branch1:branch5 &&\n+\t\tgit p4 clone --dest=. --detect-branches //depot@all &&\n+\t\tgit log --all --graph --decorate --stat &&\n+\t\tgit reset --hard p4/depot/branch1 &&\n+\t\ttest_path_is_file file1 &&\n+\t\ttest_path_is_file file2 &&\n+\t\ttest_path_is_file file3 &&\n+\t\tgrep update file2 &&\n+\t\tgit reset --hard p4/depot/branch2 &&\n+\t\ttest_path_is_file file1 &&\n+\t\ttest_path_is_file file2 &&\n+\t\ttest_path_is_missing file3 &&\n+\t\t! grep update file2 &&\n+\t\tgit reset --hard p4/depot/branch3 &&\n+\t\ttest_path_is_file file1 &&\n+\t\ttest_path_is_file file2 &&\n+\t\ttest_path_is_missing file3 &&\n+\t\tgrep update file2 &&\n+\t\tgit reset --hard p4/depot/branch4 &&\n+\t\ttest_path_is_file file1 &&\n+\t\ttest_path_is_file file2 &&\n+\t\ttest_path_is_file file3 &&\n+\t\t! grep update file2 &&\n+\t\tgit reset --hard p4/depot/branch5 &&\n+\t\ttest_path_is_file file1 &&\n+\t\ttest_path_is_file file2 &&\n+\t\ttest_path_is_file file3 &&\n+\t\t! grep update file2 &&\n+\t\ttest_path_is_missing .git/git-p4-tmp\n+\t)\n+'\n+\n test_expect_success 'kill p4d' '\n \tkill_p4d\n '\n-- \n1.7.7.rc2.14.g5e044.dirty\n"},{"id":"191964","messageId":"1337729891-27648-3-git-send-email-vitor.hda@gmail.com","threadId":"30596","inReplyTo":"1337729891-27648-1-git-send-email-vitor.hda@gmail.com","subject":"[PATCH 2/2] git-p4: Verify detection of \"empty\" branch creation","fromName":"Vitor Antunes","fromEmail":"vitor.hda@gmail.com","sentAt":"2012-05-22T23:38:11Z","receivedAt":"2012-05-22T23:38:11Z","isPatch":true,"sender":{"key":"vitor.hda@gmail.com","avatar":"https://avatars.githubusercontent.com/u/606876?v=4"},"body":"Current implementation of new branch parent detection works on the\nprinciple that the new branch is a complete integration, with no\nchanges, of the original files.\nThis test shows this deficiency in the particular case when the new\nbranch is created from a subset of the original files.\n\nSigned-off-by: Vitor Antunes <vitor.hda@gmail.com>\n---\n t/t9801-git-p4-branch.sh |   56 ++++++++++++++++++++++++++++++++++++++++++++++\n 1 files changed, 56 insertions(+), 0 deletions(-)\n\ndiff --git a/t/t9801-git-p4-branch.sh b/t/t9801-git-p4-branch.sh\nindex 89d8c59..c8e4d86 100755\n--- a/t/t9801-git-p4-branch.sh\n+++ b/t/t9801-git-p4-branch.sh\n@@ -360,6 +360,62 @@ test_expect_success 'git p4 sync changes to two branches in the same changelist'\n \t)\n '\n \n+# Create a branch by integrating a single file\n+test_expect_success 'git p4 file subset branch' '\n+\ttest_when_finished cleanup_git &&\n+\ttest_create_repo \"$git\" &&\n+\t(\n+\t\tcd \"$cli\" &&\n+\t\tp4 integrate //depot/branch1/file1 //depot/branch6/file1 &&\n+\t\tp4 submit -d \"Integrate file1 alone from branch1 to branch6\"\n+\t)\n+'\n+\n+# Check if git -p4 creates a new branch containing a single file,\n+# instead of keeping the old files from the original branch\n+test_expect_failure 'git p4 clone file subset branch' '\n+\ttest_when_finished cleanup_git &&\n+\ttest_create_repo \"$git\" &&\n+\t(\n+\t\tcd \"$git\" &&\n+\t\tgit config git-p4.branchList branch1:branch2 &&\n+\t\tgit config --add git-p4.branchList branch1:branch3 &&\n+\t\tgit config --add git-p4.branchList branch1:branch4 &&\n+\t\tgit config --add git-p4.branchList branch1:branch5 &&\n+\t\tgit config --add git-p4.branchList branch1:branch6 &&\n+\t\t\"$GITP4\" clone --dest=. --detect-branches //depot@all &&\n+\t\tgit log --all --graph --decorate --stat &&\n+\t\tgit reset --hard p4/depot/branch1 &&\n+\t\ttest_path_is_file file1 &&\n+\t\ttest_path_is_file file2 &&\n+\t\ttest_path_is_file file3 &&\n+\t\tgrep update file2 &&\n+\t\tgit reset --hard p4/depot/branch2 &&\n+\t\ttest_path_is_file file1 &&\n+\t\ttest_path_is_file file2 &&\n+\t\ttest_path_is_missing file3 &&\n+\t\t! grep update file2 &&\n+\t\tgit reset --hard p4/depot/branch3 &&\n+\t\ttest_path_is_file file1 &&\n+\t\ttest_path_is_file file2 &&\n+\t\ttest_path_is_missing file3 &&\n+\t\tgrep update file2 &&\n+\t\tgit reset --hard p4/depot/branch4 &&\n+\t\ttest_path_is_file file1 &&\n+\t\ttest_path_is_file file2 &&\n+\t\ttest_path_is_file file3 &&\n+\t\t! grep update file2 &&\n+\t\tgit reset --hard p4/depot/branch5 &&\n+\t\ttest_path_is_file file1 &&\n+\t\ttest_path_is_file file2 &&\n+\t\ttest_path_is_file file3 &&\n+\t\t! grep update file2 &&\n+\t\tgit reset --hard p4/depot/branch6 &&\n+\t\ttest_path_is_file file1 &&\n+\t\t! test_path_is_file file2 &&\n+\t\t! test_path_is_file file3\n+\t)\n+'\n test_expect_success 'kill p4d' '\n \tkill_p4d\n '\n-- \n1.7.7.rc2.14.g5e044.dirty\n"},{"id":"192034","messageId":"20120524010805.GA26443@padd.com","threadId":"30596","inReplyTo":"1337729891-27648-2-git-send-email-vitor.hda@gmail.com","subject":"Re: [PATCH 1/2] git-p4: Test changelists touching two branches","fromName":"Pete Wyckoff","fromEmail":"pw@padd.com","sentAt":"2012-05-24T01:08:05Z","receivedAt":"2012-05-24T01:08:05Z","isPatch":true,"sender":{"key":"pw@padd.com","avatar":null},"body":"vitor.hda@gmail.com wrote on Wed, 23 May 2012 00:38 +0100:\n> It is possible to modify two different branches in P4 in a single\n> changelist. git-p4 correctly detects this and commits the relevant\n> changes to the different branches separately. This test proves that and\n> avoid future regressions in this behavior.\n> \n> Signed-off-by: Vitor Antunes <vitor.hda@gmail.com>\n> ---\n>  t/t9801-git-p4-branch.sh |   54 ++++++++++++++++++++++++++++++++++++++++++++++\n>  1 files changed, 54 insertions(+), 0 deletions(-)\n> \n> diff --git a/t/t9801-git-p4-branch.sh b/t/t9801-git-p4-branch.sh\n> index 2859256..89d8c59 100755\n> --- a/t/t9801-git-p4-branch.sh\n> +++ b/t/t9801-git-p4-branch.sh\n> @@ -306,6 +306,60 @@ test_expect_success 'git p4 clone complex branches' '\n>  \t)\n>  '\n>  \n> +# Move branch3/file3 to branch4/file3 in a single changelist\n> +test_expect_success 'git p4 submit to two branches in a single changelist' '\n> +\ttest_when_finished cleanup_git &&\n> +\ttest_create_repo \"$git\" &&\n\nYou can skip the git bits here.  This is just setup for the next\ntest.\n\nAck everything else.  Nice to have the extra tests.\n\n\t\t-- Pete\n\n> +\t(\n> +\t\tcd \"$cli\" &&\n> +\t\tp4 integrate //depot/branch3/file3 //depot/branch4/file3 &&\n> +\t\tp4 delete //depot/branch3/file3 &&\n> +\t\tp4 submit -d \"Move branch3/file3 to branch4/file3\"\n> +\t)\n> +'\n> +\n> +# Confirm that changes to two branches done in a single changelist\n> +# are correctly imported by git p4\n> +test_expect_success 'git p4 sync changes to two branches in the same changelist' '\n> +\ttest_when_finished cleanup_git &&\n> +\ttest_create_repo \"$git\" &&\n> +\t(\n> +\t\tcd \"$git\" &&\n> +\t\tgit config git-p4.branchList branch1:branch2 &&\n> +\t\tgit config --add git-p4.branchList branch1:branch3 &&\n> +\t\tgit config --add git-p4.branchList branch1:branch4 &&\n> +\t\tgit config --add git-p4.branchList branch1:branch5 &&\n> +\t\tgit p4 clone --dest=. --detect-branches //depot@all &&\n> +\t\tgit log --all --graph --decorate --stat &&\n> +\t\tgit reset --hard p4/depot/branch1 &&\n> +\t\ttest_path_is_file file1 &&\n> +\t\ttest_path_is_file file2 &&\n> +\t\ttest_path_is_file file3 &&\n> +\t\tgrep update file2 &&\n> +\t\tgit reset --hard p4/depot/branch2 &&\n> +\t\ttest_path_is_file file1 &&\n> +\t\ttest_path_is_file file2 &&\n> +\t\ttest_path_is_missing file3 &&\n> +\t\t! grep update file2 &&\n> +\t\tgit reset --hard p4/depot/branch3 &&\n> +\t\ttest_path_is_file file1 &&\n> +\t\ttest_path_is_file file2 &&\n> +\t\ttest_path_is_missing file3 &&\n> +\t\tgrep update file2 &&\n> +\t\tgit reset --hard p4/depot/branch4 &&\n> +\t\ttest_path_is_file file1 &&\n> +\t\ttest_path_is_file file2 &&\n> +\t\ttest_path_is_file file3 &&\n> +\t\t! grep update file2 &&\n> +\t\tgit reset --hard p4/depot/branch5 &&\n> +\t\ttest_path_is_file file1 &&\n> +\t\ttest_path_is_file file2 &&\n> +\t\ttest_path_is_file file3 &&\n> +\t\t! grep update file2 &&\n> +\t\ttest_path_is_missing .git/git-p4-tmp\n> +\t)\n> +'\n> +\n>  test_expect_success 'kill p4d' '\n>  \tkill_p4d\n>  '\n> -- \n> 1.7.7.rc2.14.g5e044.dirty\n> \n"},{"id":"192035","messageId":"20120524011338.GB26443@padd.com","threadId":"30596","inReplyTo":"1337729891-27648-3-git-send-email-vitor.hda@gmail.com","subject":"Re: [PATCH 2/2] git-p4: Verify detection of \"empty\" branch creation","fromName":"Pete Wyckoff","fromEmail":"pw@padd.com","sentAt":"2012-05-24T01:13:38Z","receivedAt":"2012-05-24T01:13:38Z","isPatch":true,"sender":{"key":"pw@padd.com","avatar":null},"body":"vitor.hda@gmail.com wrote on Wed, 23 May 2012 00:38 +0100:\n> Current implementation of new branch parent detection works on the\n> principle that the new branch is a complete integration, with no\n> changes, of the original files.\n> This test shows this deficiency in the particular case when the new\n> branch is created from a subset of the original files.\n> \n> Signed-off-by: Vitor Antunes <vitor.hda@gmail.com>\n> ---\n>  t/t9801-git-p4-branch.sh |   56 ++++++++++++++++++++++++++++++++++++++++++++++\n>  1 files changed, 56 insertions(+), 0 deletions(-)\n> \n> diff --git a/t/t9801-git-p4-branch.sh b/t/t9801-git-p4-branch.sh\n> index 89d8c59..c8e4d86 100755\n> --- a/t/t9801-git-p4-branch.sh\n> +++ b/t/t9801-git-p4-branch.sh\n> @@ -360,6 +360,62 @@ test_expect_success 'git p4 sync changes to two branches in the same changelist'\n>  \t)\n>  '\n>  \n> +# Create a branch by integrating a single file\n> +test_expect_success 'git p4 file subset branch' '\n> +\ttest_when_finished cleanup_git &&\n> +\ttest_create_repo \"$git\" &&\n\nDitto; no need for git here.\n\n> +\t(\n> +\t\tcd \"$cli\" &&\n> +\t\tp4 integrate //depot/branch1/file1 //depot/branch6/file1 &&\n> +\t\tp4 submit -d \"Integrate file1 alone from branch1 to branch6\"\n> +\t)\n> +'\n> +\n> +# Check if git -p4 creates a new branch containing a single file,\n\nStray \"-\"  -------^\n\n> +# instead of keeping the old files from the original branch\n> +test_expect_failure 'git p4 clone file subset branch' '\n> +\ttest_when_finished cleanup_git &&\n> +\ttest_create_repo \"$git\" &&\n> +\t(\n> +\t\tcd \"$git\" &&\n> +\t\tgit config git-p4.branchList branch1:branch2 &&\n> +\t\tgit config --add git-p4.branchList branch1:branch3 &&\n> +\t\tgit config --add git-p4.branchList branch1:branch4 &&\n> +\t\tgit config --add git-p4.branchList branch1:branch5 &&\n> +\t\tgit config --add git-p4.branchList branch1:branch6 &&\n> +\t\t\"$GITP4\" clone --dest=. --detect-branches //depot@all &&\n\nRebase error?  It fails because this should be \"git p4\".\n\n> +\t\tgit log --all --graph --decorate --stat &&\n> +\t\tgit reset --hard p4/depot/branch1 &&\n> +\t\ttest_path_is_file file1 &&\n> +\t\ttest_path_is_file file2 &&\n> +\t\ttest_path_is_file file3 &&\n> +\t\tgrep update file2 &&\n> +\t\tgit reset --hard p4/depot/branch2 &&\n> +\t\ttest_path_is_file file1 &&\n> +\t\ttest_path_is_file file2 &&\n> +\t\ttest_path_is_missing file3 &&\n> +\t\t! grep update file2 &&\n> +\t\tgit reset --hard p4/depot/branch3 &&\n> +\t\ttest_path_is_file file1 &&\n> +\t\ttest_path_is_file file2 &&\n> +\t\ttest_path_is_missing file3 &&\n> +\t\tgrep update file2 &&\n> +\t\tgit reset --hard p4/depot/branch4 &&\n> +\t\ttest_path_is_file file1 &&\n> +\t\ttest_path_is_file file2 &&\n> +\t\ttest_path_is_file file3 &&\n> +\t\t! grep update file2 &&\n> +\t\tgit reset --hard p4/depot/branch5 &&\n> +\t\ttest_path_is_file file1 &&\n> +\t\ttest_path_is_file file2 &&\n> +\t\ttest_path_is_file file3 &&\n> +\t\t! grep update file2 &&\n> +\t\tgit reset --hard p4/depot/branch6 &&\n> +\t\ttest_path_is_file file1 &&\n> +\t\t! test_path_is_file file2 &&\n\nBut then it fails here too because the code is indeed buggy.\nNice to have this test too, to document the problem and maybe\nprod someone to fix it someday.\n\n> +\t\t! test_path_is_file file3\n\nDo use \"test_path_is_missing\" for these non-existant file\ntests, though, please.\n\n\t\t-- Pete\n\n> +\t)\n> +'\n>  test_expect_success 'kill p4d' '\n>  \tkill_p4d\n>  '\n> -- \n> 1.7.7.rc2.14.g5e044.dirty\n> \n"},{"id":"192131","messageId":"CAOpHH-U+cG2DvTtWD25JNgLYKrNcwXgqysA0G-wr5DFhLG-DAg@mail.gmail.com","threadId":"30596","inReplyTo":"20120524010805.GA26443@padd.com","subject":"Re: [PATCH 1/2] git-p4: Test changelists touching two branches","fromName":"Vitor Antunes","fromEmail":"vitor.hda@gmail.com","sentAt":"2012-05-24T22:42:06Z","receivedAt":"2012-05-24T22:42:06Z","isPatch":true,"sender":{"key":"vitor.hda@gmail.com","avatar":"https://avatars.githubusercontent.com/u/606876?v=4"},"body":"On Thu, May 24, 2012 at 2:08 AM, Pete Wyckoff <pw@padd.com> wrote:\n> vitor.hda@gmail.com wrote on Wed, 23 May 2012 00:38 +0100:\n>> It is possible to modify two different branches in P4 in a single\n>> changelist. git-p4 correctly detects this and commits the relevant\n>> changes to the different branches separately. This test proves that and\n>> avoid future regressions in this behavior.\n>>\n>> Signed-off-by: Vitor Antunes <vitor.hda@gmail.com>\n>> ---\n>>  t/t9801-git-p4-branch.sh |   54 ++++++++++++++++++++++++++++++++++++++++++++++\n>>  1 files changed, 54 insertions(+), 0 deletions(-)\n>>\n>> diff --git a/t/t9801-git-p4-branch.sh b/t/t9801-git-p4-branch.sh\n>> index 2859256..89d8c59 100755\n>> --- a/t/t9801-git-p4-branch.sh\n>> +++ b/t/t9801-git-p4-branch.sh\n>> @@ -306,6 +306,60 @@ test_expect_success 'git p4 clone complex branches' '\n>>       )\n>>  '\n>>\n>> +# Move branch3/file3 to branch4/file3 in a single changelist\n>> +test_expect_success 'git p4 submit to two branches in a single changelist' '\n>> +     test_when_finished cleanup_git &&\n>> +     test_create_repo \"$git\" &&\n>\n> You can skip the git bits here.  This is just setup for the next\n> test.\n\nWhat about the parentheses in the next line, is it necessary? Or can I\nsimply remove that pair of parentheses and unindent the code in\nbetween?\n\nThanks,\nVitor\n\n> Ack everything else.  Nice to have the extra tests.\n>\n>                -- Pete\n>\n>> +     (\n>> +             cd \"$cli\" &&\n>> +             p4 integrate //depot/branch3/file3 //depot/branch4/file3 &&\n>> +             p4 delete //depot/branch3/file3 &&\n>> +             p4 submit -d \"Move branch3/file3 to branch4/file3\"\n>> +     )\n>> +'\n>> +\n>> +# Confirm that changes to two branches done in a single changelist\n>> +# are correctly imported by git p4\n>> +test_expect_success 'git p4 sync changes to two branches in the same changelist' '\n>> +     test_when_finished cleanup_git &&\n>> +     test_create_repo \"$git\" &&\n>> +     (\n>> +             cd \"$git\" &&\n>> +             git config git-p4.branchList branch1:branch2 &&\n>> +             git config --add git-p4.branchList branch1:branch3 &&\n>> +             git config --add git-p4.branchList branch1:branch4 &&\n>> +             git config --add git-p4.branchList branch1:branch5 &&\n>> +             git p4 clone --dest=. --detect-branches //depot@all &&\n>> +             git log --all --graph --decorate --stat &&\n>> +             git reset --hard p4/depot/branch1 &&\n>> +             test_path_is_file file1 &&\n>> +             test_path_is_file file2 &&\n>> +             test_path_is_file file3 &&\n>> +             grep update file2 &&\n>> +             git reset --hard p4/depot/branch2 &&\n>> +             test_path_is_file file1 &&\n>> +             test_path_is_file file2 &&\n>> +             test_path_is_missing file3 &&\n>> +             ! grep update file2 &&\n>> +             git reset --hard p4/depot/branch3 &&\n>> +             test_path_is_file file1 &&\n>> +             test_path_is_file file2 &&\n>> +             test_path_is_missing file3 &&\n>> +             grep update file2 &&\n>> +             git reset --hard p4/depot/branch4 &&\n>> +             test_path_is_file file1 &&\n>> +             test_path_is_file file2 &&\n>> +             test_path_is_file file3 &&\n>> +             ! grep update file2 &&\n>> +             git reset --hard p4/depot/branch5 &&\n>> +             test_path_is_file file1 &&\n>> +             test_path_is_file file2 &&\n>> +             test_path_is_file file3 &&\n>> +             ! grep update file2 &&\n>> +             test_path_is_missing .git/git-p4-tmp\n>> +     )\n>> +'\n>> +\n>>  test_expect_success 'kill p4d' '\n>>       kill_p4d\n>>  '\n>> --\n>> 1.7.7.rc2.14.g5e044.dirty\n>>\n"},{"id":"192141","messageId":"7vmx4xunzr.fsf@alter.siamese.dyndns.org","threadId":"30596","inReplyTo":"CAOpHH-U+cG2DvTtWD25JNgLYKrNcwXgqysA0G-wr5DFhLG-DAg@mail.gmail.com","subject":"Re: [PATCH 1/2] git-p4: Test changelists touching two branches","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2012-05-25T00:02:16Z","receivedAt":"2012-05-25T00:02:16Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Vitor Antunes <vitor.hda@gmail.com> writes:\n\n> What about the parentheses in the next line, is it necessary? Or can I\n> simply remove that pair of parentheses and unindent the code in\n> between?\n>\n>> ...\n>>> +     (\n>>> +             cd \"$cli\" &&\n>>> +             p4 integrate //depot/branch3/file3 //depot/branch4/file3 &&\n>>> +             p4 delete //depot/branch3/file3 &&\n>>> +             p4 submit -d \"Move branch3/file3 to branch4/file3\"\n>>> +     )\n>>> +'\n\nIf you mean this part, the parentheses to throw you into a subprocess are\nrequired.  Otherwise, a failure in any of these three p4 commands will\nleave you in $cli directory, causing the next test to start in a directory\nthat it does not expect.\n"},{"id":"192156","messageId":"CAOpHH-U5dRaMsMPn3X6KujSb=pnw+voaOLaEntGhi+4x1uboGA@mail.gmail.com","threadId":"30596","inReplyTo":"7vmx4xunzr.fsf@alter.siamese.dyndns.org","subject":"Re: [PATCH 1/2] git-p4: Test changelists touching two branches","fromName":"Vitor Antunes","fromEmail":"vitor.hda@gmail.com","sentAt":"2012-05-25T08:32:29Z","receivedAt":"2012-05-25T08:32:29Z","isPatch":true,"sender":{"key":"vitor.hda@gmail.com","avatar":"https://avatars.githubusercontent.com/u/606876?v=4"},"body":"On Fri, May 25, 2012 at 1:02 AM, Junio C Hamano <gitster@pobox.com> wrote:\n> Vitor Antunes <vitor.hda@gmail.com> writes:\n>\n>> What about the parentheses in the next line, is it necessary? Or can I\n>> simply remove that pair of parentheses and unindent the code in\n>> between?\n>>\n>>> ...\n>>>> +     (\n>>>> +             cd \"$cli\" &&\n>>>> +             p4 integrate //depot/branch3/file3 //depot/branch4/file3 &&\n>>>> +             p4 delete //depot/branch3/file3 &&\n>>>> +             p4 submit -d \"Move branch3/file3 to branch4/file3\"\n>>>> +     )\n>>>> +'\n>\n> If you mean this part, the parentheses to throw you into a subprocess are\n> required.  Otherwise, a failure in any of these three p4 commands will\n> leave you in $cli directory, causing the next test to start in a directory\n> that it does not expect.\n\nThat makes sense and is quite obvious now that I _see_ it.\n\nThanks for your help Junio.\n\nVitor\n"}]}