r105310 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r105309‎ | r105310 | r105311 >
Date:16:25, 6 December 2011
Author:hashar
Status:ok
Tags:
Comment:
add option to switch mode. add production mode
Modified paths:
  • /trunk/tools/testswarm/scripts/testswarm-mw-fetcher-run.php (modified) (history)

Diff [purge]

Index: trunk/tools/testswarm/scripts/testswarm-mw-fetcher-run.php
@@ -13,9 +13,17 @@
1414 // Choose a mode below and the switch structure will forge options for you!
1515 $mode = 'dev';
1616 $mode = 'preprod';
17 -#$mode = 'prod';
 17+$mode = 'prod';
 18+if( !(count($argv) === 2 && preg_match( '/^--(dev|preprod|prod)$/', $argv[1] ) ) ) {
 19+ print "$argv[0]: expects exactly one of the following options:\n\n";
 20+ print " --dev : fetch only this script repository.\n";
 21+ print " --preprod : fetch part of phase3 in a temp directory with debugging\n";
 22+ print " --prod : fetch phase3 in a real directory without debugging\n";
 23+ print "\nBehavior is hardcoded in this script.\n";
 24+ exit(1);
 25+}
 26+$mode = substr( $argv[1], 2 );
1827
19 -
2028 # Magic stuff for lazy people
2129 switch( $mode ) {
2230 # Options for local debuggings
@@ -38,6 +46,15 @@
3947 );
4048 break;
4149
 50+ case 'prod':
 51+ $options = array(
 52+ 'debug' => false,
 53+ 'root' => '/home/testswarm/mediawiki-trunk',
 54+ 'svnUrl' => 'http://svn.wikimedia.org/svnroot/mediawiki/trunk/phase3',
 55+ 'minRev' => 105305,
 56+ );
 57+ break;
 58+
4259 default:
4360 print "Mode $mode unimplemented. Please edit ".__FILE__."\n";
4461 exit( 1 );

Status & tagging log