[MediaWiki-commits] [Gerrit] jquery.tablesorter: Support genitive month names - change (mediawiki/core)

2013-09-12 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: jquery.tablesorter: Support genitive month names
..


jquery.tablesorter: Support genitive month names

Also use months names from mediawiki.language.months instead of from
wgMonthNames and wgMonthNamesShort. Genitive months names are not
available in that way.

Bug: 46496
Change-Id: If758499fb2d2c2dd02013beaa9cee7b7b8827132
---
M resources/Resources.php
M resources/jquery/jquery.tablesorter.js
2 files changed, 15 insertions(+), 8 deletions(-)

Approvals:
  Catrope: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/resources/Resources.php b/resources/Resources.php
index b760b68..4c428f3 100644
--- a/resources/Resources.php
+++ b/resources/Resources.php
@@ -261,7 +261,10 @@
'scripts' = 'resources/jquery/jquery.tablesorter.js',
'styles' = 'resources/jquery/jquery.tablesorter.css',
'messages' = array( 'sort-descending', 'sort-ascending' ),
-   'dependencies' = 'jquery.mwExtension',
+   'dependencies' = array(
+   'jquery.mwExtension',
+   'mediawiki.language.months',
+   ),
),
'jquery.textSelection' = array(
'scripts' = 'resources/jquery/jquery.textSelection.js',
diff --git a/resources/jquery/jquery.tablesorter.js 
b/resources/jquery/jquery.tablesorter.js
index b71ef83..bdc6675 100644
--- a/resources/jquery/jquery.tablesorter.js
+++ b/resources/jquery/jquery.tablesorter.js
@@ -8,8 +8,9 @@
  * http://www.opensource.org/licenses/mit-license.php
  * http://www.gnu.org/licenses/gpl.html
  *
- * Depends on mw.config (wgDigitTransformTable, wgMonthNames, 
wgMonthNamesShort,
- * wgDefaultDateFormat, wgContentLanguage)
+ * Depends on mw.config (wgDigitTransformTable, wgDefaultDateFormat, 
wgContentLanguage)
+ * and mw.language.months.
+ *
  * Uses 'tableSorterCollation' in mw.config (if available)
  */
 /**
@@ -476,12 +477,15 @@
var regex = [];
ts.monthNames = {};
 
-   for ( var i = 1; i  13; i++ ) {
-   var name = mw.config.get( 'wgMonthNames' 
)[i].toLowerCase();
-   ts.monthNames[name] = i;
+   for ( var i = 0; i  12; i++ ) {
+   var name = mw.language.months.names[i].toLowerCase();
+   ts.monthNames[name] = i + 1;
regex.push( $.escapeRE( name ) );
-   name = mw.config.get( 'wgMonthNamesShort' 
)[i].toLowerCase().replace( '.', '' );
-   ts.monthNames[name] = i;
+   name = 
mw.language.months.genitive[i].toLowerCase().replace( '.', '' );
+   ts.monthNames[name] = i + 1;
+   regex.push( $.escapeRE( name ) );
+   name = mw.language.months.abbrev[i].toLowerCase();
+   ts.monthNames[name] = i + 1;
regex.push( $.escapeRE( name ) );
}
 

-- 
To view, visit https://gerrit.wikimedia.org/r/55496
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: If758499fb2d2c2dd02013beaa9cee7b7b8827132
Gerrit-PatchSet: 8
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Bartosz Dziewoński matma@gmail.com
Gerrit-Reviewer: Anomie bjor...@wikimedia.org
Gerrit-Reviewer: Bartosz Dziewoński matma@gmail.com
Gerrit-Reviewer: Brion VIBBER br...@wikimedia.org
Gerrit-Reviewer: Catrope roan.katt...@gmail.com
Gerrit-Reviewer: Hoo man h...@online.de
Gerrit-Reviewer: Krinkle krinklem...@gmail.com
Gerrit-Reviewer: Siebrand siebr...@wikimedia.org
Gerrit-Reviewer: TheDJ hartman.w...@gmail.com
Gerrit-Reviewer: Wizardist p.selits...@gmail.com
Gerrit-Reviewer: jenkins-bot

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] Bug: 54084 Fatal error: Call to undefined function gzdecode() - change (mediawiki...TemplateData)

2013-09-12 Thread Dan-nl (Code Review)
Dan-nl has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/84015


Change subject: Bug: 54084 Fatal error: Call to undefined function gzdecode()
..

Bug: 54084 Fatal error: Call to undefined function gzdecode()

adding in logic to take care of wiki installs using PHP  5.4.0

Change-Id: I26e9930841b209691ebeb1a545c92cd13964cf54
---
M TemplateDataBlob.php
1 file changed, 6 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/TemplateData 
refs/changes/15/84015/1

diff --git a/TemplateDataBlob.php b/TemplateDataBlob.php
index d41b4dd..d6ec7d9 100644
--- a/TemplateDataBlob.php
+++ b/TemplateDataBlob.php
@@ -52,10 +52,14 @@
 * @param string $json
 * @return TemplateInfo
 */
-   public static function newFromDatabase( $json ) {
+   public static function newFromDatabase( $json ) {
// Handle GZIP compression. \037\213 is the header for GZIP 
files.
if ( substr( $json, 0, 2 ) === \037\213 ) {
-   $json = gzdecode( $json );
+   if ( function_exists( 'gzdecode' ) ) {
+   $json = gzdecode( $json );
+   } else {
+   $json = gzinflate( substr( $json, 10, -8 ) );
+   }
}
return self::newFromJSON( $json );
}

-- 
To view, visit https://gerrit.wikimedia.org/r/84015
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I26e9930841b209691ebeb1a545c92cd13964cf54
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/TemplateData
Gerrit-Branch: master
Gerrit-Owner: Dan-nl d_ent...@yahoo.com

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] Matching kafka.default.erb with updated /etc/default/kafka i... - change (operations...kafka)

2013-09-12 Thread Ottomata (Code Review)
Ottomata has submitted this change and it was merged.

Change subject: Matching kafka.default.erb with updated /etc/default/kafka in 
latest 0.8 deb.
..


Matching kafka.default.erb with updated /etc/default/kafka in latest 0.8 deb.

Now supporting $heap_opts for configuring min and max JVM heap sizes

Change-Id: I946fecf9f8f177b7c9a3648834dd9652a8d273a0
---
M manifests/defaults.pp
M manifests/server.pp
M templates/kafka.default.erb
3 files changed, 18 insertions(+), 10 deletions(-)

Approvals:
  Ottomata: Verified; Looks good to me, approved
  jenkins-bot: Verified



diff --git a/manifests/defaults.pp b/manifests/defaults.pp
index b81a462..72b3b04 100644
--- a/manifests/defaults.pp
+++ b/manifests/defaults.pp
@@ -27,6 +27,7 @@
 $jmx_port= 
 $log_dir = ['/var/spool/kafka']
 $num_partitions  = 1
+$heap_opts   = undef
 
 $num_network_threads = 2
 $num_io_threads  = 2
diff --git a/manifests/server.pp b/manifests/server.pp
index b2faa8d..1c29880 100644
--- a/manifests/server.pp
+++ b/manifests/server.pp
@@ -59,6 +59,7 @@
 $log_dir = $kafka::defaults::log_dir,
 $jmx_port= $kafka::defaults::jmx_port,
 $num_partitions  = $kafka::defaults::num_partitions,
+$heap_opts   = $kafka::defaults::heap_opts,
 
 $num_network_threads = $kafka::defaults::num_network_threads,
 $num_io_threads  = $kafka::defaults::num_io_threads,
diff --git a/templates/kafka.default.erb b/templates/kafka.default.erb
index 9cbf7fe..2765a0c 100644
--- a/templates/kafka.default.erb
+++ b/templates/kafka.default.erb
@@ -3,16 +3,22 @@
 # whether to allow init.d script to start a kafka broker (yes, no)
 KAFKA_START=%= @enabled ? 'yes' : 'no' %
 
-# The default JMX_PORT for Kafka Brokers is .
-# Set JMX_PORT to something else to override this.
-JMX_PORT=%= @jmx_port %
-
-# JMX options
-KAFKA_JMX_OPTS=${KAFKA_JMX_OPTS:=-Dcom.sun.management.jmxremote 
-Dcom.sun.management.jmxremote.authenticate=false 
-Dcom.sun.management.jmxremote.ssl=false}
-
-# Memory sizes, and logging configuration
-KAFKA_OPTS=${KAFKA_OPTS:=-Xmx512M -server 
-Dlog4j.configuration=file:/etc/kafka/log4j.properties}
-
 # User and group to run as
 KAFKA_USER=kafka
 KAFKA_GROUP=kafka
+KAFKA_CONFIG=/etc/kafka
+
+# The default JMX_PORT for Kafka Brokers is .
+# Set JMX_PORT to something else to override this.
+JMX_PORT=%= @jmx_port %
+#KAFKA_JMX_OPTS=${KAFKA_JMX_OPTS:=-Dcom.sun.management.jmxremote 
-Dcom.sun.management.jmxremote.authenticate=false 
-Dcom.sun.management.jmxremote.ssl=false}
+
+# Memory sizes, and logging configuration
+% if @heap_opts -%
+KAFKA_HEAP_OPTS=%= @heap_opts %
+% else -%
+#KAFKA_HEAP_OPTS=-Xmx1G -Xms1G
+% end -%
+#KAFKA_JVM_PERFORMANCE_OPTS=-server -XX:+UseCompressedOops -XX:+UseParNewGC 
-XX:+UseConcMarkSweepGC -XX:+CMSClassUnloadingEnabled 
-XX:+CMSScavengeBeforeRemark -XX:+DisableExplicitGC
+#KAFKA_LOG4J_OPTS=-Dlog4j.configuration=file:${KAFKA_CONFIG}/log4j.properties
+#KAFKA_OPTS=

-- 
To view, visit https://gerrit.wikimedia.org/r/84040
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I946fecf9f8f177b7c9a3648834dd9652a8d273a0
Gerrit-PatchSet: 2
Gerrit-Project: operations/puppet/kafka
Gerrit-Branch: master
Gerrit-Owner: Ottomata o...@wikimedia.org
Gerrit-Reviewer: Ottomata o...@wikimedia.org
Gerrit-Reviewer: jenkins-bot

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] [WIP] StickeredNode mixin and StickerWidget - change (mediawiki...VisualEditor)

2013-09-12 Thread Mooeypoo (Code Review)
Mooeypoo has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/84014


Change subject: [WIP] StickeredNode mixin and StickerWidget
..

[WIP] StickeredNode mixin and StickerWidget

This is the UI piece of the StickerNode, a node mixin that allows for
static menus on block nodes for edit purposes. The widget will be
populated by inspectors for the node they are associated with.

The main use of this functionality is the Language Block node, but
the functionality will be useful for other block nodes like tables.

Change-Id: Iaef3afdf6ae8e18457146fbc03b6877494bcf650
---
M VisualEditor.php
A modules/ve/ce/ve.ce.StickeredNode.js
M modules/ve/ui/styles/ve.ui.Widget.css
A modules/ve/ui/ve.ui.Sticker.js
A modules/ve/ui/widgets/ve.ui.StickerWidget.js
5 files changed, 441 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/VisualEditor 
refs/changes/14/84014/1

diff --git a/VisualEditor.php b/VisualEditor.php
index 4920ed4..878ce47 100644
--- a/VisualEditor.php
+++ b/VisualEditor.php
@@ -705,6 +705,9 @@
've/ui/tools/ve.ui.BlockInspectorTool.js',
've/ui/actions/ve.ui.BlockInspectorAction.js',
've/ui/ve.ui.StickerToolbar.js',
+   've/ce/ve.ce.StickeredNode.js',
+   've/ui/ve.ui.Sticker.js',
+   've/ui/widgets/ve.ui.StickerWidget.js',
've/ui/tools/ve.ui.ExperimentalTool.js',
've-mw/ui/tools/ve.ui.MWExperimentalTool.js',
),
diff --git a/modules/ve/ce/ve.ce.StickeredNode.js 
b/modules/ve/ce/ve.ce.StickeredNode.js
new file mode 100644
index 000..ecd7b9d
--- /dev/null
+++ b/modules/ve/ce/ve.ce.StickeredNode.js
@@ -0,0 +1,80 @@
+/*!
+ * VisualEditor ContentEditable FocusableNode class.
+ *
+ * @copyright 2011-2013 VisualEditor Team and others; see AUTHORS.txt
+ * @license The MIT License (MIT); see LICENSE.txt
+ */
+
+/**
+ * ContentEditable sticker node.
+ *
+ * Node that pops a sticky menu at the top.
+ *
+ * @param {jQuery} [$stickered=this.$] node jquery object
+ */
+ve.ce.StickeredNode = function VeCeStickeredNode( $stickered ) {
+   this.$stickered = $stickered || this.$;
+
+   this.$stickered.addClass( 've-ce-stickeredNode' );
+
+   this.$stickered.on( 'mouseenter', ve.bind( this.onMouseEnter, this ) );
+   this.$stickered.on( 'mouseleave', ve.bind( this.onMouseLeave, this ) );
+
+   this.dmNode = this.model; // -- how do I get Dm of the current node??
+
+   this.surface = null;
+   this.sticker = null;
+
+   this.focused = false;
+   // Events
+   this.connect( this, {
+   'setup': 'onStickeredSetup',
+   'resize': 'onStickeredResize',
+   'rerender': 'onStickeredRerendered',
+   } );
+}
+
+ve.ce.StickeredNode.prototype.onStickeredSetup = function () {
+   this.surface = this.root.getSurface();
+   // Create Sticker:
+   this.sticker = new ve.ui.Sticker( this.surface.getSurface(), {
+   '$$': this.$$,
+   '$stickeredNode': this.$,
+   'nodeView': this,
+   'nodeModel': this.dmNode
+   } );
+   this.sticker.show( true );
+
+   // Repositioning Events:
+   this.surface.getModel()
+   .connect( this, { 'change': 'onStickeredModelChange' } );
+   this.surface.getSurface()
+   .connect( this, { 'position': 'onStickeredResize' } );
+
+}
+
+ve.ce.StickeredNode.prototype.onStickeredRerendered = function () {
+   this.updatePosition();
+}
+
+ve.ce.StickeredNode.prototype.onStickeredResize = function () {
+   this.updatePosition();
+
+}
+
+ve.ce.StickeredNode.prototype.onStickeredModelChange = function () {
+   this.updatePosition();
+   this.sticker.updateMenu();
+}
+
+ve.ce.StickeredNode.prototype.updatePosition = function() {
+   var $stickeredNode = this.$;
+   this.sticker.updateDimensions( true, $stickeredNode.position() );
+};
+
+ve.ce.StickeredNode.prototype.onMouseEnter = function () {
+   this.focused = true;
+};
+ve.ce.StickeredNode.prototype.onMouseLeave = function () {
+   this.focused = false;
+};
diff --git a/modules/ve/ui/styles/ve.ui.Widget.css 
b/modules/ve/ui/styles/ve.ui.Widget.css
index 2bf8ef3..aa002f9 100644
--- a/modules/ve/ui/styles/ve.ui.Widget.css
+++ b/modules/ve/ui/styles/ve.ui.Widget.css
@@ -575,3 +575,15 @@
border-bottom-left-radius: 0;
border-bottom-width: 0;
 }
+
+/* ve.ui.StickerWidget.js */
+
+.ve-ui-stickerWidget {
+   position: absolute;
+   -webkit-box-sizing: border-box;
+   -moz-box-sizing: border-box;
+   box-sizing: border-box;
+   border: 1px solid #F2DCA0;
+   background: #FFFAC7;
+   padding: 2px;
+}
diff --git a/modules/ve/ui/ve.ui.Sticker.js b/modules/ve/ui/ve.ui.Sticker.js
new file mode 100644
index 

[MediaWiki-commits] [Gerrit] Adding support for query string params to mw.util.wikiGetlink - change (mediawiki/core)

2013-09-12 Thread Jdlrobson (Code Review)
Jdlrobson has submitted this change and it was merged.

Change subject: Adding support for query string params to mw.util.wikiGetlink
..


Adding support for query string params to mw.util.wikiGetlink

This will enable us to easily migrate MobileFrontend from
using M.pageApi.getPageUrl (mobile custom version) to
mw.util.wikiGetlink.

Includes a unit test.

Change-Id: I5224a0910a822f1c3b1b34f505dbcdf879052b39
---
M resources/mediawiki/mediawiki.util.js
M tests/qunit/suites/resources/mediawiki/mediawiki.util.test.js
2 files changed, 14 insertions(+), 3 deletions(-)

Approvals:
  JGonera: Looks good to me, but someone else must approve
  Jdlrobson: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/resources/mediawiki/mediawiki.util.js 
b/resources/mediawiki/mediawiki.util.js
index 071a52b..acd2f07 100644
--- a/resources/mediawiki/mediawiki.util.js
+++ b/resources/mediawiki/mediawiki.util.js
@@ -160,11 +160,18 @@
 * Get the link to a page name (relative to `wgServer`),
 *
 * @param {string} str Page name to get the link for.
+* @param {Object} params A mapping of query parameter names to 
values,
+* e.g. { action: 'edit' }. Optional.
 * @return {string} Location for a page with name of `str` or 
boolean false on error.
 */
-   wikiGetlink: function ( str ) {
-   return mw.config.get( 'wgArticlePath' ).replace( '$1',
+   wikiGetlink: function ( str, params ) {
+   var url = mw.config.get( 'wgArticlePath' ).replace( 
'$1',
util.wikiUrlencode( typeof str === 'string' ? 
str : mw.config.get( 'wgPageName' ) ) );
+   if ( params  !$.isEmptyObject( params ) ) {
+   url += url.indexOf( '?' ) !== -1 ? '' : '?';
+   url += $.param( params );
+   }
+   return url;
},
 
/**
diff --git a/tests/qunit/suites/resources/mediawiki/mediawiki.util.test.js 
b/tests/qunit/suites/resources/mediawiki/mediawiki.util.test.js
index e867369..f2676d7d 100644
--- a/tests/qunit/suites/resources/mediawiki/mediawiki.util.test.js
+++ b/tests/qunit/suites/resources/mediawiki/mediawiki.util.test.js
@@ -17,7 +17,7 @@
assert.equal( mw.util.wikiUrlencode( 'Test:A  B/Here' ), 
'Test:A_%26_B/Here' );
} );
 
-   QUnit.test( 'wikiGetlink', 3, function ( assert ) {
+   QUnit.test( 'wikiGetlink', 4, function ( assert ) {
// Not part of startUp module
mw.config.set( 'wgArticlePath', '/wiki/$1' );
mw.config.set( 'wgPageName', 'Foobar' );
@@ -31,6 +31,10 @@
 
href = mw.util.wikiGetlink();
assert.equal( href, '/wiki/Foobar', 'Default title; Get link 
for current page (Foobar)' );
+
+   href = mw.util.wikiGetlink( 'Sandbox', { action: 'edit' } );
+   assert.equal( href, '/wiki/Sandbox?action=edit',
+   'Simple title with query string; Get link for Sandbox 
with action=edit' );
} );
 
QUnit.test( 'wikiScript', 4, function ( assert ) {

-- 
To view, visit https://gerrit.wikimedia.org/r/83834
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I5224a0910a822f1c3b1b34f505dbcdf879052b39
Gerrit-PatchSet: 5
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Kaldari rkald...@wikimedia.org
Gerrit-Reviewer: Bartosz Dziewoński matma@gmail.com
Gerrit-Reviewer: Daniel Friesen dan...@nadir-seen-fire.com
Gerrit-Reviewer: JGonera jgon...@wikimedia.org
Gerrit-Reviewer: Jack Phoenix j...@countervandalism.net
Gerrit-Reviewer: Jdlrobson jrob...@wikimedia.org
Gerrit-Reviewer: Kaldari rkald...@wikimedia.org
Gerrit-Reviewer: Krinkle krinklem...@gmail.com
Gerrit-Reviewer: MaxSem maxsem.w...@gmail.com
Gerrit-Reviewer: jenkins-bot

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] Update MoodBar to master - change (mediawiki/core)

2013-09-12 Thread Reedy (Code Review)
Reedy has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/84090


Change subject: Update MoodBar to master
..

Update MoodBar to master

Change-Id: I0e7cf91182c51c5da0bb9516ed410279dbdf2026
---
M extensions/MoodBar
1 file changed, 0 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/90/84090/1

diff --git a/extensions/MoodBar b/extensions/MoodBar
index 195f315..bce88f9 16
--- a/extensions/MoodBar
+++ b/extensions/MoodBar
-Subproject commit 195f315db089a540e1a85bda3a751281b6251f39
+Subproject commit bce88f99cf60f2e4180ceefcbc230806ed656b58

-- 
To view, visit https://gerrit.wikimedia.org/r/84090
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I0e7cf91182c51c5da0bb9516ed410279dbdf2026
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: wmf/1.22wmf16
Gerrit-Owner: Reedy re...@wikimedia.org

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] Don't write empty indexes - change (operations...incremental)

2013-09-12 Thread Petr Onderka (Code Review)
Petr Onderka has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/84005


Change subject: Don't write empty indexes
..

Don't write empty indexes

Change-Id: I94a394fd940b34a6654cc0f8ef841c191457cbf6
---
M DumpObjects/DumpSiteInfo.cpp
M Indexes/Index.tpp
M Indexes/IndexInnerNode.tpp
M Indexes/IndexLeafNode.tpp
M Indexes/IndexNode.h
M Indexes/IndexNode.tpp
M Indexes/Iterators/IndexInnerIterator.h
M Indexes/Iterators/IndexInnerIterator.tpp
M TODO.txt
9 files changed, 38 insertions(+), 28 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/dumps/incremental 
refs/changes/05/84005/1

diff --git a/DumpObjects/DumpSiteInfo.cpp b/DumpObjects/DumpSiteInfo.cpp
index 28ce47d..9cec08b 100644
--- a/DumpObjects/DumpSiteInfo.cpp
+++ b/DumpObjects/DumpSiteInfo.cpp
@@ -15,7 +15,10 @@
 
 void DumpSiteInfo::UpdateIndex(Offset offset, bool overwrite)
 {
-dump.lock()-fileHeader.SiteInfo = offset;
+auto dumpRef = dump.lock();
+
+dumpRef-fileHeader.SiteInfo = offset;
+dumpRef-fileHeader.Write();
 }
 
 DumpSiteInfo::DumpSiteInfo(std::weak_ptrWritableDump dump)
diff --git a/Indexes/Index.tpp b/Indexes/Index.tpp
index 144060f..d1f41d2 100644
--- a/Indexes/Index.tpp
+++ b/Indexes/Index.tpp
@@ -22,7 +22,7 @@
 }
 else
 {
-rootNode-Write();
+rootNode-Write(true);
 fileHeaderOffset-value = rootNode-SavedOffset();
 dump.lock()-fileHeader.Write();
 }
@@ -59,7 +59,7 @@
 
 if (rootNodeUnsaved)
 {
-rootNode-Write();
+rootNode-Write(true);
 
 fileHeaderOffset.lock()-value = rootNode-SavedOffset();
 dump.lock()-fileHeader.Write();
diff --git a/Indexes/IndexInnerNode.tpp b/Indexes/IndexInnerNode.tpp
index 8eb2126..0632159 100644
--- a/Indexes/IndexInnerNode.tpp
+++ b/Indexes/IndexInnerNode.tpp
@@ -53,6 +53,8 @@
 
 insert_at(childOffsets, updatedChildIndex + 1, 
splitted.RightNode-SavedOffset());
 insert_at(cachedChildren, updatedChildIndex + 1, 
std::move(splitted.RightNode));
+
+modified = true;
 }
 }
 
@@ -82,7 +84,7 @@
 void IndexInnerNodeTKey, TValue::Remove(const TKey key)
 {
 auto index = GetKeyIndex(key);
-return GetChildByIndex(index)-Remove(key);
+GetChildByIndex(index)-Remove(key);
 }
 
 templatetypename TKey, typename TValue
@@ -107,6 +109,8 @@
 throw DumpException();
 childOffsets.push_back(rightOffset);
 cachedChildren.push_back(std::move(splitResult.RightNode));
+
+modified = true;
 }
 
 templatetypename TKey, typename TValue
@@ -152,8 +156,6 @@
 templatetypename TKey, typename TValue
 void IndexInnerNodeTKey, TValue::Write()
 {
-// TODO: don't do anything when there are no changes
-
 IndexNodeTKey, TValue::Write();
 
 for (auto cachedChild : cachedChildren)
diff --git a/Indexes/IndexLeafNode.tpp b/Indexes/IndexLeafNode.tpp
index 099c0fe..817c220 100644
--- a/Indexes/IndexLeafNode.tpp
+++ b/Indexes/IndexLeafNode.tpp
@@ -26,27 +26,30 @@
 throw new DumpException();
 }
 
-indexMap.insert(pairTKey, TValue(key, value));
+indexMap.insert(std::pairTKey, TValue(key, value));
+
+modified = true;
 }
 
 templatetypename TKey, typename TValue
 void IndexLeafNodeTKey, TValue::AddOrUpdate(TKey key, TValue value)
 {
 auto pos = indexMap.find(key);
+
 if (pos == indexMap.end())
-{
 Add(key, value);
-}
 else
-{
-pos-second = value; // will this work?
-}
+pos-second = value;
+
+modified = true;
 }
 
 templatetypename TKey, typename TValue
 void IndexLeafNodeTKey, TValue::Remove(const TKey key)
 {
 indexMap.erase(key);
+
+modified = true;
 }
 
 templatetypename TKey, typename TValue
diff --git a/Indexes/IndexNode.h b/Indexes/IndexNode.h
index 17cc833..a0bbef6 100644
--- a/Indexes/IndexNode.h
+++ b/Indexes/IndexNode.h
@@ -16,6 +16,8 @@
 protected:
 static const int Size = 4096;
 
+bool modified;
+
 unsigned iterators;
 
 virtual void WriteInternal() = 0;
@@ -43,9 +45,8 @@
 
 IndexNode(std::weak_ptrWritableDump dump);
 
-using DumpObject::Write;
-// write to a pre-allocated offset
-void Write(Offset offset);
+virtual void Write() override;
+void Write(bool force);
 
 virtual TValue Get(TKey key) = 0;
 virtual void Add(TKey key, TValue value) = 0;
diff --git a/Indexes/IndexNode.tpp b/Indexes/IndexNode.tpp
index 32c0aab..0485aec 100644
--- a/Indexes/IndexNode.tpp
+++ b/Indexes/IndexNode.tpp
@@ -7,7 +7,7 @@
 
 templatetypename TKey, typename TValue
 IndexNodeTKey, TValue::IndexNode(std::weak_ptrWritableDump dump)
-: DumpObject(dump), iterators(0)
+: DumpObject(dump), modified(false), iterators(0)
 {}
 
 templatetypename TKey, typename TValue
@@ -44,19 +44,20 @@
 }
 
 templatetypename TKey, typename TValue
-void IndexNodeTKey, TValue::Write(Offset offset)
+void IndexNodeTKey, TValue::Write()
 {
-auto 

[MediaWiki-commits] [Gerrit] updates for 1.2 (no multi-arch, new binary) - change (operations...libvmod-netmapper)

2013-09-12 Thread BBlack (Code Review)
BBlack has submitted this change and it was merged.

Change subject: updates for 1.2 (no multi-arch, new binary)
..


updates for 1.2 (no multi-arch, new binary)

Change-Id: I75d2370295d88bbf7ff335493e1c0848d8facff1
---
M debian/changelog
M debian/control
M debian/libvmod-netmapper.install
3 files changed, 7 insertions(+), 2 deletions(-)

Approvals:
  BBlack: Verified; Looks good to me, approved



diff --git a/debian/changelog b/debian/changelog
index d1ace00..2413103 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,9 @@
+libvmod-netmapper (1.2-1) unstable; urgency=low
+
+  * Bump upstream
+
+ -- Brandon Black bbl...@wikimedia.org  Thu, 12 Sep 2013 17:53:16 +
+
 libvmod-netmapper (1.1-1) unstable; urgency=low
 
   * Bump upstream
diff --git a/debian/control b/debian/control
index 6d7a358..e9d160b 100644
--- a/debian/control
+++ b/debian/control
@@ -10,7 +10,6 @@
 
 Package: libvmod-netmapper
 Architecture: any
-Multi-Arch: same
 Pre-Depends: ${misc:Pre-Depends}
 Depends: ${shlibs:Depends}, ${misc:Depends}, varnish (= 3)
 Description: Varnish VMOD for mapping IP networks to strings
@@ -19,7 +18,6 @@
 
 Package: libvmod-netmapper-dbg
 Architecture: any
-Multi-Arch: same
 Depends: libvmod-netmapper (= ${binary:Version}), ${misc:Depends}
 Section: debug
 Description: Varnish VMOD for mapping IP networks to strings (debug symbols)
diff --git a/debian/libvmod-netmapper.install b/debian/libvmod-netmapper.install
index 8688f0a..0b1739f 100644
--- a/debian/libvmod-netmapper.install
+++ b/debian/libvmod-netmapper.install
@@ -1 +1,2 @@
 /usr/lib/*/varnish/vmods/libvmod_netmapper.so
+/usr/bin/vnm_validate

-- 
To view, visit https://gerrit.wikimedia.org/r/84021
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I75d2370295d88bbf7ff335493e1c0848d8facff1
Gerrit-PatchSet: 1
Gerrit-Project: operations/software/varnish/libvmod-netmapper
Gerrit-Branch: debian
Gerrit-Owner: BBlack bbl...@wikimedia.org
Gerrit-Reviewer: BBlack bbl...@wikimedia.org

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] fixing up the ntp ip list - change (operations/puppet)

2013-09-12 Thread Lcarr (Code Review)
Lcarr has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/84092


Change subject: fixing up the ntp ip list
..

fixing up the ntp ip list

Change-Id: I866746130e2b6019ce50c84c04f24d11a5ed5754
---
M modules/ntp/templates/ntp-server.erb
1 file changed, 3 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/92/84092/1

diff --git a/modules/ntp/templates/ntp-server.erb 
b/modules/ntp/templates/ntp-server.erb
index b013a5f..1f9b9e1 100644
--- a/modules/ntp/templates/ntp-server.erb
+++ b/modules/ntp/templates/ntp-server.erb
@@ -45,6 +45,9 @@
 restrict 208.80.152.0 mask 255.255.252.0 kod notrap nomodify nopeer
 restrict 91.198.174.0 mask 255.255.255.0 kod notrap nomodify nopeer
 restrict 2620:0:860:: mask :::: kod notrap nomodify nopeer
+restrict 198.35.26.0 mask 255.255.254.0 kod notrap nomodify nopeer
+restrict 185.15.56.0 mask 255.255.252.0 kod notrap nomodify nopeer
+restrict 2a02:ec80:: mask ::: kod notrap nomodify nopeer
 % else -%
 # Allow the monitoring server to query us
 # neon

-- 
To view, visit https://gerrit.wikimedia.org/r/84092
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I866746130e2b6019ce50c84c04f24d11a5ed5754
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Lcarr lc...@wikimedia.org

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] fix distcheck - change (operations...libvmod-netmapper)

2013-09-12 Thread BBlack (Code Review)
BBlack has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/84012


Change subject: fix distcheck
..

fix distcheck

Change-Id: I9eb45236f42518b798eaeb7a5577ca7f77fa477a
---
M src/Makefile.am
1 file changed, 3 insertions(+), 3 deletions(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/operations/software/varnish/libvmod-netmapper 
refs/changes/12/84012/1

diff --git a/src/Makefile.am b/src/Makefile.am
index 0668585..4c90bc5 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -25,11 +25,11 @@
 vnm_validate_LDADD = -ljansson
 vnm_validate_SOURCES = vnm_validate.c $(COMMON_SRC)
 
-VMOD_TDATA = tests/*.json
-VMOD_TESTS = tests/*.vtc
+VMOD_TDATA = tests/test01a.json tests/test01b.json tests/test01c.json
+VMOD_TESTS = tests/test01.vtc
 .PHONY: $(VMOD_TESTS) $(VMOD_TDATA)
 
-tests/*.vtc: libvmod_netmapper.la
+$(VMOD_TESTS): libvmod_netmapper.la
$(VARNISHTEST) -Dvarnishd=$(VARNISHD) 
-Dvmod_topbuild=$(abs_top_builddir) -Dvmod_topsrc=$(abs_top_srcdir) $(srcdir)/$@
 
 check: $(VMOD_TESTS)

-- 
To view, visit https://gerrit.wikimedia.org/r/84012
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I9eb45236f42518b798eaeb7a5577ca7f77fa477a
Gerrit-PatchSet: 1
Gerrit-Project: operations/software/varnish/libvmod-netmapper
Gerrit-Branch: master
Gerrit-Owner: BBlack bbl...@wikimedia.org

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] Backport nlist.[ch] changes from gdnsd - change (operations...libvmod-netmapper)

2013-09-12 Thread BBlack (Code Review)
BBlack has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/84013


Change subject: Backport nlist.[ch] changes from gdnsd
..

Backport nlist.[ch] changes from gdnsd

This gives us the ability to normalize truly ugly lists
  of networks from the JSON input, instead of failing on
  things like duplicates, merge-generated duplicates, and conflicts.

Change-Id: Ib1e6d95ac7ad687933a3e65cdab45ea02ec9e303
---
M src/nlt/nlist.c
M src/nlt/nlist.h
M src/vnm.c
3 files changed, 31 insertions(+), 59 deletions(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/operations/software/varnish/libvmod-netmapper 
refs/changes/13/84013/1

diff --git a/src/nlt/nlist.c b/src/nlt/nlist.c
index d0c587d..0d34c7b 100644
--- a/src/nlt/nlist.c
+++ b/src/nlt/nlist.c
@@ -36,7 +36,7 @@
 net_t* nets;
 unsigned alloc;
 unsigned count;
-bool finished;
+bool normalized;
 };
 
 nlist_t* nlist_new(void) {
@@ -44,7 +44,7 @@
 nl-nets = malloc(sizeof(net_t) * NLIST_INITSIZE);
 nl-alloc = NLIST_INITSIZE;
 nl-count = 0;
-nl-finished = false;
+nl-normalized = false;
 return nl;
 }
 
@@ -96,25 +96,6 @@
 return rv;
 }
 
-// sort and check for dupes, true retval indicates failure due to dupes
-static bool nlist_normalize1(nlist_t* nl) {
-assert(nl);
-
-if(nl-count) {
-qsort(nl-nets, nl-count, sizeof(net_t), net_sorter);
-
-for(unsigned i = 0; i  (nl-count - 1); i++) {
-net_t* net_a = nl-nets[i];
-net_t* net_b = nl-nets[i + 1];
-if(net_a-mask == net_b-mask  !memcmp(net_a-ipv6, net_b-ipv6, 
16)) {
-   return true;
-}
-}
-}
-
-return false;
-}
-
 static bool masked_net_eq(const uint8_t* v6a, const uint8_t* v6b, const 
unsigned mask) {
 assert(v6a); assert(v6b);
 assert(mask  128U); // 2x128 would call here w/ 127...
@@ -146,34 +127,42 @@
 this_net-mask = mask;
 this_net-dclist = dclist;
 
-// for raw input, just correct any netmask errors as we insert,
-//   as these will screw up later sorting for normalize1
 return clear_mask_bits(this_net-ipv6, mask);
 }
 
-// merge adjacent nets with identical dclists recursively...
-static void nlist_normalize2(nlist_t* nl) {
+static bool net_eq(const net_t* na, const net_t* nb) {
+assert(na); assert(nb);
+return na-mask == nb-mask  !memcmp(na-ipv6, nb-ipv6, 16);
+}
+
+// normalize ugly random-ish lists
+static void nlist_normalize(nlist_t* nl, const bool post_merge) {
 assert(nl);
 
 if(nl-count) {
+if(!post_merge)
+qsort(nl-nets, nl-count, sizeof(net_t), net_sorter);
+
 unsigned idx = nl-count;
 unsigned newcount = nl-count;
 while(--idx  0) {
 net_t* nb = nl-nets[idx];
 net_t* na = nl-nets[idx - 1];
-if(mergeable_nets(na, nb)) {
-// na should have the differential bit clear
-//   thanks to pre-sorting, so just needs mask--
+const bool ab_eq = net_eq(na, nb);
+if(ab_eq || mergeable_nets(na, nb)) {
 nb-mask = MASK_DELETED;
-na-mask--;
+if(!ab_eq)
+na-mask--;
 newcount--;
 unsigned upidx = idx + 1;
 while(upidx  nl-count) {
 net_t* nc = nl-nets[upidx];
 if(nc-mask != MASK_DELETED) {
-if(mergeable_nets(na, nc)) {
+const bool ac_eq = net_eq(na, nc);
+if(ac_eq || mergeable_nets(na, nc)) {
 nc-mask = MASK_DELETED;
-na-mask--;
+if(!ac_eq)
+na-mask--;
 newcount--;
 }
 else {
@@ -204,18 +193,14 @@
 nl-nets = realloc(nl-nets, sizeof(net_t) * nl-alloc);
 }
 }
+
+nl-normalized = true;
 }
 
-bool nlist_finish(nlist_t* nl) {
+void nlist_finish(nlist_t* nl) {
 assert(nl);
-
-bool rv = nlist_normalize1(nl);
-if(!rv) {
-nlist_normalize2(nl);
-nl-finished = true;
-}
-
-return rv;
+if(!nl-normalized)
+nlist_normalize(nl, false);
 }
 
 static bool net_subnet_of(const net_t* sub, const net_t* super) {
@@ -295,15 +280,11 @@
 SETBIT_v6(tree_net.ipv6, tree_net.mask - 1);
 nxt_rec_dir(nl, nl_end, nt, tree_net, nt_idx, true);
 
-// catch missed optimizations during final translation,
-//   which should be on the default dclist zero
-//   due to it being implicit for undefined nets in the list,
-//   and thus not merged with true list entries...
+// catch missed optimizations during final translation
 unsigned rv;
-if((nt-store[nt_idx].zero == nt-store[nt_idx].one)  (nt_idx  0)) {
-

[MediaWiki-commits] [Gerrit] Backport nlist.[ch] changes from gdnsd - change (operations...libvmod-netmapper)

2013-09-12 Thread BBlack (Code Review)
BBlack has submitted this change and it was merged.

Change subject: Backport nlist.[ch] changes from gdnsd
..


Backport nlist.[ch] changes from gdnsd

This gives us the ability to normalize truly ugly lists
  of networks from the JSON input, instead of failing on
  things like duplicates, merge-generated duplicates, and conflicts.

Change-Id: Ib1e6d95ac7ad687933a3e65cdab45ea02ec9e303
---
M src/nlt/nlist.c
M src/nlt/nlist.h
M src/vnm.c
3 files changed, 31 insertions(+), 59 deletions(-)

Approvals:
  BBlack: Verified; Looks good to me, approved



diff --git a/src/nlt/nlist.c b/src/nlt/nlist.c
index d0c587d..0d34c7b 100644
--- a/src/nlt/nlist.c
+++ b/src/nlt/nlist.c
@@ -36,7 +36,7 @@
 net_t* nets;
 unsigned alloc;
 unsigned count;
-bool finished;
+bool normalized;
 };
 
 nlist_t* nlist_new(void) {
@@ -44,7 +44,7 @@
 nl-nets = malloc(sizeof(net_t) * NLIST_INITSIZE);
 nl-alloc = NLIST_INITSIZE;
 nl-count = 0;
-nl-finished = false;
+nl-normalized = false;
 return nl;
 }
 
@@ -96,25 +96,6 @@
 return rv;
 }
 
-// sort and check for dupes, true retval indicates failure due to dupes
-static bool nlist_normalize1(nlist_t* nl) {
-assert(nl);
-
-if(nl-count) {
-qsort(nl-nets, nl-count, sizeof(net_t), net_sorter);
-
-for(unsigned i = 0; i  (nl-count - 1); i++) {
-net_t* net_a = nl-nets[i];
-net_t* net_b = nl-nets[i + 1];
-if(net_a-mask == net_b-mask  !memcmp(net_a-ipv6, net_b-ipv6, 
16)) {
-   return true;
-}
-}
-}
-
-return false;
-}
-
 static bool masked_net_eq(const uint8_t* v6a, const uint8_t* v6b, const 
unsigned mask) {
 assert(v6a); assert(v6b);
 assert(mask  128U); // 2x128 would call here w/ 127...
@@ -146,34 +127,42 @@
 this_net-mask = mask;
 this_net-dclist = dclist;
 
-// for raw input, just correct any netmask errors as we insert,
-//   as these will screw up later sorting for normalize1
 return clear_mask_bits(this_net-ipv6, mask);
 }
 
-// merge adjacent nets with identical dclists recursively...
-static void nlist_normalize2(nlist_t* nl) {
+static bool net_eq(const net_t* na, const net_t* nb) {
+assert(na); assert(nb);
+return na-mask == nb-mask  !memcmp(na-ipv6, nb-ipv6, 16);
+}
+
+// normalize ugly random-ish lists
+static void nlist_normalize(nlist_t* nl, const bool post_merge) {
 assert(nl);
 
 if(nl-count) {
+if(!post_merge)
+qsort(nl-nets, nl-count, sizeof(net_t), net_sorter);
+
 unsigned idx = nl-count;
 unsigned newcount = nl-count;
 while(--idx  0) {
 net_t* nb = nl-nets[idx];
 net_t* na = nl-nets[idx - 1];
-if(mergeable_nets(na, nb)) {
-// na should have the differential bit clear
-//   thanks to pre-sorting, so just needs mask--
+const bool ab_eq = net_eq(na, nb);
+if(ab_eq || mergeable_nets(na, nb)) {
 nb-mask = MASK_DELETED;
-na-mask--;
+if(!ab_eq)
+na-mask--;
 newcount--;
 unsigned upidx = idx + 1;
 while(upidx  nl-count) {
 net_t* nc = nl-nets[upidx];
 if(nc-mask != MASK_DELETED) {
-if(mergeable_nets(na, nc)) {
+const bool ac_eq = net_eq(na, nc);
+if(ac_eq || mergeable_nets(na, nc)) {
 nc-mask = MASK_DELETED;
-na-mask--;
+if(!ac_eq)
+na-mask--;
 newcount--;
 }
 else {
@@ -204,18 +193,14 @@
 nl-nets = realloc(nl-nets, sizeof(net_t) * nl-alloc);
 }
 }
+
+nl-normalized = true;
 }
 
-bool nlist_finish(nlist_t* nl) {
+void nlist_finish(nlist_t* nl) {
 assert(nl);
-
-bool rv = nlist_normalize1(nl);
-if(!rv) {
-nlist_normalize2(nl);
-nl-finished = true;
-}
-
-return rv;
+if(!nl-normalized)
+nlist_normalize(nl, false);
 }
 
 static bool net_subnet_of(const net_t* sub, const net_t* super) {
@@ -295,15 +280,11 @@
 SETBIT_v6(tree_net.ipv6, tree_net.mask - 1);
 nxt_rec_dir(nl, nl_end, nt, tree_net, nt_idx, true);
 
-// catch missed optimizations during final translation,
-//   which should be on the default dclist zero
-//   due to it being implicit for undefined nets in the list,
-//   and thus not merged with true list entries...
+// catch missed optimizations during final translation
 unsigned rv;
-if((nt-store[nt_idx].zero == nt-store[nt_idx].one)  (nt_idx  0)) {
-assert(nt-store[nt_idx].zero == NN_SET_DCLIST(0));
+if(nt-store[nt_idx].zero == nt-store[nt_idx].one  nt_idx  

[MediaWiki-commits] [Gerrit] (bug 52799) Dump JSON of entities listed in file. - change (mediawiki...Wikibase)

2013-09-12 Thread Daniel Kinzler (Code Review)
Daniel Kinzler has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/84000


Change subject: (bug 52799) Dump JSON of entities listed in file.
..

(bug 52799) Dump JSON of entities listed in file.

This allows dumpJson.php to dump just those entities given in
a given list file.

Change-Id: Ie101cc58b0218d623e73b832a4fc9d45f1d1ac4a
---
M lib/WikibaseLib.classes.php
A lib/includes/Disposable.php
M lib/includes/Dumpers/JsonDumpGenerator.php
A lib/includes/IO/EntityIdReader.php
A lib/includes/IO/LineReader.php
A lib/tests/phpunit/IO/EntityIdReaderTest.txt
A lib/tests/phpunit/IO/EntrityIdReaderTest.php
A lib/tests/phpunit/IO/LineReaderTest.php
A lib/tests/phpunit/IO/LineReaderTest.txt
M repo/includes/store/sql/ConvertingResultWrapper.php
M repo/maintenance/dumpJson.php
11 files changed, 426 insertions(+), 6 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Wikibase 
refs/changes/00/84000/1

diff --git a/lib/WikibaseLib.classes.php b/lib/WikibaseLib.classes.php
index af37853..526c258 100644
--- a/lib/WikibaseLib.classes.php
+++ b/lib/WikibaseLib.classes.php
@@ -32,6 +32,9 @@
// Autoloading
'Wikibase\LibHooks' = 'WikibaseLib.hooks.php',
 
+   // generic things that could be factored out
+   'Disposable' = 'includes/Disposable.php',
+
// includes
'Wikibase\ChangeNotifier' = 'includes/ChangeNotifier.php',
'Wikibase\ChangeNotificationJob' = 
'includes/ChangeNotificationJob.php',
@@ -93,6 +96,10 @@
'Wikibase\Lib\EntityIdLabelFormatter' = 
'includes/formatters/EntityIdLabelFormatter.php',
'Wikibase\Lib\MwTimeIsoFormatter' = 
'includes/formatters/MwTimeIsoFormatter.php',
 
+   // includes/IO
+   'Wikibase\IO\LineReader' = 'includes/IO/LineReader.php',
+   'Wikibase\IO\EntityIdReader' = 
'includes/IO/EntityIdReader.php',
+
// includes/modules
'Wikibase\RepoAccessModule' = 
'includes/modules/RepoAccessModule.php',
'Wikibase\SitesModule' = 'includes/modules/SitesModule.php',
diff --git a/lib/includes/Disposable.php b/lib/includes/Disposable.php
new file mode 100644
index 000..a362c4b
--- /dev/null
+++ b/lib/includes/Disposable.php
@@ -0,0 +1,24 @@
+?php
+
+/**
+ * An interface for objects that support explicit disposal.
+ *
+ * @license GPL 2+
+ * @author Daniel Kinzler
+ *
+ * @todo make this reusable outside Wikibase
+ */
+interface Disposable {
+
+   /**
+* Releases any system (or other) resources held by this object.
+*
+* It is safe to call dispose() multiple times.
+* The behavior of all other methods of this object becomes undefined 
after calling dispose()
+* for the first time.
+*
+* Implementing classes may choose to implement the __destruct() method 
to call dispose().
+*/
+   public function dispose();
+
+}
diff --git a/lib/includes/Dumpers/JsonDumpGenerator.php 
b/lib/includes/Dumpers/JsonDumpGenerator.php
index 20f007f..efad245 100644
--- a/lib/includes/Dumpers/JsonDumpGenerator.php
+++ b/lib/includes/Dumpers/JsonDumpGenerator.php
@@ -83,7 +83,7 @@
}
}
 
-   $json = ]\n; //TODO: make optional
+   $json = \n]\n; //TODO: make optional
$this-writeToDump( $json );
}
 
diff --git a/lib/includes/IO/EntityIdReader.php 
b/lib/includes/IO/EntityIdReader.php
new file mode 100644
index 000..b4b62dc
--- /dev/null
+++ b/lib/includes/IO/EntityIdReader.php
@@ -0,0 +1,98 @@
+?php
+
+namespace Wikibase\IO;
+
+use Disposable;
+use Iterator;
+use Wikibase\DataModel\Entity\EntityId;
+use Wikibase\Lib\EntityIdParser;
+
+/**
+ * EntityIdReader reads entity IDs from a file, one per line.
+ *
+ * @license GPL 2+
+ * @author Daniel Kinzler
+ */
+class EntityIdReader implements Iterator, Disposable {
+
+   /**
+* @var LineReader
+*/
+   protected $reader;
+
+   /**
+* @param resource $fileHandle The file to read from.
+* @param bool $canClose Whether calling dispose() should close the 
fine handle.
+* @param bool $autoDispose Whether to automatically call dispose() 
when reaching EOF.
+*
+* @throws \InvalidArgumentException
+*/
+   public function __construct( $fileHandle, $canClose = true, 
$autoDispose = false ) {
+   $this-reader = new LineReader( $fileHandle, $canClose, 
$autoDispose );
+   $this-parser = new EntityIdParser(); //TODO: inject?
+   }
+
+   /**
+* @param string $line
+* @return EntityId
+*/
+   protected function lineToId( $line ) {
+   $line = trim( $line );
+   $id = $this-parser-parse( $line );
+   //TODO: optionally catch, log  ignore 

[MediaWiki-commits] [Gerrit] Update Wikibase and DataValues - change (mediawiki/core)

2013-09-12 Thread Reedy (Code Review)
Reedy has submitted this change and it was merged.

Change subject: Update Wikibase and DataValues
..


Update Wikibase and DataValues

- backport fix for null precision in coordinates
- fix for missing javascript tooltip message
- fix for autosummaries in wbcreateclaim and other api modules

Change-Id: If2997b6ac91b59d45848205662553e73e16ad194
---
M extensions/DataValues
M extensions/Wikibase
2 files changed, 0 insertions(+), 0 deletions(-)

Approvals:
  Reedy: Verified; Looks good to me, approved
  jenkins-bot: Verified



diff --git a/extensions/DataValues b/extensions/DataValues
index a0aceef..ac5b0c7 16
--- a/extensions/DataValues
+++ b/extensions/DataValues
-Subproject commit a0aceef71837a549787d59aa93e15de04598db13
+Subproject commit ac5b0c7ba416830d3bafa6d1c5d09b000b89ab1b
diff --git a/extensions/Wikibase b/extensions/Wikibase
index edc709a..cb1644d 16
--- a/extensions/Wikibase
+++ b/extensions/Wikibase
-Subproject commit edc709a3d65e573aa3aed0a8b604ebc3b19f295d
+Subproject commit cb1644d5e66586d3e9964de82abc370f50dd9b26

-- 
To view, visit https://gerrit.wikimedia.org/r/84009
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: If2997b6ac91b59d45848205662553e73e16ad194
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: wmf/1.22wmf16
Gerrit-Owner: Aude aude.w...@gmail.com
Gerrit-Reviewer: Greg Grossmeier g...@wikimedia.org
Gerrit-Reviewer: Reedy re...@wikimedia.org
Gerrit-Reviewer: jenkins-bot

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] adding bastion4001 to dhcp - change (operations/puppet)

2013-09-12 Thread RobH (Code Review)
RobH has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/84028


Change subject: adding bastion4001 to dhcp
..

adding bastion4001 to dhcp

Change-Id: I285a189b16271755d4bebf25ef0a141085a46681
---
M files/dhcpd/linux-host-entries.ttyS1-115200
1 file changed, 5 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/28/84028/1

diff --git a/files/dhcpd/linux-host-entries.ttyS1-115200 
b/files/dhcpd/linux-host-entries.ttyS1-115200
index 97d43ea..8e884db 100644
--- a/files/dhcpd/linux-host-entries.ttyS1-115200
+++ b/files/dhcpd/linux-host-entries.ttyS1-115200
@@ -219,6 +219,11 @@
fixed-address bast1001.wikimedia.org;
 }
 
+host bastion4001 {
+   hardware ethernet 90:b1:1c:4d:42:49;
+   fixed-address bastion4001.wikimedia.org;
+}
+
 host beryllium {
hardware ethernet 78:2b:cb:08:a3:ab;
fixed-address beryllium.wikimedia.org;

-- 
To view, visit https://gerrit.wikimedia.org/r/84028
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I285a189b16271755d4bebf25ef0a141085a46681
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: RobH r...@wikimedia.org

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] SpecialPrefixindex: Try not to generate unclickable links - change (mediawiki/core)

2013-09-12 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: SpecialPrefixindex: Try not to generate unclickable links
..


SpecialPrefixindex: Try not to generate unclickable links

Bug: 52543
Change-Id: I1f202d9c07bba730200d226a664e5804aa961b68
---
M includes/specials/SpecialPrefixindex.php
1 file changed, 2 insertions(+), 1 deletion(-)

Approvals:
  Catrope: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/includes/specials/SpecialPrefixindex.php 
b/includes/specials/SpecialPrefixindex.php
index c4c5c99..28d07ff 100644
--- a/includes/specials/SpecialPrefixindex.php
+++ b/includes/specials/SpecialPrefixindex.php
@@ -210,7 +210,8 @@
$t = Title::makeTitle( 
$s-page_namespace, $s-page_title );
if ( $t ) {
$displayed = $t-getText();
-   if ( $this-stripPrefix ) {
+   // Try not to generate 
unclickable links
+   if ( $this-stripPrefix  
$prefixLength !== strlen( $displayed ) ) {
$displayed = substr( 
$displayed, $prefixLength );
}
$link = ( $s-page_is_redirect 
? 'div class=allpagesredirect' : '' ) .

-- 
To view, visit https://gerrit.wikimedia.org/r/82029
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I1f202d9c07bba730200d226a664e5804aa961b68
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Bartosz Dziewoński matma@gmail.com
Gerrit-Reviewer: Catrope roan.katt...@gmail.com
Gerrit-Reviewer: jenkins-bot

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] Enable CleanChanges extension on Meta-Wiki - change (operations/mediawiki-config)

2013-09-12 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Enable CleanChanges extension on Meta-Wiki
..


Enable CleanChanges extension on Meta-Wiki

Bug: 53541
Change-Id: Ib873d079d02c379bb027d028fc5b5f004fe43b54
---
M wmf-config/CommonSettings.php
M wmf-config/InitialiseSettings.php
M wmf-config/extension-list
3 files changed, 10 insertions(+), 1 deletion(-)

Approvals:
  Reedy: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/wmf-config/CommonSettings.php b/wmf-config/CommonSettings.php
index 0ce070e..f452185 100644
--- a/wmf-config/CommonSettings.php
+++ b/wmf-config/CommonSettings.php
@@ -2182,6 +2182,11 @@
$wgTranslationNotificationsContactMethods['talkpage-elsewhere'] = true;
 }
 
+if ( $wmgUseCleanChanges ) {
+   $wgDefaultUserOptions['usenewrc'] = 1;
+   require_once( $IP/extensions/CleanChanges/CleanChanges.php );
+}
+
 if ( $wmgUseVips ) {
include( $IP/extensions/VipsScaler/VipsScaler.php );
include( $IP/extensions/VipsScaler/VipsTest.php );
diff --git a/wmf-config/InitialiseSettings.php 
b/wmf-config/InitialiseSettings.php
index 737edf5..1e8d323 100644
--- a/wmf-config/InitialiseSettings.php
+++ b/wmf-config/InitialiseSettings.php
@@ -11854,7 +11854,10 @@
'wikimania2013wiki' = true,
'wikimania2014wiki' = true,
 ),
-
+'wmgUseCleanChanges' = array(
+   'default' = false,
+   'metawiki' = true, // bug 53541
+),
 // (towards bug 46333) Make the new login and create account forms the default.
 'wmgUseVForm' = array(
'default' = true,
diff --git a/wmf-config/extension-list b/wmf-config/extension-list
index 7fc9dbb..c386a99 100644
--- a/wmf-config/extension-list
+++ b/wmf-config/extension-list
@@ -18,6 +18,7 @@
 $IP/extensions/Cite/Cite.php
 $IP/extensions/Cite/SpecialCite.php
 $IP/extensions/cldr/cldr.php
+$IP/extensions/CleanChanges/CleanChanges.php
 $IP/extensions/ClientSide/ClientSide.php
 $IP/extensions/CodeEditor/CodeEditor.php
 $IP/extensions/CodeReview/CodeReview.php

-- 
To view, visit https://gerrit.wikimedia.org/r/81678
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: Ib873d079d02c379bb027d028fc5b5f004fe43b54
Gerrit-PatchSet: 3
Gerrit-Project: operations/mediawiki-config
Gerrit-Branch: master
Gerrit-Owner: Nemo bis federicol...@tiscali.it
Gerrit-Reviewer: Aude aude.w...@gmail.com
Gerrit-Reviewer: Nemo bis federicol...@tiscali.it
Gerrit-Reviewer: Nikerabbit niklas.laxst...@gmail.com
Gerrit-Reviewer: Reedy re...@wikimedia.org
Gerrit-Reviewer: jenkins-bot

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] Fix merge conflict breaking localised bold/italic icons - change (mediawiki...VisualEditor)

2013-09-12 Thread Esanders (Code Review)
Esanders has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/84027


Change subject: Fix merge conflict breaking localised bold/italic icons
..

Fix merge conflict breaking localised bold/italic icons

Bug introduced by change Ic97a636f9.

Change-Id: I4bf0bd4d340dfbad26a0d729de866985f81d14aa
---
M modules/ve/ui/tools/ve.ui.AnnotationTool.js
1 file changed, 2 insertions(+), 4 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/VisualEditor 
refs/changes/27/84027/1

diff --git a/modules/ve/ui/tools/ve.ui.AnnotationTool.js 
b/modules/ve/ui/tools/ve.ui.AnnotationTool.js
index 82fe82c..5991375 100644
--- a/modules/ve/ui/tools/ve.ui.AnnotationTool.js
+++ b/modules/ve/ui/tools/ve.ui.AnnotationTool.js
@@ -79,7 +79,7 @@
 ve.ui.BoldAnnotationTool.static.group = 'textStyle';
 ve.ui.BoldAnnotationTool.static.icon = {
'default': 'bold-a',
-   'be-tarask': 'bold-cyrl-te-el',
+   'be': 'bold-cyrl-te',
'cs': 'bold-b',
'da': 'bold-f',
'de': 'bold-f',
@@ -100,7 +100,6 @@
'os': 'bold-cyrl-be',
'pl': 'bold-b',
'pt': 'bold-n',
-   'pt-br': 'bold-n',
'ru': 'bold-cyrl-zhe',
'sv': 'bold-f'
 };
@@ -125,7 +124,7 @@
 ve.ui.ItalicAnnotationTool.static.group = 'textStyle';
 ve.ui.ItalicAnnotationTool.static.icon = {
'default': 'italic-a',
-   'be-tarask': 'italic-cyrl-ka',
+   'be': 'italic-cyrl-ka',
'cs': 'italic-i',
'da': 'italic-k',
'de': 'italic-k',
@@ -146,7 +145,6 @@
'os': 'italic-cyrl-ka',
'pl': 'italic-i',
'pt': 'italic-i',
-   'pt-br': 'italic-i',
'ru': 'italic-cyrl-ka',
'sv': 'italic-k'
 };

-- 
To view, visit https://gerrit.wikimedia.org/r/84027
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I4bf0bd4d340dfbad26a0d729de866985f81d14aa
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/VisualEditor
Gerrit-Branch: master
Gerrit-Owner: Esanders esand...@wikimedia.org

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] Switch SVGEdit to use the master copy from Google Code inste... - change (mediawiki...SVGEdit)

2013-09-12 Thread Brion VIBBER (Code Review)
Brion VIBBER has submitted this change and it was merged.

Change subject: Switch SVGEdit to use the master copy from Google Code instead 
of a local copy.
..


Switch SVGEdit to use the master copy from Google Code instead of a local copy.

Local copy no longer exists since we switched from SVN externals to git.
Master copy is also more up to date and works on IE 9.

Note that SVG-Edit is embedded via an iframe, so the only security leak
should be referrer information and the actual contents of the file.

A custom copy of SVG-Edit can still be embedded by switching $wgSVGEditEditor.

Change-Id: Ic55951482ed9e0d4a7cd5de17011614ec2a446e5
---
M README
M SVGEdit.php
2 files changed, 7 insertions(+), 15 deletions(-)

Approvals:
  Brion VIBBER: Verified; Looks good to me, approved
  jenkins-bot: Checked



diff --git a/README b/README
index 6d143e7..badca0f 100644
--- a/README
+++ b/README
@@ -3,16 +3,12 @@
 
   http://code.google.com/p/svg-edit/
 
-SVG-edit 2.5.1 is included at present.
+A master copy of SVG-Edit from Google Code is used, embedded in an iframe.
 
-Current versions of most major browsers should work except for Internet 
Explorer
-(IE currently requires Chrome Frame plugin, or using the development version of
-SVG-edit 2.6 with IE9.)
+You may wish to make your own copy of SVG-Edit, either in this subdirectory or 
elsewhere;
+if so set $wgSVGEditEditor to point at the 'svg-editor.html' file.
 
-While the master code for this extension lives in Wikimedia's SVN repository, 
I also
-have a git repo where I may have some experimental branches:
-
-  http://gitorious.org/mediawiki-svgedit/mediawiki-svgedit
+Current versions of most major browsers should work except for Internet 
Explorer 8 and below.
 
 -- brion vibber (brion @ pobox.com)
 
diff --git a/SVGEdit.php b/SVGEdit.php
index 91c5764..5da549a 100644
--- a/SVGEdit.php
+++ b/SVGEdit.php
@@ -95,15 +95,11 @@
 );
 
 // Can set to alternate SVGEdit URL to pull the editor's HTML/CSS/JS/SVG
-// resources from another domain; will still need to have the MediaWiki
-// extension in it, so use a checkout of this extension rather than a
-// master copy of svg-edit on its own.
+// resources from another domain.
 //
-// Example: $wgSVGEditEditor = 
'http://toolserver.org/~brion/svg-edit/svg-editor.html';
+// By default, a master copy from Google Code is used. This may or may not be 
stable.
 //
-// If left empty, the local copy will be used on the main MediaWiki domain.
-//
-$wgSVGEditEditor = false;
+$wgSVGEditEditor = 
'http://svg-edit.googlecode.com/svn/trunk/editor/svg-editor.html';
 
 // Set to enable experimental triggers for SVG editing within article views.
 // Not yet recommended.

-- 
To view, visit https://gerrit.wikimedia.org/r/43238
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: Ic55951482ed9e0d4a7cd5de17011614ec2a446e5
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/SVGEdit
Gerrit-Branch: master
Gerrit-Owner: Brion VIBBER br...@wikimedia.org
Gerrit-Reviewer: Brion VIBBER br...@wikimedia.org
Gerrit-Reviewer: Siebrand siebr...@wikimedia.org
Gerrit-Reviewer: jenkins-bot

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] Catch all Exceptions in harvest_template - change (pywikibot/core)

2013-09-12 Thread Merlijn van Deen (Code Review)
Merlijn van Deen has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/84004


Change subject: Catch all Exceptions in harvest_template
..

Catch all Exceptions in harvest_template

When an Exception is raised, print the exception and continue
with the next page instead of aborting.

This should probably use some pywikibot.output(), but this should
at least work as a quick fix.

Change-Id: I61fcf6fdd04adb92324437f2a79e9ce5ee483fc0
---
M scripts/harvest_template.py
1 file changed, 6 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/pywikibot/core 
refs/changes/04/84004/1

diff --git a/scripts/harvest_template.py b/scripts/harvest_template.py
index 40e43a3..4bfc780 100755
--- a/scripts/harvest_template.py
+++ b/scripts/harvest_template.py
@@ -75,7 +75,12 @@
 
 self.templateTitles = self.getTemplateSynonyms(self.templateTitle)
 for page in self.generator:
-self.procesPage(page)
+try:
+self.procesPage(page)
+except Exception, e:
+import traceback
+traceback.print_exc(30)
+pass
 
 def getTemplateSynonyms(self, title):
 

-- 
To view, visit https://gerrit.wikimedia.org/r/84004
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I61fcf6fdd04adb92324437f2a79e9ce5ee483fc0
Gerrit-PatchSet: 1
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Owner: Merlijn van Deen valhall...@arctus.nl

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] role/analytics/kafka.pp - changing hostnames of labs kafka i... - change (operations/puppet)

2013-09-12 Thread Ottomata (Code Review)
Ottomata has submitted this change and it was merged.

Change subject: role/analytics/kafka.pp - changing hostnames of labs kafka 
instances
..


role/analytics/kafka.pp - changing hostnames of labs kafka instances

Change-Id: Id18aedd53516f1b1eafbb3263db6f67e0007814d
---
M manifests/role/analytics/kafka.pp
1 file changed, 4 insertions(+), 4 deletions(-)

Approvals:
  Ottomata: Verified; Looks good to me, approved



diff --git a/manifests/role/analytics/kafka.pp 
b/manifests/role/analytics/kafka.pp
index fc57295..7f422ea 100644
--- a/manifests/role/analytics/kafka.pp
+++ b/manifests/role/analytics/kafka.pp
@@ -28,11 +28,11 @@
 # TODO: Make hostnames configurable via labs global variables.
 $cluster = {
 'main' = {
-'kraken-kafka.pmtpa.wmflabs'  = { 'id' = 1 },
-'kraken-kafka1.pmtpa.wmflabs' = { 'id' = 2 },
+'kafka-main1.pmtpa.wmflabs' = { 'id' = 1 },
+'kafka-main2.pmtpa.wmflabs' = { 'id' = 2 },
 },
-'external' = {
-'kraken-kafka-external.pmtpa.wmflabs' = { 'id' = 10 },
+'external'  = {
+'kafka-external1.pmtpa.wmflabs' = { 'id' = 10 },
 },
 }
 # labs only uses a single log_dir

-- 
To view, visit https://gerrit.wikimedia.org/r/84030
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: Id18aedd53516f1b1eafbb3263db6f67e0007814d
Gerrit-PatchSet: 2
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Ottomata o...@wikimedia.org
Gerrit-Reviewer: Ottomata o...@wikimedia.org
Gerrit-Reviewer: jenkins-bot

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] Update MoodBar to master - change (mediawiki/core)

2013-09-12 Thread Reedy (Code Review)
Reedy has submitted this change and it was merged.

Change subject: Update MoodBar to master
..


Update MoodBar to master

Change-Id: I0e7cf91182c51c5da0bb9516ed410279dbdf2026
---
M extensions/MoodBar
1 file changed, 0 insertions(+), 0 deletions(-)

Approvals:
  Reedy: Verified; Looks good to me, approved



diff --git a/extensions/MoodBar b/extensions/MoodBar
index 195f315..bce88f9 16
--- a/extensions/MoodBar
+++ b/extensions/MoodBar
-Subproject commit 195f315db089a540e1a85bda3a751281b6251f39
+Subproject commit bce88f99cf60f2e4180ceefcbc230806ed656b58

-- 
To view, visit https://gerrit.wikimedia.org/r/84090
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I0e7cf91182c51c5da0bb9516ed410279dbdf2026
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: wmf/1.22wmf16
Gerrit-Owner: Reedy re...@wikimedia.org
Gerrit-Reviewer: Reedy re...@wikimedia.org

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] adding cr2-ulsfo - change (operations/dns)

2013-09-12 Thread Lcarr (Code Review)
Lcarr has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/84029


Change subject: adding cr2-ulsfo
..

adding cr2-ulsfo

Change-Id: Ia954c9d13f80406b969f6da438d4eea87ab0a19f
---
M templates/wikimedia.org
1 file changed, 3 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/dns 
refs/changes/29/84029/1

diff --git a/templates/wikimedia.org b/templates/wikimedia.org
index 59f0d20..b0c3828 100644
--- a/templates/wikimedia.org
+++ b/templates/wikimedia.org
@@ -441,6 +441,9 @@
 cr1-ulsfo  1H  IN A198.35.26.192
IN  2620:0:863:::1
 
+cr2-ulsfo  1H  IN A198.35.26.193
+   IN  2620:0:863:::2
+
 cr2-eqiad  1H  IN A208.80.154.197
IN  2620:0:861:::2
 

-- 
To view, visit https://gerrit.wikimedia.org/r/84029
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ia954c9d13f80406b969f6da438d4eea87ab0a19f
Gerrit-PatchSet: 1
Gerrit-Project: operations/dns
Gerrit-Branch: master
Gerrit-Owner: Lcarr lc...@wikimedia.org

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] adding bastion4001 to dhcp - change (operations/puppet)

2013-09-12 Thread RobH (Code Review)
RobH has submitted this change and it was merged.

Change subject: adding bastion4001 to dhcp
..


adding bastion4001 to dhcp

Change-Id: I285a189b16271755d4bebf25ef0a141085a46681
---
M files/dhcpd/linux-host-entries.ttyS1-115200
1 file changed, 5 insertions(+), 0 deletions(-)

Approvals:
  RobH: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/files/dhcpd/linux-host-entries.ttyS1-115200 
b/files/dhcpd/linux-host-entries.ttyS1-115200
index 97d43ea..8e884db 100644
--- a/files/dhcpd/linux-host-entries.ttyS1-115200
+++ b/files/dhcpd/linux-host-entries.ttyS1-115200
@@ -219,6 +219,11 @@
fixed-address bast1001.wikimedia.org;
 }
 
+host bastion4001 {
+   hardware ethernet 90:b1:1c:4d:42:49;
+   fixed-address bastion4001.wikimedia.org;
+}
+
 host beryllium {
hardware ethernet 78:2b:cb:08:a3:ab;
fixed-address beryllium.wikimedia.org;

-- 
To view, visit https://gerrit.wikimedia.org/r/84028
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I285a189b16271755d4bebf25ef0a141085a46681
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: RobH r...@wikimedia.org
Gerrit-Reviewer: RobH r...@wikimedia.org
Gerrit-Reviewer: jenkins-bot

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] Merge branch 'master' into debian - change (operations...libvmod-netmapper)

2013-09-12 Thread BBlack (Code Review)
BBlack has submitted this change and it was merged.

Change subject: Merge branch 'master' into debian
..


Merge branch 'master' into debian

Change-Id: I163b112ae95b23e890820a8315ffb7d578f4f627
---
0 files changed, 0 insertions(+), 0 deletions(-)

Approvals:
  BBlack: Verified; Looks good to me, approved




-- 
To view, visit https://gerrit.wikimedia.org/r/84020
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I163b112ae95b23e890820a8315ffb7d578f4f627
Gerrit-PatchSet: 1
Gerrit-Project: operations/software/varnish/libvmod-netmapper
Gerrit-Branch: debian
Gerrit-Owner: BBlack bbl...@wikimedia.org
Gerrit-Reviewer: BBlack bbl...@wikimedia.org

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] Fix message dependencies for jquery.wikibase.snaklistview - change (mediawiki...Wikibase)

2013-09-12 Thread Aude (Code Review)
Aude has submitted this change and it was merged.

Change subject: Fix message dependencies for jquery.wikibase.snaklistview
..


Fix message dependencies for jquery.wikibase.snaklistview

Change-Id: I08f7f7a8ddfaaa46ee79f33bd830f9582a0b468f
---
M lib/resources/Resources.php
1 file changed, 1 insertion(+), 0 deletions(-)

Approvals:
  Aude: Verified; Looks good to me, approved



diff --git a/lib/resources/Resources.php b/lib/resources/Resources.php
index a2394ee..30755ec 100644
--- a/lib/resources/Resources.php
+++ b/lib/resources/Resources.php
@@ -510,6 +510,7 @@
),
'messages' = array(
'wikibase-claimview-snak-tooltip',
+   'wikibase-claimview-snak-new-tooltip',
)
),
 

-- 
To view, visit https://gerrit.wikimedia.org/r/84017
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I08f7f7a8ddfaaa46ee79f33bd830f9582a0b468f
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Wikibase
Gerrit-Branch: mw1.22-wmf16
Gerrit-Owner: Aude aude.w...@gmail.com
Gerrit-Reviewer: Aude aude.w...@gmail.com
Gerrit-Reviewer: Hoo man h...@online.de

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] deploy libvmod-netmapper to mobile varnishes - change (operations/puppet)

2013-09-12 Thread BBlack (Code Review)
BBlack has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/84026


Change subject: deploy libvmod-netmapper to mobile varnishes
..

deploy libvmod-netmapper to mobile varnishes

Change-Id: I7792c6a49c5921d3414a2a03185c92d906253e50
---
M manifests/role/cache.pp
1 file changed, 5 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/26/84026/1

diff --git a/manifests/role/cache.pp b/manifests/role/cache.pp
index f503e50..3de966e 100644
--- a/manifests/role/cache.pp
+++ b/manifests/role/cache.pp
@@ -951,6 +951,11 @@
before = Varnish::Instance[mobile-backend]
}
 
+   package { libvmod-netmapper:
+   ensure = latest,
+   before = Varnish::Instance[mobile-frontend],
+   }
+
class { varnish::htcppurger: varnish_instances = [ 
127.0.0.1:80, 127.0.0.1:3128 ] }
 
include varnish::monitoring::ganglia::vhtcpd

-- 
To view, visit https://gerrit.wikimedia.org/r/84026
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I7792c6a49c5921d3414a2a03185c92d906253e50
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: BBlack bbl...@wikimedia.org

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] Add mosh to bastion hosts - change (operations/puppet)

2013-09-12 Thread Yuvipanda (Code Review)
Yuvipanda has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/84024


Change subject: Add mosh to bastion hosts
..

Add mosh to bastion hosts

Bug: 52693
Change-Id: Ida9667a4db1da4339c77eff2f887d1071dbe7d6e
---
M manifests/misc/bastion.pp
1 file changed, 2 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/24/84024/1

diff --git a/manifests/misc/bastion.pp b/manifests/misc/bastion.pp
index 04a11bb..7384d98 100644
--- a/manifests/misc/bastion.pp
+++ b/manifests/misc/bastion.pp
@@ -15,6 +15,8 @@
ensure = absent;
traceroute:
ensure =latest;
+   mosh:
+   ensure = latest;
}
 
 }

-- 
To view, visit https://gerrit.wikimedia.org/r/84024
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ida9667a4db1da4339c77eff2f887d1071dbe7d6e
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Yuvipanda yuvipa...@gmail.com

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] Remove Misc tab from Special:Preferences - change (mediawiki/core)

2013-09-12 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Remove Misc tab from Special:Preferences
..


Remove Misc tab from Special:Preferences

It has served us faithfully for many years, but now, after most of its
contents have been moved to other tabs, it only contained one section
with two options related to diffs in it. Moved these two as well to
Appearance tab where they rightfully belong.

Also moved some code potentially adding items to the personal/i18n
section out of the misc part and to the personal part, where it should
have always been in the first place. (This actually appears to be dead
code, as $extraUserToggles doesn't seem to be defined for any language
- marked as FIXME.)

The Preferences::miscPreferences() function doesn't do anything now,
but kept it and its only call just in case for backwards-compatibility.

Bug: 52084
Change-Id: I537abc9884e18acf3ff9a425241de4607dfd7c33
---
M includes/Preferences.php
1 file changed, 25 insertions(+), 27 deletions(-)

Approvals:
  Catrope: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/includes/Preferences.php b/includes/Preferences.php
index 709f15c..159127a 100644
--- a/includes/Preferences.php
+++ b/includes/Preferences.php
@@ -369,6 +369,18 @@
}
}
 
+   // Stuff from Language::getExtraUserToggles()
+   // FIXME is this dead code? $extraUserToggles doesn't seem to 
be defined for any language
+   $toggles = $wgContLang-getExtraUserToggles();
+
+   foreach ( $toggles as $toggle ) {
+   $defaultPreferences[$toggle] = array(
+   'type' = 'toggle',
+   'section' = 'personal/i18n',
+   'label-message' = tog-$toggle,
+   );
+   }
+
// show a preview of the old signature first
$oldsigWikiText = $wgParser-preSaveTransform( ~~~, 
$context-getTitle(), $user, ParserOptions::newFromContext( $context ) );
$oldsigHTML = $context-getOutput()-parseInline( 
$oldsigWikiText, true, true );
@@ -675,6 +687,18 @@
 * @param $defaultPreferences Array
 */
static function renderingPreferences( $user, IContextSource $context, 
$defaultPreferences ) {
+   ## Diffs 
+   $defaultPreferences['diffonly'] = array(
+   'type' = 'toggle',
+   'section' = 'rendering/diffs',
+   'label-message' = 'tog-diffonly',
+   );
+   $defaultPreferences['norollbackdiff'] = array(
+   'type' = 'toggle',
+   'section' = 'rendering/diffs',
+   'label-message' = 'tog-norollbackdiff',
+   );
+
## Page Rendering ##
global $wgAllowUserCssPrefs;
if ( $wgAllowUserCssPrefs ) {
@@ -1045,35 +1069,9 @@
}
 
/**
-* @param $user User
-* @param $context IContextSource
-* @param $defaultPreferences Array
+* Dummy, kept for backwards-compatibility.
 */
static function miscPreferences( $user, IContextSource $context, 
$defaultPreferences ) {
-   global $wgContLang;
-
-   ## Misc #
-   $defaultPreferences['diffonly'] = array(
-   'type' = 'toggle',
-   'section' = 'misc/diffs',
-   'label-message' = 'tog-diffonly',
-   );
-   $defaultPreferences['norollbackdiff'] = array(
-   'type' = 'toggle',
-   'section' = 'misc/diffs',
-   'label-message' = 'tog-norollbackdiff',
-   );
-
-   // Stuff from Language::getExtraUserToggles()
-   $toggles = $wgContLang-getExtraUserToggles();
-
-   foreach ( $toggles as $toggle ) {
-   $defaultPreferences[$toggle] = array(
-   'type' = 'toggle',
-   'section' = 'personal/i18n',
-   'label-message' = tog-$toggle,
-   );
-   }
}
 
/**

-- 
To view, visit https://gerrit.wikimedia.org/r/78410
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I537abc9884e18acf3ff9a425241de4607dfd7c33
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Bartosz Dziewoński matma@gmail.com
Gerrit-Reviewer: Addshore addshorew...@gmail.com
Gerrit-Reviewer: Bartosz Dziewoński matma@gmail.com
Gerrit-Reviewer: Catrope roan.katt...@gmail.com
Gerrit-Reviewer: 

[MediaWiki-commits] [Gerrit] Load photo uploader dynamically - change (mediawiki...MobileFrontend)

2013-09-12 Thread JGonera (Code Review)
JGonera has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/84032


Change subject: Load photo uploader dynamically
..

Load photo uploader dynamically

Refactor the code in the process (split the button and controller
code) and rename/move some of the templates so that it's clear where
they belong.

Initial page load (stable, desktop Chrome) before: 320KB, after: 303KB.

Bug: 48718
Change-Id: I1b167dd27ba0488f99cbd3a29287d8af95011647
---
M includes/Resources.php
M javascripts/modules/uploads/LeadPhoto.js
M javascripts/modules/uploads/LearnMoreOverlay.js
M javascripts/modules/uploads/NagOverlay.js
M javascripts/modules/uploads/PhotoUploadProgress.js
M javascripts/modules/uploads/PhotoUploader.js
A javascripts/modules/uploads/PhotoUploaderButton.js
M javascripts/modules/uploads/PhotoUploaderPreview.js
R templates/uploads/LeadPhoto.html
R templates/uploads/LeadPhotoUploaderButton.html
R templates/uploads/LearnMoreOverlay.html
R templates/uploads/NagOverlay.html
R templates/uploads/PhotoUploadPreview.html
R templates/uploads/PhotoUploadProgress.html
R templates/uploads/PhotoUploaderButton.html
15 files changed, 290 insertions(+), 235 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/MobileFrontend 
refs/changes/32/84032/1

diff --git a/includes/Resources.php b/includes/Resources.php
index fbd1bfc..079bf07 100644
--- a/includes/Resources.php
+++ b/includes/Resources.php
@@ -156,20 +156,6 @@
 
'mobile.stable.plumbing' = array(
'messages' = array(
-   // NagOverlay.js
-   'mobile-frontend-photo-license' = array( 'parse' ),
-   'mobile-frontend-photo-nag-1-bullet-1-heading',
-   'mobile-frontend-photo-nag-1-bullet-1-text' = array( 
'parse' ),
-   'mobile-frontend-photo-nag-1-bullet-2-heading',
-   'mobile-frontend-photo-nag-1-bullet-2-text',
-   'mobile-frontend-photo-nag-2-bullet-1-heading',
-   'mobile-frontend-photo-nag-3-bullet-1-heading',
-   'parentheses',
-   'mobile-frontend-learn-more',
-   'mobile-frontend-photo-nag-learn-more-heading',
-   'mobile-frontend-photo-nag-learn-more-1' = array( 
'parse' ),
-   'mobile-frontend-photo-nag-learn-more-2' = array( 
'parse' ),
-   'mobile-frontend-photo-nag-learn-more-3' = array( 
'parse' ),
// page.js
'mobile-frontend-talk-overlay-header',
'mobile-frontend-language-article-heading',
@@ -189,27 +175,21 @@
'wikitext/commons-upload',
// LanguageOverlay.js
'overlays/languages',
-   // leadphoto.js
-   'leadPhoto',
'overlay',
'overlays/cleanup',
-   'overlays/learnMore',
// search-2.js
'articleList',
'overlays/search/search',
// page.js
'page',
'languageSection',
-   // PhotoUploader.js
+   // PhotoUploaderButton.js
// For new page action menu
-   'photoUploadAction',
-   'photoUploader',
-   // PhotoUploaderPreview.js
-   'photoUploadPreview',
-   // PhotoUploadProgress.js
-   'photoUploadProgress',
-   // NagOverlay.js
-   'photoNag',
+   'uploads/LeadPhotoUploaderButton',
+   // FIXME: this should be in special.uploads.plumbing 
(need to split
+   // code in PhotoUploaderButton.js into separate files 
too)
+   'uploads/PhotoUploaderButton',
+
'ctaDrawer',
// mf-references.js
'ReferencesDrawer',
@@ -254,6 +234,80 @@
'mobile-frontend-editor-error-loading',
'mobile-frontend-editor-preview-header',
'mobile-frontend-editor-error-preview',
+   ),
+   ),
+
+   'mobile.dynamic.uploads' = $wgMFMobileResourceBoilerplate + array(
+   'dependencies' = array(
+   'mobile.stable',
+   'mobile.dynamic.uploads.plumbing',
+   ),
+   'scripts' = array(
+   'javascripts/modules/uploads/LearnMoreOverlay.js',
+   'javascripts/modules/uploads/PhotoApi.js',
+   

[MediaWiki-commits] [Gerrit] fixing the ntp server ranges - change (operations/puppet)

2013-09-12 Thread Lcarr (Code Review)
Lcarr has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/84091


Change subject: fixing the ntp server ranges
..

fixing the ntp server ranges

Change-Id: I644f4d96cc22b63535b2c98459a947bdfb94169f
---
M modules/cdh4
M modules/ntp/templates/ntp-server.erb
2 files changed, 3 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/91/84091/1

diff --git a/modules/cdh4 b/modules/cdh4
index e55bfa1..5bde42e 16
--- a/modules/cdh4
+++ b/modules/cdh4
-Subproject commit e55bfa10f47a84fa78dee9a540175d503775dc0c
+Subproject commit 5bde42ead8e72fb23a33cb7efd1c90f8b43e746d
diff --git a/modules/ntp/templates/ntp-server.erb 
b/modules/ntp/templates/ntp-server.erb
index b013a5f..1f9b9e1 100644
--- a/modules/ntp/templates/ntp-server.erb
+++ b/modules/ntp/templates/ntp-server.erb
@@ -45,6 +45,9 @@
 restrict 208.80.152.0 mask 255.255.252.0 kod notrap nomodify nopeer
 restrict 91.198.174.0 mask 255.255.255.0 kod notrap nomodify nopeer
 restrict 2620:0:860:: mask :::: kod notrap nomodify nopeer
+restrict 198.35.26.0 mask 255.255.254.0 kod notrap nomodify nopeer
+restrict 185.15.56.0 mask 255.255.252.0 kod notrap nomodify nopeer
+restrict 2a02:ec80:: mask ::: kod notrap nomodify nopeer
 % else -%
 # Allow the monitoring server to query us
 # neon

-- 
To view, visit https://gerrit.wikimedia.org/r/84091
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I644f4d96cc22b63535b2c98459a947bdfb94169f
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Lcarr lc...@wikimedia.org

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] wmf17 symlinks - change (operations/mediawiki-config)

2013-09-12 Thread Reedy (Code Review)
Reedy has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/84018


Change subject: wmf17 symlinks
..

wmf17 symlinks

Change-Id: If0afc27ba1338d7e94e5b4737b2614be1a46fe2e
---
A docroot/bits/static-1.22wmf17/extensions
A docroot/bits/static-1.22wmf17/resources
A docroot/bits/static-1.22wmf17/skins
A w/static-1.22wmf17/extensions
A w/static-1.22wmf17/resources
A w/static-1.22wmf17/skins
6 files changed, 6 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/mediawiki-config 
refs/changes/18/84018/1

diff --git a/docroot/bits/static-1.22wmf17/extensions 
b/docroot/bits/static-1.22wmf17/extensions
new file mode 12
index 000..3415830
--- /dev/null
+++ b/docroot/bits/static-1.22wmf17/extensions
@@ -0,0 +1 @@
+/usr/local/apache/common-local/php-1.22wmf17/extensions
\ No newline at end of file
diff --git a/docroot/bits/static-1.22wmf17/resources 
b/docroot/bits/static-1.22wmf17/resources
new file mode 12
index 000..57cd912
--- /dev/null
+++ b/docroot/bits/static-1.22wmf17/resources
@@ -0,0 +1 @@
+/usr/local/apache/common-local/php-1.22wmf17/resources
\ No newline at end of file
diff --git a/docroot/bits/static-1.22wmf17/skins 
b/docroot/bits/static-1.22wmf17/skins
new file mode 12
index 000..ca55992
--- /dev/null
+++ b/docroot/bits/static-1.22wmf17/skins
@@ -0,0 +1 @@
+/usr/local/apache/common-local/php-1.22wmf17/skins/
\ No newline at end of file
diff --git a/w/static-1.22wmf17/extensions b/w/static-1.22wmf17/extensions
new file mode 12
index 000..3415830
--- /dev/null
+++ b/w/static-1.22wmf17/extensions
@@ -0,0 +1 @@
+/usr/local/apache/common-local/php-1.22wmf17/extensions
\ No newline at end of file
diff --git a/w/static-1.22wmf17/resources b/w/static-1.22wmf17/resources
new file mode 12
index 000..57cd912
--- /dev/null
+++ b/w/static-1.22wmf17/resources
@@ -0,0 +1 @@
+/usr/local/apache/common-local/php-1.22wmf17/resources
\ No newline at end of file
diff --git a/w/static-1.22wmf17/skins b/w/static-1.22wmf17/skins
new file mode 12
index 000..5009a92
--- /dev/null
+++ b/w/static-1.22wmf17/skins
@@ -0,0 +1 @@
+/usr/local/apache/common-local/php-1.22wmf17/skins
\ No newline at end of file

-- 
To view, visit https://gerrit.wikimedia.org/r/84018
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: If0afc27ba1338d7e94e5b4737b2614be1a46fe2e
Gerrit-PatchSet: 1
Gerrit-Project: operations/mediawiki-config
Gerrit-Branch: master
Gerrit-Owner: Reedy re...@wikimedia.org

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] loginwiki, mediawikiwiki, testwiki, test2wiki and testwikida... - change (operations/mediawiki-config)

2013-09-12 Thread Reedy (Code Review)
Reedy has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/84023


Change subject: loginwiki, mediawikiwiki, testwiki, test2wiki and 
testwikidatawiki to 1.22wmf17
..

loginwiki, mediawikiwiki, testwiki, test2wiki and testwikidatawiki to 1.22wmf17

Change-Id: Iccf165bc88fd5120074c7a5ae7dc931e5615e257
---
M wikiversions.dat
1 file changed, 5 insertions(+), 5 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/mediawiki-config 
refs/changes/23/84023/1

diff --git a/wikiversions.dat b/wikiversions.dat
index 2277a6c..ac7b43b 100644
--- a/wikiversions.dat
+++ b/wikiversions.dat
@@ -451,7 +451,7 @@
 lnwikibooks php-1.22wmf16 *
 lnwiki php-1.22wmf16 *
 lnwiktionary php-1.22wmf16 *
-loginwiki php-1.22wmf16 *
+loginwiki php-1.22wmf17 *
 lowiki php-1.22wmf16 *
 lowiktionary php-1.22wmf16 *
 ltgwiki php-1.22wmf16 *
@@ -465,7 +465,7 @@
 lvwiktionary php-1.22wmf16 *
 map_bmswiki php-1.22wmf16 *
 mdfwiki php-1.22wmf16 *
-mediawikiwiki php-1.22wmf16 *
+mediawikiwiki php-1.22wmf17 *
 metawiki php-1.22wmf16 *
 mgwikibooks php-1.22wmf16 *
 mgwiki php-1.22wmf16 *
@@ -731,9 +731,9 @@
 tawikisource php-1.22wmf16 *
 tawiktionary php-1.22wmf16 *
 tenwiki php-1.22wmf16 *
-test2wiki php-1.22wmf16 *
-testwiki php-1.22wmf16 *
-testwikidatawiki php-1.22wmf16 *
+test2wiki php-1.22wmf17 *
+testwiki php-1.22wmf17 *
+testwikidatawiki php-1.22wmf17 *
 tetwiki php-1.22wmf16 *
 tewikibooks php-1.22wmf16 *
 tewiki php-1.22wmf16 *

-- 
To view, visit https://gerrit.wikimedia.org/r/84023
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Iccf165bc88fd5120074c7a5ae7dc931e5615e257
Gerrit-PatchSet: 1
Gerrit-Project: operations/mediawiki-config
Gerrit-Branch: master
Gerrit-Owner: Reedy re...@wikimedia.org

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] Merge branch 'master' into debian - change (operations...libvmod-netmapper)

2013-09-12 Thread BBlack (Code Review)
BBlack has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/84020


Change subject: Merge branch 'master' into debian
..

Merge branch 'master' into debian

Change-Id: I163b112ae95b23e890820a8315ffb7d578f4f627
---
0 files changed, 0 insertions(+), 0 deletions(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/operations/software/varnish/libvmod-netmapper 
refs/changes/20/84020/1


-- 
To view, visit https://gerrit.wikimedia.org/r/84020
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I163b112ae95b23e890820a8315ffb7d578f4f627
Gerrit-PatchSet: 1
Gerrit-Project: operations/software/varnish/libvmod-netmapper
Gerrit-Branch: debian
Gerrit-Owner: BBlack bbl...@wikimedia.org

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] added all the new network subnets - change (operations/puppet)

2013-09-12 Thread Lcarr (Code Review)
Lcarr has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/84096


Change subject: added all the new network subnets
..

added all the new network subnets

Change-Id: Ia6156dc7e99fb93bb0f0ecaab2400f5d6a4e973e
---
M manifests/network.pp
1 file changed, 14 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/96/84096/1

diff --git a/manifests/network.pp b/manifests/network.pp
index eb0ad59..c434d9e 100644
--- a/manifests/network.pp
+++ b/manifests/network.pp
@@ -1,8 +1,8 @@
 # network.pp
 
 class network::constants {
-   $external_networks = [ 91.198.174.0/24, 208.80.152.0/22, 
2620:0:860::/46 ]
-   $all_networks = [ 91.198.174.0/24, 208.80.152.0/22, 
2620:0:860::/46, 10.0.0.0/8 ]
+   $external_networks = [ 91.198.174.0/24, 208.80.152.0/22, 
2620:0:860::/46, 185.15.56.0/22, 198.35.26.0/23, 2a02:ec80::/32 ]
+   $all_networks = [ 91.198.174.0/24, 208.80.152.0/22, 
2620:0:860::/46, 10.0.0.0/8, 185.15.56.0/22, 198.35.26.0/23, 
2a02:ec80::/32  ]
$all_network_subnets = {
'production' = {
'eqiad' = {
@@ -110,6 +110,18 @@
},
},
},
+   'ulsfo' = {
+   'public' = {
+   'public1-ulsfo' = {
+   'ipv4' = 198.35.26.0/27,
+   'ipv6' = 2620:0:863:1::/64 
+   },
+   'private1-ulsfo' = {
+   'ipv4' = 10.128.0.0/24,
+   'ipv6' = 2620:0:863:101::/64
+   },
+   },
+   },
},
}
 }

-- 
To view, visit https://gerrit.wikimedia.org/r/84096
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ia6156dc7e99fb93bb0f0ecaab2400f5d6a4e973e
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Lcarr lc...@wikimedia.org

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] updates for 1.2 (no multi-arch, new binary) - change (operations...libvmod-netmapper)

2013-09-12 Thread BBlack (Code Review)
BBlack has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/84021


Change subject: updates for 1.2 (no multi-arch, new binary)
..

updates for 1.2 (no multi-arch, new binary)

Change-Id: I75d2370295d88bbf7ff335493e1c0848d8facff1
---
M debian/changelog
M debian/control
M debian/libvmod-netmapper.install
3 files changed, 7 insertions(+), 2 deletions(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/operations/software/varnish/libvmod-netmapper 
refs/changes/21/84021/1

diff --git a/debian/changelog b/debian/changelog
index d1ace00..2413103 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,9 @@
+libvmod-netmapper (1.2-1) unstable; urgency=low
+
+  * Bump upstream
+
+ -- Brandon Black bbl...@wikimedia.org  Thu, 12 Sep 2013 17:53:16 +
+
 libvmod-netmapper (1.1-1) unstable; urgency=low
 
   * Bump upstream
diff --git a/debian/control b/debian/control
index 6d7a358..e9d160b 100644
--- a/debian/control
+++ b/debian/control
@@ -10,7 +10,6 @@
 
 Package: libvmod-netmapper
 Architecture: any
-Multi-Arch: same
 Pre-Depends: ${misc:Pre-Depends}
 Depends: ${shlibs:Depends}, ${misc:Depends}, varnish (= 3)
 Description: Varnish VMOD for mapping IP networks to strings
@@ -19,7 +18,6 @@
 
 Package: libvmod-netmapper-dbg
 Architecture: any
-Multi-Arch: same
 Depends: libvmod-netmapper (= ${binary:Version}), ${misc:Depends}
 Section: debug
 Description: Varnish VMOD for mapping IP networks to strings (debug symbols)
diff --git a/debian/libvmod-netmapper.install b/debian/libvmod-netmapper.install
index 8688f0a..0b1739f 100644
--- a/debian/libvmod-netmapper.install
+++ b/debian/libvmod-netmapper.install
@@ -1 +1,2 @@
 /usr/lib/*/varnish/vmods/libvmod_netmapper.so
+/usr/bin/vnm_validate

-- 
To view, visit https://gerrit.wikimedia.org/r/84021
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I75d2370295d88bbf7ff335493e1c0848d8facff1
Gerrit-PatchSet: 1
Gerrit-Project: operations/software/varnish/libvmod-netmapper
Gerrit-Branch: debian
Gerrit-Owner: BBlack bbl...@wikimedia.org

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] Fix message dependencies for jquery.wikibase.snaklistview - change (mediawiki...Wikibase)

2013-09-12 Thread Aude (Code Review)
Aude has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/84017


Change subject: Fix message dependencies for jquery.wikibase.snaklistview
..

Fix message dependencies for jquery.wikibase.snaklistview

Change-Id: I08f7f7a8ddfaaa46ee79f33bd830f9582a0b468f
---
M lib/resources/Resources.php
1 file changed, 1 insertion(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Wikibase 
refs/changes/17/84017/1

diff --git a/lib/resources/Resources.php b/lib/resources/Resources.php
index a2394ee..30755ec 100644
--- a/lib/resources/Resources.php
+++ b/lib/resources/Resources.php
@@ -510,6 +510,7 @@
),
'messages' = array(
'wikibase-claimview-snak-tooltip',
+   'wikibase-claimview-snak-new-tooltip',
)
),
 

-- 
To view, visit https://gerrit.wikimedia.org/r/84017
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I08f7f7a8ddfaaa46ee79f33bd830f9582a0b468f
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Wikibase
Gerrit-Branch: mw1.22-wmf16
Gerrit-Owner: Aude aude.w...@gmail.com
Gerrit-Reviewer: Hoo man h...@online.de

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] Update extension description to include recent email blackli... - change (mediawiki...SpamBlacklist)

2013-09-12 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Update extension description to include recent email 
blacklisting feature
..


Update extension description to include recent email blacklisting feature

The email blacklist has been kept undocumented since January 2012...
Also avoid linking the local pages: they are too many, they are
documented on the extension page and they are not the only source
lists even by default.

Bug: 43337
Change-Id: I5610dc92a7eb32fb57b5367997c21e6c3c311813
---
M SpamBlacklist.i18n.php
1 file changed, 1 insertion(+), 1 deletion(-)

Approvals:
  Bartosz Dziewoński: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/SpamBlacklist.i18n.php b/SpamBlacklist.i18n.php
index f7be385..d81a626 100644
--- a/SpamBlacklist.i18n.php
+++ b/SpamBlacklist.i18n.php
@@ -53,7 +53,7 @@
'spam-blacklisted-email-signup' = 'The given email address is 
currently blacklisted from use.',
 
'spam-invalid-lines' = The following spam blacklist {{PLURAL:$1|line 
is an|lines are}} invalid regular {{PLURAL:$1|expression|expressions}} and 
{{PLURAL:$1|needs|need}} to be corrected before saving the page:,
-   'spam-blacklist-desc' = 'Regex-based anti-spam tool: 
[[MediaWiki:Spam-blacklist]] and [[MediaWiki:Spam-whitelist]]',
+   'spam-blacklist-desc' = 'Regex-based anti-spam tool allowing to 
blacklist URLs in pages and email addresses for registered users',
'log-name-spamblacklist' = 'Spam blacklist log',
'log-description-spamblacklist' = 'These events track spam blacklist 
hits.',
'logentry-spamblacklist-hit' = '$1 caused a spam blacklist hit on $3 
by attempting to add $4.',

-- 
To view, visit https://gerrit.wikimedia.org/r/78642
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I5610dc92a7eb32fb57b5367997c21e6c3c311813
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/SpamBlacklist
Gerrit-Branch: master
Gerrit-Owner: Nemo bis federicol...@tiscali.it
Gerrit-Reviewer: Bartosz Dziewoński matma@gmail.com
Gerrit-Reviewer: Hoo man h...@online.de
Gerrit-Reviewer: jenkins-bot

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] adding ulsfo.wmnet to search domains on iron - change (operations/puppet)

2013-09-12 Thread RobH (Code Review)
RobH has submitted this change and it was merged.

Change subject: adding ulsfo.wmnet to search domains on iron
..


adding ulsfo.wmnet to search domains on iron

Change-Id: Ic7f2d4948c77a02c4b8a115c3b1603af3c88a3e1
---
M manifests/site.pp
1 file changed, 1 insertion(+), 1 deletion(-)

Approvals:
  RobH: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/manifests/site.pp b/manifests/site.pp
index 167d90b..1756cba 100644
--- a/manifests/site.pp
+++ b/manifests/site.pp
@@ -1180,7 +1180,7 @@
 node iron.wikimedia.org {
 system_role { misc: description = Operations Bastion }
 $cluster = misc
-$domain_search = wikimedia.org eqiad.wmnet pmtpa.wmnet 
esams.wikimedia.org
+$domain_search = wikimedia.org eqiad.wmnet pmtpa.wmnet ulsfo.wmnet 
esams.wikimedia.org
 
 include standard,
 admins::roots,

-- 
To view, visit https://gerrit.wikimedia.org/r/83950
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: Ic7f2d4948c77a02c4b8a115c3b1603af3c88a3e1
Gerrit-PatchSet: 3
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: RobH r...@wikimedia.org
Gerrit-Reviewer: RobH r...@wikimedia.org
Gerrit-Reviewer: jenkins-bot

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] loginwiki, mediawikiwiki, testwiki, test2wiki and testwikida... - change (operations/mediawiki-config)

2013-09-12 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: loginwiki, mediawikiwiki, testwiki, test2wiki and 
testwikidatawiki to 1.22wmf17
..


loginwiki, mediawikiwiki, testwiki, test2wiki and testwikidatawiki to 1.22wmf17

Change-Id: Iccf165bc88fd5120074c7a5ae7dc931e5615e257
---
M wikiversions.dat
1 file changed, 5 insertions(+), 5 deletions(-)

Approvals:
  Reedy: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/wikiversions.dat b/wikiversions.dat
index 2277a6c..ac7b43b 100644
--- a/wikiversions.dat
+++ b/wikiversions.dat
@@ -451,7 +451,7 @@
 lnwikibooks php-1.22wmf16 *
 lnwiki php-1.22wmf16 *
 lnwiktionary php-1.22wmf16 *
-loginwiki php-1.22wmf16 *
+loginwiki php-1.22wmf17 *
 lowiki php-1.22wmf16 *
 lowiktionary php-1.22wmf16 *
 ltgwiki php-1.22wmf16 *
@@ -465,7 +465,7 @@
 lvwiktionary php-1.22wmf16 *
 map_bmswiki php-1.22wmf16 *
 mdfwiki php-1.22wmf16 *
-mediawikiwiki php-1.22wmf16 *
+mediawikiwiki php-1.22wmf17 *
 metawiki php-1.22wmf16 *
 mgwikibooks php-1.22wmf16 *
 mgwiki php-1.22wmf16 *
@@ -731,9 +731,9 @@
 tawikisource php-1.22wmf16 *
 tawiktionary php-1.22wmf16 *
 tenwiki php-1.22wmf16 *
-test2wiki php-1.22wmf16 *
-testwiki php-1.22wmf16 *
-testwikidatawiki php-1.22wmf16 *
+test2wiki php-1.22wmf17 *
+testwiki php-1.22wmf17 *
+testwikidatawiki php-1.22wmf17 *
 tetwiki php-1.22wmf16 *
 tewikibooks php-1.22wmf16 *
 tewiki php-1.22wmf16 *

-- 
To view, visit https://gerrit.wikimedia.org/r/84023
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: Iccf165bc88fd5120074c7a5ae7dc931e5615e257
Gerrit-PatchSet: 1
Gerrit-Project: operations/mediawiki-config
Gerrit-Branch: master
Gerrit-Owner: Reedy re...@wikimedia.org
Gerrit-Reviewer: Reedy re...@wikimedia.org
Gerrit-Reviewer: jenkins-bot

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] Update VisualEditor to pick up c0650459dffda45e7c85cb9e4c57a... - change (mediawiki/core)

2013-09-12 Thread Catrope (Code Review)
Catrope has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/84094


Change subject: Update VisualEditor to pick up 
c0650459dffda45e7c85cb9e4c57a62adee557a8
..

Update VisualEditor to pick up c0650459dffda45e7c85cb9e4c57a62adee557a8

Change-Id: Ieb4230a176848e3a75be31821fe01f34032f3189
---
M extensions/VisualEditor
1 file changed, 0 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/94/84094/1

diff --git a/extensions/VisualEditor b/extensions/VisualEditor
index c65d01f..c065045 16
--- a/extensions/VisualEditor
+++ b/extensions/VisualEditor
-Subproject commit c65d01fbfedffe13fdaab747e5dbcf0c30eb8996
+Subproject commit c0650459dffda45e7c85cb9e4c57a62adee557a8

-- 
To view, visit https://gerrit.wikimedia.org/r/84094
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ieb4230a176848e3a75be31821fe01f34032f3189
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: wmf/1.22wmf17
Gerrit-Owner: Catrope roan.katt...@gmail.com

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] wmf17 symlinks - change (operations/mediawiki-config)

2013-09-12 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: wmf17 symlinks
..


wmf17 symlinks

Change-Id: If0afc27ba1338d7e94e5b4737b2614be1a46fe2e
---
A docroot/bits/static-1.22wmf17/extensions
A docroot/bits/static-1.22wmf17/resources
A docroot/bits/static-1.22wmf17/skins
A w/static-1.22wmf17/extensions
A w/static-1.22wmf17/resources
A w/static-1.22wmf17/skins
6 files changed, 6 insertions(+), 0 deletions(-)

Approvals:
  Reedy: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/docroot/bits/static-1.22wmf17/extensions 
b/docroot/bits/static-1.22wmf17/extensions
new file mode 12
index 000..3415830
--- /dev/null
+++ b/docroot/bits/static-1.22wmf17/extensions
@@ -0,0 +1 @@
+/usr/local/apache/common-local/php-1.22wmf17/extensions
\ No newline at end of file
diff --git a/docroot/bits/static-1.22wmf17/resources 
b/docroot/bits/static-1.22wmf17/resources
new file mode 12
index 000..57cd912
--- /dev/null
+++ b/docroot/bits/static-1.22wmf17/resources
@@ -0,0 +1 @@
+/usr/local/apache/common-local/php-1.22wmf17/resources
\ No newline at end of file
diff --git a/docroot/bits/static-1.22wmf17/skins 
b/docroot/bits/static-1.22wmf17/skins
new file mode 12
index 000..ca55992
--- /dev/null
+++ b/docroot/bits/static-1.22wmf17/skins
@@ -0,0 +1 @@
+/usr/local/apache/common-local/php-1.22wmf17/skins/
\ No newline at end of file
diff --git a/w/static-1.22wmf17/extensions b/w/static-1.22wmf17/extensions
new file mode 12
index 000..3415830
--- /dev/null
+++ b/w/static-1.22wmf17/extensions
@@ -0,0 +1 @@
+/usr/local/apache/common-local/php-1.22wmf17/extensions
\ No newline at end of file
diff --git a/w/static-1.22wmf17/resources b/w/static-1.22wmf17/resources
new file mode 12
index 000..57cd912
--- /dev/null
+++ b/w/static-1.22wmf17/resources
@@ -0,0 +1 @@
+/usr/local/apache/common-local/php-1.22wmf17/resources
\ No newline at end of file
diff --git a/w/static-1.22wmf17/skins b/w/static-1.22wmf17/skins
new file mode 12
index 000..5009a92
--- /dev/null
+++ b/w/static-1.22wmf17/skins
@@ -0,0 +1 @@
+/usr/local/apache/common-local/php-1.22wmf17/skins
\ No newline at end of file

-- 
To view, visit https://gerrit.wikimedia.org/r/84018
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: If0afc27ba1338d7e94e5b4737b2614be1a46fe2e
Gerrit-PatchSet: 1
Gerrit-Project: operations/mediawiki-config
Gerrit-Branch: master
Gerrit-Owner: Reedy re...@wikimedia.org
Gerrit-Reviewer: Reedy re...@wikimedia.org
Gerrit-Reviewer: jenkins-bot

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] Update Wikibase and DataValues - change (mediawiki/core)

2013-09-12 Thread Aude (Code Review)
Aude has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/84009


Change subject: Update Wikibase and DataValues
..

Update Wikibase and DataValues

- backport fix for null precision in coordinates
- fix for missing javascript tooltip message
- fix for autosummaries in wbcreateclaim and other api modules

Change-Id: If2997b6ac91b59d45848205662553e73e16ad194
---
M extensions/DataValues
M extensions/Wikibase
2 files changed, 0 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/09/84009/1

diff --git a/extensions/DataValues b/extensions/DataValues
index a0aceef..ac5b0c7 16
--- a/extensions/DataValues
+++ b/extensions/DataValues
-Subproject commit a0aceef71837a549787d59aa93e15de04598db13
+Subproject commit ac5b0c7ba416830d3bafa6d1c5d09b000b89ab1b
diff --git a/extensions/Wikibase b/extensions/Wikibase
index edc709a..cb1644d 16
--- a/extensions/Wikibase
+++ b/extensions/Wikibase
-Subproject commit edc709a3d65e573aa3aed0a8b604ebc3b19f295d
+Subproject commit cb1644d5e66586d3e9964de82abc370f50dd9b26

-- 
To view, visit https://gerrit.wikimedia.org/r/84009
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: If2997b6ac91b59d45848205662553e73e16ad194
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: wmf/1.22wmf16
Gerrit-Owner: Aude aude.w...@gmail.com

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] Increase depool threshold of apaches to .9 - change (operations/puppet)

2013-09-12 Thread Mark Bergsma (Code Review)
Mark Bergsma has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/84033


Change subject: Increase depool threshold of apaches to .9
..

Increase depool threshold of apaches to .9

No more than 10% of Apaches can be down

Change-Id: Ie9d7b5480779da49d12b9b15ec0f19dbed2969d4
---
M manifests/lvs.pp
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/33/84033/1

diff --git a/manifests/lvs.pp b/manifests/lvs.pp
index 9ba9b84..657ca2b 100644
--- a/manifests/lvs.pp
+++ b/manifests/lvs.pp
@@ -622,7 +622,7 @@
'sites' = [ pmtpa, eqiad ],
'ip' = $service_ips['apaches'][$::site],
'bgp' = yes,
-   'depool-threshold' = .6,
+   'depool-threshold' = .9,
'monitors' = {
'ProxyFetch' = {
'url' = [ 
'http://en.wikipedia.org/wiki/Main_Page' ],

-- 
To view, visit https://gerrit.wikimedia.org/r/84033
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ie9d7b5480779da49d12b9b15ec0f19dbed2969d4
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Mark Bergsma m...@wikimedia.org

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] Make QuantityValue use decimal notation. - change (mediawiki...DataValues)

2013-09-12 Thread Daniel Kinzler (Code Review)
Daniel Kinzler has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/84016


Change subject: Make QuantityValue use decimal notation.
..

Make QuantityValue use decimal notation.

This changes QuantityValue to use decimal notation and record the
significant number of sigits.

Change-Id: I6c774c6ed65f3d6e77663a5774256ccab2f7e606
---
M DataValuesCommon/src/DataValues/QuantityValue.php
M DataValuesCommon/tests/DataValues/QuantityValueTest.php
2 files changed, 312 insertions(+), 60 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/DataValues 
refs/changes/16/84016/1

diff --git a/DataValuesCommon/src/DataValues/QuantityValue.php 
b/DataValuesCommon/src/DataValues/QuantityValue.php
index 5661c43..890b7b7 100644
--- a/DataValuesCommon/src/DataValues/QuantityValue.php
+++ b/DataValuesCommon/src/DataValues/QuantityValue.php
@@ -3,9 +3,19 @@
 namespace DataValues;
 
 /**
- * Class representing a numeric value with associated unit and accuracy.
+ * Class representing a numeric amount with associated unit and number of 
significant digits.
+ * The amount is stored as a string in decimal notation to avoid loss of 
precision and allow
+ * very large and very precise numbers.
  *
- * For simple numeric values use @see NumberValue.
+ * For simple numeric amounts use @see NumberValue.
+ *
+ * The amount notation for the amount follows ISO 31, with some additional 
restrictions:
+ * - the decimal separator is '.' (period). Comma is not used anywhere.
+ * - no spacing or other separators are included for groups of digits.
+ * - the first character in the string always gives the sign, either plus (+) 
or minus (-).
+ * - scientific (exponential) notation is not used.
+ *
+ * These rules are enforced by @see QUANTITY_VALUE_PATTERN
  *
  * @since 0.1
  *
@@ -14,17 +24,29 @@
  *
  * @licence GNU GPL v2+
  * @author Jeroen De Dauw  jeroended...@gmail.com 
+ * @author Daniel Kinzler
  */
 class QuantityValue extends DataValueObject {
 
/**
+* The amount as a decimal string. Seee the class level documentation 
for details.
+*
+* @see QUANTITY_VALUE_PATTERN
+*
 * @since 0.1
 *
-* @var int|float
+* @var string
 */
-   protected $value;
+   protected $amount;
 
/**
+* Regular expression for matching valid numbers.
+*/
+   const QUANTITY_VALUE_PATTERN = '/^[-+]([1-9][0-9]*|[0-9])(\.[0-9]+)?$/';
+
+   /**
+* A unit identifier, or null for unitless numbers.
+*
 * @since 0.1
 *
 * @var string|null
@@ -32,37 +54,73 @@
protected $unit;
 
/**
+* The significant number of digits, counting from the most significant 
digit,
+* not counting the sign or the decimal separator.
+*
 * @since 0.1
 *
-* @var int|float|null
+* @var int
 */
-   protected $accuracy;
+   protected $significantDigits;
 
/**
 * @since 0.1
 *
-* @param int|float $amount
-* @param string|null $unit
-* @param int|float|null $accuracy
+* @param string|int|float $amount See QUANTITY_VALUE_PATTERN and the 
class level
+*documentation for the expected format.
+* @param string|null $unit A unit identifier, or null for unit-less 
quantities.
+* @param int $significantDigits The significant number of digits in 
the $amount string,
+*counting from the most significant digit, not counting the 
sign or decimal
+*separator.
 *
 * @throws IllegalValueException
 */
-   public function __construct( $amount, $unit = null, $accuracy = null ) {
-   if ( !is_int( $amount )  !is_float( $amount ) ) {
-   throw new IllegalValueException( 'Can only construct 
QuantityValue from floats or integers' );
+   public function __construct( $amount, $unit = null, $significantDigits 
= null ) {
+   if ( is_int( $amount ) || is_float( $amount ) ) {
+   $n = $amount;
+   $amount = strval( $amount );
+
+   if ( $n = 0 || $n == 0.0 ) {
+   $amount = '+' . $amount;
+   }
}
 
-   if ( $accuracy !== null  !is_int( $accuracy )  !is_float( 
$accuracy ) ) {
-   throw new IllegalValueException( 'The accuracy of a 
QuantityValue needs to be a float or integer' );
+   if ( !is_string( $amount ) ) {
+   throw new IllegalValueException( '$amount must be a 
numeric string' );
+   }
+
+   if ( !preg_match( self::QUANTITY_VALUE_PATTERN, $amount ) ) {
+   throw new IllegalValueException( '$amount must match 
the pattern for numeric amounts: bad 

[MediaWiki-commits] [Gerrit] Fix merge conflict breaking localised bold/italic icons - change (mediawiki...VisualEditor)

2013-09-12 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Fix merge conflict breaking localised bold/italic icons
..


Fix merge conflict breaking localised bold/italic icons

Bug introduced by change Ic97a636f9.

Bug: 53094
Change-Id: I4bf0bd4d340dfbad26a0d729de866985f81d14aa
---
M modules/ve/ui/tools/ve.ui.AnnotationTool.js
1 file changed, 2 insertions(+), 4 deletions(-)

Approvals:
  Jforrester: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/modules/ve/ui/tools/ve.ui.AnnotationTool.js 
b/modules/ve/ui/tools/ve.ui.AnnotationTool.js
index 82fe82c..5991375 100644
--- a/modules/ve/ui/tools/ve.ui.AnnotationTool.js
+++ b/modules/ve/ui/tools/ve.ui.AnnotationTool.js
@@ -79,7 +79,7 @@
 ve.ui.BoldAnnotationTool.static.group = 'textStyle';
 ve.ui.BoldAnnotationTool.static.icon = {
'default': 'bold-a',
-   'be-tarask': 'bold-cyrl-te-el',
+   'be': 'bold-cyrl-te',
'cs': 'bold-b',
'da': 'bold-f',
'de': 'bold-f',
@@ -100,7 +100,6 @@
'os': 'bold-cyrl-be',
'pl': 'bold-b',
'pt': 'bold-n',
-   'pt-br': 'bold-n',
'ru': 'bold-cyrl-zhe',
'sv': 'bold-f'
 };
@@ -125,7 +124,7 @@
 ve.ui.ItalicAnnotationTool.static.group = 'textStyle';
 ve.ui.ItalicAnnotationTool.static.icon = {
'default': 'italic-a',
-   'be-tarask': 'italic-cyrl-ka',
+   'be': 'italic-cyrl-ka',
'cs': 'italic-i',
'da': 'italic-k',
'de': 'italic-k',
@@ -146,7 +145,6 @@
'os': 'italic-cyrl-ka',
'pl': 'italic-i',
'pt': 'italic-i',
-   'pt-br': 'italic-i',
'ru': 'italic-cyrl-ka',
'sv': 'italic-k'
 };

-- 
To view, visit https://gerrit.wikimedia.org/r/84027
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I4bf0bd4d340dfbad26a0d729de866985f81d14aa
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/VisualEditor
Gerrit-Branch: master
Gerrit-Owner: Esanders esand...@wikimedia.org
Gerrit-Reviewer: Jforrester jforres...@wikimedia.org
Gerrit-Reviewer: jenkins-bot

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] role/analytics/kafka.pp - changing hostnames of labs kafka i... - change (operations/puppet)

2013-09-12 Thread Ottomata (Code Review)
Ottomata has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/84030


Change subject: role/analytics/kafka.pp - changing hostnames of labs kafka 
instances
..

role/analytics/kafka.pp - changing hostnames of labs kafka instances

Change-Id: Id18aedd53516f1b1eafbb3263db6f67e0007814d
---
M manifests/role/analytics/kafka.pp
1 file changed, 4 insertions(+), 4 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/30/84030/1

diff --git a/manifests/role/analytics/kafka.pp 
b/manifests/role/analytics/kafka.pp
index fc57295..7f422ea 100644
--- a/manifests/role/analytics/kafka.pp
+++ b/manifests/role/analytics/kafka.pp
@@ -28,11 +28,11 @@
 # TODO: Make hostnames configurable via labs global variables.
 $cluster = {
 'main' = {
-'kraken-kafka.pmtpa.wmflabs'  = { 'id' = 1 },
-'kraken-kafka1.pmtpa.wmflabs' = { 'id' = 2 },
+'kafka-main1.pmtpa.wmflabs' = { 'id' = 1 },
+'kafka-main2.pmtpa.wmflabs' = { 'id' = 2 },
 },
-'external' = {
-'kraken-kafka-external.pmtpa.wmflabs' = { 'id' = 10 },
+'external'  = {
+'kafka-external1.pmtpa.wmflabs' = { 'id' = 10 },
 },
 }
 # labs only uses a single log_dir

-- 
To view, visit https://gerrit.wikimedia.org/r/84030
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Id18aedd53516f1b1eafbb3263db6f67e0007814d
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Ottomata o...@wikimedia.org

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] fix distcheck - change (operations...libvmod-netmapper)

2013-09-12 Thread BBlack (Code Review)
BBlack has submitted this change and it was merged.

Change subject: fix distcheck
..


fix distcheck

Change-Id: I9eb45236f42518b798eaeb7a5577ca7f77fa477a
---
M src/Makefile.am
1 file changed, 3 insertions(+), 3 deletions(-)

Approvals:
  BBlack: Verified; Looks good to me, approved



diff --git a/src/Makefile.am b/src/Makefile.am
index 0668585..4c90bc5 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -25,11 +25,11 @@
 vnm_validate_LDADD = -ljansson
 vnm_validate_SOURCES = vnm_validate.c $(COMMON_SRC)
 
-VMOD_TDATA = tests/*.json
-VMOD_TESTS = tests/*.vtc
+VMOD_TDATA = tests/test01a.json tests/test01b.json tests/test01c.json
+VMOD_TESTS = tests/test01.vtc
 .PHONY: $(VMOD_TESTS) $(VMOD_TDATA)
 
-tests/*.vtc: libvmod_netmapper.la
+$(VMOD_TESTS): libvmod_netmapper.la
$(VARNISHTEST) -Dvarnishd=$(VARNISHD) 
-Dvmod_topbuild=$(abs_top_builddir) -Dvmod_topsrc=$(abs_top_srcdir) $(srcdir)/$@
 
 check: $(VMOD_TESTS)

-- 
To view, visit https://gerrit.wikimedia.org/r/84012
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I9eb45236f42518b798eaeb7a5577ca7f77fa477a
Gerrit-PatchSet: 1
Gerrit-Project: operations/software/varnish/libvmod-netmapper
Gerrit-Branch: master
Gerrit-Owner: BBlack bbl...@wikimedia.org
Gerrit-Reviewer: BBlack bbl...@wikimedia.org

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] adding cr2-ulsfo - change (operations/dns)

2013-09-12 Thread Lcarr (Code Review)
Lcarr has submitted this change and it was merged.

Change subject: adding cr2-ulsfo
..


adding cr2-ulsfo

Change-Id: Ia954c9d13f80406b969f6da438d4eea87ab0a19f
---
M templates/wikimedia.org
1 file changed, 3 insertions(+), 0 deletions(-)

Approvals:
  Lcarr: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/templates/wikimedia.org b/templates/wikimedia.org
index 59f0d20..b0c3828 100644
--- a/templates/wikimedia.org
+++ b/templates/wikimedia.org
@@ -441,6 +441,9 @@
 cr1-ulsfo  1H  IN A198.35.26.192
IN  2620:0:863:::1
 
+cr2-ulsfo  1H  IN A198.35.26.193
+   IN  2620:0:863:::2
+
 cr2-eqiad  1H  IN A208.80.154.197
IN  2620:0:861:::2
 

-- 
To view, visit https://gerrit.wikimedia.org/r/84029
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: Ia954c9d13f80406b969f6da438d4eea87ab0a19f
Gerrit-PatchSet: 1
Gerrit-Project: operations/dns
Gerrit-Branch: master
Gerrit-Owner: Lcarr lc...@wikimedia.org
Gerrit-Reviewer: Lcarr lc...@wikimedia.org
Gerrit-Reviewer: jenkins-bot

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] Use cucumber for aliases tests - change (mediawiki...Wikibase)

2013-09-12 Thread Tobias Gritschacher (Code Review)
Tobias Gritschacher has submitted this change and it was merged.

Change subject: Use cucumber for aliases tests
..


Use cucumber for aliases tests

Bug: 53848
Change-Id: Iaeb4acbe0e6e7575804a48d05999be4a89bbe091
---
A selenium_cuc/features/aliases.feature
A selenium_cuc/features/step_definitions/aliases_steps.rb
M selenium_cuc/features/support/modules/alias_module.rb
3 files changed, 402 insertions(+), 28 deletions(-)

Approvals:
  Tobias Gritschacher: Verified; Looks good to me, approved
  jenkins-bot: Verified



diff --git a/selenium_cuc/features/aliases.feature 
b/selenium_cuc/features/aliases.feature
new file mode 100644
index 000..67cf0e1
--- /dev/null
+++ b/selenium_cuc/features/aliases.feature
@@ -0,0 +1,223 @@
+# Wikidata UI tests
+#
+# Author:: Tobias Gritschacher (tobias.gritschac...@wikimedia.de)
+# License:: GNU GPL v2+
+#
+# feature definition for item aliases tests
+
+Feature: Edit aliases
+
+  Background:
+Given I am on an item page
+
+  @ui_only
+  Scenario: Aliases UI has all required elements
+Then Aliases UI should be there
+  And Aliases add button should be there
+  And Aliases edit button should not be there
+  And Aliases list should be empty
+
+  @ui_only
+  Scenario: Click add button
+When I click the aliases add button
+Then New alias input field should be there
+  And Aliases add button should not be there
+  And Aliases edit button should not be there
+  And Aliases cancel button should be there
+  And Aliases save button should be disabled
+  And Aliases help field should be there
+
+  @ui_only
+  Scenario: Type new alias
+When I click the aliases add button
+  And I enter 'alias123' as new aliases
+Then Aliases cancel button should be there
+  And Aliases save button should be there
+  And Modified alias input field should be there
+  And New alias input field should be there
+
+  @ui_only
+  Scenario Outline: Cancel aliases
+When I click the aliases add button
+  And I enter 'alias123' as new aliases
+  And I cancel
+Then Aliases add button should be there
+  And Aliases save button should not be there
+  And Aliases edit button should not be there
+  And Aliases cancel button should not be there
+  And New alias input field should not be there
+  And Aliases list should be empty
+
+Examples:
+  | cancel |
+  | click the aliases cancel button |
+  | press the ESC key in the new alias input field |
+
+  @save_aliases @modify_entity
+  Scenario Outline: Save alias
+When I click the aliases add button
+  And I enter 'alias123' as new aliases
+  And I save
+Then Aliases list should not be empty
+  And Aliases add button should not be there
+  And Aliases cancel button should not be there
+  And Aliases save button should not be there
+  And Aliases edit button should be there
+  And There should be 1 aliases in the list
+  And List of aliases should be 'alias123'
+
+Examples:
+  | save |
+  | click the aliases save button |
+  | press the RETURN key in the new alias input field |
+
+  @save_aliases @modify_entity
+  Scenario Outline: Save alias and reload
+When I click the aliases add button
+  And I enter 'alias123' as new aliases
+  And I save
+  And I reload the page
+Then Aliases edit button should be there
+  And There should be 1 aliases in the list
+  And List of aliases should be 'alias123'
+
+Examples:
+  | save |
+  | click the aliases save button |
+  | press the RETURN key in the new alias input field |
+
+  @save_aliases @modify_entity
+  Scenario: Save multiple aliases
+When I click the aliases add button
+  And I enter 'alias1', 'alias2', 'alias3' as new aliases
+  And I click the aliases save button
+Then Aliases list should not be empty
+  And There should be 3 aliases in the list
+  And List of aliases should be 'alias1', 'alias2', 'alias3'
+
+  @save_aliases @modify_entity
+  Scenario: Remove alias
+When I click the aliases add button
+  And I enter 'alias1', 'alias2' as new aliases
+  And I click the aliases save button
+  And I click the aliases edit button
+  And I click the remove first alias button
+  And I click the aliases save button
+Then List of aliases should be 'alias2'
+  And There should be 1 aliases in the list
+
+  @save_aliases @modify_entity
+  Scenario: Remove all aliases
+When I click the aliases add button
+  And I enter 'alias1', 'alias2' as new aliases
+  And I click the aliases save button
+  And I click the aliases edit button
+  And I click the remove first alias button
+  And I click the remove first alias button
+  And I click the aliases save button
+Then Aliases list should be empty
+  And Aliases add button should be there
+
+  @save_aliases 

[MediaWiki-commits] [Gerrit] Fix some bugs with the indentation patch. - change (mediawiki...BookManagerv2)

2013-09-12 Thread Mollywhite (Code Review)
Mollywhite has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/84093


Change subject: Fix some bugs with the indentation patch.
..

Fix some bugs with the indentation patch.

i18n fields were having 'field' appended to them still (probably
a rebase issue). Also check for indentation property in the
JSON block instead of assuming it exists.

Change-Id: I4b250ac4d6e419b0c7e274536ddc704817900f86
---
M BookManagerv2.hooks.php
M JsonEditor.php
2 files changed, 9 insertions(+), 5 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/BookManagerv2 
refs/changes/93/84093/1

diff --git a/BookManagerv2.hooks.php b/BookManagerv2.hooks.php
index 3fbbdf8..c4fcc00 100644
--- a/BookManagerv2.hooks.php
+++ b/BookManagerv2.hooks.php
@@ -345,10 +345,14 @@
$html .= Html::openElement( 'ol', array() );
foreach ( $sections as $key = $val ) {
if ( $val-link !== $currentPageTitle ) {
-   $html .= Html::openElement( 'li', array(
-   'class' = 'indent-' . 
(string)$val-indentation
-   ) )
-   . Linker::link(
+   if ( isset( $val-indentation ) ) {
+   $html .= Html::openElement( 'li', array(
+   'class' = 'indent-' . 
(string)$val-indentation
+   ) );
+   } else {
+   $html .= Html::openElement( 'li', 
array() );
+   }
+   $html .= Linker::link(
Title::newFromText( $val-link 
),
$val-name
)
diff --git a/JsonEditor.php b/JsonEditor.php
index b824acd..57b18a1 100644
--- a/JsonEditor.php
+++ b/JsonEditor.php
@@ -68,7 +68,7 @@
) {
$key = htmlentities( $key );
$type = $val-type;
-   $i18n = $val-additionalProperties-i18n . '-field';
+   $i18n = $val-additionalProperties-i18n;
if ( $type === 'array' ) {
// TODO: Array handling
$inputType = 'text';

-- 
To view, visit https://gerrit.wikimedia.org/r/84093
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I4b250ac4d6e419b0c7e274536ddc704817900f86
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/BookManagerv2
Gerrit-Branch: master
Gerrit-Owner: Mollywhite molly.whi...@gmail.com

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] added all the new network subnets - change (operations/puppet)

2013-09-12 Thread Lcarr (Code Review)
Lcarr has submitted this change and it was merged.

Change subject: added all the new network subnets
..


added all the new network subnets

Change-Id: Ia6156dc7e99fb93bb0f0ecaab2400f5d6a4e973e
---
M manifests/network.pp
1 file changed, 16 insertions(+), 2 deletions(-)

Approvals:
  Lcarr: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/manifests/network.pp b/manifests/network.pp
index eb0ad59..e3e421c 100644
--- a/manifests/network.pp
+++ b/manifests/network.pp
@@ -1,8 +1,8 @@
 # network.pp
 
 class network::constants {
-   $external_networks = [ 91.198.174.0/24, 208.80.152.0/22, 
2620:0:860::/46 ]
-   $all_networks = [ 91.198.174.0/24, 208.80.152.0/22, 
2620:0:860::/46, 10.0.0.0/8 ]
+   $external_networks = [ 91.198.174.0/24, 208.80.152.0/22, 
2620:0:860::/46, 185.15.56.0/22, 198.35.26.0/23, 2a02:ec80::/32 ]
+   $all_networks = [ 91.198.174.0/24, 208.80.152.0/22, 
2620:0:860::/46, 10.0.0.0/8, 185.15.56.0/22, 198.35.26.0/23, 
2a02:ec80::/32  ]
$all_network_subnets = {
'production' = {
'eqiad' = {
@@ -110,6 +110,20 @@
},
},
},
+   'ulsfo' = {
+   'public' = {
+   'public1-ulsfo' = {
+   'ipv4' = 198.35.26.0/27,
+   'ipv6' = 2620:0:863:1::/64
+   },
+   },
+   'private' = {
+   'private1-ulsfo' = {
+   'ipv4' = 10.128.0.0/24,
+   'ipv6' = 2620:0:863:101::/64
+   },
+   },
+   },
},
}
 }

-- 
To view, visit https://gerrit.wikimedia.org/r/84096
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: Ia6156dc7e99fb93bb0f0ecaab2400f5d6a4e973e
Gerrit-PatchSet: 5
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Lcarr lc...@wikimedia.org
Gerrit-Reviewer: Lcarr lc...@wikimedia.org
Gerrit-Reviewer: jenkins-bot

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] Implement additionalProperties = true according to - change (mediawiki...EventLogging)

2013-09-12 Thread DMaggot (Code Review)
DMaggot has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/84011


Change subject: Implement additionalProperties = true according to
..

Implement additionalProperties = true according to

http://json-schema.org/latest/json-schema-validation.html#anchor64

Change-Id: I68c9de57e98c013f586591a766560f403209f637
---
M includes/JsonSchema.php
1 file changed, 9 insertions(+), 11 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/EventLogging 
refs/changes/11/84011/1

diff --git a/includes/JsonSchema.php b/includes/JsonSchema.php
index 1b2a1f3..2fe6430 100644
--- a/includes/JsonSchema.php
+++ b/includes/JsonSchema.php
@@ -344,29 +344,27 @@
 */
public function getMappingChildRef( $key ) {
$snode = $this-schemaref-node;
-   $nodename = null;
+   $schemadata = array();
+   $nodename = $key;
if( array_key_exists( 'properties', $snode ) 
array_key_exists( $key, $snode['properties'] ) ) {
$schemadata = $snode['properties'][$key];
$nodename = isset( $schemadata['title'] ) ? 
$schemadata['title'] : $key;
}
elseif ( array_key_exists( 'additionalProperties', $snode ) ) {
-   // additionalProperties can *either* be false (a 
boolean) or can be
+   // additionalProperties can *either* be a boolean or 
can be
// defined as a schema (an object)
-   if ( $snode['additionalProperties'] == false ) {
-   $msg = JsonUtil::uiMessage( 
'jsonschema-invalidkey',
-   
$key, $this-getDataPathTitles() );
-   throw new JsonSchemaException( $msg );
+   if ( gettype( $snode['additionalProperties'] ) == 
boolean ) {
+   if ( !$snode['additionalProperties'] ) {
+   $msg = JsonUtil::uiMessage( 
'jsonschema-invalidkey',
+   $key, 
$this-getDataPathTitles() );
+   throw new JsonSchemaException( $msg );
+   }
}
else {
$schemadata = $snode['additionalProperties'];
$nodename = $key;
}
-   }
-   else {
-   // return the default schema
-   $schemadata = array();
-   $nodename = $key;
}
$value = $this-node[$key];
$schemai = $this-schemaindex-newRef( $schemadata, 
$this-schemaref, $key, $key );

-- 
To view, visit https://gerrit.wikimedia.org/r/84011
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I68c9de57e98c013f586591a766560f403209f637
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/EventLogging
Gerrit-Branch: master
Gerrit-Owner: DMaggot david.narv...@computer.org

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] Installing tools-log4j.properties in Makefile. - change (operations...kafka)

2013-09-12 Thread Ottomata (Code Review)
Ottomata has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/84099


Change subject: Installing tools-log4j.properties in Makefile.
..

Installing tools-log4j.properties in Makefile.

Change-Id: Ia0f793b8da6507c67d54e90b088d15175135577d
---
M debian/patches/our-own-build-system.patch
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/debs/kafka 
refs/changes/99/84099/1

diff --git a/debian/patches/our-own-build-system.patch 
b/debian/patches/our-own-build-system.patch
index 9ee3297..7a459fd 100644
--- a/debian/patches/our-own-build-system.patch
+++ b/debian/patches/our-own-build-system.patch
@@ -111,7 +111,7 @@
 --- /dev/null
 +++ b/config/Makefile
 @@ -0,0 +1,9 @@
-+CONFFILES=consumer.properties log4j.properties producer.properties 
server.properties zookeeper.properties
++CONFFILES=consumer.properties log4j.properties tools-log4j.properties 
producer.properties server.properties zookeeper.properties
 +
 +all:  
 +

-- 
To view, visit https://gerrit.wikimedia.org/r/84099
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ia0f793b8da6507c67d54e90b088d15175135577d
Gerrit-PatchSet: 1
Gerrit-Project: operations/debs/kafka
Gerrit-Branch: debian
Gerrit-Owner: Ottomata o...@wikimedia.org

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] Increase depool threshold of apaches to .9 - change (operations/puppet)

2013-09-12 Thread Mark Bergsma (Code Review)
Mark Bergsma has submitted this change and it was merged.

Change subject: Increase depool threshold of apaches to .9
..


Increase depool threshold of apaches to .9

No more than 10% of Apaches can be down

Change-Id: Ie9d7b5480779da49d12b9b15ec0f19dbed2969d4
---
M manifests/lvs.pp
1 file changed, 1 insertion(+), 1 deletion(-)

Approvals:
  Mark Bergsma: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/manifests/lvs.pp b/manifests/lvs.pp
index 9ba9b84..657ca2b 100644
--- a/manifests/lvs.pp
+++ b/manifests/lvs.pp
@@ -622,7 +622,7 @@
'sites' = [ pmtpa, eqiad ],
'ip' = $service_ips['apaches'][$::site],
'bgp' = yes,
-   'depool-threshold' = .6,
+   'depool-threshold' = .9,
'monitors' = {
'ProxyFetch' = {
'url' = [ 
'http://en.wikipedia.org/wiki/Main_Page' ],

-- 
To view, visit https://gerrit.wikimedia.org/r/84033
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: Ie9d7b5480779da49d12b9b15ec0f19dbed2969d4
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Mark Bergsma m...@wikimedia.org
Gerrit-Reviewer: Mark Bergsma m...@wikimedia.org
Gerrit-Reviewer: jenkins-bot

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] missing A entries for LVS ethifaces 10.64.17.1-6 - change (operations/dns)

2013-09-12 Thread Hashar (Code Review)
Hashar has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/84098


Change subject: missing A entries for LVS ethifaces 10.64.17.1-6
..

missing A entries for LVS ethifaces 10.64.17.1-6

syslog get some more BREAK-IN ATTEMPT because we are missing A entries
for the address range 10.64.17.[1-6].

Similar to cc5ac62c / RT #4811

Change-Id: If8f524c5a2aa639a11bf8281cb21b04a747f3490
---
M templates/wikimedia.org
1 file changed, 6 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/dns 
refs/changes/98/84098/1

diff --git a/templates/wikimedia.org b/templates/wikimedia.org
index b0c3828..41ec8bb 100644
--- a/templates/wikimedia.org
+++ b/templates/wikimedia.org
@@ -476,6 +476,12 @@
 vl1017-eth1.lvs10041H  IN A10.64.1.4
 vl1017-eth1.lvs10051H  IN A10.64.1.5
 vl1017-eth1.lvs10061H  IN A10.64.1.6
+vl1018-eth1.lvs10011H  IN A10.64.17.1
+vl1018-eth1.lvs10021H  IN A10.64.17.2
+vl1018-eth1.lvs10031H  IN A10.64.17.3
+vl1018-eth1.lvs10041H  IN A10.64.17.4
+vl1018-eth1.lvs10051H  IN A10.64.17.5
+vl1018-eth0.lvs10061H  IN A10.64.17.6
 vl1019-eth2.lvs10011H  IN A10.64.33.1
 vl1019-eth2.lvs10021H  IN A10.64.33.2
 vl1019-eth2.lvs10031H  IN A10.64.33.3

-- 
To view, visit https://gerrit.wikimedia.org/r/84098
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: If8f524c5a2aa639a11bf8281cb21b04a747f3490
Gerrit-PatchSet: 1
Gerrit-Project: operations/dns
Gerrit-Branch: master
Gerrit-Owner: Hashar has...@free.fr

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] Update VisualEditor to pick up 8bb72b2b91811dd53fe1cbe807d96... - change (mediawiki/core)

2013-09-12 Thread Catrope (Code Review)
Catrope has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/84097


Change subject: Update VisualEditor to pick up 
8bb72b2b91811dd53fe1cbe807d96f628a2824c6
..

Update VisualEditor to pick up 8bb72b2b91811dd53fe1cbe807d96f628a2824c6

Change-Id: Ia2e15ff2cac3c940b59a0af794405d166a691341
---
M extensions/VisualEditor
1 file changed, 0 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/97/84097/1

diff --git a/extensions/VisualEditor b/extensions/VisualEditor
index 27dfe83..8bb72b2 16
--- a/extensions/VisualEditor
+++ b/extensions/VisualEditor
-Subproject commit 27dfe83e6f273f7313c10bba3bde5036814f3763
+Subproject commit 8bb72b2b91811dd53fe1cbe807d96f628a2824c6

-- 
To view, visit https://gerrit.wikimedia.org/r/84097
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ia2e15ff2cac3c940b59a0af794405d166a691341
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: wmf/1.22wmf16
Gerrit-Owner: Catrope roan.katt...@gmail.com

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] wfMkdirParents: recover from mkdir race condition - change (mediawiki/core)

2013-09-12 Thread Ejegg (Code Review)
Ejegg has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/84100


Change subject: wfMkdirParents: recover from mkdir race condition
..

wfMkdirParents: recover from mkdir race condition

If mkdir fails, check again to see if dir has been created
since our initial check, and return true if so.

Also, in initial check, only return true if $dir is really
a directory, not a file.

Bug:49391
Change-Id: I2b331669fae70948ce79ba1477c05968a3095c3d
---
M includes/GlobalFunctions.php
M tests/phpunit/includes/GlobalFunctions/GlobalTest.php
2 files changed, 15 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/00/84100/1

diff --git a/includes/GlobalFunctions.php b/includes/GlobalFunctions.php
index bed2c44..f43393a 100644
--- a/includes/GlobalFunctions.php
+++ b/includes/GlobalFunctions.php
@@ -2521,7 +2521,7 @@
wfDebug( $caller: called wfMkdirParents($dir)\n );
}
 
-   if ( strval( $dir ) === '' || file_exists( $dir ) ) {
+   if ( strval( $dir ) === '' || ( file_exists( $dir )  is_dir( $dir ) ) 
) {
return true;
}
 
@@ -2537,6 +2537,11 @@
wfRestoreWarnings();
 
if ( !$ok ) {
+   //directory may have been created on another request since we 
last checked
+   if ( is_dir( $dir ) ) {
+   return true;
+   }
+
// PHP doesn't report the path in its warning message, so add 
our own to aid in diagnosis.
wfLogWarning( sprintf( failed to mkdir \%s\ mode 0%o, $dir, 
$mode ) );
}
diff --git a/tests/phpunit/includes/GlobalFunctions/GlobalTest.php 
b/tests/phpunit/includes/GlobalFunctions/GlobalTest.php
index 6a2a0df..244b100 100644
--- a/tests/phpunit/includes/GlobalFunctions/GlobalTest.php
+++ b/tests/phpunit/includes/GlobalFunctions/GlobalTest.php
@@ -630,6 +630,15 @@
return $a;
}
 
+   function testWfMkdirParents() {
+   // Should not return true if file exists instead of directory
+   $fname = $this-getNewTempFile();
+   wfSuppressWarnings();
+   $ok = wfMkdirParents( $fname );
+   wfRestoreWarnings();
+   $this-assertFalse( $ok );
+   }
+
/**
 * @dataProvider provideWfShellMaintenanceCmdList
 */

-- 
To view, visit https://gerrit.wikimedia.org/r/84100
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I2b331669fae70948ce79ba1477c05968a3095c3d
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Ejegg ej...@ejegg.com

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] Installing tools-log4j.properties in Makefile. - change (operations...kafka)

2013-09-12 Thread Ottomata (Code Review)
Ottomata has submitted this change and it was merged.

Change subject: Installing tools-log4j.properties in Makefile.
..


Installing tools-log4j.properties in Makefile.

Change-Id: Ia0f793b8da6507c67d54e90b088d15175135577d
---
M debian/patches/our-own-build-system.patch
1 file changed, 1 insertion(+), 1 deletion(-)

Approvals:
  Ottomata: Verified; Looks good to me, approved



diff --git a/debian/patches/our-own-build-system.patch 
b/debian/patches/our-own-build-system.patch
index 9ee3297..7a459fd 100644
--- a/debian/patches/our-own-build-system.patch
+++ b/debian/patches/our-own-build-system.patch
@@ -111,7 +111,7 @@
 --- /dev/null
 +++ b/config/Makefile
 @@ -0,0 +1,9 @@
-+CONFFILES=consumer.properties log4j.properties producer.properties 
server.properties zookeeper.properties
++CONFFILES=consumer.properties log4j.properties tools-log4j.properties 
producer.properties server.properties zookeeper.properties
 +
 +all:  
 +

-- 
To view, visit https://gerrit.wikimedia.org/r/84099
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: Ia0f793b8da6507c67d54e90b088d15175135577d
Gerrit-PatchSet: 1
Gerrit-Project: operations/debs/kafka
Gerrit-Branch: debian
Gerrit-Owner: Ottomata o...@wikimedia.org
Gerrit-Reviewer: Ottomata o...@wikimedia.org

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] Installing java openjdk 7 on analytics nodes. - change (operations/puppet)

2013-09-12 Thread Ottomata (Code Review)
Ottomata has submitted this change and it was merged.

Change subject: Installing java openjdk 7 on analytics nodes.
..


Installing java openjdk 7 on analytics nodes.

Will test this in labs first.

Change-Id: I0fc58e79a9668e3117d29248734d2dfeca7bc1fa
---
M manifests/role/analytics.pp
1 file changed, 4 insertions(+), 5 deletions(-)

Approvals:
  Ottomata: Verified; Looks good to me, approved



diff --git a/manifests/role/analytics.pp b/manifests/role/analytics.pp
index 77520e6..bb9ea35 100644
--- a/manifests/role/analytics.pp
+++ b/manifests/role/analytics.pp
@@ -44,11 +44,10 @@
 
 
 class role::analytics::java {
-# all analytics nodes need java installed
-# Install Sun/Oracle Java JDK on analytics cluster
-java { 'java-6-oracle':
-distribution = 'oracle',
-version  = 6,
+# All analytics nodes need java installed.
+java { 'java-7-openjdk':
+distribution = 'openjdk',
+version  = 7,
 }
 }
 

-- 
To view, visit https://gerrit.wikimedia.org/r/82430
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I0fc58e79a9668e3117d29248734d2dfeca7bc1fa
Gerrit-PatchSet: 3
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Ottomata o...@wikimedia.org
Gerrit-Reviewer: Ottomata o...@wikimedia.org
Gerrit-Reviewer: jenkins-bot

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] Add mosh to bastion hosts - change (operations/puppet)

2013-09-12 Thread coren (Code Review)
coren has submitted this change and it was merged.

Change subject: Add mosh to bastion hosts
..


Add mosh to bastion hosts

Bug: 52693
Change-Id: Ida9667a4db1da4339c77eff2f887d1071dbe7d6e
---
M manifests/misc/bastion.pp
1 file changed, 2 insertions(+), 0 deletions(-)

Approvals:
  coren: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/manifests/misc/bastion.pp b/manifests/misc/bastion.pp
index 04a11bb..e58faa6 100644
--- a/manifests/misc/bastion.pp
+++ b/manifests/misc/bastion.pp
@@ -15,6 +15,8 @@
ensure = absent;
traceroute:
ensure =latest;
+   mosh:
+   ensure = present;
}
 
 }

-- 
To view, visit https://gerrit.wikimedia.org/r/84024
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: Ida9667a4db1da4339c77eff2f887d1071dbe7d6e
Gerrit-PatchSet: 3
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Yuvipanda yuvipa...@gmail.com
Gerrit-Reviewer: coren mpellet...@wikimedia.org
Gerrit-Reviewer: jenkins-bot

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] Provide a dynamic global scope of LESS variables - change (mediawiki/core)

2013-09-12 Thread Ori.livneh (Code Review)
Ori.livneh has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/84101


Change subject: Provide a dynamic global scope of LESS variables
..

Provide a dynamic global scope of LESS variables

This patch follows up change Id052a04dd to add a dynamic global scope of LESS
variables to core. Dynamic global scope means there's a set of variables that
are considered declared for all LESS modules and whose values may be specified
or overridden at runtime via $wgLESSVars or a ResourceLoaderGetLESSVars hook
handler. The reasons for having such a thing are:

a)  This makes MediaWiki actually themeable à la Wikia's theme designer.
b)  It facilitates centralization of core UI definitions.
c)  It makes it possible for extensions to style interfaces in a matter that is
consistent with core, either by directly referencing core's values, or 
by
generating new values via LESS function application.

Change-Id: I037f410f202701ca9ddecc7e01bf8b5da446ebe9
---
M RELEASE-NOTES-1.22
M docs/hooks.txt
M includes/DefaultSettings.php
M includes/resourceloader/ResourceLoaderFileModule.php
M includes/resourceloader/ResourceLoaderModule.php
5 files changed, 37 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/01/84101/1

diff --git a/RELEASE-NOTES-1.22 b/RELEASE-NOTES-1.22
index e503e30..c1755f8 100644
--- a/RELEASE-NOTES-1.22
+++ b/RELEASE-NOTES-1.22
@@ -212,6 +212,8 @@
 * IPv6 addresses in X-Forwarded-For headers are now normalised before checking
   against allowed proxy lists.
 * Add deferrable update support for callback/closure
+* Added a dynamic global scope of LESS variables, encoded as a PHP associative
+  array ($wgLESSVars) and manipulable via the ResourceLoaderGetLESSVars hook.
 
 === Bug fixes in 1.22 ===
 * Disable Special:PasswordReset when $wgEnableEmail is false. Previously one
diff --git a/docs/hooks.txt b/docs/hooks.txt
index 02413b3..5ee2d82 100644
--- a/docs/hooks.txt
+++ b/docs/hooks.txt
@@ -2803,5 +2803,9 @@
   is an array of metadata tags returned (each tag is either a value, or an 
array
   of values).
 
+'ResourceLoaderGetLESSVars': Called when obtaining the map of globally
+available LESS variable declarations.
+$vars: An associative array binding variable names to CSS string values.
+
 More hooks might be available but undocumented, you can execute
 'php maintenance/findHooks.php' to find hidden ones.
diff --git a/includes/DefaultSettings.php b/includes/DefaultSettings.php
index 22b7f1e..6bdb6ae 100644
--- a/includes/DefaultSettings.php
+++ b/includes/DefaultSettings.php
@@ -6790,6 +6790,22 @@
 $wgCompiledFiles = array();
 
 /**
+ * Global LESS variables. An associative array binding variable names
+ * to CSS string values.
+ *
+ * @par Example:
+ * @code
+ *   $wgLESSVars = array(
+ * 'baseFontSize'  = '1em',
+ * 'smallFontSize' = '0.75em',
+ * 'WikimediaBlue' = '#006699',
+ *   );
+ * @endcode
+ * @since 1.22
+ */
+$wgLESSVars = array();
+
+/**
  * For really cool vim folding this needs to be at the end:
  * vim: foldmarker=@{,@} foldmethod=marker
  * @}
diff --git a/includes/resourceloader/ResourceLoaderFileModule.php 
b/includes/resourceloader/ResourceLoaderFileModule.php
index aa8af90..aec42fd 100644
--- a/includes/resourceloader/ResourceLoaderFileModule.php
+++ b/includes/resourceloader/ResourceLoaderFileModule.php
@@ -700,7 +700,7 @@
 * @return string CSS source
 */
protected function compileLessFile( $fileName ) {
-   $key = wfMemcKey( 'resourceloader', 'less', md5( $fileName ) );
+   $key = wfMemcKey( 'resourceloader', 'less', md5( $fileName . 
json_encode( self::getLESSVars() ) ) );
$cache = wfGetCache( CACHE_ANYTHING );
 
// The input to lessc. Either an associative array representing 
the
diff --git a/includes/resourceloader/ResourceLoaderModule.php 
b/includes/resourceloader/ResourceLoaderModule.php
index ec5de37..b3f736d 100644
--- a/includes/resourceloader/ResourceLoaderModule.php
+++ b/includes/resourceloader/ResourceLoaderModule.php
@@ -409,6 +409,7 @@
 
/** @var lessc lazy-initialized; use self::lessCompiler() */
private static $lessc;
+   private static $lessVars;
 
/**
 * Validate a given script file; if valid returns the original source.
@@ -467,9 +468,22 @@
self::$lessc = new lessc();
self::$lessc-setPreserveComments( true );
}
+   self::$lessc-setVariables( self::getLESSVars() );
return self::$lessc;
}
 
+   protected static function getLESSVars() {
+   global $wgLESSVars;
+
+   if ( !self::$lessVars ) {
+   self::$lessVars = $wgLESSVars;
+   wfRunHooks( 'ResourceLoaderGetLESSVars', array( 
self::$lessVars ) );
+   // Sort 

[MediaWiki-commits] [Gerrit] Remove redundant operatingsystem check for Ubuntu - change (operations/puppet)

2013-09-12 Thread Yuvipanda (Code Review)
Yuvipanda has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/84104


Change subject: Remove redundant operatingsystem check for Ubuntu
..

Remove redundant operatingsystem check for Ubuntu

Since we just decomissioned our Windows  CentOS servers...

Change-Id: If3731d09f0b28a34fd74bfb79f4b6b397f80699b
---
M manifests/ssh.pp
1 file changed, 32 insertions(+), 43 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/04/84104/1

diff --git a/manifests/ssh.pp b/manifests/ssh.pp
index 642f546..2548bb0 100644
--- a/manifests/ssh.pp
+++ b/manifests/ssh.pp
@@ -10,10 +10,8 @@
 }
 
 class ssh::client {
-   if $operatingsystem == Ubuntu {
-   package { openssh-client:
-   ensure = latest
-   }
+   package { openssh-client:
+   ensure = latest
}
 }
 
@@ -38,13 +36,11 @@
 
 
 class ssh::hostkeys::publish {
-   if $operatingsystem == Ubuntu {
-   include ssh::client
-   }
+   include ssh::client
 
# Store this hosts's host key
case $sshrsakey {
-   : { 
+   : {
err(No sshrsakey on $fqdn)
}
default: {
@@ -75,56 +71,49 @@
 
 class ssh::bastion {
$ssh_banner = '/etc/ssh/sshd_banner'
-   if $operatingsystem == Ubuntu {
-   if ( $realm == labs ) {
-   @file { $ssh_banner:
-   owner = root,
-   group = root,
-   mode  = 0444,
-   tag = 'ssh_banner',
-   content = 
+   if ( $realm == labs ) {
+   @file { $ssh_banner:
+   owner = root,
+   group = root,
+   mode  = 0444,
+   tag = 'ssh_banner',
+   content = 
 If you are having access problems, please see: 
https://wikitech.wikimedia.org/wiki/Access#Accessing_public_and_private_instances
 
-   }
}
}
 }
 
 class ssh::config {
-   if $operatingsystem == Ubuntu {
-   if ( $realm == labs ) {
-   if versioncmp($::lsbdistrelease, 12.04) = 0 {
-   $ssh_authorized_keys_file = 
/etc/ssh/userkeys/%u/.ssh/authorized_keys /public/keys/%u/.ssh/authorized_keys
-   } else {
-   $ssh_authorized_keys_file = 
/etc/ssh/userkeys/%u/.ssh/authorized_keys
-   $ssh_authorized_keys_file2 = 
/public/keys/%u/.ssh/authorized_keys
-   }
+   if ( $realm == labs ) {
+   if versioncmp($::lsbdistrelease, 12.04) = 0 {
+   $ssh_authorized_keys_file = 
/etc/ssh/userkeys/%u/.ssh/authorized_keys /public/keys/%u/.ssh/authorized_keys
+   } else {
+   $ssh_authorized_keys_file = 
/etc/ssh/userkeys/%u/.ssh/authorized_keys
+   $ssh_authorized_keys_file2 = 
/public/keys/%u/.ssh/authorized_keys
}
 
 
-   $ssh_banner = $ssh::bastion::ssh_banner
+   $ssh_banner = $ssh::bastion::ssh_banner
 
-   File | tag == 'ssh_banner' |
+   File | tag == 'ssh_banner' |
 
-   file { /etc/ssh/sshd_config:
-   owner = root,
-   group = root,
-   mode  = 0444,
-   content = template(ssh/sshd_config.erb);
-   }
+   file { /etc/ssh/sshd_config:
+   owner = root,
+   group = root,
+   mode  = 0444,
+   content = template(ssh/sshd_config.erb);
}
 }
 
 class ssh::daemon {
-   if $operatingsystem == Ubuntu {
-   package { openssh-server:
-   ensure = latest;
-   }
-   
-   service {
-   ssh:
-   ensure = running,
-   subscribe = File[/etc/ssh/sshd_config];
-   }
+   package { openssh-server:
+   ensure = latest;
+   }
+
+   service {
+   ssh:
+   ensure = running,
+   subscribe = File[/etc/ssh/sshd_config];
}
 }

-- 
To view, visit https://gerrit.wikimedia.org/r/84104
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: If3731d09f0b28a34fd74bfb79f4b6b397f80699b
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Yuvipanda yuvipa...@gmail.com

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org

[MediaWiki-commits] [Gerrit] Add *.wikisource.org to the default prefix list - change (mediawiki...Parsoid)

2013-09-12 Thread GWicke (Code Review)
GWicke has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/84103


Change subject: Add *.wikisource.org to the default prefix list
..

Add *.wikisource.org to the default prefix list

Change-Id: I6d19dc1c0a3618509915311c0c62183805611d57
---
M js/lib/mediawiki.ParsoidConfig.js
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Parsoid 
refs/changes/03/84103/1

diff --git a/js/lib/mediawiki.ParsoidConfig.js 
b/js/lib/mediawiki.ParsoidConfig.js
index f401902..8606f01 100644
--- a/js/lib/mediawiki.ParsoidConfig.js
+++ b/js/lib/mediawiki.ParsoidConfig.js
@@ -30,7 +30,7 @@
this.interwikiMap[wplist[ix]] = 'http://' + wplist[ix] + 
'.wikipedia.org/w/api.php';
// Also add an alias that follows the Wikimedia db name 
convention
// (enwiki, dewiki etc).
-   ['pedia', 'voyage', 'books', 'quote'].forEach(function(suffix) {
+   ['pedia', 'voyage', 'books', 'source', 
'quote'].forEach(function(suffix) {
var dbName = wplist[ix] + 'wiki' + (suffix === 'pedia' 
? '' : suffix);
self.interwikiMap[dbName] = 'http://' + wplist[ix] + 
'.wiki' +
suffix + '.org/w/api.php';

-- 
To view, visit https://gerrit.wikimedia.org/r/84103
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I6d19dc1c0a3618509915311c0c62183805611d57
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Parsoid
Gerrit-Branch: master
Gerrit-Owner: GWicke gwi...@wikimedia.org

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] Make line breaks in blockquote behave like div (bug 6200). - change (mediawiki/core)

2013-09-12 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Make line breaks in blockquote behave like div (bug 6200).
..


Make line breaks in blockquote behave like div (bug 6200).

This is an old, old bug: the earliest filed dup is bug 1857, on 2005-04-10.
See bug 51086 for a modern discussion, and bug 52763 for some non-obvious
consequences: indented text inside a blockquote must not trigger
creation of a pre block (unlike div).

This patch should bring the PHP parser and Parsoid closer together.

This also fixes (or works around) bug 15491, which is really a bug in tidy.
But because blockquote content is typically wrapped with p tags now,
we don't trigger the tidy bug (see
https://bugzilla.wikimedia.org/show_bug.cgi?id=15491#c7 for details).

Credit to Aryeh Gregor (https://bugzilla.wikimedia.org/show_bug.cgi?id=6200#c8)
and Vitaliy Filippov (https://bugzilla.wikimedia.org/show_bug.cgi?id=6200#c37)
for almost-correct patches for this bug, which saved me a bunch of effort.
Thanks to Subramanya Sastry for pointing out bug 52763 and preventing a
bunch of broken articles on enwiki.

Bug: 6200
Bug: 15491
Bug: 52763
Change-Id: I3696d4ab7b8ad6ebccf8483d6da1722353c1697d
---
M RELEASE-NOTES-1.22
M includes/parser/Parser.php
M tests/parser/parserTests.txt
3 files changed, 105 insertions(+), 23 deletions(-)

Approvals:
  Tim Starling: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/RELEASE-NOTES-1.22 b/RELEASE-NOTES-1.22
index e503e30..295a95f 100644
--- a/RELEASE-NOTES-1.22
+++ b/RELEASE-NOTES-1.22
@@ -291,6 +291,7 @@
 * (bug 51742) Add data-sort-value for better sorting of hitcounts Special:Tags
 * (bug 26811) On DB error pages, server hostnames are now hidden when both
   $wgShowHostnames and $wgShowSQLErrors are false.
+* (bug 6200) line breaks in blockquote are handled like they are in div
 
 === API changes in 1.22 ===
 * (bug 25553) The JSON output formatter now leaves forward slashes unescaped
diff --git a/includes/parser/Parser.php b/includes/parser/Parser.php
index fd69bfc..3376734 100644
--- a/includes/parser/Parser.php
+++ b/includes/parser/Parser.php
@@ -2362,6 +2362,7 @@
$this-mDTopen = $inBlockElem = false;
$prefixLength = 0;
$paragraphStack = false;
+   $inBlockquote = false;
 
foreach ( $textLines as $oLine ) {
# Fix up $linestart
@@ -2455,10 +2456,10 @@
wfProfileIn( __METHOD__ . -paragraph );
# No prefix (not in list)--go to paragraph mode
# XXX: use a stack for nestable elements like 
span, table and div
-   $openmatch = preg_match( 
'/(?:table|blockquote|h1|h2|h3|h4|h5|h6|pre|tr|p|ul|ol|dl|li|\\/tr|\\/td|\\/th)/iS',
 $t );
+   $openmatch = preg_match( 
'/(?:table|h1|h2|h3|h4|h5|h6|pre|tr|p|ul|ol|dl|li|\\/tr|\\/td|\\/th)/iS',
 $t );
$closematch = preg_match(
-   
'/(?:\\/table|\\/blockquote|\\/h1|\\/h2|\\/h3|\\/h4|\\/h5|\\/h6|' .
-   'td|th|\\/?div|hr|\\/pre|\\/p|' . 
$this-mUniqPrefix . '-pre|\\/li|\\/ul|\\/ol|\\/dl|\\/?center)/iS', $t );
+   
'/(?:\\/table|\\/h1|\\/h2|\\/h3|\\/h4|\\/h5|\\/h6|' .
+   
'td|th|\\/?blockquote|\\/?div|hr|\\/pre|\\/p|' . $this-mUniqPrefix . 
'-pre|\\/li|\\/ul|\\/ol|\\/dl|\\/?center)/iS', $t );
if ( $openmatch or $closematch ) {
$paragraphStack = false;
# TODO bug 5718: paragraph closed
@@ -2466,9 +2467,14 @@
if ( $preOpenMatch and !$preCloseMatch 
) {
$this-mInPre = true;
}
+   $bqOffset = 0;
+   while ( preg_match( 
'/(\\/?)blockquote[\s]/i', $t, $bqMatch, PREG_OFFSET_CAPTURE, $bqOffset ) ) {
+   $inBlockquote = 
!$bqMatch[1][0]; // is this a close tag?
+   $bqOffset = $bqMatch[0][1] + 
strlen( $bqMatch[0][0] );
+   }
$inBlockElem = !$closematch;
} elseif ( !$inBlockElem  !$this-mInPre ) {
-   if ( ' ' == substr( $t, 0, 1 ) and ( 
$this-mLastSection === 'pre' || trim( $t ) != '' ) ) {
+   if ( ' ' == substr( $t, 0, 1 ) and ( 
$this-mLastSection === 'pre' || trim( $t ) != '' ) and !$inBlockquote ) {
# pre

[MediaWiki-commits] [Gerrit] Add mosh to labs bastions - change (operations/puppet)

2013-09-12 Thread Yuvipanda (Code Review)
Yuvipanda has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/84105


Change subject: Add mosh to labs bastions
..

Add mosh to labs bastions

This is the *other* bastion class...

Bug: 52693
Change-Id: I002a8d954775961dc77f2dad5b1fdbcd2e1ae28f
---
M manifests/ssh.pp
1 file changed, 3 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/05/84105/1

diff --git a/manifests/ssh.pp b/manifests/ssh.pp
index ebfb0fa..ae8a5aa 100644
--- a/manifests/ssh.pp
+++ b/manifests/ssh.pp
@@ -94,6 +94,9 @@
}
}
 
+   package { 'mosh':
+   ensure = present
+   }
 
$ssh_banner = $ssh::bastion::ssh_banner
 

-- 
To view, visit https://gerrit.wikimedia.org/r/84105
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I002a8d954775961dc77f2dad5b1fdbcd2e1ae28f
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Yuvipanda yuvipa...@gmail.com

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] wfMkdirParents: recover from mkdir race condition - change (mediawiki/core)

2013-09-12 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: wfMkdirParents: recover from mkdir race condition
..


wfMkdirParents: recover from mkdir race condition

If mkdir fails, check again to see if dir has been created
since our initial check, and return true if so.

Also, in initial check, only return true if $dir is really
a directory, not a file.

Bug: 49391
Change-Id: I2b331669fae70948ce79ba1477c05968a3095c3d
---
M includes/GlobalFunctions.php
M tests/phpunit/includes/GlobalFunctions/GlobalTest.php
2 files changed, 15 insertions(+), 1 deletion(-)

Approvals:
  Parent5446: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/includes/GlobalFunctions.php b/includes/GlobalFunctions.php
index bed2c44..f43393a 100644
--- a/includes/GlobalFunctions.php
+++ b/includes/GlobalFunctions.php
@@ -2521,7 +2521,7 @@
wfDebug( $caller: called wfMkdirParents($dir)\n );
}
 
-   if ( strval( $dir ) === '' || file_exists( $dir ) ) {
+   if ( strval( $dir ) === '' || ( file_exists( $dir )  is_dir( $dir ) ) 
) {
return true;
}
 
@@ -2537,6 +2537,11 @@
wfRestoreWarnings();
 
if ( !$ok ) {
+   //directory may have been created on another request since we 
last checked
+   if ( is_dir( $dir ) ) {
+   return true;
+   }
+
// PHP doesn't report the path in its warning message, so add 
our own to aid in diagnosis.
wfLogWarning( sprintf( failed to mkdir \%s\ mode 0%o, $dir, 
$mode ) );
}
diff --git a/tests/phpunit/includes/GlobalFunctions/GlobalTest.php 
b/tests/phpunit/includes/GlobalFunctions/GlobalTest.php
index 6a2a0df..244b100 100644
--- a/tests/phpunit/includes/GlobalFunctions/GlobalTest.php
+++ b/tests/phpunit/includes/GlobalFunctions/GlobalTest.php
@@ -630,6 +630,15 @@
return $a;
}
 
+   function testWfMkdirParents() {
+   // Should not return true if file exists instead of directory
+   $fname = $this-getNewTempFile();
+   wfSuppressWarnings();
+   $ok = wfMkdirParents( $fname );
+   wfRestoreWarnings();
+   $this-assertFalse( $ok );
+   }
+
/**
 * @dataProvider provideWfShellMaintenanceCmdList
 */

-- 
To view, visit https://gerrit.wikimedia.org/r/84100
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I2b331669fae70948ce79ba1477c05968a3095c3d
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Ejegg ej...@ejegg.com
Gerrit-Reviewer: Parent5446 tylerro...@gmail.com
Gerrit-Reviewer: jenkins-bot

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] Add *.wikisource.org to the default prefix list - change (mediawiki...Parsoid)

2013-09-12 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Add *.wikisource.org to the default prefix list
..


Add *.wikisource.org to the default prefix list

Change-Id: I6d19dc1c0a3618509915311c0c62183805611d57
---
M js/lib/mediawiki.ParsoidConfig.js
1 file changed, 1 insertion(+), 1 deletion(-)

Approvals:
  Subramanya Sastry: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/js/lib/mediawiki.ParsoidConfig.js 
b/js/lib/mediawiki.ParsoidConfig.js
index f401902..8606f01 100644
--- a/js/lib/mediawiki.ParsoidConfig.js
+++ b/js/lib/mediawiki.ParsoidConfig.js
@@ -30,7 +30,7 @@
this.interwikiMap[wplist[ix]] = 'http://' + wplist[ix] + 
'.wikipedia.org/w/api.php';
// Also add an alias that follows the Wikimedia db name 
convention
// (enwiki, dewiki etc).
-   ['pedia', 'voyage', 'books', 'quote'].forEach(function(suffix) {
+   ['pedia', 'voyage', 'books', 'source', 
'quote'].forEach(function(suffix) {
var dbName = wplist[ix] + 'wiki' + (suffix === 'pedia' 
? '' : suffix);
self.interwikiMap[dbName] = 'http://' + wplist[ix] + 
'.wiki' +
suffix + '.org/w/api.php';

-- 
To view, visit https://gerrit.wikimedia.org/r/84103
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I6d19dc1c0a3618509915311c0c62183805611d57
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Parsoid
Gerrit-Branch: master
Gerrit-Owner: GWicke gwi...@wikimedia.org
Gerrit-Reviewer: Cscott canan...@wikimedia.org
Gerrit-Reviewer: Kelson kel...@kiwix.org
Gerrit-Reviewer: Subramanya Sastry ssas...@wikimedia.org
Gerrit-Reviewer: jenkins-bot

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] Fix some bugs with the indentation patch. - change (mediawiki...BookManagerv2)

2013-09-12 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Fix some bugs with the indentation patch.
..


Fix some bugs with the indentation patch.

i18n fields were having 'field' appended to them still (probably
a rebase issue). Also check for indentation property in the
JSON block instead of assuming it exists.

Change-Id: I4b250ac4d6e419b0c7e274536ddc704817900f86
---
M BookManagerv2.hooks.php
M JsonEditor.php
2 files changed, 9 insertions(+), 5 deletions(-)

Approvals:
  Mwalker: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/BookManagerv2.hooks.php b/BookManagerv2.hooks.php
index 3fbbdf8..c4fcc00 100644
--- a/BookManagerv2.hooks.php
+++ b/BookManagerv2.hooks.php
@@ -345,10 +345,14 @@
$html .= Html::openElement( 'ol', array() );
foreach ( $sections as $key = $val ) {
if ( $val-link !== $currentPageTitle ) {
-   $html .= Html::openElement( 'li', array(
-   'class' = 'indent-' . 
(string)$val-indentation
-   ) )
-   . Linker::link(
+   if ( isset( $val-indentation ) ) {
+   $html .= Html::openElement( 'li', array(
+   'class' = 'indent-' . 
(string)$val-indentation
+   ) );
+   } else {
+   $html .= Html::openElement( 'li', 
array() );
+   }
+   $html .= Linker::link(
Title::newFromText( $val-link 
),
$val-name
)
diff --git a/JsonEditor.php b/JsonEditor.php
index b824acd..57b18a1 100644
--- a/JsonEditor.php
+++ b/JsonEditor.php
@@ -68,7 +68,7 @@
) {
$key = htmlentities( $key );
$type = $val-type;
-   $i18n = $val-additionalProperties-i18n . '-field';
+   $i18n = $val-additionalProperties-i18n;
if ( $type === 'array' ) {
// TODO: Array handling
$inputType = 'text';

-- 
To view, visit https://gerrit.wikimedia.org/r/84093
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I4b250ac4d6e419b0c7e274536ddc704817900f86
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/BookManagerv2
Gerrit-Branch: master
Gerrit-Owner: Mollywhite molly.whi...@gmail.com
Gerrit-Reviewer: Mwalker mwal...@wikimedia.org
Gerrit-Reviewer: jenkins-bot

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] Change haveSingleSourceLanguage to use a simple loop - change (mediawiki...Translate)

2013-09-12 Thread Amire80 (Code Review)
Amire80 has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/84106


Change subject: Change haveSingleSourceLanguage to use a simple loop
..

Change haveSingleSourceLanguage to use a simple loop

array_map puts group names in array keys, which is
not useful here, so changing to a simple loop.

Change-Id: If73917b0a462a5d9c3437d4bf789579f93246013
---
M MessageGroups.php
1 file changed, 8 insertions(+), 4 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Translate 
refs/changes/06/84106/1

diff --git a/MessageGroups.php b/MessageGroups.php
index 97815c1..e947a10 100644
--- a/MessageGroups.php
+++ b/MessageGroups.php
@@ -636,10 +636,14 @@
 * @since 2013.09
 */
public function haveSingleSourceLanguage( array $groups ) {
-   $languages = array_map( function ( $group ) {
-   return $group-getSourceLanguage();
-   }, $groups );
-   $languages = array_unique( $languages );
+   $languages = array();
+
+   foreach ( $groups as $group ) {
+   $language = $group-getSourceLanguage();
+   if ( !in_array( $language, $languages ) ) {
+   $languages[] = $language;
+   }
+   }
 
if ( count( $languages ) === 1 ) {
return $languages[0];

-- 
To view, visit https://gerrit.wikimedia.org/r/84106
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: If73917b0a462a5d9c3437d4bf789579f93246013
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Translate
Gerrit-Branch: master
Gerrit-Owner: Amire80 amir.ahar...@mail.huji.ac.il

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] Show For all languages and no stats bar for source language - change (mediawiki...TwnMainPage)

2013-09-12 Thread Amire80 (Code Review)
Amire80 has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/84107


Change subject: Show For all languages and no stats bar for source language
..

Show For all languages and no stats bar for source language

To changes for the main page when the page language is the same
as the source language:

1. Show For all languages instead of the language name.
2. Shoe empty stats bar. (For now, will be smarter later.)

Change-Id: I675e8bf6160be7eaa058efc92e74ea03cd687f9b
---
M MainPage.i18n.php
M specials/SpecialTwnMainPage.php
2 files changed, 24 insertions(+), 4 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/TwnMainPage 
refs/changes/07/84107/1

diff --git a/MainPage.i18n.php b/MainPage.i18n.php
index 3f5e6fb..4212906 100644
--- a/MainPage.i18n.php
+++ b/MainPage.i18n.php
@@ -10,6 +10,7 @@
 
 /** English
  * @author Nike
+ * @author Amire80
  */
 $messages['en'] = array(
'twnmp-desc' = 'Provides the translatewiki.net main page',
@@ -34,6 +35,7 @@
'twnmp-proofread-button' = 'Proofread',
 
'twnmp-your-translations-stats' = 'Your translation statistics',
+   'twnmp-your-translations-stats-all-languages' = 'For all languages',
'twnmp-your-view-language-stats' = 'View language statistics',
'twnmp-translations-per-month' = 'Translations/month',
'twnmp-reviews-per-month' = 'Reviews/month',
@@ -116,6 +118,7 @@
'twnmp-your-translations-stats' = A header for the user's translation 
statistics.
 
 See example: [[Special:MainPage]],
+   'twnmp-your-translations-stats-all-languages' = 'Appears under the 
message {{msg-mw|twnmp-your-translations-stats}} when the user language is the 
same as the translation source language.',
'twnmp-your-view-language-stats' = A link that appears under the 
user's translation statistics.,
'twnmp-translations-per-month' = Used in [[Special:Mainpage]].
 Appears in the user's statistics box near a number.
@@ -631,6 +634,7 @@
'twnmp-translate-button' = 'תרגום',
'twnmp-proofread-button' = 'הגהה',
'twnmp-your-translations-stats' = 'סטטיסטיקת התרגומים שלך',
+   'twnmp-your-translations-stats-all-languages' = 'בכל השפות',
'twnmp-your-view-language-stats' = 'הצגת הסטטיסטיקה לשפה',
'twnmp-translations-per-month' = 'תרגומים לחודש',
'twnmp-reviews-per-month' = 'הגהות לחודש',
diff --git a/specials/SpecialTwnMainPage.php b/specials/SpecialTwnMainPage.php
index 5c0a2c8..ea460fa 100644
--- a/specials/SpecialTwnMainPage.php
+++ b/specials/SpecialTwnMainPage.php
@@ -165,7 +165,6 @@
protected function makeGroupTile( MessageGroup $group, array $stats ) {
$id = $group-getId();
$uiLanguage = $this-getLanguage();
-   $statsbar = StatsBar::getNew( $id, $uiLanguage-getCode(), 
$stats );
 
$translated = $stats[MessageGroupStats::TRANSLATED];
$proofread = $stats[MessageGroupStats::PROOFREAD];
@@ -176,7 +175,14 @@
 
$image = Html::element( 'div', array( 'class' = 
project-icon-$id ) );
$label = htmlspecialchars( $group-getLabel( 
$this-getContext() ) );
-   $stats = $statsbar-getHtml( $this-getContext() );
+
+   if ( $this-getLanguage()-getCode() !== 
$group-getSourceLanguage() ) {
+   $statsbar = StatsBar::getNew( $id, 
$uiLanguage-getCode(), $stats );
+   $statsHtml = $statsbar-getHtml( $this-getContext() );
+   } else {
+   $statsHtml = '';
+   }
+
// @todo FIXME i18n: Hard coded percentage character twice.
$acts = Html::element( 'span', array( 'class' = 'translate' ), 
$translated% ) .
Html::element( 'span', array( 'class' = 'proofread' ), 
$proofread% );
@@ -199,7 +205,7 @@
div class=project-icon four columns$image/div
div class=project-content eight columns
div class=row project-name 
dir=auto$label/div
-   div class=row project-statsbar$stats/div
+   div class=row 
project-statsbar$statsHtml/div
div class=row project-stats$acts/div
/div
/div
@@ -493,12 +499,22 @@
);
 
$out .= Html::openElement( 'div', array( 'class' = 'row 
user-stats-title' ) );
+
$out .= Html::element(
'h2',
array(),
$this-msg( 'twnmp-your-translations-stats' )-text()
);
-   $out .= Html::element( 'div', array(), $languageName );
+
+   $groupsSourceLanguage = 
MessageGroups::haveSingleSourceLanguage( MessageGroups::getAllGroups() );
+   if ( 

[MediaWiki-commits] [Gerrit] Support initial text separate from summary - change (pywikibot/core)

2013-09-12 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Support initial text separate from summary
..


Support initial text separate from summary

When a new file is uploaded, the page text defaults to the summary,
or vice versa.
This change should provide the ability to have them different.

Change-Id: Idd927c0e3256ca610ae418afdfbbaa3afb5ba9d9
---
M pywikibot/site.py
1 file changed, 10 insertions(+), 3 deletions(-)

Approvals:
  Legoktm: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/pywikibot/site.py b/pywikibot/site.py
index 1c0b144..59eebf5 100644
--- a/pywikibot/site.py
+++ b/pywikibot/site.py
@@ -3037,7 +3037,7 @@
 return self.getFilesFromAnHash(hash_found)
 
 def upload(self, imagepage, source_filename=None, source_url=None,
-   comment=None, watch=False, ignore_warnings=False):
+   comment=None, text=None, watch=False, ignore_warnings=False):
 Upload a file to the wiki.
 
 Either source_filename or source_url, but not both, must be provided.
@@ -3048,6 +3048,9 @@
 @param source_url: URL of the file to be uploaded
 @param comment: Edit summary; if this is not provided, then
 imagepage.text will be used. An empty summary is not permitted.
+This may also serve as the initial page text (see below).
+@param text: Initial page text; if this is not set, then
+imagepage.text will be used, or comment.
 @param watch: If true, add imagepage to the bot user's watchlist
 @param ignore_warnings: if true, ignore API warnings and force
 upload (for example, to overwrite an existing file); default False
@@ -3089,6 +3092,10 @@
 raise ValueError(
 APISite.upload: cannot upload file without a summary/description.
 )
+if text is None:
+text = imagepage.text
+if not text:
+text = comment
 token = self.token(imagepage, edit)
 if source_filename:
 # upload local file
@@ -3102,7 +3109,7 @@
 req = api.Request(site=self, action=upload, token=token,
   filename=imagepage.title(withNamespace=False),
   file=source_filename, comment=comment,
-  mime=True)
+  text=text, mime=True)
 else:
 # upload by URL
 if upload_by_url not in self.userinfo[rights]:
@@ -3111,7 +3118,7 @@
 % (self.user(), self))
 req = api.Request(site=self, action=upload, token=token,
   filename=imagepage.title(withNamespace=False),
-  url=source_url, comment=comment)
+  url=source_url, comment=comment, text=text)
 if watch:
 req[watch] = 
 if ignore_warnings:

-- 
To view, visit https://gerrit.wikimedia.org/r/82560
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: Idd927c0e3256ca610ae418afdfbbaa3afb5ba9d9
Gerrit-PatchSet: 2
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Owner: Hazard-SJ hazard...@yahoo.com
Gerrit-Reviewer: Ladsgroup ladsgr...@gmail.com
Gerrit-Reviewer: Legoktm legoktm.wikipe...@gmail.com
Gerrit-Reviewer: Merlijn van Deen valhall...@arctus.nl
Gerrit-Reviewer: jenkins-bot

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] Consistently follow conventions for documenting parameters - change (mediawiki/core)

2013-09-12 Thread Ori.livneh (Code Review)
Ori.livneh has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/84108


Change subject: Consistently follow conventions for documenting parameters
..

Consistently follow conventions for documenting parameters

Per MW:CC/PHP, the type goes before the variable name, and built-in types are
not uppercase.

Change-Id: Ibb753acd9529ace3579d57654adc47673fa49719
---
M includes/resourceloader/ResourceLoaderFileModule.php
M includes/resourceloader/ResourceLoaderModule.php
2 files changed, 51 insertions(+), 51 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/08/84108/1

diff --git a/includes/resourceloader/ResourceLoaderFileModule.php 
b/includes/resourceloader/ResourceLoaderFileModule.php
index af533c6..10c25f0 100644
--- a/includes/resourceloader/ResourceLoaderFileModule.php
+++ b/includes/resourceloader/ResourceLoaderFileModule.php
@@ -259,8 +259,8 @@
/**
 * Gets all scripts for a given context concatenated together.
 *
-* @param $context ResourceLoaderContext: Context in which to generate 
script
-* @return String: JavaScript code for $context
+* @param ResourceLoaderContext $context Context in which to generate 
script
+* @return string: JavaScript code for $context
 */
public function getScript( ResourceLoaderContext $context ) {
$files = $this-getScriptFiles( $context );
@@ -268,7 +268,7 @@
}
 
/**
-* @param $context ResourceLoaderContext
+* @param ResourceLoaderContext $context
 * @return array
 */
public function getScriptURLsForDebug( ResourceLoaderContext $context ) 
{
@@ -289,7 +289,7 @@
/**
 * Gets loader script.
 *
-* @return String: JavaScript code to be added to startup module
+* @return string: JavaScript code to be added to startup module
 */
public function getLoaderScript() {
if ( count( $this-loaderScripts ) == 0 ) {
@@ -301,8 +301,8 @@
/**
 * Gets all styles for a given context concatenated together.
 *
-* @param $context ResourceLoaderContext: Context in which to generate 
styles
-* @return String: CSS code for $context
+* @param ResourceLoaderContext $context Context in which to generate 
styles
+* @return string: CSS code for $context
 */
public function getStyles( ResourceLoaderContext $context ) {
$styles = $this-readStyleFiles(
@@ -330,7 +330,7 @@
}
 
/**
-* @param $context ResourceLoaderContext
+* @param ResourceLoaderContext $context
 * @return array
 */
public function getStyleURLsForDebug( ResourceLoaderContext $context ) {
@@ -347,7 +347,7 @@
/**
 * Gets list of message keys used by this module.
 *
-* @return Array: List of message keys
+* @return array: List of message keys
 */
public function getMessages() {
return $this-messages;
@@ -356,7 +356,7 @@
/**
 * Gets the name of the group this module should be loaded in.
 *
-* @return String: Group name
+* @return string: Group name
 */
public function getGroup() {
return $this-group;
@@ -372,7 +372,7 @@
/**
 * Gets list of names of modules this module depends on.
 *
-* @return Array: List of module names
+* @return array: List of module names
 */
public function getDependencies() {
return $this-dependencies;
@@ -394,9 +394,9 @@
 * calculations on files relevant to the given language, skin and debug
 * mode.
 *
-* @param $context ResourceLoaderContext: Context in which to calculate
+* @param ResourceLoaderContext $context Context in which to calculate
 * the modified time
-* @return Integer: UNIX timestamp
+* @return int: UNIX timestamp
 * @see ResourceLoaderModule::getFileDependencies
 */
public function getModifiedTime( ResourceLoaderContext $context ) {
@@ -455,7 +455,7 @@
/* Protected Methods */
 
/**
-* @param $path string
+* @param string $path
 * @return string
 */
protected function getLocalPath( $path ) {
@@ -463,7 +463,7 @@
}
 
/**
-* @param $path string
+* @param string $path
 * @return string
 */
protected function getRemotePath( $path ) {
@@ -476,8 +476,8 @@
 * @param array $list List of file paths in any combination of 
index/path
 * or path/options pairs
 * @param string $option option name
-* @param $default Mixed: default value if the option isn't set
-* @return Array: List of file 

[MediaWiki-commits] [Gerrit] WIP: Show stats for all languages - change (mediawiki...TwnMainPage)

2013-09-12 Thread Amire80 (Code Review)
Amire80 has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/84109


Change subject: WIP: Show stats for all languages
..

WIP: Show stats for all languages

This is the general idea; I'm not sure how to test it.

Change-Id: I7f6e86cd6b17e6bd6f53abca4973a44e23b53cb6
---
M UserStats.php
M specials/SpecialTwnMainPage.php
2 files changed, 21 insertions(+), 7 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/TwnMainPage 
refs/changes/09/84109/1

diff --git a/UserStats.php b/UserStats.php
index b2cc9e6..77d17aa 100644
--- a/UserStats.php
+++ b/UserStats.php
@@ -26,9 +26,13 @@
 
$conds = array(
'rc_namespace' = $wgTranslateMessageNamespaces,
-   'rc_title' . $dbr-buildLike( $dbr-anyString(), 
/$language ),
'rc_bot' = 0,
);
+
+   if ( $language !== '' ) {
+   wfDebug( chapa empty language\n );
+   $conds[] = 'rc_title' . $dbr-buildLike( 
$dbr-anyString(), /$language );
+   }
 
$options = array(
'ORDER BY' = 'rc_id DESC',
@@ -84,12 +88,15 @@
 
$conds = array(
'log_namespace' = $wgTranslateMessageNamespaces,
-   'log_title' . $dbr-buildLike( $dbr-anyString(), 
/$language ),
'log_type' = 'translationreview',
'log_action' = 'message',
'log_timestamp = ' . $dbr-timestamp( $weekago ),
);
 
+   if ( $language !== '' ) {
+   $conds[] = 'log_title' . $dbr-buildLike( 
$dbr-anyString(), /$language );
+   }
+
$options = array(
'GROUP BY' = 'user_name',
);
diff --git a/specials/SpecialTwnMainPage.php b/specials/SpecialTwnMainPage.php
index 9e13d62..4b0452f 100644
--- a/specials/SpecialTwnMainPage.php
+++ b/specials/SpecialTwnMainPage.php
@@ -490,13 +490,21 @@
}
 
public function userStats() {
+   $groupsSourceLanguage = MessageGroups::haveSingleSourceLanguage(
+   MessageGroups::getAllGroups()
+   );
$languageCode = $this-getLanguage()-getCode();
$languageName = TranslateUtils::getLanguageName( $languageCode, 
$languageCode );
+   $viewingInSourceLanguage = ( $groupsSourceLanguage === 
$languageCode );
 
-   $stale = 60 * 5;
-   $expired = 60 * 60 * 12;
+   $stale = 1;#60 * 5;
+   $expired = 1;#60 * 60 * 12;
$cacher = new CachedStat( userstats-$languageCode, $stale, 
$expired,
-   array( 'SpecialTwnMainPage::getUserStats', 
$languageCode, 30 ),
+   array(
+   'SpecialTwnMainPage::getUserStats',
+   $viewingInSourceLanguage ? '' : $languageCode,
+   30
+   ),
'allow miss'
);
$statsArray = $cacher-get();
@@ -520,8 +528,7 @@
$this-msg( 'twnmp-your-translations-stats' )-text()
);
 
-   $groupsSourceLanguage = 
MessageGroups::haveSingleSourceLanguage( MessageGroups::getAllGroups() );
-   if ( $groupsSourceLanguage === $languageCode ) {
+   if ( $viewingInSourceLanguage ) {
 $translationStatsSubtitle = $this-msg(
'twnmp-your-translations-stats-all-languages'
 );

-- 
To view, visit https://gerrit.wikimedia.org/r/84109
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I7f6e86cd6b17e6bd6f53abca4973a44e23b53cb6
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/TwnMainPage
Gerrit-Branch: master
Gerrit-Owner: Amire80 amir.ahar...@mail.huji.ac.il

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] add - ssh_command method. - change (sartoris)

2013-09-12 Thread Rfaulk (Code Review)
Rfaulk has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/83988


Change subject: add - ssh_command method.
..

add - ssh_command method.

Change-Id: I6fb6a7464657afd00dd03eca364e12a9368df860
---
M sartoris/sartoris.py
1 file changed, 33 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/sartoris refs/changes/88/83988/1

diff --git a/sartoris/sartoris.py b/sartoris/sartoris.py
index fb3db55..a3229a5 100755
--- a/sartoris/sartoris.py
+++ b/sartoris/sartoris.py
@@ -427,6 +427,39 @@
 t.close()
 sock.close()
 
+@staticmethod
+def ssh_command(cmd, host, port, user, password, nbytes=1000):
+
+# Initialize connection
+client = paramiko.Transport((host, port))
+client.connect(username=user, password=password)
+
+# Prepare stream lists, open session, exec command
+stdout_data = []
+stderr_data = []
+session = client.open_channel(kind='session')
+session.exec_command(cmd)
+
+# Read output
+while True:
+if session.recv_ready():
+stdout_data.append(session.recv(nbytes))
+if session.recv_stderr_ready():
+stderr_data.append(session.recv_stderr(nbytes))
+if session.exit_status_ready():
+break
+
+# Get exit status and close sessions
+exit_status = session.recv_exit_status()
+session.close()
+client.close()
+
+return {
+'exit_status': exit_status,
+'stdout': ''.join(stdout_data),
+'stderr': ''.join(stderr_data),
+}
+
 def resync(self, args):
 
 * write a lock file

-- 
To view, visit https://gerrit.wikimedia.org/r/83988
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I6fb6a7464657afd00dd03eca364e12a9368df860
Gerrit-PatchSet: 1
Gerrit-Project: sartoris
Gerrit-Branch: master
Gerrit-Owner: Rfaulk rfaulk...@wikimedia.org

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] add - ssh_command method. - change (sartoris)

2013-09-12 Thread Rfaulk (Code Review)
Rfaulk has submitted this change and it was merged.

Change subject: add - ssh_command method.
..


add - ssh_command method.

Change-Id: I6fb6a7464657afd00dd03eca364e12a9368df860
---
M sartoris/sartoris.py
1 file changed, 33 insertions(+), 0 deletions(-)

Approvals:
  Rfaulk: Verified; Looks good to me, approved
  jenkins-bot: Verified



diff --git a/sartoris/sartoris.py b/sartoris/sartoris.py
index fb3db55..a3229a5 100755
--- a/sartoris/sartoris.py
+++ b/sartoris/sartoris.py
@@ -427,6 +427,39 @@
 t.close()
 sock.close()
 
+@staticmethod
+def ssh_command(cmd, host, port, user, password, nbytes=1000):
+
+# Initialize connection
+client = paramiko.Transport((host, port))
+client.connect(username=user, password=password)
+
+# Prepare stream lists, open session, exec command
+stdout_data = []
+stderr_data = []
+session = client.open_channel(kind='session')
+session.exec_command(cmd)
+
+# Read output
+while True:
+if session.recv_ready():
+stdout_data.append(session.recv(nbytes))
+if session.recv_stderr_ready():
+stderr_data.append(session.recv_stderr(nbytes))
+if session.exit_status_ready():
+break
+
+# Get exit status and close sessions
+exit_status = session.recv_exit_status()
+session.close()
+client.close()
+
+return {
+'exit_status': exit_status,
+'stdout': ''.join(stdout_data),
+'stderr': ''.join(stderr_data),
+}
+
 def resync(self, args):
 
 * write a lock file

-- 
To view, visit https://gerrit.wikimedia.org/r/83988
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I6fb6a7464657afd00dd03eca364e12a9368df860
Gerrit-PatchSet: 1
Gerrit-Project: sartoris
Gerrit-Branch: master
Gerrit-Owner: Rfaulk rfaulk...@wikimedia.org
Gerrit-Reviewer: Rfaulk rfaulk...@wikimedia.org
Gerrit-Reviewer: jenkins-bot

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] add - method for scping. - change (sartoris)

2013-09-12 Thread Rfaulk (Code Review)
Rfaulk has submitted this change and it was merged.

Change subject: add - method for scping.
..


add - method for scping.

Change-Id: If89d69f76b5851573d5f3366c9897dc807a1cae0
---
M sartoris/sartoris.py
1 file changed, 40 insertions(+), 3 deletions(-)

Approvals:
  Rfaulk: Verified; Looks good to me, approved
  jenkins-bot: Verified



diff --git a/sartoris/sartoris.py b/sartoris/sartoris.py
index ad6c1d7..fb3db55 100755
--- a/sartoris/sartoris.py
+++ b/sartoris/sartoris.py
@@ -13,13 +13,17 @@
 
 import os
 import stat
+import paramiko
+import socket
 from re import search
 import subprocess
-from dulwich.repo import Repo
-from dulwich.objects import Tag, Commit, parse_timezone
-from datetime import datetime
 import json
 from time import time
+from datetime import datetime
+
+from dulwich.repo import Repo
+from dulwich.objects import Tag, Commit, parse_timezone
+
 from config import log, configure, exit_codes
 
 
@@ -390,6 +394,39 @@
 log.info('PULL - ' + '; '.join(
 filter(lambda x: x, proc.communicate(
 
+@staticmethod
+def scp_file(source, target, user, password, host):
+
+SCP files via paramiko.
+
+
+# Socket connection to remote host
+sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
+sock.connect((host, 22))
+
+# Build a SSH transport
+t = paramiko.Transport(sock)
+t.start_client()
+t.auth_password(user, password)
+
+# Start a scp channel
+scp_channel = t.open_session()
+
+f = file(source, 'rb')
+scp_channel.exec_command('scp -v -t %s\n'
+ % '/'.join(target.split('/')[:-1]))
+scp_channel.send('C%s %d %s\n'
+ % (oct(os.stat(source).st_mode)[-4:],
+ os.stat(source)[6],
+ target.split('/')[-1]))
+scp_channel.sendall(f.read())
+
+# Cleanup
+f.close()
+scp_channel.close()
+t.close()
+sock.close()
+
 def resync(self, args):
 
 * write a lock file

-- 
To view, visit https://gerrit.wikimedia.org/r/83987
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: If89d69f76b5851573d5f3366c9897dc807a1cae0
Gerrit-PatchSet: 1
Gerrit-Project: sartoris
Gerrit-Branch: master
Gerrit-Owner: Rfaulk rfaulk...@wikimedia.org
Gerrit-Reviewer: Rfaulk rfaulk...@wikimedia.org
Gerrit-Reviewer: jenkins-bot

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] add - method for scping. - change (sartoris)

2013-09-12 Thread Rfaulk (Code Review)
Rfaulk has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/83987


Change subject: add - method for scping.
..

add - method for scping.

Change-Id: If89d69f76b5851573d5f3366c9897dc807a1cae0
---
M sartoris/sartoris.py
1 file changed, 40 insertions(+), 3 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/sartoris refs/changes/87/83987/1

diff --git a/sartoris/sartoris.py b/sartoris/sartoris.py
index ad6c1d7..fb3db55 100755
--- a/sartoris/sartoris.py
+++ b/sartoris/sartoris.py
@@ -13,13 +13,17 @@
 
 import os
 import stat
+import paramiko
+import socket
 from re import search
 import subprocess
-from dulwich.repo import Repo
-from dulwich.objects import Tag, Commit, parse_timezone
-from datetime import datetime
 import json
 from time import time
+from datetime import datetime
+
+from dulwich.repo import Repo
+from dulwich.objects import Tag, Commit, parse_timezone
+
 from config import log, configure, exit_codes
 
 
@@ -390,6 +394,39 @@
 log.info('PULL - ' + '; '.join(
 filter(lambda x: x, proc.communicate(
 
+@staticmethod
+def scp_file(source, target, user, password, host):
+
+SCP files via paramiko.
+
+
+# Socket connection to remote host
+sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
+sock.connect((host, 22))
+
+# Build a SSH transport
+t = paramiko.Transport(sock)
+t.start_client()
+t.auth_password(user, password)
+
+# Start a scp channel
+scp_channel = t.open_session()
+
+f = file(source, 'rb')
+scp_channel.exec_command('scp -v -t %s\n'
+ % '/'.join(target.split('/')[:-1]))
+scp_channel.send('C%s %d %s\n'
+ % (oct(os.stat(source).st_mode)[-4:],
+ os.stat(source)[6],
+ target.split('/')[-1]))
+scp_channel.sendall(f.read())
+
+# Cleanup
+f.close()
+scp_channel.close()
+t.close()
+sock.close()
+
 def resync(self, args):
 
 * write a lock file

-- 
To view, visit https://gerrit.wikimedia.org/r/83987
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: If89d69f76b5851573d5f3366c9897dc807a1cae0
Gerrit-PatchSet: 1
Gerrit-Project: sartoris
Gerrit-Branch: master
Gerrit-Owner: Rfaulk rfaulk...@wikimedia.org

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] Add elwikivoyage logo - change (operations/mediawiki-config)

2013-09-12 Thread Jalexander (Code Review)
Jalexander has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/83989


Change subject: Add elwikivoyage logo
..

Add elwikivoyage logo

Change-Id: I63a3908d447db3b94b72cf747ddeea33534eec15
---
M wmf-config/InitialiseSettings.php
1 file changed, 1 insertion(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/mediawiki-config 
refs/changes/89/83989/1

diff --git a/wmf-config/InitialiseSettings.php 
b/wmf-config/InitialiseSettings.php
index 737edf5..16dec6d 100644
--- a/wmf-config/InitialiseSettings.php
+++ b/wmf-config/InitialiseSettings.php
@@ -914,6 +914,7 @@
// Wikivoyage
'hewikivoyage' = 
'//upload.wikimedia.org/wikipedia/commons/thumb/c/c0/Wikivoyage-Logo-v3-he.png/153px-Wikivoyage-Logo-v3-he.png',
'plwikivoyage' = 
'//upload.wikimedia.org/wikipedia/commons/f/f2/Wikivoyage-Logo-v3-small-pl.png',
+   'elwikivoyage' = 
'//upload.wikimedia.org/wikipedia/commons/f/fa/Wikivoyage-Logo-v3-small-el.png'
 
// Chapter wikis
'arwikimedia' = 
'//upload.wikimedia.org/wikipedia/commons/thumb/b/ba/Wikimedia_Argentina_logo.svg/135px-Wikimedia_Argentina_logo.svg.png',

-- 
To view, visit https://gerrit.wikimedia.org/r/83989
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I63a3908d447db3b94b72cf747ddeea33534eec15
Gerrit-PatchSet: 1
Gerrit-Project: operations/mediawiki-config
Gerrit-Branch: master
Gerrit-Owner: Jalexander jalexan...@wikimedia.org

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] Add more tags to cucumber tests - change (mediawiki...Wikibase)

2013-09-12 Thread Tobias Gritschacher (Code Review)
Tobias Gritschacher has submitted this change and it was merged.

Change subject: Add more tags to cucumber tests
..


Add more tags to cucumber tests

Change-Id: I6e37c3043dea1f8d1ccc0d79617073e8465dd028
---
M selenium_cuc/features/description.feature
M selenium_cuc/features/empty_label_and_description.feature
M selenium_cuc/features/label.feature
3 files changed, 22 insertions(+), 8 deletions(-)

Approvals:
  Tobias Gritschacher: Verified; Looks good to me, approved
  jenkins-bot: Verified



diff --git a/selenium_cuc/features/description.feature 
b/selenium_cuc/features/description.feature
index 31f5a54..89be3d5 100644
--- a/selenium_cuc/features/description.feature
+++ b/selenium_cuc/features/description.feature
@@ -10,17 +10,20 @@
   Background:
 Given I am on an item page
 
+  @ui_only
   Scenario: Description UI has all required elements
 Then Original description should be displayed
   And Description edit button should be there
   And Description cancel button should not be there
 
+  @ui_only
   Scenario: Click edit button
 When I click the description edit button
 Then Description input element should be there
   And Description input element should contain original description
   And Description cancel button should be there
 
+  @ui_only
   Scenario: Modify the description
 When I click the description edit button
   And I enter MODIFIED DESCRIPTION as description
@@ -28,6 +31,7 @@
   And Description cancel button should be there
   And Description edit button should not be there
 
+  @ui_only
   Scenario: Description cancel
 When I click the description edit button
   And I enter MODIFIED DESCRIPTION as description
@@ -36,6 +40,7 @@
   And Description edit button should be there
   And Description cancel button should not be there
 
+  @ui_only
   Scenario: Description cancel with ESCAPE
 When I click the description edit button
   And I enter MODIFIED DESCRIPTION as description
@@ -44,7 +49,7 @@
   And Description edit button should be there
   And Description cancel button should not be there
 
-  @save_description
+  @save_description @modify_entity
   Scenario: Description save
 When I click the description edit button
   And I enter MODIFIED DESCRIPTION as description
@@ -53,7 +58,7 @@
 When I reload the page
 Then MODIFIED DESCRIPTION should be displayed as description
 
-  @save_description
+  @save_description @modify_entity
   Scenario: Description save with RETURN
 When I click the description edit button
   And I enter MODIFIED DESCRIPTION as description
@@ -62,14 +67,14 @@
 When I reload the page
 Then MODIFIED DESCRIPTION should be displayed as description
 
-  @save_description
+  @save_description @modify_entity
   Scenario: Description with unnormalized value
 When I click the description edit button
   And I enterbla   blaas description
   And I click the description save button
 Then bla bla should be displayed as description
 
-  @save_description
+  @save_description @modify_entity
   Scenario: Description with 0 as value
 When I click the description edit button
   And I enter 0 as description
diff --git a/selenium_cuc/features/empty_label_and_description.feature 
b/selenium_cuc/features/empty_label_and_description.feature
index 4dc3aca..0cffb6f 100644
--- a/selenium_cuc/features/empty_label_and_description.feature
+++ b/selenium_cuc/features/empty_label_and_description.feature
@@ -10,6 +10,7 @@
   Background:
 Given I am on an item page with empty label and description
 
+  @ui_only
   Scenario: Description UI is shown correctly when description is empty
 Then Description input element should be there
   And Description input element should be empty
@@ -17,6 +18,7 @@
   And Description cancel button should not be there
   And Description save button should not be there
 
+  @ui_only
   Scenario: Description UI behaves correctly when description is empty
 When I enter NEW DESCRIPTION as description
 Then Description cancel button should be there
@@ -28,6 +30,7 @@
   And Description input element should be there
   And Description input element should be empty
 
+  @ui_only
   Scenario: Label UI is shown correctly when label is empty
 Then Label input element should be there
   And Label input element should be empty
@@ -35,6 +38,7 @@
   And Label cancel button should not be there
   And Label save button should not be there
 
+  @ui_only
   Scenario: Label UI behaves correctly when label is empty
 When I enter NEW LABEL as label
 Then Label cancel button should be there
diff --git a/selenium_cuc/features/label.feature 
b/selenium_cuc/features/label.feature
index f1bb8cc..0f89bfd 100644
--- a/selenium_cuc/features/label.feature
+++ b/selenium_cuc/features/label.feature
@@ -10,17 +10,20 @@
   Background:
  

[MediaWiki-commits] [Gerrit] Split up test scenarios for label and description tests - change (mediawiki...Wikibase)

2013-09-12 Thread Tobias Gritschacher (Code Review)
Tobias Gritschacher has submitted this change and it was merged.

Change subject: Split up test scenarios for label and description tests
..


Split up test scenarios for label and description tests

- plus convert some scenarios to outline

Change-Id: I1dd88405297d0eee6616f1f7a799ab12c72eeec7
---
M selenium_cuc/features/description.feature
M selenium_cuc/features/empty_label_and_description.feature
M selenium_cuc/features/label.feature
3 files changed, 74 insertions(+), 60 deletions(-)

Approvals:
  Tobias Gritschacher: Verified; Looks good to me, approved
  jenkins-bot: Verified



diff --git a/selenium_cuc/features/description.feature 
b/selenium_cuc/features/description.feature
index 89be3d5..044ebc7 100644
--- a/selenium_cuc/features/description.feature
+++ b/selenium_cuc/features/description.feature
@@ -32,54 +32,57 @@
   And Description edit button should not be there
 
   @ui_only
-  Scenario: Description cancel
+  Scenario Outline: Cancel description
 When I click the description edit button
   And I enter MODIFIED DESCRIPTION as description
-  And I click the description cancel button
+  And I cancel
 Then Original description should be displayed
   And Description edit button should be there
   And Description cancel button should not be there
 
-  @ui_only
-  Scenario: Description cancel with ESCAPE
+Examples:
+  | cancel |
+  | click the description cancel button |
+  | press the ESC key in the description input field |
+
+  @save_description @modify_entity
+  Scenario Outline: Save description
 When I click the description edit button
   And I enter MODIFIED DESCRIPTION as description
-  And I press the ESC key in the description input field
-Then Original description should be displayed
-  And Description edit button should be there
-  And Description cancel button should not be there
+  And I save
+Then MODIFIED DESCRIPTION should be displayed as description
+
+Examples:
+ | save |
+ | click the description save button |
+ | press the RETURN key in the description input field |
 
   @save_description @modify_entity
-  Scenario: Description save
+  Scenario Outline: Save description
 When I click the description edit button
   And I enter MODIFIED DESCRIPTION as description
-  And I click the description save button
-Then MODIFIED DESCRIPTION should be displayed as description
-When I reload the page
+  And I save
+  And I reload the page
 Then MODIFIED DESCRIPTION should be displayed as description
 
-  @save_description @modify_entity
-  Scenario: Description save with RETURN
-When I click the description edit button
-  And I enter MODIFIED DESCRIPTION as description
-  And I press the RETURN key in the description input field
-Then MODIFIED DESCRIPTION should be displayed as description
-When I reload the page
-Then MODIFIED DESCRIPTION should be displayed as description
+Examples:
+  | save |
+  | click the description save button |
+  | press the RETURN key in the description input field |
 
   @save_description @modify_entity
-  Scenario: Description with unnormalized value
+  Scenario Outline: Description with special input
 When I click the description edit button
-  And I enterbla   blaas description
+  And I enter description as description
   And I click the description save button
-Then bla bla should be displayed as description
+Then expected_description should be displayed as description
 
-  @save_description @modify_entity
-  Scenario: Description with 0 as value
-When I click the description edit button
-  And I enter 0 as description
-  And I click the description save button
-Then 0 should be displayed as description
+Examples:
+  | description | expected_description |
+  | 0   | 0|
+  |norma   lize  me   | norm a lize me |
+  | script$(body).empty();/script | 
script$(body).empty();/script |
+  | {{Template:blabla}} | {{Template:blabla}} |
 
   @save_description
   Scenario: Description with a too long value
diff --git a/selenium_cuc/features/empty_label_and_description.feature 
b/selenium_cuc/features/empty_label_and_description.feature
index 0cffb6f..6dca3cc 100644
--- a/selenium_cuc/features/empty_label_and_description.feature
+++ b/selenium_cuc/features/empty_label_and_description.feature
@@ -23,7 +23,11 @@
 When I enter NEW DESCRIPTION as description
 Then Description cancel button should be there
   And Description save button should be there
-When I click the description cancel button
+
+  @ui_only
+  Scenario: Description UI behaves correctly when description is empty
+When I enter NEW DESCRIPTION as description
+  And I click the description cancel button
 Then Description cancel button should not 

[MediaWiki-commits] [Gerrit] allow precision to be null in globe coordinate - change (mediawiki...DataValues)

2013-09-12 Thread Aude (Code Review)
Aude has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/83990


Change subject: allow precision to be null in globe coordinate
..

allow precision to be null in globe coordinate

until we are able to handle the null values in wikidata better,
or they get precisions added.

Change-Id: Iad6574d64a48311fae55288783744ae3ec8f9f1e
---
M DataValuesCommon/src/DataValues/GlobeCoordinateValue.php
M DataValuesCommon/tests/DataValues/GlobeCoordinateValueTest.php
2 files changed, 4 insertions(+), 4 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/DataValues 
refs/changes/90/83990/1

diff --git a/DataValuesCommon/src/DataValues/GlobeCoordinateValue.php 
b/DataValuesCommon/src/DataValues/GlobeCoordinateValue.php
index cb03d47..cedd8aa 100644
--- a/DataValuesCommon/src/DataValues/GlobeCoordinateValue.php
+++ b/DataValuesCommon/src/DataValues/GlobeCoordinateValue.php
@@ -65,8 +65,8 @@
}
 
protected function assertIsPrecision( $precision ) {
-   if ( !is_float( $precision )  !is_int( $precision ) ) {
-   throw new IllegalValueException( 'Can only construct 
GlobeCoordinateValue with a numeric precision' );
+   if ( !is_null( $precision )  !is_float( $precision )  
!is_int( $precision ) ) {
+   throw new IllegalValueException( 'Can only construct 
GlobeCoordinateValue with a numeric precision or null' );
}
}
 
diff --git a/DataValuesCommon/tests/DataValues/GlobeCoordinateValueTest.php 
b/DataValuesCommon/tests/DataValues/GlobeCoordinateValueTest.php
index c6d224e..a33304c 100644
--- a/DataValuesCommon/tests/DataValues/GlobeCoordinateValueTest.php
+++ b/DataValuesCommon/tests/DataValues/GlobeCoordinateValueTest.php
@@ -48,6 +48,7 @@
$argLists[] = array( new LatLongValue( 4.2, 4.2 ), 1, 
'terminus' );
$argLists[] = array( new LatLongValue( 4.2, 4.2 ), 1, Schar's 
World );
$argLists[] = array( new LatLongValue( 4.2, 4.2 ), 1, 
'coruscant' );
+   $argLists[] = array( new LatLongValue( 4.2, 4.2 ), null );
 
return $argLists;
}
@@ -55,7 +56,6 @@
public function invalidConstructorArgumentsProvider() {
$argLists = array();
 
-   $argLists[] = array( new LatLongValue( 4.2, 4.2 ), null );
$argLists[] = array( new LatLongValue( 4.2, 4.2 ), 'foo' );
$argLists[] = array( new LatLongValue( 4.2, 4.2 ), true );
$argLists[] = array( new LatLongValue( 4.2, 4.2 ), array( 1 ) );
@@ -102,7 +102,7 @@
public function testGetPrecision( GlobeCoordinateValue $geoCoord, array 
$arguments ) {
$actual = $geoCoord-getPrecision();
 
-   $this-assertTrue( is_float( $actual ) || is_int( $actual ), 
'Precision is int or float' );
+   $this-assertTrue( is_float( $actual ) || is_int( $actual ) || 
is_null( $actual ), 'Precision is int or float or null' );
$this-assertEquals( $arguments[1], $actual );
}
 

-- 
To view, visit https://gerrit.wikimedia.org/r/83990
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Iad6574d64a48311fae55288783744ae3ec8f9f1e
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/DataValues
Gerrit-Branch: master
Gerrit-Owner: Aude aude.w...@gmail.com

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] allow precision to be null in globe coordinate - change (mediawiki...DataValues)

2013-09-12 Thread Aude (Code Review)
Aude has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/83991


Change subject: allow precision to be null in globe coordinate
..

allow precision to be null in globe coordinate

until we are able to handle the null values in wikidata better,
or they get precisions added.

Change-Id: Iad6574d64a48311fae55288783744ae3ec8f9f1e
---
M DataValuesCommon/src/DataValues/GlobeCoordinateValue.php
M DataValuesCommon/tests/DataValues/GlobeCoordinateValueTest.php
2 files changed, 4 insertions(+), 4 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/DataValues 
refs/changes/91/83991/1

diff --git a/DataValuesCommon/src/DataValues/GlobeCoordinateValue.php 
b/DataValuesCommon/src/DataValues/GlobeCoordinateValue.php
index cb03d47..cedd8aa 100644
--- a/DataValuesCommon/src/DataValues/GlobeCoordinateValue.php
+++ b/DataValuesCommon/src/DataValues/GlobeCoordinateValue.php
@@ -65,8 +65,8 @@
}
 
protected function assertIsPrecision( $precision ) {
-   if ( !is_float( $precision )  !is_int( $precision ) ) {
-   throw new IllegalValueException( 'Can only construct 
GlobeCoordinateValue with a numeric precision' );
+   if ( !is_null( $precision )  !is_float( $precision )  
!is_int( $precision ) ) {
+   throw new IllegalValueException( 'Can only construct 
GlobeCoordinateValue with a numeric precision or null' );
}
}
 
diff --git a/DataValuesCommon/tests/DataValues/GlobeCoordinateValueTest.php 
b/DataValuesCommon/tests/DataValues/GlobeCoordinateValueTest.php
index c6d224e..a33304c 100644
--- a/DataValuesCommon/tests/DataValues/GlobeCoordinateValueTest.php
+++ b/DataValuesCommon/tests/DataValues/GlobeCoordinateValueTest.php
@@ -48,6 +48,7 @@
$argLists[] = array( new LatLongValue( 4.2, 4.2 ), 1, 
'terminus' );
$argLists[] = array( new LatLongValue( 4.2, 4.2 ), 1, Schar's 
World );
$argLists[] = array( new LatLongValue( 4.2, 4.2 ), 1, 
'coruscant' );
+   $argLists[] = array( new LatLongValue( 4.2, 4.2 ), null );
 
return $argLists;
}
@@ -55,7 +56,6 @@
public function invalidConstructorArgumentsProvider() {
$argLists = array();
 
-   $argLists[] = array( new LatLongValue( 4.2, 4.2 ), null );
$argLists[] = array( new LatLongValue( 4.2, 4.2 ), 'foo' );
$argLists[] = array( new LatLongValue( 4.2, 4.2 ), true );
$argLists[] = array( new LatLongValue( 4.2, 4.2 ), array( 1 ) );
@@ -102,7 +102,7 @@
public function testGetPrecision( GlobeCoordinateValue $geoCoord, array 
$arguments ) {
$actual = $geoCoord-getPrecision();
 
-   $this-assertTrue( is_float( $actual ) || is_int( $actual ), 
'Precision is int or float' );
+   $this-assertTrue( is_float( $actual ) || is_int( $actual ) || 
is_null( $actual ), 'Precision is int or float or null' );
$this-assertEquals( $arguments[1], $actual );
}
 

-- 
To view, visit https://gerrit.wikimedia.org/r/83991
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Iad6574d64a48311fae55288783744ae3ec8f9f1e
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/DataValues
Gerrit-Branch: mw1.22-wmf16
Gerrit-Owner: Aude aude.w...@gmail.com

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] Fix message dependencies for jquery.wikibase.snaklistview - change (mediawiki...Wikibase)

2013-09-12 Thread Henning Snater (Code Review)
Henning Snater has submitted this change and it was merged.

Change subject: Fix message dependencies for jquery.wikibase.snaklistview
..


Fix message dependencies for jquery.wikibase.snaklistview

Change-Id: I08f7f7a8ddfaaa46ee79f33bd830f9582a0b468f
---
M lib/resources/Resources.php
1 file changed, 1 insertion(+), 0 deletions(-)

Approvals:
  Henning Snater: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/lib/resources/Resources.php b/lib/resources/Resources.php
index a2394ee..30755ec 100644
--- a/lib/resources/Resources.php
+++ b/lib/resources/Resources.php
@@ -510,6 +510,7 @@
),
'messages' = array(
'wikibase-claimview-snak-tooltip',
+   'wikibase-claimview-snak-new-tooltip',
)
),
 

-- 
To view, visit https://gerrit.wikimedia.org/r/83835
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I08f7f7a8ddfaaa46ee79f33bd830f9582a0b468f
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/Wikibase
Gerrit-Branch: master
Gerrit-Owner: Hoo man h...@online.de
Gerrit-Reviewer: Addshore addshorew...@gmail.com
Gerrit-Reviewer: Aude aude.w...@gmail.com
Gerrit-Reviewer: Henning Snater henning.sna...@wikimedia.de
Gerrit-Reviewer: jenkins-bot

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] Fix English gender-unknown message - change (mediawiki/core)

2013-09-12 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Fix English gender-unknown message
..


Fix English gender-unknown message

Fix for I81f02f03: the verb detail means to give details, i.e. to
say more than a single word in response to a question. It does not make
sense in this context.

Bug: 53311
Change-Id: Ifddf5c9a07dc62bc22dd0a3d2986e41a55b8ef33
---
M languages/messages/MessagesEn.php
1 file changed, 1 insertion(+), 1 deletion(-)

Approvals:
  Bartosz Dziewoński: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/languages/messages/MessagesEn.php 
b/languages/messages/MessagesEn.php
index a63d1f8..9e7d4c2 100644
--- a/languages/messages/MessagesEn.php
+++ b/languages/messages/MessagesEn.php
@@ -1979,7 +1979,7 @@
 'badsiglength'  = 'Your signature is too long.
 It must not be more than $1 {{PLURAL:$1|character|characters}} long.',
 'yourgender'= 'How do you prefer to be described?',
-'gender-unknown'= 'I prefer not to detail',
+'gender-unknown'= 'I prefer not to say',
 'gender-male'   = 'He edits wiki pages',
 'gender-female' = 'She edits wiki pages',
 'prefs-help-gender' = 'Setting this preference is optional.

-- 
To view, visit https://gerrit.wikimedia.org/r/83978
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: Ifddf5c9a07dc62bc22dd0a3d2986e41a55b8ef33
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Tim Starling tstarl...@wikimedia.org
Gerrit-Reviewer: Amire80 amir.ahar...@mail.huji.ac.il
Gerrit-Reviewer: Bartosz Dziewoński matma@gmail.com
Gerrit-Reviewer: Nemo bis federicol...@tiscali.it
Gerrit-Reviewer: Nikerabbit niklas.laxst...@gmail.com
Gerrit-Reviewer: jenkins-bot

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] Remove all references to TemplateInfo - change (mediawiki...TemplateData)

2013-09-12 Thread Code Review
Bartosz Dziewoński has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/83992


Change subject: Remove all references to TemplateInfo
..

Remove all references to TemplateInfo

Change-Id: I5ffc8f75140a2c372fc1c64509b13a534fe07479
---
M TemplateData.hooks.php
M TemplateData.php
M TemplateDataBlob.php
M tests/TemplateDataBlobTest.php
4 files changed, 7 insertions(+), 7 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/TemplateData 
refs/changes/92/83992/1

diff --git a/TemplateData.hooks.php b/TemplateData.hooks.php
index ccfc87b..621f8a3 100644
--- a/TemplateData.hooks.php
+++ b/TemplateData.hooks.php
@@ -1,6 +1,6 @@
 ?php
 /**
- * Hooks for TemplateInfo extension
+ * Hooks for TemplateData extension
  *
  * @file
  * @ingroup Extensions
diff --git a/TemplateData.php b/TemplateData.php
index 0dec3b1..95e442a 100644
--- a/TemplateData.php
+++ b/TemplateData.php
@@ -1,13 +1,13 @@
 ?php
 /**
- * TemplateInfo extension.
+ * TemplateData extension.
  *
  * @file
  * @ingroup Extensions
  */
 
 if ( version_compare( $wgVersion, '1.20', '' ) ) {
-   echo Extension:TemplateInfo requires MediaWiki 1.20 or higher.\n;
+   echo Extension:TemplateData requires MediaWiki 1.20 or higher.\n;
exit( 1 );
 }
 
diff --git a/TemplateDataBlob.php b/TemplateDataBlob.php
index d41b4dd..d86182f 100644
--- a/TemplateDataBlob.php
+++ b/TemplateDataBlob.php
@@ -21,7 +21,7 @@
private $data;
 
/**
-* @var Status: Cache of TemplateInfo::validate
+* @var Status: Cache of TemplateDataBlob::parse
 */
private $status;
 
@@ -50,7 +50,7 @@
 * Parse and validate passed JSON (possibly gzip-compressed) and create 
a TemplateDataBlob object.
 *
 * @param string $json
-* @return TemplateInfo
+* @return TemplateDataBlob
 */
public static function newFromDatabase( $json ) {
// Handle GZIP compression. \037\213 is the header for GZIP 
files.
diff --git a/tests/TemplateDataBlobTest.php b/tests/TemplateDataBlobTest.php
index 37b371f..e652e85 100644
--- a/tests/TemplateDataBlobTest.php
+++ b/tests/TemplateDataBlobTest.php
@@ -394,7 +394,7 @@
// Compress JSON to trigger the code pass in newFromDatabase 
that ends
// up calling gzdecode().
$gzJson = gzencode( '{}' );
-   $templateInfo = TemplateDataBlob::newFromDatabase( $gzJson );
-   $this-assertInstanceOf( 'TemplateDataBlob', $templateInfo );
+   $templateData = TemplateDataBlob::newFromDatabase( $gzJson );
+   $this-assertInstanceOf( 'TemplateDataBlob', $templateData );
}
 }

-- 
To view, visit https://gerrit.wikimedia.org/r/83992
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I5ffc8f75140a2c372fc1c64509b13a534fe07479
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/TemplateData
Gerrit-Branch: master
Gerrit-Owner: Bartosz Dziewoński matma@gmail.com

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] Clarify unknown gender option is a non-answer and resort - change (mediawiki/core)

2013-09-12 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Clarify unknown gender option is a non-answer and resort
..


Clarify unknown gender option is a non-answer and resort

It is easier in other languages, but in English some worry
about I prefer not to detail not being an answer to the
question used as label of the option; parentheses should
be enough to clarify it is about not answering the question
because you don't care.

Also put such (default) zero answer first and move feminine
before male as suggested by Jared to avoid any appearance of
bias in the user interface, though the fallback works that way
in the code anyway for merely grammatical reasons.

Bug: 53311
Bug: 53834
Change-Id: Iea77e903c91063a648fff5e4be41c0be51ac172a
---
M includes/Preferences.php
1 file changed, 4 insertions(+), 2 deletions(-)

Approvals:
  Bartosz Dziewoński: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/includes/Preferences.php b/includes/Preferences.php
index 29d6e07..bf3e037 100644
--- a/includes/Preferences.php
+++ b/includes/Preferences.php
@@ -335,9 +335,11 @@
'type' = 'radio',
'section' = 'personal/i18n',
'options' = array(
-   $context-msg( 'gender-male' )-text() = 
'male',
+   $context-msg( 'parentheses',
+   $context-msg( 'gender-unknown' 
)-text()
+   )-text() = 'unknown',
$context-msg( 'gender-female' )-text() = 
'female',
-   $context-msg( 'gender-unknown' )-text() = 
'unknown',
+   $context-msg( 'gender-male' )-text() = 
'male',
),
'label-message' = 'yourgender',
'help-message' = 'prefs-help-gender',

-- 
To view, visit https://gerrit.wikimedia.org/r/83083
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: Iea77e903c91063a648fff5e4be41c0be51ac172a
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Nemo bis federicol...@tiscali.it
Gerrit-Reviewer: Amire80 amir.ahar...@mail.huji.ac.il
Gerrit-Reviewer: Bartosz Dziewoński matma@gmail.com
Gerrit-Reviewer: MZMcBride w...@mzmcbride.com
Gerrit-Reviewer: Nemo bis federicol...@tiscali.it
Gerrit-Reviewer: Nikerabbit niklas.laxst...@gmail.com
Gerrit-Reviewer: jenkins-bot

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] Removed ChangeVisitor: it is not used anywhere - change (operations...incremental)

2013-09-12 Thread Petr Onderka (Code Review)
Petr Onderka has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/83993


Change subject: Removed ChangeVisitor: it is not used anywhere
..

Removed ChangeVisitor: it is not used anywhere

Change-Id: Ibeecdfe8f9f0768599c7df67367eebd7c82b1fd5
---
M Diff/ChangeProcessor.h
D Diff/ChangeVisitor.h
M Diff/Changes/Change.h
M Diff/Changes/DeleteRevisionChange.cpp
M Diff/Changes/DeleteRevisionChange.h
M Diff/Changes/FullDeletePageChange.cpp
M Diff/Changes/FullDeletePageChange.h
M Diff/Changes/NewModelFormatChange.cpp
M Diff/Changes/NewModelFormatChange.h
M Diff/Changes/NewPageChange.cpp
M Diff/Changes/NewPageChange.h
M Diff/Changes/NewRevisionChange.cpp
M Diff/Changes/NewRevisionChange.h
M Diff/Changes/PageChange.cpp
M Diff/Changes/PageChange.h
M Diff/Changes/PartialDeletePageChange.cpp
M Diff/Changes/PartialDeletePageChange.h
M Diff/Changes/RevisionChange.cpp
M Diff/Changes/RevisionChange.h
M Diff/Changes/SiteInfoChange.cpp
M Diff/Changes/SiteInfoChange.h
M Incremental dumps.vcxproj
22 files changed, 10 insertions(+), 103 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/dumps/incremental 
refs/changes/93/83993/1

diff --git a/Diff/ChangeProcessor.h b/Diff/ChangeProcessor.h
index 8628efd..0d6104a 100644
--- a/Diff/ChangeProcessor.h
+++ b/Diff/ChangeProcessor.h
@@ -1,7 +1,16 @@
 #pragma once
 
-#include ChangeVisitor.h
 #include Changes/Change.h
+#include Changes/SiteInfoChange.h
+#include Changes/NewPageChange.h
+#include Changes/PageChange.h
+#include Changes/NewModelFormatChange.h
+#include Changes/NewRevisionChange.h
+#include Changes/RevisionChange.h
+#include Changes/DeleteRevisionChange.h
+#include Changes/FullDeletePageChange.h
+#include Changes/PartialDeletePageChange.h
+#include Changes/DiffTextGroup.h
 #include ../DumpObjects/DumpPage.h
 
 class ChangeProcessor
diff --git a/Diff/ChangeVisitor.h b/Diff/ChangeVisitor.h
deleted file mode 100644
index 26ea54a..000
--- a/Diff/ChangeVisitor.h
+++ /dev/null
@@ -1,25 +0,0 @@
-#pragma once
-
-#include Changes/SiteInfoChange.h
-#include Changes/NewPageChange.h
-#include Changes/PageChange.h
-#include Changes/NewModelFormatChange.h
-#include Changes/NewRevisionChange.h
-#include Changes/RevisionChange.h
-#include Changes/DeleteRevisionChange.h
-#include Changes/FullDeletePageChange.h
-#include Changes/PartialDeletePageChange.h
-
-class ChangeVisitor
-{
-public:
-virtual void Visit(SiteInfoChange change) = 0;
-virtual void Visit(NewPageChange change) = 0;
-virtual void Visit(PageChange change) = 0;
-virtual void Visit(NewModelFormatChange change) = 0;
-virtual void Visit(NewRevisionChange change) = 0;
-virtual void Visit(RevisionChange change) = 0;
-virtual void Visit(DeleteRevisionChange change) = 0;
-virtual void Visit(FullDeletePageChange change) = 0;
-virtual void Visit(PartialDeletePageChange change) = 0;
-};
\ No newline at end of file
diff --git a/Diff/Changes/Change.h b/Diff/Changes/Change.h
index ef56629..f384efa 100644
--- a/Diff/Changes/Change.h
+++ b/Diff/Changes/Change.h
@@ -2,8 +2,6 @@
 
 #include ../../DumpObjects/DumpObject.h
 
-class ChangeVisitor;
-
 enum class ChangeKind : std::uint8_t
 {
 SiteInfo  = 0x01,
@@ -24,8 +22,6 @@
 {
 public:
 void Write(std::ostream *stream);
-
-virtual void Accept(ChangeVisitor visitor) = 0;
 
 virtual ~Change() {}
 };
\ No newline at end of file
diff --git a/Diff/Changes/DeleteRevisionChange.cpp 
b/Diff/Changes/DeleteRevisionChange.cpp
index 27eeda1..69aaf68 100644
--- a/Diff/Changes/DeleteRevisionChange.cpp
+++ b/Diff/Changes/DeleteRevisionChange.cpp
@@ -1,5 +1,4 @@
 #include DeleteRevisionChange.h
-#include ../ChangeVisitor.h
 
 DeleteRevisionChange DeleteRevisionChange::Read(std::istream stream)
 {
@@ -18,9 +17,4 @@
 std::uint32_t DeleteRevisionChange::NewLength()
 {
 return ValueSize(ChangeKind::DeleteRevision) + ValueSize(revisionId);
-}
-
-void DeleteRevisionChange::Accept(ChangeVisitor visitor)
-{
-visitor.Visit(*this);
 }
\ No newline at end of file
diff --git a/Diff/Changes/DeleteRevisionChange.h 
b/Diff/Changes/DeleteRevisionChange.h
index 2d871aa..075808a 100644
--- a/Diff/Changes/DeleteRevisionChange.h
+++ b/Diff/Changes/DeleteRevisionChange.h
@@ -14,6 +14,4 @@
 static DeleteRevisionChange Read(std::istream stream);
 virtual void WriteInternal() override;
 virtual std::uint32_t NewLength() override;
-
-virtual void Accept(ChangeVisitor visitor) override;
 };
\ No newline at end of file
diff --git a/Diff/Changes/FullDeletePageChange.cpp 
b/Diff/Changes/FullDeletePageChange.cpp
index a23d918..f0bcb47 100644
--- a/Diff/Changes/FullDeletePageChange.cpp
+++ b/Diff/Changes/FullDeletePageChange.cpp
@@ -1,5 +1,4 @@
 #include FullDeletePageChange.h
-#include ../ChangeVisitor.h
 
 FullDeletePageChange FullDeletePageChange::Read(std::istream stream)
 {
@@ -18,9 +17,4 @@
 std::uint32_t FullDeletePageChange::NewLength()
 {
   

[MediaWiki-commits] [Gerrit] Group compression of diff dumps - change (operations...incremental)

2013-09-12 Thread Petr Onderka (Code Review)
Petr Onderka has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/83994


Change subject: Group compression of diff dumps
..

Group compression of diff dumps

Change-Id: I2d357218056f9324afa21d586c4b40d935b84830
---
M CMakeLists.txt
M Diff/ChangeProcessor.cpp
M Diff/ChangeProcessor.h
M Diff/Changes/Change.h
M Diff/Changes/NewRevisionChange.cpp
M Diff/Changes/NewRevisionChange.h
M Diff/Changes/RevisionChange.cpp
M Diff/Changes/RevisionChange.h
M Diff/DiffReader.cpp
M Diff/DiffWriter.cpp
M Diff/DiffWriter.h
M Dump.cpp
M Dump.h
M DumpObjects/DumpRevision.cpp
M DumpObjects/DumpRevision.h
M DumpObjects/TextGroup.cpp
M DumpObjects/TextGroup.h
M DumpWriters/CompositeWriter.cpp
M DumpWriters/CompositeWriter.h
M DumpWriters/DumpWriter.cpp
M DumpWriters/DumpWriter.h
M DumpWriters/IDumpWriter.h
M DumpWriters/WriterWrapper.cpp
M DumpWriters/WriterWrapper.h
M Incremental dumps.vcxproj
M TODO.txt
M TextGroupsManager.cpp
M TextGroupsManager.h
M main.cpp
29 files changed, 186 insertions(+), 115 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/dumps/incremental 
refs/changes/94/83994/1

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 578ffdf..0ebbb37 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -11,6 +11,7 @@
   Diff/Changes/FullDeletePageChange.cpp
   Diff/Changes/PartialDeletePageChange.cpp
   Diff/Changes/DeleteRevisionChange.cpp
+  Diff/Changes/DiffTextGroup.cpp
   Diff/Changes/NewModelFormatChange.cpp
   Diff/Changes/NewPageChange.cpp
   Diff/Changes/NewRevisionChange.cpp
@@ -75,6 +76,7 @@
   Diff/Changes/FullDeletePageChange.h
   Diff/Changes/PartialDeletePageChange.h
   Diff/Changes/DeleteRevisionChange.h
+  Diff/Changes/DiffTextGroup.h
   Diff/Changes/NewModelFormatChange.h
   Diff/Changes/NewPageChange.h
   Diff/Changes/NewRevisionChange.h
diff --git a/Diff/ChangeProcessor.cpp b/Diff/ChangeProcessor.cpp
index 9640cd0..b3f2d7c 100644
--- a/Diff/ChangeProcessor.cpp
+++ b/Diff/ChangeProcessor.cpp
@@ -1,5 +1,6 @@
 #include ChangeProcessor.h
 #include ../Dump.h
+#include ../TextGroupsManager.h
 #include ../DumpObjects/DumpRevision.h
 #include ../Indexes/Index.h
 
@@ -14,7 +15,7 @@
 }
 
 ChangeProcessor::ChangeProcessor(std::shared_ptrWritableDump dump)
-: dump(dump)
+: dump(dump), currentTextGroupId(0)
 {}
 
 void ChangeProcessor::Process(SiteInfoChange change)
@@ -67,6 +68,7 @@
 DumpRevision dumpRevision(dump, change.revision.RevisionId);
 dumpRevision.revision = change.revision;
 dumpRevision.SetModelFormatId(change.modelFormatId);
+dumpRevision.SetTextGroup(currentTextGroupId, change.textId);
 dumpRevision.Write();
 
 currentPage-page.RevisionIds.insert(change.revision.RevisionId);
@@ -99,7 +101,7 @@
 revision.Sha1 = revisionChanges.Sha1;
 
 if (IsPages(dump-fileHeader.Kind))
-revision.SetText(revisionChanges.GetText());
+dumpRevision.SetTextGroup(currentTextGroupId, change.textId);
 else
 revision.TextLength = revisionChanges.TextLength;
 }
@@ -132,9 +134,14 @@
 dump-DeletePagePartial(change.pageId);
 }
 
-void ChangeProcessor::End()
+void ChangeProcessor::Process(DiffTextGroup change)
+{
+currentTextGroupId = 
dump-textGroupsManager-ImportTextGroup(change.compressedTexts);
+}
+
+void ChangeProcessor::Complete()
 {
 WritePage();
 
-dump-Complete();
+dump-Complete(nullptr);
 }
\ No newline at end of file
diff --git a/Diff/ChangeProcessor.h b/Diff/ChangeProcessor.h
index 0d6104a..3691415 100644
--- a/Diff/ChangeProcessor.h
+++ b/Diff/ChangeProcessor.h
@@ -19,6 +19,7 @@
 std::shared_ptrWritableDump dump;
 
 std::unique_ptrDumpPage currentPage;
+std::uint32_t currentTextGroupId;
 
 void WritePage();
 public:
@@ -33,7 +34,8 @@
 void Process(DeleteRevisionChange change);
 void Process(FullDeletePageChange change);
 void Process(PartialDeletePageChange change);
+void Process(DiffTextGroup change);
 
 // has to be called after processing is complete
-void End();
+void Complete();
 };
diff --git a/Diff/Changes/Change.h b/Diff/Changes/Change.h
index f384efa..b7bd2c2 100644
--- a/Diff/Changes/Change.h
+++ b/Diff/Changes/Change.h
@@ -15,7 +15,9 @@
 ChangeRevision= 0x21,
 DeleteRevision= 0x22,
 
-NewModelFormat= 0x30
+NewModelFormat= 0x30,
+
+TextGroup = 0x40
 };
 
 class Change : public DumpObjectBase
diff --git a/Diff/Changes/NewRevisionChange.cpp 
b/Diff/Changes/NewRevisionChange.cpp
index ccc9758..8205edc 100644
--- a/Diff/Changes/NewRevisionChange.cpp
+++ b/Diff/Changes/NewRevisionChange.cpp
@@ -1,28 +1,18 @@
 #include NewRevisionChange.h
 #include ../../DumpObjects/DumpRevision.h
-#include ../../SevenZip.h
-
-void NewRevisionChange::EnsureCompressed()
-{
-if (compressedTextSet)
-return;
-
-compressedText = SevenZip::Compress(revision.GetText());
-compressedTextSet = true;
-}
 
 

[MediaWiki-commits] [Gerrit] Add TitleMove hook - change (mediawiki/core)

2013-09-12 Thread J (Code Review)
J has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/83995


Change subject: Add TitleMove hook
..

Add TitleMove hook

some things need access to the old file before its moved,
adding hook to allow extensions to do something before
file is moved.

Change-Id: Ic5e659abc79c41e3331d42074e7f21eec9b9ba7c
---
M HISTORY
M docs/hooks.txt
M includes/Title.php
3 files changed, 8 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/95/83995/1

diff --git a/HISTORY b/HISTORY
index 45eab2e..8cb4539 100644
--- a/HISTORY
+++ b/HISTORY
@@ -122,6 +122,7 @@
   correctly.
 * (bug 45803) Whitespace within == Headline == syntax and within hN headings
   is now non-significant and not preserved in the HTML output.
+* Add TitleMove hook before page renames
 
 === Bug fixes in 1.21 ===
 * (bug 40353) SpecialDoubleRedirect should support interwiki redirects.
diff --git a/docs/hooks.txt b/docs/hooks.txt
index 02413b3..5d6a6e4 100644
--- a/docs/hooks.txt
+++ b/docs/hooks.txt
@@ -2419,6 +2419,11 @@
   Hooks may change this value to override the return value of
   Title::isWikitextPage()
 
+'TitleMove': Before moving an article (title).
+$old: old title
+$nt: new title
+$user: user who does the move
+
 'TitleMoveComplete': After moving an article (title).
 $old: old title
 $nt: new title
diff --git a/includes/Title.php b/includes/Title.php
index 734e009..0a91884 100644
--- a/includes/Title.php
+++ b/includes/Title.php
@@ -3620,6 +3620,8 @@
$createRedirect = true;
}
 
+   wfRunHooks( 'TitleMove', array( $this, $nt, $wgUser ) );
+
// If it is a file, move it first.
// It is done before all other moving stuff is done because 
it's hard to revert.
$dbw = wfGetDB( DB_MASTER );

-- 
To view, visit https://gerrit.wikimedia.org/r/83995
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ic5e659abc79c41e3331d42074e7f21eec9b9ba7c
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: J jger...@wikimedia.org

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] Removed ChangeVisitor: it is not used anywhere - change (operations...incremental)

2013-09-12 Thread Petr Onderka (Code Review)
Petr Onderka has submitted this change and it was merged.

Change subject: Removed ChangeVisitor: it is not used anywhere
..


Removed ChangeVisitor: it is not used anywhere

Change-Id: Ibeecdfe8f9f0768599c7df67367eebd7c82b1fd5
---
M Diff/ChangeProcessor.h
D Diff/ChangeVisitor.h
M Diff/Changes/Change.h
M Diff/Changes/DeleteRevisionChange.cpp
M Diff/Changes/DeleteRevisionChange.h
M Diff/Changes/FullDeletePageChange.cpp
M Diff/Changes/FullDeletePageChange.h
M Diff/Changes/NewModelFormatChange.cpp
M Diff/Changes/NewModelFormatChange.h
M Diff/Changes/NewPageChange.cpp
M Diff/Changes/NewPageChange.h
M Diff/Changes/NewRevisionChange.cpp
M Diff/Changes/NewRevisionChange.h
M Diff/Changes/PageChange.cpp
M Diff/Changes/PageChange.h
M Diff/Changes/PartialDeletePageChange.cpp
M Diff/Changes/PartialDeletePageChange.h
M Diff/Changes/RevisionChange.cpp
M Diff/Changes/RevisionChange.h
M Diff/Changes/SiteInfoChange.cpp
M Diff/Changes/SiteInfoChange.h
M Incremental dumps.vcxproj
22 files changed, 10 insertions(+), 103 deletions(-)

Approvals:
  Petr Onderka: Verified; Looks good to me, approved



diff --git a/Diff/ChangeProcessor.h b/Diff/ChangeProcessor.h
index 8628efd..0d6104a 100644
--- a/Diff/ChangeProcessor.h
+++ b/Diff/ChangeProcessor.h
@@ -1,7 +1,16 @@
 #pragma once
 
-#include ChangeVisitor.h
 #include Changes/Change.h
+#include Changes/SiteInfoChange.h
+#include Changes/NewPageChange.h
+#include Changes/PageChange.h
+#include Changes/NewModelFormatChange.h
+#include Changes/NewRevisionChange.h
+#include Changes/RevisionChange.h
+#include Changes/DeleteRevisionChange.h
+#include Changes/FullDeletePageChange.h
+#include Changes/PartialDeletePageChange.h
+#include Changes/DiffTextGroup.h
 #include ../DumpObjects/DumpPage.h
 
 class ChangeProcessor
diff --git a/Diff/ChangeVisitor.h b/Diff/ChangeVisitor.h
deleted file mode 100644
index 26ea54a..000
--- a/Diff/ChangeVisitor.h
+++ /dev/null
@@ -1,25 +0,0 @@
-#pragma once
-
-#include Changes/SiteInfoChange.h
-#include Changes/NewPageChange.h
-#include Changes/PageChange.h
-#include Changes/NewModelFormatChange.h
-#include Changes/NewRevisionChange.h
-#include Changes/RevisionChange.h
-#include Changes/DeleteRevisionChange.h
-#include Changes/FullDeletePageChange.h
-#include Changes/PartialDeletePageChange.h
-
-class ChangeVisitor
-{
-public:
-virtual void Visit(SiteInfoChange change) = 0;
-virtual void Visit(NewPageChange change) = 0;
-virtual void Visit(PageChange change) = 0;
-virtual void Visit(NewModelFormatChange change) = 0;
-virtual void Visit(NewRevisionChange change) = 0;
-virtual void Visit(RevisionChange change) = 0;
-virtual void Visit(DeleteRevisionChange change) = 0;
-virtual void Visit(FullDeletePageChange change) = 0;
-virtual void Visit(PartialDeletePageChange change) = 0;
-};
\ No newline at end of file
diff --git a/Diff/Changes/Change.h b/Diff/Changes/Change.h
index ef56629..f384efa 100644
--- a/Diff/Changes/Change.h
+++ b/Diff/Changes/Change.h
@@ -2,8 +2,6 @@
 
 #include ../../DumpObjects/DumpObject.h
 
-class ChangeVisitor;
-
 enum class ChangeKind : std::uint8_t
 {
 SiteInfo  = 0x01,
@@ -24,8 +22,6 @@
 {
 public:
 void Write(std::ostream *stream);
-
-virtual void Accept(ChangeVisitor visitor) = 0;
 
 virtual ~Change() {}
 };
\ No newline at end of file
diff --git a/Diff/Changes/DeleteRevisionChange.cpp 
b/Diff/Changes/DeleteRevisionChange.cpp
index 27eeda1..69aaf68 100644
--- a/Diff/Changes/DeleteRevisionChange.cpp
+++ b/Diff/Changes/DeleteRevisionChange.cpp
@@ -1,5 +1,4 @@
 #include DeleteRevisionChange.h
-#include ../ChangeVisitor.h
 
 DeleteRevisionChange DeleteRevisionChange::Read(std::istream stream)
 {
@@ -18,9 +17,4 @@
 std::uint32_t DeleteRevisionChange::NewLength()
 {
 return ValueSize(ChangeKind::DeleteRevision) + ValueSize(revisionId);
-}
-
-void DeleteRevisionChange::Accept(ChangeVisitor visitor)
-{
-visitor.Visit(*this);
 }
\ No newline at end of file
diff --git a/Diff/Changes/DeleteRevisionChange.h 
b/Diff/Changes/DeleteRevisionChange.h
index 2d871aa..075808a 100644
--- a/Diff/Changes/DeleteRevisionChange.h
+++ b/Diff/Changes/DeleteRevisionChange.h
@@ -14,6 +14,4 @@
 static DeleteRevisionChange Read(std::istream stream);
 virtual void WriteInternal() override;
 virtual std::uint32_t NewLength() override;
-
-virtual void Accept(ChangeVisitor visitor) override;
 };
\ No newline at end of file
diff --git a/Diff/Changes/FullDeletePageChange.cpp 
b/Diff/Changes/FullDeletePageChange.cpp
index a23d918..f0bcb47 100644
--- a/Diff/Changes/FullDeletePageChange.cpp
+++ b/Diff/Changes/FullDeletePageChange.cpp
@@ -1,5 +1,4 @@
 #include FullDeletePageChange.h
-#include ../ChangeVisitor.h
 
 FullDeletePageChange FullDeletePageChange::Read(std::istream stream)
 {
@@ -18,9 +17,4 @@
 std::uint32_t FullDeletePageChange::NewLength()
 {
 return ValueSize(ChangeKind::DeletePageFull) + 

[MediaWiki-commits] [Gerrit] Group compression of diff dumps - change (operations...incremental)

2013-09-12 Thread Petr Onderka (Code Review)
Petr Onderka has submitted this change and it was merged.

Change subject: Group compression of diff dumps
..


Group compression of diff dumps

Change-Id: I2d357218056f9324afa21d586c4b40d935b84830
---
M CMakeLists.txt
M Diff/ChangeProcessor.cpp
M Diff/ChangeProcessor.h
M Diff/Changes/Change.h
A Diff/Changes/DiffTextGroup.cpp
A Diff/Changes/DiffTextGroup.h
M Diff/Changes/NewRevisionChange.cpp
M Diff/Changes/NewRevisionChange.h
M Diff/Changes/RevisionChange.cpp
M Diff/Changes/RevisionChange.h
M Diff/DiffReader.cpp
M Diff/DiffWriter.cpp
M Diff/DiffWriter.h
M Dump.cpp
M Dump.h
M DumpObjects/DumpRevision.cpp
M DumpObjects/DumpRevision.h
M DumpObjects/TextGroup.cpp
M DumpObjects/TextGroup.h
M DumpWriters/CompositeWriter.cpp
M DumpWriters/CompositeWriter.h
M DumpWriters/DumpWriter.cpp
M DumpWriters/DumpWriter.h
M DumpWriters/IDumpWriter.h
M DumpWriters/WriterWrapper.cpp
M DumpWriters/WriterWrapper.h
M Incremental dumps.vcxproj
M TODO.txt
M TextGroupsManager.cpp
M TextGroupsManager.h
M main.cpp
31 files changed, 226 insertions(+), 116 deletions(-)

Approvals:
  Petr Onderka: Verified; Looks good to me, approved



diff --git a/CMakeLists.txt b/CMakeLists.txt
index 578ffdf..0ebbb37 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -11,6 +11,7 @@
   Diff/Changes/FullDeletePageChange.cpp
   Diff/Changes/PartialDeletePageChange.cpp
   Diff/Changes/DeleteRevisionChange.cpp
+  Diff/Changes/DiffTextGroup.cpp
   Diff/Changes/NewModelFormatChange.cpp
   Diff/Changes/NewPageChange.cpp
   Diff/Changes/NewRevisionChange.cpp
@@ -75,6 +76,7 @@
   Diff/Changes/FullDeletePageChange.h
   Diff/Changes/PartialDeletePageChange.h
   Diff/Changes/DeleteRevisionChange.h
+  Diff/Changes/DiffTextGroup.h
   Diff/Changes/NewModelFormatChange.h
   Diff/Changes/NewPageChange.h
   Diff/Changes/NewRevisionChange.h
diff --git a/Diff/ChangeProcessor.cpp b/Diff/ChangeProcessor.cpp
index 9640cd0..b3f2d7c 100644
--- a/Diff/ChangeProcessor.cpp
+++ b/Diff/ChangeProcessor.cpp
@@ -1,5 +1,6 @@
 #include ChangeProcessor.h
 #include ../Dump.h
+#include ../TextGroupsManager.h
 #include ../DumpObjects/DumpRevision.h
 #include ../Indexes/Index.h
 
@@ -14,7 +15,7 @@
 }
 
 ChangeProcessor::ChangeProcessor(std::shared_ptrWritableDump dump)
-: dump(dump)
+: dump(dump), currentTextGroupId(0)
 {}
 
 void ChangeProcessor::Process(SiteInfoChange change)
@@ -67,6 +68,7 @@
 DumpRevision dumpRevision(dump, change.revision.RevisionId);
 dumpRevision.revision = change.revision;
 dumpRevision.SetModelFormatId(change.modelFormatId);
+dumpRevision.SetTextGroup(currentTextGroupId, change.textId);
 dumpRevision.Write();
 
 currentPage-page.RevisionIds.insert(change.revision.RevisionId);
@@ -99,7 +101,7 @@
 revision.Sha1 = revisionChanges.Sha1;
 
 if (IsPages(dump-fileHeader.Kind))
-revision.SetText(revisionChanges.GetText());
+dumpRevision.SetTextGroup(currentTextGroupId, change.textId);
 else
 revision.TextLength = revisionChanges.TextLength;
 }
@@ -132,9 +134,14 @@
 dump-DeletePagePartial(change.pageId);
 }
 
-void ChangeProcessor::End()
+void ChangeProcessor::Process(DiffTextGroup change)
+{
+currentTextGroupId = 
dump-textGroupsManager-ImportTextGroup(change.compressedTexts);
+}
+
+void ChangeProcessor::Complete()
 {
 WritePage();
 
-dump-Complete();
+dump-Complete(nullptr);
 }
\ No newline at end of file
diff --git a/Diff/ChangeProcessor.h b/Diff/ChangeProcessor.h
index 0d6104a..3691415 100644
--- a/Diff/ChangeProcessor.h
+++ b/Diff/ChangeProcessor.h
@@ -19,6 +19,7 @@
 std::shared_ptrWritableDump dump;
 
 std::unique_ptrDumpPage currentPage;
+std::uint32_t currentTextGroupId;
 
 void WritePage();
 public:
@@ -33,7 +34,8 @@
 void Process(DeleteRevisionChange change);
 void Process(FullDeletePageChange change);
 void Process(PartialDeletePageChange change);
+void Process(DiffTextGroup change);
 
 // has to be called after processing is complete
-void End();
+void Complete();
 };
diff --git a/Diff/Changes/Change.h b/Diff/Changes/Change.h
index f384efa..b7bd2c2 100644
--- a/Diff/Changes/Change.h
+++ b/Diff/Changes/Change.h
@@ -15,7 +15,9 @@
 ChangeRevision= 0x21,
 DeleteRevision= 0x22,
 
-NewModelFormat= 0x30
+NewModelFormat= 0x30,
+
+TextGroup = 0x40
 };
 
 class Change : public DumpObjectBase
diff --git a/Diff/Changes/DiffTextGroup.cpp b/Diff/Changes/DiffTextGroup.cpp
new file mode 100644
index 000..b70d0cb
--- /dev/null
+++ b/Diff/Changes/DiffTextGroup.cpp
@@ -0,0 +1,24 @@
+#include DiffTextGroup.h
+
+DiffTextGroup::DiffTextGroup(const std::string compressedTexts)
+: compressedTexts(compressedTexts)
+{}
+
+DiffTextGroup DiffTextGroup::Read(std::istream stream)
+{
+auto texts = DumpTraitsstd::string::ReadLong(stream);
+
+return DiffTextGroup(texts);
+}
+
+std::uint32_t 

[MediaWiki-commits] [Gerrit] Use TitleMove hook to cleanup transcodes before move - change (mediawiki...TimedMediaHandler)

2013-09-12 Thread J (Code Review)
J has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/83996


Change subject: Use TitleMove hook to cleanup transcodes before move
..

Use TitleMove hook to cleanup transcodes before move

use new TitleMove hook added to core in Change-Id: Ic5e659abc

Change-Id: Ie61284b32c770f41495b357f57552694530ee834
---
M TimedMediaHandler.hooks.php
1 file changed, 2 insertions(+), 5 deletions(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/TimedMediaHandler 
refs/changes/96/83996/1

diff --git a/TimedMediaHandler.hooks.php b/TimedMediaHandler.hooks.php
index a681a54..85d6ea1 100644
--- a/TimedMediaHandler.hooks.php
+++ b/TimedMediaHandler.hooks.php
@@ -97,7 +97,7 @@
$wgHooks['UploadComplete'][] = 
'TimedMediaHandlerHooks::checkUploadComplete';
 
// When an image page is moved:
-   $wgHooks['TitleMoveComplete'][] = 
'TimedMediaHandlerHooks::checkTitleMoveComplete';
+   $wgHooks['TitleMove'][] = 
'TimedMediaHandlerHooks::checkTitleMove';
 
// When image page is deleted so that we remove transcode 
settings / files.
$wgHooks['FileDeleteComplete'][] = 
'TimedMediaHandlerHooks::onFileDeleteComplete';
@@ -256,7 +256,6 @@
}
return true;
}
-
/**
 * Handle moved titles
 *
@@ -266,11 +265,9 @@
 * @param $title Title
 * @param $newTitle Title
 * @param $user User
-* @param $oldid int
-* @param $newid int
 * @return bool
 */
-   public static function checkTitleMoveComplete( $title, $newTitle, 
$user, $oldid, $newid ){
+   public static function checkTitleMove( $title, $newTitle, $user ){
if( self::isTranscodableTitle( $title ) ){
// Remove all the transcode files and db states for 
this asset
// ( will be re-added the first time the asset is 
displayed with its new title )

-- 
To view, visit https://gerrit.wikimedia.org/r/83996
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ie61284b32c770f41495b357f57552694530ee834
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/TimedMediaHandler
Gerrit-Branch: master
Gerrit-Owner: J jger...@wikimedia.org

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] WIP: Integration tests for off-screen IME selector. - change (mediawiki...UniversalLanguageSelector)

2013-09-12 Thread KartikMistry (Code Review)
KartikMistry has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/83997


Change subject: WIP: Integration tests for off-screen IME selector.
..

WIP: Integration tests for off-screen IME selector.

Change-Id: I0b3253ba9cb19afae41612435ef0a9604814f3ed
---
M tests/browser/features/step_definitions/common_steps.rb
M tests/browser/features/step_definitions/uls_ime_steps.rb
A tests/browser/features/support/pages/ascii_mono.rb
A tests/browser/features/support/pages/ascii_vector.rb
M tests/browser/features/uls_ime.feature
5 files changed, 64 insertions(+), 0 deletions(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/UniversalLanguageSelector 
refs/changes/97/83997/1

diff --git a/tests/browser/features/step_definitions/common_steps.rb 
b/tests/browser/features/step_definitions/common_steps.rb
index 57b7e1f..1fa46b2 100644
--- a/tests/browser/features/step_definitions/common_steps.rb
+++ b/tests/browser/features/step_definitions/common_steps.rb
@@ -48,6 +48,8 @@
'en'
when 'Finnish'
'fi'
+   when 'Hebrew'
+   'he'
else
pending
end
diff --git a/tests/browser/features/step_definitions/uls_ime_steps.rb 
b/tests/browser/features/step_definitions/uls_ime_steps.rb
index c5603ae..36bdfb7 100644
--- a/tests/browser/features/step_definitions/uls_ime_steps.rb
+++ b/tests/browser/features/step_definitions/uls_ime_steps.rb
@@ -70,3 +70,18 @@
   # 'input_method_enabled' alone only returns []
   on(RandomPage).input_method_enabled_element.text.should == 'ഇൻസ്ക്രിപ്റ്റ് 2'
 end
+
+When(/^I visit page in Vector skin$/) do
+  sleep 1.0;
+  visit(AsciiVector)
+end
+
+When(/^I visit page in Monobook skin$/) do
+  sleep 1.0;
+  visit(AsciiMono)
+end
+
+Then(/^I should see the input method menu is not offscreen$/) do
+  #WIP
+  #Code need to check offset.
+end
diff --git a/tests/browser/features/support/pages/ascii_mono.rb 
b/tests/browser/features/support/pages/ascii_mono.rb
new file mode 100644
index 000..43211c7
--- /dev/null
+++ b/tests/browser/features/support/pages/ascii_mono.rb
@@ -0,0 +1,9 @@
+class AsciiMono
+  include PageObject
+
+  include URL
+  def self.url
+URL.url('ASCII?useskin=monobook')
+  end
+  page_url url
+end
diff --git a/tests/browser/features/support/pages/ascii_vector.rb 
b/tests/browser/features/support/pages/ascii_vector.rb
new file mode 100644
index 000..9eca485
--- /dev/null
+++ b/tests/browser/features/support/pages/ascii_vector.rb
@@ -0,0 +1,9 @@
+class AsciiVector
+  include PageObject
+
+  include URL
+  def self.url
+URL.url('ASCII?useskin=vector')
+  end
+  page_url url
+end
diff --git a/tests/browser/features/uls_ime.feature 
b/tests/browser/features/uls_ime.feature
index 31f8c48..0f3b109 100644
--- a/tests/browser/features/uls_ime.feature
+++ b/tests/browser/features/uls_ime.feature
@@ -49,3 +49,32 @@
   And I press Control-M
 Then I should see the input method indicator
   And in it there must be an element with Malayalam text
+
+  @login @reset-preferences-after
+  Scenario: Input method menu is not offscreen
+
+  Input method indicator is not offscreen for English and RTL languages.
+
+Given I am logged in
+Given I set English as the interface language
+When I visit page in Vector skin
+  And I open the input method menu
+Then I should see the input method menu is not offscreen
+
+Given I am logged in
+Given I set Hebrew as the interface language
+When I visit page in Monobook skin
+  And I open the input method menu
+Then I should see the input method menu is not offscreen
+
+Given I am logged in
+Given I set English as the interface language
+When I visit page in Monobook skin
+  And I open the input method menu
+Then I should see the input method menu is not offscreen
+
+Given I am logged in
+Given I set Hebrew as the interface language
+When I visit page in Vector skin
+  And I open the input method menu
+Then I should see the input method menu is not offscreen

-- 
To view, visit https://gerrit.wikimedia.org/r/83997
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I0b3253ba9cb19afae41612435ef0a9604814f3ed
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/UniversalLanguageSelector
Gerrit-Branch: master
Gerrit-Owner: KartikMistry kartik.mis...@gmail.com

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] Added TableDeletionFailedException - change (mediawiki...WikibaseDatabase)

2013-09-12 Thread Addshore (Code Review)
Addshore has submitted this change and it was merged.

Change subject: Added TableDeletionFailedException
..


Added TableDeletionFailedException

Change-Id: Ia72ec6f5ab7944221ebfc84919567f8069bbb059
---
M src/MediaWiki/MediaWikiTableBuilder.php
M src/Schema/ReportingTableBuilder.php
M src/Schema/TableBuilder.php
A src/Schema/TableDeletionFailedException.php
M tests/phpunit/MediaWiki/MediaWikiTableBuilderTest.php
A tests/phpunit/Schema/TableDeletionFailedExceptionTest.php
6 files changed, 87 insertions(+), 4 deletions(-)

Approvals:
  Addshore: Looks good to me, approved



diff --git a/src/MediaWiki/MediaWikiTableBuilder.php 
b/src/MediaWiki/MediaWikiTableBuilder.php
index b121045..6d6b076 100644
--- a/src/MediaWiki/MediaWikiTableBuilder.php
+++ b/src/MediaWiki/MediaWikiTableBuilder.php
@@ -7,6 +7,7 @@
 use Wikibase\Database\Schema\Definitions\TableDefinition;
 use Wikibase\Database\Schema\TableBuilder;
 use Wikibase\Database\Schema\TableCreationFailedException;
+use Wikibase\Database\Schema\TableDeletionFailedException;
 use Wikibase\Database\Schema\TableSqlBuilder;
 
 /**
@@ -84,13 +85,13 @@
 *
 * @param string $tableName
 *
-* TODO: document throws
+* @throws TableDeletionFailedException
 */
public function dropTable( $tableName ) {
$success = $this-getDB()-dropTable( $tableName, __METHOD__ );
 
if ( $success === false ) {
-   // TODO: throw
+   throw new TableDeletionFailedException( $tableName, 
$this-getDB()-lastQuery() );
}
}
 
diff --git a/src/Schema/ReportingTableBuilder.php 
b/src/Schema/ReportingTableBuilder.php
index f160186..7eb2b3a 100644
--- a/src/Schema/ReportingTableBuilder.php
+++ b/src/Schema/ReportingTableBuilder.php
@@ -63,7 +63,7 @@
 *
 * @param string $tableName
 *
-* TODO: document throws
+* @throws TableDeletionFailedException
 */
public function dropTable( $tableName ) {
if ( $this-tableBuilder-tableExists( $tableName ) ) {
diff --git a/src/Schema/TableBuilder.php b/src/Schema/TableBuilder.php
index f251f41..cd05404 100644
--- a/src/Schema/TableBuilder.php
+++ b/src/Schema/TableBuilder.php
@@ -25,7 +25,7 @@
 *
 * @param string $tableName
 *
-* TODO: document throws
+* @throws TableDeletionFailedException
 */
public function dropTable( $tableName );
 
diff --git a/src/Schema/TableDeletionFailedException.php 
b/src/Schema/TableDeletionFailedException.php
new file mode 100644
index 000..413a733
--- /dev/null
+++ b/src/Schema/TableDeletionFailedException.php
@@ -0,0 +1,27 @@
+?php
+
+namespace Wikibase\Database\Schema;
+
+use Wikibase\Database\QueryInterface\QueryInterfaceException;
+use Wikibase\Database\Schema\Definitions\TableDefinition;
+
+/**
+ * @since 0.1
+ * @licence GNU GPL v2+
+ * @author Jeroen De Dauw  jeroended...@gmail.com 
+ */
+class TableDeletionFailedException extends QueryInterfaceException {
+
+   protected $tableName;
+
+   public function __construct( $tableName, $message = '', \Exception 
$previous = null ) {
+   parent::__construct( $message, 0, $previous );
+
+   $this-tableName = $tableName;
+   }
+
+   public function getTableName() {
+   return $this-tableName;
+   }
+
+}
\ No newline at end of file
diff --git a/tests/phpunit/MediaWiki/MediaWikiTableBuilderTest.php 
b/tests/phpunit/MediaWiki/MediaWikiTableBuilderTest.php
index d67cbc1..7eab244 100644
--- a/tests/phpunit/MediaWiki/MediaWikiTableBuilderTest.php
+++ b/tests/phpunit/MediaWiki/MediaWikiTableBuilderTest.php
@@ -121,4 +121,21 @@
$builder-dropTable( $table );
}
 
+   /**
+* @dataProvider tableProvider
+*
+* @param TableDefinition $table
+*/
+   public function testDropTableFailure( TableDefinition $table ) {
+   list( $builder, $connection, $tableSqlBuilder ) = 
$this-getBuilderAndDependencies();
+
+   $connection-expects( $this-once() )
+   -method( 'dropTable' )
+   -will( $this-returnValue( false ) );
+
+   $this-setExpectedException( 
'Wikibase\Database\Schema\TableDeletionFailedException' );
+
+   $builder-dropTable( $table );
+   }
+
 }
diff --git a/tests/phpunit/Schema/TableDeletionFailedExceptionTest.php 
b/tests/phpunit/Schema/TableDeletionFailedExceptionTest.php
new file mode 100644
index 000..1091c75
--- /dev/null
+++ b/tests/phpunit/Schema/TableDeletionFailedExceptionTest.php
@@ -0,0 +1,38 @@
+?php
+
+namespace Wikibase\Database\Tests\Schema;
+
+use Wikibase\Database\Schema\TableDeletionFailedException;
+
+/**
+ * @covers Wikibase\Database\Schema\TableDeletionFailedException
+ *
+ * @group Wikibase
+ * @group WikibaseDatabase
+ 

[MediaWiki-commits] [Gerrit] Improved clearing of index caches - change (operations...incremental)

2013-09-12 Thread Petr Onderka (Code Review)
Petr Onderka has submitted this change and it was merged.

Change subject: Improved clearing of index caches
..


Improved clearing of index caches

Change-Id: If8a035b4c4ea5b43a6d0bd8b39940d50fa261017
---
M Indexes/Index.h
M Indexes/Index.tpp
M Indexes/IndexInnerNode.h
M Indexes/IndexInnerNode.tpp
M Indexes/IndexLeafNode.h
M Indexes/IndexLeafNode.tpp
M Indexes/IndexNode.h
M Indexes/IndexNode.tpp
M Indexes/Iterators/IndexInnerIterator.h
M Indexes/Iterators/IndexInnerIterator.tpp
M Indexes/Iterators/IndexIterator.h
M Indexes/Iterators/IndexIterator.tpp
M Indexes/Iterators/IndexLeafIterator.h
M Indexes/Iterators/IndexLeafIterator.tpp
M Indexes/Iterators/IndexNodeIterator.h
15 files changed, 157 insertions(+), 43 deletions(-)

Approvals:
  Petr Onderka: Verified; Looks good to me, approved



diff --git a/Indexes/Index.h b/Indexes/Index.h
index 8248081..1733340 100644
--- a/Indexes/Index.h
+++ b/Indexes/Index.h
@@ -17,9 +17,10 @@
 std::weak_ptrWritableDump dump;
 std::weak_ptrOffset fileHeaderOffset;
 
-int recentChanges;
+int recentAccesses;
 
 void AfterAdd();
+void AfterAccess();
 public:
 // fileHeaderOffset is assumed to be part of dump
 Index(std::weak_ptrWritableDump dump, Offset* fileHeaderOffset, bool 
delaySave = false);
diff --git a/Indexes/Index.tpp b/Indexes/Index.tpp
index 2e9b80b..144060f 100644
--- a/Indexes/Index.tpp
+++ b/Indexes/Index.tpp
@@ -7,7 +7,7 @@
 
 templatetypename TKey, typename TValue
 IndexTKey, TValue::Index(std::weak_ptrWritableDump dump, Offset 
*fileHeaderOffset, bool delaySave)
-: dump(dump), fileHeaderOffset(std::shared_ptrOffset(dump.lock(), 
fileHeaderOffset)), recentChanges(0)
+: dump(dump), fileHeaderOffset(std::shared_ptrOffset(dump.lock(), 
fileHeaderOffset)), recentAccesses(0)
 {
 rootNodeUnsaved = false;
 
@@ -34,7 +34,11 @@
 templatetypename TKey, typename TValue
 TValue IndexTKey, TValue::Get(TKey key)
 {
-return rootNode-Get(key);
+auto result = rootNode-Get(key);
+
+AfterAccess();
+
+return result;
 }
 
 templatetypename TKey, typename TValue
@@ -63,12 +67,20 @@
 rootNodeUnsaved = false;
 }
 
-recentChanges++;
+AfterAccess();
+}
 
-if (recentChanges = 10)
+templatetypename TKey, typename TValue
+void IndexTKey, TValue::AfterAccess()
+{
+recentAccesses++;
+
+if (recentAccesses = 1)
 {
-rootNode-ClearCached();
-recentChanges = 0;
+if (rootNode-NodesCount() = 5000)
+rootNode-ClearCached();
+
+recentAccesses = 0;
 }
 }
 
diff --git a/Indexes/IndexInnerNode.h b/Indexes/IndexInnerNode.h
index 5ccc1e1..8626bd9 100644
--- a/Indexes/IndexInnerNode.h
+++ b/Indexes/IndexInnerNode.h
@@ -21,6 +21,7 @@
 std::uint16_t GetKeyIndex(TKey key);
 
 void AfterAdd(std::uint16_t updatedChildIndex);
+
 protected:
 virtual void WriteInternal() override;
 public:
@@ -41,7 +42,8 @@
 virtual std::uint32_t RealLength() override;
 virtual SplitResult Split() override;
 
-virtual void ClearCached() override;
+virtual std::uint32_t NodesCount() override;
+virtual void ClearCachedInternal() override;
 
 virtual std::unique_ptrIndexNodeIteratorTKey, TValue begin() override;
 virtual std::unique_ptrIndexNodeIteratorTKey, TValue end() override;
diff --git a/Indexes/IndexInnerNode.tpp b/Indexes/IndexInnerNode.tpp
index 0890b2a..8eb2126 100644
--- a/Indexes/IndexInnerNode.tpp
+++ b/Indexes/IndexInnerNode.tpp
@@ -219,13 +219,31 @@
 }
 
 templatetypename TKey, typename TValue
-void IndexInnerNodeTKey, TValue::ClearCached()
+std::uint32_t IndexInnerNodeTKey, TValue::NodesCount()
 {
-Write();
+std::uint32_t result = 1;
 
-for (unsigned i = 0; i  cachedChildren.size(); i++)
+for (const auto child : cachedChildren)
 {
-cachedChildren.at(i) = nullptr;
+if (child != nullptr)
+result += child-NodesCount();
+}
+
+return result;
+}
+
+templatetypename TKey, typename TValue
+void IndexInnerNodeTKey, TValue::ClearCachedInternal()
+{
+for (auto child : cachedChildren)
+{
+if (child != nullptr)
+{
+if (child-CanBeCleared())
+child = nullptr;
+else
+child-ClearCachedInternal();
+}
 }
 }
 
@@ -239,4 +257,4 @@
 std::unique_ptrIndexNodeIteratorTKey, TValue IndexInnerNodeTKey, 
TValue::end()
 {
 return std::unique_ptrIndexNodeIteratorTKey, TValue(new 
IndexInnerIteratorTKey, TValue(this, false));
-}
+}
\ No newline at end of file
diff --git a/Indexes/IndexLeafNode.h b/Indexes/IndexLeafNode.h
index ad069ac..78c74ef 100644
--- a/Indexes/IndexLeafNode.h
+++ b/Indexes/IndexLeafNode.h
@@ -3,18 +3,19 @@
 #include map
 #include IndexNode.h
 
-using std::map;
-
 templatetypename TKey, typename TValue
 class IndexLeafNode : public IndexNodeTKey, TValue
 {
+templatetypename TIndexKey, typename TIndexValue
+friend 

[MediaWiki-commits] [Gerrit] Added basic test for SimpleTableSchemaUpdater - change (mediawiki...WikibaseDatabase)

2013-09-12 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Added basic test for SimpleTableSchemaUpdater
..


Added basic test for SimpleTableSchemaUpdater

Change-Id: Iff3b3cf6c42d1adf73d33960236744f63ae741e9
---
A tests/phpunit/Schema/SimpleTableSchemaUpdaterTest.php
1 file changed, 93 insertions(+), 0 deletions(-)

Approvals:
  Addshore: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/tests/phpunit/Schema/SimpleTableSchemaUpdaterTest.php 
b/tests/phpunit/Schema/SimpleTableSchemaUpdaterTest.php
new file mode 100644
index 000..8f61985
--- /dev/null
+++ b/tests/phpunit/Schema/SimpleTableSchemaUpdaterTest.php
@@ -0,0 +1,93 @@
+?php
+
+namespace Wikibase\Database\Tests\Schema;
+
+use Wikibase\Database\Schema\Definitions\FieldDefinition;
+use Wikibase\Database\Schema\Definitions\IndexDefinition;
+use Wikibase\Database\Schema\Definitions\TableDefinition;
+use Wikibase\Database\Schema\SimpleTableSchemaUpdater;
+
+/**
+ * @covers Wikibase\Database\Schema\SimpleTableSchemaUpdater
+ *
+ * @group Wikibase
+ * @group WikibaseDatabase
+ *
+ * @licence GNU GPL v2+
+ * @author Jeroen De Dauw  jeroended...@gmail.com 
+ */
+class SimpleTableSchemaUpdaterTest extends \PHPUnit_Framework_TestCase {
+
+   public function testCanConstruct() {
+   new SimpleTableSchemaUpdater( $this-getMock( 
'Wikibase\Database\Schema\SchemaModifier' ) );
+   $this-assertTrue( true );
+   }
+
+   /**
+* @dataProvider tableDefinitionProvider
+*/
+   public function testNoUpdatesCausedBySameDefinition( TableDefinition 
$tableDefinition ) {
+   $schema = $this-getMock( 
'Wikibase\Database\Schema\SchemaModifier' );
+
+   $schema-expects( $this-never() )
+   -method( 'removeField' );
+
+   $schema-expects( $this-never() )
+   -method( 'addField' );
+
+   $updater = new SimpleTableSchemaUpdater( $schema );
+
+   $updater-updateTable( $tableDefinition, $tableDefinition );
+   }
+
+   public function tableDefinitionProvider() {
+   $definitions = array();
+
+   $definitions[] = new TableDefinition(
+   'foo',
+   array(
+   new FieldDefinition(
+   'field',
+   FieldDefinition::TYPE_BOOLEAN
+   )
+   )
+   );
+
+   $definitions[] = new TableDefinition(
+   'foo',
+   array(
+   new FieldDefinition(
+   'bool',
+   FieldDefinition::TYPE_BOOLEAN
+   ),
+   new FieldDefinition(
+   'int',
+   FieldDefinition::TYPE_INTEGER
+   ),
+   new FieldDefinition(
+   'text',
+   FieldDefinition::TYPE_TEXT
+   )
+   ),
+   array(
+   new IndexDefinition(
+   'some_index',
+   array(
+   'int' = 0,
+   'text' = 10,
+   )
+   ),
+   new IndexDefinition(
+   'other_index',
+   array(
+   'text' = 0,
+   ),
+   IndexDefinition::TYPE_UNIQUE
+   )
+   )
+   );
+
+   return array_map( function( $definition ) { return array( 
$definition ); }, $definitions );
+   }
+
+}

-- 
To view, visit https://gerrit.wikimedia.org/r/83645
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: Iff3b3cf6c42d1adf73d33960236744f63ae741e9
Gerrit-PatchSet: 4
Gerrit-Project: mediawiki/extensions/WikibaseDatabase
Gerrit-Branch: master
Gerrit-Owner: Jeroen De Dauw jeroended...@gmail.com
Gerrit-Reviewer: Addshore addshorew...@gmail.com
Gerrit-Reviewer: Daniel Kinzler daniel.kinz...@wikimedia.de
Gerrit-Reviewer: Daniel Werner daniel.wer...@wikimedia.de
Gerrit-Reviewer: Tobias Gritschacher tobias.gritschac...@wikimedia.de
Gerrit-Reviewer: jenkins-bot

___
MediaWiki-commits mailing list

[MediaWiki-commits] [Gerrit] Improved clearing of index caches - change (operations...incremental)

2013-09-12 Thread Petr Onderka (Code Review)
Petr Onderka has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/83998


Change subject: Improved clearing of index caches
..

Improved clearing of index caches

Change-Id: If8a035b4c4ea5b43a6d0bd8b39940d50fa261017
---
M Indexes/Index.h
M Indexes/Index.tpp
M Indexes/IndexInnerNode.h
M Indexes/IndexInnerNode.tpp
M Indexes/IndexLeafNode.h
M Indexes/IndexLeafNode.tpp
M Indexes/IndexNode.h
M Indexes/IndexNode.tpp
M Indexes/Iterators/IndexInnerIterator.h
M Indexes/Iterators/IndexInnerIterator.tpp
M Indexes/Iterators/IndexIterator.h
M Indexes/Iterators/IndexIterator.tpp
M Indexes/Iterators/IndexLeafIterator.h
M Indexes/Iterators/IndexLeafIterator.tpp
M Indexes/Iterators/IndexNodeIterator.h
15 files changed, 157 insertions(+), 43 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/dumps/incremental 
refs/changes/98/83998/1

diff --git a/Indexes/Index.h b/Indexes/Index.h
index 8248081..1733340 100644
--- a/Indexes/Index.h
+++ b/Indexes/Index.h
@@ -17,9 +17,10 @@
 std::weak_ptrWritableDump dump;
 std::weak_ptrOffset fileHeaderOffset;
 
-int recentChanges;
+int recentAccesses;
 
 void AfterAdd();
+void AfterAccess();
 public:
 // fileHeaderOffset is assumed to be part of dump
 Index(std::weak_ptrWritableDump dump, Offset* fileHeaderOffset, bool 
delaySave = false);
diff --git a/Indexes/Index.tpp b/Indexes/Index.tpp
index 2e9b80b..144060f 100644
--- a/Indexes/Index.tpp
+++ b/Indexes/Index.tpp
@@ -7,7 +7,7 @@
 
 templatetypename TKey, typename TValue
 IndexTKey, TValue::Index(std::weak_ptrWritableDump dump, Offset 
*fileHeaderOffset, bool delaySave)
-: dump(dump), fileHeaderOffset(std::shared_ptrOffset(dump.lock(), 
fileHeaderOffset)), recentChanges(0)
+: dump(dump), fileHeaderOffset(std::shared_ptrOffset(dump.lock(), 
fileHeaderOffset)), recentAccesses(0)
 {
 rootNodeUnsaved = false;
 
@@ -34,7 +34,11 @@
 templatetypename TKey, typename TValue
 TValue IndexTKey, TValue::Get(TKey key)
 {
-return rootNode-Get(key);
+auto result = rootNode-Get(key);
+
+AfterAccess();
+
+return result;
 }
 
 templatetypename TKey, typename TValue
@@ -63,12 +67,20 @@
 rootNodeUnsaved = false;
 }
 
-recentChanges++;
+AfterAccess();
+}
 
-if (recentChanges = 10)
+templatetypename TKey, typename TValue
+void IndexTKey, TValue::AfterAccess()
+{
+recentAccesses++;
+
+if (recentAccesses = 1)
 {
-rootNode-ClearCached();
-recentChanges = 0;
+if (rootNode-NodesCount() = 5000)
+rootNode-ClearCached();
+
+recentAccesses = 0;
 }
 }
 
diff --git a/Indexes/IndexInnerNode.h b/Indexes/IndexInnerNode.h
index 5ccc1e1..8626bd9 100644
--- a/Indexes/IndexInnerNode.h
+++ b/Indexes/IndexInnerNode.h
@@ -21,6 +21,7 @@
 std::uint16_t GetKeyIndex(TKey key);
 
 void AfterAdd(std::uint16_t updatedChildIndex);
+
 protected:
 virtual void WriteInternal() override;
 public:
@@ -41,7 +42,8 @@
 virtual std::uint32_t RealLength() override;
 virtual SplitResult Split() override;
 
-virtual void ClearCached() override;
+virtual std::uint32_t NodesCount() override;
+virtual void ClearCachedInternal() override;
 
 virtual std::unique_ptrIndexNodeIteratorTKey, TValue begin() override;
 virtual std::unique_ptrIndexNodeIteratorTKey, TValue end() override;
diff --git a/Indexes/IndexInnerNode.tpp b/Indexes/IndexInnerNode.tpp
index 0890b2a..8eb2126 100644
--- a/Indexes/IndexInnerNode.tpp
+++ b/Indexes/IndexInnerNode.tpp
@@ -219,13 +219,31 @@
 }
 
 templatetypename TKey, typename TValue
-void IndexInnerNodeTKey, TValue::ClearCached()
+std::uint32_t IndexInnerNodeTKey, TValue::NodesCount()
 {
-Write();
+std::uint32_t result = 1;
 
-for (unsigned i = 0; i  cachedChildren.size(); i++)
+for (const auto child : cachedChildren)
 {
-cachedChildren.at(i) = nullptr;
+if (child != nullptr)
+result += child-NodesCount();
+}
+
+return result;
+}
+
+templatetypename TKey, typename TValue
+void IndexInnerNodeTKey, TValue::ClearCachedInternal()
+{
+for (auto child : cachedChildren)
+{
+if (child != nullptr)
+{
+if (child-CanBeCleared())
+child = nullptr;
+else
+child-ClearCachedInternal();
+}
 }
 }
 
@@ -239,4 +257,4 @@
 std::unique_ptrIndexNodeIteratorTKey, TValue IndexInnerNodeTKey, 
TValue::end()
 {
 return std::unique_ptrIndexNodeIteratorTKey, TValue(new 
IndexInnerIteratorTKey, TValue(this, false));
-}
+}
\ No newline at end of file
diff --git a/Indexes/IndexLeafNode.h b/Indexes/IndexLeafNode.h
index ad069ac..78c74ef 100644
--- a/Indexes/IndexLeafNode.h
+++ b/Indexes/IndexLeafNode.h
@@ -3,18 +3,19 @@
 #include map
 #include IndexNode.h
 
-using std::map;
-
 templatetypename TKey, typename TValue
 class IndexLeafNode : public IndexNodeTKey, TValue
 {
+ 

[MediaWiki-commits] [Gerrit] Minor bugfix to IP::prettifyIP. - change (mediawiki/core)

2013-09-12 Thread Cscott (Code Review)
Cscott has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/84002


Change subject: Minor bugfix to IP::prettifyIP.
..

Minor bugfix to IP::prettifyIP.

The offset returned by preg_match with the PREG_OFFSET_CAPTURE is an
absolute position in the string.  You shouldn't *add* it to the
current position in order to advance past the match.

Change-Id: I3631c34e02d9b830bf841bf960855626fbc88eb0
---
M includes/IP.php
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/02/84002/1

diff --git a/includes/IP.php b/includes/IP.php
index 2051e69..fc76310 100644
--- a/includes/IP.php
+++ b/includes/IP.php
@@ -212,7 +212,7 @@
$longest = $match;
$longestPos = $pos;
}
-   $offset += ( $pos + strlen( $match ) ); // 
advance
+   $offset = ( $pos + strlen( $match ) ); // 
advance
}
if ( $longest !== false ) {
// Replace this portion of the string with the 
'::' abbreviation

-- 
To view, visit https://gerrit.wikimedia.org/r/84002
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I3631c34e02d9b830bf841bf960855626fbc88eb0
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Cscott canan...@wikimedia.org

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] allow precision to be null in globe coordinate - change (mediawiki...DataValues)

2013-09-12 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: allow precision to be null in globe coordinate
..


allow precision to be null in globe coordinate

until we are able to handle the null values in wikidata better,
or they get precisions added.

Change-Id: Iad6574d64a48311fae55288783744ae3ec8f9f1e
---
M DataValuesCommon/src/DataValues/GlobeCoordinateValue.php
M DataValuesCommon/tests/DataValues/GlobeCoordinateValueTest.php
2 files changed, 4 insertions(+), 4 deletions(-)

Approvals:
  Tobias Gritschacher: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/DataValuesCommon/src/DataValues/GlobeCoordinateValue.php 
b/DataValuesCommon/src/DataValues/GlobeCoordinateValue.php
index cb03d47..cedd8aa 100644
--- a/DataValuesCommon/src/DataValues/GlobeCoordinateValue.php
+++ b/DataValuesCommon/src/DataValues/GlobeCoordinateValue.php
@@ -65,8 +65,8 @@
}
 
protected function assertIsPrecision( $precision ) {
-   if ( !is_float( $precision )  !is_int( $precision ) ) {
-   throw new IllegalValueException( 'Can only construct 
GlobeCoordinateValue with a numeric precision' );
+   if ( !is_null( $precision )  !is_float( $precision )  
!is_int( $precision ) ) {
+   throw new IllegalValueException( 'Can only construct 
GlobeCoordinateValue with a numeric precision or null' );
}
}
 
diff --git a/DataValuesCommon/tests/DataValues/GlobeCoordinateValueTest.php 
b/DataValuesCommon/tests/DataValues/GlobeCoordinateValueTest.php
index c6d224e..a33304c 100644
--- a/DataValuesCommon/tests/DataValues/GlobeCoordinateValueTest.php
+++ b/DataValuesCommon/tests/DataValues/GlobeCoordinateValueTest.php
@@ -48,6 +48,7 @@
$argLists[] = array( new LatLongValue( 4.2, 4.2 ), 1, 
'terminus' );
$argLists[] = array( new LatLongValue( 4.2, 4.2 ), 1, Schar's 
World );
$argLists[] = array( new LatLongValue( 4.2, 4.2 ), 1, 
'coruscant' );
+   $argLists[] = array( new LatLongValue( 4.2, 4.2 ), null );
 
return $argLists;
}
@@ -55,7 +56,6 @@
public function invalidConstructorArgumentsProvider() {
$argLists = array();
 
-   $argLists[] = array( new LatLongValue( 4.2, 4.2 ), null );
$argLists[] = array( new LatLongValue( 4.2, 4.2 ), 'foo' );
$argLists[] = array( new LatLongValue( 4.2, 4.2 ), true );
$argLists[] = array( new LatLongValue( 4.2, 4.2 ), array( 1 ) );
@@ -102,7 +102,7 @@
public function testGetPrecision( GlobeCoordinateValue $geoCoord, array 
$arguments ) {
$actual = $geoCoord-getPrecision();
 
-   $this-assertTrue( is_float( $actual ) || is_int( $actual ), 
'Precision is int or float' );
+   $this-assertTrue( is_float( $actual ) || is_int( $actual ) || 
is_null( $actual ), 'Precision is int or float or null' );
$this-assertEquals( $arguments[1], $actual );
}
 

-- 
To view, visit https://gerrit.wikimedia.org/r/83991
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: Iad6574d64a48311fae55288783744ae3ec8f9f1e
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/DataValues
Gerrit-Branch: mw1.22-wmf16
Gerrit-Owner: Aude aude.w...@gmail.com
Gerrit-Reviewer: Tobias Gritschacher tobias.gritschac...@wikimedia.de
Gerrit-Reviewer: jenkins-bot

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


  1   2   >