gwynne          Mon Nov 10 02:49:08 2008 UTC

  Modified files:              
    /SVNROOT    run-conversion.php 
  Log:
  One propset per tag/branch, not per tag/branch per ext. sheesh.
  
http://cvs.php.net/viewvc.cgi/SVNROOT/run-conversion.php?r1=1.37&r2=1.38&diff_format=u
Index: SVNROOT/run-conversion.php
diff -u SVNROOT/run-conversion.php:1.37 SVNROOT/run-conversion.php:1.38
--- SVNROOT/run-conversion.php:1.37     Mon Nov 10 02:21:48 2008
+++ SVNROOT/run-conversion.php  Mon Nov 10 02:49:08 2008
@@ -7,7 +7,7 @@
 
 // 
-----------------------------------------------------------------------------------------------------------------------------
 // Constants
-$version = substr('$Revision: 1.37 $', strlen('$Revision: '), -2);
+$version = substr('$Revision: 1.38 $', strlen('$Revision: '), -2);
 
 $passes = array(
     'processcvs',       // Process CVS modules
@@ -525,13 +525,6 @@
 
 // 
-----------------------------------------------------------------------------------------------------------------------------
 // link pass
-function append_prop_line($path, $value)
-{
-    $oldValue = implode("\n", run_command('exec svn propget svn:externals ' . 
escapeshellarg($path)));
-    $oldValue .= "{$value}\n";
-    run_command('exec svn propset svn:externals ' . escapeshellarg($oldValue) 
. ' ' . escapeshellarg($path));
-}
-
 function pass_link()
 {
     $rawTagList = run_command('exec svn ls file:///' . 
escapeshellarg($GLOBALS['options']['svnroot'] . '/php-src/php-src/tags'));
@@ -572,18 +565,26 @@
         $info = lstat($GLOBALS['options']['cvsroot'] . DIRECTORY_SEPARATOR . 
'php-src' . DIRECTORY_SEPARATOR . 'ext' . DIRECTORY_SEPARATOR . $link);
         $createDate = $info['ctime'];
         foreach ($tagList as $tag => $tagDate) {
+            $path = 'tags' . DIRECTORY_SEPARATOR . $tag . DIRECTORY_SEPARATOR 
. 'ext';
             if ($createDate <= $tagDate) {
-                append_prop_line('tags' . DIRECTORY_SEPARATOR . $tag . 
DIRECTORY_SEPARATOR . 'ext', "^/pecl/{$link}/tags/{$tag} {$link}");
+                $props[$path] = (isset($props[$path]) ? $props[$path] : '') . 
"^/pecl/{$link}/tags/{$tag} {$link}";
             }
         }
         foreach ($branchList as $branch => $branchDate) {
+            $path = 'branches' . DIRECTORY_SEPARATOR . $branch . 
DIRECTORY_SEPARATOR . 'ext';
             if ($createDate <= $branchDate) {
-                append_prop_line('branches' . DIRECTORY_SEPARATOR . $branch . 
DIRECTORY_SEPARATOR . 'ext', "^/pecl/{$link}/branches/{$branch} {$link}");
+                $props[$path] = (isset($props[$path]) ? $props[$path] : '') . 
"^/pecl/{$link}/branches/{$branch} {$link}";
             }
         }
-        append_prop_line('trunk' . DIRECTORY_SEPARATOR . 'ext', 
"^/pecl/{$link}/trunk {$link}");
+        $path = 'trunk' . DIRECTORY_SEPARATOR . 'ext';
+        $props[$path] = (isset($props[$path]) ? $props[$path] : '') . 
"^/pecl/{$link}/trunk {$link}";
     }
-    
+
+    foreach ($props as $path => $value) {
+        run_command('exec svn propset svn:externals ' . escapeshellarg($value) 
. ' ' . escapeshellarg($path));
+    }
+    //run_command('exec svn commit -m "[SVN CONVERSION] Reorganization in 
repository php-src."');
+
     chdir($oldcwd);
 }
 



-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to