r97111 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r97110‎ | r97111 | r97112 >
Date:22:55, 14 September 2011
Author:aaron
Status:ok
Tags:
Comment:
skip svn checkout if dir exist instead of exiting completely
Modified paths:
  • /trunk/tools/mwmultiversion/multiversion/checkoutMediaWiki (modified) (history)

Diff [purge]

Index: trunk/tools/mwmultiversion/multiversion/checkoutMediaWiki
@@ -42,21 +42,22 @@
4343 # Create the destination path to SVN checkout to...
4444 $destIP = "$commonHomeDir/$dstVersion";
4545 if ( file_exists( $destIP ) ) {
46 - die( "Cannot checkout, the directory $destIP already exists.\n" );
47 - }
48 - print "Creating checkout directory $destIP...";
49 - mkdir( $destIP, 0775 );
50 - print "done.\n";
 46+ print "Skipping checkout, the directory $destIP already exists.\n";
 47+ } else {
 48+ print "Creating checkout directory $destIP...";
 49+ mkdir( $destIP, 0775 );
 50+ print "done.\n";
5151
52 - print "Checking out $source to $destIP...\n";
53 - # Checkout the SVN directory...
54 - $retval = 1; // error by default?
55 - passthru( "svn checkout $source $destIP", $retval );
56 - if ( $retval !== 0 ) {
57 - rmdir( $destIP ); // rollback
58 - die( "\nUnable to checkout SVN path.\n" );
 52+ print "Checking out $source to $destIP...\n";
 53+ # Checkout the SVN directory...
 54+ $retval = 1; // error by default?
 55+ passthru( "svn checkout $source $destIP", $retval );
 56+ if ( $retval !== 0 ) {
 57+ rmdir( $destIP ); // rollback
 58+ die( "\nUnable to checkout SVN path.\n" );
 59+ }
 60+ print "...SVN checkout done.\n";
5961 }
60 - print "...SVN checkout done.\n";
6162
6263 $localSettingsCode = <<<EOT
6364 <?php

Status & tagging log