[MediaWiki-commits] [Gerrit] Keep section alignment on window resize - change (mediawiki...ContentTranslation)

2014-09-24 Thread Santhosh (Code Review)
Santhosh has uploaded a new change for review.

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

Change subject: Keep section alignment on window resize
..

Keep section alignment on window resize

Change-Id: I76d670c0354f949c0101c1b405280186d092a4b2
---
M modules/translation/ext.cx.translation.aligner.js
1 file changed, 15 insertions(+), 0 deletions(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/ContentTranslation 
refs/changes/47/162547/1

diff --git a/modules/translation/ext.cx.translation.aligner.js 
b/modules/translation/ext.cx.translation.aligner.js
index 493713c..32eeb01 100644
--- a/modules/translation/ext.cx.translation.aligner.js
+++ b/modules/translation/ext.cx.translation.aligner.js
@@ -68,6 +68,10 @@
sourceSectionHeight = $sourceSection.height();
sectionHeight = $section.height();
 
+   if ( !sourceSectionHeight ) {
+   return this;
+   }
+
if ( sourceSectionHeight  sectionHeight ) {
$sourceSection.css( 'min-height', sectionHeight );
sourceSectionHeight = $sourceSection.height();
@@ -95,4 +99,15 @@
 
return this;
};
+
+   $( function () {
+   // Window resize handler.
+   $( window ).resize( $.debounce( 250, function () {
+   $( '.cx-column--translation .cx-column__content' )
+   .find( mw.cx.getSectionSelector() )
+   .each( function () {
+   $( this ).keepAlignment();
+   } );
+   } ) );
+   } );
 }( jQuery, mediaWiki ) );

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I76d670c0354f949c0101c1b405280186d092a4b2
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/ContentTranslation
Gerrit-Branch: master
Gerrit-Owner: Santhosh santhosh.thottin...@gmail.com

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


[MediaWiki-commits] [Gerrit] [Parsoid] Remove custom directory structure - change (translatewiki)

2014-09-24 Thread Nemo bis (Code Review)
Nemo bis has uploaded a new change for review.

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

Change subject: [Parsoid] Remove custom directory structure
..

[Parsoid] Remove custom directory structure

Changed in 9b986c9cb0169918d41e146096d4d73c3aca58f0
Spotted by Nikerabbit, https://bugzilla.wikimedia.org/70267#c4

Change-Id: I0bf1db4b8ca4f6e634bc6ce79ce298089767630f
---
M groups/MediaWiki/mediawiki-extensions.txt
1 file changed, 0 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/translatewiki 
refs/changes/48/162548/1

diff --git a/groups/MediaWiki/mediawiki-extensions.txt 
b/groups/MediaWiki/mediawiki-extensions.txt
index b975a68..1e05385 100644
--- a/groups/MediaWiki/mediawiki-extensions.txt
+++ b/groups/MediaWiki/mediawiki-extensions.txt
@@ -1509,7 +1509,6 @@
 Parser Hooks
 
 Parsoid
-file = Parsoid/php/i18n/%CODE%.json
 
 Pdf Book
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I0bf1db4b8ca4f6e634bc6ce79ce298089767630f
Gerrit-PatchSet: 1
Gerrit-Project: translatewiki
Gerrit-Branch: master
Gerrit-Owner: Nemo bis federicol...@tiscali.it

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


[MediaWiki-commits] [Gerrit] Revert Auto-migrate matching accounts where no global accou... - change (mediawiki...CentralAuth)

2014-09-24 Thread Legoktm (Code Review)
Legoktm has uploaded a new change for review.

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

Change subject: Revert Auto-migrate matching accounts where no global account 
exists
..

Revert Auto-migrate matching accounts where no global account exists

This reverts commit b2e553e104d568c09f20b11fd976106f7874c8f3.

Bug: 71223
Change-Id: I3a8ec44c66a8c4c1cd70574564ca21018456acf0
---
M CentralAuthPlugin.php
M CentralAuthUser.php
2 files changed, 3 insertions(+), 20 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/CentralAuth 
refs/changes/49/162549/1

diff --git a/CentralAuthPlugin.php b/CentralAuthPlugin.php
index 94d634e..3495f4c 100644
--- a/CentralAuthPlugin.php
+++ b/CentralAuthPlugin.php
@@ -43,16 +43,6 @@
'CentralAuth',
plugin: no global account for '$username'
);
-   // See if all the unattached accounts match passwords
-   // and can be globalized. (bug 70392)
-   if ( $wgCentralAuthAutoMigrate ) {
-   $ok = $central-storeAndMigrate( array( 
$password ), /* $sendToRC = */ true, /* $safe = */ true );
-   if ( $ok ) {
-   wfDebugLog( 'CentralAuth',
-   wgCentralAuthAutoMigrate 
successful in creating a global account for '$username'' );
-   return true;
-   }
-   }
return false;
}
 
diff --git a/CentralAuthUser.php b/CentralAuthUser.php
index 2d5b013..0d4d395 100644
--- a/CentralAuthUser.php
+++ b/CentralAuthUser.php
@@ -635,14 +635,13 @@
/**
 * @param array $passwords
 * @param bool $sendToRC
-* @param bool $safe Only allow migration if all users can be migrated
 * @return bool
 */
-   public function storeAndMigrate( $passwords = array(), $sendToRC = 
true, $safe = false ) {
+   public function storeAndMigrate( $passwords = array(), $sendToRC = true 
) {
$dbw = self::getCentralDB();
$dbw-begin();
 
-   $ret = $this-attemptAutoMigration( $passwords, $sendToRC, 
$safe );
+   $ret = $this-attemptAutoMigration( $passwords, $sendToRC );
 
$dbw-commit();
return $ret;
@@ -824,10 +823,9 @@
 *
 * @param $passwords Array
 * @param $sendToRC bool
-* @param $safe bool Only migrate if all accounts can be merged
 * @return bool Whether full automatic migration completed successfully.
 */
-   protected function attemptAutoMigration( $passwords = array(), 
$sendToRC = true, $safe = false ) {
+   protected function attemptAutoMigration( $passwords = array(), 
$sendToRC = true ) {
$migrationSet = $this-queryUnattached();
if ( empty( $migrationSet ) ) {
wfDebugLog( 'CentralAuth', 'no accounts to merge, 
failed migration' );
@@ -850,11 +848,6 @@
 
// Pick all the local accounts matching the master home 
account
$attach = $this-prepareMigration( $migrationSet, $passwords );
-
-   if ( $safe  count( $attach ) !== count( $migrationSet ) ) {
-   wfDebugLog( 'CentralAuth', Safe auto-migration for 
'$this-mName' failed );
-   return false;
-   }
 
// storeGlobalData clears $this-mHomeWiki
$homeWiki = $this-mHomeWiki;

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I3a8ec44c66a8c4c1cd70574564ca21018456acf0
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/CentralAuth
Gerrit-Branch: master
Gerrit-Owner: Legoktm legoktm.wikipe...@gmail.com

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


[MediaWiki-commits] [Gerrit] Revert Auto-migrate matching accounts where no global accou... - change (mediawiki...CentralAuth)

2014-09-24 Thread Legoktm (Code Review)
Legoktm has uploaded a new change for review.

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

Change subject: Revert Auto-migrate matching accounts where no global account 
exists
..

Revert Auto-migrate matching accounts where no global account exists

This reverts commit b2e553e104d568c09f20b11fd976106f7874c8f3.

Bug: 71223
Change-Id: I3a8ec44c66a8c4c1cd70574564ca21018456acf0
---
M CentralAuthPlugin.php
M CentralAuthUser.php
2 files changed, 3 insertions(+), 20 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/CentralAuth 
refs/changes/50/162550/1

diff --git a/CentralAuthPlugin.php b/CentralAuthPlugin.php
index 94d634e..3495f4c 100644
--- a/CentralAuthPlugin.php
+++ b/CentralAuthPlugin.php
@@ -43,16 +43,6 @@
'CentralAuth',
plugin: no global account for '$username'
);
-   // See if all the unattached accounts match passwords
-   // and can be globalized. (bug 70392)
-   if ( $wgCentralAuthAutoMigrate ) {
-   $ok = $central-storeAndMigrate( array( 
$password ), /* $sendToRC = */ true, /* $safe = */ true );
-   if ( $ok ) {
-   wfDebugLog( 'CentralAuth',
-   wgCentralAuthAutoMigrate 
successful in creating a global account for '$username'' );
-   return true;
-   }
-   }
return false;
}
 
diff --git a/CentralAuthUser.php b/CentralAuthUser.php
index d8ccead..c0c1b35 100644
--- a/CentralAuthUser.php
+++ b/CentralAuthUser.php
@@ -656,14 +656,13 @@
/**
 * @param array $passwords
 * @param bool $sendToRC
-* @param bool $safe Only allow migration if all users can be migrated
 * @return bool
 */
-   public function storeAndMigrate( $passwords = array(), $sendToRC = 
true, $safe = false ) {
+   public function storeAndMigrate( $passwords = array(), $sendToRC = true 
) {
$dbw = self::getCentralDB();
$dbw-begin();
 
-   $ret = $this-attemptAutoMigration( $passwords, $sendToRC, 
$safe );
+   $ret = $this-attemptAutoMigration( $passwords, $sendToRC );
 
$dbw-commit();
return $ret;
@@ -845,10 +844,9 @@
 *
 * @param $passwords Array
 * @param $sendToRC bool
-* @param $safe bool Only migrate if all accounts can be merged
 * @return bool Whether full automatic migration completed successfully.
 */
-   protected function attemptAutoMigration( $passwords = array(), 
$sendToRC = true, $safe = false ) {
+   protected function attemptAutoMigration( $passwords = array(), 
$sendToRC = true ) {
$migrationSet = $this-queryUnattached();
if ( empty( $migrationSet ) ) {
wfDebugLog( 'CentralAuth', 'no accounts to merge, 
failed migration' );
@@ -871,11 +869,6 @@
 
// Pick all the local accounts matching the master home 
account
$attach = $this-prepareMigration( $migrationSet, $passwords );
-
-   if ( $safe  count( $attach ) !== count( $migrationSet ) ) {
-   wfDebugLog( 'CentralAuth', Safe auto-migration for 
'$this-mName' failed );
-   return false;
-   }
 
// storeGlobalData clears $this-mHomeWiki
$homeWiki = $this-mHomeWiki;

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I3a8ec44c66a8c4c1cd70574564ca21018456acf0
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/CentralAuth
Gerrit-Branch: wmf/1.24wmf22
Gerrit-Owner: Legoktm legoktm.wikipe...@gmail.com

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


[MediaWiki-commits] [Gerrit] Revert Auto-migrate matching accounts where no global accou... - change (mediawiki...CentralAuth)

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

Change subject: Revert Auto-migrate matching accounts where no global account 
exists
..


Revert Auto-migrate matching accounts where no global account exists

This reverts commit b2e553e104d568c09f20b11fd976106f7874c8f3.

Bug: 71223
Change-Id: I3a8ec44c66a8c4c1cd70574564ca21018456acf0
---
M CentralAuthPlugin.php
M CentralAuthUser.php
2 files changed, 3 insertions(+), 20 deletions(-)

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



diff --git a/CentralAuthPlugin.php b/CentralAuthPlugin.php
index 94d634e..3495f4c 100644
--- a/CentralAuthPlugin.php
+++ b/CentralAuthPlugin.php
@@ -43,16 +43,6 @@
'CentralAuth',
plugin: no global account for '$username'
);
-   // See if all the unattached accounts match passwords
-   // and can be globalized. (bug 70392)
-   if ( $wgCentralAuthAutoMigrate ) {
-   $ok = $central-storeAndMigrate( array( 
$password ), /* $sendToRC = */ true, /* $safe = */ true );
-   if ( $ok ) {
-   wfDebugLog( 'CentralAuth',
-   wgCentralAuthAutoMigrate 
successful in creating a global account for '$username'' );
-   return true;
-   }
-   }
return false;
}
 
diff --git a/CentralAuthUser.php b/CentralAuthUser.php
index 2d5b013..0d4d395 100644
--- a/CentralAuthUser.php
+++ b/CentralAuthUser.php
@@ -635,14 +635,13 @@
/**
 * @param array $passwords
 * @param bool $sendToRC
-* @param bool $safe Only allow migration if all users can be migrated
 * @return bool
 */
-   public function storeAndMigrate( $passwords = array(), $sendToRC = 
true, $safe = false ) {
+   public function storeAndMigrate( $passwords = array(), $sendToRC = true 
) {
$dbw = self::getCentralDB();
$dbw-begin();
 
-   $ret = $this-attemptAutoMigration( $passwords, $sendToRC, 
$safe );
+   $ret = $this-attemptAutoMigration( $passwords, $sendToRC );
 
$dbw-commit();
return $ret;
@@ -824,10 +823,9 @@
 *
 * @param $passwords Array
 * @param $sendToRC bool
-* @param $safe bool Only migrate if all accounts can be merged
 * @return bool Whether full automatic migration completed successfully.
 */
-   protected function attemptAutoMigration( $passwords = array(), 
$sendToRC = true, $safe = false ) {
+   protected function attemptAutoMigration( $passwords = array(), 
$sendToRC = true ) {
$migrationSet = $this-queryUnattached();
if ( empty( $migrationSet ) ) {
wfDebugLog( 'CentralAuth', 'no accounts to merge, 
failed migration' );
@@ -850,11 +848,6 @@
 
// Pick all the local accounts matching the master home 
account
$attach = $this-prepareMigration( $migrationSet, $passwords );
-
-   if ( $safe  count( $attach ) !== count( $migrationSet ) ) {
-   wfDebugLog( 'CentralAuth', Safe auto-migration for 
'$this-mName' failed );
-   return false;
-   }
 
// storeGlobalData clears $this-mHomeWiki
$homeWiki = $this-mHomeWiki;

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I3a8ec44c66a8c4c1cd70574564ca21018456acf0
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/CentralAuth
Gerrit-Branch: master
Gerrit-Owner: Legoktm legoktm.wikipe...@gmail.com
Gerrit-Reviewer: Legoktm legoktm.wikipe...@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 Tim's PR #3834 as a debian patch - change (operations...hhvm)

2014-09-24 Thread Giuseppe Lavagetto (Code Review)
Giuseppe Lavagetto has uploaded a new change for review.

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

Change subject: Add Tim's PR #3834 as a debian patch
..

Add Tim's PR #3834 as a debian patch

Change-Id: Ie0afad0d2dde8550b184d60b050a53f7a0cc34b8
Signed-off-by: Giuseppe Lavagetto glavage...@wikimedia.org
---
M debian/patches/series
1 file changed, 1 insertion(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/debs/hhvm 
refs/changes/51/162551/1

diff --git a/debian/patches/series b/debian/patches/series
index 8f663dc..51c30f6 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -5,3 +5,4 @@
 Make-RUSAGE_THREAD-available-to-getrusage.patch
 fix-sql-warning.patch
 ezc-fix-count-and-conversion-to-boolean.patch
+ezc-clear-exception.patch

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ie0afad0d2dde8550b184d60b050a53f7a0cc34b8
Gerrit-PatchSet: 1
Gerrit-Project: operations/debs/hhvm
Gerrit-Branch: master
Gerrit-Owner: Giuseppe Lavagetto glavage...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] Fix The token must be POSTed error - change (pywikibot/compat)

2014-09-24 Thread Ladsgroup (Code Review)
Ladsgroup has uploaded a new change for review.

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

Change subject: Fix The token must be POSTed error
..

Fix The token must be POSTed error

Bug 71159

Change-Id: I077bedff1cbc54873cada30bf05b41a35474d5b5
---
M query.py
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/pywikibot/compat 
refs/changes/52/162552/1

diff --git a/query.py b/query.py
index e42b974..f332f49 100644
--- a/query.py
+++ b/query.py
@@ -110,7 +110,7 @@
 if site.versionnumber() = 18:
 postAC.append('watch')
 if useAPI:
-if params['action'] in postAC:
+if params['action'] in postAC or params['action'][:5] == 'wbset':
 path = site.api_address()
 else:
 path = site.api_address() + site.urlEncode(params.items())

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I077bedff1cbc54873cada30bf05b41a35474d5b5
Gerrit-PatchSet: 1
Gerrit-Project: pywikibot/compat
Gerrit-Branch: master
Gerrit-Owner: Ladsgroup ladsgr...@gmail.com

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


[MediaWiki-commits] [Gerrit] Show full personal bar on Special:CX - change (mediawiki...ContentTranslation)

2014-09-24 Thread Santhosh (Code Review)
Santhosh has uploaded a new change for review.

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

Change subject: Show full personal bar on Special:CX
..

Show full personal bar on Special:CX

* Use $skin-getPersonalToolsList() to get the personal toolbar
* Remove the custom added user name link.

Change-Id: I03339fdcf0344b832cc4280d9b374f75d5efb07d
---
M modules/header/ext.cx.header.js
M modules/header/styles/ext.cx.header.less
M specials/SpecialContentTranslation.php
3 files changed, 17 insertions(+), 34 deletions(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/ContentTranslation 
refs/changes/53/162553/1

diff --git a/modules/header/ext.cx.header.js b/modules/header/ext.cx.header.js
index 7cbc3ad..2320948 100644
--- a/modules/header/ext.cx.header.js
+++ b/modules/header/ext.cx.header.js
@@ -58,16 +58,6 @@
 
this.showError( mw.message( 'cx-special-login-error', 
loginUriHref ) );
 
-   // The top login link should open in the same window.
-   // There is no reason to open a new tab for it,
-   // becauses there is no translation here.
-   this.$userName
-   .text( mw.msg( 'login' ) )
-   .prop( {
-   href: loginUriHref,
-   target: ''
-   } );
-
// Do not show the columns
// TODO: use events
$( '.cx-widget__columns' ).remove();
@@ -159,22 +149,10 @@
 * Render the header
 */
ContentTranslationHeader.prototype.render = function () {
-   var $logo, $userDetails, $headerBar,
+   var $logo, $headerBar,
$translationCenterLink, $translationCenter;
 
$logo = $( 'div' ).addClass( 'cx-header__logo' );
-
-   this.$userName = $( 'a' )
-   .addClass( 'cx-header__user-details__user-name' )
-   .attr( {
-   href: mw.util.getUrl( 'User:' + 
mw.user.getName() ),
-   target: '_blank'
-   } )
-   .text( mw.user.getName() );
-
-   $userDetails = $( 'div' )
-   .addClass( 'cx-header__user-details' )
-   .append( this.$userName );
 
this.$publishButton = $( 'button' )
.addClass( 'cx-header__publish publish mw-ui-button 
mw-ui-constructive' )
@@ -201,7 +179,7 @@
 
this.$container
.addClass( 'cx-header' )
-   .append( $logo, $userDetails, $headerBar, this.$infoBar 
);
+   .append( $logo, $headerBar, this.$infoBar );
};
 
/**
diff --git a/modules/header/styles/ext.cx.header.less 
b/modules/header/styles/ext.cx.header.less
index 4691c0a..7309d7a 100644
--- a/modules/header/styles/ext.cx.header.less
+++ b/modules/header/styles/ext.cx.header.less
@@ -5,6 +5,17 @@
transition: width 0.15s;
 }
 
+.cx-header__personal-toolbar {
+   display: block;
+   position: absolute;
+   right: 0;
+   list-style: none;
+   li {
+   margin-right: 10px;
+   float: left;
+   }
+}
+
 .cx-header__logo {
.mw-ui-item;
.mw-ui-two-thirds;
@@ -12,15 +23,6 @@
background-image: url(../images/wikipedia-logo-landscape.png);
background-repeat: no-repeat;
background-position: left top;
-}
-
-.cx-header__user-details {
-   .mw-ui-item;
-   .mw-ui-one-third;
-
-a {
-   float: right;
-   }
 }
 
 .cx-header__bar {
diff --git a/specials/SpecialContentTranslation.php 
b/specials/SpecialContentTranslation.php
index c4973a7..9e6ad13 100644
--- a/specials/SpecialContentTranslation.php
+++ b/specials/SpecialContentTranslation.php
@@ -45,8 +45,11 @@
) );
 
$out-addHtml( MWDebug::getDebugHTML( $this-getContext() ) );
-   wfRunHooks( 'BeforePageDisplay', array( $out, $skin ) );
+   $out-addHTML( Html::rawElement( 'ul',
+   array( 'class' = 'cx-header__personal-toolbar' ),
+   $skin-getPersonalToolsList() ) );
 
+   wfRunHooks( 'BeforePageDisplay', array( $out, $skin ) );
$out-addHTML( $skin-bottomScripts() );
$out-addHTML( '/body/html' );
}

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I03339fdcf0344b832cc4280d9b374f75d5efb07d
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/ContentTranslation
Gerrit-Branch: master
Gerrit-Owner: Santhosh santhosh.thottin...@gmail.com

___
MediaWiki-commits mailing list

[MediaWiki-commits] [Gerrit] Fix The token must be POSTed error - change (pywikibot/compat)

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

Change subject: Fix The token must be POSTed error
..


Fix The token must be POSTed error

Bug 71159

Change-Id: I077bedff1cbc54873cada30bf05b41a35474d5b5
---
M query.py
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/query.py b/query.py
index e42b974..f332f49 100644
--- a/query.py
+++ b/query.py
@@ -110,7 +110,7 @@
 if site.versionnumber() = 18:
 postAC.append('watch')
 if useAPI:
-if params['action'] in postAC:
+if params['action'] in postAC or params['action'][:5] == 'wbset':
 path = site.api_address()
 else:
 path = site.api_address() + site.urlEncode(params.items())

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I077bedff1cbc54873cada30bf05b41a35474d5b5
Gerrit-PatchSet: 1
Gerrit-Project: pywikibot/compat
Gerrit-Branch: master
Gerrit-Owner: Ladsgroup ladsgr...@gmail.com
Gerrit-Reviewer: John Vandenberg jay...@gmail.com
Gerrit-Reviewer: Legoktm legoktm.wikipe...@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] grafana: qualify graphite URL - change (operations/puppet)

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

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

Change subject: grafana: qualify graphite URL
..

grafana: qualify graphite URL

It needs to have a schema, but it can be protocol-relative.
It still won't work, because CORS isn't set up.

Change-Id: I6b7e02d8dba2a6db1862e99f17ad730c2eb54b35
---
M manifests/role/grafana.pp
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/54/162554/1

diff --git a/manifests/role/grafana.pp b/manifests/role/grafana.pp
index 28d8a46..2e3181c 100644
--- a/manifests/role/grafana.pp
+++ b/manifests/role/grafana.pp
@@ -14,7 +14,7 @@
 datasources = {
 graphite = {
 type = 'graphite',
-url  = graphite.${domain_suffix},
+url  = //graphite.${domain_suffix},
 },
 },
 },

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

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

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


[MediaWiki-commits] [Gerrit] grafana: qualify graphite URL - change (operations/puppet)

2014-09-24 Thread Ori.livneh (Code Review)
Ori.livneh has submitted this change and it was merged.

Change subject: grafana: qualify graphite URL
..


grafana: qualify graphite URL

It needs to have a schema, but it can be protocol-relative.
It still won't work, because CORS isn't set up.

Change-Id: I6b7e02d8dba2a6db1862e99f17ad730c2eb54b35
---
M manifests/role/grafana.pp
1 file changed, 1 insertion(+), 1 deletion(-)

Approvals:
  Ori.livneh: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/manifests/role/grafana.pp b/manifests/role/grafana.pp
index 28d8a46..2e3181c 100644
--- a/manifests/role/grafana.pp
+++ b/manifests/role/grafana.pp
@@ -14,7 +14,7 @@
 datasources = {
 graphite = {
 type = 'graphite',
-url  = graphite.${domain_suffix},
+url  = //graphite.${domain_suffix},
 },
 },
 },

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I6b7e02d8dba2a6db1862e99f17ad730c2eb54b35
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Ori.livneh o...@wikimedia.org
Gerrit-Reviewer: Ori.livneh 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] Introduce entityChangers (incomplete) - change (mediawiki...Wikibase)

2014-09-24 Thread Adrian Lang (Code Review)
Adrian Lang has uploaded a new change for review.

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

Change subject: Introduce entityChangers (incomplete)
..

Introduce entityChangers (incomplete)

Change-Id: Iab57c239f2477cf71198b7a94d05d231fdf2dfbf
---
M lib/resources/Resources.php
A lib/resources/entityChangers/AliasesChanger.js
A lib/resources/entityChangers/ClaimsChanger.js
A lib/resources/entityChangers/EntityChangersFactory.js
A lib/resources/entityChangers/ReferencesChanger.js
A lib/resources/entityChangers/namespace.js
A lib/resources/entityChangers/resources.php
M lib/resources/jquery.wikibase/jquery.wikibase.aliasesview.js
M lib/resources/jquery.wikibase/jquery.wikibase.claimgrouplistview.js
M lib/resources/jquery.wikibase/jquery.wikibase.claimlistview.js
M lib/resources/jquery.wikibase/jquery.wikibase.claimview.js
M lib/resources/jquery.wikibase/jquery.wikibase.entityview.js
M lib/resources/jquery.wikibase/jquery.wikibase.fingerprintgroupview.js
M lib/resources/jquery.wikibase/jquery.wikibase.fingerprintlistview.js
M lib/resources/jquery.wikibase/jquery.wikibase.fingerprintview.js
M lib/resources/jquery.wikibase/jquery.wikibase.referenceview.js
M lib/resources/jquery.wikibase/jquery.wikibase.statementview.js
M lib/resources/wikibase.RepoApi/wikibase.AbstractedRepoApi.js
A lib/tests/qunit/entityChangers/AliasesChanger.tests.js
A lib/tests/qunit/entityChangers/ClaimsChanger.tests.js
A lib/tests/qunit/entityChangers/ReferencesChanger.tests.js
A lib/tests/qunit/entityChangers/resources.php
M lib/tests/qunit/jquery.wikibase/jquery.wikibase.aliasesview.tests.js
M lib/tests/qunit/jquery.wikibase/jquery.wikibase.claimview.tests.js
M lib/tests/qunit/jquery.wikibase/jquery.wikibase.fingerprintgroupview.tests.js
M lib/tests/qunit/jquery.wikibase/jquery.wikibase.fingerprintlistview.tests.js
M lib/tests/qunit/jquery.wikibase/jquery.wikibase.fingerprintview.tests.js
M lib/tests/qunit/jquery.wikibase/jquery.wikibase.referenceview.tests.js
M lib/tests/qunit/jquery.wikibase/resources.php
M lib/tests/qunit/resources.php
M repo/resources/Resources.php
M repo/resources/wikibase.ui.entityViewInit.js
32 files changed, 826 insertions(+), 282 deletions(-)


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

diff --git a/lib/resources/Resources.php b/lib/resources/Resources.php
index 1b867a6..2abd9dd 100644
--- a/lib/resources/Resources.php
+++ b/lib/resources/Resources.php
@@ -177,6 +177,7 @@
$modules = array_merge(
$modules,
include( __DIR__ . '/api/resources.php' ),
+   include( __DIR__ . '/entityChangers/resources.php' ),
include( __DIR__ . '/experts/resources.php' ),
include( __DIR__ . '/formatters/resources.php' ),
include( __DIR__ . '/jquery.wikibase/resources.php' ),
diff --git a/lib/resources/entityChangers/AliasesChanger.js 
b/lib/resources/entityChangers/AliasesChanger.js
new file mode 100644
index 000..73dd180
--- /dev/null
+++ b/lib/resources/entityChangers/AliasesChanger.js
@@ -0,0 +1,80 @@
+/**
+ * @licence GNU GPL v2+
+ * @author Adrian Lang adrian.l...@wikimedia.de
+ */
+( function( wb, $ ) {
+   'use strict';
+
+   var MODULE = wb.entityChangers;
+
+   /**
+* @param {wb.RepoApi}
+* @param {wb.RevisionStore}
+* @param {wb.datamodel.Entity}
+*/
+   var SELF = MODULE.AliasesChanger = function( api, revisionStore, entity 
) {
+   this._api = api;
+   this._revisionStore = revisionStore;
+   this._entity = entity;
+   };
+
+   $.extend( SELF.prototype, {
+   _entity: null,
+   _revisionStore: null,
+   _api: null,
+
+   setAliases: function( aliases, language ) {
+   var self = this;
+
+   return this._api.setAliases(
+   this._entity.getId(),
+   this._revisionStore.getAliasesRevision(),
+   this._getNewAliases( aliases, language ),
+   this._getRemovedAliases( aliases, language ),
+   language
+   )
+   .done( function( response ) {
+   self._revisionStore.setAliasesRevision( 
response.entity.lastrevid );
+
+   // FIXME: Maybe check API's return value?
+
+   // FIXME: Introduce setter, get this right
+   self._entity._data.aliases = 
self._entity._data.aliases || {};
+   self._entity._data.aliases[ language ] = 
aliases;
+   } );
+   },
+
+   /**
+* @return {string[]}
+*/
+   _getNewAliases: function( currentAliases, 

[MediaWiki-commits] [Gerrit] Adding *.nijmegen.nl to wgCopyUploadsDomains. - change (operations/mediawiki-config)

2014-09-24 Thread Steinsplitter (Code Review)
Steinsplitter has uploaded a new change for review.

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

Change subject: Adding *.nijmegen.nl to wgCopyUploadsDomains.
..

Adding *.nijmegen.nl to wgCopyUploadsDomains.

Adding *.nijmegen.nl to the wgCopyUploadsDomains whitelist.

Bug 71191

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


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

diff --git a/wmf-config/InitialiseSettings.php 
b/wmf-config/InitialiseSettings.php
index a5da8e9..8c7783f 100644
--- a/wmf-config/InitialiseSettings.php
+++ b/wmf-config/InitialiseSettings.php
@@ -10724,6 +10724,7 @@
'www.veikkos-archiv.com',   // Veikkos-archiv - bug 
69777
'*.scienceimage.csiro.au',  // CSIRO - bug 70771
'*.beeldbank.cultureelerfgoed.nl',  // Cultureel Erfgoed - bug 
70840
+   '*.nijmegen.nl',// Nijmegen - bug 71191
),
 ),
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I7351dab0c17e83eaa31f672859a2c84c02b46847
Gerrit-PatchSet: 1
Gerrit-Project: operations/mediawiki-config
Gerrit-Branch: master
Gerrit-Owner: Steinsplitter steinsplit...@wikipedia.de

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


[MediaWiki-commits] [Gerrit] Moved edit feature from sitelinkview to sitelinkgroupview - change (mediawiki...Wikibase)

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

Change subject: Moved edit feature from sitelinkview to sitelinkgroupview
..


Moved edit feature from sitelinkview to sitelinkgroupview

Requires adjustments to browsertests in 
https://github.com/wmde/WikidataBrowserTests/pull/9

Bug: 68908
Change-Id: Icda4a7b522677501c3676b255aed3bee5a6b8731
---
M lib/resources/jquery.wikibase/jquery.wikibase.entityview.js
M lib/resources/jquery.wikibase/jquery.wikibase.sitelinkgrouplistview.js
M lib/resources/jquery.wikibase/jquery.wikibase.sitelinkgroupview.js
M lib/resources/jquery.wikibase/jquery.wikibase.sitelinklistview.js
M lib/resources/jquery.wikibase/jquery.wikibase.sitelinkview.js
M lib/resources/jquery.wikibase/resources.php
A 
lib/resources/jquery.wikibase/themes/default/jquery.wikibase.sitelinkgroupview.css
M lib/resources/templates.php
M lib/tests/qunit/jquery.wikibase/jquery.wikibase.sitelinkgroupview.tests.js
M lib/tests/qunit/jquery.wikibase/jquery.wikibase.sitelinklistview.tests.js
M lib/tests/qunit/jquery.wikibase/jquery.wikibase.sitelinkview.tests.js
M repo/i18n/en.json
M repo/i18n/qqq.json
M repo/includes/View/SiteLinksView.php
M repo/resources/wikibase.ui.entityViewInit.js
15 files changed, 1,191 insertions(+), 418 deletions(-)

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



diff --git a/lib/resources/jquery.wikibase/jquery.wikibase.entityview.js 
b/lib/resources/jquery.wikibase/jquery.wikibase.entityview.js
index 9a429cd..167da20 100644
--- a/lib/resources/jquery.wikibase/jquery.wikibase.entityview.js
+++ b/lib/resources/jquery.wikibase/jquery.wikibase.entityview.js
@@ -289,7 +289,7 @@
'claimviewafterstartediting.' + this.widgetName,
'statementviewafterstartediting.' + this.widgetName,
'referenceviewafterstartediting.' + this.widgetName,
-   'sitelinkviewafterstartediting.' + this.widgetName
+   'sitelinkgroupviewafterstartediting.' + this.widgetName
].join( ' ' ),
function( event ) {
var widgetName = event.type.replace( 
/afterstartediting/, '' );
@@ -310,7 +310,7 @@
'statementviewafterstopediting.' + this.widgetName,
'statementviewafterremove.' + this.widgetName,
'referenceviewafterstopediting.' + this.widgetName,
-   'sitelinkviewafterstopediting.' + this.widgetName
+   'sitelinkgroupviewafterstopediting.' + this.widgetName
].join( ' ' ),
function( event, dropValue ) {
self.enable();
diff --git 
a/lib/resources/jquery.wikibase/jquery.wikibase.sitelinkgrouplistview.js 
b/lib/resources/jquery.wikibase/jquery.wikibase.sitelinkgrouplistview.js
index bce5254..53120a5 100644
--- a/lib/resources/jquery.wikibase/jquery.wikibase.sitelinkgrouplistview.js
+++ b/lib/resources/jquery.wikibase/jquery.wikibase.sitelinkgrouplistview.js
@@ -2,13 +2,13 @@
  * @licence GNU GPL v2+
  * @author H. Snater  mediaw...@snater.com 
  */
-( function( $ ) {
+( function( $, mw ) {
'use strict';
 
var PARENT = $.ui.TemplatedWidget;
 
 /**
- * Encapsulates multiple sitelinkgroupview widget.
+ * Encapsulates multiple sitelinkgroupview widgets.
  * @since 0.5
  * @extends jQuery.TemplatedWidget
  *
@@ -91,7 +91,8 @@
value: value,
entityId: self.options.entityId,
api: self.options.api,
-   entityStore: 
self.options.entityStore
+   entityStore: 
self.options.entityStore,
+   helpMessage: mw.msg( 
'wikibase-sitelinkgroupview-input-help-message' )
};
}
} ),
@@ -113,4 +114,4 @@
}
 } );
 
-}( jQuery ) );
+}( jQuery, mediaWiki ) );
diff --git a/lib/resources/jquery.wikibase/jquery.wikibase.sitelinkgroupview.js 
b/lib/resources/jquery.wikibase/jquery.wikibase.sitelinkgroupview.js
index afd47aa..46115b2 100644
--- a/lib/resources/jquery.wikibase/jquery.wikibase.sitelinkgroupview.js
+++ b/lib/resources/jquery.wikibase/jquery.wikibase.sitelinkgroupview.js
@@ -21,6 +21,28 @@
  * @option {wikibase.RepoApi} api
  *
  * @option {wikibase.store.EntityStore} entityStore
+ *
+ * @option {string} [helpMessage]
+ *  Default: 'Add a site link by specifying a site and a page 
of that site, edit or
+ *  remove existing site links.'
+ *
+ * @event change
+ *- {jQuery.Event}
+ *
+ * @event afterstartediting
+ *   - {jQuery.Event}
+ *
+ * @event stopediting
+ *- 

[MediaWiki-commits] [Gerrit] [Parsoid] Remove custom directory structure - change (translatewiki)

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

Change subject: [Parsoid] Remove custom directory structure
..


[Parsoid] Remove custom directory structure

Changed in 9b986c9cb0169918d41e146096d4d73c3aca58f0
Spotted by Nikerabbit, https://bugzilla.wikimedia.org/70267#c4

Change-Id: I0bf1db4b8ca4f6e634bc6ce79ce298089767630f
---
M groups/MediaWiki/mediawiki-extensions.txt
1 file changed, 0 insertions(+), 1 deletion(-)

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



diff --git a/groups/MediaWiki/mediawiki-extensions.txt 
b/groups/MediaWiki/mediawiki-extensions.txt
index b975a68..1e05385 100644
--- a/groups/MediaWiki/mediawiki-extensions.txt
+++ b/groups/MediaWiki/mediawiki-extensions.txt
@@ -1509,7 +1509,6 @@
 Parser Hooks
 
 Parsoid
-file = Parsoid/php/i18n/%CODE%.json
 
 Pdf Book
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I0bf1db4b8ca4f6e634bc6ce79ce298089767630f
Gerrit-PatchSet: 1
Gerrit-Project: translatewiki
Gerrit-Branch: master
Gerrit-Owner: Nemo bis federicol...@tiscali.it
Gerrit-Reviewer: Raimond Spekking raimond.spekk...@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] Fix up timestripper for Korean and add ko tests - change (pywikibot/core)

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

Change subject: Fix up timestripper for Korean and add ko tests
..


Fix up timestripper for Korean and add ko tests

Change-Id: Iaa72c87ed13a0f65451a7ad717abc94be4a8307f
---
M pywikibot/textlib.py
M tests/timestripper_tests.py
2 files changed, 7 insertions(+), 2 deletions(-)

Approvals:
  John Vandenberg: Looks good to me, but someone else must approve
  XZise: Looks good to me, approved
  Ladsgroup: Looks good to me, but someone else must approve
  jenkins-bot: Verified



diff --git a/pywikibot/textlib.py b/pywikibot/textlib.py
index 241e73a..64da90b 100644
--- a/pywikibot/textlib.py
+++ b/pywikibot/textlib.py
@@ -1223,9 +1223,9 @@
 # the last one is workaround for Korean
 if any(_.isdigit() for _ in self.origNames2monthNum):
 self.is_digit_month = True
-monthR = 
r'(?Pmonth(%s)(?:\u0654)?|(?:1[012]|0?[1-9])\.?(?:\uc6d4)?)' \
+monthR = r'(?Pmonth(%s)|(?:1[012]|0?[1-9])\.)' \
 % u'|'.join(escaped_months)
-dayR = r'(?Pday(3[01]|[12]\d|0?[1-9]))(?:%s)?\.?\s*[01]?\d\.?' % 
u'\uc77c'
+dayR = 
r'(?Pday(3[01]|[12]\d|0?[1-9]))(?:%s)?\.?\s*(?:[01]?\d\.)?' % u'\uc77c'
 else:
 self.is_digit_month = False
 monthR = r'(?Pmonth(%s))' % u'|'.join(escaped_months)
diff --git a/tests/timestripper_tests.py b/tests/timestripper_tests.py
index 0f265e3..6c31248 100644
--- a/tests/timestripper_tests.py
+++ b/tests/timestripper_tests.py
@@ -151,6 +151,11 @@
 'match': u'3 février 2010 à 19:48 (CET) 7 février 2010 à 19:48 
(CET)',
 'nomatch': u'3 March 2010 19:48 (CET) 7 March 2010 19:48 (CET)',
 },
+'kowiki': {
+'family': 'wikipedia',
+'code': 'ko',
+'match': u'2010년 2월 3일 (수) 19:48 (KST) 2010년 2월 7일 (수) 19:48 
(KST)',
+},
 'nowiki': {
 'family': 'wikipedia',
 'code': 'no',

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Iaa72c87ed13a0f65451a7ad717abc94be4a8307f
Gerrit-PatchSet: 1
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Owner: Ladsgroup ladsgr...@gmail.com
Gerrit-Reviewer: John Vandenberg jay...@gmail.com
Gerrit-Reviewer: Ladsgroup ladsgr...@gmail.com
Gerrit-Reviewer: Merlijn van Deen valhall...@arctus.nl
Gerrit-Reviewer: Mpaa mpaa.w...@gmail.com
Gerrit-Reviewer: XZise commodorefabia...@gmx.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] Merger: ensure_cloned() now looks for '.git' - change (integration/zuul)

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

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

Change subject: Merger: ensure_cloned() now looks for '.git'
..

Merger: ensure_cloned() now looks for '.git'

merger.Repo() would not clone a directory if the target path already
exists, even though it might not have been cloned.  Adjust the test to
look whether '.git' exist (which can be either a directory or a file in
the case of submodules).

I came accross this issue when using Zuul cloner to clone two
repositories, one having the other as a submodule.

Given two repositories:
- mediawiki/extension
- mediawiki (having 'mediawiki/extension' has a submodule to /extension)

We run: `zuul-cloner mediawiki mediawiki/extension`

It first clone the mediawiki repository with a placeholder directory for
the submodule. The directory structure is:

.
├── .git/
└── mediawiki/
└── extension/

When cloning mediawiki/extension, ensure_cloned() would skip it since
the directory exists.  Looking for subpath '.git', we trick it in
cloning the repository resulting in:

.
├── .git/
│   └── modules/
│   └── extension/
└── mediawiki/
└── extension/
└── .git   # note: a file, not a directory

My use case is cloning a mediawiki/core branch which has several
extensions registered as submodules that I am not going to initialize.

Change-Id: I4fe67a1db31adc2e23e8baf57528fce76f282986
---
A tests/test_merger_repo.py
M zuul/merger/merger.py
2 files changed, 76 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/integration/zuul 
refs/changes/57/162557/1

diff --git a/tests/test_merger_repo.py b/tests/test_merger_repo.py
new file mode 100644
index 000..0cc53bd
--- /dev/null
+++ b/tests/test_merger_repo.py
@@ -0,0 +1,75 @@
+#!/usr/bin/env python
+
+# Copyright 2012 Hewlett-Packard Development Company, L.P.
+# Copyright 2014 Wikimedia Foundation Inc.
+#
+# Licensed under the Apache License, Version 2.0 (the License); you may
+# not use this file except in compliance with the License. You may obtain
+# a copy of the License at
+#
+#  http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an AS IS BASIS, WITHOUT
+# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+# License for the specific language governing permissions and limitations
+# under the License.
+
+import logging
+import os
+
+import git
+
+from zuul.merger.merger import Repo
+from tests.base import ZuulTestCase
+from tests.base import FIXTURE_DIR
+
+logging.basicConfig(level=logging.DEBUG,
+format='%(asctime)s %(name)-32s '
+'%(levelname)-8s %(message)s')
+
+class TestMergerRepo(ZuulTestCase):
+
+log = logging.getLogger(zuul.test.merger.repo)
+workspace_root = None
+
+def setUp(self):
+super(TestMergerRepo, self).setUp()
+self.workspace_root = os.path.join(self.test_root, 'workspace')
+
+def test_ensure_cloned(self):
+parent_path = os.path.join(self.upstream_root, 'org/project1')
+
+# Forge a repo having a submodule
+parent_repo = git.Repo(parent_path)
+parent_repo.git.submodule('add',
+os.path.join(self.upstream_root, 'org/project2'), 'subdir')
+parent_repo.index.commit('Adding project2 as a submodule in subdir')
+self.assertTrue(
+os.path.isfile(os.path.join(parent_path, 'subdir', '.git')),
+msg='.git file in submodule should be a file')
+
+work_repo = Repo(parent_path, self.workspace_root, 'n...@example.org', 
'User Name')
+self.assertTrue(
+os.path.isdir(os.path.join(self.workspace_root, 'subdir')),
+msg='Cloned repository has a submodule placeholder directory')
+self.assertFalse(
+os.path.exists(os.path.join(self.workspace_root, 'subdir', 
'.git')),
+msg='Submodule is not initialized')
+
+sub_repo = Repo(os.path.join(self.upstream_root, 'org/project2'),
+os.path.join(self.workspace_root, 'subdir'),
+'n...@example.org', 'User Name')
+self.assertTrue(
+os.path.exists(os.path.join(self.workspace_root, 'subdir', 
'.git')),
+msg='Cloned over the submodule placeholder')
+
+self.assertEquals(
+os.path.join(self.upstream_root, 'org/project1'),
+work_repo.createRepoObject().remotes[0].url,
+message=Parent clone still point to upstream project1)
+
+self.assertEquals(
+os.path.join(self.upstream_root, 'org/project2'),
+sub_repo.createRepoObject().remotes[0].url,
+message=Sub repository points to upstream project2)
diff --git a/zuul/merger/merger.py b/zuul/merger/merger.py
index 922c67e..25955f8 100644
--- 

[MediaWiki-commits] [Gerrit] Merge https://review.openstack.org/#/c/123437/1 - change (integration/zuul)

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

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

Change subject: Merge https://review.openstack.org/#/c/123437/1
..

Merge https://review.openstack.org/#/c/123437/1

5f6643 Merger: ensure_cloned() now looks for '.git'

Zuul cloner: fails on extension jobs against a wmf branch
Bug: 71133

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


  git pull ssh://gerrit.wikimedia.org:29418/integration/zuul 
refs/changes/58/162558/1


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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ic3c5aa2bf338ab4dd117ddd03011f7f8c0534080
Gerrit-PatchSet: 1
Gerrit-Project: integration/zuul
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] Set up CORS for Grafana - change (operations/puppet)

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

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

Change subject: Set up CORS for Grafana
..

Set up CORS for Grafana

* First, tell Grafana to make GET requests to Graphite's render API and not
  POST. See https://github.com/grafana/grafana/issues/345.
* Declare a vcl_deliver for misc-varnish. Use it to set CORS headers for
  Grafana. See http://grafana.org/docs/#graphite-server-config.

Change-Id: Ieebc69411c61bf3b08990f8890c918260da1b432
---
M manifests/role/grafana.pp
M templates/varnish/misc.inc.vcl.erb
2 files changed, 14 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/59/162559/1

diff --git a/manifests/role/grafana.pp b/manifests/role/grafana.pp
index 2e3181c..91324c2 100644
--- a/manifests/role/grafana.pp
+++ b/manifests/role/grafana.pp
@@ -13,8 +13,9 @@
 config = {
 datasources = {
 graphite = {
-type = 'graphite',
-url  = //graphite.${domain_suffix},
+type  = 'graphite',
+url   = //graphite.${domain_suffix},
+render_method = 'GET',
 },
 },
 },
diff --git a/templates/varnish/misc.inc.vcl.erb 
b/templates/varnish/misc.inc.vcl.erb
index 3caa3ee..430bb3c 100644
--- a/templates/varnish/misc.inc.vcl.erb
+++ b/templates/varnish/misc.inc.vcl.erb
@@ -60,3 +60,14 @@
call errorpage;
return(deliver);
 }
+
+sub vcl_deliver {
+   /* CORS for Grafana. Since Access-Control-Allow-Origin must be either   
  *
+* '*' or an exact match (including protocol), we read in the value 
from  *
+* the Origin header.   
  */
+   if (req.http.Host == graphite.wikimedia.org  req.http.Origin ~ 
//grafana.wikimedia.org$) {
+   set resp.http.Access-Control-Allow-Origin = req.http.Origin;
+   set resp.http.Access-Control-Allow-Methods = GET, OPTIONS;
+   set resp.http.Access-Control-Allow-Headers = 
req.http.Access-Control-Request-Headers;
+   }
+}

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

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

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


[MediaWiki-commits] [Gerrit] Show initially part of the below the fold area - change (mediawiki...MultimediaViewer)

2014-09-24 Thread Pginer (Code Review)
Pginer has uploaded a new change for review.

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

Change subject: Show initially part of the below the fold area
..

Show initially part of the below the fold area

In order to communicate that there is more content below.
This is related to acceptance criteria #8 of story #830.
For more details check:  
https://wikimedia.mingle.thoughtworks.com/projects/multimedia/cards/830

Some further improvement to consider:
- If the panel is open, and the user clicks outside of it (e.g., over the 
image), the panel should close.
- We may want to eliminate the pointing-down chevron if we don't want it to 
conflict with the big more details button.

Change-Id: If14886647aa0660a524a720e8d223eca655d5f3f
---
M resources/mmv/mmv.lightboxinterface.less
1 file changed, 2 insertions(+), 2 deletions(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/MultimediaViewer 
refs/changes/60/162560/1

diff --git a/resources/mmv/mmv.lightboxinterface.less 
b/resources/mmv/mmv.lightboxinterface.less
index bd98235..9b10f1d 100644
--- a/resources/mmv/mmv.lightboxinterface.less
+++ b/resources/mmv/mmv.lightboxinterface.less
@@ -58,11 +58,11 @@
 // above-the-fold part of the metadata panel
 .mw-mmv-above-fold {
width: 100%;
-   height: @metadatabar-above-fold-height;
+   height: @metadatabar-above-fold-height - 12;
// min-height is used when the height is changed to auto to display 
long texts, to make sure the layout
// is not messed up wheen the text is short and does not fill the 
available place. It is also used by
// Javascript to get the default height.
-   min-height: @metadatabar-above-fold-height;
+   min-height: @metadatabar-above-fold-height - 12;
position: relative;
border-bottom: 1px solid #dd;
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: If14886647aa0660a524a720e8d223eca655d5f3f
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/MultimediaViewer
Gerrit-Branch: master
Gerrit-Owner: Pginer pgi...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] Add shadow when scrolling panel - change (mediawiki...MultimediaViewer)

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

Change subject: Add shadow when scrolling panel
..


Add shadow when scrolling panel

When the panel is scrolling a shadow is added to better communicate that
the panel moves over the image.
More details: 
https://wikimedia.mingle.thoughtworks.com/projects/multimedia/cards/193

Change-Id: I06866a3a034977002b98658a3d09b5421b583ee7
---
M resources/mmv/ui/mmv.ui.metadataPanelScroller.js
M resources/mmv/ui/mmv.ui.metadataPanelScroller.less
2 files changed, 7 insertions(+), 0 deletions(-)

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



diff --git a/resources/mmv/ui/mmv.ui.metadataPanelScroller.js 
b/resources/mmv/ui/mmv.ui.metadataPanelScroller.js
index 436cf67..57b1b0d 100644
--- a/resources/mmv/ui/mmv.ui.metadataPanelScroller.js
+++ b/resources/mmv/ui/mmv.ui.metadataPanelScroller.js
@@ -225,6 +225,7 @@
var panelIsOpen = !!$.scrollTo().scrollTop();
 
this.$dragIcon.toggleClass( 'panel-open', panelIsOpen );
+   this.$container.toggleClass( 'panel-open', panelIsOpen );
 
if ( panelIsOpen  !this.panelIsOpen ) { // just opened (this 
is skipped in some cases, see the $dragIcon click handler)
this.$container.trigger( 'mmv-metadata-open' );
diff --git a/resources/mmv/ui/mmv.ui.metadataPanelScroller.less 
b/resources/mmv/ui/mmv.ui.metadataPanelScroller.less
index 3e547d7..0bb2c73 100644
--- a/resources/mmv/ui/mmv.ui.metadataPanelScroller.less
+++ b/resources/mmv/ui/mmv.ui.metadataPanelScroller.less
@@ -9,6 +9,8 @@
 
 .mw-mmv-post-image {
.animation( mw-mmv-appear-animation 0.5s ease 0s 1 normal forwards );
+   transition: box-shadow 0.25s;
+
.invite {
.animation( mw-mmv-invite-animation 0.9s ease 0.2s 1 normal 
forwards );
}
@@ -16,6 +18,10 @@
.jq-fullscreened  {
.animation(none);
}
+
+   .panel-open {
+   box-shadow: 0 -4px 0px rgba(0,0,0,0.2);
+   }
 }
 
 .mw-mmv-appear-animation() {

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I06866a3a034977002b98658a3d09b5421b583ee7
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/MultimediaViewer
Gerrit-Branch: master
Gerrit-Owner: Pginer pgi...@wikimedia.org
Gerrit-Reviewer: Gilles gdu...@wikimedia.org
Gerrit-Reviewer: MarkTraceur mtrac...@member.fsf.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 Firefox to version 32 - change (integration/jenkins-job-builder-config)

2014-09-24 Thread Zfilipin (Code Review)
Zfilipin has uploaded a new change for review.

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

Change subject: Update Firefox to version 32
..

Update Firefox to version 32

32 is the last one supported by Sauce Labs:

https://saucelabs.com/platforms

All browsertests* jobs are changed, but the only change is Firefox
version.

Change-Id: Ia34545fc25fadc3a1d611b5992aa7056474fbb15
---
M macro.yaml
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/integration/jenkins-job-builder-config 
refs/changes/61/162561/1

diff --git a/macro.yaml b/macro.yaml
index fabc68f..c3a0fe6 100644
--- a/macro.yaml
+++ b/macro.yaml
@@ -636,7 +636,7 @@
 export VERSION=28
 ;;
 'firefox')
-export VERSION=31
+export VERSION=32
 ;;
 'internet_explorer')
 export VERSION=10

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ia34545fc25fadc3a1d611b5992aa7056474fbb15
Gerrit-PatchSet: 1
Gerrit-Project: integration/jenkins-job-builder-config
Gerrit-Branch: master
Gerrit-Owner: Zfilipin zfili...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] Show initially part of the below the fold area - change (mediawiki...MultimediaViewer)

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

Change subject: Show initially part of the below the fold area
..


Show initially part of the below the fold area

In order to communicate that there is more content below.
This is related to acceptance criteria #8 of story #830.
For more details check:  
https://wikimedia.mingle.thoughtworks.com/projects/multimedia/cards/830

Some further improvement to consider:
- We'll need to adjust the more details button margin to make it fit better 
in the current above the fold area (0.55 em instead of the current 0.7em).
- If the panel is open, and the user clicks outside of it (e.g., over the 
image), the panel should close.
- We may want to eliminate the pointing-down chevron if we don't want it to 
conflict with the big more details button.

Change-Id: If14886647aa0660a524a720e8d223eca655d5f3f
---
M resources/mmv/mmv.lightboxinterface.less
1 file changed, 3 insertions(+), 2 deletions(-)

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



diff --git a/resources/mmv/mmv.lightboxinterface.less 
b/resources/mmv/mmv.lightboxinterface.less
index bd98235..46279bf 100644
--- a/resources/mmv/mmv.lightboxinterface.less
+++ b/resources/mmv/mmv.lightboxinterface.less
@@ -2,6 +2,7 @@
 @import mmv.mixins;
 
 @metadata-background: rgb(248, 248, 248);
+@metadata-above-fold-reveal-height: 12;
 
 .mw-mmv-wrapper {
top: 0px;
@@ -58,11 +59,11 @@
 // above-the-fold part of the metadata panel
 .mw-mmv-above-fold {
width: 100%;
-   height: @metadatabar-above-fold-height;
+   height: @metadatabar-above-fold-height - 
@metadata-above-fold-reveal-height;
// min-height is used when the height is changed to auto to display 
long texts, to make sure the layout
// is not messed up wheen the text is short and does not fill the 
available place. It is also used by
// Javascript to get the default height.
-   min-height: @metadatabar-above-fold-height;
+   min-height: @metadatabar-above-fold-height - 
@metadata-above-fold-reveal-height;
position: relative;
border-bottom: 1px solid #dd;
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: If14886647aa0660a524a720e8d223eca655d5f3f
Gerrit-PatchSet: 3
Gerrit-Project: mediawiki/extensions/MultimediaViewer
Gerrit-Branch: master
Gerrit-Owner: Pginer pgi...@wikimedia.org
Gerrit-Reviewer: Gilles gdu...@wikimedia.org
Gerrit-Reviewer: MarkTraceur mtrac...@member.fsf.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 back RepoApi.{get, post} for compatibility - change (mediawiki...Wikibase)

2014-09-24 Thread Adrian Lang (Code Review)
Adrian Lang has uploaded a new change for review.

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

Change subject: Add back RepoApi.{get,post} for compatibility
..

Add back RepoApi.{get,post} for compatibility

Change-Id: Ie5fdf4beeb4178a3439a4ec91915b29640e2a99d
---
M lib/resources/wikibase.RepoApi/wikibase.RepoApi.js
1 file changed, 21 insertions(+), 0 deletions(-)


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

diff --git a/lib/resources/wikibase.RepoApi/wikibase.RepoApi.js 
b/lib/resources/wikibase.RepoApi/wikibase.RepoApi.js
index 317a028..ed89cef 100644
--- a/lib/resources/wikibase.RepoApi/wikibase.RepoApi.js
+++ b/lib/resources/wikibase.RepoApi/wikibase.RepoApi.js
@@ -526,6 +526,27 @@
} );
 
return this._api.postWithToken( 'edit', params );
+   },
+
+   /**
+* Performs an API get request.
+* @see mw.Api.get
+* @since 0.3
+*
+* @param {Object} params
+* @return {jQuery.Promise}
+* Resolved parameters:
+* - {*}
+* Rejected parameters:
+* - {string}
+* - {*}
+*/
+   'get': function( params ) {
+   return this._api.get( params );
+   },
+
+   post: function( params ) {
+   return this._post( params );
}
 } );
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ie5fdf4beeb4178a3439a4ec91915b29640e2a99d
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Wikibase
Gerrit-Branch: master
Gerrit-Owner: Adrian Lang adrian.l...@wikimedia.de

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


[MediaWiki-commits] [Gerrit] Fix missing tutorial steps in the funnel logging - change (mediawiki...UploadWizard)

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

Change subject: Fix missing tutorial steps in the funnel logging
..


Fix missing tutorial steps in the funnel logging

The funnel logging code logged a 'virtual' tutorial step whenever
someone started the wizard and skipped that step, but did not do
that when someone restarted it (by clicking upload more files on
the thanks screen).

Change-Id: Ibf4970c1c9d5ebcdf34042f368fa1e19be21dec2
Mingle: https://wikimedia.mingle.thoughtworks.com/projects/multimedia/cards/862
---
M resources/mw.UploadWizard.js
1 file changed, 4 insertions(+), 1 deletion(-)

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



diff --git a/resources/mw.UploadWizard.js b/resources/mw.UploadWizard.js
index 2784030..d45936b 100644
--- a/resources/mw.UploadWizard.js
+++ b/resources/mw.UploadWizard.js
@@ -382,7 +382,10 @@
 
$( 'html, body' ).animate( { scrollTop: headScroll.top, 
scrollLeft: headScroll.left }, 'slow' );
 
-   if ( selectedStepName === 'file'  
!this.currentStepName ) { // tutorial was skipped
+   if (
+   selectedStepName === 'file' 
+   ( !this.currentStepName || this.currentStepName 
=== 'thanks' )
+   ) { // tutorial was skipped
uw.eventFlowLogger.logSkippedStep( 'tutorial' );
}
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ibf4970c1c9d5ebcdf34042f368fa1e19be21dec2
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/UploadWizard
Gerrit-Branch: master
Gerrit-Owner: Gergő Tisza gti...@wikimedia.org
Gerrit-Reviewer: Gilles gdu...@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] [IMPROV] Use str.decode instead of unicode - change (pywikibot/core)

2014-09-24 Thread XZise (Code Review)
XZise has uploaded a new change for review.

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

Change subject: [IMPROV] Use str.decode instead of unicode
..

[IMPROV] Use str.decode instead of unicode

With Python 3 unicode was removed. To support both versions 'unicode' is
aliased as 'str' in Python 3. But the usage of 'unicode(str, enc)' is
not necessary and instead 'str.decode(enc)' can be used (or to be exact
it's 'bytes' instead of 'str' in Python 3). Unfortunately this does not
remove the need for the 'unicode' alias, but reduces it a bit.

Change-Id: I7118142b7881821d78e4cb848116c4a2e5721c0a
---
M pywikibot/bot.py
M pywikibot/page.py
M pywikibot/pagegenerators.py
3 files changed, 5 insertions(+), 5 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/pywikibot/core 
refs/changes/63/162563/1

diff --git a/pywikibot/bot.py b/pywikibot/bot.py
index 941f4b0..12a64fe 100644
--- a/pywikibot/bot.py
+++ b/pywikibot/bot.py
@@ -378,7 +378,7 @@
'newline': (\n if newline else )}
 
 if decoder:
-text = unicode(text, decoder)
+text = text.decode(decoder)
 elif not isinstance(text, unicode):
 if not isinstance(text, str):
 # looks like text is a non-text object.
@@ -387,9 +387,9 @@
 text = unicode(text)
 else:
 try:
-text = unicode(text, 'utf-8')
+text = text.decode('utf-8')
 except UnicodeDecodeError:
-text = unicode(text, 'iso8859-1')
+text = text.decode('iso8859-1')
 
 logger.log(_level, text, extra=context, **kwargs)
 
diff --git a/pywikibot/page.py b/pywikibot/page.py
index 70f8dd1..fa3158d 100644
--- a/pywikibot/page.py
+++ b/pywikibot/page.py
@@ -4510,7 +4510,7 @@
 try:
 t = title.encode(enc)
 t = unquote_to_bytes(t)
-return unicode(t, enc)
+return t.decode(enc)
 except UnicodeError as ex:
 if not firstException:
 firstException = ex
diff --git a/pywikibot/pagegenerators.py b/pywikibot/pagegenerators.py
index c30c7ca..a57a22a 100644
--- a/pywikibot/pagegenerators.py
+++ b/pywikibot/pagegenerators.py
@@ -1483,7 +1483,7 @@
 break
 if pageName:
 namespace = site.namespace(namespaceNumber)
-pageName = unicode(pageName, site.encoding())
+pageName = pageName.decode(site.encoding())
 if namespace:
 pageTitle = '%s:%s' % (namespace, pageName)
 else:

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I7118142b7881821d78e4cb848116c4a2e5721c0a
Gerrit-PatchSet: 1
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Owner: XZise commodorefabia...@gmx.de

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


[MediaWiki-commits] [Gerrit] New Wikidata Build - 24/09/2014 - change (mediawiki...Wikidata)

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

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

Change subject: New Wikidata Build - 24/09/2014
..

New Wikidata Build - 24/09/2014

Change-Id: Ie4bf75a5ae50065e907b41fc5b7a33622c8d1f49
---
M .gitignore
A Gruntfile.js
M WikibaseClient.settings.php
M WikibaseRepo.settings.php
M composer.lock
M extensions/Wikibase/client/WikibaseClient.hooks.php
M extensions/Wikibase/client/WikibaseClient.php
M extensions/Wikibase/client/includes/hooks/SidebarHookHandlers.php
M extensions/Wikibase/client/includes/recentchanges/ChangeLineFormatter.php
M extensions/Wikibase/client/includes/recentchanges/ExternalChange.php
M extensions/Wikibase/client/includes/recentchanges/ExternalChangeFactory.php
M extensions/Wikibase/client/includes/recentchanges/ExternalRecentChange.php
M 
extensions/Wikibase/client/includes/recentchanges/RecentChangesFilterOptions.php
M extensions/Wikibase/client/includes/recentchanges/RevisionData.php
M 
extensions/Wikibase/client/tests/phpunit/includes/hooks/SidebarHookHandlersTest.php
M 
extensions/Wikibase/client/tests/phpunit/includes/recentchanges/ChangeLineFormatterTest.php
M 
extensions/Wikibase/client/tests/phpunit/includes/recentchanges/ExternalChangeFactoryTest.php
M 
extensions/Wikibase/client/tests/phpunit/includes/recentchanges/RecentChangesFilterOptionsTest.php
M 
extensions/Wikibase/client/tests/phpunit/includes/recentchanges/RevisionDataTest.php
M 
extensions/Wikibase/lib/resources/jquery.wikibase/jquery.wikibase.entityview.js
M 
extensions/Wikibase/lib/resources/jquery.wikibase/jquery.wikibase.sitelinkgrouplistview.js
M 
extensions/Wikibase/lib/resources/jquery.wikibase/jquery.wikibase.sitelinkgroupview.js
M 
extensions/Wikibase/lib/resources/jquery.wikibase/jquery.wikibase.sitelinklistview.js
M 
extensions/Wikibase/lib/resources/jquery.wikibase/jquery.wikibase.sitelinkview.js
M extensions/Wikibase/lib/resources/jquery.wikibase/resources.php
A 
extensions/Wikibase/lib/resources/jquery.wikibase/themes/default/jquery.wikibase.sitelinkgroupview.css
M extensions/Wikibase/lib/resources/templates.php
M 
extensions/Wikibase/lib/tests/qunit/jquery.wikibase/jquery.wikibase.sitelinkgroupview.tests.js
M 
extensions/Wikibase/lib/tests/qunit/jquery.wikibase/jquery.wikibase.sitelinklistview.tests.js
M 
extensions/Wikibase/lib/tests/qunit/jquery.wikibase/jquery.wikibase.sitelinkview.tests.js
M extensions/Wikibase/repo/i18n/en.json
M extensions/Wikibase/repo/i18n/pl.json
M extensions/Wikibase/repo/i18n/qqq.json
M extensions/Wikibase/repo/i18n/zh-hans.json
M extensions/Wikibase/repo/includes/View/SiteLinksView.php
M extensions/Wikibase/repo/includes/store/sql/DispatchStats.php
M extensions/Wikibase/repo/resources/wikibase.ui.entityViewInit.js
M 
extensions/Wikibase/repo/tests/phpunit/includes/store/sql/DispatchStatsTest.php
A package.json
M vendor/autoload.php
M vendor/composer/autoload_classmap.php
M vendor/composer/autoload_real.php
M vendor/composer/installed.json
43 files changed, 1,513 insertions(+), 528 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Wikidata 
refs/changes/64/162564/1

diff --git a/.gitignore b/.gitignore
index bc32ce0..3c3629e 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,2 +1 @@
-composer.lock
-node_modules/
+node_modules
diff --git a/Gruntfile.js b/Gruntfile.js
new file mode 100644
index 000..241633a
--- /dev/null
+++ b/Gruntfile.js
@@ -0,0 +1,30 @@
+'use strict';
+
+module.exports = function ( grunt ) {
+
+   grunt.initConfig( {
+   clean: {
+   build: {
+   src: [
+   'composer.lock',
+   'WikibaseClient.settings.php',
+   'WikibaseRepo.settings.php',
+   'extensions',
+   'vendor'
+   ]
+   }
+   },
+   exec: {
+   install: {
+   cmd: 'composer install --ansi --prefer-dist -o'
+   }
+   }
+   } );
+
+   grunt.loadNpmTasks( 'grunt-exec' );
+   grunt.loadNpmTasks( 'grunt-contrib-clean' );
+
+   grunt.registerTask( 'uninstall', [ 'clean:build' ] );
+   grunt.registerTask( 'install', [ 'clean:build', 'exec:install' ] );
+
+};
diff --git a/WikibaseClient.settings.php b/WikibaseClient.settings.php
index bdab637..8430e64 100644
--- a/WikibaseClient.settings.php
+++ b/WikibaseClient.settings.php
@@ -1,2 +1,2 @@
 ?php
-$wgWBClientSettings[sharedCacheKeyPrefix] = wikibase:WBL/1411487371;
\ No newline at end of file
+$wgWBClientSettings[sharedCacheKeyPrefix] = wikibase:WBL/1411556172;
\ No newline at end of file
diff --git a/WikibaseRepo.settings.php b/WikibaseRepo.settings.php
index 09e904d..bcec97f 100644
--- a/WikibaseRepo.settings.php

[MediaWiki-commits] [Gerrit] Add delete right to fawiki Image-reviewer - change (operations/mediawiki-config)

2014-09-24 Thread Reza (Code Review)
Reza has uploaded a new change for review.

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

Change subject: Add delete right to fawiki Image-reviewer
..

Add delete right to fawiki Image-reviewer

Bug: 71229
Change-Id: I4ed2b03ed480e52ebacf416c280e3f315f3bb5ad
---
M wmf-config/InitialiseSettings.php
1 file changed, 1 insertion(+), 1 deletion(-)


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

diff --git a/wmf-config/InitialiseSettings.php 
b/wmf-config/InitialiseSettings.php
index a5da8e9..a82c81d 100644
--- a/wmf-config/InitialiseSettings.php
+++ b/wmf-config/InitialiseSettings.php
@@ -7054,7 +7054,7 @@
'patroller' = array( 'patrol' = true, 'move-categorypages' = 
true ), // bug 65728
'rollbacker' = array( 'rollback' = true ), // bug 23233
'autopatrol' = array( 'autopatrol' = true, 
'move-categorypages' = true ), // bug 29007 and 65728
-   'Image-reviewer' = array( 'movefile' = true ), // bug 64532
+   'Image-reviewer' = array( 'movefile' = true, 'delete' = true 
), // bug 64532 and 71229
'uploader' = array( 'upload' = true, 'reupload' = true, 
'reupload-own' = true ), // bug 69171
'botadmin' = array(
'block' = true,

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I4ed2b03ed480e52ebacf416c280e3f315f3bb5ad
Gerrit-PatchSet: 1
Gerrit-Project: operations/mediawiki-config
Gerrit-Branch: master
Gerrit-Owner: Reza reza.ene...@gmail.com

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


[MediaWiki-commits] [Gerrit] Layout adjustments to reduce overlap with chevron - change (mediawiki...MultimediaViewer)

2014-09-24 Thread Pginer (Code Review)
Pginer has uploaded a new change for review.

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

Change subject: Layout adjustments to reduce overlap with chevron
..

Layout adjustments to reduce overlap with chevron

For files with long credit information, part of the text can get hidden
with the down-pointing chevron.
This patchset adjust sizes and margins of different elements to reduce that 
overlap.

Change-Id: I03f3b84d4ad0f754a0a20f2e78016711164ef433
---
M resources/mmv/ui/mmv.ui.metadataPanel.less
M resources/mmv/ui/mmv.ui.metadataPanelScroller.less
2 files changed, 4 insertions(+), 4 deletions(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/MultimediaViewer 
refs/changes/66/162566/1

diff --git a/resources/mmv/ui/mmv.ui.metadataPanel.less 
b/resources/mmv/ui/mmv.ui.metadataPanel.less
index ba59a31..26e475f 100644
--- a/resources/mmv/ui/mmv.ui.metadataPanel.less
+++ b/resources/mmv/ui/mmv.ui.metadataPanel.less
@@ -24,11 +24,11 @@
 
 .mw-mmv-title-para {
margin: 0;
-   padding: 10px 0 0;
+   padding: 8px 0 0;
 }
 .mw-mmv-credit {
margin: 0;
-   padding: 5px 0;
+   padding: 2px 0;
 }
 
 .mw-mmv-title {
diff --git a/resources/mmv/ui/mmv.ui.metadataPanelScroller.less 
b/resources/mmv/ui/mmv.ui.metadataPanelScroller.less
index 0bb2c73..0ac10bf 100644
--- a/resources/mmv/ui/mmv.ui.metadataPanelScroller.less
+++ b/resources/mmv/ui/mmv.ui.metadataPanelScroller.less
@@ -3,7 +3,7 @@
 @import mediawiki.mixins.animation;
 
 @drag-icon-width: 64px;
-@drag-icon-height: 18px;
+@drag-icon-height: 16px;
 @drag-icon-color: #e6e6e6;
 @drag-icon-invite-color: #347bff;
 
@@ -97,7 +97,7 @@
 
cursor: pointer;
z-index: 1; // make sure it is above the text - the icon is visually at 
the bottom but in the DOM at the top
-   .opacity(0.7);
+   .opacity(0.6);
transition: opacity 0.25s;
 
-pointing-down { // use single-class selector - chevron direction is 
important enough to make it IE6-compatible

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I03f3b84d4ad0f754a0a20f2e78016711164ef433
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/MultimediaViewer
Gerrit-Branch: master
Gerrit-Owner: Pginer pgi...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] [IMPROV] Use 'assertEqual' and 'assertRaisesRegex' - change (pywikibot/core)

2014-09-24 Thread XZise (Code Review)
XZise has uploaded a new change for review.

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

Change subject: [IMPROV] Use 'assertEqual' and 'assertRaisesRegex'
..

[IMPROV] Use 'assertEqual' and 'assertRaisesRegex'

In Python 3 'assertEquals' and 'assertRaisesRegexp' have been
deprecated. The new 'assertEqual' already exists in Python 2 but for
'assertRaisesRegex' a alias method was added (but not used everywhere).

Change-Id: Icfd0a61a48cc25886701ffa8b91f54881af553f0
---
M tests/api_tests.py
M tests/aspects.py
M tests/edit_failure_tests.py
M tests/i18n_tests.py
M tests/wikibase_tests.py
5 files changed, 14 insertions(+), 14 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/pywikibot/core 
refs/changes/67/162567/1

diff --git a/tests/api_tests.py b/tests/api_tests.py
index a06e6fa..9639ba8 100644
--- a/tests/api_tests.py
+++ b/tests/api_tests.py
@@ -96,7 +96,7 @@
 self.assertEqual(self.gen.limit, i)
 
 def test_wrong_limit_setting(self):
-with self.assertRaisesRegexp(
+with self.assertRaisesRegex(
 ValueError,
 invalid literal for int\(\) with base 10: 'test'):
 self.gen.set_maximum_items('test')
diff --git a/tests/aspects.py b/tests/aspects.py
index 1a2ba6d..f86171b 100644
--- a/tests/aspects.py
+++ b/tests/aspects.py
@@ -48,13 +48,13 @@
 Base class for all tests.
 
 if sys.version_info[0]  3:
-def assertRaisesRegex(self, *args):
+def assertRaisesRegex(self, *args, **kwargs):
 
 Wrapper of unittest.assertRaisesRegexp for Python 2 unittest.
 
 assertRaisesRegexp is deprecated in Python 3.
 
-return self.assertRaisesRegexp(*args)
+return self.assertRaisesRegexp(*args, **kwargs)
 
 
 class TestTimerMixin(TestCaseBase):
diff --git a/tests/edit_failure_tests.py b/tests/edit_failure_tests.py
index 1a11b33..57d3ffd 100644
--- a/tests/edit_failure_tests.py
+++ b/tests/edit_failure_tests.py
@@ -43,12 +43,12 @@
 Test that spam in content raise the appropriate exception.
 page = pywikibot.Page(self.site, 'Wikipedia:Sandbox')
 page.text = 'http://badsite.com'
-self.assertRaisesRegexp(SpamfilterError, 'badsite.com', page.save)
+self.assertRaisesRegex(SpamfilterError, 'badsite.com', page.save)
 
 def test_nobots(self):
 Test that {{nobots}} raise the appropriate exception.
 page = pywikibot.Page(self.site, 'User:John Vandenberg/nobots')
-self.assertRaisesRegexp(OtherPageSaveError, 'nobots', page.save)
+self.assertRaisesRegex(OtherPageSaveError, 'nobots', page.save)
 
 
 class TestActionFailure(TestCase):
diff --git a/tests/i18n_tests.py b/tests/i18n_tests.py
index 2d33274..c72870b 100644
--- a/tests/i18n_tests.py
+++ b/tests/i18n_tests.py
@@ -218,13 +218,13 @@
 
 def testMultipleWrongParameterLength(self):
 Test wrong parameter lenght.
-with self.assertRaisesRegexp(ValueError, Length of parameter does not 
match PLURAL occurences):
+with self.assertRaisesRegex(ValueError, Length of parameter does not 
match PLURAL occurences):
 self.assertEqual(
 i18n.twntranslate('de', 'test-multiple-plurals', (1, 2))
 % {'action': u'Ändere', 'line': u'drei'},
 u'Bot: Ändere drei Zeilen von mehreren Seiten.')
 
-with self.assertRaisesRegexp(ValueError, Length of parameter does not 
match PLURAL occurences):
+with self.assertRaisesRegex(ValueError, Length of parameter does not 
match PLURAL occurences):
 self.assertEqual(
 i18n.twntranslate('de', 'test-multiple-plurals', [321])
 % {'action': u'Ändere', 'line': u'dreihunderteinundzwanzig'},
@@ -232,19 +232,19 @@
 
 def testMultipleNonNumbers(self):
 Numbers or string numbers are required for tuple or list items.
-with self.assertRaisesRegexp(ValueError, invalid literal for int\(\) 
with base 10: 'drei'):
+with self.assertRaisesRegex(ValueError, invalid literal for int\(\) 
with base 10: 'drei'):
 self.assertEqual(
 i18n.twntranslate('de', 'test-multiple-plurals', [drei, 1, 
1])
 % {'action': u'Ändere', 'line': u'drei'},
 u'Bot: Ändere drei Zeilen von einer Seite.')
-with self.assertRaisesRegexp(ValueError, invalid literal for int\(\) 
with base 10: 'elf'):
+with self.assertRaisesRegex(ValueError, invalid literal for int\(\) 
with base 10: 'elf'):
 self.assertEqual(
 i18n.twntranslate('de', 'test-multiple-plurals',
   {'action': u'Ändere', 'line': elf, 'page': 
2}),
 u'Bot: Ändere elf Zeilen von mehreren Seiten.')
 
 def testAllParametersExist(self):
-with self.assertRaisesRegexp(KeyError, repr(u'line')):
+with 

[MediaWiki-commits] [Gerrit] Add 'unwatchedpages' right to 'patroller' user group on he.w... - change (operations/mediawiki-config)

2014-09-24 Thread Calak (Code Review)
Calak has uploaded a new change for review.

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

Change subject: Add 'unwatchedpages' right to 'patroller' user group on 
he.wikibooks
..

Add 'unwatchedpages' right to 'patroller' user group on he.wikibooks

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


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

diff --git a/wmf-config/InitialiseSettings.php 
b/wmf-config/InitialiseSettings.php
index a5da8e9..01e02c9 100644
--- a/wmf-config/InitialiseSettings.php
+++ b/wmf-config/InitialiseSettings.php
@@ -7129,6 +7129,7 @@
'patrolmarks' = true, // bug 27918
'autopatrol' = true, // bug 60305
'rollback' = true, // bug 60305
+   'unwatchedpages' = true, // bug 71193
),
'autopatrolled' = array( 'autopatrol' = true ), // bug 27918
),

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I43bee5d8b14ba82178d241edb7da5823e0d70c4e
Gerrit-PatchSet: 1
Gerrit-Project: operations/mediawiki-config
Gerrit-Branch: master
Gerrit-Owner: Calak calakw...@yahoo.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] WIP reproducing bug 69535 - change (mediawiki/selenium)

2014-09-24 Thread Zfilipin (Code Review)
Zfilipin has uploaded a new change for review.

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

Change subject: WIP reproducing bug 69535
..

WIP reproducing bug 69535

Change-Id: Ifb77509f3eefb7bee56106bab5e98864930e5811
---
A fonts.rb
1 file changed, 10 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/selenium 
refs/changes/69/162569/1

diff --git a/fonts.rb b/fonts.rb
new file mode 100644
index 000..24d7f27
--- /dev/null
+++ b/fonts.rb
@@ -0,0 +1,10 @@
+require selenium-webdriver
+driver = Selenium::WebDriver.for :firefox
+languages = [en, ja, zh-hans, zh-hant]
+
+languages.each do |language|
+  driver.get 
http://en.wikipedia.beta.wmflabs.org/wiki/Main_Page?uselang=#{language};
+  driver.save_screenshot #{language}.png
+end
+
+driver.quit

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ifb77509f3eefb7bee56106bab5e98864930e5811
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/selenium
Gerrit-Branch: master
Gerrit-Owner: Zfilipin zfili...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] dsh: Move dsh related code into a module - change (operations/puppet)

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

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

Change subject: dsh: Move dsh related code into a module
..

dsh: Move dsh related code into a module

Change-Id: Ic1bacaae8b3ef6fec2065ab8b63e72f3dcf6b2d5
---
M manifests/misc/deployment.pp
D manifests/misc/dsh.pp
M manifests/misc/icinga.pp
M manifests/role/apachesync.pp
M manifests/site.pp
R modules/dsh/files/dsh.conf
R modules/dsh/files/group/ALL
R modules/dsh/files/group/ams
R modules/dsh/files/group/amssq
R modules/dsh/files/group/analytics
R modules/dsh/files/group/apache-eqiad
R modules/dsh/files/group/apaches
R modules/dsh/files/group/api
R modules/dsh/files/group/bits
R modules/dsh/files/group/bits_esams
R modules/dsh/files/group/cp1
R modules/dsh/files/group/db
R modules/dsh/files/group/eqiad.text
R modules/dsh/files/group/eqiad.upload
R modules/dsh/files/group/esams_ext_store
R modules/dsh/files/group/ext-store-masters
R modules/dsh/files/group/ext-stores
R modules/dsh/files/group/image_scalers
R modules/dsh/files/group/image_stores
R modules/dsh/files/group/job-runners
R modules/dsh/files/group/job-runners-eqiad
R modules/dsh/files/group/knams.text
R modules/dsh/files/group/knams.upload
R modules/dsh/files/group/knsq
R modules/dsh/files/group/lucene_eqiad
R modules/dsh/files/group/mc_eqiad
R modules/dsh/files/group/mediawiki-installation
R modules/dsh/files/group/misc_eqiad
R modules/dsh/files/group/misc_esams
R modules/dsh/files/group/misc_frack
R modules/dsh/files/group/misc_pmtpa
R modules/dsh/files/group/misc_ulsfo
R modules/dsh/files/group/mobile
R modules/dsh/files/group/mw
R modules/dsh/files/group/mw-eqiad
R modules/dsh/files/group/mw-pmtpa
R modules/dsh/files/group/mysql
R modules/dsh/files/group/mysql-secondary
R modules/dsh/files/group/parsoid
R modules/dsh/files/group/pmtpa
R modules/dsh/files/group/scap-proxies
R modules/dsh/files/group/search
R modules/dsh/files/group/snapshot
R modules/dsh/files/group/ssl
R modules/dsh/files/group/testwikipedia
R modules/dsh/files/group/varnish-upload-eqiad
R modules/dsh/files/group/varnishncsa-all
A modules/dsh/manifests/dsh.pp
A modules/dsh/manifests/monitor.pp
54 files changed, 56 insertions(+), 51 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/70/162570/1

diff --git a/manifests/misc/deployment.pp b/manifests/misc/deployment.pp
index eb94f62..0fee3ec 100644
--- a/manifests/misc/deployment.pp
+++ b/manifests/misc/deployment.pp
@@ -4,8 +4,8 @@
 
 class misc::deployment {
 system::role { 'misc::deployment': description = 'Deployment host' }
-include misc::deployment::scap_primary,
-misc::dsh
+include misc::deployment::scap_primary
+include dsh
 }
 
 class misc::deployment::common_scripts {
diff --git a/manifests/misc/dsh.pp b/manifests/misc/dsh.pp
deleted file mode 100644
index b4f9bbb..000
--- a/manifests/misc/dsh.pp
+++ /dev/null
@@ -1,45 +0,0 @@
-# == Class misc::dsh
-#
-# Standard installation of dsh (Dancer's distributed shell)
-#
-class misc::dsh {
-package { 'dsh':
-ensure = present,
-}
-include files
-
-class files {
-file { '/etc/dsh':
-ensure = directory,
-owner  = 'root',
-group  = 'root',
-mode   = '0444',
-}
-file { '/etc/dsh/group':
-owner   = 'root',
-group   = 'root',
-mode= '0444',
-source  = 'puppet:///files/dsh/group',
-recurse = true,
-}
-file { '/etc/dsh/dsh.conf':
-owner  = 'root',
-group  = 'root',
-mode   = '0444',
-source = 'puppet:///files/dsh/dsh.conf',
-}
-}
-}
-
-# == Define dsh_groups
-#
-# Checks that this host belongs to dsh group(s)
-#
-define dsh_groups( $groups = [] ) {
-$groups_string = join( $groups, ' ' )
-
-monitor_service { 'dsh':
-description   = 'dsh groups',
-check_command = check_dsh_groups!${groups_string},
-}
-}
diff --git a/manifests/misc/icinga.pp b/manifests/misc/icinga.pp
index b611778..518d0ef 100644
--- a/manifests/misc/icinga.pp
+++ b/manifests/misc/icinga.pp
@@ -42,7 +42,7 @@
 include icinga::monitor::wikidata
 include icinga::user
 include lvs::monitor
-include misc::dsh::files
+include dsh::config
 include mysql
 include nagios::gsbmonitoring
 include nrpe
diff --git a/manifests/role/apachesync.pp b/manifests/role/apachesync.pp
index bcb8905..6c517d6 100644
--- a/manifests/role/apachesync.pp
+++ b/manifests/role/apachesync.pp
@@ -6,7 +6,7 @@
 }
 
 include ::apachesync
-include misc::dsh
+include dsh
 include rsync::server
 include network::constants
 
diff --git a/manifests/site.pp b/manifests/site.pp
index 897673e..b53fb47 100644
--- a/manifests/site.pp
+++ b/manifests/site.pp
@@ -360,7 +360,7 @@
 
 include bastionhost
 include 

[MediaWiki-commits] [Gerrit] Add more retry logic to reindexing - change (mediawiki...CirrusSearch)

2014-09-24 Thread Manybubbles (Code Review)
Manybubbles has uploaded a new change for review.

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

Change subject: Add more retry logic to reindexing
..

Add more retry logic to reindexing

Used to be we'd only retry on document write error.  Now we'll retry on
a query error too!

Change-Id: Ic037f0901984671679a46d1e894f69edee888136
(cherry picked from commit ad34398a01a2b74623fd8c9590c9876e56e72d06)
---
M maintenance/updateOneSearchIndexConfig.php
1 file changed, 18 insertions(+), 15 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/CirrusSearch 
refs/changes/71/162571/1

diff --git a/maintenance/updateOneSearchIndexConfig.php 
b/maintenance/updateOneSearchIndexConfig.php
index b3ca52f..fdcf3f9 100644
--- a/maintenance/updateOneSearchIndexConfig.php
+++ b/maintenance/updateOneSearchIndexConfig.php
@@ -775,12 +775,16 @@
$this-output( $this-indent . $messagePrefix . About 
to reindex $totalDocsToReindex documents\n );
$operationStartTime = microtime( true );
$completed = 0;
+   $self = $this;
while ( true ) {
wfProfileIn( __METHOD__ . '::receiveDocs' );
-   $result = $this-getIndex()-search( array(), 
array(
-   'scroll_id' = 
$result-getResponse()-getScrollId(),
-   'scroll' = '1h'
-   ) );
+   $result = $this-withRetry( 
$this-reindexRetryAttempts, $messagePrefix, 'fetching documents to reindex',
+   function() use ( $self, $result ) {
+   return 
$self-getIndex()-search( array(), array(
+   'scroll_id' = 
$result-getResponse()-getScrollId(),
+   'scroll' = '1h'
+   ) );
+   } );
wfProfileOut( __METHOD__ . '::receiveDocs' );
if ( !$result-count() ) {
$this-output( $this-indent . 
$messagePrefix . All done\n );
@@ -802,7 +806,10 @@
$result-next();
}
wfProfileOut( __METHOD__ . '::packageDocs' );
-   $this-sendDocumentsWithRetry( $messagePrefix, 
$documents );
+   $this-withRetry( $this-reindexRetryAttempts, 
$messagePrefix, 'retrying as singles',
+   function() use ( $self, $messagePrefix, 
$documents ) {
+   $self-sendDocuments( 
$messagePrefix, $documents );
+   } );
$completed += $result-count();
$rate = round( $completed / ( microtime( true ) 
- $operationStartTime ) );
$this-output( $this-indent . $messagePrefix .
@@ -831,15 +838,12 @@
}
}
 
-   private function sendDocumentsWithRetry( $messagePrefix, $documents ) {
-   $profiler = new ProfileSection( __METHOD__ );
-
+   private function withRetry( $attempts, $messagePrefix, $description, 
$func ) {
$errors = 0;
while ( true ) {
-   if ( $errors  $this-reindexRetryAttempts ) {
+   if ( $errors  $attempts ) {
try {
-   $this-sendDocuments( $messagePrefix, 
$documents );
-   return;
+   return $func();
} catch ( 
\Elastica\Exception\ExceptionInterface $e ) {
$errors += 1;
// Random backoff with lowest possible 
upper bound as 16 seconds.
@@ -847,13 +851,12 @@
$seconds = rand( 1, pow( 2, 3 + $errors 
) );
$type = get_class( $e );
$message = 
ElasticsearchIntermediary::extractMessage( $e );
-   $this-output( $this-indent . 
$messagePrefix . Caught an error retrying as singles.   .
-   Backing off for $seconds and 
retrying.  Error type is '$type' and message is:  $message );
+   $this-output( $this-indent . 
$messagePrefix . Caught an error $description.   .
+   Backing off for $seconds and 
retrying.  

[MediaWiki-commits] [Gerrit] New Wikidata Build - 24/09/2014 - change (mediawiki...Wikidata)

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

Change subject: New Wikidata Build - 24/09/2014
..


New Wikidata Build - 24/09/2014

Change-Id: Ie4bf75a5ae50065e907b41fc5b7a33622c8d1f49
---
M .gitignore
A Gruntfile.js
M WikibaseClient.settings.php
M WikibaseRepo.settings.php
M composer.lock
M extensions/Wikibase/client/WikibaseClient.hooks.php
M extensions/Wikibase/client/WikibaseClient.php
M extensions/Wikibase/client/includes/hooks/SidebarHookHandlers.php
M extensions/Wikibase/client/includes/recentchanges/ChangeLineFormatter.php
M extensions/Wikibase/client/includes/recentchanges/ExternalChange.php
M extensions/Wikibase/client/includes/recentchanges/ExternalChangeFactory.php
M extensions/Wikibase/client/includes/recentchanges/ExternalRecentChange.php
M 
extensions/Wikibase/client/includes/recentchanges/RecentChangesFilterOptions.php
M extensions/Wikibase/client/includes/recentchanges/RevisionData.php
M 
extensions/Wikibase/client/tests/phpunit/includes/hooks/SidebarHookHandlersTest.php
M 
extensions/Wikibase/client/tests/phpunit/includes/recentchanges/ChangeLineFormatterTest.php
M 
extensions/Wikibase/client/tests/phpunit/includes/recentchanges/ExternalChangeFactoryTest.php
M 
extensions/Wikibase/client/tests/phpunit/includes/recentchanges/RecentChangesFilterOptionsTest.php
M 
extensions/Wikibase/client/tests/phpunit/includes/recentchanges/RevisionDataTest.php
M 
extensions/Wikibase/lib/resources/jquery.wikibase/jquery.wikibase.entityview.js
M 
extensions/Wikibase/lib/resources/jquery.wikibase/jquery.wikibase.sitelinkgrouplistview.js
M 
extensions/Wikibase/lib/resources/jquery.wikibase/jquery.wikibase.sitelinkgroupview.js
M 
extensions/Wikibase/lib/resources/jquery.wikibase/jquery.wikibase.sitelinklistview.js
M 
extensions/Wikibase/lib/resources/jquery.wikibase/jquery.wikibase.sitelinkview.js
M extensions/Wikibase/lib/resources/jquery.wikibase/resources.php
A 
extensions/Wikibase/lib/resources/jquery.wikibase/themes/default/jquery.wikibase.sitelinkgroupview.css
M extensions/Wikibase/lib/resources/templates.php
M 
extensions/Wikibase/lib/tests/qunit/jquery.wikibase/jquery.wikibase.sitelinkgroupview.tests.js
M 
extensions/Wikibase/lib/tests/qunit/jquery.wikibase/jquery.wikibase.sitelinklistview.tests.js
M 
extensions/Wikibase/lib/tests/qunit/jquery.wikibase/jquery.wikibase.sitelinkview.tests.js
M extensions/Wikibase/repo/i18n/en.json
M extensions/Wikibase/repo/i18n/pl.json
M extensions/Wikibase/repo/i18n/qqq.json
M extensions/Wikibase/repo/i18n/zh-hans.json
M extensions/Wikibase/repo/includes/View/SiteLinksView.php
M extensions/Wikibase/repo/includes/store/sql/DispatchStats.php
M extensions/Wikibase/repo/resources/wikibase.ui.entityViewInit.js
M 
extensions/Wikibase/repo/tests/phpunit/includes/store/sql/DispatchStatsTest.php
A package.json
M vendor/autoload.php
M vendor/composer/autoload_classmap.php
M vendor/composer/autoload_real.php
M vendor/composer/installed.json
43 files changed, 1,513 insertions(+), 528 deletions(-)

Approvals:
  Tobias Gritschacher: Verified; Looks good to me, approved
  WikidataJenkins: Verified



diff --git a/.gitignore b/.gitignore
index bc32ce0..3c3629e 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,2 +1 @@
-composer.lock
-node_modules/
+node_modules
diff --git a/Gruntfile.js b/Gruntfile.js
new file mode 100644
index 000..241633a
--- /dev/null
+++ b/Gruntfile.js
@@ -0,0 +1,30 @@
+'use strict';
+
+module.exports = function ( grunt ) {
+
+   grunt.initConfig( {
+   clean: {
+   build: {
+   src: [
+   'composer.lock',
+   'WikibaseClient.settings.php',
+   'WikibaseRepo.settings.php',
+   'extensions',
+   'vendor'
+   ]
+   }
+   },
+   exec: {
+   install: {
+   cmd: 'composer install --ansi --prefer-dist -o'
+   }
+   }
+   } );
+
+   grunt.loadNpmTasks( 'grunt-exec' );
+   grunt.loadNpmTasks( 'grunt-contrib-clean' );
+
+   grunt.registerTask( 'uninstall', [ 'clean:build' ] );
+   grunt.registerTask( 'install', [ 'clean:build', 'exec:install' ] );
+
+};
diff --git a/WikibaseClient.settings.php b/WikibaseClient.settings.php
index bdab637..8430e64 100644
--- a/WikibaseClient.settings.php
+++ b/WikibaseClient.settings.php
@@ -1,2 +1,2 @@
 ?php
-$wgWBClientSettings[sharedCacheKeyPrefix] = wikibase:WBL/1411487371;
\ No newline at end of file
+$wgWBClientSettings[sharedCacheKeyPrefix] = wikibase:WBL/1411556172;
\ No newline at end of file
diff --git a/WikibaseRepo.settings.php b/WikibaseRepo.settings.php
index 09e904d..bcec97f 100644
--- a/WikibaseRepo.settings.php
+++ 

[MediaWiki-commits] [Gerrit] [FEAT] Deprecrate module classes and variables - change (pywikibot/core)

2014-09-24 Thread XZise (Code Review)
XZise has uploaded a new change for review.

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

Change subject: [FEAT] Deprecrate module classes and variables
..

[FEAT] Deprecrate module classes and variables

This adds a way to deprecrate classes or variables in modules. The
difference to '@deprecated' is that the access alone is important and
not calling the function. So this warns also if someone is just
importing a class (e.g. 'from pywikibot.excptions import
UploadWarning').

Unfortunately __getattr__ is not available on module level, so the
module must be wrapped in a class which redirects all accesses.

Change-Id: I3e83472ba780d9d99745c8dff864926432e9f254
---
M pywikibot/exceptions.py
M pywikibot/tools.py
2 files changed, 79 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/pywikibot/core 
refs/changes/72/162572/1

diff --git a/pywikibot/exceptions.py b/pywikibot/exceptions.py
index ed620e1..acd398b 100644
--- a/pywikibot/exceptions.py
+++ b/pywikibot/exceptions.py
@@ -374,6 +374,8 @@
 pass
 
 
-# TODO: Warn about the deprecated usage
 import pywikibot.data.api
-UploadWarning = pywikibot.data.api.UploadWarning
+import pywikibot.tools
+pywikibot.tools.ModuleWrapper(__name__, [
+('UploadWarning', pywikibot.data.api.UploadWarning)
+])
diff --git a/pywikibot/tools.py b/pywikibot/tools.py
index 10c78f6..13ee6c0 100644
--- a/pywikibot/tools.py
+++ b/pywikibot/tools.py
@@ -15,6 +15,7 @@
 
 if sys.version_info[0]  2:
 import queue as Queue
+basestring = (str,)
 else:
 import Queue
 
@@ -375,6 +376,80 @@
 return Wrapper().call
 
 
+class ModuleWrapper(object):
+
+A wrapper for a module to deprecate classes or variables of it.
+
+def __init__(self, module, deprecated):
+
+Initialise the wrapper.
+
+It will automatically overwrite the module with this instance in
+C{sys.modules}.
+
+@param module: The module name or instance
+@type module: str or module
+@param deprecated: The names of all classes (variables) which are
+deprecated. The module name is automatically added. The second
+value in the tuple may be None to indicate no (direct) replacement.
+If a third value is present it'll return that value (so it mustn't
+exist in the module). If the second value is not a string and a
+third value is not present it'll use that value and guess the name
+of that value.
+@type deprecated: iterable containing (str) or (str, str) or
+(str, any) or (str, str, any) (it may be mixed)
+
+if isinstance(module, basestring):
+module = sys.modules[module]
+deprecate_dict = {}
+for entry in deprecated:
+# only module level classes/variables may be in this dict
+if '.' in entry[0]:
+raise ValueError('Deprecate argument {0} contains ., '
+ 'skipped.'.format(entry[0]))
+continue
+if len(entry) == 1:
+tgt, val = None
+elif len(entry) == 3:
+tgt = entry[1]
+val = entry[2]
+elif len(entry) != 2:
+print(entry)
+raise ValueError('Deprecate argument {0} must contain one '
+ 'to three values.'.format(entry))
+elif not isinstance(entry[1], basestring):
+val = entry[1]
+tgt = val.__module__
+if hasattr(val, '__self__'):
+tgt += '.' + val.__self__.__class__.__name__
+tgt += '.' + val.__name__
+else:
+val = None
+tgt = entry[1]
+deprecate_dict[entry[0]] = (tgt, val)
+super(ModuleWrapper, self).__setattr__('_deprecated', deprecate_dict)
+super(ModuleWrapper, self).__setattr__('_module', module)
+sys.modules[module.__name__] = self
+
+def __setattr__(self, attr, value):
+Set a the value of the wrapped module.
+setattr(self._module, attr, value)
+
+def __getattr__(self, attr):
+Return the attribute with with a deprecation warning if required.
+if attr in self._deprecated:
+if self._deprecated[attr][0]:
+warning(u{0}.{1} is DEPRECATED, use {2} instead..format(
+self._module.__name__, attr,
+self._deprecated[attr][0]))
+if self._deprecated[attr][1]:
+return self._deprecated[attr][1]
+else:
+warning(u{0}.{1} is DEPRECATED..format(
+self._module.__name__, attr))
+return getattr(self._module, attr)
+
+
 if __name__ == __main__:
 def _test():
 import doctest

-- 
To view, visit https://gerrit.wikimedia.org/r/162572
To 

[MediaWiki-commits] [Gerrit] Refactor EntityStore - change (mediawiki...Wikibase)

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

Change subject: Refactor EntityStore
..


Refactor EntityStore

Change-Id: If8cfe64020d056fda028c9dc8f275ee6eb4a65c7
---
M lib/resources/Resources.php
M lib/resources/jquery.wikibase/jquery.wikibase.claimview.js
M lib/resources/wikibase.RepoApi/resources.php
M lib/resources/wikibase.RepoApi/wikibase.AbstractedRepoApi.js
D lib/resources/wikibase.compileEntityStoreFromMwConfig.js
M lib/resources/wikibase.store/resources.php
A lib/resources/wikibase.store/store.ApiEntityStore.js
A lib/resources/wikibase.store/store.CombiningEntityStore.js
M lib/resources/wikibase.store/store.EntityStore.js
M lib/resources/wikibase.store/store.FetchedContentUnserializer.js
A lib/resources/wikibase.store/store.MwConfigEntityStore.js
M lib/tests/qunit/jquery.wikibase/jquery.wikibase.claimview.tests.js
M lib/tests/qunit/jquery.wikibase/jquery.wikibase.referenceview.tests.js
M lib/tests/qunit/jquery.wikibase/jquery.wikibase.sitelinkgroupview.tests.js
M lib/tests/qunit/jquery.wikibase/jquery.wikibase.sitelinklistview.tests.js
M lib/tests/qunit/jquery.wikibase/jquery.wikibase.sitelinkview.tests.js
M lib/tests/qunit/jquery.wikibase/jquery.wikibase.snaklistview.tests.js
M lib/tests/qunit/jquery.wikibase/resources.php
M lib/tests/qunit/resources.php
M lib/tests/qunit/wikibase.RepoApi/wikibase.RepoApi.tests.js
D lib/tests/qunit/wikibase.compileEntityStoreFromMwConfig.tests.js
R lib/tests/qunit/wikibase.store/store.CombiningEntityStore.tests.js
A lib/tests/qunit/wikibase.store/store.MwConfigEntityStore.tests.js
M repo/resources/Resources.php
M repo/resources/wikibase.ui.entityViewInit.js
25 files changed, 407 insertions(+), 350 deletions(-)

Approvals:
  Tobias Gritschacher: Verified
  Henning Snater: Looks good to me, approved



diff --git a/lib/resources/Resources.php b/lib/resources/Resources.php
index 1b867a6..2eca041 100644
--- a/lib/resources/Resources.php
+++ b/lib/resources/Resources.php
@@ -67,21 +67,6 @@
'scripts' = 'templates.js',
),
 
-   'wikibase.compileEntityStoreFromMwConfig' = $moduleTemplate + 
array(
-   'scripts' = array(
-   'wikibase.compileEntityStoreFromMwConfig.js',
-   ),
-   'dependencies' = array(
-   'json',
-   'wikibase',
-   'wikibase.serialization',
-   'wikibase.serialization.entities',
-   'wikibase.store.FetchedContent',
-   'wikibase.store.FetchedContentUnserializer',
-   'wikibase.datamodel',
-   ),
-   ),
-
'wikibase' = $moduleTemplate + array(
'scripts' = array(
'wikibase.js',
diff --git a/lib/resources/jquery.wikibase/jquery.wikibase.claimview.js 
b/lib/resources/jquery.wikibase/jquery.wikibase.claimview.js
index 307b14a..f16f25d 100644
--- a/lib/resources/jquery.wikibase/jquery.wikibase.claimview.js
+++ b/lib/resources/jquery.wikibase/jquery.wikibase.claimview.js
@@ -156,12 +156,6 @@
var self = this;
this._claim = this.option( 'value' );
 
-   var entityStore = this.option( 'entityStore' );
-
-   if( !( entityStore instanceof wb.store.EntityStore ) ) {
-   throw new Error( 'Entity store needs to be set' );
-   }
-
// call template creation, this will require this._claim in 
template params callback!
PARENT.prototype._create.call( this );
 
@@ -178,7 +172,7 @@
value: this.mainSnak() || {},
locked: this.option( 'locked' ).mainSnak,
autoStartEditing: false, // manually, after toolbar is 
there, so events can access toolbar
-   entityStore: entityStore,
+   entityStore: this.options.entityStore,
valueViewBuilder: this.option( 'valueViewBuilder' )
} );
 
@@ -203,7 +197,7 @@
var oldHelpMessage = this.options.helpMessage;
this.options.helpMessage = deferred.promise();
 
-   entityStore.get( property ).done( function( 
fetchedProperty ) {
+   this.options.entityStore.get( property ).done( 
function( fetchedProperty ) {
var helpMessage;
if( fetchedProperty ) {
helpMessage = mw.msg(
diff --git a/lib/resources/wikibase.RepoApi/resources.php 
b/lib/resources/wikibase.RepoApi/resources.php
index 4c03897..adc3e24 100644
--- a/lib/resources/wikibase.RepoApi/resources.php
+++ 

[MediaWiki-commits] [Gerrit] Selections: Clean up work for selections - change (mediawiki...ContentTranslation)

2014-09-24 Thread Jsahleen (Code Review)
Jsahleen has uploaded a new change for review.

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

Change subject: Selections: Clean up work for selections
..

Selections: Clean up work for selections

* Removed unnecessary hook fire from LinkTool to resolve blinking issue

* Updated pasteHTML function in Selection class.

* Changed location of selection restore code in MT tool.

Change-Id: I2ed8d92f77c90296044cb6c0b3a68875e0060682
---
M modules/tools/ext.cx.tools.link.js
M modules/tools/ext.cx.tools.mt.js
M modules/util/ext.cx.util.selection.js
3 files changed, 13 insertions(+), 7 deletions(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/ContentTranslation 
refs/changes/73/162573/1

diff --git a/modules/tools/ext.cx.tools.link.js 
b/modules/tools/ext.cx.tools.link.js
index 14a298d..f481b10 100644
--- a/modules/tools/ext.cx.tools.link.js
+++ b/modules/tools/ext.cx.tools.link.js
@@ -562,7 +562,6 @@
// If text is selected, create a new internal link
if ( isValidSelection( selection )  this.$link ) {
$targetLink = this.createInternalLink( 
selection.toString(), targetTitle, this.$link.data( 'linkid' ) );
-   mw.hook( 'mw.cx.select.link' ).fire( $targetLink );
}
};
 
diff --git a/modules/tools/ext.cx.tools.mt.js b/modules/tools/ext.cx.tools.mt.js
index 5a5cf3a..88e75f3 100644
--- a/modules/tools/ext.cx.tools.mt.js
+++ b/modules/tools/ext.cx.tools.mt.js
@@ -280,9 +280,6 @@
 
// Set the main label
this.$providerSelectorTrigger.text( this.getProviderTitle( 
providerId ) );
-
-   // Restore the selection in the translation
-   mw.cx.selection.restore( 'translation' );
};
 
MTControlCard.prototype.listen = function () {
@@ -353,10 +350,14 @@
 * @return {jQuery}
 */
MTControlCard.prototype.getProviderItem = function ( id ) {
+   var cxMtCard = this;
return $( 'li' )
.text( this.getProviderTitle( id ) )
.prop( 'id', providerIdPrefix + id )
-   .on( 'click', $.proxy( this.selectProvider, this, id ) 
);
+   .on( 'click', function () {
+   cxMtCard.selectProvider( id );
+   mw.cx.selection.restore( 'translation' );
+   } );
};
 
MTControlCard.prototype.start = function ( $section ) {
diff --git a/modules/util/ext.cx.util.selection.js 
b/modules/util/ext.cx.util.selection.js
index c779b7e..5a5d1f4 100644
--- a/modules/util/ext.cx.util.selection.js
+++ b/modules/util/ext.cx.util.selection.js
@@ -135,12 +135,14 @@
 * @param {string} rangeToRestore, key for the range to restore
 */
Selection.prototype.pasteHTML = function ( html, rangeToRestore ) {
-   var range, el, frag, node, lastNode;
+   var selection, range, el, frag, node, lastNode;
+
+   selection = this.get();
 
if ( rangeToRestore ) {
range = this.ranges[ rangeToRestore ];
} else {
-   range = getRange( this.get() );
+   range = getRange( selection );
}
 
if ( window.getSelection ) {
@@ -154,8 +156,12 @@
range.insertNode( frag );
 
if ( lastNode ) {
+   range = range.cloneRange();
range.setStartAfter( lastNode );
range.collapse( true );
+   selection.removeAllRanges();
+   selection.addRange( range );
+   this.save( 'translation', selection );
}
 
} else if ( range.pasteHTML ) {

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I2ed8d92f77c90296044cb6c0b3a68875e0060682
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/ContentTranslation
Gerrit-Branch: master
Gerrit-Owner: Jsahleen jsahl...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] openstreetmap syncing should use less memory - change (operations/puppet)

2014-09-24 Thread Alexandros Kosiaris (Code Review)
Alexandros Kosiaris has uploaded a new change for review.

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

Change subject: openstreetmap syncing should use less memory
..

openstreetmap syncing should use less memory

There is no reason for osm2pgsql to use so much memory, in fact it is a
liability since it may fail for whatever reason. The probability of the
above is increased due to the way osm2pgsql relies on VM management

Change-Id: Ibbd2abeadb670422eca7173783134893945fe708
---
M modules/osm/manifests/planet_sync.pp
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/74/162574/1

diff --git a/modules/osm/manifests/planet_sync.pp 
b/modules/osm/manifests/planet_sync.pp
index 6ef137c..2ad893d 100644
--- a/modules/osm/manifests/planet_sync.pp
+++ b/modules/osm/manifests/planet_sync.pp
@@ -37,7 +37,7 @@
 content = template('osm/osmosis_configuration.txt.erb'),
 }
 
-$sync_planet_cmd = inline_template(%- data=@memoryfree.split(' '); 
multi={'MB' = 1, 'GB' = 1000}[data[1]]-%/usr/bin/osmosis 
--read-replication-interval workingDirectory=%= @osmosis_dir % 
--simplify-change --write-xml-change - | /usr/bin/osm2pgsql -k -s -C %= 
data[0].to_i*multi % --number-processes %= @processorcount % --append -)
+$sync_planet_cmd = inline_template(%- data=@memoryfree.split(' '); 
multi={'MB' = 1, 'GB' = 1000}[data[1]]-%/usr/bin/osmosis 
--read-replication-interval workingDirectory=%= @osmosis_dir % 
--simplify-change --write-xml-change - | /usr/bin/osm2pgsql -k -s -C %= 
data[0].to_i/10*multi % --number-processes %= @processorcount % --append -)
 cron { planet_sync-${name}:
 environment = JAVACMD_OPTIONS='-Dhttp.proxyHost=webproxy.eqiad.wmnet 
-Dhttp.proxyPort=8080',
 command = $sync_planet_cmd,

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ibbd2abeadb670422eca7173783134893945fe708
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Alexandros Kosiaris akosia...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] openstreetmap syncing should use less memory - change (operations/puppet)

2014-09-24 Thread Alexandros Kosiaris (Code Review)
Alexandros Kosiaris has submitted this change and it was merged.

Change subject: openstreetmap syncing should use less memory
..


openstreetmap syncing should use less memory

There is no reason for osm2pgsql to use so much memory, in fact it is a
liability since it may fail for whatever reason. The probability of the
above is increased due to the way osm2pgsql relies on VM management
While at it log the last run at /tmp/osmosis.log

Change-Id: Ibbd2abeadb670422eca7173783134893945fe708
---
M modules/osm/manifests/planet_sync.pp
1 file changed, 2 insertions(+), 3 deletions(-)

Approvals:
  Alexandros Kosiaris: Verified; Looks good to me, approved



diff --git a/modules/osm/manifests/planet_sync.pp 
b/modules/osm/manifests/planet_sync.pp
index 6ef137c..788225d 100644
--- a/modules/osm/manifests/planet_sync.pp
+++ b/modules/osm/manifests/planet_sync.pp
@@ -14,7 +14,6 @@
 #
 # Sample Usage:
 #  osm::planet_sync { 'mydb': }
-#
 define osm::planet_sync(
 $osmosis_dir='/srv/osmosis',
 $period='minute',
@@ -37,10 +36,10 @@
 content = template('osm/osmosis_configuration.txt.erb'),
 }
 
-$sync_planet_cmd = inline_template(%- data=@memoryfree.split(' '); 
multi={'MB' = 1, 'GB' = 1000}[data[1]]-%/usr/bin/osmosis 
--read-replication-interval workingDirectory=%= @osmosis_dir % 
--simplify-change --write-xml-change - | /usr/bin/osm2pgsql -k -s -C %= 
data[0].to_i*multi % --number-processes %= @processorcount % --append -)
+$sync_planet_cmd = inline_template(%- data=@memoryfree.split(' '); 
multi={'MB' = 1, 'GB' = 1000}[data[1]]-%/usr/bin/osmosis 
--read-replication-interval workingDirectory=%= @osmosis_dir % 
--simplify-change --write-xml-change - | /usr/bin/osm2pgsql -k -s -C %= 
data[0].to_i/10*multi % --number-processes %= @processorcount % --append -)
 cron { planet_sync-${name}:
 environment = JAVACMD_OPTIONS='-Dhttp.proxyHost=webproxy.eqiad.wmnet 
-Dhttp.proxyPort=8080',
-command = $sync_planet_cmd,
+command = $sync_planet_cmd  /tmp/osmosis.log 21,
 user= 'postgres',
 hour= $hour,
 minute  = $minute,

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ibbd2abeadb670422eca7173783134893945fe708
Gerrit-PatchSet: 2
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Alexandros Kosiaris akosia...@wikimedia.org
Gerrit-Reviewer: Alexandros Kosiaris akosia...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] Make gate-and-submit high priority - change (integration/zuul-config)

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

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

Change subject: Make gate-and-submit high priority
..

Make gate-and-submit high priority

Change-Id: I824a98defb826d09f03fe07d8e35153218d2e751
---
M layout.yaml
1 file changed, 1 insertion(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/integration/zuul-config 
refs/changes/75/162575/1

diff --git a/layout.yaml b/layout.yaml
index d224e37..f2f6fde 100644
--- a/layout.yaml
+++ b/layout.yaml
@@ -255,6 +255,7 @@
 description: 
   Patchsets that have been reviewed. Will be merged by Jenkins if tests 
pass.
 manager: DependentPipelineManager
+precedence: high
 trigger:
   gerrit:
 - event: comment-added

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I824a98defb826d09f03fe07d8e35153218d2e751
Gerrit-PatchSet: 1
Gerrit-Project: integration/zuul-config
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] Make gate-and-submit high priority - change (integration/zuul-config)

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

Change subject: Make gate-and-submit high priority
..


Make gate-and-submit high priority

Change-Id: I824a98defb826d09f03fe07d8e35153218d2e751
---
M layout.yaml
1 file changed, 1 insertion(+), 0 deletions(-)

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



diff --git a/layout.yaml b/layout.yaml
index d224e37..f2f6fde 100644
--- a/layout.yaml
+++ b/layout.yaml
@@ -255,6 +255,7 @@
 description: 
   Patchsets that have been reviewed. Will be merged by Jenkins if tests 
pass.
 manager: DependentPipelineManager
+precedence: high
 trigger:
   gerrit:
 - event: comment-added

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I824a98defb826d09f03fe07d8e35153218d2e751
Gerrit-PatchSet: 1
Gerrit-Project: integration/zuul-config
Gerrit-Branch: master
Gerrit-Owner: Hashar has...@free.fr
Gerrit-Reviewer: Hashar has...@free.fr
Gerrit-Reviewer: jenkins-bot 

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


[MediaWiki-commits] [Gerrit] Make tiff thumbnail in 2 steps. - change (mediawiki...PagedTiffHandler)

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

Change subject: Make tiff thumbnail in 2 steps.
..


Make tiff thumbnail in 2 steps.

Tiffs can be really big to transfer around all over the place, the
largest one at commons is 1 gb. So instead render first to ~2048px,
and then downsize from that.

Vips has a quirk where it is much more memory efficient if the
factor we are shrinking by is precisely an integer. In order to
take advantage of that, this doesn't use core's bucketting system.

This only uses a single intermidary step. In the future it could be
extended fairly easily, but I think it would be good to start here,
and evaluate if a more complex system would be useful after doing
just the single step.

I've tested this patch with the largest resolution tiff file
currently on commons ([[File:Zoomit2.tif]]). Locally it renders
that file within the resource limits that production has.

This change requires Id3a8b25a598 in core.

Bug: 52045
Change-Id: Ifdcb93ea9198f32f0684cf90d4214afe09051000
---
M PagedTiffHandler.php
M PagedTiffHandler_body.php
M tests/PagedTiffHandlerTest.php
M tests/testImages/SOURCES.txt
A tests/testImages/large.tiff
5 files changed, 139 insertions(+), 1 deletion(-)

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



diff --git a/PagedTiffHandler.php b/PagedTiffHandler.php
index 0593b13..b63dd3c 100644
--- a/PagedTiffHandler.php
+++ b/PagedTiffHandler.php
@@ -101,6 +101,9 @@
 $wgTiffMaxMetaSize = 64*1024;
 // TTL of cache entries for errors
 $wgTiffErrorCacheTTL = 24*60*60;
+// For thumbnails smaller than this, first scale to this amount
+// Set to 0 to disable
+$wgTiffIntermediaryScaleStep = 2048;
 
 $wgFileExtensions[] = 'tiff';
 $wgFileExtensions[] = 'tif';
diff --git a/PagedTiffHandler_body.php b/PagedTiffHandler_body.php
index 92782fc..8ac70b8 100644
--- a/PagedTiffHandler_body.php
+++ b/PagedTiffHandler_body.php
@@ -371,7 +371,6 @@
$srcPath = $this-escapeMagickInput( $scalerParams['srcPath'], 
$page - 1 );
$dstPath = $this-escapeMagickOutput( $scalerParams['dstPath'] 
);
 
-
if ( isset( $meta['page_data'][$page]['pixels'] )
 $meta['page_data'][$page]['pixels']  $wgMaxImageArea
) {
@@ -761,4 +760,108 @@
public function isExpensiveToThumbnail( $file ) {
return $file-getSize()  static::EXPENSIVE_SIZE_LIMIT;
}
+
+   /**
+* What source thumbnail to use.
+*
+* This does not use MW's builtin bucket system, as it tries to take
+* advantage of the fact that VIPS can scale integer shrink factors
+* much more efficiently than non-integral scaling factors.
+*
+* @param $file File
+* @param $params Array Parameters to transform file with.
+* @return Array Array with keys path, width and height
+*/
+   protected function getThumbnailSource( $file, $params ) {
+   /** @var MediaTransformOutput */
+   $mto = $this-getIntermediaryStep( $file, $params );
+   if ( $mto  !$mto-isError() ) {
+   return array(
+   'path' = $mto-getLocalCopyPath(),
+   'width' = $mto-getWidth(),
+   'height' = $mto-getHeight(),
+   // The path to the temporary file may be 
deleted when last
+   // instance of the MediaTransformObject is 
garbage collected,
+   // so keep a reference around.
+   'mto' = $mto
+   );
+   } else {
+   return parent::getThumbnailSource( $file, $params );
+   }
+   }
+
+   /**
+* Get an intermediary sized thumb to do further rendering on
+*
+* Tiff files can be huge. This method gets a large thumbnail
+* to further scale things down. Size is chosen to be
+* efficient to scale in vips for those who use VipsScaler
+*
+* @param $file File
+* @param $params Array Scaling parameters for original thumbnail
+* @return MediaTransformObject|bool false if no in between step needed,
+*   MediaTransformError on error. False if the doTransform method 
returns false
+*   MediaTransformOutput on success.
+*/
+   private function getIntermediaryStep( $file, $params ) {
+   global $wgTiffIntermediaryScaleStep, 
$wgThumbnailMinimumBucketDistance;
+
+   $page = intval( $params['page'] );
+   $page = $this-adjustPage( $file, $page );
+   $srcWidth = $file-getWidth( $page );
+   $srcHeight = $file-getHeight( $page );
+
+   if ( $srcWidth  $wgTiffIntermediaryScaleStep ) {
+   // Image is already 

[MediaWiki-commits] [Gerrit] WIP [BrowserTest] reproducing bug 69535 - change (mediawiki...VisualEditor)

2014-09-24 Thread Zfilipin (Code Review)
Zfilipin has uploaded a new change for review.

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

Change subject: WIP [BrowserTest] reproducing bug 69535
..

WIP [BrowserTest] reproducing bug 69535

Bug: 69535
Change-Id: I89bc9f778ab43dae5b55c4dc60e06d47d907086e
---
A modules/ve-mw/tests/browser/fonts.rb
1 file changed, 10 insertions(+), 0 deletions(-)


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

diff --git a/modules/ve-mw/tests/browser/fonts.rb 
b/modules/ve-mw/tests/browser/fonts.rb
new file mode 100644
index 000..24d7f27
--- /dev/null
+++ b/modules/ve-mw/tests/browser/fonts.rb
@@ -0,0 +1,10 @@
+require selenium-webdriver
+driver = Selenium::WebDriver.for :firefox
+languages = [en, ja, zh-hans, zh-hant]
+
+languages.each do |language|
+  driver.get 
http://en.wikipedia.beta.wmflabs.org/wiki/Main_Page?uselang=#{language};
+  driver.save_screenshot #{language}.png
+end
+
+driver.quit

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I89bc9f778ab43dae5b55c4dc60e06d47d907086e
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/VisualEditor
Gerrit-Branch: master
Gerrit-Owner: Zfilipin zfili...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] [WIP] Add xxxhdpi resolution - change (apps...wikipedia)

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

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

Change subject: [WIP] Add xxxhdpi resolution
..

[WIP] Add xxxhdpi resolution

Change-Id: I13af17bfa2b761cfcb9dcc488a9c9a527522ebf1
---
M scripts/convert-icons.py
1 file changed, 5 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/apps/android/wikipedia 
refs/changes/77/162577/1

diff --git a/scripts/convert-icons.py b/scripts/convert-icons.py
index 37be5a4..86a19af 100644
--- a/scripts/convert-icons.py
+++ b/scripts/convert-icons.py
@@ -8,7 +8,8 @@
 mdpi: 1,
 hdpi: 1.5,
 xhdpi: 2,
-xxhdpi: 3
+xxhdpi: 3,
+xxxhdpi: 4
 }
 
 OUTPUT_PATH_PREFIX = os.path.abspath(os.path.join(os.path.dirname(__file__), 
../wikipedia/res/))
@@ -24,7 +25,9 @@
 nonspecific = .nonspecific. in input_path
 noflip = nonspecific or input_path.endswith(.noflip.svg)
 file_name = 
os.path.basename(os.path.splitext(input_path)[0].split(.)[0] + .png)
-output_file_path = os.path.join(OUTPUT_PATH_PREFIX, drawable, 
file_name)
+folder_path = os.path.join(OUTPUT_PATH_PREFIX, drawable)
+sh.mkdir(-p, folder_path)
+output_file_path = os.path.join(folder_path, file_name)
 px = int(DENSITIES[density] * self.dp)
 sh.rsvg_convert(input_path, -a, h=px, o=output_file_path)
 return (output_file_path, noflip)

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I13af17bfa2b761cfcb9dcc488a9c9a527522ebf1
Gerrit-PatchSet: 1
Gerrit-Project: apps/android/wikipedia
Gerrit-Branch: master
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] Keep section alignment on window resize - change (mediawiki...ContentTranslation)

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

Change subject: Keep section alignment on window resize
..


Keep section alignment on window resize

Change-Id: I76d670c0354f949c0101c1b405280186d092a4b2
---
M modules/translation/ext.cx.translation.aligner.js
1 file changed, 15 insertions(+), 0 deletions(-)

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



diff --git a/modules/translation/ext.cx.translation.aligner.js 
b/modules/translation/ext.cx.translation.aligner.js
index 493713c..32eeb01 100644
--- a/modules/translation/ext.cx.translation.aligner.js
+++ b/modules/translation/ext.cx.translation.aligner.js
@@ -68,6 +68,10 @@
sourceSectionHeight = $sourceSection.height();
sectionHeight = $section.height();
 
+   if ( !sourceSectionHeight ) {
+   return this;
+   }
+
if ( sourceSectionHeight  sectionHeight ) {
$sourceSection.css( 'min-height', sectionHeight );
sourceSectionHeight = $sourceSection.height();
@@ -95,4 +99,15 @@
 
return this;
};
+
+   $( function () {
+   // Window resize handler.
+   $( window ).resize( $.debounce( 250, function () {
+   $( '.cx-column--translation .cx-column__content' )
+   .find( mw.cx.getSectionSelector() )
+   .each( function () {
+   $( this ).keepAlignment();
+   } );
+   } ) );
+   } );
 }( jQuery, mediaWiki ) );

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I76d670c0354f949c0101c1b405280186d092a4b2
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/ContentTranslation
Gerrit-Branch: master
Gerrit-Owner: Santhosh santhosh.thottin...@gmail.com
Gerrit-Reviewer: Jsahleen jsahl...@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] Show full personal bar on Special:CX - change (mediawiki...ContentTranslation)

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

Change subject: Show full personal bar on Special:CX
..


Show full personal bar on Special:CX

* Use $skin-getPersonalToolsList() to get the personal toolbar
* Remove the custom added user name link.

Change-Id: I03339fdcf0344b832cc4280d9b374f75d5efb07d
---
M modules/header/ext.cx.header.js
M modules/header/styles/ext.cx.header.less
M specials/SpecialContentTranslation.php
3 files changed, 8 insertions(+), 34 deletions(-)

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



diff --git a/modules/header/ext.cx.header.js b/modules/header/ext.cx.header.js
index 7cbc3ad..2320948 100644
--- a/modules/header/ext.cx.header.js
+++ b/modules/header/ext.cx.header.js
@@ -58,16 +58,6 @@
 
this.showError( mw.message( 'cx-special-login-error', 
loginUriHref ) );
 
-   // The top login link should open in the same window.
-   // There is no reason to open a new tab for it,
-   // becauses there is no translation here.
-   this.$userName
-   .text( mw.msg( 'login' ) )
-   .prop( {
-   href: loginUriHref,
-   target: ''
-   } );
-
// Do not show the columns
// TODO: use events
$( '.cx-widget__columns' ).remove();
@@ -159,22 +149,10 @@
 * Render the header
 */
ContentTranslationHeader.prototype.render = function () {
-   var $logo, $userDetails, $headerBar,
+   var $logo, $headerBar,
$translationCenterLink, $translationCenter;
 
$logo = $( 'div' ).addClass( 'cx-header__logo' );
-
-   this.$userName = $( 'a' )
-   .addClass( 'cx-header__user-details__user-name' )
-   .attr( {
-   href: mw.util.getUrl( 'User:' + 
mw.user.getName() ),
-   target: '_blank'
-   } )
-   .text( mw.user.getName() );
-
-   $userDetails = $( 'div' )
-   .addClass( 'cx-header__user-details' )
-   .append( this.$userName );
 
this.$publishButton = $( 'button' )
.addClass( 'cx-header__publish publish mw-ui-button 
mw-ui-constructive' )
@@ -201,7 +179,7 @@
 
this.$container
.addClass( 'cx-header' )
-   .append( $logo, $userDetails, $headerBar, this.$infoBar 
);
+   .append( $logo, $headerBar, this.$infoBar );
};
 
/**
diff --git a/modules/header/styles/ext.cx.header.less 
b/modules/header/styles/ext.cx.header.less
index 4691c0a..3d92937 100644
--- a/modules/header/styles/ext.cx.header.less
+++ b/modules/header/styles/ext.cx.header.less
@@ -14,15 +14,6 @@
background-position: left top;
 }
 
-.cx-header__user-details {
-   .mw-ui-item;
-   .mw-ui-one-third;
-
-a {
-   float: right;
-   }
-}
-
 .cx-header__bar {
.mw-ui-item;
.mw-ui-one-whole;
diff --git a/specials/SpecialContentTranslation.php 
b/specials/SpecialContentTranslation.php
index c4973a7..4a72d3f 100644
--- a/specials/SpecialContentTranslation.php
+++ b/specials/SpecialContentTranslation.php
@@ -45,8 +45,13 @@
) );
 
$out-addHtml( MWDebug::getDebugHTML( $this-getContext() ) );
+   $toolbarList = Html::rawElement( 'ul',
+   null,
+   $skin-getPersonalToolsList() );
+   $out-addHTML( Html::rawElement( 'div',
+   array( 'id' = 'p-personal'),
+   $toolbarList ) );
wfRunHooks( 'BeforePageDisplay', array( $out, $skin ) );
-
$out-addHTML( $skin-bottomScripts() );
$out-addHTML( '/body/html' );
}

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I03339fdcf0344b832cc4280d9b374f75d5efb07d
Gerrit-PatchSet: 4
Gerrit-Project: mediawiki/extensions/ContentTranslation
Gerrit-Branch: master
Gerrit-Owner: Santhosh santhosh.thottin...@gmail.com
Gerrit-Reviewer: Jsahleen jsahl...@wikimedia.org
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] osm: Export an expired tiles list to $expire_dir - change (operations/puppet)

2014-09-24 Thread Alexandros Kosiaris (Code Review)
Alexandros Kosiaris has uploaded a new change for review.

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

Change subject: osm: Export an expired tiles list to $expire_dir
..

osm: Export an expired tiles list to $expire_dir

osm2pgsql now exports a file containing a list of all the expired tiles
to $expire_dir which default to /srv/osm_expire

Change-Id: I15fd93d296d23ff0137727c9f51ab28da9f43e3f
---
M modules/osm/manifests/planet_sync.pp
1 file changed, 9 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/78/162578/1

diff --git a/modules/osm/manifests/planet_sync.pp 
b/modules/osm/manifests/planet_sync.pp
index 788225d..9dea5f6 100644
--- a/modules/osm/manifests/planet_sync.pp
+++ b/modules/osm/manifests/planet_sync.pp
@@ -16,10 +16,18 @@
 #  osm::planet_sync { 'mydb': }
 define osm::planet_sync(
 $osmosis_dir='/srv/osmosis',
+$expire_dir='/srv/osm_expire',
 $period='minute',
 $hour='*',
 $minute='*/30'
 ) {
+
+file { $expire_dir:
+ensure = directory,
+owner  = 'postgres',
+group  = 'postgres',
+mode   = 0700,
+}
 
 file { $osmosis_dir:
 ensure = directory,
@@ -36,7 +44,7 @@
 content = template('osm/osmosis_configuration.txt.erb'),
 }
 
-$sync_planet_cmd = inline_template(%- data=@memoryfree.split(' '); 
multi={'MB' = 1, 'GB' = 1000}[data[1]]-%/usr/bin/osmosis 
--read-replication-interval workingDirectory=%= @osmosis_dir % 
--simplify-change --write-xml-change - | /usr/bin/osm2pgsql -k -s -C %= 
data[0].to_i/10*multi % --number-processes %= @processorcount % --append -)
+$sync_planet_cmd = inline_template(%- data=@memoryfree.split(' '); 
multi={'MB' = 1, 'GB' = 1000}[data[1]]-%/usr/bin/osmosis 
--read-replication-interval workingDirectory=%= @osmosis_dir % 
--simplify-change --write-xml-change - | /usr/bin/osm2pgsql -k -s -C %= 
data[0].to_i/10*multi % --number-processes %= @processorcount % -e15 -o %= 
@expire_dir %/expire.list --append -)
 cron { planet_sync-${name}:
 environment = JAVACMD_OPTIONS='-Dhttp.proxyHost=webproxy.eqiad.wmnet 
-Dhttp.proxyPort=8080',
 command = $sync_planet_cmd  /tmp/osmosis.log 21,

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I15fd93d296d23ff0137727c9f51ab28da9f43e3f
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Alexandros Kosiaris akosia...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] osm: Export an expired tiles list to $expire_dir - change (operations/puppet)

2014-09-24 Thread Alexandros Kosiaris (Code Review)
Alexandros Kosiaris has submitted this change and it was merged.

Change subject: osm: Export an expired tiles list to $expire_dir
..


osm: Export an expired tiles list to $expire_dir

osm2pgsql now exports a file containing a list of all the expired tiles
to $expire_dir which default to /srv/osm_expire

Change-Id: I15fd93d296d23ff0137727c9f51ab28da9f43e3f
---
M modules/osm/manifests/planet_sync.pp
1 file changed, 9 insertions(+), 1 deletion(-)

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



diff --git a/modules/osm/manifests/planet_sync.pp 
b/modules/osm/manifests/planet_sync.pp
index 788225d..9dea5f6 100644
--- a/modules/osm/manifests/planet_sync.pp
+++ b/modules/osm/manifests/planet_sync.pp
@@ -16,10 +16,18 @@
 #  osm::planet_sync { 'mydb': }
 define osm::planet_sync(
 $osmosis_dir='/srv/osmosis',
+$expire_dir='/srv/osm_expire',
 $period='minute',
 $hour='*',
 $minute='*/30'
 ) {
+
+file { $expire_dir:
+ensure = directory,
+owner  = 'postgres',
+group  = 'postgres',
+mode   = 0700,
+}
 
 file { $osmosis_dir:
 ensure = directory,
@@ -36,7 +44,7 @@
 content = template('osm/osmosis_configuration.txt.erb'),
 }
 
-$sync_planet_cmd = inline_template(%- data=@memoryfree.split(' '); 
multi={'MB' = 1, 'GB' = 1000}[data[1]]-%/usr/bin/osmosis 
--read-replication-interval workingDirectory=%= @osmosis_dir % 
--simplify-change --write-xml-change - | /usr/bin/osm2pgsql -k -s -C %= 
data[0].to_i/10*multi % --number-processes %= @processorcount % --append -)
+$sync_planet_cmd = inline_template(%- data=@memoryfree.split(' '); 
multi={'MB' = 1, 'GB' = 1000}[data[1]]-%/usr/bin/osmosis 
--read-replication-interval workingDirectory=%= @osmosis_dir % 
--simplify-change --write-xml-change - | /usr/bin/osm2pgsql -k -s -C %= 
data[0].to_i/10*multi % --number-processes %= @processorcount % -e15 -o %= 
@expire_dir %/expire.list --append -)
 cron { planet_sync-${name}:
 environment = JAVACMD_OPTIONS='-Dhttp.proxyHost=webproxy.eqiad.wmnet 
-Dhttp.proxyPort=8080',
 command = $sync_planet_cmd  /tmp/osmosis.log 21,

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I15fd93d296d23ff0137727c9f51ab28da9f43e3f
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Alexandros Kosiaris akosia...@wikimedia.org
Gerrit-Reviewer: Alexandros Kosiaris akosia...@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] Make recursive progressiveEnhancements work on non-FF browsers - change (mediawiki...Flow)

2014-09-24 Thread Matthias Mullie (Code Review)
Matthias Mullie has uploaded a new change for review.

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

Change subject: Make recursive progressiveEnhancements work on non-FF browsers
..

Make recursive progressiveEnhancements work on non-FF browsers

replace's 3 parameter (flags) is FF-only:
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/replace

Damn you Mozilla and you non-standard implementation!

Change-Id: I8ca25d80f91cbb2abcab5a0dba0a4fb2d6cf8d62
---
M modules/new/flow-handlebars.js
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Flow 
refs/changes/79/162579/1

diff --git a/modules/new/flow-handlebars.js b/modules/new/flow-handlebars.js
index b2e5c54..3457f20 100644
--- a/modules/new/flow-handlebars.js
+++ b/modules/new/flow-handlebars.js
@@ -518,7 +518,7 @@
var hash = options.hash,
// Replace nested script tag with placeholder tag for
// recursive progresiveEnhancement
-   inner = options.fn( this ).replace( '/scr' + 'ipt', 
'/flowprogressivescript', 'g' );
+   inner = options.fn( this ).replace( /\/script/g, 
'/flowprogressivescript' );
 
if ( !hash.type ) {
hash.type = 'insert';

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I8ca25d80f91cbb2abcab5a0dba0a4fb2d6cf8d62
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Flow
Gerrit-Branch: master
Gerrit-Owner: Matthias Mullie mmul...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] Replace both opening closing script tag by flowprogressive... - change (mediawiki...Flow)

2014-09-24 Thread Matthias Mullie (Code Review)
Matthias Mullie has uploaded a new change for review.

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

Change subject: Replace both opening  closing script tag by 
flowprogressivescript
..

Replace both opening  closing script tag by flowprogressivescript

Well, I had been writing this prior to figuring out the real problem
with nested progressive scripts not working in Chrome:
I8ca25d80f91cbb2abcab5a0dba0a4fb2d6cf8d62

I originally though some browser was going nuts on improperly opened/
closed tags. This change will properly change both opening  closing
tags. The content we're dealing with will be more correct this way.
However, this comes at the expense of some regular expressions.
They will take some additional computing, mostly on the client.

Anyway, it's up to the gods of gerrit-review to either abandon this,
or merge it. Both make sense for different reasons :p

Change-Id: I4a89f276a87a8953ad8d1105d534ff27a8a05d0c
---
M includes/TemplateHelper.php
M modules/new/flow-handlebars.js
2 files changed, 123 insertions(+), 6 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Flow 
refs/changes/80/162580/1

diff --git a/includes/TemplateHelper.php b/includes/TemplateHelper.php
index 8f87d0a..a4fd03d 100644
--- a/includes/TemplateHelper.php
+++ b/includes/TemplateHelper.php
@@ -543,6 +543,11 @@
$target = empty( $input['target'] ) ? '' : 'data-target=' . 
htmlspecialchars( $input['target'] ) . '';
$sectionId = empty( $input['id'] ) ? '' : 'id=' . 
htmlspecialchars( $input['id'] ) . '';
 
+   $fn = $fn();
+   // Replace the nested script tag with a placeholder tag for 
recursive progressiveEnhancement
+   $fn = preg_replace( '/script(\\s?.*?)/', 
'flowprogressivescript$1', $fn );
+   $fn = str_replace( '/script', '/flowprogressivescript', $fn 
);
+
return self::html(
'script 
name=handlebars-template-progressive-enhancement' .
' 
type=text/x-handlebars-template-progressive-enhancement' .
@@ -550,8 +555,7 @@
' ' . $target .
' ' . $sectionId .
'' .
-   // Replace the nested script tag with a 
placeholder tag for recursive progressiveEnhancement
-   str_replace( '/script', 
'/flowprogressivescript', $fn() ) .
+   $fn .
'/script'
);
}
diff --git a/modules/new/flow-handlebars.js b/modules/new/flow-handlebars.js
index 3457f20..f9ade9b 100644
--- a/modules/new/flow-handlebars.js
+++ b/modules/new/flow-handlebars.js
@@ -124,8 +124,19 @@
}
}
 
-   // Replace the nested flowprogressivescript tag with a 
real script tag for recursive progressiveEnhancement
-   content = this.innerHTML.replace( 
/\/flowprogressivescript/g, '/script' );
+   /*
+* We want to turn the parent flowprogressivescript 
tags into
+* proper script tags again. To do so, we'll first 
uniquefy all
+* tags. Then we can reliably extract the outermost 
tags and turn
+* them into script tags. After that, we'll restore 
the rest of
+* the (nested) flowprogressivescript tags again.
+*/
+   content = this.innerHTML;
+   content = uniquefyNestedTags( content, 
'flowprogressivescript' );
+   content = content.replace( 
/flowprogressivescript([0-9]+)(\\s?.*?)(.*?)\/flowprogressivescript\1/g, 
function( match, p1, p2, p3, offset, str ) {
+   return 'scr' + 'ipt' + p2 + '' + p3 + '/scr' 
+ 'ipt';
+   } );
+   content = unifyNestedTags( content, 
'flowprogressivescript' );
 
// Inject the content
switch ( data.type ) {
@@ -178,6 +189,106 @@
return $.map( parameters, function ( arg ) {
return arg ? arg.raw || arg : '';
} );
+   }
+
+   /**
+* In content with nested tags of the same kind, it can be hard to
+* find exactly which closing tag belongs to which opening tag,
+* making it hard to extract specific parts from the content.
+* This method will properly match opening  closing tags  make
+* them unique (by adding a different number behind all tag names)
+*
+* Example input content:
+* flowprogressivescript
+* abc
+* flowprogressivescript
+* def
+* flowprogressivescript
+* ghi
+

[MediaWiki-commits] [Gerrit] New deployment build - wmf/1.25wmf1 - change (mediawiki...Wikidata)

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

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

Change subject: New deployment build - wmf/1.25wmf1
..

New deployment build - wmf/1.25wmf1

Change-Id: I740b9b89914e5f3285ae5865ae7b76f52495d364
---
A .gitignore
A .travis.yml
A Gruntfile.js
M README.md
A WikibaseClient.settings.php
A WikibaseRepo.settings.php
M Wikidata.php
A build/tasks/updatecomposer.js
M composer.json
M composer.lock
M extensions/PropertySuggester/PropertySuggester.php
M extensions/PropertySuggester/README.md
M 
extensions/PropertySuggester/tests/phpunit/PropertySuggester/Suggesters/SimpleSuggesterTest.php
M 
extensions/PropertySuggester/tests/phpunit/PropertySuggester/SuggestionGeneratorTest.php
M extensions/ValueView/README.md
M extensions/ValueView/ValueView.mw.php
M extensions/ValueView/ValueView.php
M extensions/ValueView/composer.json
M extensions/ValueView/lib/jquery.event/jquery.event.special.eachchange.js
R extensions/ValueView/lib/jquery.ui/jquery.ui.commonssuggester.js
M extensions/ValueView/lib/jquery.ui/jquery.ui.inputextender.js
A extensions/ValueView/lib/jquery.ui/jquery.ui.languagesuggester.js
M extensions/ValueView/lib/jquery.ui/jquery.ui.suggester.js
M extensions/ValueView/lib/resources.php
M extensions/ValueView/src/ExpertExtender/ExpertExtender.LanguageSelector.js
M extensions/ValueView/src/ExpertExtender/ExpertExtender.Listrotator.js
M extensions/ValueView/src/ExpertExtender/resources.php
M extensions/ValueView/src/experts/CommonsMediaType.js
M extensions/ValueView/src/experts/TimeInput.js
M extensions/ValueView/src/experts/resources.php
M extensions/ValueView/src/jquery.valueview.valueview.js
M extensions/Wikibase/.jshintignore
M extensions/Wikibase/client/WikibaseClient.hooks.php
M extensions/Wikibase/client/WikibaseClient.i18n.magic.php
M extensions/Wikibase/client/WikibaseClient.php
M extensions/Wikibase/client/i18n/ar.json
M extensions/Wikibase/client/i18n/bn.json
M extensions/Wikibase/client/i18n/bxr.json
M extensions/Wikibase/client/i18n/ca.json
M extensions/Wikibase/client/i18n/ce.json
M extensions/Wikibase/client/i18n/da.json
M extensions/Wikibase/client/i18n/el.json
M extensions/Wikibase/client/i18n/es.json
M extensions/Wikibase/client/i18n/fa.json
M extensions/Wikibase/client/i18n/fi.json
M extensions/Wikibase/client/i18n/he.json
M extensions/Wikibase/client/i18n/hr.json
M extensions/Wikibase/client/i18n/hu.json
M extensions/Wikibase/client/i18n/is.json
M extensions/Wikibase/client/i18n/ja.json
M extensions/Wikibase/client/i18n/ka.json
M extensions/Wikibase/client/i18n/mk.json
M extensions/Wikibase/client/i18n/ml.json
M extensions/Wikibase/client/i18n/oc.json
M extensions/Wikibase/client/i18n/pl.json
M extensions/Wikibase/client/i18n/pt-br.json
M extensions/Wikibase/client/i18n/qqq.json
M extensions/Wikibase/client/i18n/ro.json
A extensions/Wikibase/client/i18n/sc.json
M extensions/Wikibase/client/i18n/sk.json
M extensions/Wikibase/client/i18n/sr-ec.json
M extensions/Wikibase/client/i18n/sr-el.json
M extensions/Wikibase/client/i18n/tr.json
M extensions/Wikibase/client/i18n/uk.json
M extensions/Wikibase/client/i18n/zh-hans.json
D extensions/Wikibase/client/includes/ClientSiteLinkLookup.php
D extensions/Wikibase/client/includes/EntityIdPropertyUpdater.php
M extensions/Wikibase/client/includes/LangLinkHandler.php
M extensions/Wikibase/client/includes/RepoItemLinkGenerator.php
M extensions/Wikibase/client/includes/RepoLinker.php
M extensions/Wikibase/client/includes/WikibaseClient.php
M extensions/Wikibase/client/includes/hooks/InfoActionHookHandler.php
M extensions/Wikibase/client/includes/hooks/LanguageLinkBadgeDisplay.php
M extensions/Wikibase/client/includes/hooks/MovePageNotice.php
A extensions/Wikibase/client/includes/hooks/SidebarHookHandlers.php
M extensions/Wikibase/client/includes/parserhooks/NoLangLinkHandler.php
M extensions/Wikibase/client/includes/recentchanges/ChangeLineFormatter.php
M extensions/Wikibase/client/includes/recentchanges/ExternalChange.php
M extensions/Wikibase/client/includes/recentchanges/ExternalChangeFactory.php
M extensions/Wikibase/client/includes/recentchanges/ExternalRecentChange.php
M 
extensions/Wikibase/client/includes/recentchanges/RecentChangesFilterOptions.php
M extensions/Wikibase/client/includes/recentchanges/RevisionData.php
M 
extensions/Wikibase/client/resources/jquery.wikibase/jquery.wikibase.linkitem.js
M extensions/Wikibase/client/resources/wikibase.client.changeslist.css
M extensions/Wikibase/client/resources/wikibase.client.linkitem.init.js
D extensions/Wikibase/client/tests/phpunit/includes/ClientSiteLinkLookupTest.php
M 
extensions/Wikibase/client/tests/phpunit/includes/DataAccess/PropertyParserFunction/SnaksFinderTest.php
M extensions/Wikibase/client/tests/phpunit/includes/LangLinkHandlerTest.php
M 
extensions/Wikibase/client/tests/phpunit/includes/RepoItemLinkGeneratorTest.php
M extensions/Wikibase/client/tests/phpunit/includes/RepoLinkerTest.php
M 

[MediaWiki-commits] [Gerrit] nagios_common: Move notification commands into module - change (operations/puppet)

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

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

Change subject: nagios_common: Move notification commands into module
..

nagios_common: Move notification commands into module

This is IRC and Email event handlers and such.

Change-Id: I4e7a356d589512baad3af4ae38db9cf07231b234
---
M files/icinga/icinga.cfg
M manifests/misc/icinga.pp
R modules/nagios_common/files/notifycommands.cfg
M modules/nagios_common/manifests/commands.pp
4 files changed, 1 insertion(+), 10 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/82/162582/1

diff --git a/files/icinga/icinga.cfg b/files/icinga/icinga.cfg
index 9991ee2..3daecae 100644
--- a/files/icinga/icinga.cfg
+++ b/files/icinga/icinga.cfg
@@ -17,8 +17,6 @@
 # Commands definitions
 cfg_file=/etc/icinga/checkcommands.cfg
 cfg_dir=/etc/icinga/commands
-# Misc commands (notification and event handler commands, etc)
-cfg_file=/etc/icinga/misccommands.cfg
 
 # Debian also defaults to using the check commands defined by the debian
 # nagios-plugins package
diff --git a/manifests/misc/icinga.pp b/manifests/misc/icinga.pp
index 17d3d89..a48b800 100644
--- a/manifests/misc/icinga.pp
+++ b/manifests/misc/icinga.pp
@@ -78,7 +78,6 @@
 
${icinga::monitor::configuration::variables::icinga_config_dir}/checkcommands.cfg,
 
${icinga::monitor::configuration::variables::icinga_config_dir}/contactgroups.cfg,
 
${icinga::monitor::configuration::variables::icinga_config_dir}/contacts.cfg,
-
${icinga::monitor::configuration::variables::icinga_config_dir}/misccommands.cfg,
 
${icinga::monitor::configuration::variables::icinga_config_dir}/resource.cfg,
 
${icinga::monitor::configuration::variables::icinga_config_dir}/timeperiods.cfg]
 }
@@ -202,13 +201,6 @@
 
 file { '/etc/icinga/contacts.cfg':
 source = 'puppet:///private/nagios/contacts.cfg',
-owner  = 'root',
-group  = 'root',
-mode   = '0644',
-}
-
-file { '/etc/icinga/misccommands.cfg':
-source = 'puppet:///files/icinga/misccommands.cfg',
 owner  = 'root',
 group  = 'root',
 mode   = '0644',
diff --git a/files/icinga/misccommands.cfg 
b/modules/nagios_common/files/notifycommands.cfg
similarity index 100%
rename from files/icinga/misccommands.cfg
rename to modules/nagios_common/files/notifycommands.cfg
diff --git a/modules/nagios_common/manifests/commands.pp 
b/modules/nagios_common/manifests/commands.pp
index c309704..713e71b 100644
--- a/modules/nagios_common/manifests/commands.pp
+++ b/modules/nagios_common/manifests/commands.pp
@@ -73,6 +73,7 @@
 'ping',
 'procs',
 'vsz',
+'notifycommands',
 ] :
 require= File[$config_dir/commands],
 config_dir = $config_dir,

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I4e7a356d589512baad3af4ae38db9cf07231b234
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] nagios_common: Move timeperiods definition into module - change (operations/puppet)

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

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

Change subject: nagios_common: Move timeperiods definition into module
..

nagios_common: Move timeperiods definition into module

Change-Id: Ieeab484c64434b6f14c24deaf90a78f2fcdef051
---
M manifests/misc/icinga.pp
R modules/nagios_common/files/timeperiods.cfg
M modules/nagios_common/manifests/commands.pp
A modules/nagios_common/manifests/timeperiods.pp
M modules/shinken/manifests/server.pp
5 files changed, 41 insertions(+), 10 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/83/162583/1

diff --git a/manifests/misc/icinga.pp b/manifests/misc/icinga.pp
index a48b800..df30912 100644
--- a/manifests/misc/icinga.pp
+++ b/manifests/misc/icinga.pp
@@ -79,7 +79,6 @@
 
${icinga::monitor::configuration::variables::icinga_config_dir}/contactgroups.cfg,
 
${icinga::monitor::configuration::variables::icinga_config_dir}/contacts.cfg,
 
${icinga::monitor::configuration::variables::icinga_config_dir}/resource.cfg,
-
${icinga::monitor::configuration::variables::icinga_config_dir}/timeperiods.cfg]
 }
 
 class icinga::monitor::apache {
@@ -206,16 +205,13 @@
 mode   = '0644',
 }
 
-class { 'nagios_common::user_macros':
+class { [
+  'nagios_common::user_macros',
+  'nagios_common::timeperiods'
+] :
 notify = Service['icinga'],
 }
 
-file { '/etc/icinga/timeperiods.cfg':
-source = 'puppet:///files/icinga/timeperiods.cfg',
-owner  = 'root',
-group  = 'root',
-mode   = '0644',
-}
 
 file { '/etc/init.d/icinga':
 source = 'puppet:///files/icinga/icinga-init',
diff --git a/files/icinga/timeperiods.cfg 
b/modules/nagios_common/files/timeperiods.cfg
similarity index 100%
rename from files/icinga/timeperiods.cfg
rename to modules/nagios_common/files/timeperiods.cfg
diff --git a/modules/nagios_common/manifests/commands.pp 
b/modules/nagios_common/manifests/commands.pp
index 713e71b..2c27700 100644
--- a/modules/nagios_common/manifests/commands.pp
+++ b/modules/nagios_common/manifests/commands.pp
@@ -88,5 +88,4 @@
 group = $group,
 plugin_source = 
'puppet:///modules/nagios_common/check_commands/check_ssl_cert/check_ssl_cert',
 }
-
 }
diff --git a/modules/nagios_common/manifests/timeperiods.pp 
b/modules/nagios_common/manifests/timeperiods.pp
new file mode 100644
index 000..2d7a0d9
--- /dev/null
+++ b/modules/nagios_common/manifests/timeperiods.pp
@@ -0,0 +1,32 @@
+# = Class: nagios_common::timeperiods
+# Collection of custom nagios check plugins we use
+#
+# [*ensure*]
+#   present or absent, to make the definition
+#   present or absent. Defaults to present
+#
+# [*config_dir*]
+#   The base directory to put configuration directory in.
+#   Defaults to '/etc/icinga/'
+#
+# [*owner*]
+#   The user which should own the check config files.
+#   Defaults to 'root'
+#
+# [*group*]
+#   The group which should own the check config files.
+#   Defaults to 'root'
+#
+class nagios_common::timeperiods(
+$ensure = present,
+$config_dir = '/etc/icinga',
+$owner = 'root',
+$group = 'root',
+) {
+file { $config_dir/timeperiods:
+ensure = $ensure,
+source = 'puppet:///modules/nagios_common/timeperiods.cfg',
+owner  = $owner,
+group  = $group,
+}
+}
diff --git a/modules/shinken/manifests/server.pp 
b/modules/shinken/manifests/server.pp
index f9808f0..5c9a88d 100644
--- a/modules/shinken/manifests/server.pp
+++ b/modules/shinken/manifests/server.pp
@@ -54,7 +54,11 @@
 require = Package['shinken'],
 notify  = Service['shinken'],
 }
-class { 'nagios_common::user_macros':
+
+class { [
+  'nagios_common::user_macros',
+  'nagios_common::timeperiods'
+] :
 config_dir = '/etc/shinken',
 owner  = 'shinken',
 group  = 'shinken',

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ieeab484c64434b6f14c24deaf90a78f2fcdef051
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] Add more retry logic to reindexing - change (mediawiki...CirrusSearch)

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

Change subject: Add more retry logic to reindexing
..


Add more retry logic to reindexing

Used to be we'd only retry on document write error.  Now we'll retry on
a query error too!

Change-Id: Ic037f0901984671679a46d1e894f69edee888136
(cherry picked from commit ad34398a01a2b74623fd8c9590c9876e56e72d06)
---
M maintenance/updateOneSearchIndexConfig.php
1 file changed, 18 insertions(+), 15 deletions(-)

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



diff --git a/maintenance/updateOneSearchIndexConfig.php 
b/maintenance/updateOneSearchIndexConfig.php
index b3ca52f..fdcf3f9 100644
--- a/maintenance/updateOneSearchIndexConfig.php
+++ b/maintenance/updateOneSearchIndexConfig.php
@@ -775,12 +775,16 @@
$this-output( $this-indent . $messagePrefix . About 
to reindex $totalDocsToReindex documents\n );
$operationStartTime = microtime( true );
$completed = 0;
+   $self = $this;
while ( true ) {
wfProfileIn( __METHOD__ . '::receiveDocs' );
-   $result = $this-getIndex()-search( array(), 
array(
-   'scroll_id' = 
$result-getResponse()-getScrollId(),
-   'scroll' = '1h'
-   ) );
+   $result = $this-withRetry( 
$this-reindexRetryAttempts, $messagePrefix, 'fetching documents to reindex',
+   function() use ( $self, $result ) {
+   return 
$self-getIndex()-search( array(), array(
+   'scroll_id' = 
$result-getResponse()-getScrollId(),
+   'scroll' = '1h'
+   ) );
+   } );
wfProfileOut( __METHOD__ . '::receiveDocs' );
if ( !$result-count() ) {
$this-output( $this-indent . 
$messagePrefix . All done\n );
@@ -802,7 +806,10 @@
$result-next();
}
wfProfileOut( __METHOD__ . '::packageDocs' );
-   $this-sendDocumentsWithRetry( $messagePrefix, 
$documents );
+   $this-withRetry( $this-reindexRetryAttempts, 
$messagePrefix, 'retrying as singles',
+   function() use ( $self, $messagePrefix, 
$documents ) {
+   $self-sendDocuments( 
$messagePrefix, $documents );
+   } );
$completed += $result-count();
$rate = round( $completed / ( microtime( true ) 
- $operationStartTime ) );
$this-output( $this-indent . $messagePrefix .
@@ -831,15 +838,12 @@
}
}
 
-   private function sendDocumentsWithRetry( $messagePrefix, $documents ) {
-   $profiler = new ProfileSection( __METHOD__ );
-
+   private function withRetry( $attempts, $messagePrefix, $description, 
$func ) {
$errors = 0;
while ( true ) {
-   if ( $errors  $this-reindexRetryAttempts ) {
+   if ( $errors  $attempts ) {
try {
-   $this-sendDocuments( $messagePrefix, 
$documents );
-   return;
+   return $func();
} catch ( 
\Elastica\Exception\ExceptionInterface $e ) {
$errors += 1;
// Random backoff with lowest possible 
upper bound as 16 seconds.
@@ -847,13 +851,12 @@
$seconds = rand( 1, pow( 2, 3 + $errors 
) );
$type = get_class( $e );
$message = 
ElasticsearchIntermediary::extractMessage( $e );
-   $this-output( $this-indent . 
$messagePrefix . Caught an error retrying as singles.   .
-   Backing off for $seconds and 
retrying.  Error type is '$type' and message is:  $message );
+   $this-output( $this-indent . 
$messagePrefix . Caught an error $description.   .
+   Backing off for $seconds and 
retrying.  Error type is '$type' and message is:  $message\n );
  

[MediaWiki-commits] [Gerrit] contint: configuration files renaming - change (operations/puppet)

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

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

Change subject: contint: configuration files renaming
..

contint: configuration files renaming

* Rename zuul.conf to zuul-server.conf
* Have Zuul point to it by adjusting the 'zuul' default file with:
  DAEMON_ARGS='-c /etc/zuul/zuul-server.conf'
* Forge a public file named zuul.conf with Jenkins API key stripped.
* Drop public.conf

The reason for this change is that the zuul client attempts to read
/etc/zuul/zuul.conf which is zuul/root only, thus we have to either sudo
as zuul or pass -c /etc/zuul/public.conf which is cumbersome.

Change-Id: I954e557aee2b62d2e40ef779daab7f04d8bdb004
---
M modules/zuul/manifests/server.pp
M modules/zuul/templates/zuul.default.erb
2 files changed, 8 insertions(+), 3 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/84/162584/1

diff --git a/modules/zuul/manifests/server.pp b/modules/zuul/manifests/server.pp
index d8d62c3..b70f5f7 100644
--- a/modules/zuul/manifests/server.pp
+++ b/modules/zuul/manifests/server.pp
@@ -72,7 +72,7 @@
 source = 'puppet:///modules/zuul/gearman-logging.conf',
 }
 
-zuul::configfile { '/etc/zuul/zuul.conf':
+zuul::configfile { '/etc/zuul/zuul-server.conf':
 zuul_role = 'server',
 owner = 'zuul',
 group = 'root',
@@ -87,8 +87,12 @@
 # Additionally provide a publicly readeable configuration file
 exec { 'craft public zuul conf':
 cwd = '/etc/zuul/',
-command = '/bin/sed s/apikey=.*/apikey=obfuscacated/ 
/etc/zuul/zuul.conf  /etc/zuul/public.conf',
+command = '/bin/sed s/apikey=.*/apikey=obfuscacated/ 
/etc/zuul/zuul-server.conf  /etc/zuul/zuul.conf',
 refreshonly = true,
+}
+
+file { '/etc/zuul/public.conf':
+ensure  = absent,
 }
 
 service { 'zuul':
@@ -99,7 +103,7 @@
 File['/var/run/zuul'],
 File['/etc/init.d/zuul'],
 File['/etc/default/zuul'],
-File['/etc/zuul/zuul.conf'],
+File['/etc/zuul/zuul-server.conf'],
 File['/etc/zuul/gearman-logging.conf'],
 ],
 }
diff --git a/modules/zuul/templates/zuul.default.erb 
b/modules/zuul/templates/zuul.default.erb
index 7aaeae8..7387bcf 100644
--- a/modules/zuul/templates/zuul.default.erb
+++ b/modules/zuul/templates/zuul.default.erb
@@ -2,3 +2,4 @@
 export STATSD_HOST=%= @statsd_host %
 export STATSD_PORT=8125
 % end %
+DAEMON_ARGS='-c /etc/zuul/zuul-server.conf'

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I954e557aee2b62d2e40ef779daab7f04d8bdb004
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
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] Zuul public.conf is gone - change (integration/jenkins-job-builder-config)

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

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

Change subject: Zuul public.conf is gone
..

Zuul public.conf is gone

The default /etc/zuul/zuul.conf is made readable with
https://gerrit.wikimedia.org/r/162584 and removes public.conf entirely.

The private server file is made zuul-server.conf which we do not need
for layout validation.

Change-Id: I954e557aee2b62d2e40ef779daab7f04d8bdb004
---
M integration.yaml
1 file changed, 3 insertions(+), 3 deletions(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/integration/jenkins-job-builder-config 
refs/changes/85/162585/1

diff --git a/integration.yaml b/integration.yaml
index 05e0937..6ee8d0b 100644
--- a/integration.yaml
+++ b/integration.yaml
@@ -35,7 +35,7 @@
 python 
/srv/deployment/integration/slave-scripts/bin/jenkins-jobs-list.py  
jenkins_jobs.txt
 
 # FIXME change path whenever we have zuul packaged.
-/usr/local/bin/zuul-server -c /etc/zuul/public.conf -t 
jenkins_jobs.txt -l $WORKSPACE/layout.yaml
+/usr/local/bin/zuul-server -t jenkins_jobs.txt -l 
$WORKSPACE/layout.yaml
 
 # Job for Zuul configuration validation
 # Make sure the Zuul config is passed and show a different with the previous
@@ -51,9 +51,9 @@
  - shell: |
 set +e
 # FIXME change path whenever we have zuul packaged.
-/usr/local/bin/zuul-server -c /etc/zuul/public.conf -t -l 
$WORKSPACE/layout.yaml 2current.txt
+/usr/local/bin/zuul-server -t -l $WORKSPACE/layout.yaml 2current.txt
 git checkout HEAD^
-/usr/local/bin/zuul-server -c /etc/zuul/public.conf -t -l 
$WORKSPACE/layout.yaml 2before.txt
+/usr/local/bin/zuul-server -t -l $WORKSPACE/layout.yaml 2before.txt
 colordiff -u before.txt current.txt
 
 - job-template:

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I954e557aee2b62d2e40ef779daab7f04d8bdb004
Gerrit-PatchSet: 1
Gerrit-Project: integration/jenkins-job-builder-config
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] Fixed checkbox not showing in preferences. - change (apps...wikipedia)

2014-09-24 Thread Dbrant (Code Review)
Dbrant has uploaded a new change for review.

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

Change subject: Fixed checkbox not showing in preferences.
..

Fixed checkbox not showing in preferences.

Bug: 71228
Change-Id: I8a2e9be3aea377b9677439eefa8fe928c9e6d4a3
---
M 
wikipedia/src/main/java/org/wikipedia/settings/CheckBoxPreferenceMultiLine.java
1 file changed, 2 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/apps/android/wikipedia 
refs/changes/86/162586/1

diff --git 
a/wikipedia/src/main/java/org/wikipedia/settings/CheckBoxPreferenceMultiLine.java
 
b/wikipedia/src/main/java/org/wikipedia/settings/CheckBoxPreferenceMultiLine.java
index a4d7701..309d7fc 100644
--- 
a/wikipedia/src/main/java/org/wikipedia/settings/CheckBoxPreferenceMultiLine.java
+++ 
b/wikipedia/src/main/java/org/wikipedia/settings/CheckBoxPreferenceMultiLine.java
@@ -1,12 +1,13 @@
 package org.wikipedia.settings;
 
 import android.content.Context;
+import android.preference.CheckBoxPreference;
 import android.preference.Preference;
 import android.util.AttributeSet;
 import android.view.View;
 import android.widget.TextView;
 
-public class CheckBoxPreferenceMultiLine extends Preference {
+public class CheckBoxPreferenceMultiLine extends CheckBoxPreference {
 
 public CheckBoxPreferenceMultiLine(Context ctx, AttributeSet attrs, int 
defStyle) {
 super(ctx, attrs, defStyle);

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I8a2e9be3aea377b9677439eefa8fe928c9e6d4a3
Gerrit-PatchSet: 1
Gerrit-Project: apps/android/wikipedia
Gerrit-Branch: master
Gerrit-Owner: Dbrant dbr...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] Redo job that counts incoming links - change (mediawiki...CirrusSearch)

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

Change subject: Redo job that counts incoming links
..


Redo job that counts incoming links

Old way:
When a page gets a link added or removed queue a single job with the target
of those links in it.  That job counts all the links to each of the updated
pages and reindexes all of them.

New way:
When a page gets a link added or removed queue one job per link target that
was added or removed.  That job counts all the links for only a single
page.

The new way is better then the old way because it allows deduplication of
links count update jobs.  This is important if a popular template is edited
to add or remove links to a certain page.  In the old way the incoming links
were counted over and over and over again and the page might be updated
many time though many will be nooped because the incoming links count won't
have changed enough.  In the new way the page will be updated and the links
counted far fewer times due to deduplication.

Change-Id: Ie1ddf414f0bcb188dfa536ea9050aeff5f410cf5
---
M CirrusSearch.php
A includes/Job/IncomingLinkCount.php
M includes/Job/LinksUpdate.php
M includes/Job/LinksUpdateSecondary.php
M includes/Updater.php
M tests/jenkins/Jenkins.php
D tests/unit/Job/LinksUpdateSecondaryTest.php
7 files changed, 74 insertions(+), 85 deletions(-)

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



diff --git a/CirrusSearch.php b/CirrusSearch.php
index c04ce44..dccb1f4 100644
--- a/CirrusSearch.php
+++ b/CirrusSearch.php
@@ -528,6 +528,7 @@
 $wgAutoloadClasses['CirrusSearch\InterwikiSearcher'] = $includes . 
'InterwikiSearcher.php';
 $wgAutoloadClasses['CirrusSearch\Job\Job'] = $jobsDir . 'Job.php';
 $wgAutoloadClasses['CirrusSearch\Job\DeletePages'] = $jobsDir . 
'DeletePages.php';
+$wgAutoloadClasses['CirrusSearch\Job\IncomingLinkCount'] = $jobsDir . 
'IncomingLinkCount.php';
 $wgAutoloadClasses['CirrusSearch\Job\LinksUpdate'] = $jobsDir . 
'LinksUpdate.php';
 $wgAutoloadClasses['CirrusSearch\Job\LinksUpdateSecondary'] = $jobsDir . 
'LinksUpdateSecondary.php';
 $wgAutoloadClasses['CirrusSearch\Job\MassIndex'] = $jobsDir . 'MassIndex.php';
@@ -592,6 +593,7 @@
  * Jobs
  */
 $wgJobClasses[ 'cirrusSearchDeletePages' ] = 'CirrusSearch\Job\DeletePages';
+$wgJobClasses[ 'cirrusSearchIncomingLinkCount' ] = 
'CirrusSearch\Job\IncomingLinkCount';
 $wgJobClasses[ 'cirrusSearchLinksUpdate' ] = 'CirrusSearch\Job\LinksUpdate';
 $wgJobClasses[ 'cirrusSearchLinksUpdatePrioritized' ] = 
'CirrusSearch\Job\LinksUpdate';
 $wgJobClasses[ 'cirrusSearchLinksUpdateSecondary' ] = 
'CirrusSearch\Job\LinksUpdateSecondary';
diff --git a/includes/Job/IncomingLinkCount.php 
b/includes/Job/IncomingLinkCount.php
new file mode 100644
index 000..e9e4570
--- /dev/null
+++ b/includes/Job/IncomingLinkCount.php
@@ -0,0 +1,37 @@
+?php
+
+namespace CirrusSearch\Job;
+use \CirrusSearch\Updater;
+
+/**
+ * Updates link counts to page when it is newly linked or unlinked.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * http://www.gnu.org/copyleft/gpl.html
+ */
+class IncomingLinkCount extends Job {
+   public function __construct( $title, $params ) {
+   parent::__construct( $title, $params );
+   }
+
+   protected function doJob() {
+   // Load the titles and filter out any that no longer exist.
+   $updater = new Updater();
+   // We're intentionally throwing out whether or not this job 
succeeds.
+   // We're loggging it but we're not retrying.
+   $updater-updateLinkedArticles( array( $this-getTitle() ) );
+   return true;
+   }
+}
diff --git a/includes/Job/LinksUpdate.php b/includes/Job/LinksUpdate.php
index 38a52e3..92c639c 100644
--- a/includes/Job/LinksUpdate.php
+++ b/includes/Job/LinksUpdate.php
@@ -3,6 +3,7 @@
 namespace CirrusSearch\Job;
 use \CirrusSearch\Updater;
 use \JobQueueGroup;
+use \Title;
 
 /**
  * Performs the appropriate updates to Elasticsearch after a LinksUpdate is
@@ -47,25 +48,27 @@
$updater = new Updater();
$res = $updater-updateFromTitle( $this-title );
if ( $res === false ) {
-   // Couldn't update. Bail 

[MediaWiki-commits] [Gerrit] Redo job that counts incoming links - change (mediawiki...CirrusSearch)

2014-09-24 Thread Manybubbles (Code Review)
Manybubbles has uploaded a new change for review.

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

Change subject: Redo job that counts incoming links
..

Redo job that counts incoming links

Old way:
When a page gets a link added or removed queue a single job with the target
of those links in it.  That job counts all the links to each of the updated
pages and reindexes all of them.

New way:
When a page gets a link added or removed queue one job per link target that
was added or removed.  That job counts all the links for only a single
page.

The new way is better then the old way because it allows deduplication of
links count update jobs.  This is important if a popular template is edited
to add or remove links to a certain page.  In the old way the incoming links
were counted over and over and over again and the page might be updated
many time though many will be nooped because the incoming links count won't
have changed enough.  In the new way the page will be updated and the links
counted far fewer times due to deduplication.

Change-Id: Ie1ddf414f0bcb188dfa536ea9050aeff5f410cf5
(cherry picked from commit 037a53b50e87acc310d61bfdabbb33f89f2705ce)
---
M CirrusSearch.php
A includes/Job/IncomingLinkCount.php
M includes/Job/LinksUpdate.php
M includes/Job/LinksUpdateSecondary.php
M includes/Updater.php
M tests/jenkins/Jenkins.php
D tests/unit/Job/LinksUpdateSecondaryTest.php
7 files changed, 74 insertions(+), 85 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/CirrusSearch 
refs/changes/87/162587/1

diff --git a/CirrusSearch.php b/CirrusSearch.php
index 6d8f8ba..1e6e37b 100644
--- a/CirrusSearch.php
+++ b/CirrusSearch.php
@@ -506,6 +506,7 @@
 $wgAutoloadClasses['CirrusSearch\InterwikiSearcher'] = $includes . 
'InterwikiSearcher.php';
 $wgAutoloadClasses['CirrusSearch\Job\Job'] = $jobsDir . 'Job.php';
 $wgAutoloadClasses['CirrusSearch\Job\DeletePages'] = $jobsDir . 
'DeletePages.php';
+$wgAutoloadClasses['CirrusSearch\Job\IncomingLinkCount'] = $jobsDir . 
'IncomingLinkCount.php';
 $wgAutoloadClasses['CirrusSearch\Job\LinksUpdate'] = $jobsDir . 
'LinksUpdate.php';
 $wgAutoloadClasses['CirrusSearch\Job\LinksUpdateSecondary'] = $jobsDir . 
'LinksUpdateSecondary.php';
 $wgAutoloadClasses['CirrusSearch\Job\MassIndex'] = $jobsDir . 'MassIndex.php';
@@ -570,6 +571,7 @@
  * Jobs
  */
 $wgJobClasses[ 'cirrusSearchDeletePages' ] = 'CirrusSearch\Job\DeletePages';
+$wgJobClasses[ 'cirrusSearchIncomingLinkCount' ] = 
'CirrusSearch\Job\IncomingLinkCount';
 $wgJobClasses[ 'cirrusSearchLinksUpdate' ] = 'CirrusSearch\Job\LinksUpdate';
 $wgJobClasses[ 'cirrusSearchLinksUpdatePrioritized' ] = 
'CirrusSearch\Job\LinksUpdate';
 $wgJobClasses[ 'cirrusSearchLinksUpdateSecondary' ] = 
'CirrusSearch\Job\LinksUpdateSecondary';
diff --git a/includes/Job/IncomingLinkCount.php 
b/includes/Job/IncomingLinkCount.php
new file mode 100644
index 000..e9e4570
--- /dev/null
+++ b/includes/Job/IncomingLinkCount.php
@@ -0,0 +1,37 @@
+?php
+
+namespace CirrusSearch\Job;
+use \CirrusSearch\Updater;
+
+/**
+ * Updates link counts to page when it is newly linked or unlinked.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * http://www.gnu.org/copyleft/gpl.html
+ */
+class IncomingLinkCount extends Job {
+   public function __construct( $title, $params ) {
+   parent::__construct( $title, $params );
+   }
+
+   protected function doJob() {
+   // Load the titles and filter out any that no longer exist.
+   $updater = new Updater();
+   // We're intentionally throwing out whether or not this job 
succeeds.
+   // We're loggging it but we're not retrying.
+   $updater-updateLinkedArticles( array( $this-getTitle() ) );
+   return true;
+   }
+}
diff --git a/includes/Job/LinksUpdate.php b/includes/Job/LinksUpdate.php
index 38a52e3..92c639c 100644
--- a/includes/Job/LinksUpdate.php
+++ b/includes/Job/LinksUpdate.php
@@ -3,6 +3,7 @@
 namespace CirrusSearch\Job;
 use \CirrusSearch\Updater;
 use \JobQueueGroup;
+use \Title;
 
 /**
  * Performs the appropriate updates to Elasticsearch after a LinksUpdate is
@@ -47,25 +48,27 @@
$updater = new Updater();
$res = 

[MediaWiki-commits] [Gerrit] Redo job that counts incoming links - change (mediawiki...CirrusSearch)

2014-09-24 Thread Manybubbles (Code Review)
Manybubbles has uploaded a new change for review.

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

Change subject: Redo job that counts incoming links
..

Redo job that counts incoming links

Old way:
When a page gets a link added or removed queue a single job with the target
of those links in it.  That job counts all the links to each of the updated
pages and reindexes all of them.

New way:
When a page gets a link added or removed queue one job per link target that
was added or removed.  That job counts all the links for only a single
page.

The new way is better then the old way because it allows deduplication of
links count update jobs.  This is important if a popular template is edited
to add or remove links to a certain page.  In the old way the incoming links
were counted over and over and over again and the page might be updated
many time though many will be nooped because the incoming links count won't
have changed enough.  In the new way the page will be updated and the links
counted far fewer times due to deduplication.

Change-Id: Ie1ddf414f0bcb188dfa536ea9050aeff5f410cf5
(cherry picked from commit 037a53b50e87acc310d61bfdabbb33f89f2705ce)
---
M CirrusSearch.php
A includes/Job/IncomingLinkCount.php
M includes/Job/LinksUpdate.php
M includes/Job/LinksUpdateSecondary.php
M includes/Updater.php
M tests/jenkins/Jenkins.php
D tests/unit/Job/LinksUpdateSecondaryTest.php
7 files changed, 74 insertions(+), 85 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/CirrusSearch 
refs/changes/88/162588/1

diff --git a/CirrusSearch.php b/CirrusSearch.php
index 08a63fb..d72f0e0 100644
--- a/CirrusSearch.php
+++ b/CirrusSearch.php
@@ -528,6 +528,7 @@
 $wgAutoloadClasses['CirrusSearch\InterwikiSearcher'] = $includes . 
'InterwikiSearcher.php';
 $wgAutoloadClasses['CirrusSearch\Job\Job'] = $jobsDir . 'Job.php';
 $wgAutoloadClasses['CirrusSearch\Job\DeletePages'] = $jobsDir . 
'DeletePages.php';
+$wgAutoloadClasses['CirrusSearch\Job\IncomingLinkCount'] = $jobsDir . 
'IncomingLinkCount.php';
 $wgAutoloadClasses['CirrusSearch\Job\LinksUpdate'] = $jobsDir . 
'LinksUpdate.php';
 $wgAutoloadClasses['CirrusSearch\Job\LinksUpdateSecondary'] = $jobsDir . 
'LinksUpdateSecondary.php';
 $wgAutoloadClasses['CirrusSearch\Job\MassIndex'] = $jobsDir . 'MassIndex.php';
@@ -592,6 +593,7 @@
  * Jobs
  */
 $wgJobClasses[ 'cirrusSearchDeletePages' ] = 'CirrusSearch\Job\DeletePages';
+$wgJobClasses[ 'cirrusSearchIncomingLinkCount' ] = 
'CirrusSearch\Job\IncomingLinkCount';
 $wgJobClasses[ 'cirrusSearchLinksUpdate' ] = 'CirrusSearch\Job\LinksUpdate';
 $wgJobClasses[ 'cirrusSearchLinksUpdatePrioritized' ] = 
'CirrusSearch\Job\LinksUpdate';
 $wgJobClasses[ 'cirrusSearchLinksUpdateSecondary' ] = 
'CirrusSearch\Job\LinksUpdateSecondary';
diff --git a/includes/Job/IncomingLinkCount.php 
b/includes/Job/IncomingLinkCount.php
new file mode 100644
index 000..e9e4570
--- /dev/null
+++ b/includes/Job/IncomingLinkCount.php
@@ -0,0 +1,37 @@
+?php
+
+namespace CirrusSearch\Job;
+use \CirrusSearch\Updater;
+
+/**
+ * Updates link counts to page when it is newly linked or unlinked.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * http://www.gnu.org/copyleft/gpl.html
+ */
+class IncomingLinkCount extends Job {
+   public function __construct( $title, $params ) {
+   parent::__construct( $title, $params );
+   }
+
+   protected function doJob() {
+   // Load the titles and filter out any that no longer exist.
+   $updater = new Updater();
+   // We're intentionally throwing out whether or not this job 
succeeds.
+   // We're loggging it but we're not retrying.
+   $updater-updateLinkedArticles( array( $this-getTitle() ) );
+   return true;
+   }
+}
diff --git a/includes/Job/LinksUpdate.php b/includes/Job/LinksUpdate.php
index 38a52e3..92c639c 100644
--- a/includes/Job/LinksUpdate.php
+++ b/includes/Job/LinksUpdate.php
@@ -3,6 +3,7 @@
 namespace CirrusSearch\Job;
 use \CirrusSearch\Updater;
 use \JobQueueGroup;
+use \Title;
 
 /**
  * Performs the appropriate updates to Elasticsearch after a LinksUpdate is
@@ -47,25 +48,27 @@
$updater = new Updater();
$res = 

[MediaWiki-commits] [Gerrit] Add Oozie setup to generate webrequest tsvs - change (analytics/refinery)

2014-09-24 Thread QChris (Code Review)
Hello Ottomata,

I'd like you to do a code review.  Please visit

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

to review the following change.

Change subject: Add Oozie setup to generate webrequest tsvs
..

Add Oozie setup to generate webrequest tsvs

For now, only sampled-1000, mobile-sampled-100, and zero get
generated.

Change-Id: I0cb0cd290e2979158d9cb54630669df473d6e61b
---
A oozie/webrequest/generate_tsvs/bundle.properties
A oozie/webrequest/generate_tsvs/bundle.xml
A oozie/webrequest/generate_tsvs/coordinator.xml
A oozie/webrequest/generate_tsvs/generate_mobile-sampled-100_tsv.hql
A oozie/webrequest/generate_tsvs/generate_sampled-1000_tsv.hql
A oozie/webrequest/generate_tsvs/generate_zero_tsv.hql
A oozie/webrequest/generate_tsvs/workflow.xml
7 files changed, 604 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/analytics/refinery 
refs/changes/89/162589/1

diff --git a/oozie/webrequest/generate_tsvs/bundle.properties 
b/oozie/webrequest/generate_tsvs/bundle.properties
new file mode 100644
index 000..23657eb
--- /dev/null
+++ b/oozie/webrequest/generate_tsvs/bundle.properties
@@ -0,0 +1,61 @@
+# Configures a coordinator to generate daily tsvs from webrequests table.
+#
+# Usage:
+# oozie job -run \
+# -config oozie/webrequest/generate-tsvs/bundle.properties
+#
+# NOTE:  The $oozie_directory must be synced to HDFS so that all relevant
+#.xml files exist there when this job is submitted.
+
+
+name_node = hdfs://analytics-hadoop
+job_tracker   = resourcemanager.analytics.eqiad.wmnet:8032
+queue_name= adhoc
+
+# Base path in HDFS to oozie files.
+# Other files will be used relative to this path.
+oozie_directory   = ${name_node}/wmf/refinery/current/oozie
+
+# HDFS path to coordinator to run for each webrequest_source.
+coordinator_file  = 
${oozie_directory}/webrequest/generate_tsvs/coordinator.xml
+
+# HDFS path to workflow to run.
+workflow_file = 
${oozie_directory}/webrequest/generate_tsvs/workflow.xml
+
+# HDFS path to webrequest dataset definition
+webrequest_datasets_file  = ${oozie_directory}/webrequest/datasets.xml
+
+# Time to start running this coordinator.
+# Make sure to have hours and minutes at 0!
+start_time= 2014-04-01T00:00Z
+
+# Time to stop running this coordinator.  Year 3000 == never!
+stop_time = 3000-01-01T00:00Z
+
+# HDFS path to workflow to mark a directory as done
+mark_directory_done_workflow_file = 
${oozie_directory}/util/mark_directory_done/workflow.xml
+
+archive_job_output_workflow_file  = 
${oozie_directory}/util/archive_job_output/workflow.xml
+
+# HDFS path to hive-site.xml file.  This is needed to run hive actions.
+hive_site_xml = ${oozie_directory}/util/hive/hive-site.xml
+
+# Table to write hourly pagecounts to (fully qualified)
+webrequest_table  = wmf_raw.webrequest
+
+# HDFS path to directory where webrequst data is time bucketed.
+webrequest_data_directory = ${name_node}/wmf/data/raw/webrequest
+
+# Temporary directory
+temporary_directory   = ${name_node}/tmp
+
+# Archive base directory
+archive_directory = ${name_node}/wmf/data/archive
+
+# Archive directory for webrequest data
+webrequest_archive_directory  = ${archive_directory}/webrequest
+
+# Coordintator to start.
+oozie.bundle.application.path = 
${oozie_directory}/webrequest/generate_tsvs/bundle.xml
+oozie.use.system.libpath  = true
+oozie.action.external.stats.write = true
diff --git a/oozie/webrequest/generate_tsvs/bundle.xml 
b/oozie/webrequest/generate_tsvs/bundle.xml
new file mode 100644
index 000..b6913b4
--- /dev/null
+++ b/oozie/webrequest/generate_tsvs/bundle.xml
@@ -0,0 +1,81 @@
+?xml version=1.0 encoding=UTF-8?
+bundle-app xmlns=uri:oozie:bundle:0.2
+name=webrequest_generate_tsvs-bundle
+
+parameters
+property
+namequeue_name/name
+valueadhoc/value
+/property
+
+!-- Required properties. --
+propertynamecoordinator_file/name/property
+propertynamename_node/name/property
+propertynamejob_tracker/name/property
+propertynamestart_time/name/property
+propertynamestop_time/name/property
+propertynamewebrequest_datasets_file/name/property
+propertynamewebrequest_data_directory/name/property
+propertynamehive_site_xml/name/property
+propertynameworkflow_file/name/property
+propertynamewebrequest_table/name/property
+propertynamemark_directory_done_workflow_file/name/property
+propertynametemporary_directory/name/property
+propertynamewebrequest_archive_directory/name/property
+propertynamearchive_job_output_workflow_file/name/property
+/parameters
+
+ 

[MediaWiki-commits] [Gerrit] More cirrus shard assignment hints - change (operations/mediawiki-config)

2014-09-24 Thread Manybubbles (Code Review)
Manybubbles has uploaded a new change for review.

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

Change subject: More cirrus shard assignment hints
..

More cirrus shard assignment hints

Change-Id: I06998fccb47fe342c01d1f18f9ee2c94b2295e73
---
M wmf-config/InitialiseSettings.php
1 file changed, 3 insertions(+), 1 deletion(-)


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

diff --git a/wmf-config/InitialiseSettings.php 
b/wmf-config/InitialiseSettings.php
index fd17fce..19990ed 100644
--- a/wmf-config/InitialiseSettings.php
+++ b/wmf-config/InitialiseSettings.php
@@ -13802,12 +13802,14 @@
 
 'wmgCirrusSearchMaxShardsPerNode' = array(
'default' = array(),
-   'commonswiki' = array( 'file' = 1 ),
+   'commonswiki' = array( 'file' = 1, 'general' = 2 ),
'dewiki' = array( 'content' = 1 ),
+   'enwiktionary' = array( 'content' = 1, 'general' = 1 ),
'enwiki' = array( 'content' = 1, 'general' = 2 ),
'eswiki' = array( 'content' = 1 ),
'frwiki' = array( 'content' = 1 ),
'nlwiki' = array( 'content' = 1 ),
+   'ptwiki' = array( 'content' = 1 ),
'ruwiki' = array( 'content' = 1 ),
'zhwiki' = array( 'content' = 1 ),
 ),

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I06998fccb47fe342c01d1f18f9ee2c94b2295e73
Gerrit-PatchSet: 1
Gerrit-Project: operations/mediawiki-config
Gerrit-Branch: master
Gerrit-Owner: Manybubbles never...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] Redo job that counts incoming links - change (mediawiki...CirrusSearch)

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

Change subject: Redo job that counts incoming links
..


Redo job that counts incoming links

Old way:
When a page gets a link added or removed queue a single job with the target
of those links in it.  That job counts all the links to each of the updated
pages and reindexes all of them.

New way:
When a page gets a link added or removed queue one job per link target that
was added or removed.  That job counts all the links for only a single
page.

The new way is better then the old way because it allows deduplication of
links count update jobs.  This is important if a popular template is edited
to add or remove links to a certain page.  In the old way the incoming links
were counted over and over and over again and the page might be updated
many time though many will be nooped because the incoming links count won't
have changed enough.  In the new way the page will be updated and the links
counted far fewer times due to deduplication.

Change-Id: Ie1ddf414f0bcb188dfa536ea9050aeff5f410cf5
(cherry picked from commit 037a53b50e87acc310d61bfdabbb33f89f2705ce)
---
M CirrusSearch.php
A includes/Job/IncomingLinkCount.php
M includes/Job/LinksUpdate.php
M includes/Job/LinksUpdateSecondary.php
M includes/Updater.php
M tests/jenkins/Jenkins.php
D tests/unit/Job/LinksUpdateSecondaryTest.php
7 files changed, 74 insertions(+), 85 deletions(-)

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



diff --git a/CirrusSearch.php b/CirrusSearch.php
index 08a63fb..d72f0e0 100644
--- a/CirrusSearch.php
+++ b/CirrusSearch.php
@@ -528,6 +528,7 @@
 $wgAutoloadClasses['CirrusSearch\InterwikiSearcher'] = $includes . 
'InterwikiSearcher.php';
 $wgAutoloadClasses['CirrusSearch\Job\Job'] = $jobsDir . 'Job.php';
 $wgAutoloadClasses['CirrusSearch\Job\DeletePages'] = $jobsDir . 
'DeletePages.php';
+$wgAutoloadClasses['CirrusSearch\Job\IncomingLinkCount'] = $jobsDir . 
'IncomingLinkCount.php';
 $wgAutoloadClasses['CirrusSearch\Job\LinksUpdate'] = $jobsDir . 
'LinksUpdate.php';
 $wgAutoloadClasses['CirrusSearch\Job\LinksUpdateSecondary'] = $jobsDir . 
'LinksUpdateSecondary.php';
 $wgAutoloadClasses['CirrusSearch\Job\MassIndex'] = $jobsDir . 'MassIndex.php';
@@ -592,6 +593,7 @@
  * Jobs
  */
 $wgJobClasses[ 'cirrusSearchDeletePages' ] = 'CirrusSearch\Job\DeletePages';
+$wgJobClasses[ 'cirrusSearchIncomingLinkCount' ] = 
'CirrusSearch\Job\IncomingLinkCount';
 $wgJobClasses[ 'cirrusSearchLinksUpdate' ] = 'CirrusSearch\Job\LinksUpdate';
 $wgJobClasses[ 'cirrusSearchLinksUpdatePrioritized' ] = 
'CirrusSearch\Job\LinksUpdate';
 $wgJobClasses[ 'cirrusSearchLinksUpdateSecondary' ] = 
'CirrusSearch\Job\LinksUpdateSecondary';
diff --git a/includes/Job/IncomingLinkCount.php 
b/includes/Job/IncomingLinkCount.php
new file mode 100644
index 000..e9e4570
--- /dev/null
+++ b/includes/Job/IncomingLinkCount.php
@@ -0,0 +1,37 @@
+?php
+
+namespace CirrusSearch\Job;
+use \CirrusSearch\Updater;
+
+/**
+ * Updates link counts to page when it is newly linked or unlinked.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * http://www.gnu.org/copyleft/gpl.html
+ */
+class IncomingLinkCount extends Job {
+   public function __construct( $title, $params ) {
+   parent::__construct( $title, $params );
+   }
+
+   protected function doJob() {
+   // Load the titles and filter out any that no longer exist.
+   $updater = new Updater();
+   // We're intentionally throwing out whether or not this job 
succeeds.
+   // We're loggging it but we're not retrying.
+   $updater-updateLinkedArticles( array( $this-getTitle() ) );
+   return true;
+   }
+}
diff --git a/includes/Job/LinksUpdate.php b/includes/Job/LinksUpdate.php
index 38a52e3..92c639c 100644
--- a/includes/Job/LinksUpdate.php
+++ b/includes/Job/LinksUpdate.php
@@ -3,6 +3,7 @@
 namespace CirrusSearch\Job;
 use \CirrusSearch\Updater;
 use \JobQueueGroup;
+use \Title;
 
 /**
  * Performs the appropriate updates to Elasticsearch after a LinksUpdate is
@@ -47,25 +48,27 @@
$updater = new Updater();
$res = $updater-updateFromTitle( $this-title );
if ( 

[MediaWiki-commits] [Gerrit] Redo job that counts incoming links - change (mediawiki...CirrusSearch)

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

Change subject: Redo job that counts incoming links
..


Redo job that counts incoming links

Old way:
When a page gets a link added or removed queue a single job with the target
of those links in it.  That job counts all the links to each of the updated
pages and reindexes all of them.

New way:
When a page gets a link added or removed queue one job per link target that
was added or removed.  That job counts all the links for only a single
page.

The new way is better then the old way because it allows deduplication of
links count update jobs.  This is important if a popular template is edited
to add or remove links to a certain page.  In the old way the incoming links
were counted over and over and over again and the page might be updated
many time though many will be nooped because the incoming links count won't
have changed enough.  In the new way the page will be updated and the links
counted far fewer times due to deduplication.

Change-Id: Ie1ddf414f0bcb188dfa536ea9050aeff5f410cf5
(cherry picked from commit 037a53b50e87acc310d61bfdabbb33f89f2705ce)
---
M CirrusSearch.php
A includes/Job/IncomingLinkCount.php
M includes/Job/LinksUpdate.php
M includes/Job/LinksUpdateSecondary.php
M includes/Updater.php
M tests/jenkins/Jenkins.php
D tests/unit/Job/LinksUpdateSecondaryTest.php
7 files changed, 74 insertions(+), 85 deletions(-)

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



diff --git a/CirrusSearch.php b/CirrusSearch.php
index 6d8f8ba..1e6e37b 100644
--- a/CirrusSearch.php
+++ b/CirrusSearch.php
@@ -506,6 +506,7 @@
 $wgAutoloadClasses['CirrusSearch\InterwikiSearcher'] = $includes . 
'InterwikiSearcher.php';
 $wgAutoloadClasses['CirrusSearch\Job\Job'] = $jobsDir . 'Job.php';
 $wgAutoloadClasses['CirrusSearch\Job\DeletePages'] = $jobsDir . 
'DeletePages.php';
+$wgAutoloadClasses['CirrusSearch\Job\IncomingLinkCount'] = $jobsDir . 
'IncomingLinkCount.php';
 $wgAutoloadClasses['CirrusSearch\Job\LinksUpdate'] = $jobsDir . 
'LinksUpdate.php';
 $wgAutoloadClasses['CirrusSearch\Job\LinksUpdateSecondary'] = $jobsDir . 
'LinksUpdateSecondary.php';
 $wgAutoloadClasses['CirrusSearch\Job\MassIndex'] = $jobsDir . 'MassIndex.php';
@@ -570,6 +571,7 @@
  * Jobs
  */
 $wgJobClasses[ 'cirrusSearchDeletePages' ] = 'CirrusSearch\Job\DeletePages';
+$wgJobClasses[ 'cirrusSearchIncomingLinkCount' ] = 
'CirrusSearch\Job\IncomingLinkCount';
 $wgJobClasses[ 'cirrusSearchLinksUpdate' ] = 'CirrusSearch\Job\LinksUpdate';
 $wgJobClasses[ 'cirrusSearchLinksUpdatePrioritized' ] = 
'CirrusSearch\Job\LinksUpdate';
 $wgJobClasses[ 'cirrusSearchLinksUpdateSecondary' ] = 
'CirrusSearch\Job\LinksUpdateSecondary';
diff --git a/includes/Job/IncomingLinkCount.php 
b/includes/Job/IncomingLinkCount.php
new file mode 100644
index 000..e9e4570
--- /dev/null
+++ b/includes/Job/IncomingLinkCount.php
@@ -0,0 +1,37 @@
+?php
+
+namespace CirrusSearch\Job;
+use \CirrusSearch\Updater;
+
+/**
+ * Updates link counts to page when it is newly linked or unlinked.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * http://www.gnu.org/copyleft/gpl.html
+ */
+class IncomingLinkCount extends Job {
+   public function __construct( $title, $params ) {
+   parent::__construct( $title, $params );
+   }
+
+   protected function doJob() {
+   // Load the titles and filter out any that no longer exist.
+   $updater = new Updater();
+   // We're intentionally throwing out whether or not this job 
succeeds.
+   // We're loggging it but we're not retrying.
+   $updater-updateLinkedArticles( array( $this-getTitle() ) );
+   return true;
+   }
+}
diff --git a/includes/Job/LinksUpdate.php b/includes/Job/LinksUpdate.php
index 38a52e3..92c639c 100644
--- a/includes/Job/LinksUpdate.php
+++ b/includes/Job/LinksUpdate.php
@@ -3,6 +3,7 @@
 namespace CirrusSearch\Job;
 use \CirrusSearch\Updater;
 use \JobQueueGroup;
+use \Title;
 
 /**
  * Performs the appropriate updates to Elasticsearch after a LinksUpdate is
@@ -47,25 +48,27 @@
$updater = new Updater();
$res = $updater-updateFromTitle( $this-title );
if ( 

[MediaWiki-commits] [Gerrit] SWAT update Cirrus - change (mediawiki/core)

2014-09-24 Thread Manybubbles (Code Review)
Manybubbles has uploaded a new change for review.

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

Change subject: SWAT update Cirrus
..

SWAT update Cirrus

Grabs:
I2bd1ccf9116d8702ec2c9978fbc9a4388522a7ee
Ic037f0901984671679a46d1e894f69edee888136
Ie1ddf414f0bcb188dfa536ea9050aeff5f410cf5

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


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/91/162591/1

diff --git a/extensions/CirrusSearch b/extensions/CirrusSearch
index 0b6ed00..16732e4 16
--- a/extensions/CirrusSearch
+++ b/extensions/CirrusSearch
-Subproject commit 0b6ed005429cbcf2a779970b67c949c87a9adf8b
+Subproject commit 16732e453e8473fac9a7c5cca61e83e9a89ea804

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I658d84c301f741b6e0ad514da986a4749f1d0512
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: wmf/1.24wmf22
Gerrit-Owner: Manybubbles never...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] Layout adjustments to reduce overlap with chevron - change (mediawiki...MultimediaViewer)

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

Change subject: Layout adjustments to reduce overlap with chevron
..


Layout adjustments to reduce overlap with chevron

For files with long credit information, part of the text can get hidden
with the down-pointing chevron.
This patchset adjust sizes and margins of different elements to reduce that 
overlap.

Change-Id: I03f3b84d4ad0f754a0a20f2e78016711164ef433
---
M resources/mmv/ui/mmv.ui.metadataPanel.less
M resources/mmv/ui/mmv.ui.metadataPanelScroller.less
2 files changed, 4 insertions(+), 4 deletions(-)

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



diff --git a/resources/mmv/ui/mmv.ui.metadataPanel.less 
b/resources/mmv/ui/mmv.ui.metadataPanel.less
index ba59a31..26e475f 100644
--- a/resources/mmv/ui/mmv.ui.metadataPanel.less
+++ b/resources/mmv/ui/mmv.ui.metadataPanel.less
@@ -24,11 +24,11 @@
 
 .mw-mmv-title-para {
margin: 0;
-   padding: 10px 0 0;
+   padding: 8px 0 0;
 }
 .mw-mmv-credit {
margin: 0;
-   padding: 5px 0;
+   padding: 2px 0;
 }
 
 .mw-mmv-title {
diff --git a/resources/mmv/ui/mmv.ui.metadataPanelScroller.less 
b/resources/mmv/ui/mmv.ui.metadataPanelScroller.less
index 0bb2c73..0ac10bf 100644
--- a/resources/mmv/ui/mmv.ui.metadataPanelScroller.less
+++ b/resources/mmv/ui/mmv.ui.metadataPanelScroller.less
@@ -3,7 +3,7 @@
 @import mediawiki.mixins.animation;
 
 @drag-icon-width: 64px;
-@drag-icon-height: 18px;
+@drag-icon-height: 16px;
 @drag-icon-color: #e6e6e6;
 @drag-icon-invite-color: #347bff;
 
@@ -97,7 +97,7 @@
 
cursor: pointer;
z-index: 1; // make sure it is above the text - the icon is visually at 
the bottom but in the DOM at the top
-   .opacity(0.7);
+   .opacity(0.6);
transition: opacity 0.25s;
 
-pointing-down { // use single-class selector - chevron direction is 
important enough to make it IE6-compatible

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I03f3b84d4ad0f754a0a20f2e78016711164ef433
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/MultimediaViewer
Gerrit-Branch: master
Gerrit-Owner: Pginer pgi...@wikimedia.org
Gerrit-Reviewer: Gilles gdu...@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] SWAT update Cirrus - change (mediawiki/core)

2014-09-24 Thread Manybubbles (Code Review)
Manybubbles has uploaded a new change for review.

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

Change subject: SWAT update Cirrus
..

SWAT update Cirrus

Grabs:
Ie1ddf414f0bcb188dfa536ea9050aeff5f410cf5
I2bd1ccf9116d8702ec2c9978fbc9a4388522a7ee

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


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/92/162592/1

diff --git a/extensions/CirrusSearch b/extensions/CirrusSearch
index a15f3fb..7e0f8a2 16
--- a/extensions/CirrusSearch
+++ b/extensions/CirrusSearch
-Subproject commit a15f3fb00a0c9805d540a20e29977b364ac4c854
+Subproject commit 7e0f8a29d4c33f0a965e65bef9e3ffe5161859e6

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I8f644bf3a80aadb07fe52d01fc1ce40c5e940c92
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: wmf/1.24wmf21
Gerrit-Owner: Manybubbles never...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] More cirrus shard assignment hints - change (operations/mediawiki-config)

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

Change subject: More cirrus shard assignment hints
..


More cirrus shard assignment hints

DEPLOYMENT: Most of these were already applied to the live
indexes.

Change-Id: I06998fccb47fe342c01d1f18f9ee2c94b2295e73
---
M wmf-config/InitialiseSettings.php
1 file changed, 3 insertions(+), 1 deletion(-)

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



diff --git a/wmf-config/InitialiseSettings.php 
b/wmf-config/InitialiseSettings.php
index fd17fce..19990ed 100644
--- a/wmf-config/InitialiseSettings.php
+++ b/wmf-config/InitialiseSettings.php
@@ -13802,12 +13802,14 @@
 
 'wmgCirrusSearchMaxShardsPerNode' = array(
'default' = array(),
-   'commonswiki' = array( 'file' = 1 ),
+   'commonswiki' = array( 'file' = 1, 'general' = 2 ),
'dewiki' = array( 'content' = 1 ),
+   'enwiktionary' = array( 'content' = 1, 'general' = 1 ),
'enwiki' = array( 'content' = 1, 'general' = 2 ),
'eswiki' = array( 'content' = 1 ),
'frwiki' = array( 'content' = 1 ),
'nlwiki' = array( 'content' = 1 ),
+   'ptwiki' = array( 'content' = 1 ),
'ruwiki' = array( 'content' = 1 ),
'zhwiki' = array( 'content' = 1 ),
 ),

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I06998fccb47fe342c01d1f18f9ee2c94b2295e73
Gerrit-PatchSet: 2
Gerrit-Project: operations/mediawiki-config
Gerrit-Branch: master
Gerrit-Owner: Manybubbles never...@wikimedia.org
Gerrit-Reviewer: Chad ch...@wikimedia.org
Gerrit-Reviewer: Manybubbles never...@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] Switch throttle to new job - change (operations/mediawiki-config)

2014-09-24 Thread Manybubbles (Code Review)
Manybubbles has uploaded a new change for review.

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

Change subject: Switch throttle to new job
..

Switch throttle to new job

Change-Id: Ide5fba01286d1982cd4336d3c4e0b6caa7b3263a
---
M wmf-config/CirrusSearch-common.php
1 file changed, 1 insertion(+), 1 deletion(-)


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

diff --git a/wmf-config/CirrusSearch-common.php 
b/wmf-config/CirrusSearch-common.php
index 1aff7e4..09ccfdc 100644
--- a/wmf-config/CirrusSearch-common.php
+++ b/wmf-config/CirrusSearch-common.php
@@ -44,7 +44,7 @@
 # Also engage a delay for the Cirrus job that counts incoming links to pages 
when
 # pages are newly linked or unlinked.  Too many link count queries at once 
could flood
 # Elasticsearch.
-$wgJobBackoffThrottling['cirrusSearchLinksUpdateSecondary'] = 0.25;
+$wgJobBackoffThrottling['cirrusSearchIncomingLinkCount'] = 0.25;
 
 # Ban the hebrew plugin, it is unstable
 $wgCirrusSearchBannedPlugins[] = 'elasticsearch-analysis-hebrew';

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ide5fba01286d1982cd4336d3c4e0b6caa7b3263a
Gerrit-PatchSet: 1
Gerrit-Project: operations/mediawiki-config
Gerrit-Branch: master
Gerrit-Owner: Manybubbles never...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] SWAT update Cirrus - change (mediawiki/core)

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

Change subject: SWAT update Cirrus
..


SWAT update Cirrus

Grabs:
I2bd1ccf9116d8702ec2c9978fbc9a4388522a7ee
Ic037f0901984671679a46d1e894f69edee888136
Ie1ddf414f0bcb188dfa536ea9050aeff5f410cf5

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

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



diff --git a/extensions/CirrusSearch b/extensions/CirrusSearch
index 0b6ed00..16732e4 16
--- a/extensions/CirrusSearch
+++ b/extensions/CirrusSearch
-Subproject commit 0b6ed005429cbcf2a779970b67c949c87a9adf8b
+Subproject commit 16732e453e8473fac9a7c5cca61e83e9a89ea804

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I658d84c301f741b6e0ad514da986a4749f1d0512
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: wmf/1.24wmf22
Gerrit-Owner: Manybubbles never...@wikimedia.org
Gerrit-Reviewer: Chad ch...@wikimedia.org
Gerrit-Reviewer: Manybubbles never...@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] Right swipe in ToC hint for RTL, part 2 - change (apps...wikipedia)

2014-09-24 Thread Dbrant (Code Review)
Dbrant has submitted this change and it was merged.

Change subject: Right swipe in ToC hint for RTL, part 2
..


Right swipe in ToC hint for RTL, part 2

Some RTL languages don't have translations yet.
Adding a fuzzy English text indicating right swipe
instead of left swipe.

Change-Id: I9d68a030a84868fb5488e8e014131a666d20e5bb
---
A wikipedia/res/values-ps/strings.xml
A wikipedia/res/values-sd/strings.xml
A wikipedia/res/values-ug/strings.xml
A wikipedia/res/values-ur/strings.xml
4 files changed, 16 insertions(+), 0 deletions(-)

Approvals:
  Dbrant: Looks good to me, approved



diff --git a/wikipedia/res/values-ps/strings.xml 
b/wikipedia/res/values-ps/strings.xml
new file mode 100644
index 000..6f4b78e
--- /dev/null
+++ b/wikipedia/res/values-ps/strings.xml
@@ -0,0 +1,4 @@
+?xml version=1.0 encoding=utf-8?
+resources
+string name=toc_hint fuzzy=trueSwipe right for sections, or use the 
menu button on the top right./string
+/resources
\ No newline at end of file
diff --git a/wikipedia/res/values-sd/strings.xml 
b/wikipedia/res/values-sd/strings.xml
new file mode 100644
index 000..6f4b78e
--- /dev/null
+++ b/wikipedia/res/values-sd/strings.xml
@@ -0,0 +1,4 @@
+?xml version=1.0 encoding=utf-8?
+resources
+string name=toc_hint fuzzy=trueSwipe right for sections, or use the 
menu button on the top right./string
+/resources
\ No newline at end of file
diff --git a/wikipedia/res/values-ug/strings.xml 
b/wikipedia/res/values-ug/strings.xml
new file mode 100644
index 000..6f4b78e
--- /dev/null
+++ b/wikipedia/res/values-ug/strings.xml
@@ -0,0 +1,4 @@
+?xml version=1.0 encoding=utf-8?
+resources
+string name=toc_hint fuzzy=trueSwipe right for sections, or use the 
menu button on the top right./string
+/resources
\ No newline at end of file
diff --git a/wikipedia/res/values-ur/strings.xml 
b/wikipedia/res/values-ur/strings.xml
new file mode 100644
index 000..6f4b78e
--- /dev/null
+++ b/wikipedia/res/values-ur/strings.xml
@@ -0,0 +1,4 @@
+?xml version=1.0 encoding=utf-8?
+resources
+string name=toc_hint fuzzy=trueSwipe right for sections, or use the 
menu button on the top right./string
+/resources
\ No newline at end of file

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I9d68a030a84868fb5488e8e014131a666d20e5bb
Gerrit-PatchSet: 1
Gerrit-Project: apps/android/wikipedia
Gerrit-Branch: master
Gerrit-Owner: BearND bsitzm...@wikimedia.org
Gerrit-Reviewer: Brion VIBBER br...@wikimedia.org
Gerrit-Reviewer: Dbrant dbr...@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] Switch throttle to new job - change (operations/mediawiki-config)

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

Change subject: Switch throttle to new job
..


Switch throttle to new job

Change-Id: Ide5fba01286d1982cd4336d3c4e0b6caa7b3263a
---
M wmf-config/CirrusSearch-common.php
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/wmf-config/CirrusSearch-common.php 
b/wmf-config/CirrusSearch-common.php
index 1aff7e4..09ccfdc 100644
--- a/wmf-config/CirrusSearch-common.php
+++ b/wmf-config/CirrusSearch-common.php
@@ -44,7 +44,7 @@
 # Also engage a delay for the Cirrus job that counts incoming links to pages 
when
 # pages are newly linked or unlinked.  Too many link count queries at once 
could flood
 # Elasticsearch.
-$wgJobBackoffThrottling['cirrusSearchLinksUpdateSecondary'] = 0.25;
+$wgJobBackoffThrottling['cirrusSearchIncomingLinkCount'] = 0.25;
 
 # Ban the hebrew plugin, it is unstable
 $wgCirrusSearchBannedPlugins[] = 'elasticsearch-analysis-hebrew';

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ide5fba01286d1982cd4336d3c4e0b6caa7b3263a
Gerrit-PatchSet: 2
Gerrit-Project: operations/mediawiki-config
Gerrit-Branch: master
Gerrit-Owner: Manybubbles never...@wikimedia.org
Gerrit-Reviewer: Chad ch...@wikimedia.org
Gerrit-Reviewer: Manybubbles never...@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 beta package in Gradle build for beta flavor - change (apps...wikipedia)

2014-09-24 Thread Dbrant (Code Review)
Dbrant has submitted this change and it was merged.

Change subject: Use beta package in Gradle build for beta flavor
..


Use beta package in Gradle build for beta flavor

Also added alpha flavor to Gradle build, using alpha package.
Currently this still assumes that the prepare-release.py
script is used before the build is run.

Once we abandon Maven we can substitute most of the
prepare-release.py functionality with Gradle configs.

Change-Id: I7d0f748c6b913fcc6ce69e1ac221ef344634b9b6
(cherry picked from commit 2c1ce18de7f4d99dce3616963d4a564383679112)
---
M wikipedia/build.gradle
1 file changed, 5 insertions(+), 1 deletion(-)

Approvals:
  Dbrant: Looks good to me, approved



diff --git a/wikipedia/build.gradle b/wikipedia/build.gradle
index 0485e7e..2851cd4 100644
--- a/wikipedia/build.gradle
+++ b/wikipedia/build.gradle
@@ -35,9 +35,13 @@
 prod {
 versionName ${versionStart}-r-${date}
 }
+alpha {
+versionName ${versionStart}-alpha-${date}
+applicationId 'org.wikipedia.alpha'
+}
 beta {
 versionName ${versionStart}-beta-${date}
-//applicationId 'org.wikipedia.beta'
+applicationId 'org.wikipedia.beta'
 }
 }
 sourceSets {

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I7d0f748c6b913fcc6ce69e1ac221ef344634b9b6
Gerrit-PatchSet: 1
Gerrit-Project: apps/android/wikipedia
Gerrit-Branch: master
Gerrit-Owner: BearND bsitzm...@wikimedia.org
Gerrit-Reviewer: Brion VIBBER br...@wikimedia.org
Gerrit-Reviewer: Dbrant dbr...@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] Enable delay for new Cirrus link counting job - change (operations/mediawiki-config)

2014-09-24 Thread Manybubbles (Code Review)
Manybubbles has uploaded a new change for review.

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

Change subject: Enable delay for new Cirrus link counting job
..

Enable delay for new Cirrus link counting job

Change-Id: Ida2c0dcd65c427fa31c582a7ce496a608308d713
---
M wmf-config/CirrusSearch-common.php
1 file changed, 1 insertion(+), 1 deletion(-)


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

diff --git a/wmf-config/CirrusSearch-common.php 
b/wmf-config/CirrusSearch-common.php
index 09ccfdc..fe67e5c 100644
--- a/wmf-config/CirrusSearch-common.php
+++ b/wmf-config/CirrusSearch-common.php
@@ -27,7 +27,7 @@
# The secondary update job has a delay of a few seconds to make sure 
that Elasticsearch
# has completed a refresh cycle between when the data that the job 
needs is added and
# when the job is run.
-   $wgJobTypeConf['cirrusSearchLinksUpdateSecondary'] = array( 
'checkDelay' = true ) +
+   $wgJobTypeConf['cirrusSearchIncomingLinkCount'] = array( 'checkDelay' 
= true ) +
$wgJobTypeConf['default'];
 }
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ida2c0dcd65c427fa31c582a7ce496a608308d713
Gerrit-PatchSet: 1
Gerrit-Project: operations/mediawiki-config
Gerrit-Branch: master
Gerrit-Owner: Manybubbles never...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] Enable delay for new Cirrus link counting job - change (operations/mediawiki-config)

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

Change subject: Enable delay for new Cirrus link counting job
..


Enable delay for new Cirrus link counting job

Change-Id: Ida2c0dcd65c427fa31c582a7ce496a608308d713
---
M wmf-config/CirrusSearch-common.php
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/wmf-config/CirrusSearch-common.php 
b/wmf-config/CirrusSearch-common.php
index 09ccfdc..fe67e5c 100644
--- a/wmf-config/CirrusSearch-common.php
+++ b/wmf-config/CirrusSearch-common.php
@@ -27,7 +27,7 @@
# The secondary update job has a delay of a few seconds to make sure 
that Elasticsearch
# has completed a refresh cycle between when the data that the job 
needs is added and
# when the job is run.
-   $wgJobTypeConf['cirrusSearchLinksUpdateSecondary'] = array( 
'checkDelay' = true ) +
+   $wgJobTypeConf['cirrusSearchIncomingLinkCount'] = array( 'checkDelay' 
= true ) +
$wgJobTypeConf['default'];
 }
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ida2c0dcd65c427fa31c582a7ce496a608308d713
Gerrit-PatchSet: 1
Gerrit-Project: operations/mediawiki-config
Gerrit-Branch: master
Gerrit-Owner: Manybubbles never...@wikimedia.org
Gerrit-Reviewer: Chad ch...@wikimedia.org
Gerrit-Reviewer: Manybubbles never...@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] SWAT update Cirrus - change (mediawiki/core)

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

Change subject: SWAT update Cirrus
..


SWAT update Cirrus

Grabs:
Ie1ddf414f0bcb188dfa536ea9050aeff5f410cf5
I2bd1ccf9116d8702ec2c9978fbc9a4388522a7ee

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

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



diff --git a/extensions/CirrusSearch b/extensions/CirrusSearch
index a15f3fb..7e0f8a2 16
--- a/extensions/CirrusSearch
+++ b/extensions/CirrusSearch
-Subproject commit a15f3fb00a0c9805d540a20e29977b364ac4c854
+Subproject commit 7e0f8a29d4c33f0a965e65bef9e3ffe5161859e6

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I8f644bf3a80aadb07fe52d01fc1ce40c5e940c92
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: wmf/1.24wmf21
Gerrit-Owner: Manybubbles never...@wikimedia.org
Gerrit-Reviewer: Chad ch...@wikimedia.org
Gerrit-Reviewer: Manybubbles never...@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] Make neptunium an ldap and dns server - change (operations/puppet)

2014-09-24 Thread Andrew Bogott (Code Review)
Andrew Bogott has uploaded a new change for review.

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

Change subject: Make neptunium an ldap and dns server
..

Make neptunium an ldap and dns server

Neptunium is going to temporarily hold the 'eqiad-ldap' name
so that we can make a graceful transition from virt1000 to
eqiad-ldap.  Once labs instances are adjusted to the new
eqiad-ldap name, virt1000 will take over and neptunium will
be shut down.

Change-Id: I2766e93f0c69475095f20751493c8dc4c70b1c85
---
M manifests/site.pp
1 file changed, 20 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/95/162595/1

diff --git a/manifests/site.pp b/manifests/site.pp
index 897673e..da5d470 100644
--- a/manifests/site.pp
+++ b/manifests/site.pp
@@ -3095,6 +3095,26 @@
 #include role::deployment::salt_masters::labs
 }
 
+node 'neptunium.wikimedia.org' {
+$cluster   = 'virt'
+#$is_puppet_master  = true
+#$is_labs_puppet_master = true
+#$openstack_version = 'folsom'
+#$use_neutron   = false
+$puppet_version= '3'
+
+include standard
+include admin
+include role::dns::ldap
+include ldap::role::server::labs
+include ldap::role::client::labs
+
+#include role::nova::controller
+#include role::nova::manager
+#include role::salt::masters::labs
+#include role::deployment::salt_masters::labs
+}
+
 node 'labnet1001.eqiad.wmnet' {
 $cluster = 'virt'
 $openstack_version = 'havana'

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I2766e93f0c69475095f20751493c8dc4c70b1c85
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Andrew Bogott abog...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] Add blacklisted properties for suggester on Wikidata - change (operations/mediawiki-config)

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

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

Change subject: Add blacklisted properties for suggester on Wikidata
..

Add blacklisted properties for suggester on Wikidata

Bug: 70346
Change-Id: I313aaa34a29ebb9271c6e6825b48478691aa6749
---
M wmf-config/Wikibase.php
1 file changed, 5 insertions(+), 0 deletions(-)


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

diff --git a/wmf-config/Wikibase.php b/wmf-config/Wikibase.php
index 80efc7b..602bd77 100644
--- a/wmf-config/Wikibase.php
+++ b/wmf-config/Wikibase.php
@@ -93,10 +93,15 @@
 
// Bug 70346
$wgPropertySuggesterDeprecatedIds = array(
+   45, // (OBSOLETE) grandparent
70, // (OBSOLETE) order
+   71, // (OBSOLETE) family
+   74, // (OBSOLETE) genus
107, // (OBSOLETE) main type (GND)
143, // imported from
+   643, // Genloc Chr (deprecated, use P1057)
741, // (OBSOLETE) playing hand
+   1384, // deleted
);
 }
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I313aaa34a29ebb9271c6e6825b48478691aa6749
Gerrit-PatchSet: 1
Gerrit-Project: operations/mediawiki-config
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] Don't check interwiki redirect targets against the blacklist - change (mediawiki...TitleBlacklist)

2014-09-24 Thread Jackmcbarn (Code Review)
Jackmcbarn has uploaded a new change for review.

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

Change subject: Don't check interwiki redirect targets against the blacklist
..

Don't check interwiki redirect targets against the blacklist

Bug: 54769
Change-Id: I445fd2052a54233dd6311e0a60e8aa6f896f68f8
---
M TitleBlacklist.hooks.php
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/TitleBlacklist 
refs/changes/97/162597/1

diff --git a/TitleBlacklist.hooks.php b/TitleBlacklist.hooks.php
index 78379a3..0718aac 100644
--- a/TitleBlacklist.hooks.php
+++ b/TitleBlacklist.hooks.php
@@ -159,7 +159,7 @@
} elseif ( !$section ) {
# Block redirects to nonexistent blacklisted titles
$retitle = Title::newFromRedirect( $text );
-   if ( $retitle !== null  !$retitle-exists() )  {
+   if ( $retitle !== null  !$retitle-isExternal()  
!$retitle-exists() )  {
$blacklisted = 
TitleBlacklist::singleton()-userCannot( $retitle, $wgUser, 'create' );
if ( $blacklisted instanceof 
TitleBlacklistEntry ) {
$error = Html::openElement( 'div', 
array( 'class' = 'errorbox' ) ) .

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I445fd2052a54233dd6311e0a60e8aa6f896f68f8
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/TitleBlacklist
Gerrit-Branch: master
Gerrit-Owner: Jackmcbarn jackmcb...@gmail.com

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


[MediaWiki-commits] [Gerrit] Make method public so it works with zend - change (mediawiki...CirrusSearch)

2014-09-24 Thread Manybubbles (Code Review)
Manybubbles has uploaded a new change for review.

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

Change subject: Make method public so it works with zend
..

Make method public so it works with zend

Looks like hhvm didn't have a problem with it.

Change-Id: If08a64ab51abf99b5d2517b86791baaa264980a2
---
M maintenance/updateOneSearchIndexConfig.php
1 file changed, 2 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/CirrusSearch 
refs/changes/98/162598/1

diff --git a/maintenance/updateOneSearchIndexConfig.php 
b/maintenance/updateOneSearchIndexConfig.php
index fdcf3f9..e616a21 100644
--- a/maintenance/updateOneSearchIndexConfig.php
+++ b/maintenance/updateOneSearchIndexConfig.php
@@ -861,7 +861,7 @@
}
}
 
-   private function sendDocuments( $messagePrefix, $documents ) {
+   public function sendDocuments( $messagePrefix, $documents ) {
try {
$updateResult = $this-getPageType()-addDocuments( 
$documents );
} catch ( \Elastica\Exception\ExceptionInterface $e ) {
@@ -956,7 +956,7 @@
/**
 * @return \Elastica\Index being updated
 */
-   private function getIndex() {
+   public function getIndex() {
return Connection::getIndex( $this-indexBaseName, 
$this-indexType, $this-indexIdentifier );
}
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: If08a64ab51abf99b5d2517b86791baaa264980a2
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/CirrusSearch
Gerrit-Branch: master
Gerrit-Owner: Manybubbles never...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] [FEAT] Enable nose Python 3 tests - change (pywikibot/core)

2014-09-24 Thread XZise (Code Review)
XZise has uploaded a new change for review.

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

Change subject: [FEAT] Enable nose Python 3 tests
..

[FEAT] Enable nose Python 3 tests

Change-Id: I842aee6c6e98fa6f2c3c324603600988300e21b1
---
M tox.ini
1 file changed, 5 insertions(+), 3 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/pywikibot/core 
refs/changes/99/162599/1

diff --git a/tox.ini b/tox.ini
index 7076017..50daa29 100644
--- a/tox.ini
+++ b/tox.ini
@@ -49,10 +49,12 @@
 deps = nose
 
 [testenv:nose34]
-basepython = python34
+basepython = python3
 setenv = PYWIKIBOT2_NO_USER_CONFIG=1
-commands = nosetests -a !site,!net
-deps = nose
+commands = nosetests -a !site,!net tests
+deps =
+nose
+six
 
 [testenv:venv]
 commands = {posargs}

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I842aee6c6e98fa6f2c3c324603600988300e21b1
Gerrit-PatchSet: 1
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Owner: XZise commodorefabia...@gmx.de

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


[MediaWiki-commits] [Gerrit] Fixes to prevent duplicate rows in ActiveUser cache - change (mediawiki/core)

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

Change subject: Fixes to prevent duplicate rows in ActiveUser cache
..


Fixes to prevent duplicate rows in ActiveUser cache

* Handle repeatable-read snapshots better for web requests
* In CLI mode, handle automatic reconnects better (rolling
  back). It has to abort since it lost the lock in that case.

bug: 71086
Change-Id: I5228889cf05857c87a06f7d073b5aa46f0c240be
---
M includes/specials/SpecialActiveusers.php
1 file changed, 10 insertions(+), 1 deletion(-)

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



diff --git a/includes/specials/SpecialActiveusers.php 
b/includes/specials/SpecialActiveusers.php
index d17b671..07e1be1 100644
--- a/includes/specials/SpecialActiveusers.php
+++ b/includes/specials/SpecialActiveusers.php
@@ -332,6 +332,8 @@
 * @return int|bool UNIX timestamp the cache is now up-to-date as of 
(false on error)
 */
protected static function doQueryCacheUpdate( DatabaseBase $dbw, $days, 
$window ) {
+   $dbw-startAtomic( __METHOD__ );
+
$lockKey = wfWikiID() . '-activeusers';
if ( !$dbw-lock( $lockKey, __METHOD__, 1 ) ) {
return false; // exclusive update (avoids duplicate 
entries)
@@ -343,6 +345,9 @@
array( 'qci_type' = 'activeusers' )
);
$cTimeUnix = $cTime ? wfTimestamp( TS_UNIX, $cTime ) : 1;
+   // If a transaction was already started, it might have an old
+   // snapshot, so kludge the timestamp range a few seconds back.
+   $cTimeUnix -= 5;
 
// Pick the date range to fetch from. This is normally from the 
last
// update to till the present time, but has a limited window 
for sanity.
@@ -389,7 +394,10 @@
'qcc_type' = 'activeusers',
'qcc_namespace' = NS_USER,
'qcc_title' = array_keys( $names ) ),
-   __METHOD__
+   __METHOD__,
+   // See the latest data (ignoring trx snapshot) 
to avoid
+   // duplicates if this method was called in a 
transaction
+   array( 'LOCK IN SHARE MODE' )
);
foreach ( $res as $row ) {
unset( $names[$row-user_name] );
@@ -426,6 +434,7 @@
);
 
$dbw-unlock( $lockKey, __METHOD__ );
+   $dbw-endAtomic( __METHOD__ );
 
return $eTimestamp;
}

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I5228889cf05857c87a06f7d073b5aa46f0c240be
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Aaron Schulz asch...@wikimedia.org
Gerrit-Reviewer: Aaron Schulz asch...@wikimedia.org
Gerrit-Reviewer: Anomie bjor...@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 Firefox to version 32 - change (integration/jenkins-job-builder-config)

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

Change subject: Update Firefox to version 32
..


Update Firefox to version 32

32 is the last one supported by Sauce Labs:

https://saucelabs.com/platforms

All browsertests* jobs are changed, but the only change is Firefox
version.

Change-Id: Ia34545fc25fadc3a1d611b5992aa7056474fbb15
---
M macro.yaml
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/macro.yaml b/macro.yaml
index fabc68f..c3a0fe6 100644
--- a/macro.yaml
+++ b/macro.yaml
@@ -636,7 +636,7 @@
 export VERSION=28
 ;;
 'firefox')
-export VERSION=31
+export VERSION=32
 ;;
 'internet_explorer')
 export VERSION=10

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ia34545fc25fadc3a1d611b5992aa7056474fbb15
Gerrit-PatchSet: 1
Gerrit-Project: integration/jenkins-job-builder-config
Gerrit-Branch: master
Gerrit-Owner: Zfilipin zfili...@wikimedia.org
Gerrit-Reviewer: Cmcmahon cmcma...@wikimedia.org
Gerrit-Reviewer: Dduvall dduv...@wikimedia.org
Gerrit-Reviewer: Hashar has...@free.fr
Gerrit-Reviewer: Manybubbles never...@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] Make method public so it works with zend - change (mediawiki...CirrusSearch)

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

Change subject: Make method public so it works with zend
..


Make method public so it works with zend

Looks like hhvm didn't have a problem with it.

Change-Id: If08a64ab51abf99b5d2517b86791baaa264980a2
---
M maintenance/updateOneSearchIndexConfig.php
1 file changed, 2 insertions(+), 2 deletions(-)

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



diff --git a/maintenance/updateOneSearchIndexConfig.php 
b/maintenance/updateOneSearchIndexConfig.php
index fdcf3f9..e616a21 100644
--- a/maintenance/updateOneSearchIndexConfig.php
+++ b/maintenance/updateOneSearchIndexConfig.php
@@ -861,7 +861,7 @@
}
}
 
-   private function sendDocuments( $messagePrefix, $documents ) {
+   public function sendDocuments( $messagePrefix, $documents ) {
try {
$updateResult = $this-getPageType()-addDocuments( 
$documents );
} catch ( \Elastica\Exception\ExceptionInterface $e ) {
@@ -956,7 +956,7 @@
/**
 * @return \Elastica\Index being updated
 */
-   private function getIndex() {
+   public function getIndex() {
return Connection::getIndex( $this-indexBaseName, 
$this-indexType, $this-indexIdentifier );
}
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: If08a64ab51abf99b5d2517b86791baaa264980a2
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/CirrusSearch
Gerrit-Branch: master
Gerrit-Owner: Manybubbles never...@wikimedia.org
Gerrit-Reviewer: Chad ch...@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] Make method public so it works with zend - change (mediawiki...CirrusSearch)

2014-09-24 Thread Manybubbles (Code Review)
Manybubbles has uploaded a new change for review.

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

Change subject: Make method public so it works with zend
..

Make method public so it works with zend

Looks like hhvm didn't have a problem with it.

Change-Id: If08a64ab51abf99b5d2517b86791baaa264980a2
(cherry picked from commit 7503a35c66477adefd0e6af8e2dda9f380e2e8eb)
---
M maintenance/updateOneSearchIndexConfig.php
1 file changed, 2 insertions(+), 2 deletions(-)


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

diff --git a/maintenance/updateOneSearchIndexConfig.php 
b/maintenance/updateOneSearchIndexConfig.php
index fdcf3f9..e616a21 100644
--- a/maintenance/updateOneSearchIndexConfig.php
+++ b/maintenance/updateOneSearchIndexConfig.php
@@ -861,7 +861,7 @@
}
}
 
-   private function sendDocuments( $messagePrefix, $documents ) {
+   public function sendDocuments( $messagePrefix, $documents ) {
try {
$updateResult = $this-getPageType()-addDocuments( 
$documents );
} catch ( \Elastica\Exception\ExceptionInterface $e ) {
@@ -956,7 +956,7 @@
/**
 * @return \Elastica\Index being updated
 */
-   private function getIndex() {
+   public function getIndex() {
return Connection::getIndex( $this-indexBaseName, 
$this-indexType, $this-indexIdentifier );
}
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: If08a64ab51abf99b5d2517b86791baaa264980a2
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/CirrusSearch
Gerrit-Branch: wmf/1.24wmf22
Gerrit-Owner: Manybubbles never...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] Add blacklisted properties for suggester on Wikidata - change (operations/mediawiki-config)

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

Change subject: Add blacklisted properties for suggester on Wikidata
..


Add blacklisted properties for suggester on Wikidata

Bug: 70346
Change-Id: I313aaa34a29ebb9271c6e6825b48478691aa6749
---
M wmf-config/Wikibase.php
1 file changed, 5 insertions(+), 0 deletions(-)

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



diff --git a/wmf-config/Wikibase.php b/wmf-config/Wikibase.php
index 80efc7b..602bd77 100644
--- a/wmf-config/Wikibase.php
+++ b/wmf-config/Wikibase.php
@@ -93,10 +93,15 @@
 
// Bug 70346
$wgPropertySuggesterDeprecatedIds = array(
+   45, // (OBSOLETE) grandparent
70, // (OBSOLETE) order
+   71, // (OBSOLETE) family
+   74, // (OBSOLETE) genus
107, // (OBSOLETE) main type (GND)
143, // imported from
+   643, // Genloc Chr (deprecated, use P1057)
741, // (OBSOLETE) playing hand
+   1384, // deleted
);
 }
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I313aaa34a29ebb9271c6e6825b48478691aa6749
Gerrit-PatchSet: 1
Gerrit-Project: operations/mediawiki-config
Gerrit-Branch: master
Gerrit-Owner: Aude aude.w...@gmail.com
Gerrit-Reviewer: Chad ch...@wikimedia.org
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] Make method public so it works with zend - change (mediawiki...CirrusSearch)

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

Change subject: Make method public so it works with zend
..


Make method public so it works with zend

Looks like hhvm didn't have a problem with it.

Change-Id: If08a64ab51abf99b5d2517b86791baaa264980a2
(cherry picked from commit 7503a35c66477adefd0e6af8e2dda9f380e2e8eb)
---
M maintenance/updateOneSearchIndexConfig.php
1 file changed, 2 insertions(+), 2 deletions(-)

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



diff --git a/maintenance/updateOneSearchIndexConfig.php 
b/maintenance/updateOneSearchIndexConfig.php
index fdcf3f9..e616a21 100644
--- a/maintenance/updateOneSearchIndexConfig.php
+++ b/maintenance/updateOneSearchIndexConfig.php
@@ -861,7 +861,7 @@
}
}
 
-   private function sendDocuments( $messagePrefix, $documents ) {
+   public function sendDocuments( $messagePrefix, $documents ) {
try {
$updateResult = $this-getPageType()-addDocuments( 
$documents );
} catch ( \Elastica\Exception\ExceptionInterface $e ) {
@@ -956,7 +956,7 @@
/**
 * @return \Elastica\Index being updated
 */
-   private function getIndex() {
+   public function getIndex() {
return Connection::getIndex( $this-indexBaseName, 
$this-indexType, $this-indexIdentifier );
}
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: If08a64ab51abf99b5d2517b86791baaa264980a2
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/CirrusSearch
Gerrit-Branch: wmf/1.24wmf22
Gerrit-Owner: Manybubbles never...@wikimedia.org
Gerrit-Reviewer: Chad ch...@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 missing global variable declaration - change (mediawiki...CentralAuth)

2014-09-24 Thread Phuedx (Code Review)
Phuedx has uploaded a new change for review.

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

Change subject: Fix missing global variable declaration
..

Fix missing global variable declaration

The wgCentralAuthCheckSULMigration variable is used in
CentralAuthHooks::onRunExtensionFunctions without a corresponding
global declaration, which breaks, for example, QUnit tests for
extensions that depend on CentralAuth [0].

[0] 
https://integration.wikimedia.org/ci/job/mwext-GettingStarted-qunit/413/console

Change-Id: I425fe8d9d5a30ef0eb500d8d812d7e252f3a81ad
---
M CentralAuthHooks.php
1 file changed, 2 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/CentralAuth 
refs/changes/01/162601/1

diff --git a/CentralAuthHooks.php b/CentralAuthHooks.php
index 2ee2bf8..c6fc0e5 100644
--- a/CentralAuthHooks.php
+++ b/CentralAuthHooks.php
@@ -12,6 +12,8 @@
global $wgAutoloadClasses, $wgExtensionCredits, $wgHooks;
global $wgSpecialPages, $wgSpecialPageGroups, 
$wgResourceModules;
global $wgCentralAuthEnableGlobalRenameRequest;
+   global $wgCentralAuthCheckSULMigration;
+
$caBase = __DIR__;
 
if ( class_exists( 'RenameuserSQL' ) ) {

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I425fe8d9d5a30ef0eb500d8d812d7e252f3a81ad
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/CentralAuth
Gerrit-Branch: master
Gerrit-Owner: Phuedx g...@samsmith.io

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


[MediaWiki-commits] [Gerrit] SWAT update Cirrus - change (mediawiki/core)

2014-09-24 Thread Manybubbles (Code Review)
Manybubbles has uploaded a new change for review.

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

Change subject: SWAT update Cirrus
..

SWAT update Cirrus

Grabs:
If08a64ab51abf99b5d2517b86791baaa264980a2

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


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/02/162602/1

diff --git a/extensions/CirrusSearch b/extensions/CirrusSearch
index 16732e4..aae8691 16
--- a/extensions/CirrusSearch
+++ b/extensions/CirrusSearch
-Subproject commit 16732e453e8473fac9a7c5cca61e83e9a89ea804
+Subproject commit aae86910f0b663a588d6e47becdb4456ce644a6e

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I74607b083dc6e0cd569b27a77cc31bc041564057
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: wmf/1.24wmf22
Gerrit-Owner: Manybubbles never...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] Fixed checkbox not showing in preferences. - change (apps...wikipedia)

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

Change subject: Fixed checkbox not showing in preferences.
..


Fixed checkbox not showing in preferences.

Bug: 71228
Change-Id: I8a2e9be3aea377b9677439eefa8fe928c9e6d4a3
---
M 
wikipedia/src/main/java/org/wikipedia/settings/CheckBoxPreferenceMultiLine.java
1 file changed, 2 insertions(+), 1 deletion(-)

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



diff --git 
a/wikipedia/src/main/java/org/wikipedia/settings/CheckBoxPreferenceMultiLine.java
 
b/wikipedia/src/main/java/org/wikipedia/settings/CheckBoxPreferenceMultiLine.java
index a4d7701..309d7fc 100644
--- 
a/wikipedia/src/main/java/org/wikipedia/settings/CheckBoxPreferenceMultiLine.java
+++ 
b/wikipedia/src/main/java/org/wikipedia/settings/CheckBoxPreferenceMultiLine.java
@@ -1,12 +1,13 @@
 package org.wikipedia.settings;
 
 import android.content.Context;
+import android.preference.CheckBoxPreference;
 import android.preference.Preference;
 import android.util.AttributeSet;
 import android.view.View;
 import android.widget.TextView;
 
-public class CheckBoxPreferenceMultiLine extends Preference {
+public class CheckBoxPreferenceMultiLine extends CheckBoxPreference {
 
 public CheckBoxPreferenceMultiLine(Context ctx, AttributeSet attrs, int 
defStyle) {
 super(ctx, attrs, defStyle);

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I8a2e9be3aea377b9677439eefa8fe928c9e6d4a3
Gerrit-PatchSet: 2
Gerrit-Project: apps/android/wikipedia
Gerrit-Branch: master
Gerrit-Owner: Dbrant dbr...@wikimedia.org
Gerrit-Reviewer: BearND bsitzm...@wikimedia.org
Gerrit-Reviewer: Brion VIBBER br...@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] SWAT update Cirrus - change (mediawiki/core)

2014-09-24 Thread Chad (Code Review)
Chad has submitted this change and it was merged.

Change subject: SWAT update Cirrus
..


SWAT update Cirrus

Grabs:
If08a64ab51abf99b5d2517b86791baaa264980a2

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

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



diff --git a/extensions/CirrusSearch b/extensions/CirrusSearch
index 16732e4..aae8691 16
--- a/extensions/CirrusSearch
+++ b/extensions/CirrusSearch
-Subproject commit 16732e453e8473fac9a7c5cca61e83e9a89ea804
+Subproject commit aae86910f0b663a588d6e47becdb4456ce644a6e

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I74607b083dc6e0cd569b27a77cc31bc041564057
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: wmf/1.24wmf22
Gerrit-Owner: Manybubbles never...@wikimedia.org
Gerrit-Reviewer: Chad ch...@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] Test whole wmf_communication phpunit dir except CiviMailTest... - change (wikimedia...crm)

2014-09-24 Thread Ejegg (Code Review)
Ejegg has submitted this change and it was merged.

Change subject: Test whole wmf_communication phpunit dir except CiviMailTestBase
..


Test whole wmf_communication phpunit dir except CiviMailTestBase

Change-Id: I0178b66f62b58d9176419392fa7f1e6617ce9372
---
M phpunit.xml
1 file changed, 2 insertions(+), 3 deletions(-)

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



diff --git a/phpunit.xml b/phpunit.xml
index 46283d5..f632dc3 100644
--- a/phpunit.xml
+++ b/phpunit.xml
@@ -31,9 +31,8 @@
 directorysites/all/modules/wmf_common/tests/phpunit/directory
   /testsuite
   testsuite name=wmf_communication tests
-
filesites/all/modules/wmf_communication/tests/phpunit/CiviMailTest.php/file
-
filesites/all/modules/wmf_communication/tests/phpunit/CiviMailBulkTest.php/file
-
filesites/all/modules/wmf_communication/tests/phpunit/SilverpopImporterTest.php/file
+
directorysites/all/modules/wmf_communication/tests/phpunit/directory
+   
excludesites/all/modules/wmf_communication/tests/phpunit/CiviMailTestBase.php/exclude
   /testsuite
 /testsuites
 /phpunit

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I0178b66f62b58d9176419392fa7f1e6617ce9372
Gerrit-PatchSet: 3
Gerrit-Project: wikimedia/fundraising/crm
Gerrit-Branch: master
Gerrit-Owner: Ejegg eeggles...@wikimedia.org
Gerrit-Reviewer: Awight awi...@wikimedia.org
Gerrit-Reviewer: Ejegg eeggles...@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 API output skin - change (mediawiki/core)

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

Change subject: Add API output skin
..


Add API output skin

The API output for help and 'fm' formats will soon have need of
including ResourceLoader modules on an otherwise-bare page. The easiest
way to do this is to use OutputPage, but that requires a skin. So let's
add a skin that outputs a basic page without any navigation elements or
other chrome (that may be added later, but that can wait for Design to
decide they want to design it).

Change-Id: Ifa95fae5acaa3cfbf2ca58a15f8d0c51d84b455a
---
M includes/AutoLoader.php
M includes/Setup.php
A includes/skins/SkinApi.php
A includes/skins/SkinApiTemplate.php
4 files changed, 100 insertions(+), 0 deletions(-)

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



diff --git a/includes/AutoLoader.php b/includes/AutoLoader.php
index d79b2b1..609b46a 100644
--- a/includes/AutoLoader.php
+++ b/includes/AutoLoader.php
@@ -947,6 +947,8 @@
'MediaWikiI18N' = 'includes/skins/SkinTemplate.php',
'QuickTemplate' = 'includes/skins/SkinTemplate.php',
'Skin' = 'includes/skins/Skin.php',
+   'SkinApi' = 'includes/skins/SkinApi.php',
+   'SkinApiTemplate' = 'includes/skins/SkinApiTemplate.php',
'SkinException' = 'includes/skins/SkinException.php',
'SkinFactory' = 'includes/skins/SkinFactory.php',
'SkinFallback' = 'includes/skins/SkinFallback.php',
diff --git a/includes/Setup.php b/includes/Setup.php
index 78a41d5..c6c94b7 100644
--- a/includes/Setup.php
+++ b/includes/Setup.php
@@ -286,8 +286,13 @@
$factory-register( 'fallback', 'Fallback', function () {
return new SkinFallback;
} );
+   // Register a hidden skin for api output
+   $factory-register( 'apioutput', 'ApiOutput', function () {
+   return new SkinApi;
+   } );
 } );
 $wgSkipSkins[] = 'fallback';
+$wgSkipSkins[] = 'apioutput';
 
 if ( $wgLocalInterwiki ) {
array_unshift( $wgLocalInterwikis, $wgLocalInterwiki );
diff --git a/includes/skins/SkinApi.php b/includes/skins/SkinApi.php
new file mode 100644
index 000..064c076
--- /dev/null
+++ b/includes/skins/SkinApi.php
@@ -0,0 +1,41 @@
+?php
+/**
+ * Extremely basic skin for API output, which needs to output a page without
+ * the usual skin elements but still using CSS, JS, and such via OutputPage and
+ * ResourceLoader.
+ *
+ * Created on Sep 08, 2014
+ *
+ * Copyright © 2014 Brad Jorsch bjor...@wikimedia.org
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * http://www.gnu.org/copyleft/gpl.html
+ *
+ * @file
+ */
+
+/**
+ * SkinTemplate class for API output
+ * @since 1.25
+ */
+class SkinApi extends SkinTemplate {
+   public $skinname = 'apioutput';
+   public $template = 'SkinApiTemplate';
+
+   public function setupSkinUserCss( OutputPage $out ) {
+   parent::setupSkinUserCss( $out );
+   $out-addModuleStyles( 'mediawiki.skinning.interface' );
+   }
+}
diff --git a/includes/skins/SkinApiTemplate.php 
b/includes/skins/SkinApiTemplate.php
new file mode 100644
index 000..be77c61
--- /dev/null
+++ b/includes/skins/SkinApiTemplate.php
@@ -0,0 +1,52 @@
+?php
+/**
+ * Extremely basic skin for API output, which needs to output a page without
+ * the usual skin elements but still using CSS, JS, and such via OutputPage and
+ * ResourceLoader.
+ *
+ * Created on Sep 08, 2014
+ *
+ * Copyright © 2014 Brad Jorsch bjor...@wikimedia.org
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * 

[MediaWiki-commits] [Gerrit] Revert Auto-migrate matching accounts where no global accou... - change (mediawiki...CentralAuth)

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

Change subject: Revert Auto-migrate matching accounts where no global account 
exists
..


Revert Auto-migrate matching accounts where no global account exists

This reverts commit b2e553e104d568c09f20b11fd976106f7874c8f3.

Bug: 71223
Change-Id: I3a8ec44c66a8c4c1cd70574564ca21018456acf0
---
M CentralAuthPlugin.php
M CentralAuthUser.php
2 files changed, 3 insertions(+), 20 deletions(-)

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



diff --git a/CentralAuthPlugin.php b/CentralAuthPlugin.php
index 94d634e..3495f4c 100644
--- a/CentralAuthPlugin.php
+++ b/CentralAuthPlugin.php
@@ -43,16 +43,6 @@
'CentralAuth',
plugin: no global account for '$username'
);
-   // See if all the unattached accounts match passwords
-   // and can be globalized. (bug 70392)
-   if ( $wgCentralAuthAutoMigrate ) {
-   $ok = $central-storeAndMigrate( array( 
$password ), /* $sendToRC = */ true, /* $safe = */ true );
-   if ( $ok ) {
-   wfDebugLog( 'CentralAuth',
-   wgCentralAuthAutoMigrate 
successful in creating a global account for '$username'' );
-   return true;
-   }
-   }
return false;
}
 
diff --git a/CentralAuthUser.php b/CentralAuthUser.php
index d8ccead..c0c1b35 100644
--- a/CentralAuthUser.php
+++ b/CentralAuthUser.php
@@ -656,14 +656,13 @@
/**
 * @param array $passwords
 * @param bool $sendToRC
-* @param bool $safe Only allow migration if all users can be migrated
 * @return bool
 */
-   public function storeAndMigrate( $passwords = array(), $sendToRC = 
true, $safe = false ) {
+   public function storeAndMigrate( $passwords = array(), $sendToRC = true 
) {
$dbw = self::getCentralDB();
$dbw-begin();
 
-   $ret = $this-attemptAutoMigration( $passwords, $sendToRC, 
$safe );
+   $ret = $this-attemptAutoMigration( $passwords, $sendToRC );
 
$dbw-commit();
return $ret;
@@ -845,10 +844,9 @@
 *
 * @param $passwords Array
 * @param $sendToRC bool
-* @param $safe bool Only migrate if all accounts can be merged
 * @return bool Whether full automatic migration completed successfully.
 */
-   protected function attemptAutoMigration( $passwords = array(), 
$sendToRC = true, $safe = false ) {
+   protected function attemptAutoMigration( $passwords = array(), 
$sendToRC = true ) {
$migrationSet = $this-queryUnattached();
if ( empty( $migrationSet ) ) {
wfDebugLog( 'CentralAuth', 'no accounts to merge, 
failed migration' );
@@ -871,11 +869,6 @@
 
// Pick all the local accounts matching the master home 
account
$attach = $this-prepareMigration( $migrationSet, $passwords );
-
-   if ( $safe  count( $attach ) !== count( $migrationSet ) ) {
-   wfDebugLog( 'CentralAuth', Safe auto-migration for 
'$this-mName' failed );
-   return false;
-   }
 
// storeGlobalData clears $this-mHomeWiki
$homeWiki = $this-mHomeWiki;

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I3a8ec44c66a8c4c1cd70574564ca21018456acf0
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/CentralAuth
Gerrit-Branch: wmf/1.24wmf22
Gerrit-Owner: Legoktm legoktm.wikipe...@gmail.com
Gerrit-Reviewer: Chad ch...@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] Restore puppet module for provisioning memcached - change (mediawiki/vagrant)

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

Change subject: Restore puppet module for provisioning memcached
..


Restore puppet module for provisioning memcached

The default caching configuration for MediaWiki-Vagrant is redis, but
having memcached available can be helpful for debugging some issues.
A follow up commit will provide a role to configure the wikis to use
memcached.

This reverts commit e7e232988bdfa641a3c21ff9418326f77f739177.

Change-Id: I5f214dd9b80632fdd44384f44f5fd40e40d8684e
---
A puppet/modules/memcached/manifests/init.pp
A puppet/modules/memcached/manifests/php.pp
A puppet/modules/memcached/templates/memcached.conf.erb
3 files changed, 67 insertions(+), 0 deletions(-)

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



diff --git a/puppet/modules/memcached/manifests/init.pp 
b/puppet/modules/memcached/manifests/init.pp
new file mode 100644
index 000..b4a26f9
--- /dev/null
+++ b/puppet/modules/memcached/manifests/init.pp
@@ -0,0 +1,42 @@
+# == Class: memcached
+#
+# Configures a memcached instance.
+#
+# === Parameters
+#
+# [*size_mb*]
+#   Size of memcached store, in megabytes (default: 200).
+#
+# [*port*]
+#   Memcached server will listen on this port (default: 11211).
+#
+# [*iface*]
+#   Interface memcached server will bind to (default: all interfaces).
+#
+# === Examples
+#
+#  class { 'memcached':
+#  size_mb = 500,
+#  }
+#
+class memcached(
+$size_mb = 200,
+$port= 11211,
+$iface   = '0.0.0.0',
+) {
+
+package { 'memcached':
+ensure  = present,
+}
+
+file { '/etc/memcached.conf':
+content = template('memcached/memcached.conf.erb'),
+notify  = Service['memcached'],
+}
+
+service { 'memcached':
+ensure= running,
+enable= true,
+require   = Package['memcached'],
+}
+}
diff --git a/puppet/modules/memcached/manifests/php.pp 
b/puppet/modules/memcached/manifests/php.pp
new file mode 100644
index 000..31e518b
--- /dev/null
+++ b/puppet/modules/memcached/manifests/php.pp
@@ -0,0 +1,13 @@
+# == Class: memcached::php
+#
+# This class configures a PHP extension that provides an API for communicating
+# with the memcached key-value store.
+#
+class memcached::php {
+include ::apache
+
+package { 'php5-memcached':
+ensure  = present,
+notify  = Service['apache2'],
+}
+}
diff --git a/puppet/modules/memcached/templates/memcached.conf.erb 
b/puppet/modules/memcached/templates/memcached.conf.erb
new file mode 100644
index 000..3994efd
--- /dev/null
+++ b/puppet/modules/memcached/templates/memcached.conf.erb
@@ -0,0 +1,12 @@
+# Configuration file for memcached.
+# This file is managed by Puppet.
+#
+-d
+-m %= @size_mb %
+-p %= @port %
+-u nobody
+-l %= @iface %
+-c 2
+-n 5
+-f 1.05
+logfile /var/log/memcached.log

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I5f214dd9b80632fdd44384f44f5fd40e40d8684e
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/vagrant
Gerrit-Branch: master
Gerrit-Owner: BryanDavis bda...@wikimedia.org
Gerrit-Reviewer: MaxSem maxsem.w...@gmail.com
Gerrit-Reviewer: Ori.livneh 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] MatmaRex, I owe you one - change (mediawiki...PollNY)

2014-09-24 Thread Jack Phoenix (Code Review)
Jack Phoenix has uploaded a new change for review.

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

Change subject: MatmaRex, I owe you one
..

MatmaRex, I owe you one

This fixes the issue with Poll: pages not rendering correctly due to
a TypeError about LightBox not being an object

Change-Id: I6193a9c1a7d8771aae9b18a24144b94410ddeba2
---
M LightBox.js
M Poll.js
2 files changed, 18 insertions(+), 17 deletions(-)


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

diff --git a/LightBox.js b/LightBox.js
index df27c04..5741599 100644
--- a/LightBox.js
+++ b/LightBox.js
@@ -9,7 +9,7 @@
Rewritten to be more object-oriented by Jack Phoenix 
j...@countervandalism.net
on 21 June 2011
 */
-var LightBox = {
+window.LightBox = {
/**
 * Core code from quirksmode.org
 * @return Array with x,y page scroll values.
diff --git a/Poll.js b/Poll.js
index 912f2a8..ca46522 100644
--- a/Poll.js
+++ b/Poll.js
@@ -45,18 +45,20 @@
objLink.href = '';
objLink.title = '';
 
-   LightBox.show( objLink );
+   mw.loader.using( 'ext.pollNY.lightBox', function() {
+   LightBox.show( objLink );
 
-   if( !PollNY.detectMacXFF() ) {
-   LightBox.setText(
-   'embed src=' + mw.config.get( 
'wgExtensionAssetsPath' ) + '/PollNY/ajax-loading.swf quality=high 
wmode=transparent bgcolor=#ff' +
-   
'pluginspage=http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash;'
 +
-   'type=application/x-shockwave-flash 
width=100 height=100' +
-   '/embed'
-   );
-   } else {
-   LightBox.setText( mw.msg( 'poll-js-loading' ) );
-   }
+   if( !PollNY.detectMacXFF() ) {
+   LightBox.setText(
+   'embed src=' + mw.config.get( 
'wgExtensionAssetsPath' ) + '/PollNY/ajax-loading.swf quality=high 
wmode=transparent bgcolor=#ff' +
+   
'pluginspage=http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash;'
 +
+   'type=application/x-shockwave-flash 
width=100 height=100' +
+   '/embed'
+   );
+   } else {
+   LightBox.setText( mw.msg( 'poll-js-loading' ) );
+   }
+   } );
},
 
/**
@@ -136,7 +138,7 @@
// redirect to next poll they haven't voted for
// old code: if( req.responseText.indexOf( 'error' ) == 
-1 ) {
if ( data.pollny.result !== 'error' ) {
-   window.location = mw.config.get( 'wgServer' ) + 
+   window.location = mw.config.get( 'wgServer' ) +
mw.config.get( 'wgScriptPath' ) +
'/index.php?title=' + 
data.pollny.result +
'prev_id=' + mw.config.get( 
'wgArticleId' );
@@ -462,10 +464,9 @@
// Poll.namespaces.php in order to change that...
if ( jQuery( 'body' ).hasClass( 'ns-300' ) ) {
// If LightBox is not yet loaded, well, load it!
-   if ( typeof LightBox == undefined ) {
-   mw.loader.load( 'ext.pollNY.lightBox' );
-   }
-   LightBox.init();
+   mw.loader.using( 'ext.pollNY.lightBox', function() {
+   LightBox.init();
+   } );
PollNY.show();
 
jQuery( 'a.poll-status-toggle-link' ).on( 'click', function() {

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I6193a9c1a7d8771aae9b18a24144b94410ddeba2
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/PollNY
Gerrit-Branch: master
Gerrit-Owner: Jack Phoenix j...@countervandalism.net

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


[MediaWiki-commits] [Gerrit] contint: labs slaves +mediawiki::packages::fonts - change (operations/puppet)

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

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

Change subject: contint: labs slaves +mediawiki::packages::fonts
..

contint: labs slaves +mediawiki::packages::fonts

QA has Jenkins jobs taking screenshots on a wide range of wikis, install
additional fonts on the CI slaves to avoid square boxes in screenshots.

Bug: 69535
Change-Id: I23be62fc8e1f8f32525be0f5a8664b0c862127aa
---
M modules/contint/manifests/packages/labs.pp
1 file changed, 2 insertions(+), 0 deletions(-)


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

diff --git a/modules/contint/manifests/packages/labs.pp 
b/modules/contint/manifests/packages/labs.pp
index 81c49e2..15e3b53 100644
--- a/modules/contint/manifests/packages/labs.pp
+++ b/modules/contint/manifests/packages/labs.pp
@@ -6,6 +6,8 @@
 Package['puppet-lint'] - Class['contint::packages::labs']
 
 include contint::packages
+# Fonts needed for browser tests screenshots (bug 69535)
+include mediawiki::packages::fonts
 
 # Shell script wrappers to ease package building
 # Package generated via the mirror operations/debs/jenkins-debian-glue.git

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I23be62fc8e1f8f32525be0f5a8664b0c862127aa
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
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] MatmaRex, I owe you one - change (mediawiki...PollNY)

2014-09-24 Thread Jack Phoenix (Code Review)
Jack Phoenix has submitted this change and it was merged.

Change subject: MatmaRex, I owe you one
..


MatmaRex, I owe you one

This fixes the issue with Poll: pages not rendering correctly due to
a TypeError about LightBox not being an object

Change-Id: I6193a9c1a7d8771aae9b18a24144b94410ddeba2
---
M LightBox.js
M Poll.js
2 files changed, 18 insertions(+), 17 deletions(-)

Approvals:
  Jack Phoenix: Verified; Looks good to me, approved



diff --git a/LightBox.js b/LightBox.js
index df27c04..5741599 100644
--- a/LightBox.js
+++ b/LightBox.js
@@ -9,7 +9,7 @@
Rewritten to be more object-oriented by Jack Phoenix 
j...@countervandalism.net
on 21 June 2011
 */
-var LightBox = {
+window.LightBox = {
/**
 * Core code from quirksmode.org
 * @return Array with x,y page scroll values.
diff --git a/Poll.js b/Poll.js
index 912f2a8..ca46522 100644
--- a/Poll.js
+++ b/Poll.js
@@ -45,18 +45,20 @@
objLink.href = '';
objLink.title = '';
 
-   LightBox.show( objLink );
+   mw.loader.using( 'ext.pollNY.lightBox', function() {
+   LightBox.show( objLink );
 
-   if( !PollNY.detectMacXFF() ) {
-   LightBox.setText(
-   'embed src=' + mw.config.get( 
'wgExtensionAssetsPath' ) + '/PollNY/ajax-loading.swf quality=high 
wmode=transparent bgcolor=#ff' +
-   
'pluginspage=http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash;'
 +
-   'type=application/x-shockwave-flash 
width=100 height=100' +
-   '/embed'
-   );
-   } else {
-   LightBox.setText( mw.msg( 'poll-js-loading' ) );
-   }
+   if( !PollNY.detectMacXFF() ) {
+   LightBox.setText(
+   'embed src=' + mw.config.get( 
'wgExtensionAssetsPath' ) + '/PollNY/ajax-loading.swf quality=high 
wmode=transparent bgcolor=#ff' +
+   
'pluginspage=http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash;'
 +
+   'type=application/x-shockwave-flash 
width=100 height=100' +
+   '/embed'
+   );
+   } else {
+   LightBox.setText( mw.msg( 'poll-js-loading' ) );
+   }
+   } );
},
 
/**
@@ -136,7 +138,7 @@
// redirect to next poll they haven't voted for
// old code: if( req.responseText.indexOf( 'error' ) == 
-1 ) {
if ( data.pollny.result !== 'error' ) {
-   window.location = mw.config.get( 'wgServer' ) + 
+   window.location = mw.config.get( 'wgServer' ) +
mw.config.get( 'wgScriptPath' ) +
'/index.php?title=' + 
data.pollny.result +
'prev_id=' + mw.config.get( 
'wgArticleId' );
@@ -462,10 +464,9 @@
// Poll.namespaces.php in order to change that...
if ( jQuery( 'body' ).hasClass( 'ns-300' ) ) {
// If LightBox is not yet loaded, well, load it!
-   if ( typeof LightBox == undefined ) {
-   mw.loader.load( 'ext.pollNY.lightBox' );
-   }
-   LightBox.init();
+   mw.loader.using( 'ext.pollNY.lightBox', function() {
+   LightBox.init();
+   } );
PollNY.show();
 
jQuery( 'a.poll-status-toggle-link' ).on( 'click', function() {

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I6193a9c1a7d8771aae9b18a24144b94410ddeba2
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/PollNY
Gerrit-Branch: master
Gerrit-Owner: Jack Phoenix j...@countervandalism.net
Gerrit-Reviewer: Jack Phoenix j...@countervandalism.net
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 CentralAuth to I3a8ec44c66a - change (mediawiki/core)

2014-09-24 Thread Legoktm (Code Review)
Legoktm has uploaded a new change for review.

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

Change subject: Update CentralAuth to I3a8ec44c66a
..

Update CentralAuth to I3a8ec44c66a

 Revert Auto-migrate matching accounts where no global account exists

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


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/05/162605/1

diff --git a/extensions/CentralAuth b/extensions/CentralAuth
index 5d41ce6..4dc2cd8 16
--- a/extensions/CentralAuth
+++ b/extensions/CentralAuth
-Subproject commit 5d41ce6515b88723663b23e8e2c82a2c46148f5d
+Subproject commit 4dc2cd845ac93b0db0548146dfb4d18f8e707ef1

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I7edf262295c9de1f60338d37de785899aba054b0
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: wmf/1.24wmf22
Gerrit-Owner: Legoktm legoktm.wikipe...@gmail.com

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


  1   2   3   4   5   >