Index: trunk/tools/testswarm/scripts/testswarm-mw-fetcher.php |
— | — | @@ -212,7 +212,7 @@ |
213 | 213 | $this->debug( 'Checkouts dir empty? Looking up remote repo...', __METHOD__ ); |
214 | 214 | $next = $this->minRev; |
215 | 215 | } else { |
216 | | - $next = (int)$cur;//$this->getNextFollowingRevId( $cur ); |
| 216 | + $next = $this->getNextFollowingRevId( $cur ); |
217 | 217 | } |
218 | 218 | |
219 | 219 | $this->debug( __METHOD__ . ": Going to use r{$next}" ); |
— | — | @@ -463,13 +463,30 @@ |
464 | 464 | * @param $id integer: Revision id to append settings to. |
465 | 465 | */ |
466 | 466 | public function doAppendSettings() { |
467 | | - $this->log( 'Appending settings... *TODO!*', __METHOD__ ); |
468 | | - return true; |
| 467 | + $this->main->log( 'Appending settings... *TODO!*', __METHOD__ ); |
469 | 468 | |
470 | | - // append to mwPath/LocalSettings.php |
471 | | - // -- contents of LocalSettings.tpl.php |
472 | | - // -- require_once( '{$this->getPath('globalsettings')}' );" |
| 469 | + $localSettings = "{$this->paths['mw']}/LocalSettings.php"; |
| 470 | + if ( !file_exists( $localSettings ) ) { |
| 471 | + throw new Exception(__METHOD__ . ": LocalSettings.php missing, expected at {$localSettings}" ); |
| 472 | + } |
473 | 473 | |
| 474 | + // Optional, only if existant |
| 475 | + if ( file_exists( $this->paths['localsettingstpl'] ) ) { |
| 476 | + // @todo |
| 477 | + } |
| 478 | + |
| 479 | + // Required, must exist to avoid having to do backwards editing |
| 480 | + // Make empt file if needed |
| 481 | + if ( !file_exists( $this->paths['globalsettings'] ) ) { |
| 482 | + $this->main->debug( "No GlobalSettings.php found at {$this->paths['globalsettings']}. Creating...", __METHOD__ ); |
| 483 | + if ( touch( $this->paths['globalsettings'] ) ) { |
| 484 | + $this->main->debug( "Created {$this->paths['globalsettings']}", __METHOD__ ); |
| 485 | + } else { |
| 486 | + throw new Exception(__METHOD__ . ": Aborting. Unable to create GlobalSettings.php" ); |
| 487 | + } |
| 488 | + } |
| 489 | + // @todo |
| 490 | + |
474 | 491 | /** |
475 | 492 | * Possible additional common settings to append to LocalSettings after install: |
476 | 493 | * See gerrit integration/jenkins.git: |
— | — | @@ -480,5 +497,6 @@ |
481 | 498 | * #$wgDebugLogFile = dirname( __FILE__ ) . '/build/debug.log'; |
482 | 499 | * $wgDebugDumpSql = true; |
483 | 500 | */ |
| 501 | + return true; |
484 | 502 | } |
485 | | -} |
\ No newline at end of file |
| 503 | +} |