rasmus                                   Tue, 21 Jul 2009 23:56:57 +0000

Revision: http://svn.php.net/viewvc?view=revision&revision=284570

Log:
Restore the the changed path check to figure out which
bug project this bug reference is for to avoid the problem
seen in http://news.php.net/php.pear.cvs/56698

Changed paths:
    U   SVNROOT/commit-bugs.php

Modified: SVNROOT/commit-bugs.php
===================================================================
--- SVNROOT/commit-bugs.php     2009-07-21 23:11:29 UTC (rev 284569)
+++ SVNROOT/commit-bugs.php     2009-07-21 23:56:57 UTC (rev 284570)
@@ -23,11 +23,19 @@
 }

 // 
-----------------------------------------------------------------------------------------------------------------------------
+// Pick the default bug project out the of the path in the first changed dir
+switch (substr(trim($commit_info['dirs_changed'][0]),4)) {
+    case 'pear': $bug_project_default = 'pear'; break;
+    case 'pecl': $bug_project_default = 'pecl'; break;
+    default:     $bug_project_default = '';
+}
+
+// 
-----------------------------------------------------------------------------------------------------------------------------
 // Process the matches
 $bug_list = array();
 foreach ($matched_bugs as $matched_bug) {
     $bug = array();
-    $bug['project'] = isset($matched_bug[1]) ? $matched_bug[1] : '';
+    $bug['project'] = isset($matched_bug[1]) ? $matched_bug[1] : 
$bug_project_default;
     $bug['number'] = intval($matched_bug[2]);
     $bugid = $bug['project'] . $bug['number'];
     $bug['url_prefix'] = isset($bug_url_prefixes[$bug['project']]) ? 
$bug_url_prefixes[$bug['project']] : $bug_url_prefixes[''];

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to