DevHeads.net

svn: /web/php-rmtools/trunk/client/ include/Branch.php include/Tools.php script/snap.php

pajoye Tue, 26 Apr 2011 15:22:46 +0000

Revision: <a href="http://svn.php.net/viewvc?view=revision&amp;revision=310520" title="http://svn.php.net/viewvc?view=revision&amp;revision=310520">http://svn.php.net/viewvc?view=revision&amp;revision=310520</a>

Log:
- fix revisions in mail notification and add previous to stdout log

Changed paths:
U web/php-rmtools/trunk/client/include/Branch.php
U web/php-rmtools/trunk/client/include/Tools.php
U web/php-rmtools/trunk/client/script/snap.php

Modified: web/php-rmtools/trunk/client/include/Branch.php
===================================================================
--- web/php-rmtools/trunk/client/include/Branch.php 2011-04-26 15:07:30 UTC (rev 310519)
+++ web/php-rmtools/trunk/client/include/Branch.php 2011-04-26 15:22:46 UTC (rev 310520)
@@ -99,6 +99,13 @@
}
return $this->data->revision_last;
}
+ public function getPreviousRevision()
+ {
+ if (!$this->data->revision_previous) {
+ $this->update();
+ }
+ return $this->data->revision_previous;
+ }

function getBuildList($platform)
{

Modified: web/php-rmtools/trunk/client/include/Tools.php
===================================================================
--- web/php-rmtools/trunk/client/include/Tools.php 2011-04-26 15:07:30 UTC (rev 310519)
+++ web/php-rmtools/trunk/client/include/Tools.php 2011-04-26 15:22:46 UTC (rev 310520)
@@ -192,8 +192,8 @@
$errors = '';
$params = NULL;
$headers = 'From: ... at php dot net' . "\r\n" .
- 'Reply-To: ... at php dot net' . "\r\n" .
- 'X-Mailer: rmtools/php.net';
+ 'Reply-To: ... at php dot net' . "\r\n" .
+ 'X-Mailer: rmtools/php.net';

foreach ($build_entries as $build_name => $entries) {
$errors .= 'Build ' . $build_name . ":\n";

Modified: web/php-rmtools/trunk/client/script/snap.php
===================================================================
--- web/php-rmtools/trunk/client/script/snap.php 2011-04-26 15:07:30 UTC (rev 310519)
+++ web/php-rmtools/trunk/client/script/snap.php 2011-04-26 15:22:46 UTC (rev 310520)
@@ -22,7 +22,8 @@
$branch_name_short = $branch->config->getBranch();

echo "Running <$config_path>\n";
-echo " \t$branch_name\n";
+echo "\t$branch_name\n";
+echo "\tprevious revision was: " . $branch->getPreviousRevision() . "\n";

if ($force || $branch->hasNewRevision()) {
$last_rev = $branch->getLastRevisionId();
@@ -111,7 +112,7 @@
$json = json_encode($json_data);
file_put_contents($toupload_dir . '/' . $json_filename, $json);

- rm\upload_build_result_ftp_curl($toupload_dir, $branch_name . '/r' . $last_rev);
+ //rm\upload_build_result_ftp_curl($toupload_dir, $branch_name . '/r' . $last_rev);
$build->clean();
rmdir($build_src_path);
}
@@ -123,7 +124,7 @@
}

if ($has_build_errors) {
- rm\send_error_notification($build_errors, $prev_revision, $current_revision, 'http://windows.php.net/downloads/snaps/' . $branch_name . '/r' . $last_rev);
+ rm\send_error_notification($build_errors, $branch->getPreviousRevision(), $last_rev, 'http://windows.php.net/downloads/snaps/' . $branch_name . '/r' . $last_rev);
}

echo "Done.\n";