r92977 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r92976‎ | r92977 | r92978 >
Date:06:10, 24 July 2011
Author:aaron
Status:ok (Comments)
Tags:
Comment:
* Version ExtensionMessages.php
* Fixed error msg wording (it's the .dat file we read)
Modified paths:
  • /trunk/tools/mwmultiversion/scripts/scap (modified) (history)
  • /trunk/tools/mwmultiversion/scripts/scap-2 (modified) (history)
  • /trunk/tools/mwmultiversion/wmf-config/CommonSettings.php (modified) (history)

Diff [purge]

Index: trunk/tools/mwmultiversion/scripts/scap-2
@@ -14,7 +14,7 @@
1515
1616 mwVersionNums=(`mwversionsinuse`)
1717 if [ -z "$mwVersionNums" ]; then
18 - echo "Unable to read wikiversions.db or it is empty"
 18+ echo "Unable to read wikiversions.dat or it is empty"
1919 exit 1
2020 fi
2121
Index: trunk/tools/mwmultiversion/scripts/scap
@@ -1,32 +1,47 @@
22 #!/bin/bash
33
44 BINDIR=/home/wikipedia/bin
5 -SOURCE=/home/wikipedia/common/php-1.17
6 -DEST=/usr/local/apache/common-local/php-1.17
 5+SOURCE=/home/wikipedia/common
76
87 # Perform syntax check
98
109 if [ ! -S "$SSH_AUTH_SOCK" ]; then
11 - echo >&2 "SSH_AUTH_SOCK not set or not pointing to a socket."
12 - echo >&2 "Did you start your ssh-agent?"
 10+ echo >&2 "SSH_AUTH_SOCK not set or not pointing to a socket."
 11+ echo >&2 "Did you start your ssh-agent?"
1312 exit 1
1413 fi
1514
 15+mwVerDbSets=(`mwversionsinuse --withdb`)
 16+if [ -z "$mwVerDbSets" ]; then
 17+ echo "Unable to read wikiversions.dat or it is empty"
 18+ exit 1
 19+fi
1620
1721 echo Checking syntax...
18 -if ! $BINDIR/lint "$SOURCE"; then
19 - echo Found syntax errors, cannot sync
20 - exit
21 -fi
 22+for i in "${mwVerDbSets[@]}"
 23+do
 24+ mwVerNum=${i%=*}
 25+ if ! $BINDIR/lint "$SOURCE"/php-"$mwVerNum"; then
 26+ echo Found syntax errors, cannot sync
 27+ exit
 28+ fi
 29+done
2230
2331 # Update the current machine so that serialization works
2432 $BINDIR/sync-common
2533
26 -# Regenerate the extension message file list
27 -echo Updating ExtensionMessages.php...
28 -php $SOURCE/maintenance/mergeMessageFileList.php --list-file=$SOURCE/../wmf-config/extension-list \
29 - --output=$SOURCE/../wmf-config/ExtensionMessages.php
3034
 35+for i in "${mwVerDbSets[@]}"
 36+do
 37+ mwVerNum=${i%=*}
 38+ mwDbName=${i#*=}
 39+ # Regenerate the extension message file list
 40+ echo Updating ExtensionMessages.php...
 41+ mwscript mergeMessageFileList.php --wiki="$mwDbName" \
 42+ --list-file=$SOURCE/wmf-config/extension-list \
 43+ --output=$SOURCE/wmf-config/ExtensionMessages-"$mwVerNum".php
 44+done
 45+
3146 # Notify
3247 $BINDIR/dologmsg "!log $USER synchronizing Wikimedia installation... $(cd /home/wikipedia/common/php-1.17; svn info|grep ^Revision): $*"
3348
Index: trunk/tools/mwmultiversion/wmf-config/CommonSettings.php
@@ -2290,7 +2290,7 @@
22912291 #
22922292 # REALLY ... were not kidding here ... NO EXTENSIONS AFTER
22932293
2294 -require( "$wmfConfigDir/ExtensionMessages.php" );
 2294+require( "$wmfConfigDir/ExtensionMessages-$wgVersionNumber.php" );
22952295
22962296 wfProfileOut( "$fname-misc5" );
22972297 wfProfileOut( $fname );

Comments

#Comment by Catrope (talk | contribs)   18:49, 25 July 2011

CommonSettings change is OK.

Shell changes look sane but someone else needs to look at those.

Status & tagging log