cvs: SVNROOT / commit-email.php post-commit svn_switch
[email protected] ("Gwynne Raskind") Fri, 19 Dec 2008 20:42:38 -0000
| Newsgroups | svn.migration |
|---|---|
| Message-ID | <cvsgwynne1229719358@cvsserver> |
gwynne Fri Dec 19 20:42:38 2008 UTC
Added files:
/SVNROOT svn_switch
Modified files:
/SVNROOT commit-email.php post-commit
Log:
add a switch for the SVN changeover, and change e-mail subjects based on it
http://cvs.php.net/viewvc.cgi/SVNROOT/commit-email.php?r1=1.4&r2=1.5&diff_format=u
Index: SVNROOT/commit-email.php
diff -u SVNROOT/commit-email.php:1.4 SVNROOT/commit-email.php:1.5
--- SVNROOT/commit-email.php:1.4 Fri Dec 12 04:20:25 2008
+++ SVNROOT/commit-email.php Fri Dec 19 20:42:38 2008
@@ -8,7 +8,7 @@
// -----------------------------------------------------------------------------------------------------------------------------
// Constants
-$version = substr('$Revision: 1.4 $', strlen('$Revision: '), -2);
+$version = substr('$Revision: 1.5 $', strlen('$Revision: '), -2);
$smtp_server = '127.0.0.1';
$commit_email_list = array(
// FastCGI ISAPI
@@ -132,11 +132,16 @@
// -----------------------------------------------------------------------------------------------------------------------------
// Build e-mail
+$subject = "svn: {$parent_path}";
+if (!$has_svn_switched) {
+ $subject = "[TESTING] - {$subject}";
+}
+
$msg_headers = "From: {$from}\n" .
"To: " . implode(', ', $emails_to) . "\n" .
"Message-ID: <svn{$commit_user}{$commit_date}@svn.php.net>\n" .
"Date: " . date(DATE_RFC822, $commit_date) . "\n" .
- "Subject: svn: {$parent_path}\n";
+ "Subject: {$subject}\n";
$msg_body = "{$commit_user}\t\t" . date(DATE_RFC2822, $commit_date) . "\n" .
"\n" .
http://cvs.php.net/viewvc.cgi/SVNROOT/post-commit?r1=1.1&r2=1.2&diff_format=u
Index: SVNROOT/post-commit
diff -u SVNROOT/post-commit:1.1 SVNROOT/post-commit:1.2
--- SVNROOT/post-commit:1.1 Fri Dec 12 04:20:25 2008
+++ SVNROOT/post-commit Fri Dec 19 20:42:38 2008
@@ -8,7 +8,7 @@
// -----------------------------------------------------------------------------------------------------------------------------
// Constants
-$version = substr('$Revision: 1.1 $', strlen('$Revision: '), -2);
+$version = substr('$Revision: 1.2 $', strlen('$Revision: '), -2);
// -----------------------------------------------------------------------------------------------------------------------------
// Version check
@@ -25,6 +25,9 @@
$REV = $argv[2];
// -----------------------------------------------------------------------------------------------------------------------------
+$has_svn_switched = intval(file_get_contents(__DIR__ . '/svn_switch')) ? TRUE : FALSE;
+
+// -----------------------------------------------------------------------------------------------------------------------------
// Utility
function run_svnlook($command)
{