cvs: SVNROOT / post-commit pre-commit start-commit
[email protected] ("Gwynne Raskind") Fri, 19 Dec 2008 22:40:16 -0000
| Newsgroups | svn.migration |
|---|---|
| Message-ID | <cvsgwynne1229726416@cvsserver> |
gwynne Fri Dec 19 22:40:16 2008 UTC
Modified files:
/SVNROOT start-commit pre-commit post-commit
Log:
don't assume __DIR__ exists when it doesn't
http://cvs.php.net/viewvc.cgi/SVNROOT/start-commit?r1=1.1&r2=1.2&diff_format=u
Index: SVNROOT/start-commit
diff -u SVNROOT/start-commit:1.1 SVNROOT/start-commit:1.2
--- SVNROOT/start-commit:1.1 Mon Dec 15 20:43:31 2008
+++ SVNROOT/start-commit Fri Dec 19 22:40:16 2008
@@ -8,7 +8,7 @@
// -----------------------------------------------------------------------------------------------------------------------------
// Constants
-$version = substr('$Revision: 1.1 $', strlen('$Revision: '), -2);
+$version = substr('$Revision: 1.2 $', strlen('$Revision: '), -2);
// -----------------------------------------------------------------------------------------------------------------------------
// Version check
@@ -33,7 +33,7 @@
// -----------------------------------------------------------------------------------------------------------------------------
// Does the user exist?
-$userfile = file(__DIR__ . '/users.db');
+$userfile = file(dirname(__FILE__) . '/users.db');
$userexists = FALSE;
foreach ($userfile as $userinfo) {
list($username, $realm, $md5) = explode(':', $userinfo, 3);
http://cvs.php.net/viewvc.cgi/SVNROOT/pre-commit?r1=1.2&r2=1.3&diff_format=u
Index: SVNROOT/pre-commit
diff -u SVNROOT/pre-commit:1.2 SVNROOT/pre-commit:1.3
--- SVNROOT/pre-commit:1.2 Tue Dec 16 05:43:43 2008
+++ SVNROOT/pre-commit Fri Dec 19 22:40:16 2008
@@ -8,7 +8,7 @@
// -----------------------------------------------------------------------------------------------------------------------------
// Constants
-$version = substr('$Revision: 1.2 $', strlen('$Revision: '), -2);
+$version = substr('$Revision: 1.3 $', strlen('$Revision: '), -2);
// -----------------------------------------------------------------------------------------------------------------------------
// Version check
@@ -78,9 +78,9 @@
// -----------------------------------------------------------------------------------------------------------------------------
// Read avail database
if (pattern_matches_commit('*pear*')) {
- $avail_db = __DIR__ . '/pear_avail';
+ $avail_db = dirname(__FILE__) . '/pear_avail';
} else {
- $avail_db = __DIR__ . '/global_avail';
+ $avail_db = dirname(__FILE__) . '/global_avail';
}
$avail_lines = file($avail_db);
http://cvs.php.net/viewvc.cgi/SVNROOT/post-commit?r1=1.2&r2=1.3&diff_format=u
Index: SVNROOT/post-commit
diff -u SVNROOT/post-commit:1.2 SVNROOT/post-commit:1.3
--- SVNROOT/post-commit:1.2 Fri Dec 19 20:42:38 2008
+++ SVNROOT/post-commit Fri Dec 19 22:40:16 2008
@@ -8,7 +8,7 @@
// -----------------------------------------------------------------------------------------------------------------------------
// Constants
-$version = substr('$Revision: 1.2 $', strlen('$Revision: '), -2);
+$version = substr('$Revision: 1.3 $', strlen('$Revision: '), -2);
// -----------------------------------------------------------------------------------------------------------------------------
// Version check
@@ -25,7 +25,7 @@
$REV = $argv[2];
// -----------------------------------------------------------------------------------------------------------------------------
-$has_svn_switched = intval(file_get_contents(__DIR__ . '/svn_switch')) ? TRUE : FALSE;
+$has_svn_switched = intval(file_get_contents(dirname(__FILE__) . '/svn_switch')) ? TRUE : FALSE;
// -----------------------------------------------------------------------------------------------------------------------------
// Utility
@@ -62,7 +62,7 @@
if (isset($_ENV['DEBUG']) && $_ENV['DEBUG'] == 'DEBUG') {
print "Updating SVNROOT...\n";
}
- chdir(__DIR__);
+ chdir(dirname(__FILE__));
exec('exec svn update', $output, $status);
print implode("\n", $output) . "\n";
if ($status != 0) {