cvs: SVNROOT / run-conversion.php
| From: | Gwynne Raskind | Date: | Mon, 06 Jul 2009 21:21:05 +0000 |
| Subject: | cvs: SVNROOT / run-conversion.php | ||
| Groups: | svn.migration | ||
| Request: | Send a blank email to svn-migration+get-385@lists.php.net to get a copy of this message | ||
gwynne Mon Jul 6 21:21:05 2009 UTC
Modified files:
/SVNROOT run-conversion.php
Log:
fix pathname for SVNROOT co and force executable on the hooks
http://cvs.php.net/viewvc.cgi/SVNROOT/run-conversion.php?r1=1.66&r2=1.67&diff_format=u
Index: SVNROOT/run-conversion.php
diff -u SVNROOT/run-conversion.php:1.66 SVNROOT/run-conversion.php:1.67
--- SVNROOT/run-conversion.php:1.66 Fri Jul 3 06:52:55 2009
+++ SVNROOT/run-conversion.php Mon Jul 6 21:21:05 2009
@@ -7,7 +7,7 @@
//
-----------------------------------------------------------------------------------------------------------------------------
// Constants
-$version = substr('$Revision: 1.66 $', strlen('$Revision: '), -2);
+$version = substr('$Revision: 1.67 $', strlen('$Revision: '), -2);
$passes = array(
'svncreate', // Create various SVN repositories
@@ -454,19 +454,32 @@
$svnPath = $GLOBALS['options']['svnroot'];
v(2, "Checking out SVNROOT...\n");
- run_command("svn checkout " .
escapeshellarg("file://{$GLOBALS['options']['svnroot']}/SVNROOT/trunk")
. ' ' . escapeshellarg("{$svnPath}/SVNROOT"));
+ run_command("svn checkout " .
escapeshellarg("file://{$GLOBALS['options']['svnroot']}/repository/SVNROOT/trunk")
. ' ' . escapeshellarg("{$svnPath}/SVNROOT"));
v(2, "Installing start-commit hook...\n");
@unlink("{$svnPath}/repository/hooks/start-commit");
symlink("{$svnPath}/SVNROOT/start-commit",
"{$svnPath}/repository/hooks/start-commit");
+ if (!is_executable("{$svnPath}/SVNROOT/start-commit")) {
+ run_command("svn propset svn:executable 1 " .
escapeshellarg("{$svnPath}/SVNROOT/start-commit"));
+ }
v(2, "Installing pre-commit hook...\n");
@unlink("{$svnPath}/repository/hooks/pre-commit");
symlink("{$svnPath}/SVNROOT/pre-commit",
"{$svnPath}/repository/hooks/pre-commit");
+ if (!is_executable("{$svnPath}/SVNROOT/pre-commit")) {
+ run_command("svn propset svn:executable 1 " .
escapeshellarg("{$svnPath}/SVNROOT/pre-commit"));
+ }
v(2, "Installing post-commit hook...\n");
@unlink("{$svnPath}/repository/hooks/post-commit");
symlink("{$svnPath}/SVNROOT/post-commit",
"{$svnPath}/repository/hooks/post-commit");
+ if (!is_executable("{$svnPath}/SVNROOT/post-commit")) {
+ run_command("svn propset svn:executable 1 " .
escaleshellarg("{$svnPath}/SVNROOT/post-commit"));
+ }
+
+ if (trim(implode("\n", run_command("svn status " .
escapeshellarg("{$svnPath}/SVNROOT")))) !== "") {
+ run_command("svn commit -m 'setting svn:executable for hooks' " .
escapeshellarg("{$svnPath}/SVNROOT"));
+ }
v(1, "Done installing global administrative files.\n");
}