rasmus Sun, 19 Jul 2009 17:13:35 +0000 URL: http://svn.php.net/viewvc?view=revision&revision=284381 http://bugs.php.net/1234 http://bugs.php.net/1234
Changed paths: U SVNROOT/commit-email.php Log: Support for "pecl bug 1234" and "pear bug 1234" which is only really needed if referencing a pecl/pear bug when committing to php-src or vice-versa. Otherwise it will pick up the bug type from the commit path. Modified: SVNROOT/commit-email.php =================================================================== --- SVNROOT/commit-email.php 2009-07-19 17:02:03 UTC (rev 284380) +++ SVNROOT/commit-email.php 2009-07-19 17:13:35 UTC (rev 284381) @@ -123,6 +123,7 @@ $commit_log = implode("\n", array_slice($commit_info, 3)); // Support bug#1234 bug url extraction $bugs = preg_match_all("/(?:bug|#)[\\s#:]*([0-9]+)/i", $commit_log, $bugs_array); +$bugs = preg_match_all("/(?:pecl|pear|)\\s*(?:bug|#)[\\s#:]*([0-9]+)/i", $commit_log, $bugs_array); // ----------------------------------------------------------------------------------------------------------------------------- // Determine "from" address @@ -189,6 +190,14 @@ case 'pecl': $bug_url = 'http://pecl.php.net/bugs'; break; default: $bug_url = 'http://bugs.php.net'; break; } + +foreach($bugs_array[0] as $k=>$bug_match) { + if(stristr($bug_match,'pecl')) $bug_urls[$k] = 'http://pecl.php.net/bugs'; + else if(stristr($bug_match,'pear')) $bug_urls[$k] = 'http://pear.php.net/bugs'; + else $bug_urls[$k] = $bug_url; + +} + foreach ($changed_paths as $changed_path) { $changed_path = trim(strstr($changed_path, ' ')); if (substr($changed_path, -1) !== '/') { @@ -209,8 +218,8 @@ $bugs_body = ''; if ($bugs) { - foreach ($bugs_array[1] as $bug_id) { - $bugs_body .= " $bug_url/$bug_id\r\n"; + foreach ($bugs_array[1] as $k=>$bug_id) { + $bugs_body .= ' '.$bug_urls[$k]."/$bug_id\r\n"; } }
-- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php