Index: trunk/tools/testswarm/scripts/testswarm-mediawiki-svn.php |
— | — | @@ -118,7 +118,6 @@ |
119 | 119 | */ |
120 | 120 | |
121 | 121 | # Get latest revision number of HEAD for QUnit tests dir and Resources dir |
122 | | -$tmpCmd = array(); |
123 | 122 | $svnHeadRevs = array( |
124 | 123 | 'tests' => null, |
125 | 124 | 'resources' => null, |
— | — | @@ -128,23 +127,28 @@ |
129 | 128 | foreach ( array( |
130 | 129 | 'tests' => $svnCoRepoInfo['rootBase'] . '/' . $svnCoRepoInfo['qunitDir'], |
131 | 130 | 'resources' => $svnCoRepoInfo['rootBase'] . '/' . $svnCoRepoInfo['resourcesDir'], |
132 | | -) as $key => $url ) { |
| 131 | +) as $dirKey => $dirUrl ) { |
133 | 132 | |
134 | | - exec( "svn info $url", $tmpCmd['output'], $tmpCmd['return'] ); |
| 133 | + $tmpCmd = array(); |
| 134 | + |
| 135 | + exec( "svn info $dirUrl", $tmpCmd['output'], $tmpCmd['return'] ); |
135 | 136 | |
136 | 137 | 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 ); |
139 | 142 | if ( trim( $lineParts[0] ) == 'Last Changed Rev' ) { |
140 | | - $svnHeadRevs[$key] = trim( $lineParts[1] ); |
| 143 | + |
| 144 | + $svnHeadRevs[$dirKey] = trim( $lineParts[1] ); |
141 | 145 | break; |
142 | 146 | } |
| 147 | + |
| 148 | + unset( $cmdLine, $lineParts ); |
143 | 149 | } |
144 | | - unset( $line, $lineParts ); |
145 | 150 | } |
146 | | - |
| 151 | + unset( $tmpCmd, $key, $dirUrl ); |
147 | 152 | } |
148 | | -unset( $tmpCmd, $key, $url ); |
149 | 153 | |
150 | 154 | if ( empty( $svnHeadRevs['tests'] ) || empty( $svnHeadRevs['resources'] ) ) { |
151 | 155 | die("Problem getting svn info."); |