Re: [PHP-CVS] svn: / SVNROOT/commit-email.php web/php-bugs/trunk/bug.php web/php-bugs/trunk/rpc.php
On 07/21/2009 10:13 AM, Rasmus Lerdorf wrote: Jani Taskinen wrote: On 07/21/2009 09:57 AM, Rasmus Lerdorf wrote: Jani Taskinen wrote: On 07/20/2009 07:16 PM, Rasmus Lerdorf wrote: Jani Taskinen wrote: This is all nice and that crap, but since you didn't merge it into pear/packages/Bugtracker, it will all be lost once that stuff is taken into action..so please merge this there too. :D It will be merged long before Bugtracker is ready. Define "ready" ? It's already "ready", there's nothing missing in it.. From the README: === Status === - Alpha - Likely implementation date: Q4 2009 I wouldn't trust everything I read on some random README nobody has updated for ages. :D Then I suggest you guys update it and give us a status report. We aren't mind readers. pear2 (?) is gonna try it out first. We'll see if it works there and then convert current bugs.php.net to it. --Jani -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-CVS] svn: / SVNROOT/commit-email.php web/php-bugs/trunk/bug.php web/php-bugs/trunk/rpc.php
Jani Taskinen wrote: > On 07/21/2009 09:57 AM, Rasmus Lerdorf wrote: >> Jani Taskinen wrote: >>> On 07/20/2009 07:16 PM, Rasmus Lerdorf wrote: Jani Taskinen wrote: > This is all nice and that crap, but since you didn't merge it into > pear/packages/Bugtracker, it will all be lost once that stuff is taken > into action..so please merge this there too. :D It will be merged long before Bugtracker is ready. >>> Define "ready" ? It's already "ready", there's nothing missing in it.. >> >> From the README: >> >> === Status === >> >> - Alpha >> - Likely implementation date: Q4 2009 > > I wouldn't trust everything I read on some random README nobody has > updated for ages. :D Then I suggest you guys update it and give us a status report. We aren't mind readers. -Rasmus -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-CVS] svn: / SVNROOT/commit-email.php web/php-bugs/trunk/bug.php web/php-bugs/trunk/rpc.php
On 07/21/2009 09:57 AM, Rasmus Lerdorf wrote: Jani Taskinen wrote: On 07/20/2009 07:16 PM, Rasmus Lerdorf wrote: Jani Taskinen wrote: This is all nice and that crap, but since you didn't merge it into pear/packages/Bugtracker, it will all be lost once that stuff is taken into action..so please merge this there too. :D It will be merged long before Bugtracker is ready. Define "ready" ? It's already "ready", there's nothing missing in it.. From the README: === Status === - Alpha - Likely implementation date: Q4 2009 I wouldn't trust everything I read on some random README nobody has updated for ages. :D --Jani -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-CVS] svn: / SVNROOT/commit-email.php web/php-bugs/trunk/bug.php web/php-bugs/trunk/rpc.php
Jani Taskinen wrote: > On 07/20/2009 07:16 PM, Rasmus Lerdorf wrote: >> Jani Taskinen wrote: >>> This is all nice and that crap, but since you didn't merge it into >>> pear/packages/Bugtracker, it will all be lost once that stuff is taken >>> into action..so please merge this there too. :D >> >> It will be merged long before Bugtracker is ready. > > Define "ready" ? It's already "ready", there's nothing missing in it.. >From the README: === Status === - Alpha - Likely implementation date: Q4 2009 -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-CVS] svn: / SVNROOT/commit-email.php web/php-bugs/trunk/bug.php web/php-bugs/trunk/rpc.php
On 07/20/2009 07:16 PM, Rasmus Lerdorf wrote: Jani Taskinen wrote: This is all nice and that crap, but since you didn't merge it into pear/packages/Bugtracker, it will all be lost once that stuff is taken into action..so please merge this there too. :D It will be merged long before Bugtracker is ready. Define "ready" ? It's already "ready", there's nothing missing in it.. --Jani -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-CVS] svn: / SVNROOT/commit-email.php web/php-bugs/trunk/bug.php web/php-bugs/trunk/rpc.php
Jani Taskinen wrote: > This is all nice and that crap, but since you didn't merge it into > pear/packages/Bugtracker, it will all be lost once that stuff is taken > into action..so please merge this there too. :D It will be merged long before Bugtracker is ready. -Rasmus -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-CVS] svn: / SVNROOT/commit-email.php web/php-bugs/trunk/bug.php web/php-bugs/trunk/rpc.php
This is all nice and that crap, but since you didn't merge it into pear/packages/Bugtracker, it will all be lost once that stuff is taken into action..so please merge this there too. :D --Jani On 07/20/2009 12:08 AM, Rasmus Lerdorf wrote: rasmus Sun, 19 Jul 2009 21:08:22 + URL: http://svn.php.net/viewvc?view=revision&revision=284386 Changed paths: U SVNROOT/commit-email.php U web/php-bugs/trunk/bug.php A web/php-bugs/trunk/rpc.php Log: Bugs mentioned in commit messages now update the bug db and also pull the status of the bug back into the commit email. (I'm pretty sure this won't work on the first try) Modified: SVNROOT/commit-email.php === --- SVNROOT/commit-email.php2009-07-19 20:53:26 UTC (rev 284385) +++ SVNROOT/commit-email.php2009-07-19 21:08:22 UTC (rev 284386) @@ -9,6 +9,7 @@ // Constants $version = substr('$Revision$', strlen('$Revision: '), -2); $smtp_server = '127.0.0.1'; + $commit_email_list = array( // FastCGI ISAPI '|^php/fastcgi-isapi|' => array('sh...@php.net', 'w...@php.net', 'ed...@php.net'), @@ -218,8 +219,34 @@ $bugs_body = ''; if ($bugs) { +include '/home/svn/SVNROOT/secret.inc'; +$bugs_body = (count($bugs_array[1])>1) ? "Bug: " : "Bugs: "; foreach ($bugs_array[1] as $k=>$bug_id) { -$bugs_body .= ' '.$bug_urls[$k]."/$bug_id\r\n"; +$bug_sdesc = ''; +$bug_status = ''; +if($bug_urls[$k]=='http://bugs.php.net') { +$ch = curl_init('http://bugs.php.net/rpc.php'); +curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); +curl_setopt($ch, CURLOPT_POST, 1); +$ncomment = "Automatic comment from SVN on behalf of {$from[0]}\n" . +"Log: $commit_log\n" . +"Revision: http://svn.php.net/viewvc?view=revision&revision={$REV}\n";; +curl_setopt($ch, CURLOPT_POSTFIELDS, "user=" . rawurlencode($from[0]) . + "&id={$bug_id}" . + "&ncomment=" . rawurlencode($ncomment) . + "&MAGIC_COOKIE=$SVN_MAGIC_COOKIE"); +$ret = curl_exec($ch); +if($ret !== false ) { +$json = json_decode($ret,true); +if(isset($json['result']['status'])) { +$bug_status = '('.$json['result']['status']['status'].')'; +$bug_sdesc = $json['result']['status']['sdesc']; +} +} +curl_close($ch); +} +if($k) $bugs_body .= ' '; +$bugs_body .= $bug_urls[$k]."/$bug_id{$bug_status}{$bug_sdesc}\r\n"; } } @@ -229,7 +256,7 @@ "\r\n" . "{$commit_user}\t\t" . date(DATE_RFC2822, $commit_date) . "\r\n" . "\r\n" . -"URL: http://svn.php.net/viewvc?view=revision&revision={$REV}\r\n"; . +"Revision: http://svn.php.net/viewvc?view=revision&revision={$REV}\r\n"; . $bugs_body . "\r\n" . "Changed paths:\r\n" . Modified: web/php-bugs/trunk/bug.php === --- web/php-bugs/trunk/bug.php 2009-07-19 20:53:26 UTC (rev 284385) +++ web/php-bugs/trunk/bug.php 2009-07-19 21:08:22 UTC (rev 284386) @@ -124,7 +124,7 @@ if (!$errors) { $query = "INSERT INTO bugdb_comments (bug,email,ts,comment) VALUES" - . " ('$id','" . $in['commentemail'] . "',NOW(),'$ncomment')"; + . " ('$id','" . mysql_real_escape_string($in['commentemail']) . "',NOW(),'".mysql_real_escape_string($ncomment)."')"; $success = @mysql_query($query); } $from = stripslashes($in['commentemail']); @@ -160,12 +160,12 @@ if (!$errors&& !($errors = incoming_details_are_valid($in))) { /* update bug record */ - $query = "UPDATE bugdb SET sdesc='" . $in['sdesc'] . "',status='" . $in['status'] . "', bug_type='" . $in['bug_type'] . "', php_version='" . $in['php_version'] . "', php_os='" . $in['php_os'] . "', ts2=NOW(), email='$from' WHERE id=$id"; + $query = "UPDATE bugdb SET sdesc='" . mysql_real_escape_string($in['sdesc']) . "',status='" . mysql_real_escape_string($in['status']) . "', bug_type='" . mysql_real_escape_string($in['bug_type']) . "', php_version='" . mysql_real_escape_string($in['php_version']) . "', php_os='" . mysql_real_escape_string($in['php_os']) . "', ts2=NOW(), email='".mysql_real_escape_string($from)."' WHERE id=$id"; $success = @mysql_query($query); /* add comment */ if ($success&& !empty($ncomment)) { - $query = "INSERT INTO bugdb_comments (bug, email, ts, comment) VALUES ($id,'$from',NOW(),'$ncomment')"; + $query = "INSERT INTO bug