{"thread":{"id":"25951","subject":"[PATCH] t9143: do not fail when unhandled.log.gz is not created","startedAt":"2010-12-04T11:37:04Z","lastAt":"2010-12-08T21:41:15Z","messageCount":4,"participants":["Torsten Bögershausen","Eric Wong"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"157301","messageId":"4CFA27E0.8070308@web.de","threadId":"25951","inReplyTo":null,"subject":"[PATCH] t9143: do not fail when unhandled.log.gz is not created","fromName":"Torsten Bögershausen","fromEmail":"tboegi@web.de","sentAt":"2010-12-04T11:37:04Z","receivedAt":"2010-12-04T11:37:04Z","isPatch":true,"sender":{"key":"tboegi@web.de","avatar":"https://avatars.githubusercontent.com/u/7138363?v=4"},"body":"Commit df73af5f66 is does not let the test case fail,\nwhen Compress::Zlib is missing.\nBut:\nOn a MacOS X 10.6 system with missing Compress::Zlib\nusing svn version 1.6.5 (r38866) the gz file is created.\nSolution:\nCheck for the existance of the unhandled.log.gz file.\n\nSigned-off-by: Torsten Bögershausen <tboegi@web.de>\n---\n  t/t9143-git-svn-gc.sh |    2 +-\n  1 files changed, 1 insertions(+), 1 deletions(-)\n\ndiff --git a/t/t9143-git-svn-gc.sh b/t/t9143-git-svn-gc.sh\nindex 337ea59..8a95d78 100755\n--- a/t/t9143-git-svn-gc.sh\n+++ b/t/t9143-git-svn-gc.sh\n@@ -37,7 +37,7 @@ test_expect_success 'git svn gc runs' 'git svn gc'\n   test_expect_success 'git svn index removed' '! test -f \n.git/svn/refs/remotes/git-svn/index'\n  -if perl -MCompress::Zlib -e 0 2>/dev/null\n+if test -r .git/svn/refs/remotes/git-svn/unhandled.log.gz\n  then\n  \ttest_expect_success 'git svn gc produces a valid gzip file' '\n  \t\t gunzip .git/svn/refs/remotes/git-svn/unhandled.log.gz\n-- \n1.6.6\n"},{"id":"157426","messageId":"20101206192326.GA12383@dcvr.yhbt.net","threadId":"25951","inReplyTo":"4CFA27E0.8070308@web.de","subject":"Re: [PATCH] t9143: do not fail when unhandled.log.gz is not created","fromName":"Eric Wong","fromEmail":"normalperson@yhbt.net","sentAt":"2010-12-06T19:23:26Z","receivedAt":"2010-12-06T19:23:26Z","isPatch":true,"sender":{"key":"e@80x24.org","avatar":null},"body":"Torsten Bögershausen <tboegi@web.de> wrote:\n> Commit df73af5f66 is does not let the test case fail,\n> when Compress::Zlib is missing.\n> But:\n> On a MacOS X 10.6 system with missing Compress::Zlib\n> using svn version 1.6.5 (r38866) the gz file is created.\n> Solution:\n> Check for the existance of the unhandled.log.gz file.\n\nI wonder if your system could have multiple perl installations and\ngit-svn is calling one while the shell scripts are calling another.\nI'm not sure if there is another way the gz file could be created while\nCompress::Zlib is missing.\n\n> Signed-off-by: Torsten Bögershausen <tboegi@web.de>\n\nTorsten Bögershausen wrote in <4CFA27DD.7030105@web.de>:\n> Now we do not depend on internal implementation details of svn.\n> And the code is 3% easier to understand :-)\n\nI agree on this point completely\n\nAcked-by: Eric Wong <normalperson@yhbt.net>\n\n> ---\n>  t/t9143-git-svn-gc.sh |    2 +-\n>  1 files changed, 1 insertions(+), 1 deletions(-)\n>\n> diff --git a/t/t9143-git-svn-gc.sh b/t/t9143-git-svn-gc.sh\n> index 337ea59..8a95d78 100755\n> --- a/t/t9143-git-svn-gc.sh\n> +++ b/t/t9143-git-svn-gc.sh\n> @@ -37,7 +37,7 @@ test_expect_success 'git svn gc runs' 'git svn gc'\n>   test_expect_success 'git svn index removed' '! test -f  \n> .git/svn/refs/remotes/git-svn/index'\n>  -if perl -MCompress::Zlib -e 0 2>/dev/null\n> +if test -r .git/svn/refs/remotes/git-svn/unhandled.log.gz\n>  then\n>  \ttest_expect_success 'git svn gc produces a valid gzip file' '\n>  \t\t gunzip .git/svn/refs/remotes/git-svn/unhandled.log.gz\n> -- \n"},{"id":"157610","messageId":"4CFFB188.6000006@gmail.com","threadId":"25951","inReplyTo":"20101206192326.GA12383@dcvr.yhbt.net","subject":"Re: [PATCH] t9143: do not fail when unhandled.log.gz is not created","fromName":"Torsten Bögershausen","fromEmail":"totte.enea@gmail.com","sentAt":"2010-12-08T16:25:44Z","receivedAt":"2010-12-08T16:25:44Z","isPatch":true,"sender":{"key":"totte.enea@gmail.com","avatar":null},"body":"On 12/06/2010 08:23 PM, Eric Wong wrote:\n> Torsten Bögershausen<tboegi@web.de>  wrote:\n>> Commit df73af5f66 is does not let the test case fail,\n>> when Compress::Zlib is missing.\n>> But:\n>> On a MacOS X 10.6 system with missing Compress::Zlib\n>> using svn version 1.6.5 (r38866) the gz file is created.\n>> Solution:\n>> Check for the existance of the unhandled.log.gz file.\n>\n> I wonder if your system could have multiple perl installations and\n> git-svn is calling one while the shell scripts are calling another.\n> I'm not sure if there is another way the gz file could be created while\n> Compress::Zlib is missing.\n>\n>> Signed-off-by: Torsten Bögershausen<tboegi@web.de>\n>\n> Torsten Bögershausen wrote in<4CFA27DD.7030105@web.de>:\n>> Now we do not depend on internal implementation details of svn.\n>> And the code is 3% easier to understand :-)\n>\n> I agree on this point completely\n>\n> Acked-by: Eric Wong<normalperson@yhbt.net>\n>\n>> ---\n>>   t/t9143-git-svn-gc.sh |    2 +-\n>>   1 files changed, 1 insertions(+), 1 deletions(-)\n>>\n>> diff --git a/t/t9143-git-svn-gc.sh b/t/t9143-git-svn-gc.sh\n>> index 337ea59..8a95d78 100755\n>> --- a/t/t9143-git-svn-gc.sh\n>> +++ b/t/t9143-git-svn-gc.sh\n>> @@ -37,7 +37,7 @@ test_expect_success 'git svn gc runs' 'git svn gc'\n>>    test_expect_success 'git svn index removed' '! test -f\n>> .git/svn/refs/remotes/git-svn/index'\n>>   -if perl -MCompress::Zlib -e 0 2>/dev/null\n>> +if test -r .git/svn/refs/remotes/git-svn/unhandled.log.gz\n>>   then\n>>   \ttest_expect_success 'git svn gc produces a valid gzip file' '\n>>   \t\t gunzip .git/svn/refs/remotes/git-svn/unhandled.log.gz\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\nEric,\nthanks for the input.\nI have indeed 2 perl versions:\nfind / -xdev -name perl -type f 2>/dev/null | xargs ls -l\n-rwxr-xr-x  2 root  admin  1297824 Jan  7  2010 /opt/local/bin/perl\n-rwxr-xr-x  2 root  admin  1297824 Jan  7  2010 \n/opt/local/var/macports/software/perl5.8/5.8.9_3/opt/local/bin/perl\n-rwxr-xr-x  1 root  wheel    86000 Jun 26  2009 /usr/bin/perl\n-r--r--r--  1 root  wheel     1813 May 18  2009 /usr/share/file/magic/perl\n\n  which perl\n/opt/local/bin/perl\n\n/opt/local/bin/perl -MCompress::Zlib -e 0 ; echo $?\nCan't locate Compress/Zlib.pm in @INC (@INC contains: /sw/lib/perl5 \n/sw/lib/perl5/darwin /opt/local/lib/perl5/site_perl/5.8.9/darwin-2level \n/opt/local/lib/perl5/site_perl/5.8.9 /opt/local/lib/perl5/site_perl \n/opt/local/lib/perl5/vendor_perl/5.8.9/darwin-2level \n/opt/local/lib/perl5/vendor_perl/5.8.9 /opt/local/lib/perl5/vendor_perl \n/opt/local/lib/perl5/5.8.9/darwin-2level /opt/local/lib/perl5/5.8.9 .).\nBEGIN failed--compilation aborted.\n2\n\n\n  /usr/bin/perl -MCompress::Zlib -e 0 ; echo $?\n0\n==================\nIf you agree, I will send a V2 version of the patch, which\nwill use the following:\n---------------------------\nif test -r .git/svn/refs/remotes/git-svn/unhandled.log.gz\nthen\n\ttest_expect_success 'git svn gc produces a valid gzip file' '\n\t\t gunzip .git/svn/refs/remotes/git-svn/unhandled.log.gz\n\t\t'\nfi\n----------------\nThis will simply check if the unhandled.log.gz exist,\nand if, it will be unpacked.\nI removed the else and\n   say \"# Perl Compress::Zlib unavailable, skipping gunzip test\"\n\n/Torsten\n"},{"id":"157631","messageId":"20101208214115.GA29131@dcvr.yhbt.net","threadId":"25951","inReplyTo":"4CFFB188.6000006@gmail.com","subject":"Re: [PATCH] t9143: do not fail when unhandled.log.gz is not created","fromName":"Eric Wong","fromEmail":"normalperson@yhbt.net","sentAt":"2010-12-08T21:41:15Z","receivedAt":"2010-12-08T21:41:15Z","isPatch":true,"sender":{"key":"e@80x24.org","avatar":null},"body":"Torsten Bögershausen <totte.enea@gmail.com> wrote:\n> If you agree, I will send a V2 version of the patch, which\n> will use the following:\n> ---------------------------\n> if test -r .git/svn/refs/remotes/git-svn/unhandled.log.gz\n> then\n> \ttest_expect_success 'git svn gc produces a valid gzip file' '\n> \t\t gunzip .git/svn/refs/remotes/git-svn/unhandled.log.gz\n> \t\t'\n> fi\n\nYes, it's definitely a better test.  Thanks!\n\n-- \nEric Wong\n"}]}