gwynne Thu, 23 Jul 2009 17:06:43 +0000
Revision: http://svn.php.net/viewvc?view=revision&revision=284661
Log:
fix the issue with non-confluent parent paths (multi-project commits)
Changed paths:
U SVNROOT/commit-email.php
Modified: SVNROOT/commit-email.php
===================================================================
--- SVNROOT/commit-email.php 2009-07-23 17:04:24 UTC (rev 284660)
+++ SVNROOT/commit-email.php 2009-07-23 17:06:43 UTC (rev 284661)
@@ -118,7 +118,7 @@
//
-----------------------------------------------------------------------------------------------------------------------------
// Build list of e-mail addresses and parent changed path
$emails_to = array();
-$parent_path = $commit_info['dirs_changed'][0];
+$parent_path = '/' . $commit_info['dirs_changed'][0];
foreach ($commit_info['dirs_changed'] as $changed_path) {
foreach ($commit_email_list as $regex => $email_list) {
@@ -127,12 +127,13 @@
break;
}
}
- if ($changed_path === '/') {
- $parent_path = '';
- } else {
- $parent_path = common_prefix($parent_path, $changed_path);
- }
+ $parent_path = common_prefix($parent_path, '/' . ($changed_path === '/' ?
'' : $changed_path));
}
+$parent_path = dirname($parent_path . '~');
+if ($parent_path !== '/') {
+ $parent_path .= '/';
+}
+
if (count($emails_to) === 0) {
$emails_to = $fallback_addresses;
}
@@ -162,11 +163,11 @@
//
-----------------------------------------------------------------------------------------------------------------------------
// Process changed paths
-$paths_list = $parent_path === '' ? '/' : $parent_path;
+$paths_list = $parent_path;
foreach ($commit_info['changed_paths'] as $changed_path) {
$changed_path = trim(strstr($changed_path, ' '));
if (substr($changed_path, -1) !== '/') {
- $paths_list .= ' ' . substr($changed_path, strlen($parent_path));
+ $paths_list .= ' ' . substr($changed_path, strlen($parent_path) - 1);
}
}
--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php