r88695 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r88694‎ | r88695 | r88696 >
Date:22:33, 23 May 2011
Author:krinkle
Status:ok
Tags:
Comment:
Synchronize TestSwarm script. Looks like the previous version ignored the svn HEAD in /resources and only updated on a commit in /tests/qunit. Fixed now.
Modified paths:
  • /trunk/tools/testswarm/scripts/testswarm-mediawiki-svn.php (modified) (history)

Diff [purge]

Index: trunk/tools/testswarm/scripts/testswarm-mediawiki-svn.php
@@ -118,7 +118,6 @@
119119 */
120120
121121 # Get latest revision number of HEAD for QUnit tests dir and Resources dir
122 -$tmpCmd = array();
123122 $svnHeadRevs = array(
124123 'tests' => null,
125124 'resources' => null,
@@ -128,23 +127,28 @@
129128 foreach ( array(
130129 'tests' => $svnCoRepoInfo['rootBase'] . '/' . $svnCoRepoInfo['qunitDir'],
131130 'resources' => $svnCoRepoInfo['rootBase'] . '/' . $svnCoRepoInfo['resourcesDir'],
132 -) as $key => $url ) {
 131+) as $dirKey => $dirUrl ) {
133132
134 - exec( "svn info $url", $tmpCmd['output'], $tmpCmd['return'] );
 133+ $tmpCmd = array();
 134+
 135+ exec( "svn info $dirUrl", $tmpCmd['output'], $tmpCmd['return'] );
135136
136137 if ( is_array( $tmpCmd['output'] ) && count( $tmpCmd['output'] ) ) {
137 - foreach( $tmpCmd['output'] as $line ) {
138 - $lineParts = explode( ':', $line, 2 );
 138+
 139+ foreach( $tmpCmd['output'] as $cmdLine ) {
 140+
 141+ $lineParts = explode( ':', $cmdLine, 2 );
139142 if ( trim( $lineParts[0] ) == 'Last Changed Rev' ) {
140 - $svnHeadRevs[$key] = trim( $lineParts[1] );
 143+
 144+ $svnHeadRevs[$dirKey] = trim( $lineParts[1] );
141145 break;
142146 }
 147+
 148+ unset( $cmdLine, $lineParts );
143149 }
144 - unset( $line, $lineParts );
145150 }
146 -
 151+ unset( $tmpCmd, $key, $dirUrl );
147152 }
148 -unset( $tmpCmd, $key, $url );
149153
150154 if ( empty( $svnHeadRevs['tests'] ) || empty( $svnHeadRevs['resources'] ) ) {
151155 die("Problem getting svn info.");

Status & tagging log