r81510 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r81509‎ | r81510 | r81511 >
Date:04:36, 4 February 2011
Author:tstarling
Status:ok
Tags:
Comment:
* Fix file paths
* Wait for slave lag
Modified paths:
  • /branches/wmf/1.16wmf4/maintenance/upgrade-1.17wmf1-initial.php (modified) (history)

Diff [purge]

Index: branches/wmf/1.16wmf4/maintenance/upgrade-1.17wmf1-initial.php
@@ -43,6 +43,10 @@
4444 foreach ( $wikisBySection[$section] as $wiki ) {
4545 $db->selectDB( $wiki );
4646 upgradeWiki( $db );
 47+ while ( $db->getLag() > 10 ) {
 48+ echo "Waiting for $server to catch up to master.\n";
 49+ sleep( 60 );
 50+ }
4751 }
4852 }
4953 }
@@ -65,17 +69,18 @@
6670
6771 echo "$server $wiki 1.17wmf1-initial";
6872
69 - $db->sourceFile( dirname( __FILE__ ) .'/schema-changes-1.17wmf1-initial.sql' );
 73+ sourceUpgradeFile( $db, dirname( __FILE__ ) .'/schema-changes-1.17wmf1-initial.sql' );
7074
7175 if ( $wiki === 'commonswiki' ) {
7276 echo " GlobalUsage";
73 - $db->sourceFile( "$IP/extensions/GlobalUsage/patches/" .
 77+ sourceUpgradeFile( $db, dirname(__FILE__).'/../extensions/GlobalUsage/patches/' .
7478 'patch-globalimagelinks_wiki_nsid_title.sql' );
7579 }
7680
7781 if ( $wiki === 'mediawikiwiki' ) {
7882 echo " CodeReview";
79 - $db->sourceFile( "$IP/extensions/CodeReview/archives/code_signoffs.sql" );
 83+ sourceUpgradeFile( $db, dirname(_FILE__).'/../extensions/CodeReview/archives/' .
 84+ 'code_signoffs.sql' );
8085 }
8186
8287 $db->insert( 'updatelog',
@@ -84,4 +89,12 @@
8590 echo " ok\n";
8691 }
8792
 93+function sourceUpgradeFile( $db, $file ) {
 94+ if ( !file_exists( $file ) ) {
 95+ echo "File missing: $file\n";
 96+ exit( 1 );
 97+ }
 98+ $db->sourceFile( $file );
 99+}
88100
 101+

Status & tagging log