{"thread":{"id":"37742","subject":"[PATCH] Update gitweb.perl to current CGI.pm API","startedAt":"2014-10-16T06:54:47Z","lastAt":"2014-10-16T20:18:45Z","messageCount":3,"participants":["Roland Mas","Junio C Hamano"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"250745","messageId":"87lhogzeq0.fsf@placard.fr.eu.org","threadId":"37742","inReplyTo":null,"subject":"[PATCH] Update gitweb.perl to current CGI.pm API","fromName":"Roland Mas","fromEmail":"lolando@debian.org","sentAt":"2014-10-16T06:54:47Z","receivedAt":"2014-10-16T06:54:47Z","isPatch":true,"sender":{"key":"lolando@debian.org","avatar":null},"body":"Hi all,\n\n  This simple two-line patch fixes a bug that makes gitweb unusable on\nsystems where the installed CGI.pm is version 4.04 or later (such as on\nDebian unstable).  That version removed the startform method, which had\npreviously been deprecated in favour of start_form since 2009.\n\n  I don't have any specific tests for that change, but it does help\nfixing the testsuite of FusionForge (which includes a test of its Git\nplugin, involving gitweb).\n\n  For reference, this is Debian bug #765525 (http://bugs.debian.org/765525).\n\n  (I'm not subscribed to the git@vger mailing-list; please Cc me on\nreplies.)\n\n  Thanks,\n\nRoland.\n\n>From 1b74cfb8568927a307f165e428455789398f6d61 Mon Sep 17 00:00:00 2001\nFrom: Roland Mas <lolando@debian.org>\nDate: Thu, 16 Oct 2014 00:05:25 +0200\nSubject: [PATCH] Update gitweb.perl to current CGI.pm API\n\nCGI.pm 4.04 removed the startform method, which had previously been\ndeprecated in favour of start_form.  Updated gitweb.perl accordingly.\n\nSigned-off-by: Roland Mas <lolando@debian.org>\n---\n gitweb/gitweb.perl | 4 ++--\n 1 file changed, 2 insertions(+), 2 deletions(-)\n\ndiff --git a/gitweb/gitweb.perl b/gitweb/gitweb.perl\nindex a9f57d6..ccf7516 100755\n--- a/gitweb/gitweb.perl\n+++ b/gitweb/gitweb.perl\n@@ -4100,7 +4100,7 @@ sub print_search_form {\n \tif ($use_pathinfo) {\n \t\t$action .= \"/\".esc_url($project);\n \t}\n-\tprint $cgi->startform(-method => \"get\", -action => $action) .\n+\tprint $cgi->start_form(-method => \"get\", -action => $action) .\n \t      \"<div class=\\\"search\\\">\\n\" .\n \t      (!$use_pathinfo &&\n \t      $cgi->input({-name=>\"p\", -value=>$project, -type=>\"hidden\"}) . \"\\n\") .\n@@ -5510,7 +5510,7 @@ sub git_project_search_form {\n \t}\n \n \tprint \"<div class=\\\"projsearch\\\">\\n\";\n-\tprint $cgi->startform(-method => 'get', -action => $my_uri) .\n+\tprint $cgi->start_form(-method => 'get', -action => $my_uri) .\n \t      $cgi->hidden(-name => 'a', -value => 'project_list')  . \"\\n\";\n \tprint $cgi->hidden(-name => 'pf', -value => $project_filter). \"\\n\"\n \t\tif (defined $project_filter);\n-- \n2.1.1\n"},{"id":"250766","messageId":"xmqqa94vu7qh.fsf@gitster.dls.corp.google.com","threadId":"37742","inReplyTo":"87lhogzeq0.fsf@placard.fr.eu.org","subject":"Re: [PATCH] Update gitweb.perl to current CGI.pm API","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2014-10-16T19:36:54Z","receivedAt":"2014-10-16T19:36:54Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Looks sensible to me; Jakub, ack?\n\nRoland Mas <lolando@debian.org> writes:\n\n> Hi all,\n>\n>   This simple two-line patch fixes a bug that makes gitweb unusable on\n> systems where the installed CGI.pm is version 4.04 or later (such as on\n> Debian unstable).  That version removed the startform method, which had\n> previously been deprecated in favour of start_form since 2009.\n>\n>   I don't have any specific tests for that change, but it does help\n> fixing the testsuite of FusionForge (which includes a test of its Git\n> plugin, involving gitweb).\n>\n>   For reference, this is Debian bug #765525 (http://bugs.debian.org/765525).\n>\n>   (I'm not subscribed to the git@vger mailing-list; please Cc me on\n> replies.)\n>\n>   Thanks,\n>\n> Roland.\n>\n> From 1b74cfb8568927a307f165e428455789398f6d61 Mon Sep 17 00:00:00 2001\n> From: Roland Mas <lolando@debian.org>\n> Date: Thu, 16 Oct 2014 00:05:25 +0200\n> Subject: [PATCH] Update gitweb.perl to current CGI.pm API\n>\n> CGI.pm 4.04 removed the startform method, which had previously been\n> deprecated in favour of start_form.  Updated gitweb.perl accordingly.\n>\n> Signed-off-by: Roland Mas <lolando@debian.org>\n> ---\n>  gitweb/gitweb.perl | 4 ++--\n>  1 file changed, 2 insertions(+), 2 deletions(-)\n>\n> diff --git a/gitweb/gitweb.perl b/gitweb/gitweb.perl\n> index a9f57d6..ccf7516 100755\n> --- a/gitweb/gitweb.perl\n> +++ b/gitweb/gitweb.perl\n> @@ -4100,7 +4100,7 @@ sub print_search_form {\n>  \tif ($use_pathinfo) {\n>  \t\t$action .= \"/\".esc_url($project);\n>  \t}\n> -\tprint $cgi->startform(-method => \"get\", -action => $action) .\n> +\tprint $cgi->start_form(-method => \"get\", -action => $action) .\n>  \t      \"<div class=\\\"search\\\">\\n\" .\n>  \t      (!$use_pathinfo &&\n>  \t      $cgi->input({-name=>\"p\", -value=>$project, -type=>\"hidden\"}) . \"\\n\") .\n> @@ -5510,7 +5510,7 @@ sub git_project_search_form {\n>  \t}\n>  \n>  \tprint \"<div class=\\\"projsearch\\\">\\n\";\n> -\tprint $cgi->startform(-method => 'get', -action => $my_uri) .\n> +\tprint $cgi->start_form(-method => 'get', -action => $my_uri) .\n>  \t      $cgi->hidden(-name => 'a', -value => 'project_list')  . \"\\n\";\n>  \tprint $cgi->hidden(-name => 'pf', -value => $project_filter). \"\\n\"\n>  \t\tif (defined $project_filter);\n"},{"id":"250770","messageId":"xmqq1tq7u5sq.fsf@gitster.dls.corp.google.com","threadId":"37742","inReplyTo":"CANQwDwdm6aMVC7U+nbbtS=J8M2fYOk_MECt_1=NX=pXdt06YjQ@mail.gmail.com","subject":"Re: [PATCH] Update gitweb.perl to current CGI.pm API","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2014-10-16T20:18:45Z","receivedAt":"2014-10-16T20:18:45Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Jakub Narębski <jnareb@gmail.com> writes:\n\n> On Thu, Oct 16, 2014 at 9:36 PM, Junio C Hamano <gitster@pobox.com> wrote:\n>\n>> Looks sensible to me; Jakub, ack?\n>>\n>\n> Ack.\n>\n> Nb. this code follows back to original gitweb.cgi by Kay Sievers, very\n> early in the development (2005)\n\nThanks.  I realize that Ack sounds as if \"Yeah, I acknowledge and\nadmit I was in the wrong earlier\", but I didn't mean \"I think this\nis your bug---do you think it is a good fix?\"  I just meant the\nlatter half of that sentence.\n\nHere is what I'll queue (note: I've retitled so that an entry in\n\"git shortlog\" would mean something).\n\nThanks, both.\n\n-- >8 --\nFrom: Roland Mas <lolando@debian.org>\nSubject: [PATCH] gitweb: use start_form, not startform that was removed in CGI.pm 4.04\n\nCGI.pm 4.04 removed the startform method, which had previously been\ndeprecated in favour of start_form.  Changes file for CGI.pm says:\n\n    4.04 2014-09-04\n     [ REMOVED / DEPRECATIONS ]\n\t- startform and endform methods removed (previously deprecated,\n\t  you should be using the start_form and end_form methods)\n\nSigned-off-by: Roland Mas <lolando@debian.org>\nReviewed-by: Jakub Narębski <jnareb@gmail.com>\nSigned-off-by: Junio C Hamano <gitster@pobox.com>\n---\n gitweb/gitweb.perl | 4 ++--\n 1 file changed, 2 insertions(+), 2 deletions(-)\n\ndiff --git a/gitweb/gitweb.perl b/gitweb/gitweb.perl\nindex a9f57d6..ccf7516 100755\n--- a/gitweb/gitweb.perl\n+++ b/gitweb/gitweb.perl\n@@ -4100,7 +4100,7 @@ sub print_search_form {\n \tif ($use_pathinfo) {\n \t\t$action .= \"/\".esc_url($project);\n \t}\n-\tprint $cgi->startform(-method => \"get\", -action => $action) .\n+\tprint $cgi->start_form(-method => \"get\", -action => $action) .\n \t      \"<div class=\\\"search\\\">\\n\" .\n \t      (!$use_pathinfo &&\n \t      $cgi->input({-name=>\"p\", -value=>$project, -type=>\"hidden\"}) . \"\\n\") .\n@@ -5510,7 +5510,7 @@ sub git_project_search_form {\n \t}\n \n \tprint \"<div class=\\\"projsearch\\\">\\n\";\n-\tprint $cgi->startform(-method => 'get', -action => $my_uri) .\n+\tprint $cgi->start_form(-method => 'get', -action => $my_uri) .\n \t      $cgi->hidden(-name => 'a', -value => 'project_list')  . \"\\n\";\n \tprint $cgi->hidden(-name => 'pf', -value => $project_filter). \"\\n\"\n \t\tif (defined $project_filter);\n-- \n2.1.2-561-gc401a55\n"}]}