[MediaWiki-commits] [Gerrit] ceph: actually user ceph::key's owner/group/mode - change (operations/puppet)
Faidon has uploaded a new change for review. https://gerrit.wikimedia.org/r/78794 Change subject: ceph: actually user ceph::key's owner/group/mode .. ceph: actually user ceph::key's owner/group/mode Parameters were added but not really used. Doh! Change-Id: I048aa858a875ccb8826c714f2ca3890434b639cd --- M modules/ceph/manifests/key.pp 1 file changed, 3 insertions(+), 3 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/94/78794/1 diff --git a/modules/ceph/manifests/key.pp b/modules/ceph/manifests/key.pp index 0d98da5..b177d50 100644 --- a/modules/ceph/manifests/key.pp +++ b/modules/ceph/manifests/key.pp @@ -45,9 +45,9 @@ # ping-pong trickery to securely do permissions, puppet has no umask on exec file { $keyring: ensure = $ensure, -mode= '0600', -owner = 'root', -group = 'root', +owner = $owner, +group = $group, +mode= $mode, backup = false, } -- To view, visit https://gerrit.wikimedia.org/r/78794 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I048aa858a875ccb8826c714f2ca3890434b639cd Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Faidon fai...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] ceph: actually user ceph::key's owner/group/mode - change (operations/puppet)
Faidon has submitted this change and it was merged. Change subject: ceph: actually user ceph::key's owner/group/mode .. ceph: actually user ceph::key's owner/group/mode Parameters were added but not really used. Doh! Change-Id: I048aa858a875ccb8826c714f2ca3890434b639cd --- M modules/ceph/manifests/key.pp 1 file changed, 3 insertions(+), 3 deletions(-) Approvals: Faidon: Looks good to me, approved jenkins-bot: Verified diff --git a/modules/ceph/manifests/key.pp b/modules/ceph/manifests/key.pp index 0d98da5..b177d50 100644 --- a/modules/ceph/manifests/key.pp +++ b/modules/ceph/manifests/key.pp @@ -45,9 +45,9 @@ # ping-pong trickery to securely do permissions, puppet has no umask on exec file { $keyring: ensure = $ensure, -mode= '0600', -owner = 'root', -group = 'root', +owner = $owner, +group = $group, +mode= $mode, backup = false, } -- To view, visit https://gerrit.wikimedia.org/r/78794 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I048aa858a875ccb8826c714f2ca3890434b639cd Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Faidon fai...@wikimedia.org Gerrit-Reviewer: Faidon fai...@wikimedia.org Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] [WIP] Integrate with BetaPreferences - change (mediawiki...VisualEditor)
Esanders has uploaded a new change for review. https://gerrit.wikimedia.org/r/78795 Change subject: [WIP] Integrate with BetaPreferences .. [WIP] Integrate with BetaPreferences TODO: * Proper messages * Screenshot * Separate out into multiple sub-features Bug: 52686 Change-Id: I3cfada2ea264184698de5f322c1fe5041b37b8c8 --- M VisualEditor.hooks.php M VisualEditor.i18n.php M VisualEditor.php M modules/ve-mw/init/ve.init.mw.Target.js 4 files changed, 24 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/VisualEditor refs/changes/95/78795/1 diff --git a/VisualEditor.hooks.php b/VisualEditor.hooks.php index 3fee364..8dc5314 100644 --- a/VisualEditor.hooks.php +++ b/VisualEditor.hooks.php @@ -252,6 +252,19 @@ return true; } + public static function onGetBetaPreferences( $user, $preferences ) { + global $wgExtensionAssetsPath; + + $preferences['visualeditor-enable-experimental'] = array( + 'version' = '1.0', + 'label-message' = 'visualeditor-preference-experimental-label', + 'desc-message' = 'visualeditor-preference-experimental-description', + 'info-link' = 'visualeditor-preference-experimental-info-link', + 'discussion-link' = 'visualeditor-preference-experimental-discussion-link', + //'screenshot' = $wgExtensionAssetsPath . '/VisualEditor/screenshot.png', + ); + } + public static function onListDefinedTags( $tags ) { $tags[] = 'visualeditor'; $tags[] = 'visualeditor-needcheck'; @@ -297,8 +310,9 @@ 'namespaces' = $wgVisualEditorNamespaces, 'pluginModules' = $wgVisualEditorPluginModules, 'defaultUserOptions' = array( - 'enable' = $wgDefaultUserOptions['visualeditor-enable'], 'betatempdisable' = $wgDefaultUserOptions['visualeditor-betatempdisable'], + 'enable' = $wgDefaultUserOptions['visualeditor-enable'], + 'experimental' = $wgDefaultUserOptions['visualeditor-enable-experimental'], ), 'skins' = self::$supportedSkins, 'tabPosition' = $wgVisualEditorTabPosition, diff --git a/VisualEditor.i18n.php b/VisualEditor.i18n.php index 2949b30..c46bdb4 100644 --- a/VisualEditor.i18n.php +++ b/VisualEditor.i18n.php @@ -159,6 +159,8 @@ 'visualeditor-parameter-search-unknown' = 'Unknown parameter', 'visualeditor-preference-betatempdisable' = 'Temporarily disable VisualEditor while it is in beta', 'visualeditor-preference-enable' = 'Enable VisualEditor (only in the [[{{MediaWiki:visualeditor-mainnamespacepagelink}}|main]] and [[{{MediaWiki:visualeditor-usernamespacepagelink}}|user]] namespaces)', + 'visualeditor-preference-experimental-description' = 'Cutting-edge VE fun times!', + 'visualeditor-preference-experimental-label' = 'VisualEditor\'s experimental features', 'visualeditor-reference-input-placeholder' = 'What do you want to reference?', 'visualeditor-referencelist-isempty' = 'There are no references with the group $1 on this page.', 'visualeditor-referencelist-missingref' = 'This reference is defined in a template or other generated block, and for now can only be edited in source mode.', diff --git a/VisualEditor.php b/VisualEditor.php index 9a00f6b..b5b35fe 100644 --- a/VisualEditor.php +++ b/VisualEditor.php @@ -47,6 +47,7 @@ // Register Hooks $wgHooks['BeforePageDisplay'][] = 'VisualEditorHooks::onBeforePageDisplay'; $wgHooks['DoEditSectionLink'][] = 'VisualEditorHooks::onDoEditSectionLink'; +$wgHooks['GetBetaFeaturePreferences'][] = 'VisualEditorHooks::onGetBetaPreferences'; $wgHooks['GetPreferences'][] = 'VisualEditorHooks::onGetPreferences'; $wgHooks['ListDefinedTags'][] = 'VisualEditorHooks::onListDefinedTags'; $wgHooks['MakeGlobalVariablesScript'][] = 'VisualEditorHooks::onMakeGlobalVariablesScript'; @@ -60,6 +61,7 @@ // Set default values for new preferences $wgDefaultUserOptions['visualeditor-enable'] = 0; +$wgDefaultUserOptions['visualeditor-enable-experimental'] = 0; $wgDefaultUserOptions['visualeditor-betatempdisable'] = 0; // Register resource modules diff --git a/modules/ve-mw/init/ve.init.mw.Target.js b/modules/ve-mw/init/ve.init.mw.Target.js index cdd638d..96b6100 100644 --- a/modules/ve-mw/init/ve.init.mw.Target.js +++ b/modules/ve-mw/init/ve.init.mw.Target.js @@ -20,6 +20,8 @@ * revision id here. Defaults to loading the latest version (see #load). */ ve.init.mw.Target = function VeInitMwTarget( $container, pageName, revisionId ) { + var conf = mw.config.get(
[MediaWiki-commits] [Gerrit] ceph: fix sysctl invocations - change (operations/puppet)
Faidon has uploaded a new change for review. https://gerrit.wikimedia.org/r/78796 Change subject: ceph: fix sysctl invocations .. ceph: fix sysctl invocations sysctl is already under /proc/sys, repeating sys.vm just makes these invalid keys. Change-Id: Ib7f4e90ba25923246b2881f39f77c84736d2c018 --- M manifests/role/ceph.pp 1 file changed, 2 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/96/78796/1 diff --git a/manifests/role/ceph.pp b/manifests/role/ceph.pp index 47ca609..68b4e9c 100644 --- a/manifests/role/ceph.pp +++ b/manifests/role/ceph.pp @@ -68,10 +68,10 @@ include ceph::osd # I/O busy systems, tune a few knobs to avoid page alloc failures -sysctlfile { 'sys.vm.min_free_kbytes': +sysctlfile { 'vm.min_free_kbytes': value = '512000', } -sysctlfile { 'sys.vm.vfs_cache_pressure': +sysctlfile { 'vm.vfs_cache_pressure': value = '120', } } -- To view, visit https://gerrit.wikimedia.org/r/78796 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ib7f4e90ba25923246b2881f39f77c84736d2c018 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Faidon fai...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] ceph: fix sysctl invocations - change (operations/puppet)
Faidon has submitted this change and it was merged. Change subject: ceph: fix sysctl invocations .. ceph: fix sysctl invocations sysctl is already under /proc/sys, repeating sys.vm just makes these invalid keys. Change-Id: Ib7f4e90ba25923246b2881f39f77c84736d2c018 --- M manifests/role/ceph.pp 1 file changed, 2 insertions(+), 2 deletions(-) Approvals: Faidon: Looks good to me, approved jenkins-bot: Verified diff --git a/manifests/role/ceph.pp b/manifests/role/ceph.pp index 47ca609..68b4e9c 100644 --- a/manifests/role/ceph.pp +++ b/manifests/role/ceph.pp @@ -68,10 +68,10 @@ include ceph::osd # I/O busy systems, tune a few knobs to avoid page alloc failures -sysctlfile { 'sys.vm.min_free_kbytes': +sysctlfile { 'vm.min_free_kbytes': value = '512000', } -sysctlfile { 'sys.vm.vfs_cache_pressure': +sysctlfile { 'vm.vfs_cache_pressure': value = '120', } } -- To view, visit https://gerrit.wikimedia.org/r/78796 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ib7f4e90ba25923246b2881f39f77c84736d2c018 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Faidon fai...@wikimedia.org Gerrit-Reviewer: Faidon fai...@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] uninstall os-prober from all machines - change (operations/puppet)
Faidon has uploaded a new change for review. https://gerrit.wikimedia.org/r/78797 Change subject: uninstall os-prober from all machines .. uninstall os-prober from all machines os-prober runs as part of update-grub and tries to detected alternative operating systems (Windows, Solaris, Hurd, Minix etc.). Fortunately we use none of them, and having the package installed is not only cruft but also has the nasty side-effect that in the process of detection (= every time a kernel gets installed), it modprobes a bunch of filesystems (jfs, btrfs, hfs+, fat32 etc.) that a) could have bugs or even security vulnerabilities, b) spawn kernel threads (e.g. jfsCommit) that sit there and who knows what they do. Change-Id: Id97f1d35b45d3c3c1e702288d372e52e4d49aa0c --- M manifests/base.pp 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/97/78797/1 diff --git a/manifests/base.pp b/manifests/base.pp index 0531a7e..791fbd3 100644 --- a/manifests/base.pp +++ b/manifests/base.pp @@ -358,7 +358,7 @@ } # DEINSTALL these packages - package { [ mlocate ]: + package { [ mlocate, os-prober ]: ensure = absent; } } -- To view, visit https://gerrit.wikimedia.org/r/78797 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Id97f1d35b45d3c3c1e702288d372e52e4d49aa0c Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Faidon fai...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] uninstall os-prober from all machines - change (operations/puppet)
Faidon has submitted this change and it was merged. Change subject: uninstall os-prober from all machines .. uninstall os-prober from all machines os-prober runs as part of update-grub and tries to detected alternative operating systems (Windows, Solaris, Hurd, Minix etc.). Fortunately we use none of them, and having the package installed is not only cruft but also has the nasty side-effect that in the process of detection (= every time a kernel gets installed), it modprobes a bunch of filesystems (jfs, btrfs, hfs+, fat32 etc.) that a) could have bugs or even security vulnerabilities, b) spawn kernel threads (e.g. jfsCommit) that sit there and who knows what they do. Change-Id: Id97f1d35b45d3c3c1e702288d372e52e4d49aa0c --- M manifests/base.pp 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Faidon: Looks good to me, approved jenkins-bot: Verified diff --git a/manifests/base.pp b/manifests/base.pp index 0531a7e..791fbd3 100644 --- a/manifests/base.pp +++ b/manifests/base.pp @@ -358,7 +358,7 @@ } # DEINSTALL these packages - package { [ mlocate ]: + package { [ mlocate, os-prober ]: ensure = absent; } } -- To view, visit https://gerrit.wikimedia.org/r/78797 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Id97f1d35b45d3c3c1e702288d372e52e4d49aa0c Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Faidon fai...@wikimedia.org Gerrit-Reviewer: Faidon fai...@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] Link dynamically with librdkafka - change (operations...varnishkafka)
Faidon has submitted this change and it was merged. Change subject: Link dynamically with librdkafka .. Link dynamically with librdkafka Don't link statically with librdkafka. Change-Id: I2eac5b60981236d204ef4770152ee67b6f8a7400 --- M Makefile 1 file changed, 1 insertion(+), 3 deletions(-) Approvals: Faidon: Verified; Looks good to me, approved Edenhill: Looks good to me, but someone else must approve diff --git a/Makefile b/Makefile index 7594c3d..3152458 100644 --- a/Makefile +++ b/Makefile @@ -18,9 +18,7 @@ CFLAGS += -DVARNISHKAFKA_CONF_PATH=\$(CFPATH)\ CFLAGS += -Wall -Werror -O2 -g -# Link librdkafka statically for now. -LIBS += -Wl,-Bstatic -lrdkafka -Wl,-Bdynamic -LIBS+= -lvarnishapi -lpthread +LIBS+= -lrdkafka -lvarnishapi -lpthread all: -- To view, visit https://gerrit.wikimedia.org/r/78780 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I2eac5b60981236d204ef4770152ee67b6f8a7400 Gerrit-PatchSet: 1 Gerrit-Project: operations/software/varnish/varnishkafka Gerrit-Branch: master Gerrit-Owner: Faidon fai...@wikimedia.org Gerrit-Reviewer: Edenhill mag...@edenhill.se Gerrit-Reviewer: Faidon fai...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Fix extension names - change (translatewiki)
Shirayuki has uploaded a new change for review. https://gerrit.wikimedia.org/r/78799 Change subject: Fix extension names .. Fix extension names Change-Id: I4052372cf3bb5056feb3d3b444cbb7ee37969dbc --- M groups/MediaWiki/mediawiki-defines.txt 1 file changed, 6 insertions(+), 6 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/translatewiki refs/changes/99/78799/1 diff --git a/groups/MediaWiki/mediawiki-defines.txt b/groups/MediaWiki/mediawiki-defines.txt index 1ab6c96..4693672 100644 --- a/groups/MediaWiki/mediawiki-defines.txt +++ b/groups/MediaWiki/mediawiki-defines.txt @@ -150,7 +150,7 @@ ignored = categorytree-empty-bullet,categorytree-page-bullet ignored = categorytree-member-num -Central Auth +CentralAuth aliasfile = CentralAuth/CentralAuth.alias.php optional = centralauth-editset-grouplink, centralauth-listusers-item optional = centralauth-merge-method-questionmark @@ -1366,7 +1366,7 @@ # Disabled for the time of review: https://gerrit.wikimedia.org/r/#/c/7999/ # Signup API -Sign Writing MediaWiki Plugin +SignWriting MediaWiki Plugin file = SignWritingMediaWikiPlugin/swmp.i18n.php descmsg = swmp-desc @@ -1663,7 +1663,7 @@ Vips Scaler aliasfile = VipsScaler/VipsScaler.alias.php -Visual Editor +VisualEditor ignored = accesskey-ca-ve-edit, accesskey-ca-editsource optional = visualeditor-report-link ignored = visualeditor-help-link @@ -1758,18 +1758,18 @@ ignored = wikibase-api-permissiondenied, wikibase-api-wrong-class ignored = wikibase-ui-pendingquantitycounter-nonpending, wikibase-ui-pendingquantitycounter-pending, wikibase-property-footer -Wikibase Data Model +Wikibase DataModel Wikibase Database -Wikibase Query Engine +Wikibase QueryEngine Wikibase Solr # No real extension, Java program # Wikidata Entity Suggester -Wikihiero +WikiHiero file = wikihiero/wikihiero.i18n.php aliasfile = wikihiero/wikihiero.alias.php -- To view, visit https://gerrit.wikimedia.org/r/78799 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I4052372cf3bb5056feb3d3b444cbb7ee37969dbc Gerrit-PatchSet: 1 Gerrit-Project: translatewiki Gerrit-Branch: master Gerrit-Owner: Shirayuki shirayuk...@gmail.com ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Remove deprecated method now unused - change (mediawiki...WikibaseDataModel)
Jeroen De Dauw has uploaded a new change for review. https://gerrit.wikimedia.org/r/78800 Change subject: Remove deprecated method now unused .. Remove deprecated method now unused Should not be mreged before 48a87f7 in Wikibase.git Change-Id: I2236f4d81bf7860820679b07bc7f92d32877db85 --- M DataModel/Entity/Entity.php 1 file changed, 0 insertions(+), 12 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/WikibaseDataModel refs/changes/00/78800/1 diff --git a/DataModel/Entity/Entity.php b/DataModel/Entity/Entity.php index 3c2fdf5..ae569f5 100644 --- a/DataModel/Entity/Entity.php +++ b/DataModel/Entity/Entity.php @@ -185,18 +185,6 @@ } /** -* Returns a prefixed version of the entity's id or null if it is not in the datastore yet. -* -* @since 0.2 -* @deprecated since 0.4 -* -* @return string|null -*/ - public function getPrefixedId() { - return $this-getId() === null ? null : $this-getId()-getPrefixedId(); - } - - /** * Sets the ID. * Should only be set to something determined by the store and not by the user (to avoid duplicate IDs). * -- To view, visit https://gerrit.wikimedia.org/r/78800 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I2236f4d81bf7860820679b07bc7f92d32877db85 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/WikibaseDataModel Gerrit-Branch: master Gerrit-Owner: Jeroen De Dauw jeroended...@gmail.com ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Get rid of deprecated method usage - change (mediawiki...Wikibase)
Jeroen De Dauw has uploaded a new change for review. https://gerrit.wikimedia.org/r/78801 Change subject: Get rid of deprecated method usage .. Get rid of deprecated method usage Change-Id: Iabc862dac48ac6182a8df6abe3d3f9fe6b50cc11 --- M lib/tests/phpunit/EntityLookupTest.php M repo/includes/api/ModifyEntity.php 2 files changed, 7 insertions(+), 4 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Wikibase refs/changes/01/78801/1 diff --git a/lib/tests/phpunit/EntityLookupTest.php b/lib/tests/phpunit/EntityLookupTest.php index ae51e6b..2b78946 100644 --- a/lib/tests/phpunit/EntityLookupTest.php +++ b/lib/tests/phpunit/EntityLookupTest.php @@ -138,13 +138,13 @@ $entity = $lookup-getEntity( $id, $revision ); if ( $shouldExist == true ) { - $this-assertNotNull( $entity, ID . $id-getPrefixedId() ); - $this-assertEquals( $id-getPrefixedId(), $entity-getPrefixedId() ); + $this-assertNotNull( $entity, ID . $id-__toString() ); + $this-assertEquals( $id-__toString(), $entity-getId()-__toString() ); $has = $lookup-hasEntity( $id ); $this-assertTrue( $has, 'hasEntity' ); } else { - $this-assertNull( $entity, ID . $id-getPrefixedId() ); + $this-assertNull( $entity, ID . $id-__toString() ); if ( $revision == 0 ) { $has = $lookup-hasEntity( $id ); diff --git a/repo/includes/api/ModifyEntity.php b/repo/includes/api/ModifyEntity.php index d2e7319..3c5d299 100644 --- a/repo/includes/api/ModifyEntity.php +++ b/repo/includes/api/ModifyEntity.php @@ -240,9 +240,12 @@ } protected function addToOutput( EntityContent $entityContent, Status $status ) { + $formatter = WikibaseRepo::getDefaultInstance()-getEntityIdFormatter(); + $this-getResult()-addValue( 'entity', - 'id', $entityContent-getEntity()-getPrefixedId() + 'id', + $formatter-format( $entityContent-getEntity()-getId() ) ); $this-getResult()-addValue( -- To view, visit https://gerrit.wikimedia.org/r/78801 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Iabc862dac48ac6182a8df6abe3d3f9fe6b50cc11 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Wikibase Gerrit-Branch: master Gerrit-Owner: Jeroen De Dauw jeroended...@gmail.com ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Set parsing of extension input at an earlier time. - change (mediawiki...SideBarMenu)
Netbrain has uploaded a new change for review. https://gerrit.wikimedia.org/r/78802 Change subject: Set parsing of extension input at an earlier time. .. Set parsing of extension input at an earlier time. Change-Id: I6067debd3750faff86580a6c0afb0f5b37b993f4 --- M SideBarMenu.hooks.php 1 file changed, 2 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/SideBarMenu refs/changes/02/78802/1 diff --git a/SideBarMenu.hooks.php b/SideBarMenu.hooks.php index 3516b8e..a5441c6 100644 --- a/SideBarMenu.hooks.php +++ b/SideBarMenu.hooks.php @@ -9,6 +9,7 @@ public static function renderFromTag($input, array $args, Parser $parser, PPFrame $frame) { $parser-getOutput()-addModules('ext.sidebarmenu.core'); + $input = $parser-recursiveTagParse($input,$frame); //default settings $config = self::getTagConfig($args); @@ -16,8 +17,7 @@ $output = 'div class=sidebar-menu-container'.(is_null($config[SBM_CLASS])? '' : ' '.$config[SBM_CLASS]).''.(is_null($config[SBM_STYLE])? '' : ' style='.$config[SBM_STYLE].'').''; try { $menuParser = new MenuParser($config); - $menuHTML = $menuParser-getMenuTree($input)-toHTML(); - $output .= $parser-recursiveTagParse($menuHTML, $frame); + $output .= $menuParser-getMenuTree($input)-toHTML(); } catch (Exception $x) { wfDebug(An error occured during parsing of: '$input' caught exception: $x); return wfMessage('sidebarmenu-parser-input-error', $x-getMessage())-text(); -- To view, visit https://gerrit.wikimedia.org/r/78802 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I6067debd3750faff86580a6c0afb0f5b37b993f4 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/SideBarMenu Gerrit-Branch: master Gerrit-Owner: Netbrain k...@heldig.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Set parsing of extension input at an earlier time. - change (mediawiki...SideBarMenu)
Netbrain has submitted this change and it was merged. Change subject: Set parsing of extension input at an earlier time. .. Set parsing of extension input at an earlier time. Change-Id: I6067debd3750faff86580a6c0afb0f5b37b993f4 --- M SideBarMenu.hooks.php 1 file changed, 2 insertions(+), 2 deletions(-) Approvals: Netbrain: Verified; Looks good to me, approved diff --git a/SideBarMenu.hooks.php b/SideBarMenu.hooks.php index 3516b8e..a5441c6 100644 --- a/SideBarMenu.hooks.php +++ b/SideBarMenu.hooks.php @@ -9,6 +9,7 @@ public static function renderFromTag($input, array $args, Parser $parser, PPFrame $frame) { $parser-getOutput()-addModules('ext.sidebarmenu.core'); + $input = $parser-recursiveTagParse($input,$frame); //default settings $config = self::getTagConfig($args); @@ -16,8 +17,7 @@ $output = 'div class=sidebar-menu-container'.(is_null($config[SBM_CLASS])? '' : ' '.$config[SBM_CLASS]).''.(is_null($config[SBM_STYLE])? '' : ' style='.$config[SBM_STYLE].'').''; try { $menuParser = new MenuParser($config); - $menuHTML = $menuParser-getMenuTree($input)-toHTML(); - $output .= $parser-recursiveTagParse($menuHTML, $frame); + $output .= $menuParser-getMenuTree($input)-toHTML(); } catch (Exception $x) { wfDebug(An error occured during parsing of: '$input' caught exception: $x); return wfMessage('sidebarmenu-parser-input-error', $x-getMessage())-text(); -- To view, visit https://gerrit.wikimedia.org/r/78802 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I6067debd3750faff86580a6c0afb0f5b37b993f4 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/SideBarMenu Gerrit-Branch: master Gerrit-Owner: Netbrain k...@heldig.org Gerrit-Reviewer: Netbrain k...@heldig.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Change default password in config sample to something non ob... - change (labs...SuchABot)
Yuvipanda has uploaded a new change for review. https://gerrit.wikimedia.org/r/78804 Change subject: Change default password in config sample to something non obvious .. Change default password in config sample to something non obvious Change-Id: I7ae5c9e2d620dc9837148969694e0acaf9ce2a7c --- M config.yaml.sample 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/labs/tools/SuchABot refs/changes/04/78804/1 diff --git a/config.yaml.sample b/config.yaml.sample index bd3c9f9..4c36cf7 100644 --- a/config.yaml.sample +++ b/config.yaml.sample @@ -1,6 +1,6 @@ github: username: SuchABot -password: suchabotsuchabot +password: not-really-the-real-password owner: wikimedia queue_key: some-long-cryptographically-secure-thing-generated-by-registrar gerrit: -- To view, visit https://gerrit.wikimedia.org/r/78804 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I7ae5c9e2d620dc9837148969694e0acaf9ce2a7c Gerrit-PatchSet: 1 Gerrit-Project: labs/tools/SuchABot 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] Added README - change (labs...SuchABot)
Yuvipanda has uploaded a new change for review. https://gerrit.wikimedia.org/r/78803 Change subject: Added README .. Added README Change-Id: I0c2bf00e1206737c628425152985ac6ffdd4c19a --- A README.md 1 file changed, 19 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/labs/tools/SuchABot refs/changes/03/78803/1 diff --git a/README.md b/README.md new file mode 100644 index 000..7e1ca18 --- /dev/null +++ b/README.md @@ -0,0 +1,19 @@ +# Such A Bot # + +This is a bot that helps sync GitHub Pull Requests to Gerrit. It does +two way syncing - sending GitHub comments to Gerrit and Gerrit Comments +to GitHub. It is built to run on [Wikimedia Tool Labs][1]. + +## Dependencies ## + +This depends on the Redis infrastructure on toollabs - specifically the +[gerrit-to-redis][2] project (which, contrary to its name, also does +github to redis). It is written in python for the most part, and +exact requirements are specified in `requirements.txt` file + +## License ## + +This project is licensed under the WTFPL. + +[1]: http://tools.wmflabs.org +[2]: http://github.com/wikimedia/labs-tools-gerrit-to-redis -- To view, visit https://gerrit.wikimedia.org/r/78803 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I0c2bf00e1206737c628425152985ac6ffdd4c19a Gerrit-PatchSet: 1 Gerrit-Project: labs/tools/SuchABot 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] Added README - change (labs...SuchABot)
Yuvipanda has submitted this change and it was merged. Change subject: Added README .. Added README Change-Id: I0c2bf00e1206737c628425152985ac6ffdd4c19a --- A README.md 1 file changed, 19 insertions(+), 0 deletions(-) Approvals: Yuvipanda: Verified; Looks good to me, approved diff --git a/README.md b/README.md new file mode 100644 index 000..7e1ca18 --- /dev/null +++ b/README.md @@ -0,0 +1,19 @@ +# Such A Bot # + +This is a bot that helps sync GitHub Pull Requests to Gerrit. It does +two way syncing - sending GitHub comments to Gerrit and Gerrit Comments +to GitHub. It is built to run on [Wikimedia Tool Labs][1]. + +## Dependencies ## + +This depends on the Redis infrastructure on toollabs - specifically the +[gerrit-to-redis][2] project (which, contrary to its name, also does +github to redis). It is written in python for the most part, and +exact requirements are specified in `requirements.txt` file + +## License ## + +This project is licensed under the WTFPL. + +[1]: http://tools.wmflabs.org +[2]: http://github.com/wikimedia/labs-tools-gerrit-to-redis -- To view, visit https://gerrit.wikimedia.org/r/78803 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I0c2bf00e1206737c628425152985ac6ffdd4c19a Gerrit-PatchSet: 1 Gerrit-Project: labs/tools/SuchABot Gerrit-Branch: master Gerrit-Owner: Yuvipanda yuvipa...@gmail.com Gerrit-Reviewer: Yuvipanda yuvipa...@gmail.com ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Change default password in config sample to something non ob... - change (labs...SuchABot)
Yuvipanda has submitted this change and it was merged. Change subject: Change default password in config sample to something non obvious .. Change default password in config sample to something non obvious Change-Id: I7ae5c9e2d620dc9837148969694e0acaf9ce2a7c --- M config.yaml.sample 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Yuvipanda: Verified; Looks good to me, approved diff --git a/config.yaml.sample b/config.yaml.sample index bd3c9f9..4c36cf7 100644 --- a/config.yaml.sample +++ b/config.yaml.sample @@ -1,6 +1,6 @@ github: username: SuchABot -password: suchabotsuchabot +password: not-really-the-real-password owner: wikimedia queue_key: some-long-cryptographically-secure-thing-generated-by-registrar gerrit: -- To view, visit https://gerrit.wikimedia.org/r/78804 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I7ae5c9e2d620dc9837148969694e0acaf9ce2a7c Gerrit-PatchSet: 1 Gerrit-Project: labs/tools/SuchABot Gerrit-Branch: master Gerrit-Owner: Yuvipanda yuvipa...@gmail.com Gerrit-Reviewer: Yuvipanda yuvipa...@gmail.com ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] i18n review - change (mediawiki...UpdateMediaWiki)
Raimond Spekking has uploaded a new change for review. https://gerrit.wikimedia.org/r/78805 Change subject: i18n review .. i18n review * Consistency tweaks * Fix header * Fix extension credit type to do's: * Please fix encoding for Spanish * Please add message documentation. Once done, I can add the extension to translatewiki.net Change-Id: I366a7125601f7a0b4f3c4c0424822202e6abff57 --- M updateMediaWiki.php M updatemediawiki.i18n.php 2 files changed, 39 insertions(+), 44 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/UpdateMediaWiki refs/changes/05/78805/1 diff --git a/updateMediaWiki.php b/updateMediaWiki.php index b65cbba..42b2ba7 100644 --- a/updateMediaWiki.php +++ b/updateMediaWiki.php @@ -1,4 +1,4 @@ -? +?php /* ** @@ -19,14 +19,14 @@ exit( 1 ); } -$wgExtensionCredits['validextensionclass'][] = array( +$wgExtensionCredits['specialpage'][] = array( 'path' = __FILE__, 'name' = 'UpdateMediaWiki', - 'author' ='Miguel Peláez', - 'url' = 'https://www.mediawiki.org/wiki/Extension:UpdateMediaWiki', - 'description' = 'Allows administrators and authorized users upgrade from a special page MediaWiki', + 'author' ='Miguel Peláez', + 'url' = 'https://www.mediawiki.org/wiki/Extension:UpdateMediaWiki', + 'descriptionmsg' = 'updatemediawiki-desc', 'version' = 0.1, - ); +); $wgAutoloadClasses[ 'Specialupdatemediawiki' ] = __DIR__ . '/specialupdatemediawiki.php'; $wgExtensionMessagesFiles[ 'updatemediawiki' ] = __DIR__ . '/updatemediawiki.i18n.php'; $wgSpecialPages[ 'updatemediawiki' ] = 'Specialupdatemediawiki'; diff --git a/updatemediawiki.i18n.php b/updatemediawiki.i18n.php index 792ae5e..f630ab9 100644 --- a/updatemediawiki.i18n.php +++ b/updatemediawiki.i18n.php @@ -1,4 +1,4 @@ -? +?php /* * * Internationalisation for UpdateMediaWiki @@ -6,56 +6,51 @@ * This file is part of the UpdateMediaWiki extension for MediaWiki * @file * @ingroup Extensions -* @author Miguel Peláez miguel2706outlook.com +* @author Miguel Peláez miguel2706outlook.com * @license http://www.gnu.org/copyleft/gpl.html GNU General Public License 2.0 or later * @link http://www.mediawiki.org/wiki/Extension:UpdateMediaWiki Documentation **/ $messages = array(); - + /** English * @author Miguel2706 */ -$messages[ 'en' ] = array( -'updatemediawiki' = Update MediaWiki, -'updatemediawiki-desc' = Allows administrators and authorized users upgrade from a special page MediaWiki., -'updatemediawiki-current' = Current version, -'updatemediawiki-update-nofound' = No update is available, -'updatemediawiki-update-found' = New Update Found, -'updatemediawiki-update-downloading' = Downloading new update, -'updatemediawiki-update-saved' = Update Downloaded And Saved, -'updatemediawiki-update-exist' = Update already downloaded, -'updatemediawiki-update-copyready' = Copy ready, -'updatemediawiki-update-database' = Update the data base Now?, -'updatemediawiki-update-updateready' = Update ready, -'updatemediawiki-update-install' = Install Now?, -'updatemediawiki-update-updated' = MediaWiki Updated to version, -'updatemediawiki-update-error' = Could not find latest realeases, -'updatemediawiki-update-aborted' = Could not save new update. Operation aborted, - - - - +$messages['en'] = array( + 'updatemediawiki' = Update MediaWiki, + 'updatemediawiki-desc' = 'Allows updating MediaWiki via a special page', + 'updatemediawiki-current' = Current version, + 'updatemediawiki-update-nofound' = No update is available, + 'updatemediawiki-update-found' = New update found, + 'updatemediawiki-update-downloading' = Downloading new update, + 'updatemediawiki-update-saved' = Update downloaded and saved, + 'updatemediawiki-update-exist' = Update already downloaded, + 'updatemediawiki-update-copyready' = Copy ready, + 'updatemediawiki-update-database' = Update the data base now?, + 'updatemediawiki-update-updateready' = Update ready, + 'updatemediawiki-update-install' = Install now?, + 'updatemediawiki-update-updated' = MediaWiki updated to version, + 'updatemediawiki-update-error' = Could not find latest realeases, + 'updatemediawiki-update-aborted' = Could not save new update. Operation aborted, ); - + /** Message documentation * @author Miguel2706 */ -$messages[ 'es' ] = array( +$messages['es'] = array( 'updatemediawiki' = Actualizar MediaWiki, -'updatemediawiki-desc' = Permite a los administradores y
[MediaWiki-commits] [Gerrit] Fix edit-links to Special:SetSiteLink - change (mediawiki...Wikibase)
Addshore has submitted this change and it was merged. Change subject: Fix edit-links to Special:SetSiteLink .. Fix edit-links to Special:SetSiteLink Bug: 51914 Bug: 52095 Change-Id: I617ad2ee16fa0f725812a4414cc046b59970337d --- M repo/includes/EntityView.php M repo/includes/ItemView.php 2 files changed, 1 insertion(+), 5 deletions(-) Approvals: Addshore: Looks good to me, approved diff --git a/repo/includes/EntityView.php b/repo/includes/EntityView.php index fd4df0f..2f43169 100644 --- a/repo/includes/EntityView.php +++ b/repo/includes/EntityView.php @@ -744,10 +744,6 @@ return ''; //XXX: this should throw an exception?! } - if( !$lang ) { - $lang = $this-getLanguage(); - } - if ( $entity-getId() ) { $id = $this-getFormattedIdForEntity( $entity ); } else { diff --git a/repo/includes/ItemView.php b/repo/includes/ItemView.php index ded3d19..05e2ab4 100644 --- a/repo/includes/ItemView.php +++ b/repo/includes/ItemView.php @@ -123,7 +123,7 @@ } // Link to SpecialPage - $editLink = $this-getEditUrl( 'SetSiteLink', $itemContent-getEntity(), null ); + $editLink = $this-getEditUrl( 'SetSiteLink', $itemContent-getEntity() ); foreach( $siteLinks as $link ) { $alternatingClass = ( $i++ % 2 ) ? 'even' : 'uneven'; -- To view, visit https://gerrit.wikimedia.org/r/78229 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I617ad2ee16fa0f725812a4414cc046b59970337d Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Wikibase Gerrit-Branch: master Gerrit-Owner: Tobias Gritschacher tobias.gritschac...@wikimedia.de Gerrit-Reviewer: Addshore addshorew...@gmail.com Gerrit-Reviewer: Aude aude.w...@gmail.com Gerrit-Reviewer: Daniel Kinzler daniel.kinz...@wikimedia.de Gerrit-Reviewer: Daniel Werner daniel.wer...@wikimedia.de Gerrit-Reviewer: Henning Snater henning.sna...@wikimedia.de Gerrit-Reviewer: Jeroen De Dauw jeroended...@gmail.com Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] (bug 52614) Fix error in Special:SetSiteLink - change (mediawiki...Wikibase)
Addshore has submitted this change and it was merged. Change subject: (bug 52614) Fix error in Special:SetSiteLink .. (bug 52614) Fix error in Special:SetSiteLink Change-Id: I135a24fc3ee06d9d0828fe5e8ee6e5a83b132bf3 --- M repo/includes/specials/SpecialModifyEntity.php 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Addshore: Looks good to me, approved jenkins-bot: Verified diff --git a/repo/includes/specials/SpecialModifyEntity.php b/repo/includes/specials/SpecialModifyEntity.php index f0c6d3c..8e97ea1 100644 --- a/repo/includes/specials/SpecialModifyEntity.php +++ b/repo/includes/specials/SpecialModifyEntity.php @@ -91,7 +91,7 @@ if ( !$editEntity-isSuccess() $editEntity-getStatus()-getErrorsArray() ) { $errors = $editEntity-getStatus()-getErrorsArray(); - $this-showErrorHTML( $errors[0]-parse() ); + $this-showErrorHTML( $this-msg( $errors[0][0], array_slice( $errors[0], 1 ) )-parse() ); $this-setForm(); } else { -- To view, visit https://gerrit.wikimedia.org/r/78366 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I135a24fc3ee06d9d0828fe5e8ee6e5a83b132bf3 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Wikibase Gerrit-Branch: master Gerrit-Owner: Tobias Gritschacher tobias.gritschac...@wikimedia.de Gerrit-Reviewer: Addshore addshorew...@gmail.com Gerrit-Reviewer: Aude aude.w...@gmail.com Gerrit-Reviewer: Bene benestar.wikime...@googlemail.com Gerrit-Reviewer: Daniel Kinzler daniel.kinz...@wikimedia.de Gerrit-Reviewer: Daniel Werner daniel.wer...@wikimedia.de Gerrit-Reviewer: Jeroen De Dauw jeroended...@gmail.com Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Remove unused Autocomment class - change (mediawiki...Wikibase)
Addshore has submitted this change and it was merged. Change subject: Remove unused Autocomment class .. Remove unused Autocomment class Change-Id: I03212dfca8172d5a71b0acc6c8c2739a8fe6cc9b --- M repo/Wikibase.classes.php M repo/Wikibase.hooks.php M repo/Wikibase.php D repo/includes/Autocomment.php D repo/tests/phpunit/includes/AutocommentTest.php M repo/tests/phpunit/includes/SummaryTest.php 6 files changed, 146 insertions(+), 431 deletions(-) Approvals: Addshore: Looks good to me, approved jenkins-bot: Verified diff --git a/repo/Wikibase.classes.php b/repo/Wikibase.classes.php index 36b6968..038e13b 100644 --- a/repo/Wikibase.classes.php +++ b/repo/Wikibase.classes.php @@ -32,7 +32,6 @@ 'Wikibase\RepoHooks' = 'Wikibase.hooks.php', // includes - 'Wikibase\Autocomment' = 'includes/Autocomment.php', 'Wikibase\ClaimSaver' = 'includes/ClaimSaver.php', 'Wikibase\ClaimSummaryBuilder' = 'includes/ClaimSummaryBuilder.php', 'Wikibase\DataTypeSelector' = 'includes/DataTypeSelector.php', diff --git a/repo/Wikibase.hooks.php b/repo/Wikibase.hooks.php index 040d96e..bfc0cd8 100644 --- a/repo/Wikibase.hooks.php +++ b/repo/Wikibase.hooks.php @@ -960,4 +960,62 @@ return false; } + + /** +* Pretty formatting of autocomments. +* +* Note that this function does _not_ use $title and $local but +* could use them if links should be created that points to something. +* Typically this could be links that moves to and highlight some +* section within the item itself. +* +* @param $data +* @param string $comment reference to the finalized autocomment +* @param string $pre the string before the autocomment +* @param string $auto the autocomment unformatted +* @param string $post the string after the autocomment +* @param \Title $title use for further information +* @param boolean $local shall links be generated locally or globally +* +* @return boolean +*/ + public static function onFormat( $data, $comment, $pre, $auto, $post, $title, $local ) { + global $wgLang, $wgTitle; + + list( $model, $root ) = $data; + + // If it is possible to avoid loading the whole page then the code will be lighter on the server. + $title = $title === null ? $wgTitle : $title; + + if ( $title-getContentModel() !== $model ) { + return true; + } + + if ( preg_match( '/^([\-a-z]+?)\s*(:\s*(.*?))?\s*$/', $auto, $matches ) ) { + + // turn the args to the message into an array + $args = ( 3 count( $matches ) ) ? explode( '|', $matches[3] ) : array(); + + // look up the message + $msg = wfMessage( $root . '-summary-' . $matches[1] ); + if ( !$msg-isDisabled() ) { + // parse the autocomment + $auto = $msg-params( $args )-parse(); + + // add pre and post fragments + if ( $pre ) { + // written summary $presep autocomment (summary /* section */) + $pre .= wfMessage( 'autocomment-prefix' )-escaped(); + } + if ( $post ) { + // autocomment $postsep written summary (/* section */ summary) + $auto .= wfMessage( 'colon-separator' )-escaped(); + } + + $auto = 'span class=autocomment' . $auto . '/span'; + $comment = $pre . $wgLang-getDirMark() . 'span dir=auto' . $auto . $post . '/span'; + } + } + return true; + } } diff --git a/repo/Wikibase.php b/repo/Wikibase.php index f6a1d00..a208162 100644 --- a/repo/Wikibase.php +++ b/repo/Wikibase.php @@ -168,8 +168,8 @@ $wgHooks['LinkBegin'][] = 'Wikibase\RepoHooks::onLinkBegin'; $wgHooks['OutputPageBodyAttributes'][] = 'Wikibase\RepoHooks::onOutputPageBodyAttributes'; //FIXME: handle other types of entities with autocomments too! - $wgHooks['FormatAutocomments'][] = array( 'Wikibase\Autocomment::onFormat', array( CONTENT_MODEL_WIKIBASE_ITEM, wikibase-item ) ); - $wgHooks['FormatAutocomments'][] = array( 'Wikibase\Autocomment::onFormat', array( CONTENT_MODEL_WIKIBASE_PROPERTY,
[MediaWiki-commits] [Gerrit] Add VIPS / TIFF packages to toollabs exec_environ - change (operations/puppet)
Andrew Bogott has submitted this change and it was merged. Change subject: Add VIPS / TIFF packages to toollabs exec_environ .. Add VIPS / TIFF packages to toollabs exec_environ Bug: 52717 Change-Id: I49885a989c02b7ae82ef681d5b4dbe19a29dc8f9 --- M modules/toollabs/manifests/exec_environ.pp 1 file changed, 4 insertions(+), 0 deletions(-) Approvals: Andrew Bogott: Looks good to me, approved jenkins-bot: Verified diff --git a/modules/toollabs/manifests/exec_environ.pp b/modules/toollabs/manifests/exec_environ.pp index 7f3e65d..eab5f06 100644 --- a/modules/toollabs/manifests/exec_environ.pp +++ b/modules/toollabs/manifests/exec_environ.pp @@ -147,6 +147,10 @@ 'libpng3', 'libquadmath0', 'libsvn1', + 'libtiff4-dev', + 'libvips-dev', + 'libvips-tools', + 'libvips15', 'mariadb-client', # For /usr/bin/mysql. 'mdbtools',# Bug #48805. 'p7zip', -- To view, visit https://gerrit.wikimedia.org/r/78629 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I49885a989c02b7ae82ef681d5b4dbe19a29dc8f9 Gerrit-PatchSet: 2 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Yuvipanda yuvipa...@gmail.com Gerrit-Reviewer: Addshore addshorew...@gmail.com Gerrit-Reviewer: Andrew Bogott abog...@wikimedia.org Gerrit-Reviewer: coren mpellet...@wikimedia.org Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] (bug 52635) broken autocomments for 0 values - change (mediawiki...Wikibase)
Addshore has submitted this change and it was merged. Change subject: (bug 52635) broken autocomments for 0 values .. (bug 52635) broken autocomments for 0 values Change-Id: Icd77c08e697a2be0708ecf0c92cb2a930cb430b5 --- M repo/Wikibase.hooks.php 1 file changed, 2 insertions(+), 2 deletions(-) Approvals: Addshore: Looks good to me, approved jenkins-bot: Verified diff --git a/repo/Wikibase.hooks.php b/repo/Wikibase.hooks.php index bfc0cd8..91350e7 100644 --- a/repo/Wikibase.hooks.php +++ b/repo/Wikibase.hooks.php @@ -1003,11 +1003,11 @@ $auto = $msg-params( $args )-parse(); // add pre and post fragments - if ( $pre ) { + if ( $pre !== '' ) { // written summary $presep autocomment (summary /* section */) $pre .= wfMessage( 'autocomment-prefix' )-escaped(); } - if ( $post ) { + if ( $post !== '' ) { // autocomment $postsep written summary (/* section */ summary) $auto .= wfMessage( 'colon-separator' )-escaped(); } -- To view, visit https://gerrit.wikimedia.org/r/78221 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Icd77c08e697a2be0708ecf0c92cb2a930cb430b5 Gerrit-PatchSet: 2 Gerrit-Project: mediawiki/extensions/Wikibase Gerrit-Branch: master Gerrit-Owner: Tobias Gritschacher tobias.gritschac...@wikimedia.de Gerrit-Reviewer: Addshore addshorew...@gmail.com Gerrit-Reviewer: Aude aude.w...@gmail.com Gerrit-Reviewer: Daniel Kinzler daniel.kinz...@wikimedia.de Gerrit-Reviewer: Jeroen De Dauw jeroended...@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] Move getEntityContent to ModifyClaim - change (mediawiki...Wikibase)
jenkins-bot has submitted this change and it was merged. Change subject: Move getEntityContent to ModifyClaim .. Move getEntityContent to ModifyClaim - also fixed wrong documentation in ApiWikibase Change-Id: Ibf6c30ee4e1205672718a36b49020d87f1f6e88c --- M repo/includes/api/ApiWikibase.php M repo/includes/api/CreateClaim.php M repo/includes/api/ModifyClaim.php M repo/includes/api/RemoveClaims.php M repo/includes/api/RemoveQualifiers.php M repo/includes/api/RemoveReferences.php M repo/includes/api/SetClaimValue.php M repo/includes/api/SetQualifier.php M repo/includes/api/SetReference.php 9 files changed, 26 insertions(+), 22 deletions(-) Approvals: Addshore: Looks good to me, approved jenkins-bot: Verified diff --git a/repo/includes/api/ApiWikibase.php b/repo/includes/api/ApiWikibase.php index 646834f..3f3003c 100644 --- a/repo/includes/api/ApiWikibase.php +++ b/repo/includes/api/ApiWikibase.php @@ -328,7 +328,7 @@ * Revision::getContent(). * @param \User$user: the user to consider if $audience == Revision::FOR_THIS_USER * -* @return \Wikibase\EntityContent|null the revision's content, or null if not available. +* @return \Wikibase\EntityContent the revision's content. */ protected function loadEntityContent( \Title $title, $revId = false, $audience = \Revision::FOR_PUBLIC, diff --git a/repo/includes/api/CreateClaim.php b/repo/includes/api/CreateClaim.php index 5d175c5..cbddf8e 100644 --- a/repo/includes/api/CreateClaim.php +++ b/repo/includes/api/CreateClaim.php @@ -51,10 +51,8 @@ $this-validateParameters( $params ); $entityId = $this-claimModificationHelper-getEntityIdFromString( $params['entity'] ); - $baseRevisionId = isset( $params['baserevid'] ) ? intval( $params['baserevid'] ) : null; $entityTitle = $this-claimModificationHelper-getEntityTitle( $entityId ); - // TODO: put loadEntityContent into a separate helper class for great reuse! - $entityContent = $this-loadEntityContent( $entityTitle, $baseRevisionId ); + $entityContent = $this-getEntityContent( $entityTitle ); $entity = $entityContent-getEntity(); $propertyId = $this-claimModificationHelper-getEntityIdFromString( $params['property'] ); diff --git a/repo/includes/api/ModifyClaim.php b/repo/includes/api/ModifyClaim.php index af3acfd..13b3527 100644 --- a/repo/includes/api/ModifyClaim.php +++ b/repo/includes/api/ModifyClaim.php @@ -111,6 +111,23 @@ } /** +* @since 0.4 +* +* @param \Title $entityTitle +* +* @return EntityContent +* +* TODO: this could go into a ApiWikibaseHelper as it is useful for almost all API modules +*/ + protected function getEntityContent( \Title $entityTitle ) { + $params = $this-extractRequestParams(); + $baseRevisionId = isset( $params['baserevid'] ) ? intval( $params['baserevid'] ) : null; + $entityContent = $this-loadEntityContent( $entityTitle, $baseRevisionId ); + + return $entityContent; + } + + /** * @see \Api::getRequiredPermissions() */ protected function getRequiredPermissions( Entity $entity, array $params ) { diff --git a/repo/includes/api/RemoveClaims.php b/repo/includes/api/RemoveClaims.php index 26030ec..49e868a 100644 --- a/repo/includes/api/RemoveClaims.php +++ b/repo/includes/api/RemoveClaims.php @@ -50,10 +50,9 @@ $params = $this-extractRequestParams(); $entityId = $this-getEntityId( $params ); - $baseRevisionId = isset( $params['baserevid'] ) ? intval( $params['baserevid'] ) : null; $entityTitle = $this-claimModificationHelper-getEntityTitle( $entityId ); - // TODO: put loadEntityContent into a separate helper class for great reuse! - $entityContent = $this-loadEntityContent( $entityTitle, $baseRevisionId ); + $entityContent = $this-getEntityContent( $entityTitle ); + $this-checkClaims( $entityContent-getEntity(), $params['claim'] ); $summary = $this-claimModificationHelper-createSummary( $params, $this ); diff --git a/repo/includes/api/RemoveQualifiers.php b/repo/includes/api/RemoveQualifiers.php index a7c46e9..32a012a 100644 --- a/repo/includes/api/RemoveQualifiers.php +++ b/repo/includes/api/RemoveQualifiers.php @@ -55,10 +55,8 @@ $entityId = $this-claimModificationHelper-getEntityIdFromString( Entity::getIdFromClaimGuid( $claimGuid ) ); - $baseRevisionId = isset( $params['baserevid'] ) ? intval( $params['baserevid'] ) : null; $entityTitle =
[MediaWiki-commits] [Gerrit] Use ChangeOps for SetStatementRank - change (mediawiki...Wikibase)
jenkins-bot has submitted this change and it was merged. Change subject: Use ChangeOps for SetStatementRank .. Use ChangeOps for SetStatementRank + support for custom edit summary + add autosummaries Bug: 52654 Change-Id: I9dd81d18f41f3c70f6a315dc873f0fbd6879e025 --- M repo/Wikibase.classes.php M repo/Wikibase.i18n.php M repo/includes/api/ClaimModificationHelper.php M repo/includes/api/SetStatementRank.php A repo/includes/changeop/ChangeOpStatementRank.php A repo/tests/phpunit/includes/changeop/ChangeOpStatementRankTest.php 6 files changed, 338 insertions(+), 146 deletions(-) Approvals: Addshore: Looks good to me, approved jenkins-bot: Verified diff --git a/repo/Wikibase.classes.php b/repo/Wikibase.classes.php index 01a8340..7b5e203 100644 --- a/repo/Wikibase.classes.php +++ b/repo/Wikibase.classes.php @@ -59,6 +59,7 @@ 'Wikibase\ChangeOpMainSnak' = 'includes/changeop/ChangeOpMainSnak.php', 'Wikibase\ChangeOpQualifier' = 'includes/changeop/ChangeOpQualifier.php', 'Wikibase\ChangeOpReference' = 'includes/changeop/ChangeOpReference.php', + 'Wikibase\ChangeOpStatementRank' = 'includes/changeop/ChangeOpStatementRank.php', 'Wikibase\ChangeOpException' = 'includes/changeop/ChangeOpException.php', // includes/actions diff --git a/repo/Wikibase.i18n.php b/repo/Wikibase.i18n.php index 25a329d..7db411e 100644 --- a/repo/Wikibase.i18n.php +++ b/repo/Wikibase.i18n.php @@ -329,6 +329,7 @@ 'wikibase-item-summary-wbsetqualifier-update' = 'Changed {{PLURAL:$1|qualifier|qualifiers}}', 'wikibase-item-summary-wbremovequalifiers-remove' = 'Removed {{PLURAL:$1|qualifier|qualifiers}}', 'wikibase-item-summary-wbremovereferences-remove' = 'Removed {{PLURAL:$3|reference|references}} from claim', + 'wikibase-item-summary-wbsetstatementrank' = 'Changed rank of statement from \'$3\' to \'$4\'', // property - summary and autocomment, see docs/summaries.txt 'wikibase-property-summary-wbcreate-new' = 'Created a new property', // legacy, backwards compatibility @@ -1060,6 +1061,9 @@ 'wikibase-property-summary-special-create-property' = 'Automatic edit summary when creating a property, and supplying one or more values. Parameters: * $1 is the number of values set (that is 0 - zero); * $2 is the language code of the entity page during creation.', + 'wikibase-item-summary-wbsetstatementrank' = 'Automatic edit summary when changing the rank of a statement. Parameters: +* $3 is the old rank +* $4 is the new rank', 'wikibase-listdatatypes-wikibase-item-head' = '{{Wikibase-datatype-head|Item|wikibase-item}} {{Identical|Item}}', 'wikibase-listdatatypes-wikibase-item-body' = '{{Wikibase-datatype-body|Item}} diff --git a/repo/includes/api/ClaimModificationHelper.php b/repo/includes/api/ClaimModificationHelper.php index b2791d1..7dbd697 100644 --- a/repo/includes/api/ClaimModificationHelper.php +++ b/repo/includes/api/ClaimModificationHelper.php @@ -116,15 +116,16 @@ * @since 0.4 * * @param Claim $claim +* @param string $key */ - public function addClaimToApiResult( Claim $claim ) { + public function addClaimToApiResult( Claim $claim, $key = 'claim' ) { $serializerFactory = new SerializerFactory(); $serializer = $serializerFactory-newSerializerForObject( $claim ); $serializer-getOptions()-setIndexTags( $this-apiMain-getResult()-getIsRawMode() ); $this-apiMain-getResult()-addValue( null, - 'claim', + $key, $serializer-getSerialized( $claim ) ); } diff --git a/repo/includes/api/SetStatementRank.php b/repo/includes/api/SetStatementRank.php index 0cb39ea..df10479 100644 --- a/repo/includes/api/SetStatementRank.php +++ b/repo/includes/api/SetStatementRank.php @@ -3,17 +3,14 @@ namespace Wikibase\Api; use ApiBase; -use MWException; - -use Wikibase\EntityId; use Wikibase\Entity; -use Wikibase\EntityContent; -use Wikibase\EntityContentFactory; -use Wikibase\Statement; -use Wikibase\Settings; -use Wikibase\Lib\ClaimGuidValidator; -use Wikibase\Lib\Serializers\ClaimSerializer; +use Wikibase\Claims; +use Wikibase\Claim; use Wikibase\Repo\WikibaseRepo; +use Wikibase\ChangeOpStatementRank; +use Wikibase\ChangeOpException; +use Wikibase\Statement; +use Wikibase\Lib\Serializers\ClaimSerializer; /** * API module for setting the rank of a statement @@ -40,19 +37,9 @@ * * @licence GNU GPL v2+ * @author Jeroen De Dauw jeroended...@gmail.com + * @author Tobias Gritschacher tobias.gritschac...@wikimedia.de */ -class SetStatementRank extends ApiWikibase { - - // TODO: automcomment - // TODO: example - // TODO: rights -
[MediaWiki-commits] [Gerrit] Get rid of deprecated method usage - change (mediawiki...Wikibase)
jenkins-bot has submitted this change and it was merged. Change subject: Get rid of deprecated method usage .. Get rid of deprecated method usage Change-Id: Iabc862dac48ac6182a8df6abe3d3f9fe6b50cc11 --- M lib/tests/phpunit/EntityLookupTest.php M repo/includes/api/ModifyEntity.php 2 files changed, 7 insertions(+), 4 deletions(-) Approvals: Addshore: Looks good to me, approved jenkins-bot: Verified diff --git a/lib/tests/phpunit/EntityLookupTest.php b/lib/tests/phpunit/EntityLookupTest.php index ae51e6b..2b78946 100644 --- a/lib/tests/phpunit/EntityLookupTest.php +++ b/lib/tests/phpunit/EntityLookupTest.php @@ -138,13 +138,13 @@ $entity = $lookup-getEntity( $id, $revision ); if ( $shouldExist == true ) { - $this-assertNotNull( $entity, ID . $id-getPrefixedId() ); - $this-assertEquals( $id-getPrefixedId(), $entity-getPrefixedId() ); + $this-assertNotNull( $entity, ID . $id-__toString() ); + $this-assertEquals( $id-__toString(), $entity-getId()-__toString() ); $has = $lookup-hasEntity( $id ); $this-assertTrue( $has, 'hasEntity' ); } else { - $this-assertNull( $entity, ID . $id-getPrefixedId() ); + $this-assertNull( $entity, ID . $id-__toString() ); if ( $revision == 0 ) { $has = $lookup-hasEntity( $id ); diff --git a/repo/includes/api/ModifyEntity.php b/repo/includes/api/ModifyEntity.php index d2e7319..3c5d299 100644 --- a/repo/includes/api/ModifyEntity.php +++ b/repo/includes/api/ModifyEntity.php @@ -240,9 +240,12 @@ } protected function addToOutput( EntityContent $entityContent, Status $status ) { + $formatter = WikibaseRepo::getDefaultInstance()-getEntityIdFormatter(); + $this-getResult()-addValue( 'entity', - 'id', $entityContent-getEntity()-getPrefixedId() + 'id', + $formatter-format( $entityContent-getEntity()-getId() ) ); $this-getResult()-addValue( -- To view, visit https://gerrit.wikimedia.org/r/78801 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Iabc862dac48ac6182a8df6abe3d3f9fe6b50cc11 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Wikibase Gerrit-Branch: master Gerrit-Owner: Jeroen De Dauw jeroended...@gmail.com Gerrit-Reviewer: Addshore addshorew...@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] Clarify that the sitelink is in use on another item - change (mediawiki...Wikibase)
jenkins-bot has submitted this change and it was merged. Change subject: Clarify that the sitelink is in use on another item .. Clarify that the sitelink is in use on another item Bug: 47217 Change-Id: I2006825757974cc8bd35edbebad52e6a347a8c77 --- M repo/Wikibase.i18n.php 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Addshore: Looks good to me, approved jenkins-bot: Verified diff --git a/repo/Wikibase.i18n.php b/repo/Wikibase.i18n.php index 763febb..32ab592 100644 --- a/repo/Wikibase.i18n.php +++ b/repo/Wikibase.i18n.php @@ -103,7 +103,7 @@ 'wikibase-error-constraint-violation-description' = 'There is {{PLURAL:$1|a constraint|constraints}} violation for {{PLURAL:$1|description|descriptions}} $3 for {{PLURAL:$1|language code|language codes}} $2.', 'wikibase-error-constraint-violation-aliases' = 'There is {{PLURAL:$1|a constraint|constraints}} violation for {{PLURAL:$1|alias|aliases}} $3 for {{PLURAL:$1|language code|language codes}} $2.', - 'wikibase-error-sitelink-already-used' = 'Site link [$1 $2] already used by item [[$3]].', + 'wikibase-error-sitelink-already-used' = 'Site link [$1 $2] is already included in another item, [[$3]].', 'wikibase-error-label-not-unique-wikibase-property' = 'Another property ($3) already has label $1 associated with language code $2.', 'wikibase-error-label-not-unique-wikibase-query' = 'Another query ($3) already has label $1 associated with language code $2.', 'wikibase-error-label-not-unique-item' = 'Another item ($3) already has label $1 and description $4 associated with language code $2.', -- To view, visit https://gerrit.wikimedia.org/r/78654 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I2006825757974cc8bd35edbebad52e6a347a8c77 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Wikibase Gerrit-Branch: master Gerrit-Owner: Nemo bis federicol...@tiscali.it Gerrit-Reviewer: Addshore addshorew...@gmail.com Gerrit-Reviewer: Aude aude.w...@gmail.com Gerrit-Reviewer: Daniel Kinzler daniel.kinz...@wikimedia.de 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] Get rid of deprecated method - change (mediawiki...Wikibase)
Addshore has uploaded a new change for review. https://gerrit.wikimedia.org/r/78806 Change subject: Get rid of deprecated method .. Get rid of deprecated method Change-Id: I07cac453b5bc6a3b6dffdda2ea95092b42f68f8c --- M repo/tests/phpunit/includes/api/SetQualifierTest.php 1 file changed, 4 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Wikibase refs/changes/06/78806/1 diff --git a/repo/tests/phpunit/includes/api/SetQualifierTest.php b/repo/tests/phpunit/includes/api/SetQualifierTest.php index 528169e..e98139e 100644 --- a/repo/tests/phpunit/includes/api/SetQualifierTest.php +++ b/repo/tests/phpunit/includes/api/SetQualifierTest.php @@ -4,6 +4,7 @@ use Wikibase\Item; use Wikibase\Property; use Wikibase\PropertyContent; +use Wikibase\Repo\WikibaseRepo; use Wikibase\Snak; use Wikibase\Statement; use Wikibase\Claim; @@ -172,11 +173,13 @@ } protected function makeAddRequest( $statementGuid, Snak $qualifier, EntityId $entityId ) { + $entityIdFormatter = WikibaseRepo::getDefaultInstance()-getEntityIdFormatter(); + $params = array( 'action' = 'wbsetqualifier', 'claim' = $statementGuid, 'snaktype' = $qualifier-getType(), - 'property' = $qualifier-getPropertyId()-getPrefixedId(), + 'property' = $entityIdFormatter-format( $qualifier-getPropertyId() ), ); if ( $qualifier instanceof \Wikibase\PropertyValueSnak ) { -- To view, visit https://gerrit.wikimedia.org/r/78806 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I07cac453b5bc6a3b6dffdda2ea95092b42f68f8c Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Wikibase Gerrit-Branch: master Gerrit-Owner: Addshore addshorew...@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] Get rid of deprecated method in ItemByTitleHelper - change (mediawiki...Wikibase)
Addshore has uploaded a new change for review. https://gerrit.wikimedia.org/r/78807 Change subject: Get rid of deprecated method in ItemByTitleHelper .. Get rid of deprecated method in ItemByTitleHelper Change-Id: I2e98353c8929baa153158fc6a76cb01ebcd5b997 --- M repo/includes/api/ItemByTitleHelper.php M repo/tests/phpunit/includes/api/ItemByTitleHelperTest.php 2 files changed, 8 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Wikibase refs/changes/07/78807/1 diff --git a/repo/includes/api/ItemByTitleHelper.php b/repo/includes/api/ItemByTitleHelper.php index 2aceb2a..f136c78 100644 --- a/repo/includes/api/ItemByTitleHelper.php +++ b/repo/includes/api/ItemByTitleHelper.php @@ -3,6 +3,7 @@ namespace Wikibase\Api; use Wikibase\EntityId; use Wikibase\Item; +use Wikibase\Repo\WikibaseRepo; /** * Helper class for api modules to resolve page+title pairs into items. @@ -107,8 +108,10 @@ array( 'site' = $siteId, 'title' = $title, 'missing' = ) ); } else { + $entityIdFormatter = WikibaseRepo::getDefaultInstance()-getEntityIdFormatter(); + $id = new EntityId( Item::ENTITY_TYPE, $id ); - $ids[] = $id-getPrefixedId(); + $ids[] = $entityIdFormatter-format( $id ); } } diff --git a/repo/tests/phpunit/includes/api/ItemByTitleHelperTest.php b/repo/tests/phpunit/includes/api/ItemByTitleHelperTest.php index 1b2f6d8..74649bb 100644 --- a/repo/tests/phpunit/includes/api/ItemByTitleHelperTest.php +++ b/repo/tests/phpunit/includes/api/ItemByTitleHelperTest.php @@ -4,6 +4,7 @@ use Wikibase\Api\ItemByTitleHelper; use Wikibase\EntityId; use Wikibase\Item; +use Wikibase\Repo\WikibaseRepo; use Wikibase\Settings; use Wikibase\StringNormalizer; @@ -101,8 +102,10 @@ } public function testGetEntityIdsSuccess() { + $entityIdFormatter = WikibaseRepo::getDefaultInstance()-getEntityIdFormatter(); + $expectedEntityId = new EntityId( Item::ENTITY_TYPE, 123 ); - $expectedEntityId = $expectedEntityId-getPrefixedId(); + $expectedEntityId = $entityIdFormatter-format( $expectedEntityId ); $itemByTitleHelper = new ItemByTitleHelper( $this-getApiBaseMock( 0 ), -- To view, visit https://gerrit.wikimedia.org/r/78807 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I2e98353c8929baa153158fc6a76cb01ebcd5b997 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Wikibase Gerrit-Branch: master Gerrit-Owner: Addshore addshorew...@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] Get rid of deprecated method in GetEntities - change (mediawiki...Wikibase)
Addshore has uploaded a new change for review. https://gerrit.wikimedia.org/r/78808 Change subject: Get rid of deprecated method in GetEntities .. Get rid of deprecated method in GetEntities Change-Id: I753de50467924067307883969bb7520cd4cc4876 --- M repo/includes/api/GetEntities.php 1 file changed, 4 insertions(+), 3 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Wikibase refs/changes/08/78808/1 diff --git a/repo/includes/api/GetEntities.php b/repo/includes/api/GetEntities.php index 00963df..64ca636 100644 --- a/repo/includes/api/GetEntities.php +++ b/repo/includes/api/GetEntities.php @@ -135,6 +135,7 @@ wfProfileIn( __METHOD__ ); $entityContentFactory = EntityContentFactory::singleton(); + $entityIdFormatter = WikibaseRepo::getDefaultInstance()-getEntityIdFormatter(); $res = $this-getResult(); @@ -151,7 +152,7 @@ //FIXME: if we get different kinds of entities at once, $entityId-getNumericId() may not be unique. $entityPath = array( 'entities', - $this-getUsekeys() ? $entityId-getPrefixedId() : $entityId-getNumericId() + $this-getUsekeys() ? $entityIdFormatter-format( $entityId ) : $entityId-getNumericId() ); // later we do a getContent but only if props are defined @@ -169,7 +170,7 @@ // this should not happen unless a page is not what we assume it to be // that is, we want this to be a little more solid if something ges wrong if ( is_null( $entityContent ) ) { - $res-addValue( $entityPath, 'id', $entityId-getPrefixedId() ); + $res-addValue( $entityPath, 'id', $entityIdFormatter-format( $entityId ) ); $res-addValue( $entityPath, 'illegal', ); return; } @@ -210,7 +211,7 @@ $res-addValue( $entityPath, 'missing', ); } } else { - $res-addValue( $entityPath, 'id', $entityId-getPrefixedId() ); + $res-addValue( $entityPath, 'id', $entityIdFormatter-format( $entityId ) ); $res-addValue( $entityPath, 'type', $entityId-getEntityType() ); } wfProfileOut( __METHOD__ ); -- To view, visit https://gerrit.wikimedia.org/r/78808 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I753de50467924067307883969bb7520cd4cc4876 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Wikibase Gerrit-Branch: master Gerrit-Owner: Addshore addshorew...@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] Implementation work on QueryEntityDeserializer - change (mediawiki...WikibaseQuery)
Addshore has submitted this change and it was merged. Change subject: Implementation work on QueryEntityDeserializer .. Implementation work on QueryEntityDeserializer Change-Id: Ie85b1f0171ae7f3fe859850876e6d37edc313f3a --- A Tests/Integration/Wikibase/Query/QueryEntityRoundtripTest.php M Tests/Phpunit/Wikibase/Query/QueryEntityDeserializerTest.php M src/Wikibase/Query/QueryEntityDeserializer.php 3 files changed, 294 insertions(+), 7 deletions(-) Approvals: Addshore: Looks good to me, approved jenkins-bot: Verified diff --git a/Tests/Integration/Wikibase/Query/QueryEntityRoundtripTest.php b/Tests/Integration/Wikibase/Query/QueryEntityRoundtripTest.php new file mode 100644 index 000..23b73fb --- /dev/null +++ b/Tests/Integration/Wikibase/Query/QueryEntityRoundtripTest.php @@ -0,0 +1,100 @@ +?php + +namespace Tests\Integration\Wikibase\Query; + +use Ask\DeserializerFactory; +use Ask\Language\Description\Disjunction; +use Ask\Language\Description\SomeProperty; +use Ask\Language\Description\ValueDescription; +use Ask\Language\Option\QueryOptions; +use Ask\Language\Query; +use Ask\Language\Selection\PropertySelection; +use Ask\SerializerFactory; +use DataValues\DataValueFactory; +use DataValues\StringValue; +use Wikibase\Claim; +use Wikibase\EntityId; +use Wikibase\PropertySomeValueSnak; +use Wikibase\PropertyValueSnak; +use Wikibase\Query\DIC\ExtensionAccess; +use Wikibase\Query\QueryEntity; +use Wikibase\Query\QueryEntityDeserializer; +use Wikibase\Query\QueryEntitySerializer; +use Wikibase\Repo\WikibaseRepo; +use Wikibase\SnakList; + +/** + * @file + * @ingroup WikibaseQuery + * @group WikibaseQuery + * @group WikibaseQueryIntegration + * + * @licence GNU GPL v2+ + * @author Jeroen De Dauw jeroended...@gmail.com + */ +class QueryEntityRoundtripTest extends \PHPUnit_Framework_TestCase { + + public function testQueryEntitySerializationDeserializationRoundtrip() { + $queryEntity = $this-newQueryEntity(); + + $askSerializerFactory = new SerializerFactory(); + + $askDeserializerFactory = new DeserializerFactory( WikibaseRepo::getDefaultInstance()-getDataValueFactory() ); + + $serializer = new QueryEntitySerializer( $askSerializerFactory-newQuerySerializer() ); + $deserializer = new QueryEntityDeserializer( $askDeserializerFactory-newQueryDeserializer() ); + + $serialization = $serializer-serialize( $queryEntity ); + $deserialization = $deserializer-deserialize( $serialization ); + + $this-assertEquals( $queryEntity, $deserialization ); + } + + protected function newQueryEntity() { + $awesomePropertyId = new EntityId( 'property', 42 ); + + $query = new Query( + new SomeProperty( + $awesomePropertyId, + new Disjunction( array( + new ValueDescription( new StringValue( 'foo' ) ), + new ValueDescription( new StringValue( 'bar' ) ), + ) ) + ), + array( + new PropertySelection( $awesomePropertyId ) + ), + new QueryOptions( 10, 0 ) + ); + + $queryEntity = new QueryEntity( $query ); + + $queryEntity-setId( 1337 ); + + $queryEntity-setLabel( 'en', 'Awesome' ); + $queryEntity-setLabel( 'de', 'Awesome' ); + $queryEntity-setDescription( 'en', 'ohi' ); + $queryEntity-setDescription( 'de', 'there' ); + $queryEntity-addAliases( 'en', array( 'foo', 'bar' ) ); + $queryEntity-addAliases( 'nl', array( 'baz', 'hax' ) ); + + $queryEntity-addClaim( new Claim( + new PropertySomeValueSnak( 42 ) + ) ); + + $queryEntity-addClaim( new Claim( + new PropertyValueSnak( 42, new StringValue( 'baz' ) ) + ) ); + + $queryEntity-addClaim( new Claim( + new PropertyValueSnak( 123, new StringValue( 'baz' ) ), + new SnakList( array( + new PropertySomeValueSnak( 42 ), + new PropertySomeValueSnak( 43 ) + ) ) + ) ); + + return $queryEntity; + } + +} diff --git a/Tests/Phpunit/Wikibase/Query/QueryEntityDeserializerTest.php b/Tests/Phpunit/Wikibase/Query/QueryEntityDeserializerTest.php index 9cb472d..1044646 100644 --- a/Tests/Phpunit/Wikibase/Query/QueryEntityDeserializerTest.php +++ b/Tests/Phpunit/Wikibase/Query/QueryEntityDeserializerTest.php @@ -5,6 +5,8 @@ use Ask\Language\Description\AnyValue; use
[MediaWiki-commits] [Gerrit] Revert Implementation work on QueryEntityDeserializer - change (mediawiki...WikibaseQuery)
jenkins-bot has submitted this change and it was merged. Change subject: Revert Implementation work on QueryEntityDeserializer .. Revert Implementation work on QueryEntityDeserializer This reverts commit 9ba6aa26b88d446c4e2c6a24a9c5aacbc2b72ce1. Breaks the build.. Change-Id: I2759acd74a00d5448bbe6df2b7b69b3624de86e4 --- D Tests/Integration/Wikibase/Query/QueryEntityRoundtripTest.php M Tests/Phpunit/Wikibase/Query/QueryEntityDeserializerTest.php M src/Wikibase/Query/QueryEntityDeserializer.php 3 files changed, 7 insertions(+), 294 deletions(-) Approvals: Addshore: Looks good to me, approved jenkins-bot: Verified diff --git a/Tests/Integration/Wikibase/Query/QueryEntityRoundtripTest.php b/Tests/Integration/Wikibase/Query/QueryEntityRoundtripTest.php deleted file mode 100644 index 23b73fb..000 --- a/Tests/Integration/Wikibase/Query/QueryEntityRoundtripTest.php +++ /dev/null @@ -1,100 +0,0 @@ -?php - -namespace Tests\Integration\Wikibase\Query; - -use Ask\DeserializerFactory; -use Ask\Language\Description\Disjunction; -use Ask\Language\Description\SomeProperty; -use Ask\Language\Description\ValueDescription; -use Ask\Language\Option\QueryOptions; -use Ask\Language\Query; -use Ask\Language\Selection\PropertySelection; -use Ask\SerializerFactory; -use DataValues\DataValueFactory; -use DataValues\StringValue; -use Wikibase\Claim; -use Wikibase\EntityId; -use Wikibase\PropertySomeValueSnak; -use Wikibase\PropertyValueSnak; -use Wikibase\Query\DIC\ExtensionAccess; -use Wikibase\Query\QueryEntity; -use Wikibase\Query\QueryEntityDeserializer; -use Wikibase\Query\QueryEntitySerializer; -use Wikibase\Repo\WikibaseRepo; -use Wikibase\SnakList; - -/** - * @file - * @ingroup WikibaseQuery - * @group WikibaseQuery - * @group WikibaseQueryIntegration - * - * @licence GNU GPL v2+ - * @author Jeroen De Dauw jeroended...@gmail.com - */ -class QueryEntityRoundtripTest extends \PHPUnit_Framework_TestCase { - - public function testQueryEntitySerializationDeserializationRoundtrip() { - $queryEntity = $this-newQueryEntity(); - - $askSerializerFactory = new SerializerFactory(); - - $askDeserializerFactory = new DeserializerFactory( WikibaseRepo::getDefaultInstance()-getDataValueFactory() ); - - $serializer = new QueryEntitySerializer( $askSerializerFactory-newQuerySerializer() ); - $deserializer = new QueryEntityDeserializer( $askDeserializerFactory-newQueryDeserializer() ); - - $serialization = $serializer-serialize( $queryEntity ); - $deserialization = $deserializer-deserialize( $serialization ); - - $this-assertEquals( $queryEntity, $deserialization ); - } - - protected function newQueryEntity() { - $awesomePropertyId = new EntityId( 'property', 42 ); - - $query = new Query( - new SomeProperty( - $awesomePropertyId, - new Disjunction( array( - new ValueDescription( new StringValue( 'foo' ) ), - new ValueDescription( new StringValue( 'bar' ) ), - ) ) - ), - array( - new PropertySelection( $awesomePropertyId ) - ), - new QueryOptions( 10, 0 ) - ); - - $queryEntity = new QueryEntity( $query ); - - $queryEntity-setId( 1337 ); - - $queryEntity-setLabel( 'en', 'Awesome' ); - $queryEntity-setLabel( 'de', 'Awesome' ); - $queryEntity-setDescription( 'en', 'ohi' ); - $queryEntity-setDescription( 'de', 'there' ); - $queryEntity-addAliases( 'en', array( 'foo', 'bar' ) ); - $queryEntity-addAliases( 'nl', array( 'baz', 'hax' ) ); - - $queryEntity-addClaim( new Claim( - new PropertySomeValueSnak( 42 ) - ) ); - - $queryEntity-addClaim( new Claim( - new PropertyValueSnak( 42, new StringValue( 'baz' ) ) - ) ); - - $queryEntity-addClaim( new Claim( - new PropertyValueSnak( 123, new StringValue( 'baz' ) ), - new SnakList( array( - new PropertySomeValueSnak( 42 ), - new PropertySomeValueSnak( 43 ) - ) ) - ) ); - - return $queryEntity; - } - -} diff --git a/Tests/Phpunit/Wikibase/Query/QueryEntityDeserializerTest.php b/Tests/Phpunit/Wikibase/Query/QueryEntityDeserializerTest.php index 1044646..9cb472d 100644 --- a/Tests/Phpunit/Wikibase/Query/QueryEntityDeserializerTest.php +++
[MediaWiki-commits] [Gerrit] HistoryAction: There is no mediawiki.legacy.history module - change (mediawiki/core)
TheDJ has submitted this change and it was merged. Change subject: HistoryAction: There is no mediawiki.legacy.history module .. HistoryAction: There is no mediawiki.legacy.history module Remove the reference to it. Change-Id: Ia34b2ea6155273faaa8961238e07672f9e65c576 --- M includes/actions/HistoryAction.php 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: TheDJ: Looks good to me, approved diff --git a/includes/actions/HistoryAction.php b/includes/actions/HistoryAction.php index 6a1edd6..e58791e 100644 --- a/includes/actions/HistoryAction.php +++ b/includes/actions/HistoryAction.php @@ -115,7 +115,7 @@ // Setup page variables. $out-setFeedAppendQuery( 'action=history' ); - $out-addModules( array( 'mediawiki.legacy.history', 'mediawiki.action.history' ) ); + $out-addModules( 'mediawiki.action.history' ); // Handle atom/RSS feeds. $feedType = $request-getVal( 'feed' ); -- To view, visit https://gerrit.wikimedia.org/r/78469 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ia34b2ea6155273faaa8961238e07672f9e65c576 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Matmarex matma@gmail.com Gerrit-Reviewer: Daniel Friesen dan...@nadir-seen-fire.com Gerrit-Reviewer: TheDJ hartman.w...@gmail.com Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Revert Revert Implementation work on QueryEntityDeserializ... - change (mediawiki...WikibaseQuery)
jenkins-bot has submitted this change and it was merged. Change subject: Revert Revert Implementation work on QueryEntityDeserializer .. Revert Revert Implementation work on QueryEntityDeserializer This reverts commit 7c5207edc0c83d1dc338dfd1f54454b36782b42d. It turns out the travis build has being doing this for a while as as it isn't actually failing the tests and the code looks good I will revert the revert... Change-Id: I8dcdd6756f644ce40038d7ec8c46fd949c00f107 --- A Tests/Integration/Wikibase/Query/QueryEntityRoundtripTest.php M Tests/Phpunit/Wikibase/Query/QueryEntityDeserializerTest.php M src/Wikibase/Query/QueryEntityDeserializer.php 3 files changed, 294 insertions(+), 7 deletions(-) Approvals: Addshore: Looks good to me, approved jenkins-bot: Verified diff --git a/Tests/Integration/Wikibase/Query/QueryEntityRoundtripTest.php b/Tests/Integration/Wikibase/Query/QueryEntityRoundtripTest.php new file mode 100644 index 000..23b73fb --- /dev/null +++ b/Tests/Integration/Wikibase/Query/QueryEntityRoundtripTest.php @@ -0,0 +1,100 @@ +?php + +namespace Tests\Integration\Wikibase\Query; + +use Ask\DeserializerFactory; +use Ask\Language\Description\Disjunction; +use Ask\Language\Description\SomeProperty; +use Ask\Language\Description\ValueDescription; +use Ask\Language\Option\QueryOptions; +use Ask\Language\Query; +use Ask\Language\Selection\PropertySelection; +use Ask\SerializerFactory; +use DataValues\DataValueFactory; +use DataValues\StringValue; +use Wikibase\Claim; +use Wikibase\EntityId; +use Wikibase\PropertySomeValueSnak; +use Wikibase\PropertyValueSnak; +use Wikibase\Query\DIC\ExtensionAccess; +use Wikibase\Query\QueryEntity; +use Wikibase\Query\QueryEntityDeserializer; +use Wikibase\Query\QueryEntitySerializer; +use Wikibase\Repo\WikibaseRepo; +use Wikibase\SnakList; + +/** + * @file + * @ingroup WikibaseQuery + * @group WikibaseQuery + * @group WikibaseQueryIntegration + * + * @licence GNU GPL v2+ + * @author Jeroen De Dauw jeroended...@gmail.com + */ +class QueryEntityRoundtripTest extends \PHPUnit_Framework_TestCase { + + public function testQueryEntitySerializationDeserializationRoundtrip() { + $queryEntity = $this-newQueryEntity(); + + $askSerializerFactory = new SerializerFactory(); + + $askDeserializerFactory = new DeserializerFactory( WikibaseRepo::getDefaultInstance()-getDataValueFactory() ); + + $serializer = new QueryEntitySerializer( $askSerializerFactory-newQuerySerializer() ); + $deserializer = new QueryEntityDeserializer( $askDeserializerFactory-newQueryDeserializer() ); + + $serialization = $serializer-serialize( $queryEntity ); + $deserialization = $deserializer-deserialize( $serialization ); + + $this-assertEquals( $queryEntity, $deserialization ); + } + + protected function newQueryEntity() { + $awesomePropertyId = new EntityId( 'property', 42 ); + + $query = new Query( + new SomeProperty( + $awesomePropertyId, + new Disjunction( array( + new ValueDescription( new StringValue( 'foo' ) ), + new ValueDescription( new StringValue( 'bar' ) ), + ) ) + ), + array( + new PropertySelection( $awesomePropertyId ) + ), + new QueryOptions( 10, 0 ) + ); + + $queryEntity = new QueryEntity( $query ); + + $queryEntity-setId( 1337 ); + + $queryEntity-setLabel( 'en', 'Awesome' ); + $queryEntity-setLabel( 'de', 'Awesome' ); + $queryEntity-setDescription( 'en', 'ohi' ); + $queryEntity-setDescription( 'de', 'there' ); + $queryEntity-addAliases( 'en', array( 'foo', 'bar' ) ); + $queryEntity-addAliases( 'nl', array( 'baz', 'hax' ) ); + + $queryEntity-addClaim( new Claim( + new PropertySomeValueSnak( 42 ) + ) ); + + $queryEntity-addClaim( new Claim( + new PropertyValueSnak( 42, new StringValue( 'baz' ) ) + ) ); + + $queryEntity-addClaim( new Claim( + new PropertyValueSnak( 123, new StringValue( 'baz' ) ), + new SnakList( array( + new PropertySomeValueSnak( 42 ), + new PropertySomeValueSnak( 43 ) + ) ) + ) ); + + return $queryEntity; + } + +} diff --git a/Tests/Phpunit/Wikibase/Query/QueryEntityDeserializerTest.php
[MediaWiki-commits] [Gerrit] Fix of security issue - change (mediawiki...RegexFun)
Daniel Werner has submitted this change and it was merged. Change subject: Fix of security issue .. Fix of security issue Change-Id: Iffc83d00ffda92dead36f802bb1f43c9caa1d545 --- M RegexFun.php 1 file changed, 2 insertions(+), 0 deletions(-) Approvals: Daniel Werner: Verified; Looks good to me, approved diff --git a/RegexFun.php b/RegexFun.php index 20e8365..9d0f5bc 100644 --- a/RegexFun.php +++ b/RegexFun.php @@ -128,6 +128,8 @@ $specialFlags = array(); + $pattern = str_replace(chr(0), '', $pattern); + if( strlen( $pattern ) 2 ) { return false; } -- To view, visit https://gerrit.wikimedia.org/r/68627 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Iffc83d00ffda92dead36f802bb1f43c9caa1d545 Gerrit-PatchSet: 2 Gerrit-Project: mediawiki/extensions/RegexFun Gerrit-Branch: master Gerrit-Owner: Pastakhov pastak...@yandex.ru Gerrit-Reviewer: Daniel Werner daniel.wer...@wikimedia.de Gerrit-Reviewer: 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] Make and use a method for asserting html elements - change (mediawiki...Wikibase)
Daniel Werner has submitted this change and it was merged. Change subject: Make and use a method for asserting html elements .. Make and use a method for asserting html elements This should make creating simple tests for special pages a bit nicer! Change-Id: I297a4431dd9ce42bc80ab12d17f77a51f65cad66 --- M lib/tests/phpunit/specials/SpecialPageTestBase.php M repo/tests/phpunit/includes/specials/SpecialItemByTitleTest.php M repo/tests/phpunit/includes/specials/SpecialItemDisambiguationTest.php M repo/tests/phpunit/includes/specials/SpecialNewItemTest.php M repo/tests/phpunit/includes/specials/SpecialNewPropertyTest.php 5 files changed, 130 insertions(+), 28 deletions(-) Approvals: Daniel Werner: Looks good to me, approved jenkins-bot: Verified diff --git a/lib/tests/phpunit/specials/SpecialPageTestBase.php b/lib/tests/phpunit/specials/SpecialPageTestBase.php index 5ec8067..f20eed6 100644 --- a/lib/tests/phpunit/specials/SpecialPageTestBase.php +++ b/lib/tests/phpunit/specials/SpecialPageTestBase.php @@ -29,6 +29,7 @@ * @licence GNU GPL v2+ * @author Jeroen De Dauw jeroended...@gmail.com * @author Daniel Kinzler + * @author Adam Shorland */ abstract class SpecialPageTestBase extends \MediaWikiTestCase { @@ -53,10 +54,6 @@ parent::tearDown(); } - - //public function testConstructor() { - //$this-assertInstanceOf( 'SpecialPage', new \SpecialItemDisambiguation() ); - //} /** * Returns a new instance of the special page under test. @@ -126,4 +123,19 @@ return array( $text, $response ); } + /** +* Uses regex to assert that the given tag exists in a string +* @param $text string to check +* @param $tag string name of tag +* @param $attributes array list of html attributes +*/ + protected function assertHasHtmlTagWithElements( $text, $tag, $attributes ){ + $parts = array(); + foreach( $attributes as $parm = $value ){ + $parts[] = preg_quote( {$parm}=\{$value}\, '/' ); + } + $this-assertRegExp( '/' . $tag . '(\s[^]*?(' . implode( '|', $parts ) . ')[^]*?){' . count( $parts ) . '}/' , + $text, Missing {$tag} tag in text ); + } + } diff --git a/repo/tests/phpunit/includes/specials/SpecialItemByTitleTest.php b/repo/tests/phpunit/includes/specials/SpecialItemByTitleTest.php index c9492b3..e2d2c31 100644 --- a/repo/tests/phpunit/includes/specials/SpecialItemByTitleTest.php +++ b/repo/tests/phpunit/includes/specials/SpecialItemByTitleTest.php @@ -33,6 +33,7 @@ * @licence GNU GPL v2+ * @author Jeroen De Dauw jeroended...@gmail.com * @author Daniel Kinzler + * @author Adam Shorland */ class SpecialItemByTitleTest extends SpecialPageTestBase { @@ -41,14 +42,35 @@ } public function testExecute() { - //TODO: Actually verify that the output is correct. - // Currently this just tests that there is no fatal error. + //TODO: Verify that more of the output is correct. + + $expectedInputs = array( + 'site' = array( + 'id' = 'wb-itembytitle-sitename', + 'name' = 'site' ), + 'pagename' = array( + 'id' = 'pagename', + 'class' = 'wb-input-text', + 'name' = 'page' ), + 'submit' = array( + 'id' = 'wb-itembytitle-submit', + 'class' = 'wb-input-button', + 'type' = 'submit', + 'name' = 'submit' ), + ); list( $output, ) = $this-executeSpecialPage( '' ); - $this-assertTrue( true, 'Calling execute without any subpage value' ); + // -- Make sure the special page loads with expected input fields + foreach( $expectedInputs as $expected ){ + $this-assertHasHtmlTagWithElements( $output, 'input', $expected ); + } - list( $output, ) = $this-executeSpecialPage( 'en/oHai' ); - $this-assertTrue( true, 'Calling execute with a subpage value' ); //TODO: assert output + list( $output, ) = $this-executeSpecialPage( 'SiteText/PageText' ); + // -- Make sure the subpage values have been passed to the correct input fields + $this-assertHasHtmlTagWithElements( $output, 'input', + array_merge( $expectedInputs['site'], array( 'value' = 'SiteText' ) ) ); + $this-assertHasHtmlTagWithElements( $output, 'input', + array_merge(
[MediaWiki-commits] [Gerrit] Fix undefined offset when loading special page - change (mediawiki...Wikibase)
Daniel Werner has submitted this change and it was merged. Change subject: Fix undefined offset when loading special page .. Fix undefined offset when loading special page This was caught by the tests I have added in the follow up commit Change-Id: I85271ade7711f1138b1f25777e1a7f99855d0e2a --- M repo/includes/specials/SpecialEntitiesWithoutLabel.php 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Daniel Werner: Verified; Looks good to me, approved diff --git a/repo/includes/specials/SpecialEntitiesWithoutLabel.php b/repo/includes/specials/SpecialEntitiesWithoutLabel.php index 0750970..ab104ee 100644 --- a/repo/includes/specials/SpecialEntitiesWithoutLabel.php +++ b/repo/includes/specials/SpecialEntitiesWithoutLabel.php @@ -67,7 +67,7 @@ $this-type = null; if ( $subPage !== null ) { $parts = explode( '/', $subPage ); - if ( count( $parts = 2 ) ) { + if ( array_key_exists( 1, $parts ) ) { $this-type = $parts[1]; } $this-language = $parts[0]; -- To view, visit https://gerrit.wikimedia.org/r/78516 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I85271ade7711f1138b1f25777e1a7f99855d0e2a Gerrit-PatchSet: 3 Gerrit-Project: mediawiki/extensions/Wikibase Gerrit-Branch: master Gerrit-Owner: Addshore addshorew...@gmail.com Gerrit-Reviewer: Aude aude.w...@gmail.com Gerrit-Reviewer: Daniel Kinzler daniel.kinz...@wikimedia.de Gerrit-Reviewer: Daniel Werner daniel.wer...@wikimedia.de Gerrit-Reviewer: Denny Vrandecic denny.vrande...@wikimedia.de Gerrit-Reviewer: Henning Snater henning.sna...@wikimedia.de Gerrit-Reviewer: Hoo man h...@online.de Gerrit-Reviewer: Jeroen De Dauw jeroended...@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 incorrect class in SpecialSetEntity page - change (mediawiki...Wikibase)
jenkins-bot has submitted this change and it was merged. Change subject: Fix incorrect class in SpecialSetEntity page .. Fix incorrect class in SpecialSetEntity page Change-Id: If87790d313686492794fac825f4be8c1aa7cd9ec --- M repo/includes/specials/SpecialSetEntity.php 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Daniel Werner: Looks good to me, approved jenkins-bot: Verified diff --git a/repo/includes/specials/SpecialSetEntity.php b/repo/includes/specials/SpecialSetEntity.php index 45028f0..8481f39 100644 --- a/repo/includes/specials/SpecialSetEntity.php +++ b/repo/includes/specials/SpecialSetEntity.php @@ -160,7 +160,7 @@ $this-value, 'text', array( - 'class' = 'wb-input wb-input-text', + 'class' = 'wb-input', 'id' = 'wb-setentity-value', 'size' = 50 ) -- To view, visit https://gerrit.wikimedia.org/r/78518 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: If87790d313686492794fac825f4be8c1aa7cd9ec Gerrit-PatchSet: 3 Gerrit-Project: mediawiki/extensions/Wikibase Gerrit-Branch: master Gerrit-Owner: Addshore addshorew...@gmail.com Gerrit-Reviewer: Aude aude.w...@gmail.com Gerrit-Reviewer: Daniel Werner daniel.wer...@wikimedia.de Gerrit-Reviewer: Denny Vrandecic denny.vrande...@wikimedia.de Gerrit-Reviewer: Henning Snater henning.sna...@wikimedia.de Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Adding option of pagegenerator in the delete.py because of t... - change (pywikibot/compat)
Ladsgroup has uploaded a new change for review. https://gerrit.wikimedia.org/r/78811 Change subject: Adding option of pagegenerator in the delete.py because of the reqeust of infovarius in wikimania .. Adding option of pagegenerator in the delete.py because of the reqeust of infovarius in wikimania Change-Id: I02ce99e5033531516470be1f461c481aca2d590b --- M delete.py 1 file changed, 14 insertions(+), 60 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/pywikibot/compat refs/changes/11/78811/1 diff --git a/delete.py b/delete.py index 5de27d7..522faeb 100644 --- a/delete.py +++ b/delete.py @@ -59,6 +59,7 @@ page.delete(self.summary, not self.always, throttle = True) def main(): +genFactory = pagegenerators.GeneratorFactory() pageName = '' singlePage = '' summary = '' @@ -71,44 +72,19 @@ doImages = False undelete = False fileName = '' -gen = None +generator = None # read command line parameters for arg in pywikibot.handleArgs(): if arg == '-always': always = True -elif arg.startswith('-file'): -if len(arg) == len('-file'): -fileName = pywikibot.input( -u'Enter name of file to delete pages from:') -else: -fileName = arg[len('-file:'):] elif arg.startswith('-summary'): if len(arg) == len('-summary'): summary = pywikibot.input(u'Enter a reason for the deletion:') else: summary = arg[len('-summary:'):] -elif arg.startswith('-cat'): -doCategory = True -if len(arg) == len('-cat'): -pageName = pywikibot.input( -u'Enter the category to delete from:') -else: -pageName = arg[len('-cat:'):] elif arg.startswith('-nosubcats'): deleteSubcategories = False -elif arg.startswith('-links'): -doLinks = True -if len(arg) == len('-links'): -pageName = pywikibot.input(u'Enter the page to delete from:') -else: -pageName = arg[len('-links:'):] -elif arg.startswith('-ref'): -doRef = True -if len(arg) == len('-ref'): -pageName = pywikibot.input(u'Enter the page to delete from:') -else: -pageName = arg[len('-ref:'):] elif arg.startswith('-page'): doSinglePage = True if len(arg) == len('-page'): @@ -124,55 +100,33 @@ pageName = arg[len('-images'):] elif arg.startswith('-undelete'): undelete = True - +else: +genFactory.handleArg(arg) mysite = pywikibot.getSite() if doSinglePage: if not summary: summary = pywikibot.input(u'Enter a reason for the %sdeletion:' % ['', 'un'][undelete]) page = pywikibot.Page(mysite, pageName) -gen = iter([page]) -elif doCategory: -if not summary: -summary = i18n.twtranslate(mysite, 'delete-from-category', - {'page': pageName}) -ns = mysite.category_namespace() -categoryPage = catlib.Category(mysite, ns + ':' + pageName) -gen = pagegenerators.CategorizedPageGenerator( -categoryPage, recurse=deleteSubcategories) -elif doLinks: -if not summary: -summary = i18n.twtranslate(mysite, 'delete-linked-pages', - {'page': pageName}) -pywikibot.setAction(summary) -linksPage = pywikibot.Page(mysite, pageName) -gen = pagegenerators.LinkedPageGenerator(linksPage) -elif doRef: -if not summary: -summary = i18n.twtranslate(mysite, 'delete-referring-pages', - {'page': pageName}) -refPage = pywikibot.Page(mysite, pageName) -gen = pagegenerators.ReferringPageGenerator(refPage) -elif fileName: -if not summary: -summary = i18n.twtranslate(mysite, 'delete-from-file') -gen = pagegenerators.TextfilePageGenerator(fileName) +generator = iter([page]) elif doImages: if not summary: summary = i18n.twtranslate(mysite, 'delete-images', {'page': pageName}) page = pywikibot.Page(mysite, pageName) -gen = pagegenerators.ImagesPageGenerator(page) - -if gen: +generator = pagegenerators.ImagesPageGenerator(page) +if not generator: +generator = genFactory.getCombinedGenerator() +if not generator: +# syntax error, show help text from the top of this file +pywikibot.showHelp('delete') +return +if generator: pywikibot.setAction(summary)
[MediaWiki-commits] [Gerrit] Fix travis-ci @covers complain - change (mediawiki...SemanticMediaWiki)
Mwjames has uploaded a new change for review. https://gerrit.wikimedia.org/r/78812 Change subject: Fix travis-ci @covers complain .. Fix travis-ci @covers complain SMW\Test\AutoloadRegisterTest::testAutoloadedClasses PHP_CodeCoverage_Exception: Trying to @cover not existing class or interface spl_autoload_register. Change-Id: I862bb6593c76b5fd91a1d541d354b17f1c3aada4 --- M tests/phpunit/includes/AutoloadRegisterTest.php 1 file changed, 2 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/SemanticMediaWiki refs/changes/12/78812/1 diff --git a/tests/phpunit/includes/AutoloadRegisterTest.php b/tests/phpunit/includes/AutoloadRegisterTest.php index eaa180c..67bb6f9 100644 --- a/tests/phpunit/includes/AutoloadRegisterTest.php +++ b/tests/phpunit/includes/AutoloadRegisterTest.php @@ -14,7 +14,8 @@ */ /** - * @covers spl_autoload_register + * Verifies registered classes (spl_autoload_register) against + * classes that are accessible to avoid misspellings etc. * * @ingroup SMW * -- To view, visit https://gerrit.wikimedia.org/r/78812 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I862bb6593c76b5fd91a1d541d354b17f1c3aada4 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/SemanticMediaWiki Gerrit-Branch: master Gerrit-Owner: Mwjames jamesin.hongkon...@gmail.com ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Fix travis-ci @covers complain - change (mediawiki...SemanticMediaWiki)
jenkins-bot has submitted this change and it was merged. Change subject: Fix travis-ci @covers complain .. Fix travis-ci @covers complain SMW\Test\AutoloadRegisterTest::testAutoloadedClasses PHP_CodeCoverage_Exception: Trying to @cover not existing class or interface spl_autoload_register. Change-Id: I862bb6593c76b5fd91a1d541d354b17f1c3aada4 --- M tests/phpunit/includes/AutoloadRegisterTest.php 1 file changed, 2 insertions(+), 1 deletion(-) Approvals: Mwjames: Looks good to me, approved jenkins-bot: Verified diff --git a/tests/phpunit/includes/AutoloadRegisterTest.php b/tests/phpunit/includes/AutoloadRegisterTest.php index eaa180c..67bb6f9 100644 --- a/tests/phpunit/includes/AutoloadRegisterTest.php +++ b/tests/phpunit/includes/AutoloadRegisterTest.php @@ -14,7 +14,8 @@ */ /** - * @covers spl_autoload_register + * Verifies registered classes (spl_autoload_register) against + * classes that are accessible to avoid misspellings etc. * * @ingroup SMW * -- To view, visit https://gerrit.wikimedia.org/r/78812 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I862bb6593c76b5fd91a1d541d354b17f1c3aada4 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/SemanticMediaWiki Gerrit-Branch: master Gerrit-Owner: Mwjames jamesin.hongkon...@gmail.com Gerrit-Reviewer: Mwjames jamesin.hongkon...@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 some comments that refered to Solr. - change (mediawiki...CirrusSearch)
Manybubbles has uploaded a new change for review. https://gerrit.wikimedia.org/r/78813 Change subject: Fix some comments that refered to Solr. .. Fix some comments that refered to Solr. Change-Id: Id4ab5021631ab33bdf8790645d78af184e2759c2 --- M CirrusSearch.body.php 1 file changed, 2 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/CirrusSearch refs/changes/13/78813/1 diff --git a/CirrusSearch.body.php b/CirrusSearch.body.php index f15b497..adc2303 100644 --- a/CirrusSearch.body.php +++ b/CirrusSearch.body.php @@ -411,7 +411,7 @@ } /** - * A set of results for Solr + * A set of results from Elasticsearch. */ class CirrusSearchResultSet extends SearchResultSet { private $result, $docs, $hits, $totalHits, $suggestionQuery, $suggestionSnippet; @@ -480,7 +480,7 @@ } /** - * An individual search result for Solr + * An individual search result from Elasticsearch. */ class CirrusSearchResult extends SearchResult { private $titleSnippet, $redirectTitle, $redirectSnipppet, $textSnippet; -- To view, visit https://gerrit.wikimedia.org/r/78813 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Id4ab5021631ab33bdf8790645d78af184e2759c2 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] Turn on the fast-vector-highlighter. - change (mediawiki...CirrusSearch)
Manybubbles has uploaded a new change for review. https://gerrit.wikimedia.org/r/78814 Change subject: Turn on the fast-vector-highlighter. .. Turn on the fast-vector-highlighter. So turning on the fast-vector-highlighter should fix two problems: 1. If the text of an article is large sometimes the best highlight isn't show. 2. Sometimes the summary of an article is huge (Bug 52680.) This should also speed up highlighting, especially for large articles. The fast-vector-highlighter is engaged by storing term vectors with positions and offsets which is what this commit actually does. Change-Id: Ic92bf03af9f2c1851f21c2adad94d7d463ab57b5 --- M CirrusSearchMappingConfigBuilder.php 1 file changed, 9 insertions(+), 4 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/CirrusSearch refs/changes/14/78814/1 diff --git a/CirrusSearchMappingConfigBuilder.php b/CirrusSearchMappingConfigBuilder.php index af1862a..68d7772 100644 --- a/CirrusSearchMappingConfigBuilder.php +++ b/CirrusSearchMappingConfigBuilder.php @@ -31,12 +31,12 @@ // Note never to set something as type='object' here because that isn't returned by elasticsearch // and is infered anyway. return array( - 'title' = $this-buildStringField( 'title', array( 'suggest', 'prefix' ) ), - 'text' = $this-buildStringField( 'text', array( 'suggest' ) ), + 'title' = $this-buildStringField( 'title', array( 'suggest', 'prefix' ), true ), + 'text' = $this-buildStringField( 'text', array( 'suggest' ), true ), 'category' = $this-buildStringField(), 'redirect' = array( 'properties' = array( - 'title' = $this-buildStringField() + 'title' = $this-buildStringField( 'title', null, true ) ) ) ); @@ -47,10 +47,15 @@ * @param name string Name of the field. Required if extra is not falsy. * @param extra array Extra analyzers for this field beyond the basic string type. If not falsy the * field will be a multi_field. +* @param willHighlight Will this field be highlighted? Defaults to false. * @return array definition of the field */ - private function buildStringField( $name = null, $extra = null ) { + private function buildStringField( $name = null, $extra = null, $willHighlight = false ) { $field = array( 'type' = 'string', 'analyzer' = 'text' ); + if ( $willHighlight ) { + $field[ 'store' ] = true; + $field[ 'term_vector' ] = 'with_positions_offsets'; + } if ( !$extra ) { return $field; } -- To view, visit https://gerrit.wikimedia.org/r/78814 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ic92bf03af9f2c1851f21c2adad94d7d463ab57b5 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] Follow-up I49b7d8a - Add api module for common metadata - change (mediawiki/core)
Brian Wolff has uploaded a new change for review. https://gerrit.wikimedia.org/r/78815 Change subject: Follow-up I49b7d8a - Add api module for common metadata .. Follow-up I49b7d8a - Add api module for common metadata Change-Id: I0d957891e0778ba0454f6fecb06524211506f6b9 --- M includes/api/ApiQueryImageInfo.php 1 file changed, 21 insertions(+), 15 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/15/78815/1 diff --git a/includes/api/ApiQueryImageInfo.php b/includes/api/ApiQueryImageInfo.php index fedf860..974a2e5 100644 --- a/includes/api/ApiQueryImageInfo.php +++ b/includes/api/ApiQueryImageInfo.php @@ -354,6 +354,7 @@ $url = isset( $prop['url'] ); $sha1 = isset( $prop['sha1'] ); $meta = isset( $prop['metadata'] ); + $commonmeta = isset( $prop['commonmetadata'] ); $mime = isset( $prop['mime'] ); $mediatype = isset( $prop['mediatype'] ); $archive = isset( $prop['archivename'] ); @@ -409,6 +410,10 @@ $metadata = $file-convertMetadataVersion( $metadata, $version ); } $vals['metadata'] = $metadata ? self::processMetaData( $metadata, $result ) : null; + } + if ( $commonmeta ) { + $metaArray = $file-getCommonMetaArray(); + $vals['commonmetadata'] = $metaArray ? self::processMetaData( $metaArray, $result ) : array(); } if ( $mime ) { @@ -540,22 +545,23 @@ */ private static function getProperties( $modulePrefix = '' ) { return array( - 'timestamp' = ' timestamp - Adds timestamp for the uploaded version', - 'user' = ' user - Adds the user who uploaded the image version', - 'userid' = ' userid- Add the user ID that uploaded the image version', - 'comment' =' comment - Comment on the version', - 'parsedcomment' = ' parsedcomment - Parse the comment on the version', - 'url' =' url - Gives URL to the image and the description page', - 'size' = ' size - Adds the size of the image in bytes and the height, width and page count (if applicable)', - 'dimensions' = ' dimensions- Alias for size', // For backwards compatibility with Allimages - 'sha1' = ' sha1 - Adds SHA-1 hash for the image', - 'mime' = ' mime - Adds MIME type of the image', - 'thumbmime' = ' thumbmime - Adds MIME type of the image thumbnail' . + 'timestamp' = ' timestamp - Adds timestamp for the uploaded version', + 'user' = ' user - Adds the user who uploaded the image version', + 'userid' = ' userid - Add the user ID that uploaded the image version', + 'comment' =' comment- Comment on the version', + 'parsedcomment' = ' parsedcomment - Parse the comment on the version', + 'url' =' url- Gives URL to the image and the description page', + 'size' = ' size - Adds the size of the image in bytes and the height, width and page count (if applicable)', + 'dimensions' = ' dimensions - Alias for size', // For backwards compatibility with Allimages + 'sha1' = ' sha1 - Adds SHA-1 hash for the image', + 'mime' = ' mime - Adds MIME type of the image', + 'thumbmime' = ' thumbmime - Adds MIME type of the image thumbnail' . ' (requires url and param ' . $modulePrefix . 'urlwidth)', - 'mediatype' = ' mediatype - Adds the media type of the image', - 'metadata' = ' metadata - Lists Exif metadata for the version of the image', - 'archivename' =' archivename - Adds the file name of the archive version for non-latest versions', - 'bitdepth' = ' bitdepth - Adds the bit depth of the version', + 'mediatype' = ' mediatype - Adds the media type of the image', + 'metadata' = ' metadata - Lists file metadata (like Exif) for the version of the image', + 'commonmetadata' = ' commonmetadata -
[MediaWiki-commits] [Gerrit] Adding custom Zookeeper chroot support. - change (operations...kafka)
Ottomata has uploaded a new change for review. https://gerrit.wikimedia.org/r/78816 Change subject: Adding custom Zookeeper chroot support. .. Adding custom Zookeeper chroot support. Change-Id: Ia3e34bfa7f836b2f7add5e9259bd4b5ac397df8b --- M README.md M manifests/defaults.pp M manifests/init.pp M manifests/server.pp M templates/consumer.properties.erb M templates/server.properties.erb 6 files changed, 63 insertions(+), 12 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet/kafka refs/changes/16/78816/1 diff --git a/README.md b/README.md index 5c1e35e..8db661d 100644 --- a/README.md +++ b/README.md @@ -5,6 +5,8 @@ - [Usage](#usage) - [Kafka (Clients)](#kafka) - [Kafka Broker Servers](#kafka-broker-server) +- [Custom Zookeeper Chroot](#custom-zookeeper-chroot) + # Kafka Puppet Module @@ -31,11 +33,11 @@ ```puppet # Install the kafka package and configure kafka. class { 'kafka': - hosts = { -'kafka-node01.domain.org' = { 'id' = 1, 'port' = 12345 }, -'kafka-node02.domain.org' = { 'id' = 2 }, - }, - zookeeper_hosts = ['zk-node01:2181', 'zk-node02:2181', 'zk-node03:2181'], +hosts = { +'kafka-node01.domain.org' = { 'id' = 1, 'port' = 12345 }, +'kafka-node02.domain.org' = { 'id' = 2 }, +}, +zookeeper_hosts = ['zk-node01:2181', 'zk-node02:2181', 'zk-node03:2181'], } ``` @@ -51,11 +53,11 @@ ```puppet # kafka::server requires the main kafka class. class { 'kafka': - hosts = { -'kafka-node01.domain.org' = { 'id' = 1, 'port' = 12345 }, -'kafka-node02.domain.org' = { 'id' = 2 }, - }, - zookeeper_hosts = ['zk-node01:2181', 'zk-node02:2181', 'zk-node03:2181'], +hosts = { +'kafka-node01.domain.org' = { 'id' = 1, 'port' = 12345 }, +'kafka-node02.domain.org' = { 'id' = 2 }, +}, +zookeeper_hosts = ['zk-node01:2181', 'zk-node02:2181', 'zk-node03:2181'], } # Include Kafka Broker Server. @@ -65,3 +67,43 @@ Each Kafka Broker Server's ```broker_id``` and ```port``` properties in server.properties will be set based by looking up the node's ```$::fqdn``` in the hosts Hash passed into the ```kafka``` base class. + +## Custom Zookeeper Chroot + +If Kafka will share a Zookeeper cluster with other users, you might want to +create a znode in zookeeper in which to store your Kafka cluster's data. +You can set the ```zookeeper_chroot``` parameter on the ```kafka``` class to do this. + +First, you'll need to create the znode manually yourself. You can use +```zkCli.sh``` that ships with Zookeeper, or you can use the kafka built in +```zookeeper-shell```: + +```bash +$ kafka zookeeper-shell zookeeper_host:2182 +Connecting to kraken-zookeeper +Welcome to ZooKeeper! +JLine support is enabled + +WATCHER:: + +WatchedEvent state:SyncConnected type:None path:null +[zk: kraken-zookeeper(CONNECTED) 0] create /my_kafka kafka +Created /my_kafka +``` + +You can use whatever chroot znode path you like. The second argument +(```data```) is arbitrary. I used 'kafka' here. + +Then: +```puppet +class { 'kafka': +hosts = { +'kafka-node01.domain.org' = { 'id' = 1, 'port' = 12345 }, +'kafka-node02.domain.org' = { 'id' = 2 }, +}, +zookeeper_hosts = ['zk-node01:2181', 'zk-node02:2181', 'zk-node03:2181'], +# set zookeeper_chroot on the kafka class. +zookeeper_chroot = '/my_kafka', +} +``` + diff --git a/manifests/defaults.pp b/manifests/defaults.pp index 10d23d8..41c13e0 100644 --- a/manifests/defaults.pp +++ b/manifests/defaults.pp @@ -17,6 +17,7 @@ $zookeeper_hosts = ['localhost:2181'] $zookeeper_connection_timeout_ms = 100 +$zookeeper_chroot= undef $kafka_log_file = '/var/log/kafka/kafka.log' $producer_type = 'async' diff --git a/manifests/init.pp b/manifests/init.pp index 6ac8ccd..9c63b70 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -16,6 +16,12 @@ # $zookeeper_connection_timeout_ms - Timeout in ms for connecting to zookeeper. # Default: 100 # +# $zookeeper_chroot - Path in zookeeper in which to keep Kafka data. +# Default: /, the root path. This module will +# Not create this znode for you, you must do so +# manually yourself. See the README for instructions +# on how to do so. +# # $kafka_log_file - File in which to store Kafka logs # (not event data). Default: /var/log/kafka/kafka.log # @@ -38,6 +44,7 @@ $zookeeper_hosts = $kafka::defaults::zookeeper_hosts, $zookeeper_connection_timeout_ms = $kafka::defaults::zookeeper_connection_timeout_ms, +$zookeeper_chroot=
[MediaWiki-commits] [Gerrit] Adding custom Zookeeper chroot support. - change (operations...kafka)
Ottomata has submitted this change and it was merged. Change subject: Adding custom Zookeeper chroot support. .. Adding custom Zookeeper chroot support. Change-Id: Ia3e34bfa7f836b2f7add5e9259bd4b5ac397df8b --- M README.md M manifests/defaults.pp M manifests/init.pp M manifests/server.pp M templates/consumer.properties.erb M templates/server.properties.erb 6 files changed, 63 insertions(+), 12 deletions(-) Approvals: Ottomata: Verified; Looks good to me, approved jenkins-bot: Verified diff --git a/README.md b/README.md index 5c1e35e..8db661d 100644 --- a/README.md +++ b/README.md @@ -5,6 +5,8 @@ - [Usage](#usage) - [Kafka (Clients)](#kafka) - [Kafka Broker Servers](#kafka-broker-server) +- [Custom Zookeeper Chroot](#custom-zookeeper-chroot) + # Kafka Puppet Module @@ -31,11 +33,11 @@ ```puppet # Install the kafka package and configure kafka. class { 'kafka': - hosts = { -'kafka-node01.domain.org' = { 'id' = 1, 'port' = 12345 }, -'kafka-node02.domain.org' = { 'id' = 2 }, - }, - zookeeper_hosts = ['zk-node01:2181', 'zk-node02:2181', 'zk-node03:2181'], +hosts = { +'kafka-node01.domain.org' = { 'id' = 1, 'port' = 12345 }, +'kafka-node02.domain.org' = { 'id' = 2 }, +}, +zookeeper_hosts = ['zk-node01:2181', 'zk-node02:2181', 'zk-node03:2181'], } ``` @@ -51,11 +53,11 @@ ```puppet # kafka::server requires the main kafka class. class { 'kafka': - hosts = { -'kafka-node01.domain.org' = { 'id' = 1, 'port' = 12345 }, -'kafka-node02.domain.org' = { 'id' = 2 }, - }, - zookeeper_hosts = ['zk-node01:2181', 'zk-node02:2181', 'zk-node03:2181'], +hosts = { +'kafka-node01.domain.org' = { 'id' = 1, 'port' = 12345 }, +'kafka-node02.domain.org' = { 'id' = 2 }, +}, +zookeeper_hosts = ['zk-node01:2181', 'zk-node02:2181', 'zk-node03:2181'], } # Include Kafka Broker Server. @@ -65,3 +67,43 @@ Each Kafka Broker Server's ```broker_id``` and ```port``` properties in server.properties will be set based by looking up the node's ```$::fqdn``` in the hosts Hash passed into the ```kafka``` base class. + +## Custom Zookeeper Chroot + +If Kafka will share a Zookeeper cluster with other users, you might want to +create a znode in zookeeper in which to store your Kafka cluster's data. +You can set the ```zookeeper_chroot``` parameter on the ```kafka``` class to do this. + +First, you'll need to create the znode manually yourself. You can use +```zkCli.sh``` that ships with Zookeeper, or you can use the kafka built in +```zookeeper-shell```: + +```bash +$ kafka zookeeper-shell zookeeper_host:2182 +Connecting to kraken-zookeeper +Welcome to ZooKeeper! +JLine support is enabled + +WATCHER:: + +WatchedEvent state:SyncConnected type:None path:null +[zk: kraken-zookeeper(CONNECTED) 0] create /my_kafka kafka +Created /my_kafka +``` + +You can use whatever chroot znode path you like. The second argument +(```data```) is arbitrary. I used 'kafka' here. + +Then: +```puppet +class { 'kafka': +hosts = { +'kafka-node01.domain.org' = { 'id' = 1, 'port' = 12345 }, +'kafka-node02.domain.org' = { 'id' = 2 }, +}, +zookeeper_hosts = ['zk-node01:2181', 'zk-node02:2181', 'zk-node03:2181'], +# set zookeeper_chroot on the kafka class. +zookeeper_chroot = '/my_kafka', +} +``` + diff --git a/manifests/defaults.pp b/manifests/defaults.pp index 10d23d8..41c13e0 100644 --- a/manifests/defaults.pp +++ b/manifests/defaults.pp @@ -17,6 +17,7 @@ $zookeeper_hosts = ['localhost:2181'] $zookeeper_connection_timeout_ms = 100 +$zookeeper_chroot= undef $kafka_log_file = '/var/log/kafka/kafka.log' $producer_type = 'async' diff --git a/manifests/init.pp b/manifests/init.pp index 6ac8ccd..9c63b70 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -16,6 +16,12 @@ # $zookeeper_connection_timeout_ms - Timeout in ms for connecting to zookeeper. # Default: 100 # +# $zookeeper_chroot - Path in zookeeper in which to keep Kafka data. +# Default: /, the root path. This module will +# Not create this znode for you, you must do so +# manually yourself. See the README for instructions +# on how to do so. +# # $kafka_log_file - File in which to store Kafka logs # (not event data). Default: /var/log/kafka/kafka.log # @@ -38,6 +44,7 @@ $zookeeper_hosts = $kafka::defaults::zookeeper_hosts, $zookeeper_connection_timeout_ms = $kafka::defaults::zookeeper_connection_timeout_ms, +$zookeeper_chroot= $kafka::defaults::zookeeper_chroot, $kafka_log_file
[MediaWiki-commits] [Gerrit] - remove undocumented and obsolete -dry option which is done... - change (pywikibot/compat)
Xqt has uploaded a new change for review. https://gerrit.wikimedia.org/r/78817 Change subject: - remove undocumented and obsolete -dry option which is done by global option -simulate - replace Page.site() with Page.site like in core - some pep8 changes .. - remove undocumented and obsolete -dry option which is done by global option -simulate - replace Page.site() with Page.site like in core - some pep8 changes Change-Id: I58deaf2d1cd86f77c01e63080ccdd9255b42fbea --- M featured.py 1 file changed, 17 insertions(+), 18 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/pywikibot/compat refs/changes/17/78817/1 diff --git a/featured.py b/featured.py index 277ad7b..eb7f37e 100644 --- a/featured.py +++ b/featured.py @@ -346,7 +346,7 @@ articles.append(p) # Article talk (like in English) elif p.namespace() == 1 and site.lang != 'el': -articles.append(pywikibot.Page(p.site(), +articles.append(pywikibot.Page(p.site, p.title(withNamespace=False))) pywikibot.output( '\03{lightred}** wikipedia:%s has %i %s articles\03{default}' @@ -371,6 +371,7 @@ if p.site() == oursite: ourpage = p break + if not ourpage: if not quiet: pywikibot.output(u%s - no corresponding page in %s @@ -410,6 +411,7 @@ if p.site() == page.site(): backpage = p break + if not backpage: pywikibot.output(u%s - no back interwiki ref % page.title()) return @@ -448,8 +450,7 @@ return templates -def featuredWithInterwiki(fromsite, tosite, template_on_top, pType, quiet, - dry=False): +def featuredWithInterwiki(fromsite, tosite, template_on_top, pType, quiet): if not fromsite.lang in cache: cache[fromsite.lang] = {} if not tosite.lang in cache[fromsite.lang]: @@ -474,7 +475,8 @@ continue if a.title() in cc: -pywikibot.output(u(cached) %s - %s % (a.title(), cc[a.title()])) +pywikibot.output(u(cached) %s - %s + % (a.title(), cc[a.title()])) continue if a.isRedirectPage(): @@ -520,12 +522,11 @@ (u {{%s|%s}} % (templatelist[0], fromsite.lang)) + text[m.end():]) -if not dry: -try: -atrans.put(text, comment) -except pywikibot.LockedPage: -pywikibot.output(u'Page %s is locked!' - % atrans.title()) +try: +atrans.put(text, comment) +except pywikibot.LockedPage: +pywikibot.output(u'Page %s is locked!' + % atrans.title()) cc[a.title()] = atrans.title() else: if atrans: @@ -542,12 +543,11 @@ i18n.twtranslate(site, 'featured-former', {'page': unicode(a)})) text = re.sub(re_Link_FA, '', text) -if not dry: -try: -atrans.put(text, comment) -except pywikibot.LockedPage: -pywikibot.output(u'Page %s is locked!' - % atrans.title()) +try: +atrans.put(text, comment) +except pywikibot.LockedPage: +pywikibot.output(u'Page %s is locked!' + % atrans.title()) else: pywikibot.output(u(already done)) cc[a.title()] = atrans.title() @@ -665,8 +665,7 @@ break elif fromsite != pywikibot.getSite(): featuredWithInterwiki(fromsite, pywikibot.getSite(), - template_on_top, processType, quiet, - pywikibot.simulate) + template_on_top, processType, quiet) except KeyboardInterrupt: pywikibot.output('\nQuitting program...') finally: -- To view, visit https://gerrit.wikimedia.org/r/78817 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I58deaf2d1cd86f77c01e63080ccdd9255b42fbea Gerrit-PatchSet: 1
[MediaWiki-commits] [Gerrit] Remove unclear existing from antispoof-conflict-top - change (mediawiki...AntiSpoof)
jenkins-bot has submitted this change and it was merged. Change subject: Remove unclear existing from antispoof-conflict-top .. Remove unclear existing from antispoof-conflict-top The account may exist only globally. It does not matter why the name is reserved, the need to choose a different username is not hard to understand and is the only point. Bug: 43377 Change-Id: I698b3ca93f53cff2d662fa9832f571b2c22dd850 --- M AntiSpoof.i18n.php 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Matmarex: Looks good to me, approved jenkins-bot: Verified diff --git a/AntiSpoof.i18n.php b/AntiSpoof.i18n.php index d04ff8b..0ec3f9b 100644 --- a/AntiSpoof.i18n.php +++ b/AntiSpoof.i18n.php @@ -10,7 +10,7 @@ $messages['en'] = array( 'antispoof-desc' = 'Blocks the creation of accounts with mixed-script, confusing and similar usernames', - 'antispoof-conflict-top' = 'The name $1 is too similar to {{PLURAL:$2|the existing account|the following $2 accounts}}:', + 'antispoof-conflict-top' = 'The name $1 is too similar to the following {{PLURAL:$2|username|usernames}}:', 'antispoof-conflict-item' = '$1', # do not translate or duplicate this message to other languages 'antispoof-conflict-bottom' = 'Please choose another name.', 'antispoof-name-illegal' = 'The name $1 is not allowed to prevent confusing or spoofed usernames: $2. -- To view, visit https://gerrit.wikimedia.org/r/78651 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I698b3ca93f53cff2d662fa9832f571b2c22dd850 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/AntiSpoof Gerrit-Branch: master Gerrit-Owner: Nemo bis federicol...@tiscali.it Gerrit-Reviewer: Brian Wolff bawolff...@gmail.com Gerrit-Reviewer: Matmarex matma@gmail.com Gerrit-Reviewer: Siebrand siebr...@wikimedia.org Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] New wikis added for wiipedia/wikivoyage - change (analytics/wikistats)
Erik Zachte has uploaded a new change for review. https://gerrit.wikimedia.org/r/78818 Change subject: New wikis added for wiipedia/wikivoyage .. New wikis added for wiipedia/wikivoyage Change-Id: I69d37bbc96c068d2c81981b949d5d56dfab5e6e2 --- M dumps/dblists/master copy/wikipedia.dblist M dumps/dblists/master copy/wikivoyage.dblist 2 files changed, 2 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/analytics/wikistats refs/changes/18/78818/1 diff --git a/dumps/dblists/master copy/wikipedia.dblist b/dumps/dblists/master copy/wikipedia.dblist index 44e05eb..5c5c9a3 100644 --- a/dumps/dblists/master copy/wikipedia.dblist +++ b/dumps/dblists/master copy/wikipedia.dblist @@ -1,3 +1,4 @@ +tyvwiki kjwiki mhwiki ngwiki diff --git a/dumps/dblists/master copy/wikivoyage.dblist b/dumps/dblists/master copy/wikivoyage.dblist index 5dd787b..fd7afb7 100644 --- a/dumps/dblists/master copy/wikivoyage.dblist +++ b/dumps/dblists/master copy/wikivoyage.dblist @@ -12,3 +12,4 @@ plwikivoyage hewikivoyage ukwikivoyage +viwikivoyage -- To view, visit https://gerrit.wikimedia.org/r/78818 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I69d37bbc96c068d2c81981b949d5d56dfab5e6e2 Gerrit-PatchSet: 1 Gerrit-Project: analytics/wikistats Gerrit-Branch: master Gerrit-Owner: Erik Zachte ezac...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] New wikis added for wiipedia/wikivoyage - change (analytics/wikistats)
Erik Zachte has submitted this change and it was merged. Change subject: New wikis added for wiipedia/wikivoyage .. New wikis added for wiipedia/wikivoyage Change-Id: I69d37bbc96c068d2c81981b949d5d56dfab5e6e2 --- M dumps/dblists/master copy/wikipedia.dblist M dumps/dblists/master copy/wikivoyage.dblist 2 files changed, 2 insertions(+), 0 deletions(-) Approvals: Erik Zachte: Verified; Looks good to me, approved jenkins-bot: Verified diff --git a/dumps/dblists/master copy/wikipedia.dblist b/dumps/dblists/master copy/wikipedia.dblist index 44e05eb..5c5c9a3 100644 --- a/dumps/dblists/master copy/wikipedia.dblist +++ b/dumps/dblists/master copy/wikipedia.dblist @@ -1,3 +1,4 @@ +tyvwiki kjwiki mhwiki ngwiki diff --git a/dumps/dblists/master copy/wikivoyage.dblist b/dumps/dblists/master copy/wikivoyage.dblist index 5dd787b..fd7afb7 100644 --- a/dumps/dblists/master copy/wikivoyage.dblist +++ b/dumps/dblists/master copy/wikivoyage.dblist @@ -12,3 +12,4 @@ plwikivoyage hewikivoyage ukwikivoyage +viwikivoyage -- To view, visit https://gerrit.wikimedia.org/r/78818 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I69d37bbc96c068d2c81981b949d5d56dfab5e6e2 Gerrit-PatchSet: 1 Gerrit-Project: analytics/wikistats Gerrit-Branch: master Gerrit-Owner: Erik Zachte ezac...@wikimedia.org Gerrit-Reviewer: Erik Zachte ezac...@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] reenable otrs GenericAgent.pm - change (operations/puppet)
Jgreen has uploaded a new change for review. https://gerrit.wikimedia.org/r/78819 Change subject: reenable otrs GenericAgent.pm .. reenable otrs GenericAgent.pm Change-Id: Ibfb24b5a90ecb7cd2556d653e4975d08a478ecb7 --- M files/otrs/crontab.otrs 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/19/78819/1 diff --git a/files/otrs/crontab.otrs b/files/otrs/crontab.otrs index 072788f..9038f45 100644 --- a/files/otrs/crontab.otrs +++ b/files/otrs/crontab.otrs @@ -7,7 +7,7 @@ 30 0 * * 0 otrs /opt/otrs/bin/otrs.LoaderCache.pl -o delete /dev/null # start generic agent -#*/20 * * * * otrs /opt/otrs/bin/otrs.GenericAgent.pl /dev/null +*/20 * * * * otrs /opt/otrs/bin/otrs.GenericAgent.pl /dev/null # check for pending jobs 45 */2 * * * otrs /opt/otrs/bin/otrs.PendingJobs.pl /dev/null -- To view, visit https://gerrit.wikimedia.org/r/78819 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ibfb24b5a90ecb7cd2556d653e4975d08a478ecb7 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Jgreen jgr...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Simplify moodbar-action-item - change (mediawiki...MoodBar)
jenkins-bot has submitted this change and it was merged. Change subject: Simplify moodbar-action-item .. Simplify moodbar-action-item No reason provided for exposing this level of jargon about the entity, more programming in nature rather than about what the user sees. Bug: 42885 Change-Id: I3713aa9773fad9d0513d90b2d6ced38a17e10553 --- M MoodBar.i18n.php 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Matmarex: Looks good to me, approved jenkins-bot: Verified diff --git a/MoodBar.i18n.php b/MoodBar.i18n.php index 8ba8eca..6c65964 100644 --- a/MoodBar.i18n.php +++ b/MoodBar.i18n.php @@ -141,7 +141,7 @@ 'moodbar-hidden-footer' = 'Hidden feedback by $1 on $2 $3, reason: $4 $5', 'moodbar-hidden-footer-without-log' = 'Hidden feedback $1', 'moodbar-feedback-restore' = 'restore hidden feedback', - 'moodbar-action-item' = 'Feedback item:', + 'moodbar-action-item' = 'Feedback:', 'moodbar-action-reason' = 'Reason:', 'moodbar-action-reason-required' = 'Please provide a reason.', 'moodbar-hide-header' = 'Hide this item from view', -- To view, visit https://gerrit.wikimedia.org/r/78645 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I3713aa9773fad9d0513d90b2d6ced38a17e10553 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/MoodBar Gerrit-Branch: master Gerrit-Owner: Nemo bis federicol...@tiscali.it Gerrit-Reviewer: Kaldari rkald...@wikimedia.org Gerrit-Reviewer: Matmarex matma@gmail.com Gerrit-Reviewer: Nischayn22 nischay...@gmail.com Gerrit-Reviewer: Siebrand siebr...@wikimedia.org Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Deleting deleted pages - change (operations...incremental)
Petr Onderka has submitted this change and it was merged. Change subject: Deleting deleted pages .. Deleting deleted pages Change-Id: I5f0e8bb6d8517f197efee515a91d49a5d2e784d7 --- M CollectionHelpers.h M Dump.cpp M Dump.h M DumpObjects/DumpPage.cpp M DumpObjects/DumpPage.h M DumpObjects/DumpRevision.cpp M DumpObjects/DumpRevision.h M DumpWriters/ArticlesWriterWrapper.cpp M DumpWriters/ArticlesWriterWrapper.h M DumpWriters/CompositeWriter.cpp M DumpWriters/CompositeWriter.h M DumpWriters/CurrentWriterWrapper.cpp M DumpWriters/DumpWriter.cpp M DumpWriters/DumpWriter.h M DumpWriters/IDumpWriter.h M DumpWriters/WriterWrapper.cpp M DumpWriters/WriterWrapper.h M Objects/Page.cpp M Objects/Page.h M XmlWriter.cpp M libexecstream/win/exec-stream-helpers.cpp M main.cpp 22 files changed, 200 insertions(+), 135 deletions(-) Approvals: Petr Onderka: Verified; Looks good to me, approved diff --git a/CollectionHelpers.h b/CollectionHelpers.h index 7102002..a69f63f 100644 --- a/CollectionHelpers.h +++ b/CollectionHelpers.h @@ -1,3 +1,8 @@ +#pragma once + +#include vector +#include unordered_set + //http://stackoverflow.com/a/2330559/41071 template typename T T insert_at(T pContainer, size_t pIndex, const typename T::value_type pValue) @@ -13,4 +18,15 @@ pContainer.insert(pContainer.begin() + pIndex, std::move(pValue)); return pContainer; +} + +template typename T +std::unordered_setT except(std::vectorT container1, std::vectorT container2) +{ +std::unordered_setT set(container1.begin(), container1.end()); + +for (auto item : container2) +set.erase(item); + +return set; } \ No newline at end of file diff --git a/Dump.cpp b/Dump.cpp index b6f2571..58a3c33 100644 --- a/Dump.cpp +++ b/Dump.cpp @@ -5,6 +5,7 @@ #include Indexes/Index.h #include SpaceManager.h #include DumpObjects/DumpRevision.h +#include DumpObjects/DumpPage.h using std::move; using std::unique_ptr; @@ -88,11 +89,26 @@ modelFormatIndex-Write(); } -void WritableDump::DeleteRevision(uint32_t revisionId) +void WritableDump::DeletePage(std::uint32_t pageId) +{ +Offset offset = pageIdIndex-Get(pageId); +DumpPage page(self, pageId); +std::uint32_t length = page.NewLength(); + +for (auto revisionId : page.page.RevisionIds) +{ +DeleteRevision(revisionId); +} + +pageIdIndex-Remove(pageId); +spaceManager-Delete(offset.value, length); +} + +void WritableDump::DeleteRevision(std::uint32_t revisionId) { Offset offset = revisionIdIndex-Get(revisionId); -DumpRevision revision(self, true); -uint32_t length = revision.NewLength(); +DumpRevision revision(self, revisionId, false); +std::uint32_t length = revision.NewLength(); revisionIdIndex-Remove(revisionId); spaceManager-Delete(offset.value, length); diff --git a/Dump.h b/Dump.h index e176f44..ca5d8fa 100644 --- a/Dump.h +++ b/Dump.h @@ -61,7 +61,9 @@ // it's necessary to call this after writing is finished void WriteIndexes(); -void DeleteRevision(uint32_t revisionId); +// also recursively deletes revisions of the given page +void DeletePage(std::uint32_t pageId); +void DeleteRevision(std::uint32_t revisionId); std::uint8_t GetIdForModelFormat(std::string model, std::string format); std::pairstd::string, std::string GetModelFormat(std::uint8_t id); diff --git a/DumpObjects/DumpPage.cpp b/DumpObjects/DumpPage.cpp index 609fdef..6a3693d 100644 --- a/DumpObjects/DumpPage.cpp +++ b/DumpObjects/DumpPage.cpp @@ -9,12 +9,17 @@ if (pageOffset.value == 0) { page = Page(); +wasLoaded = false; + savedOffset = 0; savedLength = 0; } else { page = Read(dumpRef, pageOffset); +originalPage = page; +wasLoaded = true; + savedOffset = pageOffset.value; savedLength = NewLength(); } @@ -40,6 +45,14 @@ return page; } +void DumpPage::Write() +{ +if (wasLoaded originalPage == page) +return; + +DumpObject::Write(); +} + void DumpPage::WriteInternal() { WriteValue((uint8_t)DumpObjectKind::Page); diff --git a/DumpObjects/DumpPage.h b/DumpObjects/DumpPage.h index 7be9c09..0efe483 100644 --- a/DumpObjects/DumpPage.h +++ b/DumpObjects/DumpPage.h @@ -9,6 +9,9 @@ class DumpPage : public DumpObject { private: +Page originalPage; +bool wasLoaded; + void Load(uint32_t pageId); static Page Read(shared_ptrWritableDump dump, Offset offset); protected: @@ -20,5 +23,6 @@ DumpPage(weak_ptrWritableDump dump, uint32_t pageId); DumpPage(weak_ptrWritableDump dump, Offset offset); -virtual uint32_t NewLength() override; +virtual void Write() override; +virtual std::uint32_t NewLength() override; }; \ No newline at end of file diff --git a/DumpObjects/DumpRevision.cpp b/DumpObjects/DumpRevision.cpp index 255da96..3a28e99 100644 ---
[MediaWiki-commits] [Gerrit] Removed code that went dead after changes in commit 171e1596 - change (mediawiki...Parsoid)
jenkins-bot has submitted this change and it was merged. Change subject: Removed code that went dead after changes in commit 171e1596 .. Removed code that went dead after changes in commit 171e1596 * PreHandler FSM changed in the above commit which killed some of the checks and code there. I should have recognized that and cleaned up back then .. but better late than never. Change-Id: I1fbd820db1a6b1e079d255bd13b4970865128dcf --- M js/lib/ext.core.PreHandler.js 1 file changed, 5 insertions(+), 25 deletions(-) Approvals: Cscott: Looks good to me, approved jenkins-bot: Verified diff --git a/js/lib/ext.core.PreHandler.js b/js/lib/ext.core.PreHandler.js index e158488..72e2296 100644 --- a/js/lib/ext.core.PreHandler.js +++ b/js/lib/ext.core.PreHandler.js @@ -32,10 +32,9 @@ | SOL | --- sol-tr -- | SOL | TOKS tok | | SOL | --- other -- | IGNORE| purge| + --+-+---+--+ - | PRE | --- nl -- | SOL | purge if |TOKS| == 0 | - | | | | gen-pre if |TOKS| 0 (#)| - | PRE | html-blk tag | IGNORE| purge if |TOKS| == 0 | - | | wt-table tag | | gen-pre if |TOKS| 0 (#)| + | PRE | --- nl -- | SOL | purge| + | PRE | html-blk tag | IGNORE| purge| + | | wt-table tag | | | | PRE | --- eof -- | SOL | purge| | PRE | --- sol-tr -- | PRE | SOL-TR-TOKS tok | | PRE | --- other -- | PRE_COLLECT | TOKS = SOL-TR-TOKS + tok | @@ -55,13 +54,6 @@ | IGNORE| --- nl -- | SOL | purge| | IGNORE| --- eof -- | SOL | purge| + --+-+---+--+ - - # In PRE-state, |TOKS| 0 only if we got here from MULTILINE_PRE. In addition, - we are guaranteed that they will not all be whitespace/sol-transparent tokens - since the transition path would have been: - SOL - PRE - PRE_COLLECT - MULTILINE_PRE - PRE - and the transition from PRE - PRE_COLLECT adds a non-ws/non-sol-tr token - to TOKS. ## In these states, check if the whitespace token is a single space or has additional chars (white-space or non-whitespace) -- if yes, slice it off @@ -227,13 +219,7 @@ break; case PreHandler.STATE_PRE: - if (this.tokens.length 0) { - // we got here from a multiline-pre - ret = this.processPre(token); - } else { - // we will never get here from a multiline-pre - ret = this.getResultAndReset(token); - } + ret = this.getResultAndReset(token); this.preTSR = initPreTSR(token); this.state = PreHandler.STATE_SOL; break; @@ -350,13 +336,7 @@ } else if (Util.isTableTag(token) || (token.isHTMLTag() Util.isBlockTag(token.name))) { - if (this.tokens.length 0) { - // we got here from a multiline-pre - ret = this.processPre(token); - } else { - // we can never get here from a multiline-pre - ret = this.getResultAndReset(token); - } + ret = this.getResultAndReset(token); this.moveToIgnoreState(); } else { this.tokens = this.tokens.concat(this.solTransparentTokens); -- To view, visit https://gerrit.wikimedia.org/r/78618 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I1fbd820db1a6b1e079d255bd13b4970865128dcf Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Parsoid Gerrit-Branch: master Gerrit-Owner: Subramanya Sastry ssas...@wikimedia.org Gerrit-Reviewer: Cscott canan...@wikimedia.org Gerrit-Reviewer: GWicke gwi...@wikimedia.org Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org
[MediaWiki-commits] [Gerrit] stupid jenkins-bot. - change (operations/puppet)
Jgreen has uploaded a new change for review. https://gerrit.wikimedia.org/r/78820 Change subject: stupid jenkins-bot. .. stupid jenkins-bot. Change-Id: Icd64de8470e1a8dc7e66047c6694e19fcb46d46f --- M files/otrs/crontab.otrs 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/20/78820/1 diff --git a/files/otrs/crontab.otrs b/files/otrs/crontab.otrs index 9038f45..3e4ecf4 100644 --- a/files/otrs/crontab.otrs +++ b/files/otrs/crontab.otrs @@ -6,7 +6,7 @@ 20 0 * * 0 otrs /opt/otrs/bin/otrs.DeleteCache.pl --expired /dev/null 30 0 * * 0 otrs /opt/otrs/bin/otrs.LoaderCache.pl -o delete /dev/null -# start generic agent +# start generic agent */20 * * * * otrs /opt/otrs/bin/otrs.GenericAgent.pl /dev/null # check for pending jobs -- To view, visit https://gerrit.wikimedia.org/r/78820 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Icd64de8470e1a8dc7e66047c6694e19fcb46d46f Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Jgreen jgr...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] redo the fantastic removal of a single pound sign - change (operations/puppet)
Jgreen has uploaded a new change for review. https://gerrit.wikimedia.org/r/78822 Change subject: redo the fantastic removal of a single pound sign .. redo the fantastic removal of a single pound sign Change-Id: I16a3051234d080037f3d2f86103324cf2a013aaa --- M files/otrs/crontab.otrs 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/22/78822/1 diff --git a/files/otrs/crontab.otrs b/files/otrs/crontab.otrs index 072788f..9038f45 100644 --- a/files/otrs/crontab.otrs +++ b/files/otrs/crontab.otrs @@ -7,7 +7,7 @@ 30 0 * * 0 otrs /opt/otrs/bin/otrs.LoaderCache.pl -o delete /dev/null # start generic agent -#*/20 * * * * otrs /opt/otrs/bin/otrs.GenericAgent.pl /dev/null +*/20 * * * * otrs /opt/otrs/bin/otrs.GenericAgent.pl /dev/null # check for pending jobs 45 */2 * * * otrs /opt/otrs/bin/otrs.PendingJobs.pl /dev/null -- To view, visit https://gerrit.wikimedia.org/r/78822 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I16a3051234d080037f3d2f86103324cf2a013aaa Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Jgreen jgr...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Rewrite etherpad to etherpad-lite URLs for compat - change (operations/puppet)
Akosiaris has uploaded a new change for review. https://gerrit.wikimedia.org/r/78823 Change subject: Rewrite etherpad to etherpad-lite URLs for compat .. Rewrite etherpad to etherpad-lite URLs for compat Trying to keep URLs from old etherpad for compatibility reason. Rewriting any URLs not having a / in them assuming that all are names Also add the old hostname to ServerName Change-Id: Iffccb3a2097295d98ba4a66f4501ef9bf7f674e5 --- M manifests/misc/etherpad.pp M templates/apache/sites/etherpad_lite.wikimedia.org.erb 2 files changed, 3 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/23/78823/1 diff --git a/manifests/misc/etherpad.pp b/manifests/misc/etherpad.pp index 7e2cdea..d4b5658 100644 --- a/manifests/misc/etherpad.pp +++ b/manifests/misc/etherpad.pp @@ -63,7 +63,7 @@ $etherpad_ssl_cert = '/etc/ssl/certs/ssl-cert-snakeoil.pem' $etherpad_ssl_key = '/etc/ssl/private/ssl-cert-snakeoil.key' } else { - $etherpad_host = 'epl.wikimedia.org' + $etherpad_host = 'etherpad.wikimedia.org epl.wikimedia.org' $etherpad_ssl_cert = '/etc/ssl/certs/star.wikimedia.org.pem' $etherpad_ssl_key = '/etc/ssl/private/star.wikimedia.org.key' } diff --git a/templates/apache/sites/etherpad_lite.wikimedia.org.erb b/templates/apache/sites/etherpad_lite.wikimedia.org.erb index e5e9d21..81228b7 100644 --- a/templates/apache/sites/etherpad_lite.wikimedia.org.erb +++ b/templates/apache/sites/etherpad_lite.wikimedia.org.erb @@ -14,6 +14,7 @@ ProxyPass / http://%= etherpad_ip %:%= etherpad_port %/ ProxyPassReverse / http://%= etherpad_ip %:%= etherpad_port %/ ProxyPreserveHost On + RewriteRule ^/([^/]+)$ /p/$1 [R=301,L] Proxy * Options FollowSymLinks MultiViews @@ -41,6 +42,7 @@ ProxyPass / http://%= etherpad_ip %:%= etherpad_port %/ ProxyPassReverse / http://%= etherpad_ip %:%= etherpad_port %/ ProxyPreserveHost On + RewriteRule ^/([^/]+)$ /p/$1 [R=301,L] Proxy * Options FollowSymLinks MultiViews -- To view, visit https://gerrit.wikimedia.org/r/78823 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Iffccb3a2097295d98ba4a66f4501ef9bf7f674e5 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Akosiaris akosia...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Rewrite etherpad to etherpad-lite URLs for compat - change (operations/puppet)
Akosiaris has submitted this change and it was merged. Change subject: Rewrite etherpad to etherpad-lite URLs for compat .. Rewrite etherpad to etherpad-lite URLs for compat Trying to keep URLs from old etherpad for compatibility reason. Rewriting any URLs not having a / in them assuming that all are names Also add the old hostname to ServerName Change-Id: Iffccb3a2097295d98ba4a66f4501ef9bf7f674e5 --- M manifests/misc/etherpad.pp M templates/apache/sites/etherpad_lite.wikimedia.org.erb 2 files changed, 3 insertions(+), 1 deletion(-) Approvals: Akosiaris: Looks good to me, approved jenkins-bot: Verified diff --git a/manifests/misc/etherpad.pp b/manifests/misc/etherpad.pp index 7e2cdea..d4b5658 100644 --- a/manifests/misc/etherpad.pp +++ b/manifests/misc/etherpad.pp @@ -63,7 +63,7 @@ $etherpad_ssl_cert = '/etc/ssl/certs/ssl-cert-snakeoil.pem' $etherpad_ssl_key = '/etc/ssl/private/ssl-cert-snakeoil.key' } else { - $etherpad_host = 'epl.wikimedia.org' + $etherpad_host = 'etherpad.wikimedia.org epl.wikimedia.org' $etherpad_ssl_cert = '/etc/ssl/certs/star.wikimedia.org.pem' $etherpad_ssl_key = '/etc/ssl/private/star.wikimedia.org.key' } diff --git a/templates/apache/sites/etherpad_lite.wikimedia.org.erb b/templates/apache/sites/etherpad_lite.wikimedia.org.erb index e5e9d21..81228b7 100644 --- a/templates/apache/sites/etherpad_lite.wikimedia.org.erb +++ b/templates/apache/sites/etherpad_lite.wikimedia.org.erb @@ -14,6 +14,7 @@ ProxyPass / http://%= etherpad_ip %:%= etherpad_port %/ ProxyPassReverse / http://%= etherpad_ip %:%= etherpad_port %/ ProxyPreserveHost On + RewriteRule ^/([^/]+)$ /p/$1 [R=301,L] Proxy * Options FollowSymLinks MultiViews @@ -41,6 +42,7 @@ ProxyPass / http://%= etherpad_ip %:%= etherpad_port %/ ProxyPassReverse / http://%= etherpad_ip %:%= etherpad_port %/ ProxyPreserveHost On + RewriteRule ^/([^/]+)$ /p/$1 [R=301,L] Proxy * Options FollowSymLinks MultiViews -- To view, visit https://gerrit.wikimedia.org/r/78823 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Iffccb3a2097295d98ba4a66f4501ef9bf7f674e5 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Akosiaris akosia...@wikimedia.org Gerrit-Reviewer: Akosiaris 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] Minor code restructuring of toolbarcontroller widget - change (mediawiki...Wikibase)
Daniel Werner has uploaded a new change for review. https://gerrit.wikimedia.org/r/78824 Change subject: Minor code restructuring of toolbarcontroller widget .. Minor code restructuring of toolbarcontroller widget Moved toolbar event listener handling into its own functions. Change-Id: I8a2d9d636183bf48119d768ffe364fd1b8eecf9a --- M lib/resources/jquery.wikibase/toolbar/toolbarcontroller.js 1 file changed, 46 insertions(+), 27 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Wikibase refs/changes/24/78824/1 diff --git a/lib/resources/jquery.wikibase/toolbar/toolbarcontroller.js b/lib/resources/jquery.wikibase/toolbar/toolbarcontroller.js index dca0d1c..944b71b 100644 --- a/lib/resources/jquery.wikibase/toolbar/toolbarcontroller.js +++ b/lib/resources/jquery.wikibase/toolbar/toolbarcontroller.js @@ -78,47 +78,38 @@ var $initNode = self.element.find( def.selector || ':' + def.widget.fullName ); if ( def.events ) { + // Get callbacks for create and destroy: + var defaultCallbacks = createDefaultEventHandlers( type, options ); // Toolbars that shall be created upon certain events. $.each( def.events, function( eventNames, callbackOrKeyword ) { - if ( callbackOrKeyword === 'create' ) { - callbackOrKeyword = function( event ) { - $( event.target )[type]( options ); - }; - } else if ( callbackOrKeyword === 'destroy' ) { - callbackOrKeyword = function( event ) { - var $node = $( event.target ); - if ( $node.data( type ) ) { - $node.data( type ).destroy(); - $node.removeData( type ); - $node.children( - '.' + $.wikibase[type].prototype.widgetBaseClass - ).remove(); - } - }; - } + var callback = + defaultCallbacks[ callbackOrKeyword ] || callbackOrKeyword; - var namespacedEventNames = ( eventNames + ' ' ) - .split( ' ' ).join( '.' + self.widgetName + ' ' ); - - // Create and destroy events have to be defined. - $initNode - // Remove all events first in order to not end up with having the handler - // attached multiple times: - .on( namespacedEventNames, function( event ) { - callbackOrKeyword( event, $( event.target ) ); - } ); + self._initToolbarEventListener( $initNode, eventNames, callback ); } ); } if ( !def.events || def.widget ) { $initNode[type]( options ); } - } ); } ); this.initEventListeners(); + }, + + _initToolbarEventListener: function( $toolbar, eventNames, callback ) { + var namespacedEventNames = ( eventNames + ' ' ) + .split( ' ' ).join( '.' + this.widgetName + ' ' ); + + //
[MediaWiki-commits] [Gerrit] redo the fantastic removal of a single pound sign - change (operations/puppet)
Jgreen has submitted this change and it was merged. Change subject: redo the fantastic removal of a single pound sign .. redo the fantastic removal of a single pound sign Change-Id: I16a3051234d080037f3d2f86103324cf2a013aaa --- M files/otrs/crontab.otrs 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Jgreen: Checked; Looks good to me, approved jenkins-bot: Verified diff --git a/files/otrs/crontab.otrs b/files/otrs/crontab.otrs index 072788f..9038f45 100644 --- a/files/otrs/crontab.otrs +++ b/files/otrs/crontab.otrs @@ -7,7 +7,7 @@ 30 0 * * 0 otrs /opt/otrs/bin/otrs.LoaderCache.pl -o delete /dev/null # start generic agent -#*/20 * * * * otrs /opt/otrs/bin/otrs.GenericAgent.pl /dev/null +*/20 * * * * otrs /opt/otrs/bin/otrs.GenericAgent.pl /dev/null # check for pending jobs 45 */2 * * * otrs /opt/otrs/bin/otrs.PendingJobs.pl /dev/null -- To view, visit https://gerrit.wikimedia.org/r/78822 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I16a3051234d080037f3d2f86103324cf2a013aaa Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Jgreen jgr...@wikimedia.org Gerrit-Reviewer: Jgreen jgr...@wikimedia.org Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Fix some comments that refered to Solr. - change (mediawiki...CirrusSearch)
jenkins-bot has submitted this change and it was merged. Change subject: Fix some comments that refered to Solr. .. Fix some comments that refered to Solr. Change-Id: Id4ab5021631ab33bdf8790645d78af184e2759c2 --- M CirrusSearch.body.php 1 file changed, 2 insertions(+), 2 deletions(-) Approvals: Demon: Looks good to me, approved jenkins-bot: Verified diff --git a/CirrusSearch.body.php b/CirrusSearch.body.php index f15b497..adc2303 100644 --- a/CirrusSearch.body.php +++ b/CirrusSearch.body.php @@ -411,7 +411,7 @@ } /** - * A set of results for Solr + * A set of results from Elasticsearch. */ class CirrusSearchResultSet extends SearchResultSet { private $result, $docs, $hits, $totalHits, $suggestionQuery, $suggestionSnippet; @@ -480,7 +480,7 @@ } /** - * An individual search result for Solr + * An individual search result from Elasticsearch. */ class CirrusSearchResult extends SearchResult { private $titleSnippet, $redirectTitle, $redirectSnipppet, $textSnippet; -- To view, visit https://gerrit.wikimedia.org/r/78813 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Id4ab5021631ab33bdf8790645d78af184e2759c2 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/CirrusSearch Gerrit-Branch: master Gerrit-Owner: Manybubbles never...@wikimedia.org Gerrit-Reviewer: Demon 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] Just the old hostname for etherpad - change (operations/puppet)
Akosiaris has uploaded a new change for review. https://gerrit.wikimedia.org/r/78825 Change subject: Just the old hostname for etherpad .. Just the old hostname for etherpad Change-Id: Ib0b0d3bfc156858b1f10dba7caa7ac243089fab6 --- M manifests/misc/etherpad.pp 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/25/78825/1 diff --git a/manifests/misc/etherpad.pp b/manifests/misc/etherpad.pp index d4b5658..87b6037 100644 --- a/manifests/misc/etherpad.pp +++ b/manifests/misc/etherpad.pp @@ -63,7 +63,7 @@ $etherpad_ssl_cert = '/etc/ssl/certs/ssl-cert-snakeoil.pem' $etherpad_ssl_key = '/etc/ssl/private/ssl-cert-snakeoil.key' } else { - $etherpad_host = 'etherpad.wikimedia.org epl.wikimedia.org' + $etherpad_host = 'etherpad.wikimedia.org' $etherpad_ssl_cert = '/etc/ssl/certs/star.wikimedia.org.pem' $etherpad_ssl_key = '/etc/ssl/private/star.wikimedia.org.key' } -- To view, visit https://gerrit.wikimedia.org/r/78825 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ib0b0d3bfc156858b1f10dba7caa7ac243089fab6 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Akosiaris akosia...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Just the old hostname for etherpad - change (operations/puppet)
Akosiaris has submitted this change and it was merged. Change subject: Just the old hostname for etherpad .. Just the old hostname for etherpad Change-Id: Ib0b0d3bfc156858b1f10dba7caa7ac243089fab6 --- M manifests/misc/etherpad.pp 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Akosiaris: Looks good to me, approved jenkins-bot: Verified diff --git a/manifests/misc/etherpad.pp b/manifests/misc/etherpad.pp index d4b5658..87b6037 100644 --- a/manifests/misc/etherpad.pp +++ b/manifests/misc/etherpad.pp @@ -63,7 +63,7 @@ $etherpad_ssl_cert = '/etc/ssl/certs/ssl-cert-snakeoil.pem' $etherpad_ssl_key = '/etc/ssl/private/ssl-cert-snakeoil.key' } else { - $etherpad_host = 'etherpad.wikimedia.org epl.wikimedia.org' + $etherpad_host = 'etherpad.wikimedia.org' $etherpad_ssl_cert = '/etc/ssl/certs/star.wikimedia.org.pem' $etherpad_ssl_key = '/etc/ssl/private/star.wikimedia.org.key' } -- To view, visit https://gerrit.wikimedia.org/r/78825 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ib0b0d3bfc156858b1f10dba7caa7ac243089fab6 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Akosiaris akosia...@wikimedia.org Gerrit-Reviewer: Akosiaris 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] Add three more small test cases. - change (mediawiki...CirrusSearch)
jenkins-bot has submitted this change and it was merged. Change subject: Add three more small test cases. .. Add three more small test cases. 1. When you don't fully type a title and hit enter in the search box you search for it rather than go to that page. 2. When you type a namespace prefixed page into the search box it is found and hitting enter works like any other page. 3. Categories transcluded into pages from templates can be searched. Test case 3 is related to Bug 18861. Change-Id: I2426e1a3ec2fbbb156a38959d4cdc7da1af75974 --- M tests/browser/features/full_text.feature M tests/browser/features/prefix.feature M tests/browser/features/support/build_pages.rb 3 files changed, 10 insertions(+), 7 deletions(-) Approvals: Demon: Looks good to me, approved jenkins-bot: Verified diff --git a/tests/browser/features/full_text.feature b/tests/browser/features/full_text.feature index 8776062..f9362c0 100644 --- a/tests/browser/features/full_text.feature +++ b/tests/browser/features/full_text.feature @@ -22,6 +22,7 @@ | incategory:alpha incategory:beta | AlphaBeta is | not in | | incategory:twowords catapult | Two Words is | in | | incategory:twowords intitle:catapult | none is | not in | +| incategory:templatetagged two words | Two Words is | in | | talk:catapult| Talk:Two Words is | not in | | talk:intitle:words | Talk:Two Words is | not in | | template:pickles | Template:Template Test is | not in | diff --git a/tests/browser/features/prefix.feature b/tests/browser/features/prefix.feature index ae0fbf7..d647b2f 100644 --- a/tests/browser/features/prefix.feature +++ b/tests/browser/features/prefix.feature @@ -9,10 +9,12 @@ When I hit enter in the search box Then I am on a page titled title Examples: -| term | first_result | title | -| catapult | Catapult | Catapult | -| two words | Two Words| Two Words | -| ~catapult | none | Search results | -| África| África | África | +| term | first_result | title | +| catapult | Catapult | Catapult | +| catapul| Catapult | Search results | +| two words | Two Words | Two Words | +| ~catapult | none | Search results | +| África | África | África | # Hitting enter in a search for Africa should pull up África but that bug is beyond me. -| Africa| África | Search results | +| Africa | África | Search results | +| Template:Template Test | Template:Template Test | Template:Template Test | diff --git a/tests/browser/features/support/build_pages.rb b/tests/browser/features/support/build_pages.rb index 7dab7ab..06a27da 100644 --- a/tests/browser/features/support/build_pages.rb +++ b/tests/browser/features/support/build_pages.rb @@ -3,7 +3,7 @@ Before('@setup_main') do if !$newsearch_setup_main steps %Q{ - And a page named Template:Template Test exists with contents pickles + And a page named Template:Template Test exists with contents pickles [[Category:TemplateTagged]] And a page named Catapult exists with contents ♙ asdf [[Category:Weaponry]] And a page named Amazing Catapult exists with contents test [[Category:Weaponry]] And a page named Two Words exists with contents catapult {{Template_Test}} [[Category:TwoWords]] -- To view, visit https://gerrit.wikimedia.org/r/78253 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I2426e1a3ec2fbbb156a38959d4cdc7da1af75974 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/CirrusSearch Gerrit-Branch: master Gerrit-Owner: Manybubbles never...@wikimedia.org Gerrit-Reviewer: Cmcmahon cmcma...@wikimedia.org Gerrit-Reviewer: Demon ch...@wikimedia.org Gerrit-Reviewer: Zfilipin zfili...@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 details for language code tuv - change (analytics/wikistats)
Erik Zachte has uploaded a new change for review. https://gerrit.wikimedia.org/r/78826 Change subject: Add details for language code tuv .. Add details for language code tuv Change-Id: I2be443d2b72377620d777f54f74913ab5028ea70 --- M dumps/perl/WikiReportsLiterals.pm 1 file changed, 1 insertion(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/analytics/wikistats refs/changes/26/78826/1 diff --git a/dumps/perl/WikiReportsLiterals.pm b/dumps/perl/WikiReportsLiterals.pm index 3628b10..d31603e 100644 --- a/dumps/perl/WikiReportsLiterals.pm +++ b/dumps/perl/WikiReportsLiterals.pm @@ -362,6 +362,7 @@ tt=http://tt.wikipedia.org Tatar [8,AS], tum=http://tum.wikipedia.org Tumbuka [2,AF], turn=http://turn.wikipedia.org Turnbuka, + tuv=http://tuv.wikipedia.org Tuvan [0.265,AS], tw=http://tw.wikipedia.org Twi [14.8,AF], ty=http://ty.wikipedia.org Tahitian [0.120,OC], udm=http://udm.wikipedia.org Udmurt [0.550,AS], -- To view, visit https://gerrit.wikimedia.org/r/78826 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I2be443d2b72377620d777f54f74913ab5028ea70 Gerrit-PatchSet: 1 Gerrit-Project: analytics/wikistats Gerrit-Branch: master Gerrit-Owner: Erik Zachte ezac...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] exclude dates with faulty data - change (analytics/wikistats)
Erik Zachte has uploaded a new change for review. https://gerrit.wikimedia.org/r/78828 Change subject: exclude dates with faulty data .. exclude dates with faulty data Change-Id: I5388ae043373f8a32025a36cd6545a254a3c2c2d --- M dumps/perl/WikiCountsSummarizeProjectCounts.pl 1 file changed, 1 insertion(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/analytics/wikistats refs/changes/28/78828/1 diff --git a/dumps/perl/WikiCountsSummarizeProjectCounts.pl b/dumps/perl/WikiCountsSummarizeProjectCounts.pl index 5ff4ee8..52c623e 100644 --- a/dumps/perl/WikiCountsSummarizeProjectCounts.pl +++ b/dumps/perl/WikiCountsSummarizeProjectCounts.pl @@ -474,6 +474,7 @@ next if $file ge projectcounts-20111223-01 and $file lt projectcounts-20111226-16 ; # bad measurements on these dates next if $file ge projectcounts-20120413-00 and $file lt projectcounts-20120417-00 ; # bad measurements on these dates next if $file ge projectcounts-20121214-00 and $file lt projectcounts-20130108-00 ; # bad measurements on these dates + next if $file ge projectcounts-20130723-00 and $file lt projectcounts-20130724-00 ; # bad measurements on these dates push @files, $file ; $file_in_tar {$file} = $file_in ; -- To view, visit https://gerrit.wikimedia.org/r/78828 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I5388ae043373f8a32025a36cd6545a254a3c2c2d Gerrit-PatchSet: 1 Gerrit-Project: analytics/wikistats Gerrit-Branch: master Gerrit-Owner: Erik Zachte ezac...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Remove added transformers in QuoteTransformer. - change (mediawiki...Parsoid)
Arlolra has uploaded a new change for review. https://gerrit.wikimedia.org/r/78827 Change subject: Remove added transformers in QuoteTransformer. .. Remove added transformers in QuoteTransformer. Commit e3606964e69789e5c58b8670027b2a3feef11a99 added some transformers which it failed to remove. This resulted in many duplicates in the tokenTransforms array during a test run. Noticed in bug 52046. Change-Id: If47c890a1a7a8211c3e918fa36f9ab2659fe12f6 --- M js/lib/ext.core.QuoteTransformer.js 1 file changed, 3 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Parsoid refs/changes/27/78827/1 diff --git a/js/lib/ext.core.QuoteTransformer.js b/js/lib/ext.core.QuoteTransformer.js index 7a3230f..c599aae 100644 --- a/js/lib/ext.core.QuoteTransformer.js +++ b/js/lib/ext.core.QuoteTransformer.js @@ -254,8 +254,10 @@ // prepare for next line this.reset(); - // remove 'end', 'newline' and 'any' registrations + // remove registrations this.dispatcher.removeTransform( this.quoteAndNewlineRank, 'end' ); + this.dispatcher.removeTransform( this.quoteAndNewlineRank, 'tag', 'td' ); + this.dispatcher.removeTransform( this.quoteAndNewlineRank, 'tag', 'th' ); this.dispatcher.removeTransform( this.quoteAndNewlineRank, 'newline' ); this.dispatcher.removeTransform( this.anyRank, 'any' ); //console.warn( 'res:' + JSON.stringify( res, null, 2 )); -- To view, visit https://gerrit.wikimedia.org/r/78827 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: If47c890a1a7a8211c3e918fa36f9ab2659fe12f6 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Parsoid Gerrit-Branch: master Gerrit-Owner: Arlolra abrea...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Fix the suggest test. - change (mediawiki...CirrusSearch)
jenkins-bot has submitted this change and it was merged. Change subject: Fix the suggest test. .. Fix the suggest test. Add back a step definition that I accidentally blow away and add some additional test data to make the noble prize suggestion test case harder on elasticsearch such that the Improve suggestion configuration. change is require for elasticsearch to get the right answer. Change-Id: Ib6c33852714c51725bf3aa758771e17ad40fbdf9 --- M tests/browser/features/full_text.feature M tests/browser/features/step_definitions/search_steps.rb M tests/browser/features/support/build_pages.rb M tests/browser/features/support/pages/search_results_page.rb 4 files changed, 18 insertions(+), 1 deletion(-) Approvals: Demon: Looks good to me, approved jenkins-bot: Verified diff --git a/tests/browser/features/full_text.feature b/tests/browser/features/full_text.feature index 8776062..606ac3b 100644 --- a/tests/browser/features/full_text.feature +++ b/tests/browser/features/full_text.feature @@ -88,3 +88,4 @@ | term| suggestion | | popular culatur | popular culture | | noble prize | nobel prize | +| nobel prize | none| diff --git a/tests/browser/features/step_definitions/search_steps.rb b/tests/browser/features/step_definitions/search_steps.rb index d72a88b..6aae8d9 100644 --- a/tests/browser/features/step_definitions/search_steps.rb +++ b/tests/browser/features/step_definitions/search_steps.rb @@ -74,7 +74,7 @@ on(SearchPage).search_results_element.when_present.should exist end Then(/^(.+) is the first suggestion$/) do |title| - if (title == 'none') then + if title == 'none' then on(SearchPage).one_result_element.should_not exist else on(SearchPage).one_result.should == title @@ -129,6 +129,13 @@ step(#{title} is the first suggestion) end end +Then(/^(.*) is suggested$/) do |text| + if text == 'none' then +on(SearchResultsPage).suggestion_element.should_not exist + else +on(SearchResultsPage).suggestion.should == text + end +end def within(seconds) end_time = Time.new + Integer(seconds) diff --git a/tests/browser/features/support/build_pages.rb b/tests/browser/features/support/build_pages.rb index 7dab7ab..d1f54a8 100644 --- a/tests/browser/features/support/build_pages.rb +++ b/tests/browser/features/support/build_pages.rb @@ -33,6 +33,12 @@ And a page named Nobel Prize exists with contents nobel prize And a page named Noble Gasses exists with contents noble gasses And a page named Noble Somethingelse exists with contents noble somethingelse + And a page named Noble Somethingelse2 exists with contents noble somethingelse + And a page named Noble Somethingelse3 exists with contents noble somethingelse + And a page named Noble Somethingelse4 exists with contents noble somethingelse + And a page named Noble Somethingelse5 exists with contents noble somethingelse + And a page named Noble Somethingelse6 exists with contents noble somethingelse + And a page named Noble Somethingelse7 exists with contents noble somethingelse And a page named Template:Noble Pipe exists with contents pipes are so noble } $newsearch_setup_namespaces = true diff --git a/tests/browser/features/support/pages/search_results_page.rb b/tests/browser/features/support/pages/search_results_page.rb index 21e4399..8f738c5 100644 --- a/tests/browser/features/support/pages/search_results_page.rb +++ b/tests/browser/features/support/pages/search_results_page.rb @@ -12,6 +12,9 @@ def suggestion suggestion_wrapper_element.link_element.text end + def suggestion_element +suggestion_wrapper_element.link_element + end def results @browser.divs(:class = 'mw-search-result-heading') end -- To view, visit https://gerrit.wikimedia.org/r/78316 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ib6c33852714c51725bf3aa758771e17ad40fbdf9 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/CirrusSearch Gerrit-Branch: master Gerrit-Owner: Manybubbles never...@wikimedia.org Gerrit-Reviewer: Cmcmahon cmcma...@wikimedia.org Gerrit-Reviewer: Demon ch...@wikimedia.org Gerrit-Reviewer: Zfilipin zfili...@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] added rsync to web site - change (analytics/wikistats)
Erik Zachte has uploaded a new change for review. https://gerrit.wikimedia.org/r/78829 Change subject: added rsync to web site .. added rsync to web site Change-Id: I43eb1c8817086830244b3b2022deb218c721271f --- M dumps/bash/collect_countable_namespaces.sh 1 file changed, 3 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/analytics/wikistats refs/changes/29/78829/1 diff --git a/dumps/bash/collect_countable_namespaces.sh b/dumps/bash/collect_countable_namespaces.sh index f17c5f0..eab8187 100755 --- a/dumps/bash/collect_countable_namespaces.sh +++ b/dumps/bash/collect_countable_namespaces.sh @@ -6,6 +6,7 @@ perl=$wikistats/dumps/perl perl=/home/ezachte/wikistats/dumps/perl # tests csv=$wikistats/dumps/csv +htdocs=stat1001.wikimedia.org::a/srv/stats.wikimedia.org/htdocs/ clear @@ -22,4 +23,6 @@ date StatisticsContentNamespacesExtraNamespacesDiff.csv diff StatisticsContentNamespacesExtraNamespaces.csv StatisticsContentNamespacesExtraNamespaces.bak StatisticsContentNamespacesExtraNamespacesDiff.csv +rsync -av StatisticsContentNamespacesExtraNamespaces.csv $htdocs/wikimedia/misc + -- To view, visit https://gerrit.wikimedia.org/r/78829 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I43eb1c8817086830244b3b2022deb218c721271f Gerrit-PatchSet: 1 Gerrit-Project: analytics/wikistats Gerrit-Branch: master Gerrit-Owner: Erik Zachte ezac...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Move test password overrides to untracked file. - change (mediawiki...CirrusSearch)
jenkins-bot has submitted this change and it was merged. Change subject: Move test password overrides to untracked file. .. Move test password overrides to untracked file. Change-Id: I830daba1dbc4c77473ab9e8d70db430da8527a30 --- M tests/browser/.gitignore M tests/browser/README M tests/browser/config/config.yml M tests/browser/features/support/env.rb 4 files changed, 11 insertions(+), 11 deletions(-) Approvals: Demon: Looks good to me, approved jenkins-bot: Verified diff --git a/tests/browser/.gitignore b/tests/browser/.gitignore index 1af12b1..f24ff04 100644 --- a/tests/browser/.gitignore +++ b/tests/browser/.gitignore @@ -1,2 +1,3 @@ Gemfile.lock reports/ +config/secret.yml diff --git a/tests/browser/README b/tests/browser/README index 08fec7b..9f68200 100644 --- a/tests/browser/README +++ b/tests/browser/README @@ -20,11 +20,12 @@ mediawiki directory: php maintenance/createAndPromote.php --force --sysop Selenium_user selenium123 -You can override the password by creating /private/wmf/secret.yml in the format: - mediawiki_password: new_password -or just changing it in config/config.yml. If you change it in config.yml -remember not to push it. - +You can override the password by creating /private/wmf/secret.yml or +config/secret.yml in the format: + mediawiki_username: Selenium_user + mediawiki_password: selenium123 +While you could technically just change config.yml that wouldn't be a good idea +because it'd be too easy to accidentally commit your password. Running --- diff --git a/tests/browser/config/config.yml b/tests/browser/config/config.yml index f0fb67a..05cb3de 100644 --- a/tests/browser/config/config.yml +++ b/tests/browser/config/config.yml @@ -1,7 +1,5 @@ -# mediawiki_username: Selenium_user -# mediawiki_password: selenium123 -mediawiki_username: NEverett (WMF) -mediawiki_password: 'H/a=O_10lYz' +mediawiki_username: Selenium_user +mediawiki_password: selenium123 android: name: android diff --git a/tests/browser/features/support/env.rb b/tests/browser/features/support/env.rb index b1f2ef3..d91ed29 100644 --- a/tests/browser/features/support/env.rb +++ b/tests/browser/features/support/env.rb @@ -81,7 +81,7 @@ browser end def secret_yml_location - secret_yml_locations = ['/private/wmf/secret.yml', 'config/config.yml'] + secret_yml_locations = ['/private/wmf/secret.yml', 'config/secret.yml', 'config/config.yml'] secret_yml_locations.each do |secret_yml_location| return secret_yml_location if File.exists?(#{secret_yml_location}) end @@ -96,9 +96,9 @@ end config = YAML.load_file('config/config.yml') -mediawiki_username = config['mediawiki_username'] secret = YAML.load_file(#{secret_yml_location}) +mediawiki_username = secret['mediawiki_username'] mediawiki_password = secret['mediawiki_password'] if ENV['ENVIRONMENT'] == 'cloudbees' -- To view, visit https://gerrit.wikimedia.org/r/78386 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I830daba1dbc4c77473ab9e8d70db430da8527a30 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/CirrusSearch Gerrit-Branch: master Gerrit-Owner: Manybubbles never...@wikimedia.org Gerrit-Reviewer: Cmcmahon cmcma...@wikimedia.org Gerrit-Reviewer: Demon ch...@wikimedia.org Gerrit-Reviewer: Zfilipin zfili...@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] Sync up with Parsoid parserTests. - change (mediawiki/core)
jenkins-bot has submitted this change and it was merged. Change subject: Sync up with Parsoid parserTests. .. Sync up with Parsoid parserTests. This now aligns with Parsoid commit 44d2188ce875a97441e7ffcc40c2824bc52092c8 Change-Id: I6e6e0755e3bd335ba9d34d4a053384cf04847137 --- M tests/parser/parserTests.txt 1 file changed, 404 insertions(+), 99 deletions(-) Approvals: Cscott: Looks good to me, but someone else must approve Matmarex: Looks good to me, approved jenkins-bot: Verified diff --git a/tests/parser/parserTests.txt b/tests/parser/parserTests.txt index 128e25d..41d49d1 100644 --- a/tests/parser/parserTests.txt +++ b/tests/parser/parserTests.txt @@ -139,6 +139,12 @@ Weirdo titles! !! endarticle +!!article +Template:Bullet +!!text +* Bar +!!endarticle + ### ### Basic tests ### @@ -1795,6 +1801,20 @@ !!end !!test +1d. Indent-Pre and Comments +(Pre-handler currently cannot distinguish between comment/ws order and normalizes them to [comment,ws] order) +!!input +!--a-- a + + !--b--b +!!result +prea +/pre +preb +/pre +!!end + +!!test 2a. Indent-Pre and tables !!input {| @@ -1944,6 +1964,52 @@ preabr / b +/pre +!! end + +!! test +6. Pre-blocks should extend across lines with leading WS even when there is no wrappable content +!! input + a + + !-- continue -- + b + + c + +d +!! result +prea + +b +/pre +prec + +/pre +pd +/p +!! end + +!! test +7a. Indent-pre and category links +!! options +parsoid=wt2html,wt2wt +!! input + [[Category:foo]] !-- No pre-wrapping -- +{{echo| [[Category:foo]]}} !-- No pre-wrapping -- +!! result + span typeof=mw:Transclusion /span +!! end + +!! test +7b. Indent-pre and category links +!! options +parsoid=wt2html,wt2wt +!! input + [[Category:foo]] a + [[Category:foo]] {{echo|b}} +!! result +pre a span typeof=mw:Transclusionb/span /pre !! end @@ -4928,11 +4994,61 @@ !! end !! test +Optional colon in #REDIRECT +!! options +# the colon is archaic syntax. we support it for wt2html, but we +# don't care that it roundtrips back to the modern syntax. +parsoid=wt2html,html2html +!! input +#REDIRECT:[[Main Page]] +!! result +link rel=mw:PageProp/redirect href=./Main_Page +!! end + +!! test +Whitespace in #REDIRECT with optional colon +!! options +# the colon and gratuitous whitespace is archaic syntax. we support +# it for wt2html, but we don't care that it roundtrips back to the +# modern syntax (without extra whitespace) +parsoid=wt2html,html2html +!! input + + #REDIRECT +: +[[Main Page]] +!! result +link rel=mw:PageProp/redirect href=./Main_Page +!! end + +!! test +Piped link in #REDIRECT +!! options +# content after piped link is ignored. we support this syntax, +# but don't care that the piped link is lost when we roundtrip this. +parsoid=wt2html +!! input +#REDIRECT [[Main Page|bar]] +!! result +link rel=mw:PageProp/redirect href=./Main_Page +!! end + +!! test Redirect to category !! options parsoid=wt2html !! input #REDIRECT [[Category:Foo]] +!! result +link rel=mw:PageProp/redirect href=./Category:Foolink rel=mw:WikiLink/Category href=./Category:Foo +!! end + +!! test +Redirect to category with URL encoding +!! options +parsoid=wt2html +!! input +#REDIRECT [[Category%3AFoo]] !! result link rel=mw:PageProp/redirect href=./Category:Foolink rel=mw:WikiLink/Category href=./Category:Foo !! end @@ -4948,11 +5064,21 @@ !! end !! test -Redirect to image page +Redirect to image page (1) !! options parsoid !! input #REDIRECT [[File:Wiki.png]] +!! result +link rel=mw:PageProp/redirect href=./File:Wiki.png +!! end + +!! test +Redirect to image page (2) +!! options +parsoid +!! input +#REDIRECT [[Image:Wiki.png]] !! result link rel=mw:PageProp/redirect href=./File:Wiki.png !! end @@ -4975,6 +5101,17 @@ #REDIRECT [[meatball:File:Wiki.png]] !! result link rel=mw:PageProp/redirect href=File:Wiki.png +!! end + +!! test +Non-English #REDIRECT +!! options +parsoid +language=is +!! input +#TILVÍSUN [[Main Page]] +!! result +link rel=mw:PageProp/redirect href=./Main_Page !! end ## @@ -5490,6 +5627,18 @@ :: bar !! result olli fooolli bar/li/ol/li/olulli fooulli bar/li/ul/li/uldldd foodldd bar/dd/dl/dd/dl +!! end + +!! test +Parsoid: Test of whitespace serialization with Templated bullets +!! options +parsoid +!! input +* {{bullet}} +!! result +ul +li /lili about=#mwt1 typeof=mw:Transclusion data-mw='{target:{wt:bullet,href:./Template:Bullet},params:{},i:0}' Bar/li +/ul !! end # @@ -8321,8 +8470,13 @@ ### ### Images ### +### For Parsoid-specific tests, see + http://www.mediawiki.org/wiki/Parsoid/MediaWiki_DOM_spec#Images + !! test -Simple image +Simple image (php) +!! options +php !! input [[Image:foobar.jpg]] !! result @@ -8331,16 +8485,20 @@ !! end !! test -Right-aligned image +Simple image (parsoid) +!! options +parsoid=wt2html !! input
[MediaWiki-commits] [Gerrit] Multiline templates aren't well escaped - change (mediawiki...ProofreadPage)
Tpt has uploaded a new change for review. https://gerrit.wikimedia.org/r/78831 Change subject: Multiline templates aren't well escaped .. Multiline templates aren't well escaped Change-Id: I77f667b7061e3a5bc6371e5219d04453d08273c1 --- M includes/index/EditProofreadIndexPage.php 1 file changed, 5 insertions(+), 5 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/ProofreadPage refs/changes/31/78831/1 diff --git a/includes/index/EditProofreadIndexPage.php b/includes/index/EditProofreadIndexPage.php index 633e783..21a50d6 100644 --- a/includes/index/EditProofreadIndexPage.php +++ b/includes/index/EditProofreadIndexPage.php @@ -137,7 +137,7 @@ */ protected function importContentFormData( $request ) { if ( $this-textbox1 !== '' ) { - return; + return $this-textbox1; } $config = ProofreadIndexPage::getDataConfig(); @@ -164,22 +164,22 @@ $value = trim( $value ); // replace pipe symbol everywhere... - $value = preg_replace( '#\|#', '!', $value ); + $value = preg_replace( '/\|/', '!', $value ); // ...except in links... $prev = ''; do { $prev = $value; - $value = preg_replace( '#\[\[(.*?)!(.*?)\]\]#', '[[$1|$2]]', $value ); + $value = preg_replace( '/\[\[(.*?)!(.*?)\]\]/', '[[$1|$2]]', $value ); } while ( $value != $prev ); // ..and in templates do { $prev = $value; - $value = preg_replace( '#\{\{(.*?)!(.*?)\}\}#', '{{$1|$2}}', $value ); + $value = preg_replace( '/\{\{(.*?)!(.*?)\}\}/s', '{{$1|$2}}', $value ); } while ( $value != $prev ); - $value = preg_replace( '#!#', '{{!}}', $value ); + $value = preg_replace( '/!/', '{{!}}', $value ); return $value; } -- To view, visit https://gerrit.wikimedia.org/r/78831 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I77f667b7061e3a5bc6371e5219d04453d08273c1 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/ProofreadPage Gerrit-Branch: master Gerrit-Owner: Tpt thoma...@hotmail.fr ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Remove added transformers in QuoteTransformer. - change (mediawiki...Parsoid)
jenkins-bot has submitted this change and it was merged. Change subject: Remove added transformers in QuoteTransformer. .. Remove added transformers in QuoteTransformer. Commit e3606964e69789e5c58b8670027b2a3feef11a99 added some transformers which it failed to remove. This resulted in many duplicates in the tokenTransforms array during a test run. Noticed in bug 52046. Change-Id: If47c890a1a7a8211c3e918fa36f9ab2659fe12f6 --- M js/lib/ext.core.QuoteTransformer.js 1 file changed, 3 insertions(+), 1 deletion(-) Approvals: Subramanya Sastry: Looks good to me, approved jenkins-bot: Verified diff --git a/js/lib/ext.core.QuoteTransformer.js b/js/lib/ext.core.QuoteTransformer.js index 7a3230f..c599aae 100644 --- a/js/lib/ext.core.QuoteTransformer.js +++ b/js/lib/ext.core.QuoteTransformer.js @@ -254,8 +254,10 @@ // prepare for next line this.reset(); - // remove 'end', 'newline' and 'any' registrations + // remove registrations this.dispatcher.removeTransform( this.quoteAndNewlineRank, 'end' ); + this.dispatcher.removeTransform( this.quoteAndNewlineRank, 'tag', 'td' ); + this.dispatcher.removeTransform( this.quoteAndNewlineRank, 'tag', 'th' ); this.dispatcher.removeTransform( this.quoteAndNewlineRank, 'newline' ); this.dispatcher.removeTransform( this.anyRank, 'any' ); //console.warn( 'res:' + JSON.stringify( res, null, 2 )); -- To view, visit https://gerrit.wikimedia.org/r/78827 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: If47c890a1a7a8211c3e918fa36f9ab2659fe12f6 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Parsoid Gerrit-Branch: master Gerrit-Owner: Arlolra abrea...@wikimedia.org Gerrit-Reviewer: Cscott canan...@wikimedia.org Gerrit-Reviewer: Subramanya Sastry ssas...@wikimedia.org Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Improve suggestion configuration. - change (mediawiki...CirrusSearch)
jenkins-bot has submitted this change and it was merged. Change subject: Improve suggestion configuration. .. Improve suggestion configuration. This will cause elasticseach to generate more suggestions on the back end and adds a stronger filter before it sends them back to mediawiki. Change-Id: If4bc7ed483132f0be0bf03c74679a340c57fae14 --- M CirrusSearch.body.php M CirrusSearch.php 2 files changed, 23 insertions(+), 3 deletions(-) Approvals: Demon: Looks good to me, approved jenkins-bot: Verified diff --git a/CirrusSearch.body.php b/CirrusSearch.body.php index f15b497..0b049ab 100644 --- a/CirrusSearch.body.php +++ b/CirrusSearch.body.php @@ -146,7 +146,7 @@ public function searchText( $term ) { wfDebugLog( 'CirrusSearch', Searching: $term ); - global $wgCirrusSearchPhraseSuggestMaxErrors; + global $wgCirrusSearchPhraseSuggestMaxErrors, $wgCirrusSearchPhraseSuggestConfidence; $originalTerm = $term; @@ -234,14 +234,30 @@ CirrusSearch::PHRASE_TITLE = array( 'phrase' = array( 'field' = 'title.suggest', - 'max_errors' = $wgCirrusSearchPhraseSuggestMaxErrors + 'size' = 1, + 'max_errors' = $wgCirrusSearchPhraseSuggestMaxErrors, + 'confidence' = $wgCirrusSearchPhraseSuggestConfidence, + 'direct_generator' = array( + array( + 'field' = 'title.suggest', + 'suggest_mode' = 'always', // Forces us to generate lots of phrases to try. + ), + ), ) ), // TODO redirects here too? CirrusSearch::PHRASE_TEXT = array( 'phrase' = array( 'field' = 'text.suggest', - 'max_errors' = $wgCirrusSearchPhraseSuggestMaxErrors + 'size' = 1, + 'max_errors' = $wgCirrusSearchPhraseSuggestMaxErrors, + 'confidence' = $wgCirrusSearchPhraseSuggestConfidence, + 'direct_generator' = array( + array( + 'field' = 'text.suggest', + 'suggest_mode' = 'always', // Forces us to generate lots of phrases to try. + ), + ), ) ) )); diff --git a/CirrusSearch.php b/CirrusSearch.php index 2961029..60004f2 100644 --- a/CirrusSearch.php +++ b/CirrusSearch.php @@ -49,6 +49,10 @@ // See max_errors on http://www.elasticsearch.org/guide/reference/api/search/suggest/ $wgCirrusSearchPhraseSuggestMaxErrors = 5; +// Confidence level required to suggest new phrases. +// See confidence on http://www.elasticsearch.org/guide/reference/api/search/suggest/ +$wgCirrusSearchPhraseSuggestConfidence = 2.0; + // Maximum number of redirects per target page to index. $wgCirrusSearchIndexedRedirects = 1024; -- To view, visit https://gerrit.wikimedia.org/r/78311 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: If4bc7ed483132f0be0bf03c74679a340c57fae14 Gerrit-PatchSet: 3 Gerrit-Project: mediawiki/extensions/CirrusSearch Gerrit-Branch: master Gerrit-Owner: Manybubbles never...@wikimedia.org Gerrit-Reviewer: Demon 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] Turn on the fast-vector-highlighter. - change (mediawiki...CirrusSearch)
jenkins-bot has submitted this change and it was merged. Change subject: Turn on the fast-vector-highlighter. .. Turn on the fast-vector-highlighter. So turning on the fast-vector-highlighter should fix two problems: 1. If the text of an article is large sometimes the best highlight isn't show. 2. Sometimes the summary of an article is huge (Bug 52680.) This should also speed up highlighting, especially for large articles. The fast-vector-highlighter is engaged by storing term vectors with positions and offsets which is what this commit actually does. Change-Id: Ic92bf03af9f2c1851f21c2adad94d7d463ab57b5 --- M CirrusSearchMappingConfigBuilder.php 1 file changed, 9 insertions(+), 4 deletions(-) Approvals: Demon: Looks good to me, approved jenkins-bot: Verified diff --git a/CirrusSearchMappingConfigBuilder.php b/CirrusSearchMappingConfigBuilder.php index af1862a..68d7772 100644 --- a/CirrusSearchMappingConfigBuilder.php +++ b/CirrusSearchMappingConfigBuilder.php @@ -31,12 +31,12 @@ // Note never to set something as type='object' here because that isn't returned by elasticsearch // and is infered anyway. return array( - 'title' = $this-buildStringField( 'title', array( 'suggest', 'prefix' ) ), - 'text' = $this-buildStringField( 'text', array( 'suggest' ) ), + 'title' = $this-buildStringField( 'title', array( 'suggest', 'prefix' ), true ), + 'text' = $this-buildStringField( 'text', array( 'suggest' ), true ), 'category' = $this-buildStringField(), 'redirect' = array( 'properties' = array( - 'title' = $this-buildStringField() + 'title' = $this-buildStringField( 'title', null, true ) ) ) ); @@ -47,10 +47,15 @@ * @param name string Name of the field. Required if extra is not falsy. * @param extra array Extra analyzers for this field beyond the basic string type. If not falsy the * field will be a multi_field. +* @param willHighlight Will this field be highlighted? Defaults to false. * @return array definition of the field */ - private function buildStringField( $name = null, $extra = null ) { + private function buildStringField( $name = null, $extra = null, $willHighlight = false ) { $field = array( 'type' = 'string', 'analyzer' = 'text' ); + if ( $willHighlight ) { + $field[ 'store' ] = true; + $field[ 'term_vector' ] = 'with_positions_offsets'; + } if ( !$extra ) { return $field; } -- To view, visit https://gerrit.wikimedia.org/r/78814 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ic92bf03af9f2c1851f21c2adad94d7d463ab57b5 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/CirrusSearch Gerrit-Branch: master Gerrit-Owner: Manybubbles never...@wikimedia.org Gerrit-Reviewer: Demon 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] Add Your e-mail address will not be published to MediaWiki... - change (mediawiki...ConfirmAccount)
Aaron Schulz has submitted this change and it was merged. Change subject: Add Your e-mail address will not be published to MediaWiki:Requestaccount-acc-text .. Add Your e-mail address will not be published to MediaWiki:Requestaccount-acc-text While at it, make email consistent with core and requestaccount-email; and improve grammar/clarity slightly. Bug: 44297 Change-Id: Ic8e65a9a3d087cb78f8dd156954c362c06f35a85 --- M frontend/language/RequestAccountPage.i18n.php 1 file changed, 2 insertions(+), 2 deletions(-) Approvals: Aaron Schulz: Verified; Looks good to me, approved diff --git a/frontend/language/RequestAccountPage.i18n.php b/frontend/language/RequestAccountPage.i18n.php index e08085e..01352a5 100644 --- a/frontend/language/RequestAccountPage.i18n.php +++ b/frontend/language/RequestAccountPage.i18n.php @@ -23,9 +23,9 @@ 'requestaccount-leg-person' = 'Personal information', 'requestaccount-leg-other' = 'Other information', 'requestaccount-leg-tos'= 'Terms of Service', - 'requestaccount-acc-text' = 'Your email address will be sent a confirmation message once this request is submitted. + 'requestaccount-acc-text' = 'A confirmation message will be sent to your email address once you submit this request. The address will not be published. Please respond by clicking on the confirmation link provided by the email. -Also, your password will be emailed to you when your account is created.', +Finally, your password will be emailed to you when your account is created.', 'requestaccount-areas' = '', # Do not translate this message to other languages 'requestaccount-areas-text' = 'Select the topic areas below in which you have formal expertise or would like to do the most work in.', 'requestaccount-ext-text' = 'The following information is kept private and will only be used for this request. -- To view, visit https://gerrit.wikimedia.org/r/78389 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ic8e65a9a3d087cb78f8dd156954c362c06f35a85 Gerrit-PatchSet: 3 Gerrit-Project: mediawiki/extensions/ConfirmAccount Gerrit-Branch: master Gerrit-Owner: Nemo bis federicol...@tiscali.it Gerrit-Reviewer: Aaron Schulz asch...@wikimedia.org Gerrit-Reviewer: Matmarex matma@gmail.com Gerrit-Reviewer: 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] OLD etherpad install to etherpad-old.wikimedia.org - change (operations/puppet)
Akosiaris has uploaded a new change for review. https://gerrit.wikimedia.org/r/78832 Change subject: OLD etherpad install to etherpad-old.wikimedia.org .. OLD etherpad install to etherpad-old.wikimedia.org Change-Id: Iad9a57fe0b4b8387a33789392027e3f90382dc9f --- M files/misc/etherpad/etherpad.proxy.apache.conf M templates/etherpad/etherpad.local.properties.erb 2 files changed, 5 insertions(+), 5 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/32/78832/1 diff --git a/files/misc/etherpad/etherpad.proxy.apache.conf b/files/misc/etherpad/etherpad.proxy.apache.conf index 15a487a..f60d6bf 100644 --- a/files/misc/etherpad/etherpad.proxy.apache.conf +++ b/files/misc/etherpad/etherpad.proxy.apache.conf @@ -1,7 +1,7 @@ VirtualHost *:80 - ServerName etherpad.wikimedia.org - ServerAlias eiximenis.wikimedia.org + ServerName etherpad-old.wikimedia.org + ServerAlias etherpad.wikimedia.org eiximenis.wikimedia.org RewriteEngine on ProxyPass / http://127.0.0.1:9000/ ProxyPassReverse / http://127.0.0.1:9000/ @@ -10,8 +10,8 @@ /VirtualHost VirtualHost *:443 - ServerName etherpad.wikimedia.org - ServerAlias eiximenis.wikimedia.org + ServerName etherpad-old.wikimedia.org + ServerAlias etherpad.wikimedia.org eiximenis.wikimedia.org SSLEngine on SSLProtocol -ALL +SSLv3 +TLSv1 SSLCipherSuite AES128-GCM-SHA256:RC4-SHA:RC4-MD5:DES-CBC3-SHA:AES128-SHA:AES256-SHA diff --git a/templates/etherpad/etherpad.local.properties.erb b/templates/etherpad/etherpad.local.properties.erb index bbb4fed..f528f66 100644 --- a/templates/etherpad/etherpad.local.properties.erb +++ b/templates/etherpad/etherpad.local.properties.erb @@ -15,7 +15,7 @@ logDir = /var/log/etherpad modulePath = ./src motdPage = /ep/pad/view/ro.3PfHCD0ApLc/latest?fullScreen=1slider=0sidebar=0 -topdomains = etherpad.wikimedia.org,eiximenis.wikimedia.org,%= fqdn %,localhost,localhost.localdomain +topdomains = etherpad-old.wikimedia.org,etherpad-old.wikimedia.org,eiximenis.wikimedia.org,%= fqdn %,localhost,localhost.localdomain transportPrefix = /comet transportUseWildcardSubdomains = true useHttpsUrls = false -- To view, visit https://gerrit.wikimedia.org/r/78832 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Iad9a57fe0b4b8387a33789392027e3f90382dc9f Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Akosiaris akosia...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] OLD etherpad install to etherpad-old.wikimedia.org - change (operations/puppet)
Akosiaris has submitted this change and it was merged. Change subject: OLD etherpad install to etherpad-old.wikimedia.org .. OLD etherpad install to etherpad-old.wikimedia.org Change-Id: Iad9a57fe0b4b8387a33789392027e3f90382dc9f --- M files/misc/etherpad/etherpad.proxy.apache.conf M templates/etherpad/etherpad.local.properties.erb 2 files changed, 5 insertions(+), 5 deletions(-) Approvals: Akosiaris: Looks good to me, approved jenkins-bot: Verified diff --git a/files/misc/etherpad/etherpad.proxy.apache.conf b/files/misc/etherpad/etherpad.proxy.apache.conf index 15a487a..f60d6bf 100644 --- a/files/misc/etherpad/etherpad.proxy.apache.conf +++ b/files/misc/etherpad/etherpad.proxy.apache.conf @@ -1,7 +1,7 @@ VirtualHost *:80 - ServerName etherpad.wikimedia.org - ServerAlias eiximenis.wikimedia.org + ServerName etherpad-old.wikimedia.org + ServerAlias etherpad.wikimedia.org eiximenis.wikimedia.org RewriteEngine on ProxyPass / http://127.0.0.1:9000/ ProxyPassReverse / http://127.0.0.1:9000/ @@ -10,8 +10,8 @@ /VirtualHost VirtualHost *:443 - ServerName etherpad.wikimedia.org - ServerAlias eiximenis.wikimedia.org + ServerName etherpad-old.wikimedia.org + ServerAlias etherpad.wikimedia.org eiximenis.wikimedia.org SSLEngine on SSLProtocol -ALL +SSLv3 +TLSv1 SSLCipherSuite AES128-GCM-SHA256:RC4-SHA:RC4-MD5:DES-CBC3-SHA:AES128-SHA:AES256-SHA diff --git a/templates/etherpad/etherpad.local.properties.erb b/templates/etherpad/etherpad.local.properties.erb index bbb4fed..f528f66 100644 --- a/templates/etherpad/etherpad.local.properties.erb +++ b/templates/etherpad/etherpad.local.properties.erb @@ -15,7 +15,7 @@ logDir = /var/log/etherpad modulePath = ./src motdPage = /ep/pad/view/ro.3PfHCD0ApLc/latest?fullScreen=1slider=0sidebar=0 -topdomains = etherpad.wikimedia.org,eiximenis.wikimedia.org,%= fqdn %,localhost,localhost.localdomain +topdomains = etherpad-old.wikimedia.org,etherpad-old.wikimedia.org,eiximenis.wikimedia.org,%= fqdn %,localhost,localhost.localdomain transportPrefix = /comet transportUseWildcardSubdomains = true useHttpsUrls = false -- To view, visit https://gerrit.wikimedia.org/r/78832 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Iad9a57fe0b4b8387a33789392027e3f90382dc9f Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Akosiaris akosia...@wikimedia.org Gerrit-Reviewer: Akosiaris 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] Sync parserTests with core. - change (mediawiki...Parsoid)
Cscott has uploaded a new change for review. https://gerrit.wikimedia.org/r/78833 Change subject: Sync parserTests with core. .. Sync parserTests with core. This matches upstream commit 9b22f7bc26f770e339bd9fa6b3542c84bb7723eb. Change-Id: I3a06fbce0858507ac86e1832e7cf3456cfda1da4 --- M js/tests/fetch-parserTests.txt.js M js/tests/parserTests.txt 2 files changed, 424 insertions(+), 34 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Parsoid refs/changes/33/78833/1 diff --git a/js/tests/fetch-parserTests.txt.js b/js/tests/fetch-parserTests.txt.js index aa6d787..a3426bc 100755 --- a/js/tests/fetch-parserTests.txt.js +++ b/js/tests/fetch-parserTests.txt.js @@ -10,9 +10,9 @@ // and update these hashes automatically. // // You can use 'sha1sum -b tests/parser/parserTests.txt' to compute this value: -var expectedSHA1 = d1619d3fe6fc04c2b33a0ecb6c28ae1ee4d28270; +var expectedSHA1 = 3aa4ff168f50d5a9981372ffcbb5b501c13e; // git log --pretty=oneline -1 tests/parser/parserTests.txt -var latestCommit = e07be1427ba6560fe8b08c720bfed9a2aa87f290; +var latestCommit = 9b22f7bc26f770e339bd9fa6b3542c84bb7723eb; var fs = require('fs'), path = require('path'), diff --git a/js/tests/parserTests.txt b/js/tests/parserTests.txt index 3b5ecaf..41d49d1 100644 --- a/js/tests/parserTests.txt +++ b/js/tests/parserTests.txt @@ -196,7 +196,11 @@ b a -!--foo--!--More than 1 comment disables stripping of this line!-- +!--foo--!--More than 1 comment, still stripped-- +b + +a + !--foo-- ! !-- bar -- b a @@ -228,7 +232,11 @@ /p hr / pa -/ppb +b +/p +hr / +pa +b /p hr / pa @@ -288,7 +296,7 @@ b a - !--foo--!--More than 1 comment disables stripping of this line!-- + !--foo--!--More than 1 comment doesn't disable stripping of this line!-- b a @@ -311,7 +319,7 @@ /p hr / pa -/ppb +b /p hr / pa @@ -871,6 +879,74 @@ /p !! end +!! test +wbr is valid wikitext (bug 52468) +!! input +wbr +!! result +pwbr / +/p +!! end + +# strike is HTML4, s is HTML4/5. +!! test +s or strike for strikethrough +!! input +strikestrike/strike + +ss/s +!! result +pstrikestrike/strike +/ppss/s +/p +!! end + +!! test +Non-word characters don't terminate tag names (bug 17663, 40670, 52022) +!! input +b→ doesn't work! /b + +bä doesn't work! /b + +boo works fine /b + +s.foofoo/s + +s.foos.foo/s.foo + +sub-ID#1 +!! result +plt;b→gt; doesn't work! lt;/bgt; +/pplt;bägt; doesn't work! lt;/bgt; +/pplt;boogt; works fine lt;/bgt; +/pplt;s.foogt;foolt;/sgt; +/pplt;s.foogt;s.foolt;/s.foogt; +/pplt;sub-ID#1gt; +/p +!! end + +### +### Special characters +### + +!! test +Bare pipe character (bug 52363) +!! input +| +!! result +p| +/p +!! end + +!! test +Bare pipe character from a template (bug 52363) +!! input +{{pipe}} +!! result +p| +/p +!! end + ### ### nowiki test cases ### @@ -1276,8 +1352,6 @@ !! end -# Expected output in the following test is not really expected (there should be -# pre in the output) -- it's only testing for well-formedness. !! test Bug 6200: Preformatted in blockquote !! input @@ -1286,7 +1360,53 @@ /blockquote !! result blockquote - Blah +preBlah +/pre +/blockquote + +!! end + +!! test +Bug 51086: Double newlines in blockquotes should be turned into paragraphs +!! input +blockquote +Foo + +Bar +/blockquote +!! result +blockquote +pFoo +/ppBar +/p +/blockquote + +!! end + +!! test +Bug 15491: ins/del in blockquote +!! input +blockquote +Foo delbar/del insbaz/ins quux +/blockquote +!! result +blockquote +pFoo delbar/del insbaz/ins quux +/p +/blockquote + +!! end + +# Note that the p-wrapping is newline sensitive, which could be +# considered a bug: tidy will wrap only the 'Foo' in the example +# below in a p tag. (see comment 23-25 of bug #6200) +!! test +Bug 15491: ins/del in blockquote (2) +!! input +blockquoteFoo delbar/del insbaz/ins quux +/blockquote +!! result +blockquoteFoo delbar/del insbaz/ins quux /blockquote !! end @@ -1801,7 +1921,8 @@ /pre /center blockquote - foo +prefoo +/pre /blockquote tabletrtd prefoo @@ -5448,21 +5569,20 @@ !!end !!test -Single-comment whitespace lines dont break lists, but multi-comment whitespace lines do +Single-comment whitespace lines dont break lists, and so do multi-comment whitespace lines !!input *a !--This line will NOT split the list-- *b !--This line will NOT split the list either-- *c - !--foo-- !--This line with more than 1 comment will split the list-- + !--foo-- ! !--This line NOT split the list either-- *d !!result ullia /lilib /lilic -/li/ul -ullid +/lilid /li/ul !!end @@ -5597,6 +5717,11 @@ ### Magic Words ### +# Note that the current date is hard-coded as +# 1970-01-01T00:02:03Z (a Thursday) +# when running parser tests. The timezone is also fixed to GMT, so +# local date will be identical to current date. + !! test Magic Word: {{CURRENTDAY}} !! input @@ -5643,6
[MediaWiki-commits] [Gerrit] Basic help for multi-process indexing - change (mediawiki...CirrusSearch)
Manybubbles has uploaded a new change for review. https://gerrit.wikimedia.org/r/78834 Change subject: Basic help for multi-process indexing .. Basic help for multi-process indexing Teach forceSearchIndex.php how to spit out commands to run itself in a chunked mode so you can run it in multiple cpus/machines. Change-Id: I76d5fde51c7c0bc914274a704e2dfc5eaa37a41e --- M README M forceSearchIndex.php 2 files changed, 55 insertions(+), 10 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/CirrusSearch refs/changes/34/78834/1 diff --git a/README b/README index 4dc5d3f..01e89f5 100644 --- a/README +++ b/README @@ -30,14 +30,18 @@ Bootstrapping large wikis - -forceSeachIndex.php accepts the --fromId and --toId parameters which can be used to split up the -work of bootstrapping the wiki into multiple processes. Most of the load caused by bootstrapping -is on MySQL but if you've got a really big database or a few slaves then they should be able to -handle a whole bunch of bootstraps at once. +The --batch-size parameter controls the number documents read from MySQL and inserted into +elasticsearch at one time. It defaults to 500 but you should feel free to play with it. -Also, the --batch-size parameter controls the number documents read from MySQL and inserted into -elasticsearch at one time. It defaults to 500 because that seems to give good performence (~100 articles -per second) in development but you should feel free to play with it. +forceSeachIndex.php accepts the --fromId and --toId parameters which can be used to split up the +work of bootstrapping the wiki into multiple processes. Since most of the load on search indexing is on the +indexing script in the php process you should be able to break the process into multiple chunks and farm +them out to multiple php processes/machines. The --buildChunks argument of forceSearchIndex.php will cause +the script to build invocations of itself that you can splay out to different processes. For example: + rm -rf /tmp/index_log + mkdir /tmp/index_log + php forceSearchIndex.php --buildChunks 10 --batch-size 50 | + xargs -I{} -t -P4 sh -c 'php {} /tmp/index_log/$$.log' Handling elasticsearch outages @@ -87,4 +91,4 @@ Licensing information - CirrusSearch makes use of the Elastica library to connect to elasticsearch http://elastica.io/. -It is Apache licensed and you can read the license Elastica/LICENSE.txt. \ No newline at end of file +It is Apache licensed and you can read the license Elastica/LICENSE.txt. diff --git a/forceSearchIndex.php b/forceSearchIndex.php index 0105930..7a0c75c 100644 --- a/forceSearchIndex.php +++ b/forceSearchIndex.php @@ -41,13 +41,15 @@ . query at the cost of having to reindex by page id rather than time.\n\n . Note: All froms are _exclusive_ and all tos are _inclusive_.\n . Note 2: Setting fromId and toId use the efficient query so those are ok.; - $this-mBatchSize = 500; + $this-setBatchSize( 500 ); $this-addOption( 'from', 'Start date of reindex in -mm-ddTHH:mm:ssZ (exc. Defaults to 0 epoch.', false, true ); $this-addOption( 'to', 'Stop date of reindex in -mm-ddTHH:mm:ssZ. Defaults to now.', false, true ); $this-addOption( 'fromId', 'Start indexing at a specific page_id. Not useful with --deletes.', false, true ); $this-addOption( 'toId', 'Stop indexing at a specific page_id. Note useful with --deletes or --from or --to.', false, true ); $this-addOption( 'deletes', 'If this is set then just index deletes, not updates or creates.', false ); $this-addOption( 'limit', 'Maximum number of pages to process before exiting the script. Default to unlimited.', false, true ); + $this-addOption( 'buildChunks', 'Instead of running the script spit out N commands that can be farmed out to ' . + 'different processes or machines to rebuild the index. Works with fromId and toId, not from and to.', false, true ); } public function execute() { @@ -60,6 +62,11 @@ $this-toId = $this-getOption( 'toId' ); $this-indexUpdates = !$this-getOption( 'deletes', false ); $this-limit = $this-getOption( 'limit' ); + $buildChunks = $this-getOption( 'buildChunks' ); + if ( $buildChunks !== null ) { + $this-buildChunks( $buildChunks ); + return; + } if ( $this-indexUpdates ) { $operationName = 'Indexed'; @@ -143,7 +150,7 @@ $search = SearchEngine::create(); if ( $maxUpdate === null ) {
[MediaWiki-commits] [Gerrit] Progress reporting on standard error stream - change (operations...incremental)
Petr Onderka has uploaded a new change for review. https://gerrit.wikimedia.org/r/78835 Change subject: Progress reporting on standard error stream .. Progress reporting on standard error stream Change-Id: I137e0e488e3eb461393aa85c5fe6ff9e9cdbc6ff --- M XmlInput/WrapperInputStream.h M libexecstream/exec-stream.cpp M libexecstream/win/exec-stream-helpers.cpp M libexecstream/win/exec-stream-helpers.h M main.cpp 5 files changed, 44 insertions(+), 8 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/dumps/incremental refs/changes/35/78835/1 diff --git a/XmlInput/WrapperInputStream.h b/XmlInput/WrapperInputStream.h index 9637428..fd1df61 100644 --- a/XmlInput/WrapperInputStream.h +++ b/XmlInput/WrapperInputStream.h @@ -1,17 +1,22 @@ #include iostream +#include functional #include ../XML/xmlfile.h class WrapperInputStream : public XML::InputStream { private: std::istream wrapped; +std::functionvoid() sideAction; public: -WrapperInputStream(std::istream wrapped) -: wrapped(wrapped) +WrapperInputStream(std::istream wrapped, std::functionvoid() sideAction = nullptr) +: wrapped(wrapped), sideAction(sideAction) {} virtual int read(XML_Char *buf, size_t bufLen) override { +if (sideAction != nullptr) +sideAction(); + wrapped.read(buf, bufLen); return wrapped.gcount(); } diff --git a/libexecstream/exec-stream.cpp b/libexecstream/exec-stream.cpp index 5f28b2e..e3a2604 100644 --- a/libexecstream/exec-stream.cpp +++ b/libexecstream/exec-stream.cpp @@ -81,6 +81,7 @@ bool empty(); bool full( std::size_t limit ); // limit==0 - no limit +std::size_t size(); void clear(); @@ -198,6 +199,11 @@ return limit!=0 m_total_size=limit; } +std::size_t buffer_list_t::size() +{ +return m_total_size; +} + void buffer_list_t::clear() { for( buffers_t::iterator i=m_buffers.begin(); i!=m_buffers.end(); ++i ) { @@ -230,9 +236,10 @@ void clear(); protected: -virtual int_type underflow(); -virtual int_type overflow( int_type c ); -virtual int sync(); +virtual int_type underflow() override; +virtual int_type overflow( int_type c ) override; +virtual int sync() override; +virtual std::streamsize showmanyc() override; private: bool send_buffer(); @@ -330,6 +337,11 @@ return 0; } +std::streamsize exec_stream_buffer_t::showmanyc() +{ +return m_thread_buffer.size(); +} + // stream classes class exec_istream_t : public std::istream { diff --git a/libexecstream/win/exec-stream-helpers.cpp b/libexecstream/win/exec-stream-helpers.cpp index ac624fe..69ef136 100644 --- a/libexecstream/win/exec-stream-helpers.cpp +++ b/libexecstream/win/exec-stream-helpers.cpp @@ -290,7 +290,7 @@ m_error_code=ERROR_SUCCESS; m_error_message=; -m_wait_timeout=1; +m_wait_timeout=10; m_buffer_limit=0; m_read_buffer_size=4096; @@ -725,3 +725,7 @@ m_error_message=error_message; } +std::size_t thread_buffer_t::size() +{ +return m_buffer_list.size(); +} \ No newline at end of file diff --git a/libexecstream/win/exec-stream-helpers.h b/libexecstream/win/exec-stream-helpers.h index 3cd1759..ab3dbc2 100644 --- a/libexecstream/win/exec-stream-helpers.h +++ b/libexecstream/win/exec-stream-helpers.h @@ -145,6 +145,7 @@ void get( exec_stream_t::stream_kind_t kind, char * dst, std::size_t size, bool no_more ); // may be called only after start_reader_thread void put( char * const src, std::size_t size, bool no_more );// may be called only after start_writer_thread +std::size_t size(); bool stop_thread(); bool abort_thread(); diff --git a/main.cpp b/main.cpp index 5927eff..5288871 100644 --- a/main.cpp +++ b/main.cpp @@ -137,8 +137,22 @@ writer.SetDumpKind(DumpKind::None); -exec_stream_t dumpBackupProcess(phpPath, dumpBackupParameters); -WrapperInputStream dumpBackupStream(dumpBackupProcess.out()); +exec_stream_t dumpBackupProcess; +dumpBackupProcess.set_buffer_limit(exec_stream_t::s_out, 8192); +dumpBackupProcess.start(phpPath, dumpBackupParameters); + +WrapperInputStream dumpBackupStream(dumpBackupProcess.out(), +[]() +{ +auto stream = dumpBackupProcess.err(); +char buffer[1024]; +std::streamsize count = 0; +do +{ +count = stream.readsome(buffer, 1024); +std::cerr.write(buffer, count); +} while (count != 0); +}); XmlMediawikiProcessor::Process(writer, dumpBackupStream); -- To view, visit https://gerrit.wikimedia.org/r/78835 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I137e0e488e3eb461393aa85c5fe6ff9e9cdbc6ff Gerrit-PatchSet: 1 Gerrit-Project:
[MediaWiki-commits] [Gerrit] Improve separation of ExternalStore related code - change (mediawiki...Flow)
Matthias Mullie has uploaded a new change for review. https://gerrit.wikimedia.org/r/78836 Change subject: Improve separation of ExternalStore related code .. Improve separation of ExternalStore related code Change-Id: I670b532cbaea5c8665fe5a57e33933c75e82c729 --- M includes/Data/ObjectManager.php M includes/Data/RevisionStorage.php M includes/Model/AbstractRevision.php 3 files changed, 157 insertions(+), 63 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Flow refs/changes/36/78836/1 diff --git a/includes/Data/ObjectManager.php b/includes/Data/ObjectManager.php index d5b2f0a..f2c9ca0 100644 --- a/includes/Data/ObjectManager.php +++ b/includes/Data/ObjectManager.php @@ -8,6 +8,7 @@ use BagOStuff; use RuntimeException; use SplObjectStorage; +use ExternalStore; // Perhaps rethink lifecycle interface. Simpler. // Indexes need access to the cache and the backend storage. @@ -58,6 +59,148 @@ function remove( array $row ); } +/** + * Backing store for which part of the data is written to an external store. + * + * Typically, data (potentially) written to ES has 2 relevant columns: + * * content: content column or url reference to location on ES + * * flags: flags associated with the content (e.g. 'external', 'gzip', ...) + * + * To simplify implementation, we'll be doing some manipulation of the data to + * and from the real object storage. + * We'll want to always expose all data to out object mapper: both the full + * content the url referencing the content's location on ES. + * We'll create a new column (which does not exist in object storage) that'll + * hold the url, while the content column exposed to object mapper will always + * hold the full content. + * + * Although we only have 2 relevant columns in object storage, we'll expose 3 + * to object mapper: + * * content: the full content + * * flags: content's associated flags + * * url: the url referencing the content's external location (or null if none) + */ +abstract class WritableObjectStorageWithExternalStorage implements WritableObjectStorage { + /** +* External store to write data to (e.g. $wgDefaultExternalStore) +* +* @var array|bool false for no object storage +*/ + protected $externalStore = false; + + /** +* Columns relevant for External Storage. +* +* @var array A map of columns relevant to external storage; all having +* 'content', 'flags' 'url' keys identifying the columns +*/ + protected $externalStorageColumns = array( /* + array( + 'content' = content_column, + 'flags' = flags_column, + 'url' - bogus_url_column + ), + */ ); + + /** +* Processes a $row: all columns eligible for ExternalStore will have their +* data saved to the external store (except when 'external' flag is set, in +* which case the content is a reference to the external store already) +* +* $row is the data tossed in by object mapper's toStorageRow. +* Return value will be inserted into DB. +* +* @param array $row +* @return array +* @throws \MWException +*/ + protected function insertExternalStorage( array $row ) { + foreach ( $this-externalStorageColumns as $column ) { + if ( !isset( $row[$column['content']] ) || !isset( $row[$column['flags']] ) ) { + continue; + } + + $flags = explode( ',', $row[$column['flags']] ); + + if ( $row[$column['url']] ) { + // if url is set already, no need to save anew + $row[$column['content']] = $row[$column['url']]; + } else { + if ( $this-externalStore ) { + // save to external store keep reference to it's new location + $row[$column['content']] = ExternalStore::insertWithFallback( $this-externalStore, $row[$column['content']] ); + if ( !$row[$column['content']] ) { + throw new \MWException( Unable to store text to external storage ); + } + + // add 'external' flag + $flags[] = 'external'; + } + } + + $row[$column['flags']] = implode( ',', array_unique( array_filter( $flags ) ) ); + unset( $row[$column['url']] ); + } + + return $row; + } + + /** +* Processed
[MediaWiki-commits] [Gerrit] Make msg method of DerivativeContext work properly. - change (mediawiki/core)
Brian Wolff has uploaded a new change for review. https://gerrit.wikimedia.org/r/78837 Change subject: Make msg method of DerivativeContext work properly. .. Make msg method of DerivativeContext work properly. Previously, the msg method was not taking into account any changes to the context, and was just using the original context. For example, if you had a DerivativeContext object, where the original context had a language of en, and then you did $derivContext-setLanguage( 'fr' );, $derivContext-msg( 'foo' ) was still outputting stuff in english instead of french. Change-Id: I4a87e0e2664e77bf79a80c873db384e0c3f607e7 --- M includes/context/DerivativeContext.php 1 file changed, 16 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/37/78837/1 diff --git a/includes/context/DerivativeContext.php b/includes/context/DerivativeContext.php index eda56a7..d4caf05 100644 --- a/includes/context/DerivativeContext.php +++ b/includes/context/DerivativeContext.php @@ -281,4 +281,20 @@ return $this-getContext()-getSkin(); } } + + /** +* Get a message using the current context. +* +* This can't just inherit from ContextSource, since then +* it would set only the original context, and not take +* into account any changes. +* +* @param String Message name +* @param Variable number of message arguments +* @return Message +*/ + public function msg() { + $args = func_get_args(); + return call_user_func_array( 'wfMessage', $args )-setContext( $this ); + } } -- To view, visit https://gerrit.wikimedia.org/r/78837 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I4a87e0e2664e77bf79a80c873db384e0c3f607e7 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Brian Wolff bawolff...@gmail.com ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] fix. catch and log badly formatted entries in brokers from g... - change (analytics/user-metrics)
Rfaulk has uploaded a new change for review. https://gerrit.wikimedia.org/r/78840 Change subject: fix. catch and log badly formatted entries in brokers from get_all. .. fix. catch and log badly formatted entries in brokers from get_all. Change-Id: I790bfa9fb7208a11acd5328d06b08bd0c5681677 --- M user_metrics/api/broker.py 1 file changed, 6 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/analytics/user-metrics refs/changes/40/78840/1 diff --git a/user_metrics/api/broker.py b/user_metrics/api/broker.py index 439ad9a..bafa293 100644 --- a/user_metrics/api/broker.py +++ b/user_metrics/api/broker.py @@ -145,7 +145,12 @@ with open(target, 'r') as f: lines = f.read().split('\n') for idx, line in enumerate(lines): -item = json.loads(line) +try: +item = json.loads(line) +except Exception: +logging.error(__name__ + ' :: Could not parse JSON ' + 'from: {0}'.format(line)) +continue all_keys.append(item) except IOError: with open(target, 'w'): -- To view, visit https://gerrit.wikimedia.org/r/78840 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I790bfa9fb7208a11acd5328d06b08bd0c5681677 Gerrit-PatchSet: 1 Gerrit-Project: analytics/user-metrics Gerrit-Branch: master Gerrit-Owner: Rfaulk rfaulk...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mod. add some docs or the new code. - change (analytics/user-metrics)
Rfaulk has uploaded a new change for review. https://gerrit.wikimedia.org/r/78841 Change subject: mod. add some docs or the new code. .. mod. add some docs or the new code. Change-Id: I1ecb8deeb4280c9773461032a85833e68b41976f --- M README.md 1 file changed, 6 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/analytics/user-metrics refs/changes/41/78841/1 diff --git a/README.md b/README.md index 982f30e..f74c363 100644 --- a/README.md +++ b/README.md @@ -56,6 +56,12 @@ datasource hosts are reachable from your environment. To run the server execute: $ python user_metrics/api/run.py + $ python user_metrics/api/run_handlers.py + +The module run.py initiates the flask web server and is also the wsgi target if the instance is being run via Apache. +Also it is necessary to execute run_handlers.py which initiates the job handling processes. If you are running the +service through Apache this module will need to be initiated independently, it utilizes the queues that are +visible to the http view targets. Once installed you will need to modify the configuration files. This can be found in the file `settings.py` under -- To view, visit https://gerrit.wikimedia.org/r/78841 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I1ecb8deeb4280c9773461032a85833e68b41976f Gerrit-PatchSet: 1 Gerrit-Project: analytics/user-metrics Gerrit-Branch: master Gerrit-Owner: Rfaulk rfaulk...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mod. refactor job_queue views to utilize brokers. - change (analytics/user-metrics)
Rfaulk has uploaded a new change for review. https://gerrit.wikimedia.org/r/78839 Change subject: mod. refactor job_queue views to utilize brokers. .. mod. refactor job_queue views to utilize brokers. Change-Id: I9556b2c019099d88b43849e2f3fd027c3496a922 --- M user_metrics/api/views.py 1 file changed, 22 insertions(+), 20 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/analytics/user-metrics refs/changes/39/78839/1 diff --git a/user_metrics/api/views.py b/user_metrics/api/views.py index 021056b..5419a25 100644 --- a/user_metrics/api/views.py +++ b/user_metrics/api/views.py @@ -425,33 +425,35 @@ error = get_errors(request.args) p_list = list() -p_list.append(Markup('theadtrthis_alive/ththurl' +p_list.append(Markup('theadtrthstate/ththurl' '/th/tr/thead\ntbody\n')) -# Get keys from broker target - -umapi_broker_context.add(REQUEST_BROKER_TARGET, url_hash, request.url) - +# Get keys from broker targets items_req = umapi_broker_context.get_all_itmes(REQUEST_BROKER_TARGET) items_res = umapi_broker_context.get_all_itmes(RESPONSE_BROKER_TARGET) items_proc = umapi_broker_context.get_all_itmes(PROCESS_BROKER_TARGET) -keys = [] -for key in keys: -# Log the status of the job -# TODO this will be part of the broker data -url = '' -is_alive = False +logging.info(str(items_req)) +logging.info(str(items_res)) +logging.info(str(items_proc)) -p_list.append('trtd') -response_url = .join(['a href=', -request.url_root, -url + '', url, '/a']) -p_list.append(/tdtd.join([is_alive, -escape(Markup(response_url)), -])) -p_list.append(Markup('/td/tr')) -p_list.append(Markup('\n/tbody')) +for item in items_req: +url = item[item.keys()[0]] +row_markup = 'trtd{0}/tdtda href={1}{2}/a/td/tr'\ +.format('request pending', url, url) +p_list.append(Markup(row_markup)) + +for item in items_req: +url = item[item.keys()[0]] +row_markup = 'trtd{0}/tdtda href={1}{2}/a/td/tr'\ +.format('response generating', url, url) +p_list.append(Markup(row_markup)) + +for item in items_proc: +url = item[item.keys()[0]] +row_markup = 'trtd{0}/tdtda href={1}{2}/a/td/tr'\ +.format('processing', url, url) +p_list.append(Markup(row_markup)) if error: return render_template('queue.html', procs=p_list, error=error) -- To view, visit https://gerrit.wikimedia.org/r/78839 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I9556b2c019099d88b43849e2f3fd027c3496a922 Gerrit-PatchSet: 1 Gerrit-Project: analytics/user-metrics Gerrit-Branch: master Gerrit-Owner: Rfaulk rfaulk...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] fix. logging on request processing. - change (analytics/user-metrics)
Rfaulk has uploaded a new change for review. https://gerrit.wikimedia.org/r/78838 Change subject: fix. logging on request processing. .. fix. logging on request processing. Change-Id: Icf2d7192e7da93e9befb3feb16e2de74891d4535 --- M user_metrics/api/engine/request_manager.py 1 file changed, 3 insertions(+), 3 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/analytics/user-metrics refs/changes/38/78838/1 diff --git a/user_metrics/api/engine/request_manager.py b/user_metrics/api/engine/request_manager.py index 868bdd8..3eea01a 100644 --- a/user_metrics/api/engine/request_manager.py +++ b/user_metrics/api/engine/request_manager.py @@ -164,9 +164,9 @@ umapi_broker_context.add(PROCESS_BROKER_TARGET, url_hash, req_item) -logging.debug(log_name + ' :: PULLING item from request queue - ' - '\n\t{0}' - .format(req_item)) +logging.debug(log_name + ' :: PULLING item from request queue - ' + '\n\t{0}' + .format(req_item)) # Process complete jobs # - -- To view, visit https://gerrit.wikimedia.org/r/78838 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Icf2d7192e7da93e9befb3feb16e2de74891d4535 Gerrit-PatchSet: 1 Gerrit-Project: analytics/user-metrics Gerrit-Branch: master Gerrit-Owner: Rfaulk rfaulk...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] fix. logging on request processing. - change (analytics/user-metrics)
Rfaulk has submitted this change and it was merged. Change subject: fix. logging on request processing. .. fix. logging on request processing. Change-Id: Icf2d7192e7da93e9befb3feb16e2de74891d4535 --- M user_metrics/api/engine/request_manager.py 1 file changed, 3 insertions(+), 3 deletions(-) Approvals: Rfaulk: Verified; Looks good to me, approved diff --git a/user_metrics/api/engine/request_manager.py b/user_metrics/api/engine/request_manager.py index 868bdd8..3eea01a 100644 --- a/user_metrics/api/engine/request_manager.py +++ b/user_metrics/api/engine/request_manager.py @@ -164,9 +164,9 @@ umapi_broker_context.add(PROCESS_BROKER_TARGET, url_hash, req_item) -logging.debug(log_name + ' :: PULLING item from request queue - ' - '\n\t{0}' - .format(req_item)) +logging.debug(log_name + ' :: PULLING item from request queue - ' + '\n\t{0}' + .format(req_item)) # Process complete jobs # - -- To view, visit https://gerrit.wikimedia.org/r/78838 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Icf2d7192e7da93e9befb3feb16e2de74891d4535 Gerrit-PatchSet: 1 Gerrit-Project: analytics/user-metrics Gerrit-Branch: master Gerrit-Owner: Rfaulk rfaulk...@wikimedia.org Gerrit-Reviewer: Rfaulk rfaulk...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] fix. catch and log badly formatted entries in brokers from g... - change (analytics/user-metrics)
Rfaulk has submitted this change and it was merged. Change subject: fix. catch and log badly formatted entries in brokers from get_all. .. fix. catch and log badly formatted entries in brokers from get_all. Change-Id: I790bfa9fb7208a11acd5328d06b08bd0c5681677 --- M user_metrics/api/broker.py 1 file changed, 6 insertions(+), 1 deletion(-) Approvals: Rfaulk: Verified; Looks good to me, approved diff --git a/user_metrics/api/broker.py b/user_metrics/api/broker.py index 439ad9a..bafa293 100644 --- a/user_metrics/api/broker.py +++ b/user_metrics/api/broker.py @@ -145,7 +145,12 @@ with open(target, 'r') as f: lines = f.read().split('\n') for idx, line in enumerate(lines): -item = json.loads(line) +try: +item = json.loads(line) +except Exception: +logging.error(__name__ + ' :: Could not parse JSON ' + 'from: {0}'.format(line)) +continue all_keys.append(item) except IOError: with open(target, 'w'): -- To view, visit https://gerrit.wikimedia.org/r/78840 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I790bfa9fb7208a11acd5328d06b08bd0c5681677 Gerrit-PatchSet: 1 Gerrit-Project: analytics/user-metrics Gerrit-Branch: master Gerrit-Owner: Rfaulk rfaulk...@wikimedia.org Gerrit-Reviewer: Rfaulk rfaulk...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mod. add some docs or the new code. - change (analytics/user-metrics)
Rfaulk has submitted this change and it was merged. Change subject: mod. add some docs or the new code. .. mod. add some docs or the new code. Change-Id: I1ecb8deeb4280c9773461032a85833e68b41976f --- M README.md 1 file changed, 6 insertions(+), 0 deletions(-) Approvals: Rfaulk: Verified; Looks good to me, approved diff --git a/README.md b/README.md index 982f30e..f74c363 100644 --- a/README.md +++ b/README.md @@ -56,6 +56,12 @@ datasource hosts are reachable from your environment. To run the server execute: $ python user_metrics/api/run.py + $ python user_metrics/api/run_handlers.py + +The module run.py initiates the flask web server and is also the wsgi target if the instance is being run via Apache. +Also it is necessary to execute run_handlers.py which initiates the job handling processes. If you are running the +service through Apache this module will need to be initiated independently, it utilizes the queues that are +visible to the http view targets. Once installed you will need to modify the configuration files. This can be found in the file `settings.py` under -- To view, visit https://gerrit.wikimedia.org/r/78841 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I1ecb8deeb4280c9773461032a85833e68b41976f Gerrit-PatchSet: 1 Gerrit-Project: analytics/user-metrics Gerrit-Branch: master Gerrit-Owner: Rfaulk rfaulk...@wikimedia.org Gerrit-Reviewer: Rfaulk rfaulk...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mod. refactor job_queue views to utilize brokers. - change (analytics/user-metrics)
Rfaulk has submitted this change and it was merged. Change subject: mod. refactor job_queue views to utilize brokers. .. mod. refactor job_queue views to utilize brokers. Change-Id: I9556b2c019099d88b43849e2f3fd027c3496a922 --- M user_metrics/api/views.py 1 file changed, 22 insertions(+), 20 deletions(-) Approvals: Rfaulk: Verified; Looks good to me, approved diff --git a/user_metrics/api/views.py b/user_metrics/api/views.py index 021056b..5419a25 100644 --- a/user_metrics/api/views.py +++ b/user_metrics/api/views.py @@ -425,33 +425,35 @@ error = get_errors(request.args) p_list = list() -p_list.append(Markup('theadtrthis_alive/ththurl' +p_list.append(Markup('theadtrthstate/ththurl' '/th/tr/thead\ntbody\n')) -# Get keys from broker target - -umapi_broker_context.add(REQUEST_BROKER_TARGET, url_hash, request.url) - +# Get keys from broker targets items_req = umapi_broker_context.get_all_itmes(REQUEST_BROKER_TARGET) items_res = umapi_broker_context.get_all_itmes(RESPONSE_BROKER_TARGET) items_proc = umapi_broker_context.get_all_itmes(PROCESS_BROKER_TARGET) -keys = [] -for key in keys: -# Log the status of the job -# TODO this will be part of the broker data -url = '' -is_alive = False +logging.info(str(items_req)) +logging.info(str(items_res)) +logging.info(str(items_proc)) -p_list.append('trtd') -response_url = .join(['a href=', -request.url_root, -url + '', url, '/a']) -p_list.append(/tdtd.join([is_alive, -escape(Markup(response_url)), -])) -p_list.append(Markup('/td/tr')) -p_list.append(Markup('\n/tbody')) +for item in items_req: +url = item[item.keys()[0]] +row_markup = 'trtd{0}/tdtda href={1}{2}/a/td/tr'\ +.format('request pending', url, url) +p_list.append(Markup(row_markup)) + +for item in items_req: +url = item[item.keys()[0]] +row_markup = 'trtd{0}/tdtda href={1}{2}/a/td/tr'\ +.format('response generating', url, url) +p_list.append(Markup(row_markup)) + +for item in items_proc: +url = item[item.keys()[0]] +row_markup = 'trtd{0}/tdtda href={1}{2}/a/td/tr'\ +.format('processing', url, url) +p_list.append(Markup(row_markup)) if error: return render_template('queue.html', procs=p_list, error=error) -- To view, visit https://gerrit.wikimedia.org/r/78839 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I9556b2c019099d88b43849e2f3fd027c3496a922 Gerrit-PatchSet: 1 Gerrit-Project: analytics/user-metrics Gerrit-Branch: master Gerrit-Owner: Rfaulk rfaulk...@wikimedia.org Gerrit-Reviewer: Rfaulk rfaulk...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Progress reporting on standard error stream - change (operations...incremental)
Petr Onderka has submitted this change and it was merged. Change subject: Progress reporting on standard error stream .. Progress reporting on standard error stream Change-Id: I137e0e488e3eb461393aa85c5fe6ff9e9cdbc6ff --- M XmlInput/WrapperInputStream.h M libexecstream/exec-stream.cpp M libexecstream/posix/exec-stream-helpers.cpp M libexecstream/posix/exec-stream-helpers.h M libexecstream/win/exec-stream-helpers.cpp M libexecstream/win/exec-stream-helpers.h M main.cpp 7 files changed, 54 insertions(+), 11 deletions(-) Approvals: Petr Onderka: Verified; Looks good to me, approved diff --git a/XmlInput/WrapperInputStream.h b/XmlInput/WrapperInputStream.h index 9637428..fd1df61 100644 --- a/XmlInput/WrapperInputStream.h +++ b/XmlInput/WrapperInputStream.h @@ -1,17 +1,22 @@ #include iostream +#include functional #include ../XML/xmlfile.h class WrapperInputStream : public XML::InputStream { private: std::istream wrapped; +std::functionvoid() sideAction; public: -WrapperInputStream(std::istream wrapped) -: wrapped(wrapped) +WrapperInputStream(std::istream wrapped, std::functionvoid() sideAction = nullptr) +: wrapped(wrapped), sideAction(sideAction) {} virtual int read(XML_Char *buf, size_t bufLen) override { +if (sideAction != nullptr) +sideAction(); + wrapped.read(buf, bufLen); return wrapped.gcount(); } diff --git a/libexecstream/exec-stream.cpp b/libexecstream/exec-stream.cpp index 5f28b2e..06d3379 100644 --- a/libexecstream/exec-stream.cpp +++ b/libexecstream/exec-stream.cpp @@ -81,6 +81,7 @@ bool empty(); bool full( std::size_t limit ); // limit==0 - no limit +std::size_t size(); void clear(); @@ -198,6 +199,11 @@ return limit!=0 m_total_size=limit; } +std::size_t buffer_list_t::size() +{ +return m_total_size; +} + void buffer_list_t::clear() { for( buffers_t::iterator i=m_buffers.begin(); i!=m_buffers.end(); ++i ) { @@ -230,9 +236,10 @@ void clear(); protected: -virtual int_type underflow(); -virtual int_type overflow( int_type c ); -virtual int sync(); +virtual int_type underflow() override; +virtual int_type overflow( int_type c ) override; +virtual int sync() override; +virtual std::streamsize showmanyc() override; private: bool send_buffer(); @@ -330,6 +337,11 @@ return 0; } +std::streamsize exec_stream_buffer_t::showmanyc() +{ +return m_thread_buffer.size( m_kind ); +} + // stream classes class exec_istream_t : public std::istream { diff --git a/libexecstream/posix/exec-stream-helpers.cpp b/libexecstream/posix/exec-stream-helpers.cpp index a1c07b7..963dce7 100644 --- a/libexecstream/posix/exec-stream-helpers.cpp +++ b/libexecstream/posix/exec-stream-helpers.cpp @@ -302,9 +302,9 @@ m_in_bad=false; m_error_prefix=; m_error_code=0; -m_in_wait_timeout=2000; -m_out_wait_timeout=2000; -m_err_wait_timeout=2000; +m_in_wait_timeout=10; +m_out_wait_timeout=10; +m_err_wait_timeout=10; m_thread_termination_timeout=1000; m_in_buffer_limit=0; m_out_buffer_limit=0; @@ -840,3 +840,9 @@ pthread_cleanup_pop( 0 ); return 0; } + +std::size_t thread_buffer_t::size( exec_stream_t::stream_kind_t kind ) +{ +buffer_list_t buffer= kind==exec_stream_t::s_out ? m_out_buffer : m_err_buffer; +return buffer.size(); +} \ No newline at end of file diff --git a/libexecstream/posix/exec-stream-helpers.h b/libexecstream/posix/exec-stream-helpers.h index 13f1eaa..5b196c4 100644 --- a/libexecstream/posix/exec-stream-helpers.h +++ b/libexecstream/posix/exec-stream-helpers.h @@ -192,6 +192,7 @@ void get( exec_stream_t::stream_kind_t kind, char * dst, std::size_t size, bool no_more ); void put( char * src, std::size_t size, bool no_more ); +std::size_t size( exec_stream_t::stream_kind_t kind ); void close_in(); bool stop_thread(); diff --git a/libexecstream/win/exec-stream-helpers.cpp b/libexecstream/win/exec-stream-helpers.cpp index ac624fe..85eb61f 100644 --- a/libexecstream/win/exec-stream-helpers.cpp +++ b/libexecstream/win/exec-stream-helpers.cpp @@ -290,7 +290,7 @@ m_error_code=ERROR_SUCCESS; m_error_message=; -m_wait_timeout=1; +m_wait_timeout=10; m_buffer_limit=0; m_read_buffer_size=4096; @@ -725,3 +725,7 @@ m_error_message=error_message; } +std::size_t thread_buffer_t::size( exec_stream_t::stream_kind_t ) +{ +return m_buffer_list.size(); +} \ No newline at end of file diff --git a/libexecstream/win/exec-stream-helpers.h b/libexecstream/win/exec-stream-helpers.h index 3cd1759..51a2931 100644 --- a/libexecstream/win/exec-stream-helpers.h +++ b/libexecstream/win/exec-stream-helpers.h @@ -145,6 +145,7 @@ void get( exec_stream_t::stream_kind_t kind, char * dst, std::size_t
[MediaWiki-commits] [Gerrit] Improve parser test for bug 52760 (close tags are being stri... - change (mediawiki...Parsoid)
Cscott has uploaded a new change for review. https://gerrit.wikimedia.org/r/78842 Change subject: Improve parser test for bug 52760 (close tags are being stripped). .. Improve parser test for bug 52760 (close tags are being stripped). Split out the test for bug 52760 from the test for bug 17663, which should make it more clear what's going on. Change-Id: Iec7133e919a4ef35b781c92197009d889a659fd9 --- M js/tests/parserTests-blacklist.js M js/tests/parserTests.txt 2 files changed, 38 insertions(+), 32 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Parsoid refs/changes/42/78842/1 diff --git a/js/tests/parserTests-blacklist.js b/js/tests/parserTests-blacklist.js index 82ef94e..7e5430e 100644 --- a/js/tests/parserTests-blacklist.js +++ b/js/tests/parserTests-blacklist.js @@ -41,7 +41,7 @@ add(wt2html, Italics and bold); add(wt2html, Italics and possessives); add(wt2html, Italicized possessive); -add(wt2html, Non-word characters don't terminate tag names (bug 17663, 40670, 52022)); +add(wt2html, Isolated close tags should be treated as literal text (bug 52760)); add(wt2html, Bare pipe character (bug 52363)); add(wt2html, Bare pipe character from a template (bug 52363)); add(wt2html, Entities inside nowiki); @@ -557,7 +557,7 @@ add(wt2wt, Italics and bold: other quote tests: (3,2,3,3) (parsoid)); add(wt2wt, Italicized possessive); add(wt2wt, Parsoid only: Quote balancing context should be restricted to td/th cells on the same wikitext line\n(Requires tidy for PHP parser output to be fixed up)); -add(wt2wt, Non-word characters don't terminate tag names (bug 17663, 40670, 52022)); +add(wt2wt, Isolated close tags should be treated as literal text (bug 52760)); add(wt2wt, Bare pipe character (bug 52363)); add(wt2wt, Comment semantics: unclosed comment at end); add(wt2wt, Multiple lines without block tags); @@ -1252,7 +1252,7 @@ add(html2wt, Italics and bold: other quote tests: (3,2,3,3) (parsoid)); add(html2wt, Italicized possessive); add(html2wt, wbr is valid wikitext (bug 52468)); -add(html2wt, Non-word characters don't terminate tag names (bug 17663, 40670, 52022)); +add(html2wt, Isolated close tags should be treated as literal text (bug 52760)); add(html2wt, Bare pipe character (bug 52363)); add(html2wt, Bare pipe character from a template (bug 52363)); add(html2wt, nowiki unordered list); @@ -2422,26 +2422,23 @@ add(selser, Parsoid only: Quote balancing context should be restricted to td/th cells on the same wikitext line\n(Requires tidy for PHP parser output to be fixed up) [[0,[1,4]]]); add(selser, Parsoid only: Quote balancing context should be restricted to td/th cells on the same wikitext line\n(Requires tidy for PHP parser output to be fixed up) [[3,[2,4]]]); add(selser, Parsoid only: Quote balancing context should be restricted to td/th cells on the same wikitext line\n(Requires tidy for PHP parser output to be fixed up) [[4,1]]); -add(selser, Non-word characters don't terminate tag names (bug 17663, 40670, 52022) [[4],0,0,0,2,0,[4],0,[2],2,0]); -add(selser, Non-word characters don't terminate tag names (bug 17663, 40670, 52022) [4,0,0,2,[3],2,0,0,0,0,0]); -add(selser, Non-word characters don't terminate tag names (bug 17663, 40670, 52022) [4,0,4,0,2,2,[3],0,1,0,[4]]); -add(selser, Non-word characters don't terminate tag names (bug 17663, 40670, 52022) [0,3,4,0,0,0,[3],0,1,3,1]); -add(selser, Non-word characters don't terminate tag names (bug 17663, 40670, 52022) [1,0,[4],4,[3],4,0,4,0,4,0]); -add(selser, Non-word characters don't terminate tag names (bug 17663, 40670, 52022) [[3],3,[3],3,4,3,4,4,4,2,3]); -add(selser, Non-word characters don't terminate tag names (bug 17663, 40670, 52022) [0,0,[3],0,0,4,1,0,3,0,4]); -add(selser, Non-word characters don't terminate tag names (bug 17663, 40670, 52022) [0,0,4,0,0,0,1,0,0,0,[3]]); -add(selser, Non-word characters don't terminate tag names (bug 17663, 40670, 52022) [3,0,[2],4,1,2,0,3,0,3,[4]]); -add(selser, Non-word characters don't terminate tag names (bug 17663, 40670, 52022) [[4],0,0,0,[2],0,[2],0,0,4,1]); -add(selser, Non-word characters don't terminate tag names (bug 17663, 40670, 52022) [4,2,3,0,1,2,2,3,[2],3,2]); -add(selser, Non-word characters don't terminate tag names (bug 17663, 40670, 52022) [1,0,3,2,3,4,[4],0,2,3,[4]]); -add(selser, Non-word characters don't terminate tag names (bug 17663, 40670, 52022) [0,2,0,0,[3],2,1,0,1,0,3]); -add(selser, Non-word characters don't terminate tag names (bug 17663, 40670, 52022) [2,0,[3],4,[4],4,[2],4,4,0,2]); -add(selser, Non-word characters don't terminate tag names (bug 17663, 40670, 52022) [3,0,2,0,1,2,3,3,0,0,[4]]); -add(selser, Non-word characters don't terminate tag names (bug 17663, 40670, 52022) [0,4,4,4,1,2,3,0,0,4,1]); -add(selser, Non-word characters don't terminate tag names (bug 17663, 40670, 52022) [[3],0,2,0,3,0,[4],0,[4],2,2]);
[MediaWiki-commits] [Gerrit] Toolbarcontroller throws some meaningful errors now - change (mediawiki...Wikibase)
Daniel Werner has uploaded a new change for review. https://gerrit.wikimedia.org/r/78843 Change subject: Toolbarcontroller throws some meaningful errors now .. Toolbarcontroller throws some meaningful errors now Change-Id: Idc0e4c40187fed49b3b1f73151cebe2481b2f027 --- M lib/resources/jquery.wikibase/toolbar/toolbarcontroller.definitions.js M lib/resources/jquery.wikibase/toolbar/toolbarcontroller.js 2 files changed, 19 insertions(+), 7 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Wikibase refs/changes/43/78843/1 diff --git a/lib/resources/jquery.wikibase/toolbar/toolbarcontroller.definitions.js b/lib/resources/jquery.wikibase/toolbar/toolbarcontroller.definitions.js index d43f57f..5292b03 100644 --- a/lib/resources/jquery.wikibase/toolbar/toolbarcontroller.definitions.js +++ b/lib/resources/jquery.wikibase/toolbar/toolbarcontroller.definitions.js @@ -103,12 +103,13 @@ * } *} * } -* @return {Object} Toolbar definition +* @return {Object|null} Toolbar definition or null if there is no definition with the given ID. */ MODULE.definition = function( type, toolbarDefinitionOrId ) { if ( typeof toolbarDefinitionOrId === 'string' ) { // GET existing definition - return toolbarDefinitions[type][toolbarDefinitionOrId]; + return toolbarDefinitions[type] toolbarDefinitions[type][toolbarDefinitionOrId] + || null; } // SET new definition var toolbarDefinition = toolbarDefinitionOrId, diff --git a/lib/resources/jquery.wikibase/toolbar/toolbarcontroller.js b/lib/resources/jquery.wikibase/toolbar/toolbarcontroller.js index 944b71b..3ac7a67 100644 --- a/lib/resources/jquery.wikibase/toolbar/toolbarcontroller.js +++ b/lib/resources/jquery.wikibase/toolbar/toolbarcontroller.js @@ -63,16 +63,22 @@ * @since 0.4 * @param {boolean} [isPending] Whether element that triggered the toolbar *(re-)initialization is in a pending state. +* +* @throws {Error} In case a given toolbar ID is not registered for the given toolbar type. */ initToolbars: function( isPending ) { var self = this; $.each( TOOLBAR_TYPES, function( i, type ) { $.each( self.options[type], function( j, id ) { - var def = $.wikibase.toolbarcontroller.definition( type, id ), - options = ( type === 'edittoolbar' isPending ) ? - $.extend( {}, def.options, { enableRemove: !isPending } ) - : def.options; + var def = $.wikibase.toolbarcontroller.definition( type, id ); + if( !def ) { + throw new Error( 'Missing toolbar controller definition for ' + id + '' ); + } + + var options = type === 'edittoolbar' isPending ? + $.extend( {}, def.options, { enableRemove: !isPending } ) + : def.options; // The node the toolbar shall be initialized on. var $initNode = self.element.find( def.selector || ':' + def.widget.fullName ); @@ -99,7 +105,12 @@ this.initEventListeners(); }, - _initToolbarEventListener: function( $toolbar, eventNames, callback ) { + _initToolbarEventListener: function( $toolbar, eventNames, callback, toolbarType ) { + if( !$.isFunction( callback ) ) { + throw new Error( 'No callback or known default action given for event ' + + eventNames + '' ); + } + var namespacedEventNames = ( eventNames + ' ' ) .split( ' ' ).join( '.' + this.widgetName + ' ' ); -- To view, visit https://gerrit.wikimedia.org/r/78843 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Idc0e4c40187fed49b3b1f73151cebe2481b2f027 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Wikibase Gerrit-Branch: master Gerrit-Owner: Daniel Werner daniel.wer...@wikimedia.de ___ MediaWiki-commits mailing list
[MediaWiki-commits] [Gerrit] i18n review - change (mediawiki...UpdateMediaWiki)
Miguel2706 has submitted this change and it was merged. Change subject: i18n review .. i18n review * Consistency tweaks * Fix header * Fix extension credit type to do's: * Please fix encoding for Spanish * Please add message documentation. Once done, I can add the extension to translatewiki.net Change-Id: I366a7125601f7a0b4f3c4c0424822202e6abff57 --- M updateMediaWiki.php M updatemediawiki.i18n.php 2 files changed, 39 insertions(+), 44 deletions(-) Approvals: Miguel2706: Verified; Looks good to me, approved diff --git a/updateMediaWiki.php b/updateMediaWiki.php index b65cbba..42b2ba7 100644 --- a/updateMediaWiki.php +++ b/updateMediaWiki.php @@ -1,4 +1,4 @@ -? +?php /* ** @@ -19,14 +19,14 @@ exit( 1 ); } -$wgExtensionCredits['validextensionclass'][] = array( +$wgExtensionCredits['specialpage'][] = array( 'path' = __FILE__, 'name' = 'UpdateMediaWiki', - 'author' ='Miguel Peláez', - 'url' = 'https://www.mediawiki.org/wiki/Extension:UpdateMediaWiki', - 'description' = 'Allows administrators and authorized users upgrade from a special page MediaWiki', + 'author' ='Miguel Peláez', + 'url' = 'https://www.mediawiki.org/wiki/Extension:UpdateMediaWiki', + 'descriptionmsg' = 'updatemediawiki-desc', 'version' = 0.1, - ); +); $wgAutoloadClasses[ 'Specialupdatemediawiki' ] = __DIR__ . '/specialupdatemediawiki.php'; $wgExtensionMessagesFiles[ 'updatemediawiki' ] = __DIR__ . '/updatemediawiki.i18n.php'; $wgSpecialPages[ 'updatemediawiki' ] = 'Specialupdatemediawiki'; diff --git a/updatemediawiki.i18n.php b/updatemediawiki.i18n.php index 792ae5e..f630ab9 100644 --- a/updatemediawiki.i18n.php +++ b/updatemediawiki.i18n.php @@ -1,4 +1,4 @@ -? +?php /* * * Internationalisation for UpdateMediaWiki @@ -6,56 +6,51 @@ * This file is part of the UpdateMediaWiki extension for MediaWiki * @file * @ingroup Extensions -* @author Miguel Peláez miguel2706outlook.com +* @author Miguel Peláez miguel2706outlook.com * @license http://www.gnu.org/copyleft/gpl.html GNU General Public License 2.0 or later * @link http://www.mediawiki.org/wiki/Extension:UpdateMediaWiki Documentation **/ $messages = array(); - + /** English * @author Miguel2706 */ -$messages[ 'en' ] = array( -'updatemediawiki' = Update MediaWiki, -'updatemediawiki-desc' = Allows administrators and authorized users upgrade from a special page MediaWiki., -'updatemediawiki-current' = Current version, -'updatemediawiki-update-nofound' = No update is available, -'updatemediawiki-update-found' = New Update Found, -'updatemediawiki-update-downloading' = Downloading new update, -'updatemediawiki-update-saved' = Update Downloaded And Saved, -'updatemediawiki-update-exist' = Update already downloaded, -'updatemediawiki-update-copyready' = Copy ready, -'updatemediawiki-update-database' = Update the data base Now?, -'updatemediawiki-update-updateready' = Update ready, -'updatemediawiki-update-install' = Install Now?, -'updatemediawiki-update-updated' = MediaWiki Updated to version, -'updatemediawiki-update-error' = Could not find latest realeases, -'updatemediawiki-update-aborted' = Could not save new update. Operation aborted, - - - - +$messages['en'] = array( + 'updatemediawiki' = Update MediaWiki, + 'updatemediawiki-desc' = 'Allows updating MediaWiki via a special page', + 'updatemediawiki-current' = Current version, + 'updatemediawiki-update-nofound' = No update is available, + 'updatemediawiki-update-found' = New update found, + 'updatemediawiki-update-downloading' = Downloading new update, + 'updatemediawiki-update-saved' = Update downloaded and saved, + 'updatemediawiki-update-exist' = Update already downloaded, + 'updatemediawiki-update-copyready' = Copy ready, + 'updatemediawiki-update-database' = Update the data base now?, + 'updatemediawiki-update-updateready' = Update ready, + 'updatemediawiki-update-install' = Install now?, + 'updatemediawiki-update-updated' = MediaWiki updated to version, + 'updatemediawiki-update-error' = Could not find latest realeases, + 'updatemediawiki-update-aborted' = Could not save new update. Operation aborted, ); - + /** Message documentation * @author Miguel2706 */ -$messages[ 'es' ] = array( +$messages['es'] = array( 'updatemediawiki' = Actualizar MediaWiki, -'updatemediawiki-desc' = Permite a los administradores y usuarios autorizados actualizar MediaWiki desde una página especial., -
[MediaWiki-commits] [Gerrit] Turn on more default elasticsearch logging. - change (operations/puppet)
Manybubbles has uploaded a new change for review. https://gerrit.wikimedia.org/r/78903 Change subject: Turn on more default elasticsearch logging. .. Turn on more default elasticsearch logging. All these logging settings are configurable and I could see us setting them to different values in different environments but at this point that is overkill. We'll just turn them on and see what we get. Change-Id: Ib7afdc65155bf70d4243c7145fb1f259dad7e373 --- M modules/elasticsearch/templates/elasticsearch.yml.erb 1 file changed, 14 insertions(+), 19 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/03/78903/1 diff --git a/modules/elasticsearch/templates/elasticsearch.yml.erb b/modules/elasticsearch/templates/elasticsearch.yml.erb index 8b4a53d..963e2d4 100644 --- a/modules/elasticsearch/templates/elasticsearch.yml.erb +++ b/modules/elasticsearch/templates/elasticsearch.yml.erb @@ -338,27 +338,22 @@ # Shard level query and fetch threshold logging. -#index.search.slowlog.threshold.query.warn: 10s -#index.search.slowlog.threshold.query.info: 5s -#index.search.slowlog.threshold.query.debug: 2s -#index.search.slowlog.threshold.query.trace: 500ms +index.search.slowlog.threshold.fetch.warn: 1s +index.search.slowlog.threshold.fetch.info: 800ms +index.search.slowlog.threshold.fetch.debug: 500ms +index.search.slowlog.threshold.fetch.trace: 200ms -#index.search.slowlog.threshold.fetch.warn: 1s -#index.search.slowlog.threshold.fetch.info: 800ms -#index.search.slowlog.threshold.fetch.debug: 500ms -#index.search.slowlog.threshold.fetch.trace: 200ms - -#index.indexing.slowlog.threshold.index.warn: 10s -#index.indexing.slowlog.threshold.index.info: 5s -#index.indexing.slowlog.threshold.index.debug: 2s -#index.indexing.slowlog.threshold.index.trace: 500ms +index.indexing.slowlog.threshold.index.warn: 10s +index.indexing.slowlog.threshold.index.info: 5s +index.indexing.slowlog.threshold.index.debug: 2s +index.indexing.slowlog.threshold.index.trace: 500ms ## GC Logging -#monitor.jvm.gc.ParNew.warn: 1000ms -#monitor.jvm.gc.ParNew.info: 700ms -#monitor.jvm.gc.ParNew.debug: 400ms +monitor.jvm.gc.ParNew.warn: 1000ms +monitor.jvm.gc.ParNew.info: 700ms +monitor.jvm.gc.ParNew.debug: 400ms -#monitor.jvm.gc.ConcurrentMarkSweep.warn: 10s -#monitor.jvm.gc.ConcurrentMarkSweep.info: 5s -#monitor.jvm.gc.ConcurrentMarkSweep.debug: 2s +monitor.jvm.gc.ConcurrentMarkSweep.warn: 10s +monitor.jvm.gc.ConcurrentMarkSweep.info: 5s +monitor.jvm.gc.ConcurrentMarkSweep.debug: 2s -- To view, visit https://gerrit.wikimedia.org/r/78903 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ib7afdc65155bf70d4243c7145fb1f259dad7e373 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production 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] Sync parserTests with core. - change (mediawiki...Parsoid)
jenkins-bot has submitted this change and it was merged. Change subject: Sync parserTests with core. .. Sync parserTests with core. This matches upstream commit 9b22f7bc26f770e339bd9fa6b3542c84bb7723eb. New tests were added for the following Parsoid bugs, all of which currently fail: * Bug 52762: ignore lines with nothing but two-or-more comments * Bug 52760: close tags are stripped (found in test for bug 17663) * Bug 52363: bare pipes * Bug 52761: preformatted in blockquote (should be parsed like div) In addition, a number of new tests were added for preprocessor magic words (gerrit change I79023a1585f92be6c0cea13a462ae091a60838d3) which aren't currently supported by Parsoid's preprocessor implementation. Change-Id: I3a06fbce0858507ac86e1832e7cf3456cfda1da4 --- M js/tests/fetch-parserTests.txt.js M js/tests/parserTests-blacklist.js M js/tests/parserTests.txt 3 files changed, 589 insertions(+), 59 deletions(-) Approvals: Subramanya Sastry: Looks good to me, approved jenkins-bot: Verified diff --git a/js/tests/fetch-parserTests.txt.js b/js/tests/fetch-parserTests.txt.js index aa6d787..a3426bc 100755 --- a/js/tests/fetch-parserTests.txt.js +++ b/js/tests/fetch-parserTests.txt.js @@ -10,9 +10,9 @@ // and update these hashes automatically. // // You can use 'sha1sum -b tests/parser/parserTests.txt' to compute this value: -var expectedSHA1 = d1619d3fe6fc04c2b33a0ecb6c28ae1ee4d28270; +var expectedSHA1 = 3aa4ff168f50d5a9981372ffcbb5b501c13e; // git log --pretty=oneline -1 tests/parser/parserTests.txt -var latestCommit = e07be1427ba6560fe8b08c720bfed9a2aa87f290; +var latestCommit = 9b22f7bc26f770e339bd9fa6b3542c84bb7723eb; var fs = require('fs'), path = require('path'), diff --git a/js/tests/parserTests-blacklist.js b/js/tests/parserTests-blacklist.js index aca39c4..82ef94e 100644 --- a/js/tests/parserTests-blacklist.js +++ b/js/tests/parserTests-blacklist.js @@ -33,6 +33,7 @@ // ### DO NOT REMOVE THIS LINE ### (start of automatically-generated section) // Blacklist for wt2html +add(wt2html, Paragraphs with newline spacing with comment lines in between); add(wt2html, Paragraphs with newline spacing with non-empty white-space lines in between); add(wt2html, Paragraphs with newline spacing with non-empty mixed comment and white-space lines in between); add(wt2html, Extra newlines: More paragraphs with indented comment); @@ -40,9 +41,13 @@ add(wt2html, Italics and bold); add(wt2html, Italics and possessives); add(wt2html, Italicized possessive); +add(wt2html, Non-word characters don't terminate tag names (bug 17663, 40670, 52022)); +add(wt2html, Bare pipe character (bug 52363)); +add(wt2html, Bare pipe character from a template (bug 52363)); add(wt2html, Entities inside nowiki); add(wt2html, Comment on its own line post-expand); add(wt2html, Comment on its own line post-expand with non-significant whitespace); +add(wt2html, Bug 6200: Preformatted in blockquote); add(wt2html, Templates: Indent-Pre: 1a. Templates that break a line should suppress pre); add(wt2html, Templates: Indent-Pre: 1b. Templates that break a line should suppress pre); add(wt2html, Templates: Indent-Pre: 1e. Wrapping should be based on expanded content); @@ -52,6 +57,7 @@ add(wt2html, 2a. Indent-Pre and tables); add(wt2html, 2b. Indent-Pre and tables); add(wt2html, 2c. Indent-Pre and tables (bug 42252)); +add(wt2html, 3b. Indent-Pre and block tags (pre-content on separate line)); add(wt2html, 4. Multiple spaces at start-of-line); add(wt2html, 6. Pre-blocks should extend across lines with leading WS even when there is no wrappable content); add(wt2html, Definition Lists: Nesting: Multi-level (Parsoid only)); @@ -80,18 +86,38 @@ add(wt2html, Handling html with a div self-closing tag); add(wt2html, 2. Lists with start-of-line-transparent tokens before bullets: Template close); add(wt2html, List interrupted by empty line or heading); -add(wt2html, Single-comment whitespace lines dont break lists, but multi-comment whitespace lines do); +add(wt2html, Single-comment whitespace lines dont break lists, and so do multi-comment whitespace lines); add(wt2html, Test the li-hack\n(Cannot test this with PHP parser since it relies on Tidy for the hack)); add(wt2html, Unclosed formatting tags that straddle lists are closed and reopened\n(Parsoid-only since php parser generates broken html -- relies on Tidy to fix up)); +add(wt2html, Magic Word: {{CURRENTMONTH1}}); +add(wt2html, Magic Words LOCAL (UTC)); add(wt2html, Magic Word: {{FULLPAGENAMEE}}); +add(wt2html, Magic Word: {{TALKSPACE}}); +add(wt2html, Magic Word: {{TALKSPACE}}, same namespace); +add(wt2html, Magic Word: {{TALKSPACEE}}); +add(wt2html, Magic Word: {{SUBJECTSPACE}}); +add(wt2html, Magic Word: {{SUBJECTSPACE}}, same namespace); +add(wt2html, Magic Word: {{SUBJECTSPACE}}, main namespace); +add(wt2html, Magic Word: {{SUBJECTSPACEE}}); add(wt2html,
[MediaWiki-commits] [Gerrit] update mw version to 1.22wmf12 - change (pywikibot/compat)
Xqt has uploaded a new change for review. https://gerrit.wikimedia.org/r/78904 Change subject: update mw version to 1.22wmf12 .. update mw version to 1.22wmf12 Change-Id: I9ceb5fa7c781171e7dc84eff871452d885035007 --- M family.py 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/pywikibot/compat refs/changes/04/78904/1 diff --git a/family.py b/family.py index 4c15a05..871519d 100644 --- a/family.py +++ b/family.py @@ -4722,7 +4722,7 @@ Return Wikimedia projects version number as a string. # Don't use this, use versionnumber() instead. This only exists # to not break family files. -return '1.22wmf10' +return '1.22wmf12' def shared_image_repository(self, code): return ('commons', 'commons') -- To view, visit https://gerrit.wikimedia.org/r/78904 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I9ceb5fa7c781171e7dc84eff871452d885035007 Gerrit-PatchSet: 1 Gerrit-Project: pywikibot/compat Gerrit-Branch: master Gerrit-Owner: Xqt i...@gno.de ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] update mw version to 1.22wmf12 - change (pywikibot/core)
Xqt has uploaded a new change for review. https://gerrit.wikimedia.org/r/78905 Change subject: update mw version to 1.22wmf12 .. update mw version to 1.22wmf12 Change-Id: Id872c2a66c9812cbb244c896d42c22b1cad39ef1 --- M pywikibot/family.py 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/pywikibot/core refs/changes/05/78905/1 diff --git a/pywikibot/family.py b/pywikibot/family.py index 68f136e..dcd04dc 100644 --- a/pywikibot/family.py +++ b/pywikibot/family.py @@ -937,7 +937,7 @@ Return Wikimedia projects version number as a string. # Don't use this, use versionnumber() instead. This only exists # to not break family files. -return '1.22wmf10' +return '1.22wmf12' def shared_image_repository(self, code): return ('commons', 'commons') -- To view, visit https://gerrit.wikimedia.org/r/78905 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Id872c2a66c9812cbb244c896d42c22b1cad39ef1 Gerrit-PatchSet: 1 Gerrit-Project: pywikibot/core Gerrit-Branch: master Gerrit-Owner: Xqt i...@gno.de ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] update mw version to 1.22wmf12 - change (pywikibot/core)
Xqt has submitted this change and it was merged. Change subject: update mw version to 1.22wmf12 .. update mw version to 1.22wmf12 Change-Id: Id872c2a66c9812cbb244c896d42c22b1cad39ef1 --- M pywikibot/family.py 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Xqt: Looks good to me, approved jenkins-bot: Verified diff --git a/pywikibot/family.py b/pywikibot/family.py index 68f136e..dcd04dc 100644 --- a/pywikibot/family.py +++ b/pywikibot/family.py @@ -937,7 +937,7 @@ Return Wikimedia projects version number as a string. # Don't use this, use versionnumber() instead. This only exists # to not break family files. -return '1.22wmf10' +return '1.22wmf12' def shared_image_repository(self, code): return ('commons', 'commons') -- To view, visit https://gerrit.wikimedia.org/r/78905 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Id872c2a66c9812cbb244c896d42c22b1cad39ef1 Gerrit-PatchSet: 1 Gerrit-Project: pywikibot/core Gerrit-Branch: master Gerrit-Owner: Xqt i...@gno.de Gerrit-Reviewer: Xqt i...@gno.de Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits