Re: [PHP-CVS] cvs: SVNROOT / run-conversion.php

2008-11-10 Thread Hannes Magnusson
On Mon, Nov 10, 2008 at 09:50, Antony Dovgal <[EMAIL PROTECTED]> wrote:
> On 24.10.2008 06:45, Gwynne Raskind wrote:
>> gwynneFri Oct 24 02:45:27 2008 UTC
>>
>>   Added files:
>> /SVNROOT  run-conversion.php
>>   Log:
>>   initial version of conversion script
>
> Uhm, could you stop these micro-commits please?
> It's starting to overcrowd the CVS log.

These commits should probably go to svn-migration@, not php-cvs@

-Hannes

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



Re: [PHP-CVS] cvs: SVNROOT / run-conversion.php

2008-11-10 Thread Antony Dovgal
On 24.10.2008 06:45, Gwynne Raskind wrote:
> gwynneFri Oct 24 02:45:27 2008 UTC
> 
>   Added files: 
> /SVNROOT  run-conversion.php 
>   Log:
>   initial version of conversion script

Uhm, could you stop these micro-commits please?
It's starting to overcrowd the CVS log.

-- 
Wbr, 
Antony Dovgal

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



[PHP-CVS] cvs: SVNROOT / run-conversion.php

2008-11-09 Thread Gwynne Raskind
gwynne  Mon Nov 10 04:37:49 2008 UTC

  Modified files:  
/SVNROOTrun-conversion.php 
  Log:
  ircg doesn't seem to exist
  
http://cvs.php.net/viewvc.cgi/SVNROOT/run-conversion.php?r1=1.40&r2=1.41&diff_format=u
Index: SVNROOT/run-conversion.php
diff -u SVNROOT/run-conversion.php:1.40 SVNROOT/run-conversion.php:1.41
--- SVNROOT/run-conversion.php:1.40 Mon Nov 10 02:56:02 2008
+++ SVNROOT/run-conversion.php  Mon Nov 10 04:37:49 2008
@@ -7,7 +7,7 @@
 
 // 
-
 // Constants
-$version = substr('$Revision: 1.40 $', strlen('$Revision: '), -2);
+$version = substr('$Revision: 1.41 $', strlen('$Revision: '), -2);
 
 $passes = array(
 'processcvs',   // Process CVS modules
@@ -557,7 +557,7 @@
 run_command('exec svn propdel svn:externals ' . escapeshellarg('trunk' . 
DIRECTORY_SEPARATOR . 'ext') . ' 2>&1');
 
 $links = array('bz2', 'hash', 'oci8', 'pdo', 'pdo_dblib', 'pdo_firebird', 
'spl', 'soap', 'sqlite', 'tidy', 'xmlreader', 'xmlwriter', 'filter', 'json',
-'ircg', 'pdo_mysql', 'pdo_oci', 'pdo_odbc', 'pdo_pgsql', 'pdo_sqlite', 
'simplexml', 'fileinfo');
+'pdo_mysql', 'pdo_oci', 'pdo_odbc', 'pdo_pgsql', 'pdo_sqlite', 
'simplexml', 'fileinfo');
 
 $props = array();
 



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



[PHP-CVS] cvs: SVNROOT / run-conversion.php

2008-11-09 Thread Gwynne Raskind
gwynne  Mon Nov 10 02:56:02 2008 UTC

  Modified files:  
/SVNROOTrun-conversion.php 
  Log:
  Enable the commit
  
http://cvs.php.net/viewvc.cgi/SVNROOT/run-conversion.php?r1=1.39&r2=1.40&diff_format=u
Index: SVNROOT/run-conversion.php
diff -u SVNROOT/run-conversion.php:1.39 SVNROOT/run-conversion.php:1.40
--- SVNROOT/run-conversion.php:1.39 Mon Nov 10 02:53:44 2008
+++ SVNROOT/run-conversion.php  Mon Nov 10 02:56:02 2008
@@ -7,7 +7,7 @@
 
 // 
-
 // Constants
-$version = substr('$Revision: 1.39 $', strlen('$Revision: '), -2);
+$version = substr('$Revision: 1.40 $', strlen('$Revision: '), -2);
 
 $passes = array(
 'processcvs',   // Process CVS modules
@@ -583,8 +583,8 @@
 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."');
-
+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



[PHP-CVS] cvs: SVNROOT / run-conversion.php

2008-11-09 Thread Gwynne Raskind
gwynne  Mon Nov 10 02:53:44 2008 UTC

  Modified files:  
/SVNROOTrun-conversion.php 
  Log:
  Newlines. Not oldlines, but newlines\!
  
http://cvs.php.net/viewvc.cgi/SVNROOT/run-conversion.php?r1=1.38&r2=1.39&diff_format=u
Index: SVNROOT/run-conversion.php
diff -u SVNROOT/run-conversion.php:1.38 SVNROOT/run-conversion.php:1.39
--- SVNROOT/run-conversion.php:1.38 Mon Nov 10 02:49:08 2008
+++ SVNROOT/run-conversion.php  Mon Nov 10 02:53:44 2008
@@ -7,7 +7,7 @@
 
 // 
-
 // Constants
-$version = substr('$Revision: 1.38 $', strlen('$Revision: '), -2);
+$version = substr('$Revision: 1.39 $', strlen('$Revision: '), -2);
 
 $passes = array(
 'processcvs',   // Process CVS modules
@@ -567,17 +567,17 @@
 foreach ($tagList as $tag => $tagDate) {
 $path = 'tags' . DIRECTORY_SEPARATOR . $tag . DIRECTORY_SEPARATOR 
. 'ext';
 if ($createDate <= $tagDate) {
-$props[$path] = (isset($props[$path]) ? $props[$path] : '') . 
"^/pecl/{$link}/tags/{$tag} {$link}";
+$props[$path] = (isset($props[$path]) ? $props[$path] : '') . 
"^/pecl/{$link}/tags/{$tag} {$link}\n";
 }
 }
 foreach ($branchList as $branch => $branchDate) {
 $path = 'branches' . DIRECTORY_SEPARATOR . $branch . 
DIRECTORY_SEPARATOR . 'ext';
 if ($createDate <= $branchDate) {
-$props[$path] = (isset($props[$path]) ? $props[$path] : '') . 
"^/pecl/{$link}/branches/{$branch} {$link}";
+$props[$path] = (isset($props[$path]) ? $props[$path] : '') . 
"^/pecl/{$link}/branches/{$branch} {$link}\n";
 }
 }
 $path = 'trunk' . DIRECTORY_SEPARATOR . 'ext';
-$props[$path] = (isset($props[$path]) ? $props[$path] : '') . 
"^/pecl/{$link}/trunk {$link}";
+$props[$path] = (isset($props[$path]) ? $props[$path] : '') . 
"^/pecl/{$link}/trunk {$link}\n";
 }
 
 foreach ($props as $path => $value) {



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



[PHP-CVS] cvs: SVNROOT / run-conversion.php

2008-11-09 Thread Gwynne Raskind
gwynne  Mon Nov 10 02:49:08 2008 UTC

  Modified files:  
/SVNROOTrun-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



[PHP-CVS] cvs: SVNROOT / run-conversion.php

2008-11-09 Thread Gwynne Raskind
gwynne  Mon Nov 10 02:21:48 2008 UTC

  Modified files:  
/SVNROOTrun-conversion.php 
  Log:
  parse the date correctly for mercy's sake
  
http://cvs.php.net/viewvc.cgi/SVNROOT/run-conversion.php?r1=1.36&r2=1.37&diff_format=u
Index: SVNROOT/run-conversion.php
diff -u SVNROOT/run-conversion.php:1.36 SVNROOT/run-conversion.php:1.37
--- SVNROOT/run-conversion.php:1.36 Mon Nov 10 02:12:52 2008
+++ SVNROOT/run-conversion.php  Mon Nov 10 02:21:48 2008
@@ -7,7 +7,7 @@
 
 // 
-
 // Constants
-$version = substr('$Revision: 1.36 $', strlen('$Revision: '), -2);
+$version = substr('$Revision: 1.37 $', strlen('$Revision: '), -2);
 
 $passes = array(
 'processcvs',   // Process CVS modules
@@ -551,14 +551,14 @@
 $realTag = substr($tag, 0, -1);
 $xml = run_command('exec svn info --xml file:///' . 
escapeshellarg($GLOBALS['options']['svnroot'] . '/php-src/php-src/tags/' . 
$realTag));
 $xml = implode("\n", $xml);
-$tagList[$realTag] = strtotime(substr($xml, strpos($xml, '') + 
6, strpos($xml, '')));
+$tagList[$realTag] = strtotime(substr($xml, strpos($xml, '') + 
6, strlen('-00-00T00:00:00.00Z')));
 run_command('exec svn propdel svn:externals ' . escapeshellarg('tags' 
. DIRECTORY_SEPARATOR . $realTag . DIRECTORY_SEPARATOR . 'ext') . ' 2>&1');
 }
 foreach ($rawBranchList as $branch) {
 $realBranch = substr($branch, 0, -1);
 $xml = run_command('exec svn info --xml file:///' . 
escapeshellarg($GLOBALS['options']['svnroot'] . '/php-src/php-src/branches/' . 
$realBranch));
 $xml = implode("\n", $xml);
-$branchList[$realBranch] = strtotime(substr($xml, strpos($xml, 
'') + 6, strpos($xml, '')));
+$branchList[$realBranch] = strtotime(substr($xml, strpos($xml, 
'') + 6, strlen('-00-00T00:00:00.00Z')));
 run_command('exec svn propdel svn:externals ' . 
escapeshellarg('branches' . DIRECTORY_SEPARATOR . $realBranch . 
DIRECTORY_SEPARATOR . 'ext') . ' 2>&1');
 }
 run_command('exec svn propdel svn:externals ' . escapeshellarg('trunk' . 
DIRECTORY_SEPARATOR . 'ext') . ' 2>&1');



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



[PHP-CVS] cvs: SVNROOT / run-conversion.php

2008-11-09 Thread Gwynne Raskind
gwynne  Mon Nov 10 02:12:52 2008 UTC

  Modified files:  
/SVNROOTrun-conversion.php 
  Log:
  if only I could type
  
http://cvs.php.net/viewvc.cgi/SVNROOT/run-conversion.php?r1=1.35&r2=1.36&diff_format=u
Index: SVNROOT/run-conversion.php
diff -u SVNROOT/run-conversion.php:1.35 SVNROOT/run-conversion.php:1.36
--- SVNROOT/run-conversion.php:1.35 Mon Nov 10 02:11:15 2008
+++ SVNROOT/run-conversion.php  Mon Nov 10 02:12:52 2008
@@ -7,7 +7,7 @@
 
 // 
-
 // Constants
-$version = substr('$Revision: 1.35 $', strlen('$Revision: '), -2);
+$version = substr('$Revision: 1.36 $', strlen('$Revision: '), -2);
 
 $passes = array(
 'processcvs',   // Process CVS modules
@@ -552,16 +552,16 @@
 $xml = run_command('exec svn info --xml file:///' . 
escapeshellarg($GLOBALS['options']['svnroot'] . '/php-src/php-src/tags/' . 
$realTag));
 $xml = implode("\n", $xml);
 $tagList[$realTag] = strtotime(substr($xml, strpos($xml, '') + 
6, strpos($xml, '')));
-run_command('exec svn propdel svn:externals ' . escapeshellarg('tags' 
. DIRECTORY_SEPARATOR . $realTag . DIRECTORY_SEPARATOR . 'ext') . '2>&1');
+run_command('exec svn propdel svn:externals ' . escapeshellarg('tags' 
. DIRECTORY_SEPARATOR . $realTag . DIRECTORY_SEPARATOR . 'ext') . ' 2>&1');
 }
 foreach ($rawBranchList as $branch) {
 $realBranch = substr($branch, 0, -1);
 $xml = run_command('exec svn info --xml file:///' . 
escapeshellarg($GLOBALS['options']['svnroot'] . '/php-src/php-src/branches/' . 
$realBranch));
 $xml = implode("\n", $xml);
 $branchList[$realBranch] = strtotime(substr($xml, strpos($xml, 
'') + 6, strpos($xml, '')));
-run_command('exec svn propdel svn:externals ' . 
escapeshellarg('branches' . DIRECTORY_SEPARATOR . $realBranch . 
DIRECTORY_SEPARATOR . 'ext') . '2>&1');
+run_command('exec svn propdel svn:externals ' . 
escapeshellarg('branches' . DIRECTORY_SEPARATOR . $realBranch . 
DIRECTORY_SEPARATOR . 'ext') . ' 2>&1');
 }
-run_command('exec svn propdel svn:externals ' . escapeshellarg('trunk' . 
DIRECTORY_SEPARATOR . 'ext') . '2>&1');
+run_command('exec svn propdel svn:externals ' . escapeshellarg('trunk' . 
DIRECTORY_SEPARATOR . 'ext') . ' 2>&1');
 
 $links = array('bz2', 'hash', 'oci8', 'pdo', 'pdo_dblib', 'pdo_firebird', 
'spl', 'soap', 'sqlite', 'tidy', 'xmlreader', 'xmlwriter', 'filter', 'json',
 'ircg', 'pdo_mysql', 'pdo_oci', 'pdo_odbc', 'pdo_pgsql', 'pdo_sqlite', 
'simplexml', 'fileinfo');



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



[PHP-CVS] cvs: SVNROOT / run-conversion.php

2008-11-09 Thread Gwynne Raskind
gwynne  Mon Nov 10 02:11:15 2008 UTC

  Modified files:  
/SVNROOTrun-conversion.php 
  Log:
  too many newlines... and silence those propdels\!
  
http://cvs.php.net/viewvc.cgi/SVNROOT/run-conversion.php?r1=1.34&r2=1.35&diff_format=u
Index: SVNROOT/run-conversion.php
diff -u SVNROOT/run-conversion.php:1.34 SVNROOT/run-conversion.php:1.35
--- SVNROOT/run-conversion.php:1.34 Mon Nov 10 02:00:00 2008
+++ SVNROOT/run-conversion.php  Mon Nov 10 02:11:15 2008
@@ -7,7 +7,7 @@
 
 // 
-
 // Constants
-$version = substr('$Revision: 1.34 $', strlen('$Revision: '), -2);
+$version = substr('$Revision: 1.35 $', strlen('$Revision: '), -2);
 
 $passes = array(
 'processcvs',   // Process CVS modules
@@ -528,7 +528,7 @@
 function append_prop_line($path, $value)
 {
 $oldValue = implode("\n", run_command('exec svn propget svn:externals ' . 
escapeshellarg($path)));
-$oldValue .= "\n{$value}\n";
+$oldValue .= "{$value}\n";
 run_command('exec svn propset svn:externals ' . escapeshellarg($oldValue) 
. ' ' . escapeshellarg($path));
 }
 
@@ -552,16 +552,16 @@
 $xml = run_command('exec svn info --xml file:///' . 
escapeshellarg($GLOBALS['options']['svnroot'] . '/php-src/php-src/tags/' . 
$realTag));
 $xml = implode("\n", $xml);
 $tagList[$realTag] = strtotime(substr($xml, strpos($xml, '') + 
6, strpos($xml, '')));
-run_command('exec svn propdel svn:externals ' . escapeshellarg('tags' 
. DIRECTORY_SEPARATOR . $realTag . DIRECTORY_SEPARATOR . 'ext'));
+run_command('exec svn propdel svn:externals ' . escapeshellarg('tags' 
. DIRECTORY_SEPARATOR . $realTag . DIRECTORY_SEPARATOR . 'ext') . '2>&1');
 }
 foreach ($rawBranchList as $branch) {
 $realBranch = substr($branch, 0, -1);
 $xml = run_command('exec svn info --xml file:///' . 
escapeshellarg($GLOBALS['options']['svnroot'] . '/php-src/php-src/branches/' . 
$realBranch));
 $xml = implode("\n", $xml);
 $branchList[$realBranch] = strtotime(substr($xml, strpos($xml, 
'') + 6, strpos($xml, '')));
-run_command('exec svn propdel svn:externals ' . 
escapeshellarg('branches' . DIRECTORY_SEPARATOR . $realBranch . 
DIRECTORY_SEPARATOR . 'ext'));
+run_command('exec svn propdel svn:externals ' . 
escapeshellarg('branches' . DIRECTORY_SEPARATOR . $realBranch . 
DIRECTORY_SEPARATOR . 'ext') . '2>&1');
 }
-run_command('exec svn propdel svn:externals ' . escapeshellarg('trunk' . 
DIRECTORY_SEPARATOR . 'ext'));
+run_command('exec svn propdel svn:externals ' . escapeshellarg('trunk' . 
DIRECTORY_SEPARATOR . 'ext') . '2>&1');
 
 $links = array('bz2', 'hash', 'oci8', 'pdo', 'pdo_dblib', 'pdo_firebird', 
'spl', 'soap', 'sqlite', 'tidy', 'xmlreader', 'xmlwriter', 'filter', 'json',
 'ircg', 'pdo_mysql', 'pdo_oci', 'pdo_odbc', 'pdo_pgsql', 'pdo_sqlite', 
'simplexml', 'fileinfo');



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



[PHP-CVS] cvs: SVNROOT / run-conversion.php

2008-11-09 Thread Gwynne Raskind
gwynne  Mon Nov 10 02:00:01 2008 UTC

  Modified files:  
/SVNROOTrun-conversion.php 
  Log:
  do it right
  
http://cvs.php.net/viewvc.cgi/SVNROOT/run-conversion.php?r1=1.33&r2=1.34&diff_format=u
Index: SVNROOT/run-conversion.php
diff -u SVNROOT/run-conversion.php:1.33 SVNROOT/run-conversion.php:1.34
--- SVNROOT/run-conversion.php:1.33 Mon Nov 10 01:56:27 2008
+++ SVNROOT/run-conversion.php  Mon Nov 10 02:00:00 2008
@@ -7,7 +7,7 @@
 
 // 
-
 // Constants
-$version = substr('$Revision: 1.33 $', strlen('$Revision: '), -2);
+$version = substr('$Revision: 1.34 $', strlen('$Revision: '), -2);
 
 $passes = array(
 'processcvs',   // Process CVS modules
@@ -537,6 +537,14 @@
 $rawTagList = run_command('exec svn ls file:///' . 
escapeshellarg($GLOBALS['options']['svnroot'] . '/php-src/php-src/tags'));
 $rawBranchList = run_command('exec svn ls file:///' . 
escapeshellarg($GLOBALS['options']['svnroot'] . '/php-src/php-src/branches'));
 
+if (!file_exists($GLOBALS['temp_path'] . DIRECTORY_SEPARATOR . 
'php-src-co')) {
+run_command('exec svn checkout file:///' . 
escapeshellarg($GLOBALS['options']['svnroot'] . '/php-src/php-src') . ' ' .
+escapeshellarg($GLOBALS['temp_path'] . DIRECTORY_SEPARATOR . 
'php-src-co') . ' 2>&1 > ' .
+escapeshellarg($GLOBALS['temp_path'] . DIRECTORY_SEPARATOR . 
'co-output'));
+}
+$oldcwd = getcwd();
+chdir($GLOBALS['temp_path'] . DIRECTORY_SEPARATOR . 'php-src-co');
+
 $tagList = array();
 $branchList = array();
 foreach ($rawTagList as $tag) {
@@ -544,21 +552,16 @@
 $xml = run_command('exec svn info --xml file:///' . 
escapeshellarg($GLOBALS['options']['svnroot'] . '/php-src/php-src/tags/' . 
$realTag));
 $xml = implode("\n", $xml);
 $tagList[$realTag] = strtotime(substr($xml, strpos($xml, '') + 
6, strpos($xml, '')));
+run_command('exec svn propdel svn:externals ' . escapeshellarg('tags' 
. DIRECTORY_SEPARATOR . $realTag . DIRECTORY_SEPARATOR . 'ext'));
 }
 foreach ($rawBranchList as $branch) {
 $realBranch = substr($branch, 0, -1);
 $xml = run_command('exec svn info --xml file:///' . 
escapeshellarg($GLOBALS['options']['svnroot'] . '/php-src/php-src/branches/' . 
$realBranch));
 $xml = implode("\n", $xml);
 $branchList[$realBranch] = strtotime(substr($xml, strpos($xml, 
'') + 6, strpos($xml, '')));
+run_command('exec svn propdel svn:externals ' . 
escapeshellarg('branches' . DIRECTORY_SEPARATOR . $realBranch . 
DIRECTORY_SEPARATOR . 'ext'));
 }
-
-if (!file_exists($GLOBALS['temp_path'] . DIRECTORY_SEPARATOR . 
'php-src-co')) {
-run_command('exec svn checkout file:///' . 
escapeshellarg($GLOBALS['options']['svnroot'] . '/php-src/php-src') . ' ' .
-escapeshellarg($GLOBALS['temp_path'] . DIRECTORY_SEPARATOR . 
'php-src-co') . ' 2>&1 > ' .
-escapeshellarg($GLOBALS['temp_path'] . DIRECTORY_SEPARATOR . 
'co-output'));
-}
-$oldcwd = getcwd();
-chdir($GLOBALS['temp_path'] . DIRECTORY_SEPARATOR . 'php-src-co');
+run_command('exec svn propdel svn:externals ' . escapeshellarg('trunk' . 
DIRECTORY_SEPARATOR . 'ext'));
 
 $links = array('bz2', 'hash', 'oci8', 'pdo', 'pdo_dblib', 'pdo_firebird', 
'spl', 'soap', 'sqlite', 'tidy', 'xmlreader', 'xmlwriter', 'filter', 'json',
 'ircg', 'pdo_mysql', 'pdo_oci', 'pdo_odbc', 'pdo_pgsql', 'pdo_sqlite', 
'simplexml', 'fileinfo');
@@ -567,9 +570,6 @@
 
 foreach ($links as $link) {
 $info = lstat($GLOBALS['options']['cvsroot'] . DIRECTORY_SEPARATOR . 
'php-src' . DIRECTORY_SEPARATOR . 'ext' . DIRECTORY_SEPARATOR . $link);
-run_command('exec svn propdel svn:externals ' . escapeshellarg('tags' 
. DIRECTORY_SEPARATOR . $tag . DIRECTORY_SEPARATOR . 'ext'));
-run_command('exec svn propdel svn:externals ' . 
escapeshellarg('branches' . DIRECTORY_SEPARATOR . $tag . DIRECTORY_SEPARATOR . 
'ext'));
-run_command('exec svn propdel svn:externals ' . escapeshellarg('trunk' 
. DIRECTORY_SEPARATOR . 'ext'));
 $createDate = $info['ctime'];
 foreach ($tagList as $tag => $tagDate) {
 if ($createDate <= $tagDate) {



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



[PHP-CVS] cvs: SVNROOT / run-conversion.php

2008-11-09 Thread Gwynne Raskind
gwynne  Mon Nov 10 01:56:27 2008 UTC

  Modified files:  
/SVNROOTrun-conversion.php 
  Log:
  ditch old propsets before doing it again
  
http://cvs.php.net/viewvc.cgi/SVNROOT/run-conversion.php?r1=1.32&r2=1.33&diff_format=u
Index: SVNROOT/run-conversion.php
diff -u SVNROOT/run-conversion.php:1.32 SVNROOT/run-conversion.php:1.33
--- SVNROOT/run-conversion.php:1.32 Mon Nov 10 01:53:53 2008
+++ SVNROOT/run-conversion.php  Mon Nov 10 01:56:27 2008
@@ -7,7 +7,7 @@
 
 // 
-
 // Constants
-$version = substr('$Revision: 1.32 $', strlen('$Revision: '), -2);
+$version = substr('$Revision: 1.33 $', strlen('$Revision: '), -2);
 
 $passes = array(
 'processcvs',   // Process CVS modules
@@ -567,6 +567,9 @@
 
 foreach ($links as $link) {
 $info = lstat($GLOBALS['options']['cvsroot'] . DIRECTORY_SEPARATOR . 
'php-src' . DIRECTORY_SEPARATOR . 'ext' . DIRECTORY_SEPARATOR . $link);
+run_command('exec svn propdel svn:externals ' . escapeshellarg('tags' 
. DIRECTORY_SEPARATOR . $tag . DIRECTORY_SEPARATOR . 'ext'));
+run_command('exec svn propdel svn:externals ' . 
escapeshellarg('branches' . DIRECTORY_SEPARATOR . $tag . DIRECTORY_SEPARATOR . 
'ext'));
+run_command('exec svn propdel svn:externals ' . escapeshellarg('trunk' 
. DIRECTORY_SEPARATOR . 'ext'));
 $createDate = $info['ctime'];
 foreach ($tagList as $tag => $tagDate) {
 if ($createDate <= $tagDate) {



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



[PHP-CVS] cvs: SVNROOT / run-conversion.php

2008-11-09 Thread Gwynne Raskind
gwynne  Mon Nov 10 01:53:53 2008 UTC

  Modified files:  
/SVNROOTrun-conversion.php 
  Log:
  don't re-checkout if we don't need to, it takes forever
  
http://cvs.php.net/viewvc.cgi/SVNROOT/run-conversion.php?r1=1.31&r2=1.32&diff_format=u
Index: SVNROOT/run-conversion.php
diff -u SVNROOT/run-conversion.php:1.31 SVNROOT/run-conversion.php:1.32
--- SVNROOT/run-conversion.php:1.31 Sun Nov  9 22:34:07 2008
+++ SVNROOT/run-conversion.php  Mon Nov 10 01:53:53 2008
@@ -7,7 +7,7 @@
 
 // 
-
 // Constants
-$version = substr('$Revision: 1.31 $', strlen('$Revision: '), -2);
+$version = substr('$Revision: 1.32 $', strlen('$Revision: '), -2);
 
 $passes = array(
 'processcvs',   // Process CVS modules
@@ -552,9 +552,11 @@
 $branchList[$realBranch] = strtotime(substr($xml, strpos($xml, 
'') + 6, strpos($xml, '')));
 }
 
-run_command('exec svn checkout file:///' . 
escapeshellarg($GLOBALS['options']['svnroot'] . '/php-src/php-src') . ' ' .
-escapeshellarg($GLOBALS['temp_path'] . DIRECTORY_SEPARATOR . 
'php-src-co') . ' 2>&1 > ' .
-escapeshellarg($GLOBALS['temp_path'] . DIRECTORY_SEPARATOR . 
'co-output'));
+if (!file_exists($GLOBALS['temp_path'] . DIRECTORY_SEPARATOR . 
'php-src-co')) {
+run_command('exec svn checkout file:///' . 
escapeshellarg($GLOBALS['options']['svnroot'] . '/php-src/php-src') . ' ' .
+escapeshellarg($GLOBALS['temp_path'] . DIRECTORY_SEPARATOR . 
'php-src-co') . ' 2>&1 > ' .
+escapeshellarg($GLOBALS['temp_path'] . DIRECTORY_SEPARATOR . 
'co-output'));
+}
 $oldcwd = getcwd();
 chdir($GLOBALS['temp_path'] . DIRECTORY_SEPARATOR . 'php-src-co');
 
@@ -578,6 +580,8 @@
 }
 append_prop_line('trunk' . DIRECTORY_SEPARATOR . 'ext', 
"^/pecl/{$link}/trunk {$link}");
 }
+
+chdir($oldcwd);
 }
 
 // 
-



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



[PHP-CVS] cvs: SVNROOT / run-conversion.php

2008-11-09 Thread Gwynne Raskind
gwynne  Sun Nov  9 22:34:07 2008 UTC

  Modified files:  
/SVNROOTrun-conversion.php 
  Log:
  don't array-to-string, ugh
  
http://cvs.php.net/viewvc.cgi/SVNROOT/run-conversion.php?r1=1.30&r2=1.31&diff_format=u
Index: SVNROOT/run-conversion.php
diff -u SVNROOT/run-conversion.php:1.30 SVNROOT/run-conversion.php:1.31
--- SVNROOT/run-conversion.php:1.30 Sun Nov  9 22:32:32 2008
+++ SVNROOT/run-conversion.php  Sun Nov  9 22:34:07 2008
@@ -7,7 +7,7 @@
 
 // 
-
 // Constants
-$version = substr('$Revision: 1.30 $', strlen('$Revision: '), -2);
+$version = substr('$Revision: 1.31 $', strlen('$Revision: '), -2);
 
 $passes = array(
 'processcvs',   // Process CVS modules
@@ -542,11 +542,13 @@
 foreach ($rawTagList as $tag) {
 $realTag = substr($tag, 0, -1);
 $xml = run_command('exec svn info --xml file:///' . 
escapeshellarg($GLOBALS['options']['svnroot'] . '/php-src/php-src/tags/' . 
$realTag));
+$xml = implode("\n", $xml);
 $tagList[$realTag] = strtotime(substr($xml, strpos($xml, '') + 
6, strpos($xml, '')));
 }
 foreach ($rawBranchList as $branch) {
 $realBranch = substr($branch, 0, -1);
 $xml = run_command('exec svn info --xml file:///' . 
escapeshellarg($GLOBALS['options']['svnroot'] . '/php-src/php-src/branches/' . 
$realBranch));
+$xml = implode("\n", $xml);
 $branchList[$realBranch] = strtotime(substr($xml, strpos($xml, 
'') + 6, strpos($xml, '')));
 }
 



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



[PHP-CVS] cvs: SVNROOT / run-conversion.php

2008-11-09 Thread Gwynne Raskind
gwynne  Sun Nov  9 22:32:32 2008 UTC

  Modified files:  
/SVNROOTrun-conversion.php 
  Log:
  linking pass to handle all those symlinks in php-src, ugh
  
http://cvs.php.net/viewvc.cgi/SVNROOT/run-conversion.php?r1=1.29&r2=1.30&diff_format=u
Index: SVNROOT/run-conversion.php
diff -u SVNROOT/run-conversion.php:1.29 SVNROOT/run-conversion.php:1.30
--- SVNROOT/run-conversion.php:1.29 Sun Nov  9 06:37:09 2008
+++ SVNROOT/run-conversion.php  Sun Nov  9 22:32:32 2008
@@ -7,13 +7,14 @@
 
 // 
-
 // Constants
-$version = substr('$Revision: 1.29 $', strlen('$Revision: '), -2);
+$version = substr('$Revision: 1.30 $', strlen('$Revision: '), -2);
 
 $passes = array(
 'processcvs',   // Process CVS modules
 'svncreate',// Create various SVN repositories
 'cvs2svn',  // Run conversion for each repository
 'cleanup',  // Preform renaming and removes for each repo
+'link', // Setup svn:externals
 'install',  // Install hook scripts, authz databases, etc.
 );
 
@@ -523,6 +524,61 @@
 }
 
 // 
-
+// link pass
+function append_prop_line($path, $value)
+{
+$oldValue = implode("\n", run_command('exec svn propget svn:externals ' . 
escapeshellarg($path)));
+$oldValue .= "\n{$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'));
+$rawBranchList = run_command('exec svn ls file:///' . 
escapeshellarg($GLOBALS['options']['svnroot'] . '/php-src/php-src/branches'));
+
+$tagList = array();
+$branchList = array();
+foreach ($rawTagList as $tag) {
+$realTag = substr($tag, 0, -1);
+$xml = run_command('exec svn info --xml file:///' . 
escapeshellarg($GLOBALS['options']['svnroot'] . '/php-src/php-src/tags/' . 
$realTag));
+$tagList[$realTag] = strtotime(substr($xml, strpos($xml, '') + 
6, strpos($xml, '')));
+}
+foreach ($rawBranchList as $branch) {
+$realBranch = substr($branch, 0, -1);
+$xml = run_command('exec svn info --xml file:///' . 
escapeshellarg($GLOBALS['options']['svnroot'] . '/php-src/php-src/branches/' . 
$realBranch));
+$branchList[$realBranch] = strtotime(substr($xml, strpos($xml, 
'') + 6, strpos($xml, '')));
+}
+
+run_command('exec svn checkout file:///' . 
escapeshellarg($GLOBALS['options']['svnroot'] . '/php-src/php-src') . ' ' .
+escapeshellarg($GLOBALS['temp_path'] . DIRECTORY_SEPARATOR . 
'php-src-co') . ' 2>&1 > ' .
+escapeshellarg($GLOBALS['temp_path'] . DIRECTORY_SEPARATOR . 
'co-output'));
+$oldcwd = getcwd();
+chdir($GLOBALS['temp_path'] . DIRECTORY_SEPARATOR . 'php-src-co');
+
+$links = array('bz2', 'hash', 'oci8', 'pdo', 'pdo_dblib', 'pdo_firebird', 
'spl', 'soap', 'sqlite', 'tidy', 'xmlreader', 'xmlwriter', 'filter', 'json',
+'ircg', 'pdo_mysql', 'pdo_oci', 'pdo_odbc', 'pdo_pgsql', 'pdo_sqlite', 
'simplexml', 'fileinfo');
+
+$props = array();
+
+foreach ($links as $link) {
+$info = lstat($GLOBALS['options']['cvsroot'] . DIRECTORY_SEPARATOR . 
'php-src' . DIRECTORY_SEPARATOR . 'ext' . DIRECTORY_SEPARATOR . $link);
+$createDate = $info['ctime'];
+foreach ($tagList as $tag => $tagDate) {
+if ($createDate <= $tagDate) {
+append_prop_line('tags' . DIRECTORY_SEPARATOR . $tag . 
DIRECTORY_SEPARATOR . 'ext', "^/pecl/{$link}/tags/{$tag} {$link}");
+}
+}
+foreach ($branchList as $branch => $branchDate) {
+if ($createDate <= $branchDate) {
+append_prop_line('branches' . DIRECTORY_SEPARATOR . $branch . 
DIRECTORY_SEPARATOR . 'ext', "^/pecl/{$link}/branches/{$branch} {$link}");
+}
+}
+append_prop_line('trunk' . DIRECTORY_SEPARATOR . 'ext', 
"^/pecl/{$link}/trunk {$link}");
+}
+}
+
+// 
-
 // install pass
 function pass_install()
 {



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



[PHP-CVS] cvs: SVNROOT / run-conversion.php

2008-11-08 Thread Gwynne Raskind
gwynne  Sun Nov  9 06:00:55 2008 UTC

  Modified files:  
/SVNROOTrun-conversion.php 
  Log:
  default to false, not true...
  
http://cvs.php.net/viewvc.cgi/SVNROOT/run-conversion.php?r1=1.27&r2=1.28&diff_format=u
Index: SVNROOT/run-conversion.php
diff -u SVNROOT/run-conversion.php:1.27 SVNROOT/run-conversion.php:1.28
--- SVNROOT/run-conversion.php:1.27 Sat Nov  8 22:46:57 2008
+++ SVNROOT/run-conversion.php  Sun Nov  9 06:00:55 2008
@@ -7,7 +7,7 @@
 
 // 
-
 // Constants
-$version = substr('$Revision: 1.27 $', strlen('$Revision: '), -2);
+$version = substr('$Revision: 1.28 $', strlen('$Revision: '), -2);
 
 $passes = array(
 'processcvs',   // Process CVS modules
@@ -58,7 +58,7 @@
 return array_filter($results, 'scandir_is_meta');
 }
 
-function run_command($command, $ignoreErrors = TRUE)
+function run_command($command, $ignoreErrors = FALSE)
 {
 v(2, "Running '{$command}'...");
 exec($command, $output, $exitstatus);



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



[PHP-CVS] cvs: SVNROOT / run-conversion.php

2008-11-08 Thread Gwynne Raskind
gwynne  Sat Nov  8 22:46:58 2008 UTC

  Modified files:  
/SVNROOTrun-conversion.php 
  Log:
  typo
  
http://cvs.php.net/viewvc.cgi/SVNROOT/run-conversion.php?r1=1.26&r2=1.27&diff_format=u
Index: SVNROOT/run-conversion.php
diff -u SVNROOT/run-conversion.php:1.26 SVNROOT/run-conversion.php:1.27
--- SVNROOT/run-conversion.php:1.26 Sat Nov  8 22:44:45 2008
+++ SVNROOT/run-conversion.php  Sat Nov  8 22:46:57 2008
@@ -7,7 +7,7 @@
 
 // 
-
 // Constants
-$version = substr('$Revision: 1.26 $', strlen('$Revision: '), -2);
+$version = substr('$Revision: 1.27 $', strlen('$Revision: '), -2);
 
 $passes = array(
 'processcvs',   // Process CVS modules
@@ -64,7 +64,7 @@
 exec($command, $output, $exitstatus);
 if ($exitstatus != 0 && !$ignoreErrors) {
 error("\nAn error occurred. Exit status was {$exitstatus}. Output:\n" 
. implode("\n", $output) . "\n");
-} else if ($exitStatus != 0) {
+} else if ($exitstatus != 0) {
 v(2, " warning: an error occurred.\n");
 } else {
 v(2, " done.\n");



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



[PHP-CVS] cvs: SVNROOT / run-conversion.php

2008-11-08 Thread Gwynne Raskind
gwynne  Sat Nov  8 22:44:45 2008 UTC

  Modified files:  
/SVNROOTrun-conversion.php 
  Log:
  redirect error output from cp, ignore permission errors in CVSROOT copy
  
http://cvs.php.net/viewvc.cgi/SVNROOT/run-conversion.php?r1=1.25&r2=1.26&diff_format=u
Index: SVNROOT/run-conversion.php
diff -u SVNROOT/run-conversion.php:1.25 SVNROOT/run-conversion.php:1.26
--- SVNROOT/run-conversion.php:1.25 Sat Nov  8 22:36:09 2008
+++ SVNROOT/run-conversion.php  Sat Nov  8 22:44:45 2008
@@ -7,7 +7,7 @@
 
 // 
-
 // Constants
-$version = substr('$Revision: 1.25 $', strlen('$Revision: '), -2);
+$version = substr('$Revision: 1.26 $', strlen('$Revision: '), -2);
 
 $passes = array(
 'processcvs',   // Process CVS modules
@@ -58,14 +58,17 @@
 return array_filter($results, 'scandir_is_meta');
 }
 
-function run_command($command)
+function run_command($command, $ignoreErrors = TRUE)
 {
 v(2, "Running '{$command}'...");
 exec($command, $output, $exitstatus);
-if ($exitstatus != 0) {
+if ($exitstatus != 0 && !$ignoreErrors) {
 error("\nAn error occurred. Exit status was {$exitstatus}. Output:\n" 
. implode("\n", $output) . "\n");
+} else if ($exitStatus != 0) {
+v(2, " warning: an error occurred.\n");
+} else {
+v(2, " done.\n");
 }
-v(2, " done.\n");
 return $output;
 }
 
@@ -197,20 +200,20 @@
 // We special-case php-src so we can move TSRM and ZendEngine2 
into it easily. Ugh.
 $command = 'exec cp -Rpv ' . 
escapeshellarg($GLOBALS['options']['cvsroot'] . DIRECTORY_SEPARATOR . 
'php-src') . ' ' .
  
escapeshellarg($GLOBALS['temp_path'] . DIRECTORY_SEPARATOR . 'php-src') .
- ' > ' . 
escapeshellarg($GLOBALS['temp_path'] . DIRECTORY_SEPARATOR . 'cp-output');
+ ' 2>&1 > ' . 
escapeshellarg($GLOBALS['temp_path'] . DIRECTORY_SEPARATOR . 'cp-output');
 run_command($command);
 $command = 'exec cp -Rpv ' . 
escapeshellarg($GLOBALS['options']['cvsroot'] . DIRECTORY_SEPARATOR . 
'ZendEngine2') . ' ' .
  
escapeshellarg($GLOBALS['temp_path'] . DIRECTORY_SEPARATOR . 'php-src') .
- ' >> ' . 
escapeshellarg($GLOBALS['temp_path'] . DIRECTORY_SEPARATOR . 'cp-output');
+ ' 2>&1 >> ' . 
escapeshellarg($GLOBALS['temp_path'] . DIRECTORY_SEPARATOR . 'cp-output');
 run_command($command);
 $command = 'exec cp -Rpv ' . 
escapeshellarg($GLOBALS['options']['cvsroot'] . DIRECTORY_SEPARATOR . 'TSRM') . 
' ' .
  
escapeshellarg($GLOBALS['temp_path'] . DIRECTORY_SEPARATOR . 'php-src') .
- ' >> ' . 
escapeshellarg($GLOBALS['temp_path'] . DIRECTORY_SEPARATOR . 'cp-output');
+ ' 2>&1 >> ' . 
escapeshellarg($GLOBALS['temp_path'] . DIRECTORY_SEPARATOR . 'cp-output');
 run_command($command);
 $command = 'exec cp -Rpv ' . 
escapeshellarg($GLOBALS['options']['cvsroot'] . DIRECTORY_SEPARATOR . 
'CVSROOT') . ' ' .
  
escapeshellarg($GLOBALS['temp_path']) .
- ' >> ' . 
escapeshellarg($GLOBALS['temp_path'] . DIRECTORY_SEPARATOR . 'cp-output');
-run_command($command);
+ ' 2>&1 >> ' . 
escapeshellarg($GLOBALS['temp_path'] . DIRECTORY_SEPARATOR . 'cp-output');
+run_command($command, TRUE);
 $cvspath = $GLOBALS['temp_path'] . DIRECTORY_SEPARATOR . 
'php-src';
 }
 $this->optionsFileContents .= <

[PHP-CVS] cvs: SVNROOT / run-conversion.php

2008-11-08 Thread Gwynne Raskind
gwynne  Sat Nov  8 22:36:09 2008 UTC

  Modified files:  
/SVNROOTrun-conversion.php 
  Log:
  we need the real CVSROOT for this
  
http://cvs.php.net/viewvc.cgi/SVNROOT/run-conversion.php?r1=1.24&r2=1.25&diff_format=u
Index: SVNROOT/run-conversion.php
diff -u SVNROOT/run-conversion.php:1.24 SVNROOT/run-conversion.php:1.25
--- SVNROOT/run-conversion.php:1.24 Sat Nov  8 22:31:55 2008
+++ SVNROOT/run-conversion.php  Sat Nov  8 22:36:09 2008
@@ -1,12 +1,13 @@
  ' . 
escapeshellarg($GLOBALS['temp_path'] . DIRECTORY_SEPARATOR . 'cp-output');
 run_command($command);
 $command = 'exec cp -Rpv ' . 
escapeshellarg($GLOBALS['options']['cvsroot'] . DIRECTORY_SEPARATOR . 
'ZendEngine2') . ' ' .
- 
escapeshellarg($GLOBALS['temp_path'] . DIRECTORY_SEPARATOR . 'php-src/') .
+ 
escapeshellarg($GLOBALS['temp_path'] . DIRECTORY_SEPARATOR . 'php-src') .
  ' >> ' . 
escapeshellarg($GLOBALS['temp_path'] . DIRECTORY_SEPARATOR . 'cp-output');
 run_command($command);
 $command = 'exec cp -Rpv ' . 
escapeshellarg($GLOBALS['options']['cvsroot'] . DIRECTORY_SEPARATOR . 'TSRM') . 
' ' .
- 
escapeshellarg($GLOBALS['temp_path'] . DIRECTORY_SEPARATOR . 'php-src/') .
+ 
escapeshellarg($GLOBALS['temp_path'] . DIRECTORY_SEPARATOR . 'php-src') .
+ ' >> ' . 
escapeshellarg($GLOBALS['temp_path'] . DIRECTORY_SEPARATOR . 'cp-output');
+run_command($command);
+$command = 'exec cp -Rpv ' . 
escapeshellarg($GLOBALS['options']['cvsroot'] . DIRECTORY_SEPARATOR . 
'CVSROOT') . ' ' .
+ 
escapeshellarg($GLOBALS['temp_path']) .
  ' >> ' . 
escapeshellarg($GLOBALS['temp_path'] . DIRECTORY_SEPARATOR . 'cp-output');
 run_command($command);
-run_command('exec cvs -d' . 
escapeshellarg($GLOBALS['temp_path']) . ' init');
 $cvspath = $GLOBALS['temp_path'] . DIRECTORY_SEPARATOR . 
'php-src';
 }
 $this->optionsFileContents .= <

[PHP-CVS] cvs: SVNROOT / run-conversion.php

2008-11-08 Thread Gwynne Raskind
gwynne  Sat Nov  8 22:31:55 2008 UTC

  Modified files:  
/SVNROOTrun-conversion.php 
  Log:
  use cvs init correctly
  
http://cvs.php.net/viewvc.cgi/SVNROOT/run-conversion.php?r1=1.23&r2=1.24&diff_format=u
Index: SVNROOT/run-conversion.php
diff -u SVNROOT/run-conversion.php:1.23 SVNROOT/run-conversion.php:1.24
--- SVNROOT/run-conversion.php:1.23 Sat Nov  8 22:30:35 2008
+++ SVNROOT/run-conversion.php  Sat Nov  8 22:31:55 2008
@@ -6,7 +6,7 @@
 
 // 
-
 // Constants
-$version = substr('$Revision: 1.23 $', strlen('$Revision: '), -2);
+$version = substr('$Revision: 1.24 $', strlen('$Revision: '), -2);
 
 $passes = array(
 'processcvs',   // Process CVS modules
@@ -206,7 +206,7 @@
  
escapeshellarg($GLOBALS['temp_path'] . DIRECTORY_SEPARATOR . 'php-src/') .
  ' >> ' . 
escapeshellarg($GLOBALS['temp_path'] . DIRECTORY_SEPARATOR . 'cp-output');
 run_command($command);
-run_command('exec cvs init ' . 
escapeshellarg($GLOBALS['temp_path']));
+run_command('exec cvs -d' . 
escapeshellarg($GLOBALS['temp_path']) . ' init');
 $cvspath = $GLOBALS['temp_path'] . DIRECTORY_SEPARATOR . 
'php-src';
 }
 $this->optionsFileContents .= <

[PHP-CVS] cvs: SVNROOT / run-conversion.php

2008-11-08 Thread Gwynne Raskind
gwynne  Sat Nov  8 22:30:35 2008 UTC

  Modified files:  
/SVNROOTrun-conversion.php 
  Log:
  fake CVS repo for the php-src temp dir
  
http://cvs.php.net/viewvc.cgi/SVNROOT/run-conversion.php?r1=1.22&r2=1.23&diff_format=u
Index: SVNROOT/run-conversion.php
diff -u SVNROOT/run-conversion.php:1.22 SVNROOT/run-conversion.php:1.23
--- SVNROOT/run-conversion.php:1.22 Sat Nov  8 22:25:48 2008
+++ SVNROOT/run-conversion.php  Sat Nov  8 22:30:35 2008
@@ -6,7 +6,7 @@
 
 // 
-
 // Constants
-$version = substr('$Revision: 1.22 $', strlen('$Revision: '), -2);
+$version = substr('$Revision: 1.23 $', strlen('$Revision: '), -2);
 
 $passes = array(
 'processcvs',   // Process CVS modules
@@ -206,6 +206,7 @@
  
escapeshellarg($GLOBALS['temp_path'] . DIRECTORY_SEPARATOR . 'php-src/') .
  ' >> ' . 
escapeshellarg($GLOBALS['temp_path'] . DIRECTORY_SEPARATOR . 'cp-output');
 run_command($command);
+run_command('exec cvs init ' . 
escapeshellarg($GLOBALS['temp_path']));
 $cvspath = $GLOBALS['temp_path'] . DIRECTORY_SEPARATOR . 
'php-src';
 }
 $this->optionsFileContents .= <

[PHP-CVS] cvs: SVNROOT / run-conversion.php

2008-11-08 Thread Gwynne Raskind
gwynne  Sat Nov  8 22:25:48 2008 UTC

  Modified files:  
/SVNROOTrun-conversion.php 
  Log:
  cp needs spaces between parameters... and end() needs a reference
  
http://cvs.php.net/viewvc.cgi/SVNROOT/run-conversion.php?r1=1.21&r2=1.22&diff_format=u
Index: SVNROOT/run-conversion.php
diff -u SVNROOT/run-conversion.php:1.21 SVNROOT/run-conversion.php:1.22
--- SVNROOT/run-conversion.php:1.21 Sat Nov  8 20:21:14 2008
+++ SVNROOT/run-conversion.php  Sat Nov  8 22:25:48 2008
@@ -6,7 +6,7 @@
 
 // 
-
 // Constants
-$version = substr('$Revision: 1.21 $', strlen('$Revision: '), -2);
+$version = substr('$Revision: 1.22 $', strlen('$Revision: '), -2);
 
 $passes = array(
 'processcvs',   // Process CVS modules
@@ -194,15 +194,15 @@
 } else {
 if ($moduleName == 'php-src') {
 // We special-case php-src so we can move TSRM and ZendEngine2 
into it easily. Ugh.
-$command = 'exec cp -Rpv ' . 
escapeshellarg($GLOBALS['options']['cvsroot'] . DIRECTORY_SEPARATOR . 
'php-src') .
+$command = 'exec cp -Rpv ' . 
escapeshellarg($GLOBALS['options']['cvsroot'] . DIRECTORY_SEPARATOR . 
'php-src') . ' ' .
  
escapeshellarg($GLOBALS['temp_path'] . DIRECTORY_SEPARATOR . 'php-src') .
  ' > ' . 
escapeshellarg($GLOBALS['temp_path'] . DIRECTORY_SEPARATOR . 'cp-output');
 run_command($command);
-$command = 'exec cp -Rpv ' . 
escapeshellarg($GLOBALS['options']['cvsroot'] . DIRECTORY_SEPARATOR . 
'ZendEngine2') .
+$command = 'exec cp -Rpv ' . 
escapeshellarg($GLOBALS['options']['cvsroot'] . DIRECTORY_SEPARATOR . 
'ZendEngine2') . ' ' .
  
escapeshellarg($GLOBALS['temp_path'] . DIRECTORY_SEPARATOR . 'php-src/') .
  ' >> ' . 
escapeshellarg($GLOBALS['temp_path'] . DIRECTORY_SEPARATOR . 'cp-output');
 run_command($command);
-$command = 'exec cp -Rpv ' . 
escapeshellarg($GLOBALS['options']['cvsroot'] . DIRECTORY_SEPARATOR . 'TSRM') .
+$command = 'exec cp -Rpv ' . 
escapeshellarg($GLOBALS['options']['cvsroot'] . DIRECTORY_SEPARATOR . 'TSRM') . 
' ' .
  
escapeshellarg($GLOBALS['temp_path'] . DIRECTORY_SEPARATOR . 'php-src/') .
  ' >> ' . 
escapeshellarg($GLOBALS['temp_path'] . DIRECTORY_SEPARATOR . 'cp-output');
 run_command($command);
@@ -310,7 +310,8 @@
 error("SVN repository at {$this->svnRepositoryPath} doesn't exist 
or isn't writable.\n");
 }
 
-if (trim(end(run_command('svnlook youngest ' . 
escapeshellarg($this->svnRepositoryPath != 0) {
+$output = run_command('svnlook youngest ' . 
escapeshellarg($this->svnRepositoryPath));
+if (trim(end($output)) != 0) {
 return; // Repo isn't empty
 }
 



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



[PHP-CVS] cvs: SVNROOT / run-conversion.php

2008-11-08 Thread Gwynne Raskind
gwynne  Sat Nov  8 20:21:14 2008 UTC

  Modified files:  
/SVNROOTrun-conversion.php 
  Log:
  functionalize running commands, code formatting, special-case php-src to copy 
TSRM/ZendEngine2, make systems repo
  http://cvs.php.net/viewvc.cgi/SVNROOT/run-conversion.php?r1=1.20&r2=1.21&diff_format=u
Index: SVNROOT/run-conversion.php
diff -u SVNROOT/run-conversion.php:1.20 SVNROOT/run-conversion.php:1.21
--- SVNROOT/run-conversion.php:1.20 Sat Nov  8 06:07:24 2008
+++ SVNROOT/run-conversion.php  Sat Nov  8 20:21:14 2008
@@ -6,7 +6,7 @@
 
 // 
-
 // Constants
-$version = substr('$Revision: 1.20 $', strlen('$Revision: '), -2);
+$version = substr('$Revision: 1.21 $', strlen('$Revision: '), -2);
 
 $passes = array(
 'processcvs',   // Process CVS modules
@@ -57,6 +57,17 @@
 return array_filter($results, 'scandir_is_meta');
 }
 
+function run_command($command)
+{
+v(2, "Running '{$command}'...");
+exec($command, $output, $exitstatus);
+if ($exitstatus != 0) {
+error("\nAn error occurred. Exit status was {$exitstatus}. Output:\n" 
. implode("\n", $output) . "\n");
+}
+v(2, " done.\n");
+return $output;
+}
+
 // 
-
 // Commandline options
 $cmdline_parser = new Console_CommandLine(array(
@@ -163,7 +174,8 @@
 $modprefix = $moduleName . '/';
 foreach(scandir_no_meta($cvspath) as $module) {
 if (!is_dir($cvspath . $module) || 
-count(scandir($cvspath . $module)) == 2 || $module == 
'Attic' || ($moduleName == 'pecl' && $module == 'libextractor') ||
+count(scandir($cvspath . $module)) == 2 || $module == 
'Attic' ||
+($moduleName == 'pecl' && $module == 'libextractor') ||
 ($moduleName == 'pear' && in_array($module, 
array('HTML_QuickForm_ComboBox', 'Services_Compete', 'XML_HTMLSax3' {
 continue; // empty dir
 }
@@ -180,6 +192,22 @@
 EOEXTRA;
 }
 } else {
+if ($moduleName == 'php-src') {
+// We special-case php-src so we can move TSRM and ZendEngine2 
into it easily. Ugh.
+$command = 'exec cp -Rpv ' . 
escapeshellarg($GLOBALS['options']['cvsroot'] . DIRECTORY_SEPARATOR . 
'php-src') .
+ 
escapeshellarg($GLOBALS['temp_path'] . DIRECTORY_SEPARATOR . 'php-src') .
+ ' > ' . 
escapeshellarg($GLOBALS['temp_path'] . DIRECTORY_SEPARATOR . 'cp-output');
+run_command($command);
+$command = 'exec cp -Rpv ' . 
escapeshellarg($GLOBALS['options']['cvsroot'] . DIRECTORY_SEPARATOR . 
'ZendEngine2') .
+ 
escapeshellarg($GLOBALS['temp_path'] . DIRECTORY_SEPARATOR . 'php-src/') .
+ ' >> ' . 
escapeshellarg($GLOBALS['temp_path'] . DIRECTORY_SEPARATOR . 'cp-output');
+run_command($command);
+$command = 'exec cp -Rpv ' . 
escapeshellarg($GLOBALS['options']['cvsroot'] . DIRECTORY_SEPARATOR . 'TSRM') .
+ 
escapeshellarg($GLOBALS['temp_path'] . DIRECTORY_SEPARATOR . 'php-src/') .
+ ' >> ' . 
escapeshellarg($GLOBALS['temp_path'] . DIRECTORY_SEPARATOR . 'cp-output');
+run_command($command);
+$cvspath = $GLOBALS['temp_path'] . DIRECTORY_SEPARATOR . 
'php-src';
+}
 $this->optionsFileContents .= <&1";
 v(1, "Creating SVN repository for '{$this->repositoryName}' in 
{$this->svnRepositoryPath}...\n");
-v(2, "Running: '{$command}'...");
-exec($command, $output, $exitstatus);
-if ($exitstatus != 0) {
-error("\nAn error occurred. Exit status was {$exitstatus}. 
Output:\n" . implode("\n", $output) . "\n", $exitstatus);
-}
-v(2, " done.\n");
+run_command($command);
 }
 
 public function importCVSModules()
@@ -287,7 +310,7 @@
 error("SVN repository at {$this->svnRepositoryPath} doesn't exist 
or isn't writable.\n");
 }
 
-if (trim(system('svnlook youngest ' . 
escapeshellarg($this->svnRepositoryPath))) != 0) {
+if (trim(end(run_command('svnlook youngest ' . 
escapeshellarg($this->svnRepositoryPath != 0) {
 return; // Repo isn't empty
 }
 
@@ -303,13 +326,7 @@
 private function executeSVNCommand($cmd)
 {
 $realCommand = "exec svn {$cmd} 2>&1";
-v(2, "Running: '{$realCommand}'...");
-exec($realCommand, $output, $exitstatu

[PHP-CVS] cvs: SVNROOT / run-conversion.php

2008-11-07 Thread Gwynne Raskind
gwynne  Sat Nov  8 06:07:24 2008 UTC

  Modified files:  
/SVNROOTrun-conversion.php 
  Log:
  Fixup command needs to include trunk in path
  
http://cvs.php.net/viewvc.cgi/SVNROOT/run-conversion.php?r1=1.19&r2=1.20&diff_format=u
Index: SVNROOT/run-conversion.php
diff -u SVNROOT/run-conversion.php:1.19 SVNROOT/run-conversion.php:1.20
--- SVNROOT/run-conversion.php:1.19 Sat Nov  8 06:06:02 2008
+++ SVNROOT/run-conversion.php  Sat Nov  8 06:07:24 2008
@@ -6,7 +6,7 @@
 
 // 
-
 // Constants
-$version = substr('$Revision: 1.19 $', strlen('$Revision: '), -2);
+$version = substr('$Revision: 1.20 $', strlen('$Revision: '), -2);
 
 $passes = array(
 'processcvs',   // Process CVS modules
@@ -435,7 +435,7 @@
 $repoList['doc']->addRenameRule(array('mode' => 'move', 'srcPath' => 
'phpdoc/trunk/en', 'dstPath' => 'en/trunk'));
 $repoList['doc']->addRenameRule(array('mode' => 'move', 'srcPath' => 
'phpdoc', 'dstPath' => 'doc-base'));
 // Fixup rules for php-src
-$repoList['src']->addRenameRule(array('mode' => 'move', 'srcPath' => 
'pdo-specs/trunk', 'dstPath' => 'php-src/ext/pdo/specs'));
+$repoList['src']->addRenameRule(array('mode' => 'move', 'srcPath' => 
'pdo-specs/trunk', 'dstPath' => 'php-src/trunk/ext/pdo/specs'));
 $repoList['src']->addRenameRule(array('mode' => 'move', 'srcPath' => 
'ZendEngine2/trunk', 'dstPath' => 'php-src/trunk/ZendEngine2'));
 $repoList['src']->addRenameRule(array('mode' => 'move', 'srcPath' => 
'ZendEngine2/branches/PHP_5_2', 'dstPath' => 
'php-src/branches/PHP_5_2/ZendEngine2'));
 $repoList['src']->addRenameRule(array('mode' => 'move', 'srcPath' => 
'ZendEngine2/branches/PHP_5_3', 'dstPath' => 
'php-src/branches/PHP_5_3/ZendEngine2'));



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



[PHP-CVS] cvs: SVNROOT / run-conversion.php

2008-11-07 Thread Gwynne Raskind
gwynne  Sat Nov  8 06:06:03 2008 UTC

  Modified files:  
/SVNROOTrun-conversion.php 
  Log:
  Make the errors a bit more handy please
  
http://cvs.php.net/viewvc.cgi/SVNROOT/run-conversion.php?r1=1.18&r2=1.19&diff_format=u
Index: SVNROOT/run-conversion.php
diff -u SVNROOT/run-conversion.php:1.18 SVNROOT/run-conversion.php:1.19
--- SVNROOT/run-conversion.php:1.18 Sat Nov  8 06:02:23 2008
+++ SVNROOT/run-conversion.php  Sat Nov  8 06:06:02 2008
@@ -1,8 +1,12 @@
 http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-CVS] cvs: SVNROOT / run-conversion.php

2008-11-07 Thread Gwynne Raskind
gwynne  Sat Nov  8 06:02:24 2008 UTC

  Modified files:  
/SVNROOTrun-conversion.php 
  Log:
  Correct use of undefined variable, where's my E_NOTICE?
  
http://cvs.php.net/viewvc.cgi/SVNROOT/run-conversion.php?r1=1.17&r2=1.18&diff_format=u
Index: SVNROOT/run-conversion.php
diff -u SVNROOT/run-conversion.php:1.17 SVNROOT/run-conversion.php:1.18
--- SVNROOT/run-conversion.php:1.17 Sat Nov  8 06:01:20 2008
+++ SVNROOT/run-conversion.php  Sat Nov  8 06:02:23 2008
@@ -2,7 +2,7 @@
 
 // 
-
 // Constants
-$version = substr('$Revision: 1.17 $', strlen('$Revision: '), -2);
+$version = substr('$Revision: 1.18 $', strlen('$Revision: '), -2);
 
 $passes = array(
 'processcvs',   // Process CVS modules
@@ -300,7 +300,7 @@
 {
 $realCommand = "exec svn {$cmd} 2>&1";
 v(2, "Running: '{$realCommand}'...");
-exec($command, $output, $exitstatus);
+exec($realCommand, $output, $exitstatus);
 if ($exitstatus != 0) {
 error("\nAn error occurred. Exit status was {$exitstatus}. 
Output:\n" . implode("\n", $output) . "\n", $exitstatus);
 }
@@ -344,7 +344,7 @@
 break;
 }
 }
-v(1, "Done fixing up.");
+v(1, "Done fixing up.\n");
 }
 
 public function installAdminFiles()



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



[PHP-CVS] cvs: SVNROOT / run-conversion.php

2008-11-07 Thread Gwynne Raskind
gwynne  Sat Nov  8 06:01:21 2008 UTC

  Modified files:  
/SVNROOTrun-conversion.php 
  Log:
  Fix some stupid typos
  
http://cvs.php.net/viewvc.cgi/SVNROOT/run-conversion.php?r1=1.16&r2=1.17&diff_format=u
Index: SVNROOT/run-conversion.php
diff -u SVNROOT/run-conversion.php:1.16 SVNROOT/run-conversion.php:1.17
--- SVNROOT/run-conversion.php:1.16 Sat Nov  8 04:35:43 2008
+++ SVNROOT/run-conversion.php  Sat Nov  8 06:01:20 2008
@@ -2,7 +2,7 @@
 
 // 
-
 // Constants
-$version = substr('$Revision: 1.16 $', strlen('$Revision: '), -2);
+$version = substr('$Revision: 1.17 $', strlen('$Revision: '), -2);
 
 $passes = array(
 'processcvs',   // Process CVS modules
@@ -330,8 +330,8 @@
 public function fixupRepository()
 {
 v(1, "Executing fixup commands for repository 
'{$this->repositoryName}'...\n");
-$message = '[SVN CONVERSION] Reorganization in repository 
{$this->repositoryName}.';
-foreach ($renamingRules as $rule) {
+$message = "[SVN CONVERSION] Reorganization in repository 
{$this->repositoryName}.";
+foreach ($this->renamingRules as $rule) {
 switch ($rule['mode']) {
 case 'mkdir':
 $this->mkdirPath($rule['srcPath'], $message);



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



[PHP-CVS] cvs: SVNROOT / run-conversion.php

2008-11-07 Thread Gwynne Raskind
gwynne  Sat Nov  8 04:35:43 2008 UTC

  Modified files:  
/SVNROOTrun-conversion.php 
  Log:
  excluded pear crud, what a pain
  
http://cvs.php.net/viewvc.cgi/SVNROOT/run-conversion.php?r1=1.15&r2=1.16&diff_format=u
Index: SVNROOT/run-conversion.php
diff -u SVNROOT/run-conversion.php:1.15 SVNROOT/run-conversion.php:1.16
--- SVNROOT/run-conversion.php:1.15 Sat Nov  8 04:17:55 2008
+++ SVNROOT/run-conversion.php  Sat Nov  8 04:35:43 2008
@@ -2,7 +2,7 @@
 
 // 
-
 // Constants
-$version = substr('$Revision: 1.15 $', strlen('$Revision: '), -2);
+$version = substr('$Revision: 1.16 $', strlen('$Revision: '), -2);
 
 $passes = array(
 'processcvs',   // Process CVS modules
@@ -159,7 +159,8 @@
 $modprefix = $moduleName . '/';
 foreach(scandir_no_meta($cvspath) as $module) {
 if (!is_dir($cvspath . $module) || 
-count(scandir($cvspath . $module)) == 2 || $module == 
'Attic' || ($moduleName == 'pecl' && $module == 'libextractor')) {
+count(scandir($cvspath . $module)) == 2 || $module == 
'Attic' || ($moduleName == 'pecl' && $module == 'libextractor') ||
+($moduleName == 'pear' && in_array($module, 
array('HTML_QuickForm_ComboBox', 'Services_Compete', 'XML_HTMLSax3' {
 continue; // empty dir
 }
 $this->optionsFileContents .= <

[PHP-CVS] cvs: SVNROOT / run-conversion.php

2008-11-07 Thread Gwynne Raskind
gwynne  Sat Nov  8 04:17:55 2008 UTC

  Modified files:  
/SVNROOTrun-conversion.php 
  Log:
  is it a dir? we'd better be sure
  
http://cvs.php.net/viewvc.cgi/SVNROOT/run-conversion.php?r1=1.14&r2=1.15&diff_format=u
Index: SVNROOT/run-conversion.php
diff -u SVNROOT/run-conversion.php:1.14 SVNROOT/run-conversion.php:1.15
--- SVNROOT/run-conversion.php:1.14 Sat Nov  8 00:55:57 2008
+++ SVNROOT/run-conversion.php  Sat Nov  8 04:17:55 2008
@@ -2,7 +2,7 @@
 
 // 
-
 // Constants
-$version = substr('$Revision: 1.14 $', strlen('$Revision: '), -2);
+$version = substr('$Revision: 1.15 $', strlen('$Revision: '), -2);
 
 $passes = array(
 'processcvs',   // Process CVS modules
@@ -158,7 +158,8 @@
 if ($isMetaModule) {
 $modprefix = $moduleName . '/';
 foreach(scandir_no_meta($cvspath) as $module) {
-if (count(scandir($cvspath . $module)) == 2 || $module == 
'Attic' || ($moduleName == 'pecl' && $module == 'libextractor')) {
+if (!is_dir($cvspath . $module) || 
+count(scandir($cvspath . $module)) == 2 || $module == 
'Attic' || ($moduleName == 'pecl' && $module == 'libextractor')) {
 continue; // empty dir
 }
 $this->optionsFileContents .= <

[PHP-CVS] cvs: SVNROOT / run-conversion.php

2008-11-07 Thread Gwynne Raskind
gwynne  Sat Nov  8 00:55:57 2008 UTC

  Modified files:  
/SVNROOTrun-conversion.php 
  Log:
  don't bother converting for non-empty repos, allows better resume-from-death 
support
  
http://cvs.php.net/viewvc.cgi/SVNROOT/run-conversion.php?r1=1.13&r2=1.14&diff_format=u
Index: SVNROOT/run-conversion.php
diff -u SVNROOT/run-conversion.php:1.13 SVNROOT/run-conversion.php:1.14
--- SVNROOT/run-conversion.php:1.13 Fri Nov  7 20:10:51 2008
+++ SVNROOT/run-conversion.php  Sat Nov  8 00:55:57 2008
@@ -2,7 +2,7 @@
 
 // 
-
 // Constants
-$version = substr('$Revision: 1.13 $', strlen('$Revision: '), -2);
+$version = substr('$Revision: 1.14 $', strlen('$Revision: '), -2);
 
 $passes = array(
 'processcvs',   // Process CVS modules
@@ -281,6 +281,10 @@
 error("SVN repository at {$this->svnRepositoryPath} doesn't exist 
or isn't writable.\n");
 }
 
+if (trim(system('svnlook youngest ' . 
escapeshellarg($this->svnRepositoryPath))) != 0) {
+return; // Repo isn't empty
+}
+
 v(1, "Running cvs2svn for '{$this->repositoryName}'...\n");
 $converter = new CVS2SVNConverter($this->repositoryName);
 $converter->setOutputPath($this->svnRepositoryPath);



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



[PHP-CVS] cvs: SVNROOT / run-conversion.php

2008-11-07 Thread Gwynne Raskind
gwynne  Fri Nov  7 19:39:12 2008 UTC

  Modified files:  
/SVNROOTrun-conversion.php 
  Log:
  exclude an empty module
  
http://cvs.php.net/viewvc.cgi/SVNROOT/run-conversion.php?r1=1.11&r2=1.12&diff_format=u
Index: SVNROOT/run-conversion.php
diff -u SVNROOT/run-conversion.php:1.11 SVNROOT/run-conversion.php:1.12
--- SVNROOT/run-conversion.php:1.11 Fri Nov  7 08:59:27 2008
+++ SVNROOT/run-conversion.php  Fri Nov  7 19:39:12 2008
@@ -2,7 +2,7 @@
 
 // 
-
 // Constants
-$version = substr('$Revision: 1.11 $', strlen('$Revision: '), -2);
+$version = substr('$Revision: 1.12 $', strlen('$Revision: '), -2);
 
 $passes = array(
 'processcvs',   // Process CVS modules
@@ -156,7 +156,7 @@
 if ($isMetaModule) {
 $modprefix = $moduleName . '/';
 foreach(scandir_no_meta($cvspath) as $module) {
-if (count(scandir($cvspath . $module)) == 2 || $module == 
'Attic') {
+if (count(scandir($cvspath . $module)) == 2 || $module == 
'Attic' || ($moduleName == 'pecl' && $module == 'libextractor')) {
 continue; // empty dir
 }
 $this->optionsFileContents .= <

[PHP-CVS] cvs: SVNROOT / run-conversion.php

2008-11-07 Thread Gwynne Raskind
gwynne  Fri Nov  7 20:10:51 2008 UTC

  Modified files:  
/SVNROOTrun-conversion.php 
  Log:
  make more sensible temp file names
  
http://cvs.php.net/viewvc.cgi/SVNROOT/run-conversion.php?r1=1.12&r2=1.13&diff_format=u
Index: SVNROOT/run-conversion.php
diff -u SVNROOT/run-conversion.php:1.12 SVNROOT/run-conversion.php:1.13
--- SVNROOT/run-conversion.php:1.12 Fri Nov  7 19:39:12 2008
+++ SVNROOT/run-conversion.php  Fri Nov  7 20:10:51 2008
@@ -2,7 +2,7 @@
 
 // 
-
 // Constants
-$version = substr('$Revision: 1.12 $', strlen('$Revision: '), -2);
+$version = substr('$Revision: 1.13 $', strlen('$Revision: '), -2);
 
 $passes = array(
 'processcvs',   // Process CVS modules
@@ -138,11 +138,13 @@
 {
 private $optionsFileContents = NULL;
 private $outputPath = NULL;
+private $seed = 0;
 
-public function __construct()
+public function __construct($seed = NULL)
 {
 $this->optionsFileContents = 
file_get_contents($GLOBALS['options']['skeleton']);
 $this->optionsFileContents = str_replace('@@@TEMPDIR@@@', 
$GLOBALS['temp_path'], $this->optionsFileContents);
+$this->seed = ($seed === NULL ? mt_rand() : $seed);
 }
 
 public function setOutputPath($path)
@@ -189,17 +191,14 @@
 public function run()
 {
 $this->optionsFileContents = str_replace('@@@OUTPUT_PATH@@@', 
$this->outputPath, $this->optionsFileContents);
-do {
-$seed = mt_rand();
-$filename = $GLOBALS['temp_path'] . DIRECTORY_SEPARATOR . 
'cvs2svn.options.' . $seed;
-} while (file_exists($filename));
+$filename = $GLOBALS['temp_path'] . DIRECTORY_SEPARATOR . 
'cvs2svn.options.' . $this->seed;
 file_put_contents($filename, $this->optionsFileContents);
 
 $command = "exec cvs2svn --options=" . escapeshellarg($filename);
 v(2, "Running: '{$command}'...");
 $cvs2svn_process = proc_open($command, array(
 0 => array('pipe', 'r'),
-1 => array('file', $GLOBALS['temp_path'] . DIRECTORY_SEPARATOR 
. 'phpsvn.conversion.' . $seed, 'a'),
+1 => array('file', $GLOBALS['temp_path'] . DIRECTORY_SEPARATOR 
. 'phpsvn.conversion.' . $this->seed, 'w'),
 2 => array('pipe', 'w'),
 ), $pipes, NULL, NULL);
 fclose($pipes[0]);
@@ -283,7 +282,7 @@
 }
 
 v(1, "Running cvs2svn for '{$this->repositoryName}'...\n");
-$converter = new CVS2SVNConverter;
+$converter = new CVS2SVNConverter($this->repositoryName);
 $converter->setOutputPath($this->svnRepositoryPath);
 foreach ($this->cvsModuleList as $cvs_module => $isMeta) {
 $converter->addCVSModule($cvs_module, $isMeta);



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



[PHP-CVS] cvs: SVNROOT / run-conversion.php

2008-11-07 Thread Gwynne Raskind
gwynne  Fri Nov  7 08:59:27 2008 UTC

  Modified files:  
/SVNROOTrun-conversion.php 
  Log:
  fixed some annoying ommissions
  
http://cvs.php.net/viewvc.cgi/SVNROOT/run-conversion.php?r1=1.10&r2=1.11&diff_format=u
Index: SVNROOT/run-conversion.php
diff -u SVNROOT/run-conversion.php:1.10 SVNROOT/run-conversion.php:1.11
--- SVNROOT/run-conversion.php:1.10 Fri Nov  7 08:57:16 2008
+++ SVNROOT/run-conversion.php  Fri Nov  7 08:59:27 2008
@@ -2,7 +2,7 @@
 
 // 
-
 // Constants
-$version = substr('$Revision: 1.10 $', strlen('$Revision: '), -2);
+$version = substr('$Revision: 1.11 $', strlen('$Revision: '), -2);
 
 $passes = array(
 'processcvs',   // Process CVS modules
@@ -156,7 +156,7 @@
 if ($isMetaModule) {
 $modprefix = $moduleName . '/';
 foreach(scandir_no_meta($cvspath) as $module) {
-if (count(scandir($cvspath . $module)) == 2) {
+if (count(scandir($cvspath . $module)) == 2 || $module == 
'Attic') {
 continue; // empty dir
 }
 $this->optionsFileContents .= <

[PHP-CVS] cvs: SVNROOT / run-conversion.php

2008-11-07 Thread Gwynne Raskind
gwynne  Fri Nov  7 08:57:16 2008 UTC

  Modified files:  
/SVNROOTrun-conversion.php 
  Log:
  fixed some errors, removed 'other' repository
  
http://cvs.php.net/viewvc.cgi/SVNROOT/run-conversion.php?r1=1.9&r2=1.10&diff_format=u
Index: SVNROOT/run-conversion.php
diff -u SVNROOT/run-conversion.php:1.9 SVNROOT/run-conversion.php:1.10
--- SVNROOT/run-conversion.php:1.9  Fri Nov  7 06:52:27 2008
+++ SVNROOT/run-conversion.php  Fri Nov  7 08:57:16 2008
@@ -2,7 +2,7 @@
 
 // 
-
 // Constants
-$version = substr('$Revision: 1.9 $', strlen('$Revision: '), -2);
+$version = substr('$Revision: 1.10 $', strlen('$Revision: '), -2);
 
 $passes = array(
 'processcvs',   // Process CVS modules
@@ -345,7 +345,7 @@
 public function installAdminFiles()
 {
 v(1, "Installing administrative files for repository 
'{$this->repositoryName}'...\n");
-v(1, "Done installing administrative files.\n")
+v(1, "Done installing administrative files.\n");
 }
 }
 
@@ -385,7 +385,7 @@
 $repoList['phd'] = new Repository('phd');
 $repoList['pear1'] = new Repository('pear');
 $repoList['gd'] = new Repository('gd');
-$repoList['other'] = new Repository('other');
+   // $repoList['other'] = new Repository('other');
 
 $cvs_modules = scandir_no_meta($options['cvsroot']);
 foreach ($cvs_modules as $cvs_module) {
@@ -397,7 +397,7 @@
 continue;
 }
 if (in_array($cvs_module, array('smarty', 'smarty-web', 'php4.fubar', 
'php4.unused', 'peardoc.backup', 'php3', 'phpfi', 'livedocs',
-'Zend', 'functable', 'dialin', 'docstuff', 'jpgraph', 
'phpoc_de', 'phpdoc-fa_IR', 'lxr', 'portal', 'pres', 'embed'))) {
+'Zend', 'functable', 'dialin', 'docstuff', 'jpgraph', 
'phpoc_de', 'phpdoc-fa_IR', 'lxr', 'portal', 'pres', 'embed', 'imapd', 
'SVNROOT'))) {
 continue;
 } else if (in_array($cvs_module, array('php-gtk', 'php-gtk-doc', 
'old-php-gtk-modules'))) {
 $repoList['gtk']->addCVSModule($cvs_module);
@@ -410,12 +410,12 @@
 $repoList['gd']->addCVSModule($cvs_module);
 } else if (in_array($cvs_module, array('pear', 'pearbot', 'pear-core', 
'peardoc'))) {
 $repoList['pear1']->addCVSModule($cvs_module, $cvs_module == 
'pear');
-} else if (substr($cvs_module, -3) == "web" || in_array($cvs_module, 
array('pres2', 'presentations', 'bugtracker'))) {
+} else if (substr($cvs_module, -3) == "web" || in_array($cvs_module, 
array('pres2', 'presentations', 'bugtracker', 'systems'))) {
 $repoList['web']->addCVSModule($cvs_module);
 } else if (strncmp($cvs_module, "phpdoc", 6) == 0) {
 $repoList['doc']->addCVSModule($cvs_module);
 } else {
-$repoList['other']->addCVSModule($cvs_module);
+ //   $repoList['other']->addCVSModule($cvs_module);
 }
 }
 



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



[PHP-CVS] cvs: SVNROOT / run-conversion.php

2008-11-06 Thread Gwynne Raskind
gwynne  Fri Nov  7 06:52:28 2008 UTC

  Modified files:  
/SVNROOTrun-conversion.php 
  Log:
  add install phase for administrative files, embed is defunct
  
http://cvs.php.net/viewvc.cgi/SVNROOT/run-conversion.php?r1=1.8&r2=1.9&diff_format=u
Index: SVNROOT/run-conversion.php
diff -u SVNROOT/run-conversion.php:1.8 SVNROOT/run-conversion.php:1.9
--- SVNROOT/run-conversion.php:1.8  Fri Nov  7 00:11:20 2008
+++ SVNROOT/run-conversion.php  Fri Nov  7 06:52:27 2008
@@ -2,13 +2,14 @@
 
 // 
-
 // Constants
-$version = substr('$Revision: 1.8 $', strlen('$Revision: '), -2);
+$version = substr('$Revision: 1.9 $', strlen('$Revision: '), -2);
 
 $passes = array(
 'processcvs',   // Process CVS modules
 'svncreate',// Create various SVN repositories
 'cvs2svn',  // Run conversion for each repository
 'cleanup',  // Preform renaming and removes for each repo
+'install',  // Install hook scripts, authz databases, etc.
 );
 
 // 
-
@@ -155,6 +156,9 @@
 if ($isMetaModule) {
 $modprefix = $moduleName . '/';
 foreach(scandir_no_meta($cvspath) as $module) {
+if (count(scandir($cvspath . $module)) == 2) {
+continue; // empty dir
+}
 $this->optionsFileContents .= <addCVSModule($cvs_module);
@@ -483,6 +493,35 @@
 }
 
 // 
-
+// install pass
+function pass_install()
+{
+foreach ($GLOBALS['repoList'] as $repo) {
+$repo->installAdminFiles();
+}
+if (!file_exists($GLOBALS['options']['svnroot'] . DIRECTORY_SEPARATOR . 
'svn.authz')) {
+file_put_contents($GLOBALS['options']['svnroot'] . DIRECTORY_SEPARATOR 
. 'svn.authz', <

[PHP-CVS] cvs: SVNROOT / run-conversion.php

2008-11-06 Thread Gwynne Raskind
gwynne  Fri Nov  7 00:11:20 2008 UTC

  Modified files:  
/SVNROOTrun-conversion.php 
  Log:
  even more modules put in their proper places
  
http://cvs.php.net/viewvc.cgi/SVNROOT/run-conversion.php?r1=1.7&r2=1.8&diff_format=u
Index: SVNROOT/run-conversion.php
diff -u SVNROOT/run-conversion.php:1.7 SVNROOT/run-conversion.php:1.8
--- SVNROOT/run-conversion.php:1.7  Thu Nov  6 23:40:16 2008
+++ SVNROOT/run-conversion.php  Fri Nov  7 00:11:20 2008
@@ -2,7 +2,7 @@
 
 // 
-
 // Constants
-$version = substr('$Revision: 1.7 $', strlen('$Revision: '), -2);
+$version = substr('$Revision: 1.8 $', strlen('$Revision: '), -2);
 
 $passes = array(
 'processcvs',   // Process CVS modules
@@ -382,16 +382,17 @@
 if ($cvs_module == 'CVSROOT') {
 continue;
 }
-if (count(scandir($options['cvsroot'] . DIRECTORY_SEPARATOR . 
$cvs_module)) == 2) {// empty
+if (!is_dir($options['cvsroot'] . DIRECTORY_SEPARATOR . $cvs_module) ||
+count(scandir($options['cvsroot'] . DIRECTORY_SEPARATOR . 
$cvs_module)) == 2) {// empty
 continue;
 }
 if (in_array($cvs_module, array('smarty', 'smarty-web', 'php4.fubar', 
'php4.unused', 'peardoc.backup', 'php3', 'phpfi', 'livedocs',
-'Zend', 'functable', 'dialin', 'docstuff', 'jpgraph'))) {
+'Zend', 'functable', 'dialin', 'docstuff', 'jpgraph', 
'phpoc_de', 'phpdoc-fa_IR', 'lxr', 'portal', 'pres'))) {
 continue;
 } else if (in_array($cvs_module, array('php-gtk', 'php-gtk-doc', 
'old-php-gtk-modules'))) {
 $repoList['gtk']->addCVSModule($cvs_module);
 } else if (in_array($cvs_module, array('TSRM', 'ZendAPI', 
'ZendEngine2', 'php-src', 'pecl', 'pecl4win', 'php-objc', 'php-lang',
-'win-installer', 'bindlib_w32', 'zlib', 'pdo-specs', 
'php-internals-win'))) {
+'win-installer', 'bindlib_w32', 'zlib', 'pdo-specs', 
'php-internals-win', 'fastcgi-isapi'))) {
 $repoList['src']->addCVSModule($cvs_module, $cvs_module == 'pecl');
 } else if ($cvs_module == 'phd') {
 $repoList['phd']->addCVSModule($cvs_module);
@@ -399,10 +400,10 @@
 $repoList['gd']->addCVSModule($cvs_module);
 } else if (in_array($cvs_module, array('pear', 'pearbot', 'pear-core', 
'peardoc'))) {
 $repoList['pear1']->addCVSModule($cvs_module, $cvs_module == 
'pear');
+} else if (substr($cvs_module, -3) == "web" || in_array($cvs_module, 
array('pres2', 'presentations', 'bugtracker'))) {
+$repoList['web']->addCVSModule($cvs_module);
 } else if (strncmp($cvs_module, "phpdoc", 6) == 0) {
 $repoList['doc']->addCVSModule($cvs_module);
-} else if (substr($cvs_module, -3) == "web") {
-$repoList['web']->addCVSModule($cvs_module);
 } else {
 $repoList['other']->addCVSModule($cvs_module);
 }



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



[PHP-CVS] cvs: SVNROOT / run-conversion.php

2008-11-06 Thread Gwynne Raskind
gwynne  Thu Nov  6 23:40:16 2008 UTC

  Modified files:  
/SVNROOTrun-conversion.php 
  Log:
  more modules put in their proper places
  
http://cvs.php.net/viewvc.cgi/SVNROOT/run-conversion.php?r1=1.6&r2=1.7&diff_format=u
Index: SVNROOT/run-conversion.php
diff -u SVNROOT/run-conversion.php:1.6 SVNROOT/run-conversion.php:1.7
--- SVNROOT/run-conversion.php:1.6  Thu Nov  6 23:38:51 2008
+++ SVNROOT/run-conversion.php  Thu Nov  6 23:40:16 2008
@@ -2,7 +2,7 @@
 
 // 
-
 // Constants
-$version = substr('$Revision: 1.6 $', strlen('$Revision: '), -2);
+$version = substr('$Revision: 1.7 $', strlen('$Revision: '), -2);
 
 $passes = array(
 'processcvs',   // Process CVS modules
@@ -391,7 +391,7 @@
 } else if (in_array($cvs_module, array('php-gtk', 'php-gtk-doc', 
'old-php-gtk-modules'))) {
 $repoList['gtk']->addCVSModule($cvs_module);
 } else if (in_array($cvs_module, array('TSRM', 'ZendAPI', 
'ZendEngine2', 'php-src', 'pecl', 'pecl4win', 'php-objc', 'php-lang',
-'win-installer', 'bindlib_w32', 'zlib', 'pdo-specs'))) {
+'win-installer', 'bindlib_w32', 'zlib', 'pdo-specs', 
'php-internals-win'))) {
 $repoList['src']->addCVSModule($cvs_module, $cvs_module == 'pecl');
 } else if ($cvs_module == 'phd') {
 $repoList['phd']->addCVSModule($cvs_module);



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



[PHP-CVS] cvs: SVNROOT / run-conversion.php

2008-11-06 Thread Gwynne Raskind
gwynne  Thu Nov  6 23:38:52 2008 UTC

  Modified files:  
/SVNROOTrun-conversion.php 
  Log:
  corrected fixup rules, allow mkdir mode in fixup, add gd repo, add some 
unused modules to the exclusion list
  http://cvs.php.net/viewvc.cgi/SVNROOT/run-conversion.php?r1=1.5&r2=1.6&diff_format=u
Index: SVNROOT/run-conversion.php
diff -u SVNROOT/run-conversion.php:1.5 SVNROOT/run-conversion.php:1.6
--- SVNROOT/run-conversion.php:1.5  Wed Nov  5 18:15:59 2008
+++ SVNROOT/run-conversion.php  Thu Nov  6 23:38:51 2008
@@ -2,7 +2,7 @@
 
 // 
-
 // Constants
-$version = substr('$Revision: 1.5 $', strlen('$Revision: '), -2);
+$version = substr('$Revision: 1.6 $', strlen('$Revision: '), -2);
 
 $passes = array(
 'processcvs',   // Process CVS modules
@@ -287,35 +287,53 @@
 $converter->run();
 }
 
-public function fixupRepository($ignoreErrors = FALSE)
+private function executeSVNCommand($cmd)
+{
+$realCommand = "exec svn {$cmd} 2>&1";
+v(2, "Running: '{$realCommand}'...");
+exec($command, $output, $exitstatus);
+if ($exitstatus != 0) {
+error("\nAn error occurred. Exit status was {$exitstatus}. 
Output:\n" . implode("\n", $output) . "\n", $exitstatus);
+}
+v(2, " done.\n");
+return $output;
+}
+
+private function mkdirPath($path, $message)
+{
+$this->executeSVNCommand('mkdir -m ' . escapeshellarg($message) .
+ ' file:///' . 
escapeshellarg($this->svnRepositoryPath) . '/' . escapeshellarg($path));
+}
+
+private function deletePath($path, $message)
+{
+$this->executeSVNCommand('rm -m ' . escapeshellarg($message) .
+ ' file:///' . 
escapeshellarg($this->svnRepositoryPath) . '/' . escapeshellarg($path));
+}
+
+private function movePath($srcPath, $dstPath, $message)
+{
+$this->executeSVNCommand('mv -m ' . escapeshellarg($message) .
+ ' file:///' . 
escapeshellarg($this->svnRepositoryPath) . '/' . escapeshellarg($srcPath) .
+ ' file:///' . 
escapeshellarg($this->svnRepositoryPath) . '/' . escapeshellarg($dstPath));
+}
+
+public function fixupRepository()
 {
 v(1, "Executing fixup commands for repository 
'{$this->repositoryName}'...\n");
+$message = '[SVN CONVERSION] Reorganization in repository 
{$this->repositoryName}.';
 foreach ($renamingRules as $rule) {
 switch ($rule['mode']) {
-case 'move_all':
-error("Moving tags and branches is not yet supported! TODO 
IMPLEMENT ME.\n");
+case 'mkdir':
+$this->mkdirPath($rule['srcPath'], $message);
 break;
 case 'delete':
-$command  = "exec svn rm ";
-$command .= "-m '[SVN CONVERSION] Reorganization in 
repository {$this->repositoryName}.' ";
-$command .= "file:///" . 
escapeshellarg($this->svnRepositoryPath) . "/" . 
escapeshellarg($rule['srcPath']) . " 2>&1";
+$this->deletePath($rule['srcPath'], $message);
 break;
 case 'move':
-$command  = "exec svn mv ";
-$command .= "-m '[SVN CONVERSION] Reorganization in 
repository {$this->repositoryName}.' ";
-$command .= "file:///" . 
escapeshellarg($this->svnRepositoryPath) . "/" . 
escapeshellarg($rule['srcPath']) . " ";
-$command .= "file:///" . 
escapeshellarg($this->svnRepositoryPath) . "/" . 
escapeshellarg($rule['dstPath']) . " 2>&1";
+$this->movePath($rule['srcPath'], $rule['dstPath'], 
$message);
 break;
 }
-v(2, "Running: '{$command}'...");
-exec($command, $output, $exitstatus);
-if ($exitstatus != 0 && $ignoreErrors === FALSE) {
-error("\nAn error occurred. Exit status was {$exitstatus}. 
Output:\n" . implode("\n", $output) . "\n", $exitstatus);
-} else if ($exitStatus != 0) {
-v(2, " warning: an error occurred\n");
-} else {
-v(2, " done.\n");
-}
 }
 v(1, "Done fixing up.");
 }
@@ -356,6 +374,7 @@
 $repoList['web'] = new Repository('php-web');
 $repoList['phd'] = new Repository('phd');
 $repoList['pear1'] = new Repository('pear');
+$repoList['gd'] = new Repository('gd');
 $repoList['other'] = new Repository('other');
 
 $cvs_modules = scandir_no_meta($options['cvsroot']);
@@ -366,7 +385,8 @@
 if (count(scandir($options['cvsroot'] . DIRECTORY_SEPARATOR . 
$cvs_module)) == 2) {// empty
 continue

[PHP-CVS] cvs: SVNROOT / run-conversion.php

2008-10-30 Thread Gwynne Raskind
gwynne  Fri Oct 31 03:22:27 2008 UTC

  Modified files:  
/SVNROOTrun-conversion.php 
  Log:
  chop the CVS keyword off the version number, why not?
  
http://cvs.php.net/viewvc.cgi/SVNROOT/run-conversion.php?r1=1.3&r2=1.4&diff_format=u
Index: SVNROOT/run-conversion.php
diff -u SVNROOT/run-conversion.php:1.3 SVNROOT/run-conversion.php:1.4
--- SVNROOT/run-conversion.php:1.3  Fri Oct 31 03:13:25 2008
+++ SVNROOT/run-conversion.php  Fri Oct 31 03:22:27 2008
@@ -1,6 +1,6 @@
 http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-CVS] cvs: SVNROOT / run-conversion.php

2008-10-30 Thread Gwynne Raskind
gwynne  Fri Oct 31 03:13:25 2008 UTC

  Modified files:  
/SVNROOTrun-conversion.php 
  Log:
  Various passes performed by the script are now specified in a more extensible 
manner
  
http://cvs.php.net/viewvc.cgi/SVNROOT/run-conversion.php?r1=1.2&r2=1.3&diff_format=u
Index: SVNROOT/run-conversion.php
diff -u SVNROOT/run-conversion.php:1.2 SVNROOT/run-conversion.php:1.3
--- SVNROOT/run-conversion.php:1.2  Sun Oct 26 23:09:41 2008
+++ SVNROOT/run-conversion.php  Fri Oct 31 03:13:25 2008
@@ -1,6 +1,13 @@
  '-p',
 'long_name' => '--pass',
 'default' => NULL,
-'description' => 'Which pass to run. One of: svncreate, cvs2svn, svnrm, 
reorg. If not specified, all passes will run.',
+'description' => 'Which pass to run. One of: ' . implode(', ', $passes) . 
'. If not specified, all passes will run.',
 'action' => 'StoreString',
-'choices' => array('svncreate', 'cvs2svn', 'svnrm', 'reorg')));
+'choices' => $passes));
 
 try {
 $result = $cmdline_parser->parse();
@@ -73,7 +80,16 @@
 v(1, "PHP Group CVS->SVN respository conversion.\n");
 v(1, "Started at " . date(DATE_RFC2822) . "\n");
 
-if (is_null($options['pass']) || $options['pass'] == 'svncreate') {
+foreach ($passes as $pass) {
+if (is_null($options['pass']) || $options['pass'] == $pass) {
+call_user_func('pass_' . $pass);
+}
+}
+
+function pass_svncreate()
+{
+global $options;
+
 v(1, "Running svncreate pass...\n");
 
 $command = "exec svnadmin create {$options['svnroot']} 2>&1";
@@ -86,7 +102,10 @@
 v(3, "Output:\n" . implode("\n", $output) . "\n");
 }
 
-if (is_null($options['pass']) || $options['pass'] == 'cvs2svn') {
+function pass_cvs2svn()
+{
+global $options;
+
 v(1, "Running cvs2svn pass...\n");
 
 $command = "exec cvs2svn --options=phpsvn.options";
@@ -116,7 +135,10 @@
 v(3, "Output is in ./phpsvn.conversion.out.\n");
 }
 
-if (is_null($options['pass']) || $options['pass'] == 'svnrm') {
+function pass_svnrm()
+{
+global $options;
+
 v(1, "Running svnrm pass...\n");
 
 $command = "exec svn rm -m \"[SVN CONVERSION] Removing .svn directories 
that break SVN checkout.\" " .
@@ -153,7 +175,10 @@
 v(3, "Output:\n" . implode("\n", $output) . "\n");
 }
 
-if (is_null($options['pass']) || $options['pass'] == 'reorg') {
+function pass_reorg()
+{
+global $options;
+
 error("If this were implemented yet, a series of svn cp, svn rm, and svn 
mv commands would follow. It isn't, so they don't. Sorry.\n");
 }
 



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



[PHP-CVS] cvs: SVNROOT / run-conversion.php

2008-10-26 Thread Gwynne Raskind
gwynne  Sun Oct 26 23:09:41 2008 UTC

  Modified files:  
/SVNROOTrun-conversion.php 
  Log:
  Rewrote conversion script to use Console_CommandLine and verbosity levels.
  http://cvs.php.net/viewvc.cgi/SVNROOT/run-conversion.php?r1=1.1&r2=1.2&diff_format=u
Index: SVNROOT/run-conversion.php
diff -u SVNROOT/run-conversion.php:1.1 SVNROOT/run-conversion.php:1.2
--- SVNROOT/run-conversion.php:1.1  Fri Oct 24 02:45:27 2008
+++ SVNROOT/run-conversion.php  Sun Oct 26 23:09:41 2008
@@ -1,46 +1,97 @@
 SVN respository conversion version {$version}.\n";
-print "Started at " . date(DATE_RFC2822) . "\n";
+require_once 'Console/CommandLine.php';
 
-$CVSROOT = "/home/repository";
-$SVNROOT = "/home/repository-svn";
-
-$do_cvs2svn = TRUE;
-$do_svnrm = TRUE;
-$do_reorg = TRUE;
+$cmdline_parser = new Console_CommandLine(array(
+'description' => 'PHP Group CVS->SVN respository converter',
+'version' => $version,
+));
+$cmdline_parser->addOption('verbose', array(
+'short_name' => '-v',
+'long_name' => '--verbose',
+'default' => 1,
+'description' => 'Verbosity of output. Specify multiple times to increase 
verbosity.',
+'action' => 'Counter'));
+$cmdline_parser->addOption('cvsroot', array(
+'short_name' => '-c',
+'long_name' => '--cvsroot',
+'default' => '/home/repository',
+'description' => 'Specify the CVS repository to operate on.',
+'action' => 'StoreString'));
+$cmdline_parser->addOption('svnroot', array(
+'short_name' => '-s',
+'long_name' => '--svnroot',
+'default' => '/home/repository-svn',
+'description' => 'Specify the SVN repository to create.',
+'action' => 'StoreString'));
+$cmdline_parser->addOption('pass', array(
+'short_name' => '-p',
+'long_name' => '--pass',
+'default' => NULL,
+'description' => 'Which pass to run. One of: svncreate, cvs2svn, svnrm, 
reorg. If not specified, all passes will run.',
+'action' => 'StoreString',
+'choices' => array('svncreate', 'cvs2svn', 'svnrm', 'reorg')));
+
+try {
+$result = $cmdline_parser->parse();
+$options = $result->options;
+} catch (Exception $ex) {
+$parser->displayError($ex->getMessage());
+exit(1);
+}
 
-function is_option($optName, $arg, &$value)
+function v($level, $message)
 {
-if (strncmp($arg, $optName, strlen($optName)) == 0) {
-if (!is_null($value)) {
-$value = substr($arg, strlen($optName) + 1);
-}
-return true;
+if ($GLOBALS['options']['verbose'] >= $level) {
+print $message;
 }
-return false;
 }
 
-foreach ($argv as $i => $arg) {
-if (is_option("--cvsroot", $arg, $value)) {
-$CVSROOT = $value;
-} else if (is_option("--svnroot", $arg, $value)) {
-$SVNROOT = $value;
-} else if (is_option("--cvs2svn", $arg, $value)) {
-$do_cvs2svn = ($value == 'true');
-} else if (is_option("--svnrm", $arg, $value)) {
-$do_svnrm = ($value == 'true');
-} else if (is_option("--reorg", $arg, $value)) {
-$do_reorg = ($value == 'true');
+function error($message, $status = 1)
+{
+print $message;
+exit($status);
+}
+
+if (!is_dir($options['cvsroot']) || !is_readable($options['cvsroot']) || 
!is_executable($options['cvsroot'])) {
+error("CVS root directory must exist, be a directory, and be readable and 
searchable.\n");
+}
+
+if (is_null($options['pass']) || $options['pass'] == 'svncreate') {
+if (file_exists($options['svnroot'])) {
+error("SVN root directory can not exist if running the svncreate 
pass.\n");
+}
+if (!is_dir(dirname($options['svnroot'])) || 
!is_writable(dirname($options['svnroot']))) {
+error("SVN root directory parent must exist, be a directory, and be 
writable if running the svncreate pass.\n");
+}
+} else if (!is_dir($options['svnroot']) || !is_writable($options['svnroot'])) {
+error("SVN root directory must exist and be writeable if not running the 
svncreate pass.\n");
+}
+   
+v(1, "PHP Group CVS->SVN respository conversion.\n");
+v(1, "Started at " . date(DATE_RFC2822) . "\n");
+
+if (is_null($options['pass']) || $options['pass'] == 'svncreate') {
+v(1, "Running svncreate pass...\n");
+
+$command = "exec svnadmin create {$options['svnroot']} 2>&1";
+v(2, "Running: '{$command}'...");
+exec($command, $output, $exitstatus);
+if ($exitstatus != 0) {
+error("\nAn error occurred. Exit status was {$exitstatus}. Output:\n" 
. implode("\n", $output) . "\n", $exitstatus);
 }
+v(2, " done.\n");
+v(3, "Output:\n" . implode("\n", $output) . "\n");
 }
 
-if ($do_cvs2svn) {
-print "Running cvs2svn...\n";
+if (is_null($options['pass']) || $options['pass'] == 'cvs2svn') {
+v(1, "Running cvs2svn pass...\n");
 
-$cvs2svn_process = proc_open("cvs2svn --options=phpsvn.options", array(
+$command = "exec cvs2svn --options=phpsvn.options";
+v(2, "Running: '{$command} > ./phpsvn.conversion.out 2>&php'...");
+

[PHP-CVS] cvs: SVNROOT / run-conversion.php

2008-10-23 Thread Gwynne Raskind
gwynne  Fri Oct 24 02:45:27 2008 UTC

  Added files: 
/SVNROOTrun-conversion.php 
  Log:
  initial version of conversion script
  

http://cvs.php.net/viewvc.cgi/SVNROOT/run-conversion.php?view=markup&rev=1.1
Index: SVNROOT/run-conversion.php
+++ SVNROOT/run-conversion.php
SVN respository conversion version {$version}.\n";
print "Started at " . date(DATE_RFC2822) . "\n";

$CVSROOT = "/home/repository";
$SVNROOT = "/home/repository-svn";

$do_cvs2svn = TRUE;
$do_svnrm = TRUE;
$do_reorg = TRUE;

function is_option($optName, $arg, &$value)
{
if (strncmp($arg, $optName, strlen($optName)) == 0) {
if (!is_null($value)) {
$value = substr($arg, strlen($optName) + 1);
}
return true;
}
return false;
}

foreach ($argv as $i => $arg) {
if (is_option("--cvsroot", $arg, $value)) {
$CVSROOT = $value;
} else if (is_option("--svnroot", $arg, $value)) {
$SVNROOT = $value;
} else if (is_option("--cvs2svn", $arg, $value)) {
$do_cvs2svn = ($value == 'true');
} else if (is_option("--svnrm", $arg, $value)) {
$do_svnrm = ($value == 'true');
} else if (is_option("--reorg", $arg, $value)) {
$do_reorg = ($value == 'true');
}
}

if ($do_cvs2svn) {
print "Running cvs2svn...\n";

$cvs2svn_process = proc_open("cvs2svn --options=phpsvn.options", array(
0 => array('pipe', 'r'),
1 => array('file', './phpsvn.conversion.out', 'w'),
2 => array('pipe', 'w'),
), $pipes, NULL, NULL);
fclose($pipes[0]);
$procinfo = array();

do {
usleep(50);
$procinfo = proc_get_status($cvs2svn_process);
} while ($procinfo['running'] == TRUE);

$errorText = stream_get_contents($pipes[2]);
fclose($pipes[2]);

proc_close($cvs2svn_process);

if ($procinfo['exitcode'] != 0) {
print "Error executing cvs2svn. Error output is:\n{$errorText}\n";
exit($procinfo['exitcode']);
}
}

if ($do_svnrm) {
print "Running svn rm...\n";

exec("svn rm -m \"[SVN CONVERSION] Removing .svn directories that break SVN 
checkout.\" " .
"file:///{$SVNROOT}/pear/Selenium/branches/shin/.svn " .
"file:///{$SVNROOT}/pear/Selenium/branches/shin/tests/.svn " .
"file:///{$SVNROOT}/pear/Selenium/branches/shin/tests/events/.svn " 
.
"file:///{$SVNROOT}/pear/Selenium/branches/shin/tests/html/.svn " .
"file:///{$SVNROOT}/pear/Selenium/branches/shin/docs/.svn " .
"file:///{$SVNROOT}/pear/Selenium/branches/shin/examples/.svn " .
"file:///{$SVNROOT}/pear/Selenium/tags/start/tests/.svn " .
"file:///{$SVNROOT}/pear/Selenium/tags/start/tests/events/.svn " .
"file:///{$SVNROOT}/pear/Selenium/tags/start/tests/html/.svn " .
"file:///{$SVNROOT}/pear/Selenium/tags/start/docs/.svn " .
"file:///{$SVNROOT}/pear/Selenium/tags/start/examples/.svn " .
"file:///{$SVNROOT}/pear/Selenium/tags/start/.svn " .
"file:///{$SVNROOT}/pear/Testing_Selenium/branches/shin/.svn " .
"file:///{$SVNROOT}/pear/Testing_Selenium/branches/shin/tests/.svn 
" .

"file:///{$SVNROOT}/pear/Testing_Selenium/branches/shin/tests/events/.svn " .

"file:///{$SVNROOT}/pear/Testing_Selenium/branches/shin/tests/html/.svn " .
"file:///{$SVNROOT}/pear/Testing_Selenium/branches/shin/docs/.svn " 
.

"file:///{$SVNROOT}/pear/Testing_Selenium/branches/shin/examples/.svn " .
"file:///{$SVNROOT}/pear/Testing_Selenium/tags/start/.svn " .
"file:///{$SVNROOT}/pear/Testing_Selenium/tags/start/tests/.svn " .

"file:///{$SVNROOT}/pear/Testing_Selenium/tags/start/tests/events/.svn " .

"file:///{$SVNROOT}/pear/Testing_Selenium/tags/start/tests/html/.svn " .
"file:///{$SVNROOT}/pear/Testing_Selenium/tags/start/docs/.svn " .
"file:///{$SVNROOT}/pear/Testing_Selenium/tags/start/examples/.svn 
2>&1", $svnrm_output, $exitstatus);
if ($exitstatus != 0) {
print "Error executing svn rm. Error output is:\n" . implode("\n", 
$svnrm_output) . "\n";
exit($exitstatus);
}
}

if ($do_reorg) {
print "If this were implemented yet, a series of svn cp, svn rm, and svn mv 
commands would follow. It isn't, so they don't. Sorry.\n";
exit(1);
}

print "Finished at " . date(DATE_RFC2822) . "\n";

?>



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