[MediaWiki-commits] [Gerrit] Script for reporting daily activity on Wikimedia blog - change (analytics/blog)
Ori.livneh has uploaded a new change for review. https://gerrit.wikimedia.org/r/60794 Change subject: Script for reporting daily activity on Wikimedia blog .. Script for reporting daily activity on Wikimedia blog This script produces a report of activity on Wikimedia blog for the previous day, taken as midnight UTC to midnight UTC, and sends it via e-mail. Change-Id: I7076c8c64fe24692dd83dd10bb1211ad46e7cb31 --- A blogreport.py 1 file changed, 151 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/analytics/blog refs/changes/94/60794/1 diff --git a/blogreport.py b/blogreport.py new file mode 100644 index 000..ea74393 --- /dev/null +++ b/blogreport.py @@ -0,0 +1,151 @@ +#!/usr/bin/env python +# -*- coding: utf-8 -*- + + Produce a report of daily activity on Wikimedia blog and e-mail it + + Copyright (C) 2013 Wikimedia Foundation + Licensed under the GNU Public License, version 2 + + +import sys +reload(sys) +sys.setdefaultencoding('utf-8') + +import collections +import operator +import os +import re +import socket +import subprocess +import urlparse + +from cStringIO import StringIO +from datetime import datetime, timedelta +from email.mime.text import MIMEText + +from sqlalchemy import * +from sqlalchemy.ext.declarative import declarative_base +from sqlalchemy.orm import sessionmaker, scoped_session + + +# FIXME: Load configs from a file. +db_url = os.environ['BLOGREPORT_DB'] +email_sender = os.environ['BLOGREPORT_FROM'] +email_recipient = os.environ['BLOGREPORT_TO'] +email_cc = os.environ['BLOGREPORT_CC'] + +yesterday = datetime.utcnow() - timedelta(days=1) + +Base = declarative_base() +Base.metadata.bind = create_engine(db_url) +Session = sessionmaker(bind=Base.metadata.bind, autocommit=True) + + +def send_email(sender, recipient, subject, text, cc=None): +Send an e-mail by shelling out to 'sendmail'. +message = MIMEText(text) +message['From'] = sender +message['To'] = recipient +if cc is not None: +message['Cc'] = cc +message['Subject'] = subject +p = subprocess.Popen(('/usr/sbin/sendmail', '-t'), stdin=subprocess.PIPE) +p.communicate(message.as_string().encode('utf8')) + + +class BlogVisit(Base): +__table__ = Table('WikimediaBlogVisit_5308166', Base.metadata, autoload=True) + +session = Session() +q = session.query(BlogVisit).filter(BlogVisit.webHost == 'blog.wikimedia.org') +q = q.filter(BlogVisit.timestamp.startswith(yesterday.strftime('%Y%m%d'))) + +uniques = set() +visits = 0 +referrers = collections.Counter() +searches = collections.Counter() +urls = collections.Counter() +ref_domains = collections.Counter() + +for visit in q: +# Exclude previews, testblogs, and WP admin pages +if re.search(r'[?]preview=|testblog|\/wp-', +visit.event_requestUrl): +continue +# Transform all searches into '(search)' +if re.search(r'[?]s=', visit.event_requestUrl): +try: +search = dict(urlparse.parse_qsl(visit.event_requestUrl.rsplit('?', 1)[1])).pop('s', '') +searches[search] += 1 +except: +pass +visit.event_requestUrl = '(search)' +urls[visit.event_requestUrl] += 1 +visits += 1 +uniques.add(visit.clientIp) +ref = visit.event_referrerUrl +if ref is not None: +if ref.startswith('https://blog.wikimedia.org'): +ref = ref[26:] +domain = urlparse.urlparse(visit.event_referrerUrl).hostname +if domain: +if domain.startswith('www.'): +domain = domain[4:] +ref_domains[domain] += 1 +referrers[ref] += 1 + +body = StringIO() + +body.write('Total visits: %d\n' % visits) +body.write('Unique visitors: %d\n' % len(uniques)) +body.write('\n') + +body.write('\n') +body.write('Pages / hits (ordered by number of hits):\n') +body.write('=\n') +for url, count in sorted(urls.iteritems(), key=operator.itemgetter(1), reverse=True): +body.write('%s\t%s\n' % (url, count)) + +body.seek(0) + +send_email( +'eventlogging@stat1.eqiad.wmnet', +'tba...@wikimedia.org', +'Wikimedia blog stats for %s: pageviews' % yesterday.strftime('%Y-%m-%d'), +body.read(), +'o...@wikimedia.org' +) + +body.close() +body = StringIO() + +body.write('Search queries / count (sorted by number of queries):\n') +body.write('=\n') +for search, count in sorted(searches.iteritems(), +key=operator.itemgetter(1), reverse=True): +body.write('%s\t%s\n' % (search, count)) + +body.write('\n') +body.write('Referring domain names / referrals (sorted by number of referrals):\n') +body.write('===\n') +for hostname, count in sorted(ref_domains.iteritems(), +key=operator.itemgetter(1), reverse=True): +body.write('%s\t%s\n' % (hostname,
[MediaWiki-commits] [Gerrit] Script for reporting daily activity on Wikimedia blog - change (analytics/blog)
Ori.livneh has submitted this change and it was merged. Change subject: Script for reporting daily activity on Wikimedia blog .. Script for reporting daily activity on Wikimedia blog This script produces a report of activity on Wikimedia blog for the previous day, taken as midnight UTC to midnight UTC, and sends it via e-mail. Change-Id: I7076c8c64fe24692dd83dd10bb1211ad46e7cb31 --- A blogreport.py 1 file changed, 151 insertions(+), 0 deletions(-) Approvals: Ori.livneh: Verified; Looks good to me, approved diff --git a/blogreport.py b/blogreport.py new file mode 100644 index 000..ea74393 --- /dev/null +++ b/blogreport.py @@ -0,0 +1,151 @@ +#!/usr/bin/env python +# -*- coding: utf-8 -*- + + Produce a report of daily activity on Wikimedia blog and e-mail it + + Copyright (C) 2013 Wikimedia Foundation + Licensed under the GNU Public License, version 2 + + +import sys +reload(sys) +sys.setdefaultencoding('utf-8') + +import collections +import operator +import os +import re +import socket +import subprocess +import urlparse + +from cStringIO import StringIO +from datetime import datetime, timedelta +from email.mime.text import MIMEText + +from sqlalchemy import * +from sqlalchemy.ext.declarative import declarative_base +from sqlalchemy.orm import sessionmaker, scoped_session + + +# FIXME: Load configs from a file. +db_url = os.environ['BLOGREPORT_DB'] +email_sender = os.environ['BLOGREPORT_FROM'] +email_recipient = os.environ['BLOGREPORT_TO'] +email_cc = os.environ['BLOGREPORT_CC'] + +yesterday = datetime.utcnow() - timedelta(days=1) + +Base = declarative_base() +Base.metadata.bind = create_engine(db_url) +Session = sessionmaker(bind=Base.metadata.bind, autocommit=True) + + +def send_email(sender, recipient, subject, text, cc=None): +Send an e-mail by shelling out to 'sendmail'. +message = MIMEText(text) +message['From'] = sender +message['To'] = recipient +if cc is not None: +message['Cc'] = cc +message['Subject'] = subject +p = subprocess.Popen(('/usr/sbin/sendmail', '-t'), stdin=subprocess.PIPE) +p.communicate(message.as_string().encode('utf8')) + + +class BlogVisit(Base): +__table__ = Table('WikimediaBlogVisit_5308166', Base.metadata, autoload=True) + +session = Session() +q = session.query(BlogVisit).filter(BlogVisit.webHost == 'blog.wikimedia.org') +q = q.filter(BlogVisit.timestamp.startswith(yesterday.strftime('%Y%m%d'))) + +uniques = set() +visits = 0 +referrers = collections.Counter() +searches = collections.Counter() +urls = collections.Counter() +ref_domains = collections.Counter() + +for visit in q: +# Exclude previews, testblogs, and WP admin pages +if re.search(r'[?]preview=|testblog|\/wp-', +visit.event_requestUrl): +continue +# Transform all searches into '(search)' +if re.search(r'[?]s=', visit.event_requestUrl): +try: +search = dict(urlparse.parse_qsl(visit.event_requestUrl.rsplit('?', 1)[1])).pop('s', '') +searches[search] += 1 +except: +pass +visit.event_requestUrl = '(search)' +urls[visit.event_requestUrl] += 1 +visits += 1 +uniques.add(visit.clientIp) +ref = visit.event_referrerUrl +if ref is not None: +if ref.startswith('https://blog.wikimedia.org'): +ref = ref[26:] +domain = urlparse.urlparse(visit.event_referrerUrl).hostname +if domain: +if domain.startswith('www.'): +domain = domain[4:] +ref_domains[domain] += 1 +referrers[ref] += 1 + +body = StringIO() + +body.write('Total visits: %d\n' % visits) +body.write('Unique visitors: %d\n' % len(uniques)) +body.write('\n') + +body.write('\n') +body.write('Pages / hits (ordered by number of hits):\n') +body.write('=\n') +for url, count in sorted(urls.iteritems(), key=operator.itemgetter(1), reverse=True): +body.write('%s\t%s\n' % (url, count)) + +body.seek(0) + +send_email( +'eventlogging@stat1.eqiad.wmnet', +'tba...@wikimedia.org', +'Wikimedia blog stats for %s: pageviews' % yesterday.strftime('%Y-%m-%d'), +body.read(), +'o...@wikimedia.org' +) + +body.close() +body = StringIO() + +body.write('Search queries / count (sorted by number of queries):\n') +body.write('=\n') +for search, count in sorted(searches.iteritems(), +key=operator.itemgetter(1), reverse=True): +body.write('%s\t%s\n' % (search, count)) + +body.write('\n') +body.write('Referring domain names / referrals (sorted by number of referrals):\n') +body.write('===\n') +for hostname, count in sorted(ref_domains.iteritems(), +key=operator.itemgetter(1), reverse=True): +body.write('%s\t%s\n' % (hostname, count)) + +body.write('\n') +body.write('Referrers / count
[MediaWiki-commits] [Gerrit] Clarified PoolCounter::execute() docs a bit. - change (mediawiki/core)
jenkins-bot has submitted this change and it was merged. Change subject: Clarified PoolCounter::execute() docs a bit. .. Clarified PoolCounter::execute() docs a bit. Change-Id: Id37e11e9520381cccf917d71ea269c8a85334c58 --- M includes/PoolCounter.php 1 file changed, 12 insertions(+), 2 deletions(-) Approvals: IAlex: Looks good to me, approved jenkins-bot: Verified diff --git a/includes/PoolCounter.php b/includes/PoolCounter.php index 38c6f04..2dac938 100644 --- a/includes/PoolCounter.php +++ b/includes/PoolCounter.php @@ -190,9 +190,19 @@ } /** -* Get the result of the work (whatever it is), or false. +* Get the result of the work (whatever it is), or the result of the error() function. +* This returns the result of the first applicable method that returns a non-false value, +* where the methods are checked in the following order: +* - a) doWork() : Applies if the work is exclusive or no another process +* is doing it, and on the condition that either this process +* successfully entered the pool or the pool counter is down. +* - b) doCachedWork() : Applies if the work is cacheable and this blocked on another +* process which finished the work. +* - c) fallback() : Applies for all remaining cases. +* If these all fall through (by returning false), then the result of error() is returned. +* * @param $skipcache bool -* @return bool|mixed +* @return mixed */ public function execute( $skipcache = false ) { if ( $this-cacheable !$skipcache ) { -- To view, visit https://gerrit.wikimedia.org/r/60762 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Id37e11e9520381cccf917d71ea269c8a85334c58 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Aaron Schulz asch...@wikimedia.org Gerrit-Reviewer: Demon ch...@wikimedia.org Gerrit-Reviewer: IAlex coderev...@emsenhuber.ch Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] pass pep8 (ignore whitespace before ':') - change (analytics/glass)
Ori.livneh has submitted this change and it was merged. Change subject: pass pep8 (ignore whitespace before ':') .. pass pep8 (ignore whitespace before ':') Fix a few trivial pep8 warnings. I have added a .pep8 to ignore the error E203 whitespace before ':' since it is used to nicely align the dicts. Change-Id: I7b5253dce1641bf2ee7283238c584e603183909b --- A .pep8 M glass/chronicler.py M glass/monitor.py M glass/reflect.py 4 files changed, 4 insertions(+), 3 deletions(-) Approvals: Ori.livneh: Verified; Looks good to me, approved jenkins-bot: Verified diff --git a/.pep8 b/.pep8 new file mode 100644 index 000..0005756 --- /dev/null +++ b/.pep8 @@ -0,0 +1,3 @@ +[pep8] +# E203 whitespace before ':' +ignore = E203 diff --git a/glass/chronicler.py b/glass/chronicler.py index 2505a88..250738c 100644 --- a/glass/chronicler.py +++ b/glass/chronicler.py @@ -40,7 +40,6 @@ } - def typecast(object, schema): properties = schema.get('properties', {}) types = {k: v.get('type') for k, v in items(properties)} diff --git a/glass/monitor.py b/glass/monitor.py index 7a02a62..c4c2fd2 100644 --- a/glass/monitor.py +++ b/glass/monitor.py @@ -29,7 +29,6 @@ yield sock.recv() - log = get_logger() lost = collections.defaultdict(int) seqs = {} diff --git a/glass/reflect.py b/glass/reflect.py index e33ed58..a7e4045 100644 --- a/glass/reflect.py +++ b/glass/reflect.py @@ -67,7 +67,7 @@ def store_event(event): -event.update({('_' + k):v for k, v in event.pop('meta').items()}) +event.update({('_' + k): v for k, v in event.pop('meta').items()}) for key in event: if 'timestamp' in key: event[key] = datetime.fromtimestamp(int(event[key])) -- To view, visit https://gerrit.wikimedia.org/r/60704 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I7b5253dce1641bf2ee7283238c584e603183909b Gerrit-PatchSet: 1 Gerrit-Project: analytics/glass Gerrit-Branch: master Gerrit-Owner: Hashar has...@free.fr Gerrit-Reviewer: Hashar has...@free.fr Gerrit-Reviewer: Ori.livneh o...@wikimedia.org Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Removed unused updateCategoryCounts() from LinksDeletionUpdate. - change (mediawiki/core)
Aaron Schulz has uploaded a new change for review. https://gerrit.wikimedia.org/r/60795 Change subject: Removed unused updateCategoryCounts() from LinksDeletionUpdate. .. Removed unused updateCategoryCounts() from LinksDeletionUpdate. Change-Id: I3e51d647e5033848a87fc730f9691881cd194b1e --- M includes/LinksUpdate.php 1 file changed, 0 insertions(+), 12 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/95/60795/1 diff --git a/includes/LinksUpdate.php b/includes/LinksUpdate.php index 8c6d762..7a7bd2e 100644 --- a/includes/LinksUpdate.php +++ b/includes/LinksUpdate.php @@ -881,16 +881,4 @@ __METHOD__ ); } } - - /** -* Update all the appropriate counts in the category table. -* @param array $added associative array of category name = sort key -* @param array $deleted associative array of category name = sort key -*/ - function updateCategoryCounts( $added, $deleted ) { - $a = WikiPage::factory( $this-mTitle ); - $a-updateCategoryCounts( - array_keys( $added ), array_keys( $deleted ) - ); - } } -- To view, visit https://gerrit.wikimedia.org/r/60795 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I3e51d647e5033848a87fc730f9691881cd194b1e Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Aaron Schulz asch...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] WIP Try to fix the table attribute bug - change (mediawiki...Parsoid)
MarkTraceur has uploaded a new change for review. https://gerrit.wikimedia.org/r/60796 Change subject: WIP Try to fix the table attribute bug .. WIP Try to fix the table attribute bug There's a bug in http://parsoid.wmflabs.org/_rt/de/Feuer-Affe that causes our RT tests to fail, as well it should. I'm trying to fix it but no luck yet. Change-Id: Ia7efa7e2e9df3957dedaf8f8b4b16f2423d161d7 --- M js/lib/pegTokenizer.pegjs.txt 1 file changed, 11 insertions(+), 8 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Parsoid refs/changes/96/60796/1 diff --git a/js/lib/pegTokenizer.pegjs.txt b/js/lib/pegTokenizer.pegjs.txt index c9bd101..58ddaeb 100644 --- a/js/lib/pegTokenizer.pegjs.txt +++ b/js/lib/pegTokenizer.pegjs.txt @@ -651,6 +651,9 @@ return null !== pegArgs.pegTokenizer.inline_breaks( input, pos, stops ) } +attr_inline_breaks + = [\r\n] + inline = c:(urltext / (! inline_breaks (inline_element / . )))+ { //console.warn('inline out:' + pp(c)); @@ -2384,7 +2387,7 @@ attribute_preprocessor_text_single = r:( t:[^{}']+ { return t.join(''); } - / !inline_breaks ( + / !attr_inline_breaks ( directive / [{}] ) )* @@ -2393,7 +2396,7 @@ } attribute_preprocessor_text_single_broken = r:( t:[^{}'|]+ { return t.join(''); } - / !inline_breaks ( + / !attr_inline_breaks ( directive / [{}] ) )* @@ -2402,7 +2405,7 @@ } attribute_preprocessor_text_double = r:( t:[^{}]+ { return t.join(''); } - / !inline_breaks ( + / !attr_inline_breaks ( directive / [{}] ) )* @@ -2412,7 +2415,7 @@ } attribute_preprocessor_text_double_broken = r:( t:[^{}|]+ { return t.join(''); } - / !inline_breaks ( + / !attr_inline_breaks ( directive / [{}] ) )* @@ -2444,7 +2447,7 @@ attribute_preprocessor_text_single_line = r:( t:[^{}'|!]+ { return t.join(''); } - / !inline_breaks ( + / !attr_inline_breaks ( directive / ![\r\n] [{}] ) )* { @@ -2452,7 +2455,7 @@ } attribute_preprocessor_text_single_line_broken = r:( t:[^{}'|!]+ { return t.join(''); } - / !inline_breaks ( + / !attr_inline_breaks ( directive / ![\r\n] [{}] ) )* { @@ -2460,7 +2463,7 @@ } attribute_preprocessor_text_double_line = r:( t:[^{}|!]+ { return t.join(''); } - / !inline_breaks ( + / !attr_inline_breaks ( directive / ![\r\n] [{}] ) )* { @@ -2468,7 +2471,7 @@ } attribute_preprocessor_text_double_line_broken = r:( t:[^{}|!]+ { return t.join(''); } - / !inline_breaks ( + / !attr_inline_breaks ( directive / ![\r\n] [{}] ) )* { -- To view, visit https://gerrit.wikimedia.org/r/60796 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ia7efa7e2e9df3957dedaf8f8b4b16f2423d161d7 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Parsoid Gerrit-Branch: master Gerrit-Owner: MarkTraceur mtrac...@member.fsf.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Added a wfScopedProfileIn() function to avoid wfProfile() wh... - change (mediawiki/core)
Aaron Schulz has uploaded a new change for review. https://gerrit.wikimedia.org/r/60797 Change subject: Added a wfScopedProfileIn() function to avoid wfProfile() whack-a-mole. .. Added a wfScopedProfileIn() function to avoid wfProfile() whack-a-mole. Change-Id: I9f7e0638edd99e1ac07b83054e8f7ef255179281 --- M includes/profiler/Profiler.php 1 file changed, 18 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/97/60797/1 diff --git a/includes/profiler/Profiler.php b/includes/profiler/Profiler.php index 49d961e..ec60961 100644 --- a/includes/profiler/Profiler.php +++ b/includes/profiler/Profiler.php @@ -27,6 +27,24 @@ */ /** + * Begin profiling of a function and returns an object that stops profiling + * of a function when that object leaves scope (normally the calling function). + * + * This is typically called like: + * code$sp = wfScopedProfileIn( __METHOD__ );/code + * + * @param string $functionname name of the function we will profile + * @return ScopedCallback + * @since 1.22 + */ +function wfScopedProfileIn( $functionname ) { + wfProfileIn( $functionname ); + return new ScopedCallback( function() use ( $functionname ) { + wfProfileOut( $functionname ); + } ); +} + +/** * Begin profiling of a function * @param string $functionname name of the function we will profile */ -- To view, visit https://gerrit.wikimedia.org/r/60797 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I9f7e0638edd99e1ac07b83054e8f7ef255179281 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Aaron Schulz asch...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Add input checks for Language::sprintfDate() - change (mediawiki/core)
Siebrand has uploaded a new change for review. https://gerrit.wikimedia.org/r/60798 Change subject: Add input checks for Language::sprintfDate() .. Add input checks for Language::sprintfDate() Check if the timestamp has a length of 14 characters and if it is numeric. Throw an exception otherwise. Bug: 47629 Change-Id: I9a4fd0af88cf20c2a6bd72fd7048743466c1600f --- M languages/Language.php 1 file changed, 10 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/98/60798/1 diff --git a/languages/Language.php b/languages/Language.php index 9651f3d..40aed01 100644 --- a/languages/Language.php +++ b/languages/Language.php @@ -1078,6 +1078,7 @@ * @param $zone DateTimeZone: Timezone of $ts * @todo handling of o format character for Iranian, Hebrew, Hijri Thai? * +* @throws MWException * @return string */ function sprintfDate( $format, $ts, DateTimeZone $zone = null ) { @@ -1093,6 +1094,15 @@ $thai = false; $minguo = false; $tenno = false; + + if( !strlen( $ts ) === 14 ) { + throw new MWException( __METHOD__ . :XXX The timestamp $ts should have 14 characters ); + } + + if( !is_numeric( $ts ) ) { + throw new MWException( __METHOD__ . : The timestamp $ts should be a number ); + } + for ( $p = 0; $p strlen( $format ); $p++ ) { $num = false; $code = $format[$p]; -- To view, visit https://gerrit.wikimedia.org/r/60798 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I9a4fd0af88cf20c2a6bd72fd7048743466c1600f Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Siebrand siebr...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Updated parallel_tests gem - change (qa/browsertests)
Zfilipin has uploaded a new change for review. https://gerrit.wikimedia.org/r/60799 Change subject: Updated parallel_tests gem .. Updated parallel_tests gem Change-Id: If7083744ab9856d15be239f2d8249723fe59468a --- M Gemfile.lock 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/qa/browsertests refs/changes/99/60799/1 diff --git a/Gemfile.lock b/Gemfile.lock index 0164f9e..be9e577 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -32,7 +32,7 @@ page_navigation (0.7) data_magic (= 0.14) parallel (0.6.4) -parallel_tests (0.11.0) +parallel_tests (0.11.1) parallel rake (10.0.4) rspec-expectations (2.13.0) -- To view, visit https://gerrit.wikimedia.org/r/60799 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: If7083744ab9856d15be239f2d8249723fe59468a Gerrit-PatchSet: 1 Gerrit-Project: qa/browsertests Gerrit-Branch: master Gerrit-Owner: Zfilipin zfili...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Updated parallel_tests gem - change (mediawiki...MobileFrontend)
Zfilipin has uploaded a new change for review. https://gerrit.wikimedia.org/r/60800 Change subject: Updated parallel_tests gem .. Updated parallel_tests gem Change-Id: I309041744d31fc8042f378adf6f85b3e71643eed --- M tests/acceptance/Gemfile.lock 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/MobileFrontend refs/changes/00/60800/1 diff --git a/tests/acceptance/Gemfile.lock b/tests/acceptance/Gemfile.lock index 4cd73ec..731f4a3 100644 --- a/tests/acceptance/Gemfile.lock +++ b/tests/acceptance/Gemfile.lock @@ -29,7 +29,7 @@ page_navigation (0.7) data_magic (= 0.14) parallel (0.6.4) -parallel_tests (0.11.0) +parallel_tests (0.11.1) parallel rake (10.0.4) rspec-expectations (2.13.0) -- To view, visit https://gerrit.wikimedia.org/r/60800 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I309041744d31fc8042f378adf6f85b3e71643eed Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/MobileFrontend Gerrit-Branch: master Gerrit-Owner: Zfilipin zfili...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Show the web fonts selectors only if they are enabled - change (mediawiki...UniversalLanguageSelector)
jenkins-bot has submitted this change and it was merged. Change subject: Show the web fonts selectors only if they are enabled .. Show the web fonts selectors only if they are enabled Change-Id: I70b9f9468154b542a80a9717afdb414530bd0d37 --- M resources/js/ext.uls.displaysettings.js 1 file changed, 30 insertions(+), 12 deletions(-) Approvals: Nikerabbit: Looks good to me, approved jenkins-bot: Verified diff --git a/resources/js/ext.uls.displaysettings.js b/resources/js/ext.uls.displaysettings.js index 08709ed..a7acb79 100644 --- a/resources/js/ext.uls.displaysettings.js +++ b/resources/js/ext.uls.displaysettings.js @@ -56,17 +56,7 @@ + '/div' + '/div' - // Webfonts enabling chechbox with label - + 'div class=row' - + 'div class=eleven columns' - + 'label class=checkbox' - + 'input type=checkbox id=webfonts-enable-checkbox /' - + 'strong data-i18n=ext-uls-webfonts-settings-title/strong ' - + 'span data-i18n=ext-uls-webfonts-settings-info/span ' - + 'a target=_blank href=//www.mediawiki.org/wiki/Special:MyLanguage/Help:Extension:WebFonts data-i18n=ext-uls-webfonts-settings-info-link/a' - + '/label' - + '/div' - + '/div' + + 'div id=uls-display-settings-font-selectors' // Menus font selection dropdown with label + 'div class=row uls-content-fonts' @@ -82,6 +72,20 @@ + 'label class=uls-font-label id=ui-font-selector-label/label' + '/div' + 'select id=ui-font-selector class=four columns end uls-font-select/select' + + '/div' + + + '/div' // End font selectors + + // Webfonts enabling chechbox with label + + 'div class=row' + + 'div class=eleven columns' + + 'label class=checkbox' + + 'input type=checkbox id=webfonts-enable-checkbox /' + + 'strong data-i18n=ext-uls-webfonts-settings-title/strong ' + + 'span data-i18n=ext-uls-webfonts-settings-info/span ' + + 'a target=_blank href=//www.mediawiki.org/wiki/Special:MyLanguage/Help:Extension:WebFonts data-i18n=ext-uls-webfonts-settings-info-link/a' + + '/label' + + '/div' + '/div' + '/div' // End font settings section @@ -128,7 +132,15 @@ }, prepareWebfontsCheckbox: function () { - $( '#webfonts-enable-checkbox' ).prop( 'checked', this.isWebFontsEnabled() ); + var webFontsEnabled = this.isWebFontsEnabled(); + + if ( !webFontsEnabled ) { + this.$template.find( + '#uls-display-settings-font-selectors' + ).addClass( 'hide' ); + } + + $( '#webfonts-enable-checkbox' ).prop( 'checked', webFontsEnabled ); }, isWebFontsEnabled: function () { @@ -432,9 +444,14 @@ } ); displaySettings.$template.find( '#webfonts-enable-checkbox' ).on( 'click', function () { + var $fontSelectors = displaySettings.$template.find( + '#uls-display-settings-font-selectors' + ); + displaySettings.enableApplyButton(); if ( this.checked ) { + $fontSelectors.removeClass( 'hide' ); mw.webfonts.preferences.enable(); mw.webfonts.setup(); displaySettings.$webfonts = $( 'body' ).data( 'webfonts' ); @@ -446,6 +463,7 @@ displaySettings.$webfonts.apply( $uiFontSelector.find( 'option:selected' ) ); displaySettings.$webfonts.refresh(); } else { + $fontSelectors.addClass( 'hide' ); mw.webfonts.preferences.disable(); mw.webfonts.preferences.setFont( displaySettings.uiLanguage, 'system' ); displaySettings.$webfonts.refresh(); -- To view, visit https://gerrit.wikimedia.org/r/60421 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I70b9f9468154b542a80a9717afdb414530bd0d37 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/UniversalLanguageSelector Gerrit-Branch: master Gerrit-Owner:
[MediaWiki-commits] [Gerrit] Add FilePage extension for Wikia - change (translatewiki)
jenkins-bot has submitted this change and it was merged. Change subject: Add FilePage extension for Wikia .. Add FilePage extension for Wikia Change-Id: I68b74188ea5038503cc65f1728d944ed58db61c8 --- M groups/Wikia/extensions.txt 1 file changed, 2 insertions(+), 0 deletions(-) Approvals: Siebrand: Looks good to me, approved jenkins-bot: Verified diff --git a/groups/Wikia/extensions.txt b/groups/Wikia/extensions.txt index 7fc95fe..e0802e3 100644 --- a/groups/Wikia/extensions.txt +++ b/groups/Wikia/extensions.txt @@ -85,6 +85,8 @@ #Edit Page Layout #ignored = anoneditwarning-notice, longpagewarning-notice +File Page + # Siebrand / 2012-08-09 / Disabled as announced. #Follow #aliasfile = Follow/Follow.alias.php -- To view, visit https://gerrit.wikimedia.org/r/59823 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I68b74188ea5038503cc65f1728d944ed58db61c8 Gerrit-PatchSet: 2 Gerrit-Project: translatewiki Gerrit-Branch: master Gerrit-Owner: Grunny mwgru...@gmail.com Gerrit-Reviewer: Grunny mwgru...@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] Config var was confusing; all others are ArticleFeedbackv5 p... - change (mediawiki...ArticleFeedbackv5)
Matthias Mullie has uploaded a new change for review. https://gerrit.wikimedia.org/r/60801 Change subject: Config var was confusing; all others are ArticleFeedbackv5 prefixed .. Config var was confusing; all others are ArticleFeedbackv5 prefixed Change-Id: I79f1b888780965c98a92ce559116786f761e63f8 --- M ArticleFeedbackv5.model.php M ArticleFeedbackv5.php M SpecialArticleFeedbackv5.php M maintenance/archiveFeedback.php M maintenance/setArchiveDate.php 5 files changed, 14 insertions(+), 14 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/ArticleFeedbackv5 refs/changes/01/60801/1 diff --git a/ArticleFeedbackv5.model.php b/ArticleFeedbackv5.model.php index 80a09ae..59a22f1 100644 --- a/ArticleFeedbackv5.model.php +++ b/ArticleFeedbackv5.model.php @@ -589,15 +589,15 @@ if ( $this-isFeatured() || $this-isResolved() || $this-isNonActionable() || $this-isHidden() ) { return null; } elseif ( !$this-aft_archive_date ) { - global $wgArticleFeedbackAutoArchiveTtl; - $wgArticleFeedbackAutoArchiveTtl = (array) $wgArticleFeedbackAutoArchiveTtl; + global $wgArticleFeedbackv5AutoArchiveTtl; + $wgArticleFeedbackv5AutoArchiveTtl = (array) $wgArticleFeedbackv5AutoArchiveTtl; $ttl = '+5 years'; // ttl is set per x amount of unreviewed comments $count = static::getCount( 'unreviewed', $this-aft_page ); - ksort( $wgArticleFeedbackAutoArchiveTtl ); - foreach ( $wgArticleFeedbackAutoArchiveTtl as $amount = $time ) { + ksort( $wgArticleFeedbackv5AutoArchiveTtl ); + foreach ( $wgArticleFeedbackv5AutoArchiveTtl as $amount = $time ) { if ( $amount = $count ) { $ttl = $time; } else { diff --git a/ArticleFeedbackv5.php b/ArticleFeedbackv5.php index 79a8737..d2e033e 100644 --- a/ArticleFeedbackv5.php +++ b/ArticleFeedbackv5.php @@ -99,7 +99,7 @@ * * @var bool true to enable, false to disable */ -$wgArticleFeedbackAutoArchiveEnabled = false; +$wgArticleFeedbackv5AutoArchiveEnabled = false; /** * Defines the auto-archive period for feedback that is not being considered useful. @@ -118,7 +118,7 @@ * * @var array|string strtotime-capable format */ -$wgArticleFeedbackAutoArchiveTtl = '+2 weeks'; +$wgArticleFeedbackv5AutoArchiveTtl = '+2 weeks'; // Defines whether or not there should be a link to the corresponding feedback on the page's talk page $wgArticleFeedbackv5TalkPageLink = true; diff --git a/SpecialArticleFeedbackv5.php b/SpecialArticleFeedbackv5.php index eb13f8a..a3b62ef 100644 --- a/SpecialArticleFeedbackv5.php +++ b/SpecialArticleFeedbackv5.php @@ -144,8 +144,8 @@ // don't display archived list unless specifically enabled (if cronjob // is not running, it would simply not work) - global $wgArticleFeedbackAutoArchiveEnabled; - if ( !$wgArticleFeedbackAutoArchiveEnabled ) { + global $wgArticleFeedbackv5AutoArchiveEnabled; + if ( !$wgArticleFeedbackv5AutoArchiveEnabled ) { $this-filters = array_diff( $this-filters, array( 'archived' ) ); } diff --git a/maintenance/archiveFeedback.php b/maintenance/archiveFeedback.php index 765df31..3ff14f5 100644 --- a/maintenance/archiveFeedback.php +++ b/maintenance/archiveFeedback.php @@ -52,10 +52,10 @@ * it works similar to any other action plus caches will update nicely. */ public function execute() { - global $wgArticleFeedbackv5Cluster, $wgArticleFeedbackAutoArchiveEnabled; + global $wgArticleFeedbackv5Cluster, $wgArticleFeedbackv5AutoArchiveEnabled; - if ( !$wgArticleFeedbackAutoArchiveEnabled ) { - $this-output( 'IMPORTANT! Auto-archive is currently disabled. To enable, set $wgArticleFeedbackAutoArchiveEnabled = true.'.\n ); + if ( !$wgArticleFeedbackv5AutoArchiveEnabled ) { + $this-output( 'IMPORTANT! Auto-archive is currently disabled. To enable, set $wgArticleFeedbackv5AutoArchiveEnabled = true.'.\n ); } else { $this-output( Marking old feedback as archived.\n ); diff --git a/maintenance/setArchiveDate.php b/maintenance/setArchiveDate.php index 6c60a7b..0a9333c 100644 --- a/maintenance/setArchiveDate.php +++ b/maintenance/setArchiveDate.php @@ -103,9 +103,9 @@ $this-output( Done. Fixed . $this-completeCount . entries' archive dates.\n ); - global $wgArticleFeedbackAutoArchiveEnabled; - if (
[MediaWiki-commits] [Gerrit] Add some recently added messages as ignored - change (mediawiki/core)
Siebrand has uploaded a new change for review. https://gerrit.wikimedia.org/r/60802 Change subject: Add some recently added messages as ignored .. Add some recently added messages as ignored CSS styles and magi words should not be translated. Change-Id: Ieed5df74fabe697762bd390b18f01c28c11637a9 --- M maintenance/language/messageTypes.inc 1 file changed, 6 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/02/60802/1 diff --git a/maintenance/language/messageTypes.inc b/maintenance/language/messageTypes.inc index f5bcb5d..94db69e 100644 --- a/maintenance/language/messageTypes.inc +++ b/maintenance/language/messageTypes.inc @@ -247,6 +247,12 @@ 'ipb-default-expiry', 'pageinfo-header', 'pageinfo-footer', + 'createacct-benefit-head1', + 'createacct-benefit-icon1', + 'createacct-benefit-head2', + 'createacct-benefit-icon2', + 'createacct-benefit-head3', + 'createacct-benefit-icon3', ); /** Optional messages, which may be translated only if changed in the target language. */ -- To view, visit https://gerrit.wikimedia.org/r/60802 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ieed5df74fabe697762bd390b18f01c28c11637a9 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Siebrand siebr...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Config var was confusing; all others are ArticleFeedbackv5 p... - change (operations/mediawiki-config)
Matthias Mullie has uploaded a new change for review. https://gerrit.wikimedia.org/r/60803 Change subject: Config var was confusing; all others are ArticleFeedbackv5 prefixeg .. Config var was confusing; all others are ArticleFeedbackv5 prefixeg Enable Auto-archive for enwiki, dewiki, frwiki Change-Id: I7429f8774aafb0ceb547003698bde40d7975e80a --- M wmf-config/CommonSettings.php M wmf-config/InitialiseSettings.php 2 files changed, 9 insertions(+), 4 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/mediawiki-config refs/changes/03/60803/1 diff --git a/wmf-config/CommonSettings.php b/wmf-config/CommonSettings.php index 9218331..9503038 100644 --- a/wmf-config/CommonSettings.php +++ b/wmf-config/CommonSettings.php @@ -2045,8 +2045,8 @@ $wgArticleFeedbackv5LearnToEdit = $wmgArticleFeedbackv5LearnToEdit; $wgArticleFeedbackv5Namespaces = $wmgArticleFeedbackv5Namespaces; $wgArticleFeedbackv5LotteryOdds = $wmgArticleFeedbackv5LotteryOdds; - $wgArticleFeedbackAutoArchiveEnabled = $wmgArticleFeedbackAutoArchiveEnabled; - $wgArticleFeedbackAutoArchiveTtl = $wmgArticleFeedbackAutoArchiveTtl; + $wgArticleFeedbackv5AutoArchiveEnabled = $wmgArticleFeedbackv5AutoArchiveEnabled; + $wgArticleFeedbackv5AutoArchiveTtl = $wmgArticleFeedbackv5AutoArchiveTtl; $wgArticleFeedbackv5Watchlist = $wmgArticleFeedbackv5Watchlist; $wgArticleFeedbackv5ArticlePageLink = $wmgArticleFeedbackv5ArticlePageLink; diff --git a/wmf-config/InitialiseSettings.php b/wmf-config/InitialiseSettings.php index 558a0de..da09c3c 100644 --- a/wmf-config/InitialiseSettings.php +++ b/wmf-config/InitialiseSettings.php @@ -10709,8 +10709,12 @@ * This should be manually set to true, to make sure the filter * does not show up when the cronjob is not running. */ -'wmgArticleFeedbackAutoArchiveEnabled' = array( +'wmgArticleFeedbackv5AutoArchiveEnabled' = array( 'default' = false, + 'testwiki' = true, + 'enwiki' = true, + 'dewiki' = true, + 'frwiki' = true, ), /* * This is the TTL before an item is archived (if auto-archive is enabled); @@ -10718,7 +10722,7 @@ * faster. For a fixed date, a simple integer can be passed instead of an * array, to make it amount of unreviewed feedback-agnostic. */ -'wmgArticleFeedbackAutoArchiveTtl' = array( +'wmgArticleFeedbackv5AutoArchiveTtl' = array( 'default' = array( 0 = '+2 years', // 9 unreviewed feedback 10 = '+1 month', // 10-19 @@ -10727,6 +10731,7 @@ 40 = '+2 days', // 40 ), 'dewiki' = array( + // longer-than-default auto-archive delay 0 = '+1 year', // 9 unreviewed feedback 10 = '+6 months', // 10-19 20 = '+3 months', // 20-29 -- To view, visit https://gerrit.wikimedia.org/r/60803 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I7429f8774aafb0ceb547003698bde40d7975e80a Gerrit-PatchSet: 1 Gerrit-Project: operations/mediawiki-config Gerrit-Branch: master Gerrit-Owner: Matthias Mullie mmul...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Remove underscores in SiteLinkLookup::getItemIdForLink - change (mediawiki...Wikibase)
Daniel Kinzler has submitted this change and it was merged. Change subject: Remove underscores in SiteLinkLookup::getItemIdForLink .. Remove underscores in SiteLinkLookup::getItemIdForLink We don't store underscores like MediaWiki core does. Change-Id: Ie1c0bb1ba3d84825d4b25d5e560ef3fe7bc6e6c6 --- M lib/includes/store/sql/SiteLinkTable.php M lib/tests/phpunit/MockRepository.php M repo/includes/specials/SpecialItemByTitle.php 3 files changed, 7 insertions(+), 1 deletion(-) Approvals: Daniel Kinzler: Verified; Looks good to me, approved Jeroen De Dauw: Looks good to me, but someone else must approve jenkins-bot: Checked diff --git a/lib/includes/store/sql/SiteLinkTable.php b/lib/includes/store/sql/SiteLinkTable.php index 9853e90..0b883c9 100644 --- a/lib/includes/store/sql/SiteLinkTable.php +++ b/lib/includes/store/sql/SiteLinkTable.php @@ -173,6 +173,9 @@ * @return integer|boolean */ public function getItemIdForLink( $globalSiteId, $pageTitle ) { + // We store page titles with spaces instead of underscores + $pageTitle = str_replace( '_', ' ', $pageTitle ); + $db = $this-getConnection( DB_SLAVE ); $result = $db-selectRow( diff --git a/lib/tests/phpunit/MockRepository.php b/lib/tests/phpunit/MockRepository.php index 9da3c2e..0394cad 100644 --- a/lib/tests/phpunit/MockRepository.php +++ b/lib/tests/phpunit/MockRepository.php @@ -138,6 +138,9 @@ * @return integer|boolean */ public function getItemIdForLink( $globalSiteId, $pageTitle ) { + // We store page titles with spaces instead of underscores + $pageTitle = str_replace( '_', ' ', $pageTitle ); + $key = $globalSiteId:$pageTitle; if ( isset( $this-itemByLink[$key] ) ) { diff --git a/repo/includes/specials/SpecialItemByTitle.php b/repo/includes/specials/SpecialItemByTitle.php index 11d09c4..831c5c1 100644 --- a/repo/includes/specials/SpecialItemByTitle.php +++ b/repo/includes/specials/SpecialItemByTitle.php @@ -65,7 +65,7 @@ if ( isset( $site ) isset( $page ) ) { // Try to get a item content $siteId = \Wikibase\Utils::trimToNFC( $site ); // no stripping of underscores here! - $pageName = \Wikibase\Utils::trimToNFC( str_replace( '_', ' ', $page ) ); + $pageName = \Wikibase\Utils::trimToNFC( $page ); $itemHandler = new \Wikibase\ItemHandler(); $itemContent = $itemHandler-getFromSiteLink( $siteId, $pageName ); // Do we have an item content, and if not can we try harder? -- To view, visit https://gerrit.wikimedia.org/r/60760 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ie1c0bb1ba3d84825d4b25d5e560ef3fe7bc6e6c6 Gerrit-PatchSet: 2 Gerrit-Project: mediawiki/extensions/Wikibase Gerrit-Branch: master Gerrit-Owner: Hoo man h...@online.de Gerrit-Reviewer: Aude aude.w...@gmail.com Gerrit-Reviewer: Daniel Kinzler daniel.kinz...@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] Add some recently added messages as ignored - change (mediawiki/core)
jenkins-bot has submitted this change and it was merged. Change subject: Add some recently added messages as ignored .. Add some recently added messages as ignored CSS styles and magic words should not be translated. Change-Id: Ieed5df74fabe697762bd390b18f01c28c11637a9 --- M maintenance/language/messageTypes.inc 1 file changed, 6 insertions(+), 0 deletions(-) Approvals: Nikerabbit: Looks good to me, approved jenkins-bot: Verified diff --git a/maintenance/language/messageTypes.inc b/maintenance/language/messageTypes.inc index f5bcb5d..94db69e 100644 --- a/maintenance/language/messageTypes.inc +++ b/maintenance/language/messageTypes.inc @@ -247,6 +247,12 @@ 'ipb-default-expiry', 'pageinfo-header', 'pageinfo-footer', + 'createacct-benefit-head1', + 'createacct-benefit-icon1', + 'createacct-benefit-head2', + 'createacct-benefit-icon2', + 'createacct-benefit-head3', + 'createacct-benefit-icon3', ); /** Optional messages, which may be translated only if changed in the target language. */ -- To view, visit https://gerrit.wikimedia.org/r/60802 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ieed5df74fabe697762bd390b18f01c28c11637a9 Gerrit-PatchSet: 2 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Siebrand siebr...@wikimedia.org Gerrit-Reviewer: Nikerabbit niklas.laxst...@gmail.com Gerrit-Reviewer: Raimond Spekking raimond.spekk...@gmail.com Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] git-changed-in-head helper script - change (integration/jenkins)
Hashar has uploaded a new change for review. https://gerrit.wikimedia.org/r/60804 Change subject: git-changed-in-head helper script .. git-changed-in-head helper script A simple bash wrapper to easily list modified files in HEAD that matches a set of extensions. It will NOT list deleted files. Examples: git-changed-in-head php php5 inc git-changed-in-head pp git-changed-in-head js Change-Id: If91cecca4e94db88939c8a1978430085ab3279e0 --- A bin/git-changed-in-head 1 file changed, 30 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/integration/jenkins refs/changes/04/60804/1 diff --git a/bin/git-changed-in-head b/bin/git-changed-in-head new file mode 100755 index 000..20da6dc --- /dev/null +++ b/bin/git-changed-in-head @@ -0,0 +1,30 @@ +#!/bin/bash +# +# git-changed-in-head : list changed files in HEAD matching a file extension +# +# This script list any added, copied or modified file in the current directory +# and filters out by extension. +# +# The current directory must be a git repository. +# +# USAGE: +# git-changed-in-head [extension..] +# +# EXAMPLE: +# +# List files ending with .php, .php5 or .inc +# git-changed-in-head php php5 inc +# +# List any file changed (now filtering): +# git-changed-in-head +# +# Copyright © 2013, Antoine Musso +# Copyright © 2013, Wikimedia Foundation Inc. +# +# Licensed under GPLv2.0 +# +PATH_ARGS=() +for ext in $@; do + PATH_ARGS+=(*.$ext) +done; +git diff HEAD^..HEAD --name-only --diff-filter=ACM -- ${PATH_ARGS[@]} -- To view, visit https://gerrit.wikimedia.org/r/60804 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: If91cecca4e94db88939c8a1978430085ab3279e0 Gerrit-PatchSet: 1 Gerrit-Project: integration/jenkins Gerrit-Branch: master Gerrit-Owner: Hashar has...@free.fr ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Deprecate Settings class - change (mediawiki...Wikibase)
Daniel Kinzler has submitted this change and it was merged. Change subject: Deprecate Settings class .. Deprecate Settings class Change-Id: Id9313aaa58ce8d286c1904d70d8d15e6c5095b76 --- M lib/includes/Settings.php 1 file changed, 3 insertions(+), 8 deletions(-) Approvals: Daniel Kinzler: Verified; Looks good to me, approved jenkins-bot: Checked diff --git a/lib/includes/Settings.php b/lib/includes/Settings.php index b5b85f3..35de02a 100644 --- a/lib/includes/Settings.php +++ b/lib/includes/Settings.php @@ -1,17 +1,12 @@ ?php namespace Wikibase; -use MWException; /** - * File defining the settings for the Wikibase extension. - * More info can be found at https://www.mediawiki.org/wiki/Extension:Wikibase#Settings + * @deprecated * - * NOTICE: - * Changing one of these settings can be done by assigning to $wgWBSettings, - * AFTER the inclusion of the extension itself. - * - * // TODO: have dedicated settings interfaces per extension + * Each component should manage its own settings, + * and such settings should be defined in their own configuration. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by -- To view, visit https://gerrit.wikimedia.org/r/60663 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Id9313aaa58ce8d286c1904d70d8d15e6c5095b76 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Wikibase Gerrit-Branch: master Gerrit-Owner: Jeroen De Dauw jeroended...@gmail.com Gerrit-Reviewer: Daniel Kinzler daniel.kinz...@wikimedia.de Gerrit-Reviewer: Daniel Werner daniel.wer...@wikimedia.de Gerrit-Reviewer: Tobias Gritschacher tobias.gritschac...@wikimedia.de Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] git-changed-in-head helper script - change (integration/jenkins)
Hashar has submitted this change and it was merged. Change subject: git-changed-in-head helper script .. git-changed-in-head helper script A simple bash wrapper to easily list modified files in HEAD that matches a set of extensions. It will NOT list deleted files. Examples: git-changed-in-head php php5 inc git-changed-in-head pp git-changed-in-head js Change-Id: If91cecca4e94db88939c8a1978430085ab3279e0 --- A bin/git-changed-in-head 1 file changed, 30 insertions(+), 0 deletions(-) Approvals: Hashar: Verified; Looks good to me, approved diff --git a/bin/git-changed-in-head b/bin/git-changed-in-head new file mode 100755 index 000..20da6dc --- /dev/null +++ b/bin/git-changed-in-head @@ -0,0 +1,30 @@ +#!/bin/bash +# +# git-changed-in-head : list changed files in HEAD matching a file extension +# +# This script list any added, copied or modified file in the current directory +# and filters out by extension. +# +# The current directory must be a git repository. +# +# USAGE: +# git-changed-in-head [extension..] +# +# EXAMPLE: +# +# List files ending with .php, .php5 or .inc +# git-changed-in-head php php5 inc +# +# List any file changed (now filtering): +# git-changed-in-head +# +# Copyright © 2013, Antoine Musso +# Copyright © 2013, Wikimedia Foundation Inc. +# +# Licensed under GPLv2.0 +# +PATH_ARGS=() +for ext in $@; do + PATH_ARGS+=(*.$ext) +done; +git diff HEAD^..HEAD --name-only --diff-filter=ACM -- ${PATH_ARGS[@]} -- To view, visit https://gerrit.wikimedia.org/r/60804 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: If91cecca4e94db88939c8a1978430085ab3279e0 Gerrit-PatchSet: 1 Gerrit-Project: integration/jenkins Gerrit-Branch: master Gerrit-Owner: Hashar has...@free.fr Gerrit-Reviewer: Hashar has...@free.fr ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Pass language from property parser function to entity id lab... - change (mediawiki...Wikibase)
Tobias Gritschacher has uploaded a new change for review. https://gerrit.wikimedia.org/r/60805 Change subject: Pass language from property parser function to entity id label formatter .. Pass language from property parser function to entity id label formatter This is a temporary solution that should be revised when we figure out how to set options for data type dependent objects in a generic but sane way Change-Id: I15582e1baad50901482805d328a800cd71bbe566 --- M client/includes/parserhooks/PropertyParserFunction.php M lib/includes/SnakFormatter.php M lib/includes/TypedValueFormatter.php M lib/tests/phpunit/SnakFormatterTest.php M lib/tests/phpunit/TypedValueFormatterTest.php 5 files changed, 27 insertions(+), 21 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Wikibase refs/changes/05/60805/1 diff --git a/client/includes/parserhooks/PropertyParserFunction.php b/client/includes/parserhooks/PropertyParserFunction.php index 0e09de6..6cf6eae 100644 --- a/client/includes/parserhooks/PropertyParserFunction.php +++ b/client/includes/parserhooks/PropertyParserFunction.php @@ -101,7 +101,7 @@ * @return string - wikitext format */ private function formatSnakList( $snaks ) { - $formattedValues = $this-snaksFormatter-formatSnaks( $snaks ); + $formattedValues = $this-snaksFormatter-formatSnaks( $snaks, $this-language-getCode() ); return $this-language-commaList( $formattedValues ); } diff --git a/lib/includes/SnakFormatter.php b/lib/includes/SnakFormatter.php index 4345f2f..ba47249 100644 --- a/lib/includes/SnakFormatter.php +++ b/lib/includes/SnakFormatter.php @@ -66,33 +66,34 @@ * @since 0.4 * * @param Snak[] $snaks +* @param string $languageCode * * @return string[] */ - public function formatSnaks( array $snaks ) { + public function formatSnaks( array $snaks, $languageCode ) { $formattedValues = array(); foreach ( $snaks as $snak ) { - $formattedValues[] = $this-formatSnak( $snak ); + $formattedValues[] = $this-formatSnak( $snak, $languageCode ); } return $formattedValues; } - private function formatSnak( Snak $snak ) { + private function formatSnak( Snak $snak, $languageCode ) { if ( $snak instanceof PropertyValueSnak ) { - return $this-formatPropertyValueSnak( $snak ); + return $this-formatPropertyValueSnak( $snak, $languageCode ); } // TODO: we might want to allow customization here (this happens for NoValue and SomeValue snaks) return ''; } - private function formatPropertyValueSnak( PropertyValueSnak $snak ) { + private function formatPropertyValueSnak( PropertyValueSnak $snak, $languageCode ) { $dataValue = $snak-getDataValue(); $dataTypeId = $this-getDataTypeForProperty( $snak-getPropertyId() ); - return $this-typedValueFormatter-formatToString( $dataValue, $dataTypeId ); + return $this-typedValueFormatter-formatToString( $dataValue, $dataTypeId, $languageCode ); } private function getDataTypeForProperty( EntityId $propertyId ) { diff --git a/lib/includes/TypedValueFormatter.php b/lib/includes/TypedValueFormatter.php index 831af3b..4cedb67 100644 --- a/lib/includes/TypedValueFormatter.php +++ b/lib/includes/TypedValueFormatter.php @@ -4,7 +4,11 @@ use DataTypes\DataType; use DataValues\DataValue; +use ValueFormatters\FormatterOptions; use ValueFormatters\ValueFormatter; +use Wikibase\CachingEntityLoader; +use Wikibase\Settings; +use Wikibase\WikiPageEntityLookup; /** * Provides a string representation for a DataValue given its associated DataType. @@ -34,7 +38,7 @@ */ class TypedValueFormatter { - public function formatToString( DataValue $dataValue, DataType $dataType ) { + public function formatToString( DataValue $dataValue, DataType $dataType, $languageCode ) { // TODO: update this code to obtain the string formatter as soon as corresponding changes // in the DataTypes library have been made. @@ -44,7 +48,7 @@ // FIXME: before we can properly use the DataType system some issues to its implementation need // to be solved. Once this is done, this evil if block and function it calls should go. if ( $valueFormatter === false $dataType-getId() === 'wikibase-item' ) { - $valueFormatter = $this-evilGetEntityIdFormatter(); + $valueFormatter = $this-evilGetEntityIdFormatter( $languageCode ); } if (
[MediaWiki-commits] [Gerrit] Pass language from property parser function to entity id lab... - change (mediawiki...Wikibase)
Tobias Gritschacher has submitted this change and it was merged. Change subject: Pass language from property parser function to entity id label formatter .. Pass language from property parser function to entity id label formatter This is a temporary solution that should be revised when we figure out how to set options for data type dependent objects in a generic but sane way Change-Id: I15582e1baad50901482805d328a800cd71bbe566 --- M client/includes/parserhooks/PropertyParserFunction.php M lib/includes/SnakFormatter.php M lib/includes/TypedValueFormatter.php M lib/tests/phpunit/SnakFormatterTest.php M lib/tests/phpunit/TypedValueFormatterTest.php 5 files changed, 27 insertions(+), 21 deletions(-) Approvals: Tobias Gritschacher: Verified; Looks good to me, approved jenkins-bot: Checked diff --git a/client/includes/parserhooks/PropertyParserFunction.php b/client/includes/parserhooks/PropertyParserFunction.php index 0e09de6..6cf6eae 100644 --- a/client/includes/parserhooks/PropertyParserFunction.php +++ b/client/includes/parserhooks/PropertyParserFunction.php @@ -101,7 +101,7 @@ * @return string - wikitext format */ private function formatSnakList( $snaks ) { - $formattedValues = $this-snaksFormatter-formatSnaks( $snaks ); + $formattedValues = $this-snaksFormatter-formatSnaks( $snaks, $this-language-getCode() ); return $this-language-commaList( $formattedValues ); } diff --git a/lib/includes/SnakFormatter.php b/lib/includes/SnakFormatter.php index 4345f2f..ba47249 100644 --- a/lib/includes/SnakFormatter.php +++ b/lib/includes/SnakFormatter.php @@ -66,33 +66,34 @@ * @since 0.4 * * @param Snak[] $snaks +* @param string $languageCode * * @return string[] */ - public function formatSnaks( array $snaks ) { + public function formatSnaks( array $snaks, $languageCode ) { $formattedValues = array(); foreach ( $snaks as $snak ) { - $formattedValues[] = $this-formatSnak( $snak ); + $formattedValues[] = $this-formatSnak( $snak, $languageCode ); } return $formattedValues; } - private function formatSnak( Snak $snak ) { + private function formatSnak( Snak $snak, $languageCode ) { if ( $snak instanceof PropertyValueSnak ) { - return $this-formatPropertyValueSnak( $snak ); + return $this-formatPropertyValueSnak( $snak, $languageCode ); } // TODO: we might want to allow customization here (this happens for NoValue and SomeValue snaks) return ''; } - private function formatPropertyValueSnak( PropertyValueSnak $snak ) { + private function formatPropertyValueSnak( PropertyValueSnak $snak, $languageCode ) { $dataValue = $snak-getDataValue(); $dataTypeId = $this-getDataTypeForProperty( $snak-getPropertyId() ); - return $this-typedValueFormatter-formatToString( $dataValue, $dataTypeId ); + return $this-typedValueFormatter-formatToString( $dataValue, $dataTypeId, $languageCode ); } private function getDataTypeForProperty( EntityId $propertyId ) { diff --git a/lib/includes/TypedValueFormatter.php b/lib/includes/TypedValueFormatter.php index 831af3b..4cedb67 100644 --- a/lib/includes/TypedValueFormatter.php +++ b/lib/includes/TypedValueFormatter.php @@ -4,7 +4,11 @@ use DataTypes\DataType; use DataValues\DataValue; +use ValueFormatters\FormatterOptions; use ValueFormatters\ValueFormatter; +use Wikibase\CachingEntityLoader; +use Wikibase\Settings; +use Wikibase\WikiPageEntityLookup; /** * Provides a string representation for a DataValue given its associated DataType. @@ -34,7 +38,7 @@ */ class TypedValueFormatter { - public function formatToString( DataValue $dataValue, DataType $dataType ) { + public function formatToString( DataValue $dataValue, DataType $dataType, $languageCode ) { // TODO: update this code to obtain the string formatter as soon as corresponding changes // in the DataTypes library have been made. @@ -44,7 +48,7 @@ // FIXME: before we can properly use the DataType system some issues to its implementation need // to be solved. Once this is done, this evil if block and function it calls should go. if ( $valueFormatter === false $dataType-getId() === 'wikibase-item' ) { - $valueFormatter = $this-evilGetEntityIdFormatter(); + $valueFormatter = $this-evilGetEntityIdFormatter( $languageCode ); } if ( $valueFormatter === false ) { @@ -64,24 +68,25 @@
[MediaWiki-commits] [Gerrit] Update for nginx 1.4 - change (translatewiki)
Nikerabbit has uploaded a new change for review. https://gerrit.wikimedia.org/r/60806 Change subject: Update for nginx 1.4 .. Update for nginx 1.4 Not 100% what changed again in the syntax but this combination, while quite long and redundant, seems to at least work. Change-Id: I86d56aa3d829daad8283eb06199930983f080ace --- M puppet/modules/nginx/files/sites/translatewiki.net 1 file changed, 3 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/translatewiki refs/changes/06/60806/1 diff --git a/puppet/modules/nginx/files/sites/translatewiki.net b/puppet/modules/nginx/files/sites/translatewiki.net index 0c0e8be..8064dd8 100644 --- a/puppet/modules/nginx/files/sites/translatewiki.net +++ b/puppet/modules/nginx/files/sites/translatewiki.net @@ -1,9 +1,10 @@ # file managed by puppet server { - listen [::]:80 default_server; + listen 80 default_server; + listen [::]:80; listen 443 ssl default_server; - listen [::]:443 ssl default_server ipv6only=on; + listen [::]:443 ssl; ssl_certificate /etc/ssl/private/translatewiki.net.pem; ssl_certificate_key /etc/ssl/private/translatewiki.net.key; -- To view, visit https://gerrit.wikimedia.org/r/60806 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I86d56aa3d829daad8283eb06199930983f080ace Gerrit-PatchSet: 1 Gerrit-Project: translatewiki Gerrit-Branch: master Gerrit-Owner: Nikerabbit niklas.laxst...@gmail.com ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Use Property-setDataTypeId rather then -setDataType so no ... - change (mediawiki...Wikibase)
Daniel Kinzler has submitted this change and it was merged. Change subject: Use Property-setDataTypeId rather then -setDataType so no DataType construction is needed .. Use Property-setDataTypeId rather then -setDataType so no DataType construction is needed This gets rid of LibRegistry usage as well Change-Id: I07e334767054310f1a725e43c304db8c91ec6ca0 --- M repo/maintenance/importProperties.php M repo/tests/phpunit/includes/api/GetClaimsTest.php M repo/tests/phpunit/includes/api/RemoveClaimsTest.php M repo/tests/phpunit/includes/api/SetClaimValueTest.php M repo/tests/phpunit/includes/content/PropertyContentTest.php 5 files changed, 7 insertions(+), 25 deletions(-) Approvals: Daniel Kinzler: Verified; Looks good to me, approved jenkins-bot: Checked diff --git a/repo/maintenance/importProperties.php b/repo/maintenance/importProperties.php index 85f86f4..bbe547f 100644 --- a/repo/maintenance/importProperties.php +++ b/repo/maintenance/importProperties.php @@ -121,9 +121,7 @@ foreach ( $data as $lang = $title ) { $label = $title; $property-setLabel( $lang, $label ); - - $libRegistry = new \Wikibase\LibRegistry( \Wikibase\Settings::singleton() ); -$property-setDataType( $libRegistry-getDataTypeFactory()-getType( 'wikibase-item' ) ); +$property-setDataTypeId( 'wikibase-item' ); } $content = \Wikibase\PropertyContent::newFromProperty( $property ); diff --git a/repo/tests/phpunit/includes/api/GetClaimsTest.php b/repo/tests/phpunit/includes/api/GetClaimsTest.php index 0c2e558..602daff 100644 --- a/repo/tests/phpunit/includes/api/GetClaimsTest.php +++ b/repo/tests/phpunit/includes/api/GetClaimsTest.php @@ -68,9 +68,7 @@ protected function getNewEntities() { $property = \Wikibase\Property::newEmpty(); - $libRegistry = new \Wikibase\LibRegistry( \Wikibase\Settings::singleton() ); - $dataTypes = $libRegistry-getDataTypeFactory()-getTypes(); - $property-setDataType( reset( $dataTypes ) ); + $property-setDataTypeId( 'string' ); return array( $this-addClaimsAndSave( \Wikibase\Item::newEmpty() ), diff --git a/repo/tests/phpunit/includes/api/RemoveClaimsTest.php b/repo/tests/phpunit/includes/api/RemoveClaimsTest.php index 7e88acf..105d4c6 100644 --- a/repo/tests/phpunit/includes/api/RemoveClaimsTest.php +++ b/repo/tests/phpunit/includes/api/RemoveClaimsTest.php @@ -62,11 +62,7 @@ public function entityProvider() { $property = \Wikibase\Property::newEmpty(); - - $libRegistry = new \Wikibase\LibRegistry( \Wikibase\Settings::singleton() ); - $dataTypes = $libRegistry-getDataTypeFactory()-getTypes(); - - $property-setDataType( reset( $dataTypes ) ); + $property-setDataTypeId( 'string' ); return array( $this-addClaimsAndSave( \Wikibase\Item::newEmpty() ), diff --git a/repo/tests/phpunit/includes/api/SetClaimValueTest.php b/repo/tests/phpunit/includes/api/SetClaimValueTest.php index 2520708..0ed51d8 100644 --- a/repo/tests/phpunit/includes/api/SetClaimValueTest.php +++ b/repo/tests/phpunit/includes/api/SetClaimValueTest.php @@ -66,11 +66,7 @@ */ protected function getEntities( EntityId $propertyId ) { $property = \Wikibase\Property::newEmpty(); - - $libRegistry = new \Wikibase\LibRegistry( \Wikibase\Settings::singleton() ); - $dataTypes = $libRegistry-getDataTypeFactory()-getTypes(); - - $property-setDataType( reset( $dataTypes ) ); + $property-setDataTypeId( 'string' ); return array( $this-addClaimsAndSave( \Wikibase\Item::newEmpty(), $propertyId ), diff --git a/repo/tests/phpunit/includes/content/PropertyContentTest.php b/repo/tests/phpunit/includes/content/PropertyContentTest.php index ba7e599..d709458 100644 --- a/repo/tests/phpunit/includes/content/PropertyContentTest.php +++ b/repo/tests/phpunit/includes/content/PropertyContentTest.php @@ -59,10 +59,7 @@ */ protected function newEmpty() { $content = PropertyContent::newEmpty(); - - $libRegistry = new \Wikibase\LibRegistry( \Wikibase\Settings::singleton() ); - $dataTypes = $libRegistry-getDataTypeFactory()-getTypes(); - $content-getProperty()-setDataType( array_shift( $dataTypes ) ); + $content-getProperty()-setDataTypeId( 'string' ); return $content; } @@ -70,20 +67,17 @@ public function testLabelUniquenessRestriction() { \Wikibase\StoreFactory::getStore()-getTermIndex()-clear(); - $libRegistry = new \Wikibase\LibRegistry(
[MediaWiki-commits] [Gerrit] Cleanup: Fixed some comments, formatting, removed dead code - change (mediawiki...Parsoid)
Subramanya Sastry has uploaded a new change for review. https://gerrit.wikimedia.org/r/60807 Change subject: Cleanup: Fixed some comments, formatting, removed dead code .. Cleanup: Fixed some comments, formatting, removed dead code * No change in functionality or parser test results. Change-Id: I66a7b1f2a1618d0809d6783156fcc6bc89b44885 --- M js/lib/ext.Cite.js M js/lib/mediawiki.DOMPostProcessor.js M js/lib/mediawiki.WikitextSerializer.js 3 files changed, 42 insertions(+), 92 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Parsoid refs/changes/07/60807/1 diff --git a/js/lib/ext.Cite.js b/js/lib/ext.Cite.js index 696a22e..174cf41 100644 --- a/js/lib/ext.Cite.js +++ b/js/lib/ext.Cite.js @@ -256,12 +256,10 @@ group = null; } - // Re-emit a references placeholder token - // to be processed in post-expansion Sync phase + // Emit a placeholder meta for the references token + // so that the dom post processor can generate and + // emit references at this point in the DOM. var emitPlaceholderMeta = function() { - // Emit a placeholder meta for the references token - // so that the dom post processor can generate and - // emit references at this point in the DOM. var placeHolder = new SelfclosingTagTk('meta', refsTok.attribs, refsTok.dataAttribs); placeHolder.setAttribute('typeof', 'mw:Ext/References'); placeHolder.setAttribute('about', '#' + manager.env.newObjectId()); diff --git a/js/lib/mediawiki.DOMPostProcessor.js b/js/lib/mediawiki.DOMPostProcessor.js index 2b1927f..6bb1aa5 100644 --- a/js/lib/mediawiki.DOMPostProcessor.js +++ b/js/lib/mediawiki.DOMPostProcessor.js @@ -2470,12 +2470,12 @@ this.options = options; // DOM traverser that runs before the in-order DOM handlers. - var firstDOMHandlerPass = new DOMTraverser(); - firstDOMHandlerPass.addHandler( null, migrateDataParsoid ); + var dataParsoidLoader = new DOMTraverser(); + dataParsoidLoader.addHandler( null, migrateDataParsoid ); // Common post processing this.processors = [ - firstDOMHandlerPass.traverse.bind( firstDOMHandlerPass ), + dataParsoidLoader.traverse.bind( dataParsoidLoader ), handleUnbalancedTableTags, migrateStartMetas, //normalizeDocument, @@ -2501,12 +2501,11 @@ var lastDOMHandler = new DOMTraverser(); lastDOMHandler.addHandler( 'a', handleLinkNeighbours.bind( null, env ) ); lastDOMHandler.addHandler( 'meta', stripMarkerMetas ); - - var reallyLastDOMHandler = new DOMTraverser(); - reallyLastDOMHandler.addHandler( null, saveDataParsoid ); - this.processors.push(lastDOMHandler.traverse.bind(lastDOMHandler)); - this.processors.push(reallyLastDOMHandler.traverse.bind(reallyLastDOMHandler)); + + var dataParsoidSaver = new DOMTraverser(); + dataParsoidSaver.addHandler( null, saveDataParsoid ); + this.processors.push(dataParsoidSaver.traverse.bind(dataParsoidSaver)); } // Inherit from EventEmitter diff --git a/js/lib/mediawiki.WikitextSerializer.js b/js/lib/mediawiki.WikitextSerializer.js index c89535e..bab9f11 100644 --- a/js/lib/mediawiki.WikitextSerializer.js +++ b/js/lib/mediawiki.WikitextSerializer.js @@ -189,9 +189,6 @@ // console.warn(---HWT---:onl: + onNewline + : + text); // tokenize the text - // this is synchronous for now, will still need sync version later, or - // alternatively make text processing in the serializer async - var prefixedText = text; if (!onNewline) { // Prefix '_' so that no start-of-line wiki syntax matches. @@ -320,18 +317,37 @@ /* * * Here is what the state attributes mean: * + * rtTesting + *Are we currently running round-trip tests? If yes, then we know + *there won't be any edits and we more aggressively try to use original + *source and source flags during serialization since this is a test of + *Parsoid's efficacy in preserving information. + * * sep *Separator information: *- constraints: min/max number of newlines *- text: collected separator text from DOM text/comment nodes *- lastSourceNode: -- to be documented -- * + * onSOL + *Is the serializer at the start of a new wikitext line? + * + * atStartOfOutput + *True when wts kicks off, false after the first char has been output + * + * inIndentPre + *Is the serializer currently handling indent-pre tags? + * + * inPHPBlock + *Is the serializer currently handling a tag that the PHP parser + *treats as a block tag? + * * wteHandlerStack - *stack of wikitext escaping handlers -- these
[MediaWiki-commits] [Gerrit] Introduction of qunit-parameterized for usage in QUnit tests - change (mediawiki...DataValues)
Daniel Werner has uploaded a new change for review. https://gerrit.wikimedia.org/r/60808 Change subject: Introduction of qunit-parameterized for usage in QUnit tests .. Introduction of qunit-parameterized for usage in QUnit tests Taken from https://github.com/AStepaniuk/qunit-parameterize/tree/master/test and under MIT license. Put into its own resource loader module which can be required by registered test modules. Change-Id: I9fe98e33a5fd58a8e14c1900503ae1f48e72dfbf --- M DataValues/Resources.php A DataValues/resources/qunit.parameterize/COPYING A DataValues/resources/qunit.parameterize/qunit.parameterize.js 3 files changed, 95 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/DataValues refs/changes/08/60808/1 diff --git a/DataValues/Resources.php b/DataValues/Resources.php index 1a4f7dc..197f2c3 100644 --- a/DataValues/Resources.php +++ b/DataValues/Resources.php @@ -76,6 +76,16 @@ 'dataValues', ), ), + + // qunit-parameterize from https://github.com/AStepaniuk/qunit-parameterize + 'qunit.parameterize' = $moduleTemplate + array( + 'scripts' = array( + 'qunit.parameterize/qunit.parameterize.js', + ), + 'dependencies' = array( + 'jquery.qunit' + ) + ), ); } ); diff --git a/DataValues/resources/qunit.parameterize/COPYING b/DataValues/resources/qunit.parameterize/COPYING new file mode 100644 index 000..0b06a83 --- /dev/null +++ b/DataValues/resources/qunit.parameterize/COPYING @@ -0,0 +1,19 @@ +The MIT License (MIT) + +Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the Software), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED AS IS, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. \ No newline at end of file diff --git a/DataValues/resources/qunit.parameterize/qunit.parameterize.js b/DataValues/resources/qunit.parameterize/qunit.parameterize.js new file mode 100644 index 000..5fe90a4 --- /dev/null +++ b/DataValues/resources/qunit.parameterize/qunit.parameterize.js @@ -0,0 +1,66 @@ +/** + * Parameterize v 0.2 + * A QUnit Addon For Running Parameterized Tests + * + * @see https://github.com/AStepaniuk/qunit-parameterize + * @licence MIT licence + * + * @example code + * QUnit + * .cases( [ + * { a : 2, b : 2, expectedSum : 4 }, + * { a : 5, b : 5, expectedSum : 10 }, + * { a : 40, b : 2, expectedSum : 42 } + * ] ) + * .test( 'Sum test', function( params, assert ) { + * var actualSum = sum( params.a, params.b ); + * assert.equal( actualSum, params.expectedSum ); + * } ); + * /code + */ +QUnit.cases = ( function( QUnit ) { + 'use strict'; + + return function(testCases) { + var createTest = function(methodName, title, expected, callback, parameters) { + QUnit[methodName]( + title, + expected, + function(assert) { return callback.call(this, parameters, assert); } + ); + }; + + var iterateTestCases = function(methodName, title, expected, callback) { + if (!testCases) return; + + if (!callback) { + callback = expected; + expected = null; + } + + for (var i = 0; i testCases.length; ++i) { + var parameters = testCases[i]; + + var testCaseTitle = title; + if (parameters.title) { + testCaseTitle += [ + parameters.title + ]; + } + + createTest(methodName, testCaseTitle, expected, callback, parameters); +
[MediaWiki-commits] [Gerrit] Added QUnit tests for DataType constructor and instances - change (mediawiki...DataValues)
Daniel Werner has uploaded a new change for review. https://gerrit.wikimedia.org/r/60809 Change subject: Added QUnit tests for DataType constructor and instances .. Added QUnit tests for DataType constructor and instances Change-Id: I08f6d52b78e63ca5f22600aaa01aae9657e0 --- M DataTypes/DataTypes.mw.php A DataTypes/tests/qunit/dataTypes.DataType.tests.js M DataTypes/tests/qunit/dataTypes.tests.js 3 files changed, 105 insertions(+), 6 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/DataValues refs/changes/09/60809/1 diff --git a/DataTypes/DataTypes.mw.php b/DataTypes/DataTypes.mw.php index 1a91095..39d7c68 100644 --- a/DataTypes/DataTypes.mw.php +++ b/DataTypes/DataTypes.mw.php @@ -109,7 +109,7 @@ 'remoteExtPath' = 'DataValues/DataTypes/tests/qunit', ); - $testModules['qunit']['jquery.dataTypes.tests'] = $moduleTemplate + array( + $testModules['qunit']['dataTypes.tests'] = $moduleTemplate + array( 'scripts' = array( 'dataTypes.tests.js', ), @@ -118,6 +118,16 @@ ), ); + $testModules['qunit']['dataTypes.DataType.tests'] = $moduleTemplate + array( + 'scripts' = array( + 'dataTypes.DataType.tests.js', + ), + 'dependencies' = array( + 'dataTypes', + 'qunit.parameterize' + ), + ); + return true; }; diff --git a/DataTypes/tests/qunit/dataTypes.DataType.tests.js b/DataTypes/tests/qunit/dataTypes.DataType.tests.js new file mode 100644 index 000..59d3bce --- /dev/null +++ b/DataTypes/tests/qunit/dataTypes.DataType.tests.js @@ -0,0 +1,90 @@ +/** + * QUnit tests for DataType construtor and instances. + * + * @since 0.1 + * @file + * @ingroup DataTypes + * + * @licence GNU GPL v2+ + * @author Daniel Werner daniel.wer...@wikimedia.de + */ + +( function( dt, $, QUnit ) { + 'use strict'; + + var DataType = dt.DataType; + + QUnit.module( 'dataTypes.DataType.tests' ); + + var instanceDefinitions = [ + { + title: 'simple DataType', + constructorParams: [ 'foo', 'string' ], + valueType: 'string' + }, { + title: 'another simple datatype', + constructorParams: [ 'bar', 'bool' ], + valueType: 'bool' + } + ]; + + function instanceFromDefinition( definition ) { + var cp = definition.constructorParams; + return new DataType( cp[0], cp[1] ); + } + + QUnit + .cases( instanceDefinitions ) + .test( 'constructor', function( params, assert ) { + var dataType = instanceFromDefinition( params ); + + assert.ok( + dataType instanceof DataType, + 'New data type created and instance of DataType' + ); + } ) + .test( 'getId', function( params, assert ) { + var dataType = instanceFromDefinition( params ); + + assert.strictEqual( + dataType.getId(), + params.constructorParams[0], + 'getId() returns string ID provided in constructor' + ); + } ) + .test( 'getDataValueType', function( params, assert ) { + var dataType = instanceFromDefinition( params ), + dvType = dataType.getDataValueType(); + + assert.equal( + typeof dvType, + 'string', + 'getDataValueType() returns string' + ); + + assert.ok( + dvType !== '', + 'string returned by getDataValueType() is not empty' + ); + } ); + + QUnit + .cases( [ + { + title: 'no arguments', + constructorParams: [] + }, { + title: 'missing data value type', + constructorParams: [ 'foo' ] + } + ] ) + .test( 'invalid construtor arguments', function( params, assert ) { + assert.throws( + function() { + instanceFromDefinition( params ); + }, + 'DataType can not be constructed from invalid arguments' + ); +
[MediaWiki-commits] [Gerrit] DataType constructor taking DataValue constructors as 2nd ar... - change (mediawiki...DataValues)
Daniel Werner has uploaded a new change for review. https://gerrit.wikimedia.org/r/60810 Change subject: DataType constructor taking DataValue constructors as 2nd argument now .. DataType constructor taking DataValue constructors as 2nd argument now If a DataValue is given as second parameter to the constructor, then the data value type will be taken from the constructor. This should be the preferred way of creating Change-Id: I61cdcabd4112ae1ea69dcd22d23ed24e0c69dfeb --- M DataTypes/Resources.php M DataTypes/resources/dataTypes.js M DataTypes/tests/qunit/dataTypes.DataType.tests.js 3 files changed, 23 insertions(+), 13 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/DataValues refs/changes/10/60810/1 diff --git a/DataTypes/Resources.php b/DataTypes/Resources.php index 9896879..710ac96 100644 --- a/DataTypes/Resources.php +++ b/DataTypes/Resources.php @@ -40,7 +40,7 @@ 'scripts' = 'dataTypes.js', // also contains dataType.DataType constructor 'dependencies' = array( 'dataTypes.dataTypesModule', - 'dataValues', + 'dataValues.DataValue', 'valueParsers' ), ), diff --git a/DataTypes/resources/dataTypes.js b/DataTypes/resources/dataTypes.js index 5ab6bcb..14f4f94 100644 --- a/DataTypes/resources/dataTypes.js +++ b/DataTypes/resources/dataTypes.js @@ -15,7 +15,7 @@ * @since 0.1 * @type Object */ -var dataTypes = new ( function Dt( $, mw ) { +var dataTypes = new ( function Dt( $, mw, DataValue ) { 'use strict'; // TODO: the whole structure of this is a little weird, perhaps there should be a @@ -32,18 +32,22 @@ * @since 0.1 * * @param {String} typeId -* @param {String} dataValueType +* @param {String|Funtion} dataValueType Can be a DataValue constructor whose type will then be taken. * @param {vp.Parser} parser * @param {Object} formatter * @param {Object} validators */ var SELF = dt.DataType = function DtDataType( typeId, dataValueType, parser, formatter, validators ) { - // TODO: enforce the requirement or remove it after we implemented and use all of the parts - if( dataValueType === undefined ) { - throw new Error( 'All arguments must be provided for creating a new DataType object' ); + if( dataValueType dataValueType.prototype instanceof DataValue + ) { // DataValue constructor + dataValueType = dataValueType.TYPE; } + if( typeof dataValueType !== 'string' ) { + throw new Error( 'A data value type has to be given in form of a string or DataValue constructor' ); + } + if( !typeId || typeof typeId !== 'string' ) { - throw new Error( 'A dataType.DataType\'s ID has to be a string' ); + throw new Error( 'A data type\'s ID has to be a string' ); } this._typeId = typeId; @@ -180,6 +184,6 @@ dts[ dataType.getId() ] = dataType; }; -} )( jQuery, mediaWiki ); +} )( jQuery, mediaWiki, dataValues.DataValue ); window.dataTypes = dataTypes; // global alias diff --git a/DataTypes/tests/qunit/dataTypes.DataType.tests.js b/DataTypes/tests/qunit/dataTypes.DataType.tests.js index 59d3bce..ef96bcf 100644 --- a/DataTypes/tests/qunit/dataTypes.DataType.tests.js +++ b/DataTypes/tests/qunit/dataTypes.DataType.tests.js @@ -9,7 +9,7 @@ * @author Daniel Werner daniel.wer...@wikimedia.de */ -( function( dt, $, QUnit ) { +( function( dt, dv, $, QUnit ) { 'use strict'; var DataType = dt.DataType; @@ -22,9 +22,9 @@ constructorParams: [ 'foo', 'string' ], valueType: 'string' }, { - title: 'another simple datatype', - constructorParams: [ 'bar', 'bool' ], - valueType: 'bool' + title: 'DataType constructed with DataValue as 2nd argument', + constructorParams: [ 'bar', dv.BoolValue ], + valueType: dv.BoolValue.TYPE } ]; @@ -76,6 +76,12 @@ }, { title: 'missing data value type', constructorParams: [ 'foo' ] + }, { + title: 'wrong type for data value type', + constructorParams: [ 'foo', {} ] + }, { + title: 'wrong type for ID', + constructorParams: [ null, 'xxx' ] } ] )
[MediaWiki-commits] [Gerrit] Added tests for jQuery.valueview.ExpertFactory - change (mediawiki...DataValues)
Daniel Werner has uploaded a new change for review. https://gerrit.wikimedia.org/r/60811 Change subject: Added tests for jQuery.valueview.ExpertFactory .. Added tests for jQuery.valueview.ExpertFactory Change-Id: I7fe43276d789f746f0c19c7dd89eb851d2460a66 --- M ValueView/ValueView.resources.php M ValueView/ValueView.tests.qunit.php M ValueView/resources/jquery.valueview/valueview.ExpertFactory.js A ValueView/resources/jquery.valueview/valueview.experts/experts.Mock.js M ValueView/resources/jquery.valueview/valueview.experts/experts.StaticDom.js A ValueView/tests/qunit/jquery.valueview/valueview.ExpertFactory.tests.js 6 files changed, 328 insertions(+), 11 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/DataValues refs/changes/11/60811/1 diff --git a/ValueView/ValueView.resources.php b/ValueView/ValueView.resources.php index afab9e2..e2a73f0 100644 --- a/ValueView/ValueView.resources.php +++ b/ValueView/ValueView.resources.php @@ -145,6 +145,15 @@ ) ), + 'jquery.valueview.experts.mock' = $moduleTemplate + array( // mock expert for tests + 'scripts' = array( + 'jquery.valueview/valueview.experts/experts.Mock.js', + ), + 'dependencies' = array( + 'jquery.valueview.experts', + ), + ), + 'jquery.valueview.experts.staticdom' = $moduleTemplate + array( 'scripts' = array( 'jquery.valueview/valueview.experts/experts.StaticDom.js', diff --git a/ValueView/ValueView.tests.qunit.php b/ValueView/ValueView.tests.qunit.php index 7f438f8..c36975d 100644 --- a/ValueView/ValueView.tests.qunit.php +++ b/ValueView/ValueView.tests.qunit.php @@ -61,6 +61,17 @@ 'jquery.ui.suggester', ), ), + + 'jquery.valueview.ExpertFactory.tests' = array( + 'scripts' = array( + $bp/jquery.valueview/valueview.ExpertFactory.tests.js, + ), + 'dependencies' = array( + 'jquery.valueview.experts', // contains ExpertFactory + 'jquery.valueview.experts.mock', + 'qunit.parameterize' + ), + ) ); } ); diff --git a/ValueView/resources/jquery.valueview/valueview.ExpertFactory.js b/ValueView/resources/jquery.valueview/valueview.ExpertFactory.js index 0f29bd3..5dd3131 100644 --- a/ValueView/resources/jquery.valueview/valueview.ExpertFactory.js +++ b/ValueView/resources/jquery.valueview/valueview.ExpertFactory.js @@ -4,7 +4,7 @@ * @licence GNU GPL v2+ * @author Daniel Werner daniel.wer...@wikimedia.de */ -( function( dv, dt, $, vv ) { +( function( DataValue, dt, $, vv ) { 'use strict'; var SELF = vv.ExpertFactory = function ValueviewExpertFactory() { @@ -32,7 +32,8 @@ * Registers a valueview expert for displaying values suitable for a certain data type or * of a certain data value type. * -* @param {dataTypes.DataType|dataValues.DataValue|Function} expertPurpose +* @param {dataTypes.DataType|Function} expertPurpose Can be either a DataType instance or a +*DataValue constructor. * @param {Function} expert Constructor of the expert */ registerExpert: function( expertPurpose, expert ) { @@ -41,7 +42,7 @@ } else if ( $.isFunction( expertPurpose ) // DataValue constructor -expertPurpose.prototype instanceof dv.DataValue +expertPurpose.prototype instanceof DataValue expertPurpose.TYPE ) { this.registerDataValueExpert( expertPurpose.TYPE, expert ); @@ -56,7 +57,7 @@ * * @since 0.1 * -* @param {string} dataValueType +* @param {Function|string} dataValueType Either a DataValue constructor or its type. * @param {Function} expert Constructor of the expert */ registerDataValueExpert: function( dataValueType, expert ) { @@ -123,11 +124,13 @@ * @return string[] */ getCoveredDataTypes: function() { - var types = []; + var types = [], + dataTypeExperts = this._expertsForDataTypes, +
[MediaWiki-commits] [Gerrit] Updated wikitext-escaping tests to reflect Parsoid's latest ... - change (mediawiki/core)
Subramanya Sastry has uploaded a new change for review. https://gerrit.wikimedia.org/r/60812 Change subject: Updated wikitext-escaping tests to reflect Parsoid's latest output .. Updated wikitext-escaping tests to reflect Parsoid's latest output Change-Id: Icd10a9bccbcc27715914b9f00a20afb06ed275d1 --- M tests/parser/parserTests.txt 1 file changed, 30 insertions(+), 20 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/12/60812/1 diff --git a/tests/parser/parserTests.txt b/tests/parser/parserTests.txt index b34c957..5fddac8 100644 --- a/tests/parser/parserTests.txt +++ b/tests/parser/parserTests.txt @@ -13563,7 +13563,7 @@ !! input nowiki=foo=/nowiki -nowiki=foo/nowiki''a''= +=foo''a''nowiki=/nowiki !! result p=foo= /pp=fooia/i= @@ -13612,7 +13612,7 @@ !! options disabled !! input -=nowiki=/nowiki'''bold'''foo== +=='''bold'''nowikifoo=/nowiki= !! result h1=bbold/bfoo=/h1 !!end @@ -13627,7 +13627,7 @@ ===foo== ==foo=== =''=''foo== -=== +=nowiki=/nowiki= !! result h1=foo/h1 h1foo=/h1 @@ -13795,9 +13795,11 @@ *[[bar spannowiki[[foo]]/nowiki/span -*nowiki]]bar /nowikispannowiki[[foo]]/nowiki/span +*]]bar spannowiki[[foo]]/nowiki/span *=bar spanfoo]]/span= + +* s/s: a !! result ulli bar span[[foo]]/span /li/ul @@ -13808,6 +13810,8 @@ ulli]]bar span[[foo]]/span /li/ul ulli=bar spanfoo]]/span= +/li/ul +ulli s/s: a /li/ul !!end @@ -13915,7 +13919,7 @@ !! test Tables: 2a. Nested in td !! options -disabled +parsoid !! input {| |nowikifoo|bar/nowiki @@ -13930,7 +13934,7 @@ !! test Tables: 2b. Nested in td !! options -disabled +parsoid !! input {| |nowikifoo||bar/nowiki @@ -13946,9 +13950,9 @@ !! test Tables: 2c. Nested in td -- no escaping needed -!! options -disabled !! input +!! options +parsoid {| |foo!!bar |} @@ -13962,7 +13966,7 @@ !! test Tables: 3a. Nested in th !! options -disabled +parsoid !! input {| !foo!bar @@ -13977,7 +13981,7 @@ !! test Tables: 3b. Nested in th !! options -disabled +parsoid !! input {| !nowikifoo!!bar/nowiki @@ -13990,12 +13994,12 @@ !! end !! test -Tables: 3c. Nested in th -- no escaping needed +Tables: 3b. Nested in th -- no escaping needed !! options -disabled +parsoid !! input {| -!foo||bar +!nowikifoo||bar/nowiki |} !! result table @@ -14007,7 +14011,7 @@ !! test Tables: 4a. Escape - !! options -disabled +parsoid !! input {| |- @@ -14025,7 +14029,7 @@ !! test Tables: 4b. Escape + !! options -disabled +parsoid !! input {| |- @@ -14043,7 +14047,7 @@ !! test Tables: 4c. No escaping needed !! options -disabled +parsoid !! input {| |- @@ -14091,7 +14095,7 @@ !! input [[Foo|nowikiFoo''boo''/nowiki]] !! result -a rel=mw:WikiLink href=FooFoo''boo''/a +-a rel=mw:WikiLink href=FooFoo''boo''/a !! end !! test @@ -14101,11 +14105,14 @@ !! input [[Foo|nowiki[Foobar]/nowiki]] [[Foo|nowikiFoobar]/nowiki]] -[[Foo|nowikix [Foobar] x/nowiki]] +[[Foo|x [Foobar] x]] [[Foo|nowikix [http://google.com g] x/nowiki]] [[Foo|nowiki[[Bar]]/nowiki]] [[Foo|nowikix [[Bar]] x/nowiki]] [[Foo|nowiki|Bar/nowiki]] +[[Foo|nowiki]]bar/nowiki]] +[[Foo|nowiki[[bar/nowiki]] +[[Foo|nowikix ]] y [[ z/nowiki]] !! result a href=Foo rel=mw:WikiLink[Foobar]/a a href=Foo rel=mw:WikiLinkFoobar]/a @@ -14114,6 +14121,9 @@ a href=Foo rel=mw:WikiLink[[Bar]]/a a href=Foo rel=mw:WikiLinkx [[Bar]] x/a a href=Foo rel=mw:WikiLink|Bar/a +a href=Foo rel=mw:WikiLink]]bar/a +a href=Foo rel=mw:WikiLink[[bar/a +a href=Foo rel=mw:WikiLinkx ]] y [[ z/a !! end !! test @@ -14215,9 +14225,9 @@ [[bar spannowiki[[foo]]/nowiki/span -nowiki]]bar /nowikispannowiki[[foo]]/nowiki/span +]]bar spannowiki[[foo]]/nowiki/span -nowiki=bar /nowikispanfoo]]/span= +=bar spanfoo]]/spannowiki=/nowiki !! result pbar span[[foo]]/span /pp=bar span[[foo]]/span -- To view, visit https://gerrit.wikimedia.org/r/60812 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Icd10a9bccbcc27715914b9f00a20afb06ed275d1 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Subramanya Sastry ssas...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Move classes from lib to DataModel, as they are directly nee... - change (mediawiki...Wikibase)
Daniel Kinzler has submitted this change and it was merged. Change subject: Move classes from lib to DataModel, as they are directly needed in DataModel and not in lib .. Move classes from lib to DataModel, as they are directly needed in DataModel and not in lib Change-Id: I120076057786f4fd0d73b95f312b557bbaa34c83 --- M DataModel/DataModel.classes.php M DataModel/DataModel.mw.php R DataModel/DataModel/HashArray.php R DataModel/DataModel/HashableObjectStorage.php R DataModel/DataModel/MapHasher.php R DataModel/DataModel/MapValueHasher.php R DataModel/tests/phpunit/HashableObjectStorageTest.php R DataModel/tests/phpunit/MapValueHasherTest.php R DataModel/tests/phpunit/hasharray/HashArrayElement.php R DataModel/tests/phpunit/hasharray/HashArrayTest.php R DataModel/tests/phpunit/hasharray/HashArrayWithDuplicatesTest.php R DataModel/tests/phpunit/hasharray/HashArrayWithoutDuplicatesTest.php M lib/WikibaseLib.classes.php M lib/WikibaseLib.hooks.php 14 files changed, 13 insertions(+), 12 deletions(-) Approvals: Daniel Kinzler: Verified; Looks good to me, approved jenkins-bot: Checked diff --git a/DataModel/DataModel.classes.php b/DataModel/DataModel.classes.php index 9cea709..da44d8c 100644 --- a/DataModel/DataModel.classes.php +++ b/DataModel/DataModel.classes.php @@ -53,6 +53,10 @@ 'Wikibase\SnakRole' = 'DataModel/Snak/SnakRole.php', 'Wikibase\Snaks' = 'DataModel/Snak/Snaks.php', + 'Wikibase\HashableObjectStorage' = 'DataModel/HashableObjectStorage.php', + 'Wikibase\HashArray' = 'DataModel/HashArray.php', + 'Wikibase\MapHasher' = 'DataModel/MapHasher.php', + 'Wikibase\MapValueHasher' = 'DataModel/MapValueHasher.php', 'Wikibase\Reference' = 'DataModel/Reference.php', 'Wikibase\ReferenceObject' = 'DataModel/Reference.php', // Deprecated 'Wikibase\ReferenceList' = 'DataModel/ReferenceList.php', diff --git a/DataModel/DataModel.mw.php b/DataModel/DataModel.mw.php index 4ef636e..c213f54 100644 --- a/DataModel/DataModel.mw.php +++ b/DataModel/DataModel.mw.php @@ -48,6 +48,9 @@ $wgAutoloadClasses['Wikibase\Test\EntityTest'] = __DIR__ . '/tests/phpunit/Entity/EntityTest.php'; $wgAutoloadClasses['Wikibase\Test\TestItems'] = __DIR__ . '/tests/phpunit/Entity/TestItems.php'; $wgAutoloadClasses['Wikibase\Test\SnakObjectTest'] = __DIR__ . '/tests/phpunit/Snak/SnakObjectTest.php'; + + $wgAutoloadClasses['Wikibase\Test\HashArrayTest'] = __DIR__ . '/tests/phpunit/hasharray/HashArrayTest.php'; + $wgAutoloadClasses['Wikibase\Test\HashArrayElement'] = __DIR__ . '/tests/phpunit/hasharray/HashArrayElement.php'; } /** @@ -80,10 +83,16 @@ 'Snak/SnakList', 'Snak/Snak', + 'HashableObjectStorage', + 'MapValueHasher', + 'ReferenceList', 'Reference', 'SiteLink', + + 'hasharray/HashArrayWithoutDuplicates', + 'hasharray/HashArrayWithDuplicates', ); foreach ( $testFiles as $file ) { diff --git a/lib/includes/HashArray.php b/DataModel/DataModel/HashArray.php similarity index 100% rename from lib/includes/HashArray.php rename to DataModel/DataModel/HashArray.php diff --git a/lib/includes/HashableObjectStorage.php b/DataModel/DataModel/HashableObjectStorage.php similarity index 100% rename from lib/includes/HashableObjectStorage.php rename to DataModel/DataModel/HashableObjectStorage.php diff --git a/lib/includes/MapHasher.php b/DataModel/DataModel/MapHasher.php similarity index 100% rename from lib/includes/MapHasher.php rename to DataModel/DataModel/MapHasher.php diff --git a/lib/includes/MapValueHasher.php b/DataModel/DataModel/MapValueHasher.php similarity index 100% rename from lib/includes/MapValueHasher.php rename to DataModel/DataModel/MapValueHasher.php diff --git a/lib/tests/phpunit/HashableObjectStorageTest.php b/DataModel/tests/phpunit/HashableObjectStorageTest.php similarity index 100% rename from lib/tests/phpunit/HashableObjectStorageTest.php rename to DataModel/tests/phpunit/HashableObjectStorageTest.php diff --git a/lib/tests/phpunit/MapValueHasherTest.php b/DataModel/tests/phpunit/MapValueHasherTest.php similarity index 100% rename from lib/tests/phpunit/MapValueHasherTest.php rename to DataModel/tests/phpunit/MapValueHasherTest.php diff --git a/lib/tests/phpunit/hasharray/HashArrayElement.php b/DataModel/tests/phpunit/hasharray/HashArrayElement.php similarity index 100% rename from lib/tests/phpunit/hasharray/HashArrayElement.php rename to DataModel/tests/phpunit/hasharray/HashArrayElement.php diff --git a/lib/tests/phpunit/hasharray/HashArrayTest.php b/DataModel/tests/phpunit/hasharray/HashArrayTest.php similarity index 100% rename from lib/tests/phpunit/hasharray/HashArrayTest.php rename to
[MediaWiki-commits] [Gerrit] Fixes to wikitext escaping in th tags - change (mediawiki...Parsoid)
Subramanya Sastry has uploaded a new change for review. https://gerrit.wikimedia.org/r/60813 Change subject: Fixes to wikitext escaping in th tags .. Fixes to wikitext escaping in th tags * foo||bar in the HTML below should be nowiki-escaped during serialization. This patch fixes this. - table trthfoo||bar /th/tr/table - * 1 html2html test now passes, but 1 html2wt test now fails The html2wt failure is due to stale parser tests. Once the parserTests.txt patch submitted for review is merged, some of these tests will get fixed. Change-Id: I04863d63d8cbd36460fa6157944198ee680a97d5 --- M js/lib/mediawiki.WikitextSerializer.js M js/tests/parserTests-blacklist.js M js/tests/wt_escape.tests.txt 3 files changed, 3 insertions(+), 3 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Parsoid refs/changes/13/60813/1 diff --git a/js/lib/mediawiki.WikitextSerializer.js b/js/lib/mediawiki.WikitextSerializer.js index bab9f11..ed92b04 100644 --- a/js/lib/mediawiki.WikitextSerializer.js +++ b/js/lib/mediawiki.WikitextSerializer.js @@ -168,7 +168,7 @@ }; WEHP.thHandler = function(state, text) { - return text.match(/!!/); + return text.match(/!!|\|\|/); }; WEHP.wikilinkHandler = function(state, text) { diff --git a/js/tests/parserTests-blacklist.js b/js/tests/parserTests-blacklist.js index 1706cf1..335ad97 100644 --- a/js/tests/parserTests-blacklist.js +++ b/js/tests/parserTests-blacklist.js @@ -1066,7 +1066,6 @@ add(html2html, Gallery with invalid title as link (bug 43964)); add(html2html, Headings: 2. Outside heading nest on a single line h1foo/h1*bar); add(html2html, HRs: 1. Single line); -add(html2html, Tables: 3c. Nested in th -- no escaping needed); add(html2html, Links 1. Quote marks in link text); add(html2html, Links 2. WikiLinks: Escapes needed); add(html2html, Links 3. WikiLinks: No escapes needed); @@ -1937,6 +1936,7 @@ add(html2wt, Tables: 1b. No escaping needed); add(html2wt, Tables: 1c. No escaping needed); add(html2wt, Tables: 1d. No escaping needed); +add(html2wt, Tables: 3c. Nested in th -- no escaping needed); add(html2wt, Tables: 4d. No escaping needed); add(html2wt, Links 2. WikiLinks: Escapes needed); add(html2wt, 1. No unnecessary escapes); diff --git a/js/tests/wt_escape.tests.txt b/js/tests/wt_escape.tests.txt index 47a7f72..2eba201 100644 --- a/js/tests/wt_escape.tests.txt +++ b/js/tests/wt_escape.tests.txt @@ -436,7 +436,7 @@ Tables: 3b. Nested in th -- no escaping needed !! input {| -!foo||bar +!nowikifoo||bar/nowiki |} !! result table -- To view, visit https://gerrit.wikimedia.org/r/60813 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I04863d63d8cbd36460fa6157944198ee680a97d5 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Parsoid Gerrit-Branch: master Gerrit-Owner: Subramanya Sastry ssas...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Remove temporary hack to ensure X-Analytics header on responses - change (operations/puppet)
Mark Bergsma has uploaded a new change for review. https://gerrit.wikimedia.org/r/60814 Change subject: Remove temporary hack to ensure X-Analytics header on responses .. Remove temporary hack to ensure X-Analytics header on responses All objects in the cache which have X-CS but not X-Analytics have been banned. Change-Id: If1c01e9c2c3651bf706f608601dee57a4accddbc --- M templates/varnish/mobile-frontend.inc.vcl.erb 1 file changed, 0 insertions(+), 9 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/14/60814/1 diff --git a/templates/varnish/mobile-frontend.inc.vcl.erb b/templates/varnish/mobile-frontend.inc.vcl.erb index 6c16ffb..514ba81 100644 --- a/templates/varnish/mobile-frontend.inc.vcl.erb +++ b/templates/varnish/mobile-frontend.inc.vcl.erb @@ -658,14 +658,5 @@ if (req.url == /favicon.ico || req.url ~ ^/apple-touch-icon(-precomposed)?\.png$ || req.url ~ ^/w/index\.php\?title=.*:Gadget-.*[0-9]+$) { set resp.http.Cache-Control = s-maxage=3600, max-age=3600; } - - // FIXME: This makes sure the X-Analytics header - // is properly set even if the request is already cached. - // This can be removed once we are sure that all requests - // that should have this header set but are cached without - // it set have been invalidated. - if ( ! resp.http.X-Analytics req.http.X-Analytics ) { - set resp.http.X-Analytics = req.http.X-Analytics; - } } -- To view, visit https://gerrit.wikimedia.org/r/60814 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: If1c01e9c2c3651bf706f608601dee57a4accddbc Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Mark Bergsma m...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Fixed test stats -- unexpected passing tests output was inco... - change (mediawiki...Parsoid)
Subramanya Sastry has uploaded a new change for review. https://gerrit.wikimedia.org/r/60815 Change subject: Fixed test stats -- unexpected passing tests output was incorrect .. Fixed test stats -- unexpected passing tests output was incorrect Change-Id: I10faa493394f55fa238f38137f9f8fd4e2e36284 --- M js/tests/parserTests.js 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Parsoid refs/changes/15/60815/1 diff --git a/js/tests/parserTests.js b/js/tests/parserTests.js index 77d4be5..c8d05bf 100755 --- a/js/tests/parserTests.js +++ b/js/tests/parserTests.js @@ -1195,7 +1195,7 @@ thisMode = stats.modes[modes[i]]; if ( thisMode.passedTests + thisMode.passedTestsWhitelisted + thisMode.failedTests 0 ) { curStr += colorizeCount( thisMode.passedTests + stats.passedTestsWhitelisted, 'green' ) + ' passed ('; - curStr += colorizeCount( stats.passedTestsUnexpected, 'red' ) + ' unexpected, '; + curStr += colorizeCount( thisMode.passedTestsUnexpected, 'red' ) + ' unexpected, '; curStr += colorizeCount( thisMode.passedTestsWhitelisted, 'yellow' ) + ' whitelisted) / '; curStr += colorizeCount( thisMode.failedTests, 'red' ) + ' failed ('; curStr += colorizeCount( thisMode.failedTestsUnexpected, 'red') + ' unexpected)'; -- To view, visit https://gerrit.wikimedia.org/r/60815 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I10faa493394f55fa238f38137f9f8fd4e2e36284 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Parsoid Gerrit-Branch: master Gerrit-Owner: Subramanya Sastry ssas...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Alpha: Rewrite makePrettyDiff function - change (mediawiki...MobileFrontend)
Jdlrobson has uploaded a new change for review. https://gerrit.wikimedia.org/r/60816 Change subject: Alpha: Rewrite makePrettyDiff function .. Alpha: Rewrite makePrettyDiff function Add test case current function doesn't satisfy Rewrite and simplify function Change-Id: Iedf7643307247b6672ee63351dbd58a7431e98cc --- M javascripts/specials/mobilediff.js M tests/javascripts/specials/test_mobilediff.js 2 files changed, 31 insertions(+), 39 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/MobileFrontend refs/changes/16/60816/1 diff --git a/javascripts/specials/mobilediff.js b/javascripts/specials/mobilediff.js index 1c70966..2e21156 100644 --- a/javascripts/specials/mobilediff.js +++ b/javascripts/specials/mobilediff.js @@ -1,51 +1,39 @@ ( function( $, M ) { function makePrettyDiff( $diff ) { - var $diffclone = $diff.clone(); + var $diffclone = $diff.clone(), before = '', after = '', + diff; - // simple case where just an insert or just a delete - if ( $diff.children( 'ins' ).length === 0 || $diff.children( 'del' ).length === 0 ) { - $diff.empty().addClass( 'prettyDiff' ); - $diffclone.find( 'del,ins' ).each( function() { - var $el = $( this ).clone(); - if ( $el.text() ) { // don't add empty elements - $el.appendTo( $diff ); - $( 'br' ).appendTo( $diff ); - } - } ); - return $diff; - } else if ( $diff.children().length 1 ) { // if there is only one line it is not a complicated diff - $diff.empty().addClass( 'prettyDiff' ); - $diffclone.find( 'ins' ).each( function() { - var $del = $( this ).prev( 'del' ), $add = $( this ), - diffChars; + $diffclone.find( 'del,ins' ).each( function() { + if ( this.tagName === 'DEL' ) { + before += $( this ).text() + 'br'; + } else { + after += $( this ).text() + 'br'; + } + } ); + $diff.empty().addClass( 'prettyDiff' ); - if ( $del.length 0 ) { - while ( $add.next()[ 0 ] $add.next()[ 0 ].tagName === 'INS' ) { - $add.clone().appendTo( $diff ); + diff = JsDiff.diffWords( before, after ); + diff.forEach( function( change ) { + var tag, vals; + if ( change.added ) { + tag = 'ins'; + } else if ( change.removed ) { + tag = 'del'; + } else { + tag = 'span'; + } + vals = change.value.split( 'br' ); + vals.forEach( function( val ) { + if ( val ) { + $( tag ).text( val ).appendTo( $diff ); + if ( vals.length 1 ) { $( 'br' ).appendTo( $diff ); - $add = $add.next(); } - - diffChars = JsDiff.diffWords( $del.text(), $add.text() ); - diffChars.forEach( function( change ) { - var tag; - if ( change.added ) { - tag = 'ins'; - } else if ( change.removed ) { - tag = 'del'; - } else { - tag = 'span'; - } - $( tag ).text( change.value ).appendTo( $diff ); - } ); - } else if ( $add.prev()[ 0 ].tagName !== 'INS' ){ - $add.clone().css( 'display', 'inline' ).appendTo( $diff ); } - - $( 'br' ).appendTo( $diff ); } ); - } + } ); + return $diff; } diff --git
[MediaWiki-commits] [Gerrit] Story 464: Promote pretty diffs to beta - change (mediawiki...MobileFrontend)
Jdlrobson has uploaded a new change for review. https://gerrit.wikimedia.org/r/60817 Change subject: Story 464: Promote pretty diffs to beta .. Story 464: Promote pretty diffs to beta Change-Id: I0605de83619c199ee5100420ecdbab3f9ef9e42c --- M javascripts/specials/mobilediff.js M less/specials/mobilediff.less M stylesheets/specials/mobilediff.css 3 files changed, 12 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/MobileFrontend refs/changes/17/60817/1 diff --git a/javascripts/specials/mobilediff.js b/javascripts/specials/mobilediff.js index 2e21156..0af2768 100644 --- a/javascripts/specials/mobilediff.js +++ b/javascripts/specials/mobilediff.js @@ -38,7 +38,7 @@ } $( function() { - if ( mw.config.get( 'wgMFMode' ) === 'alpha' ) { + if ( mw.config.get( 'wgMFMode' ) !== 'stable' ) { makePrettyDiff( $( '#mw-mf-minidiff' ) ); } } ); diff --git a/less/specials/mobilediff.less b/less/specials/mobilediff.less index 369519b..3d66736 100644 --- a/less/specials/mobilediff.less +++ b/less/specials/mobilediff.less @@ -134,6 +134,7 @@ } } +.beta, .alpha { #mw-mf-diffview { ins, diff --git a/stylesheets/specials/mobilediff.css b/stylesheets/specials/mobilediff.css index d1f3d7b..ddb76fd 100644 --- a/stylesheets/specials/mobilediff.css +++ b/stylesheets/specials/mobilediff.css @@ -117,27 +117,37 @@ font-size: 1.85em; color: #888; } +.beta #mw-mf-diffview ins, .alpha #mw-mf-diffview ins, +.beta #mw-mf-diffview del, .alpha #mw-mf-diffview del { padding-left: 0; color: black; } +.beta #mw-mf-diffview ins::before, .alpha #mw-mf-diffview ins::before, +.beta #mw-mf-diffview del::before, .alpha #mw-mf-diffview del::before { content: ; } +.beta #mw-mf-diffview span, .alpha #mw-mf-diffview span { margin-right: 2px; } +.beta #mw-mf-diffview ins, .alpha #mw-mf-diffview ins { background-color: #75C877; } +.beta #mw-mf-diffview del, .alpha #mw-mf-diffview del { background-color: #E07076; text-decoration: none; } +.beta #mw-mf-diffview .prettyDiff ins, .alpha #mw-mf-diffview .prettyDiff ins, +.beta #mw-mf-diffview .prettyDiff del, .alpha #mw-mf-diffview .prettyDiff del, +.beta #mw-mf-diffview .prettyDiff span, .alpha #mw-mf-diffview .prettyDiff span { display: inline; } -- To view, visit https://gerrit.wikimedia.org/r/60817 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I0605de83619c199ee5100420ecdbab3f9ef9e42c Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/MobileFrontend Gerrit-Branch: master Gerrit-Owner: Jdlrobson jrob...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] beta: increase diff readability via line height - change (mediawiki...MobileFrontend)
Jdlrobson has uploaded a new change for review. https://gerrit.wikimedia.org/r/60818 Change subject: beta: increase diff readability via line height .. beta: increase diff readability via line height on large chunks of text this helps point out where the changes are Change-Id: Ic8677bfb2ad7c72b7b21deedce0a6929368a43b5 --- M less/specials/mobilediff.less M stylesheets/specials/mobilediff.css 2 files changed, 2 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/MobileFrontend refs/changes/18/60818/1 diff --git a/less/specials/mobilediff.less b/less/specials/mobilediff.less index 3d66736..ed7764b 100644 --- a/less/specials/mobilediff.less +++ b/less/specials/mobilediff.less @@ -139,6 +139,7 @@ #mw-mf-diffview { ins, del { + line-height: 2; padding-left: 0; color: black; ::before { diff --git a/stylesheets/specials/mobilediff.css b/stylesheets/specials/mobilediff.css index ddb76fd..47bf68a 100644 --- a/stylesheets/specials/mobilediff.css +++ b/stylesheets/specials/mobilediff.css @@ -121,6 +121,7 @@ .alpha #mw-mf-diffview ins, .beta #mw-mf-diffview del, .alpha #mw-mf-diffview del { + line-height: 2; padding-left: 0; color: black; } -- To view, visit https://gerrit.wikimedia.org/r/60818 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ic8677bfb2ad7c72b7b21deedce0a6929368a43b5 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/MobileFrontend Gerrit-Branch: master Gerrit-Owner: Jdlrobson jrob...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Remove temporary hack to ensure X-Analytics header on responses - change (operations/puppet)
Mark Bergsma has submitted this change and it was merged. Change subject: Remove temporary hack to ensure X-Analytics header on responses .. Remove temporary hack to ensure X-Analytics header on responses All objects in the cache which have X-CS but not X-Analytics have been banned. Change-Id: If1c01e9c2c3651bf706f608601dee57a4accddbc --- M templates/varnish/mobile-frontend.inc.vcl.erb 1 file changed, 0 insertions(+), 9 deletions(-) Approvals: Mark Bergsma: Looks good to me, approved jenkins-bot: Verified diff --git a/templates/varnish/mobile-frontend.inc.vcl.erb b/templates/varnish/mobile-frontend.inc.vcl.erb index 6c16ffb..514ba81 100644 --- a/templates/varnish/mobile-frontend.inc.vcl.erb +++ b/templates/varnish/mobile-frontend.inc.vcl.erb @@ -658,14 +658,5 @@ if (req.url == /favicon.ico || req.url ~ ^/apple-touch-icon(-precomposed)?\.png$ || req.url ~ ^/w/index\.php\?title=.*:Gadget-.*[0-9]+$) { set resp.http.Cache-Control = s-maxage=3600, max-age=3600; } - - // FIXME: This makes sure the X-Analytics header - // is properly set even if the request is already cached. - // This can be removed once we are sure that all requests - // that should have this header set but are cached without - // it set have been invalidated. - if ( ! resp.http.X-Analytics req.http.X-Analytics ) { - set resp.http.X-Analytics = req.http.X-Analytics; - } } -- To view, visit https://gerrit.wikimedia.org/r/60814 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: If1c01e9c2c3651bf706f608601dee57a4accddbc Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Mark Bergsma m...@wikimedia.org Gerrit-Reviewer: Mark Bergsma m...@wikimedia.org Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Story 477: Only show nearby in menu when supported - change (mediawiki...MobileFrontend)
Jdlrobson has uploaded a new change for review. https://gerrit.wikimedia.org/r/60819 Change subject: Story 477: Only show nearby in menu when supported .. Story 477: Only show nearby in menu when supported User must have geolocation support and javascript enabled FIXME: Due to javascript running at the bottom there is a flash of JS (See following commit) Change-Id: I2553c303a6ef0161ac3b577c73abc5078f1cf4f9 --- M javascripts/common/mf-application.js M javascripts/specials/nearby.js M less/common/mainmenu.less M stylesheets/common/ui.css 4 files changed, 31 insertions(+), 6 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/MobileFrontend refs/changes/19/60819/1 diff --git a/javascripts/common/mf-application.js b/javascripts/common/mf-application.js index 3275f56..6a39598 100644 --- a/javascripts/common/mf-application.js +++ b/javascripts/common/mf-application.js @@ -98,6 +98,10 @@ } ); } + function supportsGeoLocation() { + return !!navigator.geolocation; + } + // TODO: separate main menu navigation code into separate module function init() { // FIXME: use wgIsMainPage @@ -111,6 +115,9 @@ $doc.removeClass( 'page-loading' ); // FIXME: Kill with fire. This is here for historic reasons in case old HTML is cached if( supportsPositionFixed() ) { $doc.addClass( 'supportsPositionFixed' ); + } + if ( supportsGeoLocation() ) { + $doc.addClass( 'supports-geo-location' ); } // when rotating to landscape stop page zooming on ios @@ -215,6 +222,7 @@ message: message, on: on, prefix: 'mw-mf-', + supportsGeoLocation: supportsGeoLocation, supportsPositionFixed: supportsPositionFixed, triggerPageReadyHook: triggerPageReadyHook, prettyEncodeTitle: prettyEncodeTitle, diff --git a/javascripts/specials/nearby.js b/javascripts/specials/nearby.js index de8af5a..9f155a5 100644 --- a/javascripts/specials/nearby.js +++ b/javascripts/specials/nearby.js @@ -1,7 +1,7 @@ ( function( M, $ ) { ( function() { - var supported = !!navigator.geolocation, + var supported = M.supportsGeoLocation(), popup = M.require( 'notifications' ), View = M.require( 'view' ), cachedPages, diff --git a/less/common/mainmenu.less b/less/common/mainmenu.less index 4c2d5f2..d76816d 100644 --- a/less/common/mainmenu.less +++ b/less/common/mainmenu.less @@ -66,8 +66,8 @@ /* @embed */background-image: url(images/menu/uploads.png); } - .icon-nearby a { - /* @embed */background-image: url(images/menu/nearby.png); + .icon-nearby { + display: none; } .icon-settings a { @@ -80,6 +80,17 @@ } } +.supports-geo-location { + #mw-mf-menu-main { + li.icon-nearby { + display: block; + a { + /* @embed */background-image: url(images/menu/nearby.png); + } + } + } +} + @media all and (min-width: 700px) { body.navigation-enabled.alpha, body.navigation-enabled.beta { diff --git a/stylesheets/common/ui.css b/stylesheets/common/ui.css index a268ebf..dd1074d 100644 --- a/stylesheets/common/ui.css +++ b/stylesheets/common/ui.css @@ -189,9 +189,8 @@ /* @embed */ background-image: url(images/menu/uploads.png); } -#mw-mf-menu-main li.icon-nearby a { - /* @embed */ - background-image: url(images/menu/nearby.png); +#mw-mf-menu-main li.icon-nearby { + display: none; } #mw-mf-menu-main li.icon-settings a { /* @embed */ @@ -201,6 +200,13 @@ /* @embed */ background-image: url(images/menu/loginout.png); } +.supportsGeoLocation #mw-mf-menu-main li.icon-nearby { + display: block; +} +.supportsGeoLocation #mw-mf-menu-main li.icon-nearby a { + /* @embed */ + background-image: url(images/menu/nearby.png); +} @media all and (min-width: 700px) { body.navigation-enabled.alpha #mw-mf-page-left, body.navigation-enabled.beta #mw-mf-page-left { -- To view, visit https://gerrit.wikimedia.org/r/60819 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I2553c303a6ef0161ac3b577c73abc5078f1cf4f9 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/MobileFrontend Gerrit-Branch: master Gerrit-Owner: Jdlrobson jrob...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Move feature detection to top of page - change (mediawiki...MobileFrontend)
Jdlrobson has uploaded a new change for review. https://gerrit.wikimedia.org/r/60820 Change subject: Move feature detection to top of page .. Move feature detection to top of page This prevents flashes of unstyled content. Update application functions to read the classes on the html tag so as not to interfere with existing modules Change-Id: Ic5dfdf2d6aacfbcdffd49ccb006cbd5b7b6f4bb2 --- M MobileFrontend.php A javascripts/common/feature-detect.js M javascripts/common/mf-application.js M stylesheets/common/ui.css 4 files changed, 51 insertions(+), 30 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/MobileFrontend refs/changes/20/60820/1 diff --git a/MobileFrontend.php b/MobileFrontend.php index aeaaada..facbc74 100644 --- a/MobileFrontend.php +++ b/MobileFrontend.php @@ -213,6 +213,13 @@ ), ); +$wgResourceModules['mobile.head'] = $wgMFMobileResourceBoilerplate + array( + 'position' = 'top', + 'scripts' = array( + 'javascripts/common/feature-detect.js', + ), +); + $wgResourceModules['mobile.styles.page'] = $wgMFMobileResourceBoilerplate + array( 'dependencies' = array( 'mobile.startup' ), 'styles' = array( @@ -235,7 +242,8 @@ ); $wgResourceModules['mobile.startup'] = $wgMFMobileResourceBoilerplate + array( - 'styles' = array( + 'dependencies' = array( + 'mobile.head', ), 'scripts' = array( 'javascripts/common/polyfills.js', diff --git a/javascripts/common/feature-detect.js b/javascripts/common/feature-detect.js new file mode 100644 index 000..086a7a1 --- /dev/null +++ b/javascripts/common/feature-detect.js @@ -0,0 +1,36 @@ +( function( $ ) { + var $doc = $( 'html' ); + + // TODO: only apply to places that need it + // http://www.quirksmode.org/blog/archives/2010/12/the_fifth_posit.html + // https://github.com/Modernizr/Modernizr/issues/167 + function supportsPositionFixed() { + // TODO: don't use device detection + var agent = navigator.userAgent, + support = false, + supportedAgents = [ + // match anything over Webkit 534 + /AppleWebKit\/(53[4-9]|5[4-9]\d?|[6-9])\d?\d?/, + // Android 3+ + /Android [3-9]/ + ]; + supportedAgents.forEach( function( item ) { + if( agent.match( item ) ) { + support = true; + } + } ); + return support; + } + + function supportsGeoLocation() { + return !!navigator.geolocation; + } + + if( supportsPositionFixed() ) { + $doc.addClass( 'supports-position-fixed' ); + } + if ( supportsGeoLocation() ) { + $doc.addClass( 'supports-geo-location' ); + } + +}( jQuery ) ); diff --git a/javascripts/common/mf-application.js b/javascripts/common/mf-application.js index 6a39598..7be72a0 100644 --- a/javascripts/common/mf-application.js +++ b/javascripts/common/mf-application.js @@ -6,6 +6,7 @@ // just inherit from EventEmitter instead eventEmitter = new EventEmitter(), template, + $doc = $( 'html' ), templates = {}, scrollY; @@ -65,25 +66,8 @@ return mw.msg( name, arg1 ); } - // TODO: only apply to places that need it - // http://www.quirksmode.org/blog/archives/2010/12/the_fifth_posit.html - // https://github.com/Modernizr/Modernizr/issues/167 function supportsPositionFixed() { - // TODO: don't use device detection - var agent = navigator.userAgent, - support = false, - supportedAgents = [ - // match anything over Webkit 534 - /AppleWebKit\/(53[4-9]|5[4-9]\d?|[6-9])\d?\d?/, - // Android 3+ - /Android [3-9]/ - ]; - supportedAgents.forEach( function( item ) { - if( agent.match( item ) ) { - support = true; - } - } ); - return support; + return $doc.hasClass( 'supports-position-fixed' ); } // Try to scroll and hide URL bar @@ -99,26 +83,19 @@ } function supportsGeoLocation() { - return !!navigator.geolocation; + return $doc.hasClass( 'supports-geo-location' ); } // TODO: separate main menu navigation code into separate module function init() { // FIXME: use wgIsMainPage - var mainPage =
[MediaWiki-commits] [Gerrit] Add refresh-translatable-pages.php script - change (mediawiki...Translate)
Nikerabbit has uploaded a new change for review. https://gerrit.wikimedia.org/r/60821 Change subject: Add refresh-translatable-pages.php script .. Add refresh-translatable-pages.php script Change-Id: Iac3f1aabea90fad0a30eb6805e14d0a21ab12926 --- A scripts/refresh-translatable-pages.php 1 file changed, 51 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Translate refs/changes/21/60821/1 diff --git a/scripts/refresh-translatable-pages.php b/scripts/refresh-translatable-pages.php new file mode 100644 index 000..97332ea --- /dev/null +++ b/scripts/refresh-translatable-pages.php @@ -0,0 +1,51 @@ +?php +/** + * Script to ensure all translation pages are up to date. + * + * @author Niklas Laxström + * @license GPL2+ + * @file + */ + +// Standard boilerplate to define $IP +if ( getenv( 'MW_INSTALL_PATH' ) !== false ) { + $IP = getenv( 'MW_INSTALL_PATH' ); +} else { + $dir = dirname( __FILE__ ); + $IP = $dir/../../..; +} +require_once( $IP/maintenance/Maintenance.php ); + +/** + * Script to ensure all translation pages are up to date + * @since 2013-04 + */ +class RefreshTranslatablePages extends Maintenance { + public function __construct() { + parent::__construct(); + $this-mDescription = 'Ensure all translation pages are up to date'; + } + + public function execute() { + $groups = MessageGroups::singleton()-getGroups(); + + /** @var MessageGroup $group */ + foreach ( $groups as $id = $group ) { + if ( !$group instanceof WikiPageMessageGroup ) { + continue; + } + + // Get all translation subpages and refresh each one of them + $page = TranslatablePage::newFromTitle( $group-getTitle() ); + $translationPages = $page-getTranslationPages(); + + foreach ( $translationPages as $subpage ) { + $job = TranslateRenderJob::newJob( $subpage ); + $job-run(); + } + } + } +} + +$maintClass = 'RefreshTranslatablePages'; +require_once( RUN_MAINTENANCE_IF_MAIN ); -- To view, visit https://gerrit.wikimedia.org/r/60821 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Iac3f1aabea90fad0a30eb6805e14d0a21ab12926 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Translate Gerrit-Branch: master Gerrit-Owner: Nikerabbit niklas.laxst...@gmail.com ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Small comment fixes - change (mediawiki...Translate)
Nikerabbit has uploaded a new change for review. https://gerrit.wikimedia.org/r/60822 Change subject: Small comment fixes .. Small comment fixes * translatetoolkit has been replaced with TTMServer long ago * headers per RFC to localisation team * removed no-op cache purging Change-Id: Ifcf17393d04cb995fb6105cb835deea0386c3245 --- M messagegroups/WikiPageMessageGroup.php M scripts/ttmserver-export.php M tag/TranslatablePage.php M tag/TranslateRenderJob.php 4 files changed, 8 insertions(+), 20 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Translate refs/changes/22/60822/1 diff --git a/messagegroups/WikiPageMessageGroup.php b/messagegroups/WikiPageMessageGroup.php index ad52eee..528e245 100644 --- a/messagegroups/WikiPageMessageGroup.php +++ b/messagegroups/WikiPageMessageGroup.php @@ -5,8 +5,7 @@ * @file * @author Niklas Laxström * @author Siebrand Mazeland - * @copyright Copyright © 2008-2013, Niklas Laxström, Siebrand Mazeland - * @license http://www.gnu.org/copyleft/gpl.html GNU General Public License 2.0 or later + * @license GPL2+ */ /** @@ -14,6 +13,7 @@ * @ingroup PageTranslation MessageGroup */ class WikiPageMessageGroup extends WikiMessageGroup { + /// @var string|Title protected $title; public function __construct( $id, $source ) { diff --git a/scripts/ttmserver-export.php b/scripts/ttmserver-export.php index 7a50811..d64f808 100644 --- a/scripts/ttmserver-export.php +++ b/scripts/ttmserver-export.php @@ -3,9 +3,7 @@ * Script to bootstrap TTMServer translation memory * * @author Niklas Laxström - * - * @copyright Copyright © 2010-2013, Niklas Laxström - * @license http://www.gnu.org/copyleft/gpl.html GNU General Public License 2.0 or later + * @license GPL2+ * @file */ @@ -19,7 +17,7 @@ require_once( $IP/maintenance/Maintenance.php ); /** - * Script to bootstrap translatetoolkit translation memory. + * Script to bootstrap TTMServer translation memory. * @since 2012-01-26 */ class TTMServerBootstrap extends Maintenance { diff --git a/tag/TranslatablePage.php b/tag/TranslatablePage.php index 1bbbac0..96ecd28 100644 --- a/tag/TranslatablePage.php +++ b/tag/TranslatablePage.php @@ -4,8 +4,7 @@ * * @file * @author Niklas Laxström - * @copyright Copyright © 2009-2013 Niklas Laxström - * @license http://www.gnu.org/copyleft/gpl.html GNU General Public License 2.0 or later + * @license GPL2+ */ /** @@ -135,7 +134,7 @@ break; case 'title': $this-revision = $this-getMarkedTag(); - // @todo FIXME: Needs break;? + // There is no break statement here on purpose case 'revision': $rev = Revision::newFromTitle( $this-getTitle(), $this-revision ); $this-text = $rev-getText(); @@ -588,10 +587,10 @@ } /** +* Fetch the available translation pages from database * @return Title[] */ public function getTranslationPages() { - // Fetch the available translation pages from database // Avoid replication lag issues $dbr = wfGetDB( DB_MASTER ); $prefix = $this-getTitle()-getDBkey() . '/'; @@ -612,9 +611,7 @@ // Make sure we only get translation subpages while ignoring others $codes = Language::getLanguageNames( false ); $prefix = $this-getTitle()-getText(); - /** -* @var Title $title -*/ + /** @var Title $title */ foreach ( $titles as $title ) { list( $name, $code ) = TranslateUtils::figureMessage( $title-getText() ); if ( !isset( $codes[$code] ) || $name !== $prefix ) { diff --git a/tag/TranslateRenderJob.php b/tag/TranslateRenderJob.php index 5ad3cbf..134b4e4 100644 --- a/tag/TranslateRenderJob.php +++ b/tag/TranslateRenderJob.php @@ -4,7 +4,6 @@ * * @file * @author Niklas Laxström - * @copyright Copyright © 2008-2010, Niklas Laxström * @license http://www.gnu.org/copyleft/gpl.html GNU General Public License 2.0 or later */ @@ -61,14 +60,8 @@ // @todo FuzzyBot hack PageTranslationHooks::$allowTargetEdit = true; - - // Do the edit $article-doEdit( $text, $summary, $flags, false, $user ); - PageTranslationHooks::$allowTargetEdit = false; - - // purge cache - $page-getTranslationPercentages( true ); return true; } -- To view, visit https://gerrit.wikimedia.org/r/60822 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
[MediaWiki-commits] [Gerrit] Move Apple Touch icons to docroots - change (operations/mediawiki-config)
Krinkle has submitted this change and it was merged. Change subject: Move Apple Touch icons to docroots .. Move Apple Touch icons to docroots This patch reverts patch Ib5554c54729 for most icons; since older versions of iOS will hit docroot/apple-touch-icon.png by default whatever our settings are, and since newer versions look in docroot when no icon is specified in the HTML link / tag anyway, let's just simplify things. I'm putting all existing icons in their respective docroots, and not defining any icons for wikis that don't have them yet. The enwiktionary icon — being different from the default icon for wiktionary.org wikis — will be loaded from bits.wm.org. Should such a need arise, other icons could be loaded that way, too. The usabilitywiki and mediawikiwiki icons are moved to their proper names (having been loaded via link / until now). Bug: 27911 Change-Id: I2f0990fa087a7b2969c982d05187331e7005b64a --- D docroot/bits/apple-touch/commons.png D docroot/bits/apple-touch/wikipedia.png D docroot/bits/apple-touch/wiktionary.png R docroot/mediawiki/apple-touch-icon.png R docroot/usability/apple-touch-icon.png R docroot/wikinews.org/apple-touch-icon.png M wmf-config/InitialiseSettings.php 7 files changed, 1 insertion(+), 10 deletions(-) Approvals: Krinkle: Verified; Looks good to me, approved diff --git a/docroot/bits/apple-touch/commons.png b/docroot/bits/apple-touch/commons.png deleted file mode 100644 index 6fb4b33..000 --- a/docroot/bits/apple-touch/commons.png +++ /dev/null Binary files differ diff --git a/docroot/bits/apple-touch/wikipedia.png b/docroot/bits/apple-touch/wikipedia.png deleted file mode 100644 index 0179b69..000 --- a/docroot/bits/apple-touch/wikipedia.png +++ /dev/null Binary files differ diff --git a/docroot/bits/apple-touch/wiktionary.png b/docroot/bits/apple-touch/wiktionary.png deleted file mode 100644 index b084611..000 --- a/docroot/bits/apple-touch/wiktionary.png +++ /dev/null Binary files differ diff --git a/docroot/bits/apple-touch/mediawiki.png b/docroot/mediawiki/apple-touch-icon.png similarity index 100% rename from docroot/bits/apple-touch/mediawiki.png rename to docroot/mediawiki/apple-touch-icon.png Binary files differ diff --git a/docroot/bits/apple-touch/usability.png b/docroot/usability/apple-touch-icon.png similarity index 100% rename from docroot/bits/apple-touch/usability.png rename to docroot/usability/apple-touch-icon.png Binary files differ diff --git a/docroot/bits/apple-touch/wikinews.png b/docroot/wikinews.org/apple-touch-icon.png similarity index 100% rename from docroot/bits/apple-touch/wikinews.png rename to docroot/wikinews.org/apple-touch-icon.png Binary files differ diff --git a/wmf-config/InitialiseSettings.php b/wmf-config/InitialiseSettings.php index 558a0de..891062e 100644 --- a/wmf-config/InitialiseSettings.php +++ b/wmf-config/InitialiseSettings.php @@ -9527,17 +9527,8 @@ ), 'wgAppleTouchIcon' = array( - #Sites - 'default' = false, // default iPhone/iPod Touch bookmark icon - 'wiki' = '//bits.wikimedia.org/apple-touch/wikipedia.png', - 'wikinews' = '//bits.wikimedia.org/apple-touch/wikinews.png', - 'wiktionary'= '//bits.wikimedia.org/apple-touch/wiktionary.png', - - #Other wikis - 'commonswiki' = '//bits.wikimedia.org/apple-touch/commons.png', + 'default' = false, // iOS searches for icons in docroot by default 'enwiktionary' = '//bits.wikimedia.org/apple-touch/wiktionary/en.png', // Bug 46431 - 'mediawikiwiki' = '//bits.wikimedia.org/apple-touch/mediawiki.png', - 'usabilitywiki' = '//bits.wikimedia.org/apple-touch/usability.png', ), 'wgUserEmailUseReplyTo' = array( -- To view, visit https://gerrit.wikimedia.org/r/60777 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I2f0990fa087a7b2969c982d05187331e7005b64a Gerrit-PatchSet: 3 Gerrit-Project: operations/mediawiki-config Gerrit-Branch: master Gerrit-Owner: Odder tom...@twkozlowski.net Gerrit-Reviewer: Krinkle krinklem...@gmail.com Gerrit-Reviewer: Reedy re...@wikimedia.org Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Sync new ganglia clusters - change (operations/puppet)
Mark Bergsma has uploaded a new change for review. https://gerrit.wikimedia.org/r/60823 Change subject: Sync new ganglia clusters .. Sync new ganglia clusters Change-Id: I71c9ffb1e51b84c76448024e8538a32356d99d99 --- M modules/ganglia_new/manifests/configuration.pp 1 file changed, 6 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/23/60823/1 diff --git a/modules/ganglia_new/manifests/configuration.pp b/modules/ganglia_new/manifests/configuration.pp index 77b353a..7879153 100644 --- a/modules/ganglia_new/manifests/configuration.pp +++ b/modules/ganglia_new/manifests/configuration.pp @@ -95,6 +95,12 @@ parsoidcache = { name = Parsoid Varnish, id= 38 }, + redis = { + name = Redis, + id= 39 }, + labsnfs = { + name = Labs NFS cluster, + id= 40 }, } # NOTE: Do *not* add new clusters *per site* anymore, # the site name will automatically be appended now, -- To view, visit https://gerrit.wikimedia.org/r/60823 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I71c9ffb1e51b84c76448024e8538a32356d99d99 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Mark Bergsma m...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Sync new ganglia clusters - change (operations/puppet)
Mark Bergsma has submitted this change and it was merged. Change subject: Sync new ganglia clusters .. Sync new ganglia clusters Change-Id: I71c9ffb1e51b84c76448024e8538a32356d99d99 --- M modules/ganglia_new/manifests/configuration.pp 1 file changed, 6 insertions(+), 0 deletions(-) Approvals: Mark Bergsma: Verified; Looks good to me, approved diff --git a/modules/ganglia_new/manifests/configuration.pp b/modules/ganglia_new/manifests/configuration.pp index 77b353a..7879153 100644 --- a/modules/ganglia_new/manifests/configuration.pp +++ b/modules/ganglia_new/manifests/configuration.pp @@ -95,6 +95,12 @@ parsoidcache = { name = Parsoid Varnish, id= 38 }, + redis = { + name = Redis, + id= 39 }, + labsnfs = { + name = Labs NFS cluster, + id= 40 }, } # NOTE: Do *not* add new clusters *per site* anymore, # the site name will automatically be appended now, -- To view, visit https://gerrit.wikimedia.org/r/60823 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I71c9ffb1e51b84c76448024e8538a32356d99d99 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Mark Bergsma m...@wikimedia.org Gerrit-Reviewer: Mark Bergsma m...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Updated parallel_tests gem - change (qa/browsertests)
Cmcmahon has submitted this change and it was merged. Change subject: Updated parallel_tests gem .. Updated parallel_tests gem Change-Id: If7083744ab9856d15be239f2d8249723fe59468a --- M Gemfile.lock 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Cmcmahon: Verified; Looks good to me, approved jenkins-bot: Verified diff --git a/Gemfile.lock b/Gemfile.lock index 0164f9e..be9e577 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -32,7 +32,7 @@ page_navigation (0.7) data_magic (= 0.14) parallel (0.6.4) -parallel_tests (0.11.0) +parallel_tests (0.11.1) parallel rake (10.0.4) rspec-expectations (2.13.0) -- To view, visit https://gerrit.wikimedia.org/r/60799 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: If7083744ab9856d15be239f2d8249723fe59468a Gerrit-PatchSet: 1 Gerrit-Project: qa/browsertests Gerrit-Branch: master Gerrit-Owner: Zfilipin zfili...@wikimedia.org Gerrit-Reviewer: Cmcmahon cmcma...@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] Updated parallel_tests gem - change (mediawiki...MobileFrontend)
Cmcmahon has submitted this change and it was merged. Change subject: Updated parallel_tests gem .. Updated parallel_tests gem Change-Id: I309041744d31fc8042f378adf6f85b3e71643eed --- M tests/acceptance/Gemfile.lock 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Cmcmahon: Verified; Looks good to me, approved jenkins-bot: Checked diff --git a/tests/acceptance/Gemfile.lock b/tests/acceptance/Gemfile.lock index 4cd73ec..731f4a3 100644 --- a/tests/acceptance/Gemfile.lock +++ b/tests/acceptance/Gemfile.lock @@ -29,7 +29,7 @@ page_navigation (0.7) data_magic (= 0.14) parallel (0.6.4) -parallel_tests (0.11.0) +parallel_tests (0.11.1) parallel rake (10.0.4) rspec-expectations (2.13.0) -- To view, visit https://gerrit.wikimedia.org/r/60800 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I309041744d31fc8042f378adf6f85b3e71643eed Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/MobileFrontend Gerrit-Branch: master Gerrit-Owner: Zfilipin zfili...@wikimedia.org Gerrit-Reviewer: Cmcmahon cmcma...@wikimedia.org Gerrit-Reviewer: Mgrover mgro...@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] Spaces to tabs - change (operations/puppet)
Mark Bergsma has uploaded a new change for review. https://gerrit.wikimedia.org/r/60824 Change subject: Spaces to tabs .. Spaces to tabs Change-Id: Idf31a8692314b5d08276dc89b9c4c24c13c8ede2 --- M manifests/site.pp 1 file changed, 48 insertions(+), 48 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/24/60824/1 diff --git a/manifests/site.pp b/manifests/site.pp index 7732aa6..c75d397 100644 --- a/manifests/site.pp +++ b/manifests/site.pp @@ -648,60 +648,60 @@ ## SANITARIUM node /^db1053\.eqiad\.wmnet/ { - class { role::db::sanitarium: -instances = { - 's1' = { -'port' = 3306, -'innodb_log_file_size' = 2000M, -'ram' = 72G - }, -} - } + class { role::db::sanitarium: + instances = { + 's1' = { + 'port' = 3306, + 'innodb_log_file_size' = 2000M, + 'ram' = 72G + }, + } + } } node /^db1054\.eqiad\.wmnet/ { - class { role::db::sanitarium: -instances = { - 's2' = { -'port' = 3306, -'innodb_log_file_size' = 2000M, -'ram' = 24G - }, - 's4' = { -'port' = 3307, -'innodb_log_file_size' = 2000M, -'ram' = 24G - }, - 's5' = { -'port' = 3308, -'innodb_log_file_size' = 1000M, -'ram' = 24G - }, -} - } + class { role::db::sanitarium: + instances = { + 's2' = { + 'port' = 3306, + 'innodb_log_file_size' = 2000M, + 'ram' = 24G + }, + 's4' = { + 'port' = 3307, + 'innodb_log_file_size' = 2000M, + 'ram' = 24G + }, + 's5' = { + 'port' = 3308, + 'innodb_log_file_size' = 1000M, + 'ram' = 24G + }, + } + } } node /^db1057\.eqiad\.wmnet/ { - class { role::db::sanitarium: -instances = { - 's3' = { -'port' = 3306, -'innodb_log_file_size' = 500M, -'ram' = 24G, -'repl_ignore_dbs' = $::private_wikis, - }, - 's6' = { -'port' = 3307, -'innodb_log_file_size' = 500M, -'ram' = 24G - }, - 's7' = { -'port' = 3308, -'innodb_log_file_size' = 500M, -'ram' = 24G - }, -} - } + class { role::db::sanitarium: + instances = { + 's3' = { + 'port' = 3306, + 'innodb_log_file_size' = 500M, + 'ram' = 24G, + 'repl_ignore_dbs' = $::private_wikis, + }, + 's6' = { + 'port' = 3307, + 'innodb_log_file_size' = 500M, + 'ram' = 24G + }, + 's7' = { + 'port' = 3308, + 'innodb_log_file_size' = 500M, + 'ram' = 24G + }, + } + } } ## 2013-04-10: py using db101[345] for testing -- To view, visit https://gerrit.wikimedia.org/r/60824 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Idf31a8692314b5d08276dc89b9c4c24c13c8ede2 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Mark Bergsma m...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Spaces to tabs - change (operations/puppet)
Mark Bergsma has submitted this change and it was merged. Change subject: Spaces to tabs .. Spaces to tabs Change-Id: Idf31a8692314b5d08276dc89b9c4c24c13c8ede2 --- M manifests/site.pp 1 file changed, 48 insertions(+), 48 deletions(-) Approvals: Mark Bergsma: Verified; Looks good to me, approved diff --git a/manifests/site.pp b/manifests/site.pp index 7732aa6..c75d397 100644 --- a/manifests/site.pp +++ b/manifests/site.pp @@ -648,60 +648,60 @@ ## SANITARIUM node /^db1053\.eqiad\.wmnet/ { - class { role::db::sanitarium: -instances = { - 's1' = { -'port' = 3306, -'innodb_log_file_size' = 2000M, -'ram' = 72G - }, -} - } + class { role::db::sanitarium: + instances = { + 's1' = { + 'port' = 3306, + 'innodb_log_file_size' = 2000M, + 'ram' = 72G + }, + } + } } node /^db1054\.eqiad\.wmnet/ { - class { role::db::sanitarium: -instances = { - 's2' = { -'port' = 3306, -'innodb_log_file_size' = 2000M, -'ram' = 24G - }, - 's4' = { -'port' = 3307, -'innodb_log_file_size' = 2000M, -'ram' = 24G - }, - 's5' = { -'port' = 3308, -'innodb_log_file_size' = 1000M, -'ram' = 24G - }, -} - } + class { role::db::sanitarium: + instances = { + 's2' = { + 'port' = 3306, + 'innodb_log_file_size' = 2000M, + 'ram' = 24G + }, + 's4' = { + 'port' = 3307, + 'innodb_log_file_size' = 2000M, + 'ram' = 24G + }, + 's5' = { + 'port' = 3308, + 'innodb_log_file_size' = 1000M, + 'ram' = 24G + }, + } + } } node /^db1057\.eqiad\.wmnet/ { - class { role::db::sanitarium: -instances = { - 's3' = { -'port' = 3306, -'innodb_log_file_size' = 500M, -'ram' = 24G, -'repl_ignore_dbs' = $::private_wikis, - }, - 's6' = { -'port' = 3307, -'innodb_log_file_size' = 500M, -'ram' = 24G - }, - 's7' = { -'port' = 3308, -'innodb_log_file_size' = 500M, -'ram' = 24G - }, -} - } + class { role::db::sanitarium: + instances = { + 's3' = { + 'port' = 3306, + 'innodb_log_file_size' = 500M, + 'ram' = 24G, + 'repl_ignore_dbs' = $::private_wikis, + }, + 's6' = { + 'port' = 3307, + 'innodb_log_file_size' = 500M, + 'ram' = 24G + }, + 's7' = { + 'port' = 3308, + 'innodb_log_file_size' = 500M, + 'ram' = 24G + }, + } + } } ## 2013-04-10: py using db101[345] for testing -- To view, visit https://gerrit.wikimedia.org/r/60824 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Idf31a8692314b5d08276dc89b9c4c24c13c8ede2 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Mark Bergsma m...@wikimedia.org Gerrit-Reviewer: Mark Bergsma m...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Update ULS from upstream - change (mediawiki...UniversalLanguageSelector)
Amire80 has uploaded a new change for review. https://gerrit.wikimedia.org/r/60825 Change subject: Update ULS from upstream .. Update ULS from upstream Change-Id: Ic1bcfb82ad433600ebb4896e303f3cf205d384e1 --- M lib/jquery.uls/src/jquery.uls.core.js M lib/jquery.uls/src/jquery.uls.languagefilter.js 2 files changed, 29 insertions(+), 3 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/UniversalLanguageSelector refs/changes/25/60825/1 diff --git a/lib/jquery.uls/src/jquery.uls.core.js b/lib/jquery.uls/src/jquery.uls.core.js index 6352239..7490682 100644 --- a/lib/jquery.uls/src/jquery.uls.core.js +++ b/lib/jquery.uls/src/jquery.uls.core.js @@ -114,9 +114,30 @@ ULS.prototype = { constructor: ULS, + /** +* A hook that runs after the ULS constructor. +* At this point it is not guaranteed that the ULS has its dimensions +* and that the languages lists are initialized. +* +* To use it, pass a function as the onReady parameter +* in the options when initializing ULS. +*/ ready: function () { if ( this.options.onReady ) { this.options.onReady.call( this ); + } + }, + + /** +* A hook that runs after the ULS panel becomes visible +* by using the show method. +* +* To use it, pass a function as the onVisible parameter +* in the options when initializing ULS. +*/ + visible: function () { + if ( this.options.onVisible ) { + this.options.onVisible.call( this ); } }, @@ -152,13 +173,15 @@ if ( !this.initialized ) { $( 'body' ).prepend( this.$menu ); this.i18n(); + // Initialize with a full search. // This happens on first time click of uls trigger. this.defaultSearch(); + this.initialized = true; } - // hide any other ULS visible + // hide any other visible ULS $( '.uls-menu' ).hide(); this.$menu.show(); @@ -167,6 +190,8 @@ if ( !this.isMobile() ) { this.$languageFilter.focus(); } + + this.visible(); }, i18n: function () { diff --git a/lib/jquery.uls/src/jquery.uls.languagefilter.js b/lib/jquery.uls/src/jquery.uls.languagefilter.js index 28140f8..c5e245e 100644 --- a/lib/jquery.uls/src/jquery.uls.languagefilter.js +++ b/lib/jquery.uls/src/jquery.uls.languagefilter.js @@ -159,14 +159,15 @@ }, search: function() { - var query = $.trim( this.$element.val() ), + var languagesInScript, + query = $.trim( this.$element.val() ), languages = $.uls.data.getLanguagesByScriptGroup( this.options.languages ), scriptGroup, langNum, langCode; this.resultCount = 0; for ( scriptGroup in languages ) { - var languagesInScript = languages[scriptGroup]; + languagesInScript = languages[scriptGroup]; languagesInScript.sort( $.uls.data.sortByAutonym ); -- To view, visit https://gerrit.wikimedia.org/r/60825 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ic1bcfb82ad433600ebb4896e303f3cf205d384e1 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/UniversalLanguageSelector Gerrit-Branch: master Gerrit-Owner: Amire80 amir.ahar...@mail.huji.ac.il ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Use manutius as first ganglia aggregator host on pmtpa bits ... - change (operations/puppet)
Mark Bergsma has uploaded a new change for review. https://gerrit.wikimedia.org/r/60826 Change subject: Use manutius as first ganglia aggregator host on pmtpa bits caches .. Use manutius as first ganglia aggregator host on pmtpa bits caches Change-Id: I6791a249e83450e6fc69a5dffc92452893c5932d --- M manifests/ganglia.pp 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/26/60826/1 diff --git a/manifests/ganglia.pp b/manifests/ganglia.pp index ae60a29..c20b36e 100644 --- a/manifests/ganglia.pp +++ b/manifests/ganglia.pp @@ -294,7 +294,7 @@ LVS loadbalancers pmtpa = lvs1.wikimedia.org lvs2.wikimedia.org, Miscellaneous = hooper.wikimedia.org tarin.pmtpa.wmnet, Text squids = sq59.wikimedia.org sq60.wikimedia.org, - Bits caches = sq67.wikimedia.org sq68.wikimedia.org, + Bits caches = manutius.wikimedia.org:8670 sq67.wikimedia.org sq68.wikimedia.org, Fundraiser payments = payments1.wikimedia.org payments2.wikimedia.org, Fundraising eqiad = pay-lvs1001.frack.eqiad.wmnet pay-lvs1002.frack.eqiad.wmnet, SSL cluster = ssl1.wikimedia.org ssl2.wikimedia.org, -- To view, visit https://gerrit.wikimedia.org/r/60826 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I6791a249e83450e6fc69a5dffc92452893c5932d Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Mark Bergsma m...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Use manutius as first ganglia aggregator host on pmtpa bits ... - change (operations/puppet)
Mark Bergsma has submitted this change and it was merged. Change subject: Use manutius as first ganglia aggregator host on pmtpa bits caches .. Use manutius as first ganglia aggregator host on pmtpa bits caches Change-Id: I6791a249e83450e6fc69a5dffc92452893c5932d --- M manifests/ganglia.pp 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Mark Bergsma: Verified; Looks good to me, approved diff --git a/manifests/ganglia.pp b/manifests/ganglia.pp index ae60a29..c20b36e 100644 --- a/manifests/ganglia.pp +++ b/manifests/ganglia.pp @@ -294,7 +294,7 @@ LVS loadbalancers pmtpa = lvs1.wikimedia.org lvs2.wikimedia.org, Miscellaneous = hooper.wikimedia.org tarin.pmtpa.wmnet, Text squids = sq59.wikimedia.org sq60.wikimedia.org, - Bits caches = sq67.wikimedia.org sq68.wikimedia.org, + Bits caches = manutius.wikimedia.org:8670 sq67.wikimedia.org sq68.wikimedia.org, Fundraiser payments = payments1.wikimedia.org payments2.wikimedia.org, Fundraising eqiad = pay-lvs1001.frack.eqiad.wmnet pay-lvs1002.frack.eqiad.wmnet, SSL cluster = ssl1.wikimedia.org ssl2.wikimedia.org, -- To view, visit https://gerrit.wikimedia.org/r/60826 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I6791a249e83450e6fc69a5dffc92452893c5932d Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Mark Bergsma m...@wikimedia.org Gerrit-Reviewer: Mark Bergsma m...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Update ULS from upstream - change (mediawiki...UniversalLanguageSelector)
jenkins-bot has submitted this change and it was merged. Change subject: Update ULS from upstream .. Update ULS from upstream Change-Id: Ic1bcfb82ad433600ebb4896e303f3cf205d384e1 --- M lib/jquery.uls/src/jquery.uls.core.js M lib/jquery.uls/src/jquery.uls.languagefilter.js 2 files changed, 29 insertions(+), 3 deletions(-) Approvals: Nikerabbit: Looks good to me, approved jenkins-bot: Verified diff --git a/lib/jquery.uls/src/jquery.uls.core.js b/lib/jquery.uls/src/jquery.uls.core.js index 6352239..7490682 100644 --- a/lib/jquery.uls/src/jquery.uls.core.js +++ b/lib/jquery.uls/src/jquery.uls.core.js @@ -114,9 +114,30 @@ ULS.prototype = { constructor: ULS, + /** +* A hook that runs after the ULS constructor. +* At this point it is not guaranteed that the ULS has its dimensions +* and that the languages lists are initialized. +* +* To use it, pass a function as the onReady parameter +* in the options when initializing ULS. +*/ ready: function () { if ( this.options.onReady ) { this.options.onReady.call( this ); + } + }, + + /** +* A hook that runs after the ULS panel becomes visible +* by using the show method. +* +* To use it, pass a function as the onVisible parameter +* in the options when initializing ULS. +*/ + visible: function () { + if ( this.options.onVisible ) { + this.options.onVisible.call( this ); } }, @@ -152,13 +173,15 @@ if ( !this.initialized ) { $( 'body' ).prepend( this.$menu ); this.i18n(); + // Initialize with a full search. // This happens on first time click of uls trigger. this.defaultSearch(); + this.initialized = true; } - // hide any other ULS visible + // hide any other visible ULS $( '.uls-menu' ).hide(); this.$menu.show(); @@ -167,6 +190,8 @@ if ( !this.isMobile() ) { this.$languageFilter.focus(); } + + this.visible(); }, i18n: function () { diff --git a/lib/jquery.uls/src/jquery.uls.languagefilter.js b/lib/jquery.uls/src/jquery.uls.languagefilter.js index 28140f8..c5e245e 100644 --- a/lib/jquery.uls/src/jquery.uls.languagefilter.js +++ b/lib/jquery.uls/src/jquery.uls.languagefilter.js @@ -159,14 +159,15 @@ }, search: function() { - var query = $.trim( this.$element.val() ), + var languagesInScript, + query = $.trim( this.$element.val() ), languages = $.uls.data.getLanguagesByScriptGroup( this.options.languages ), scriptGroup, langNum, langCode; this.resultCount = 0; for ( scriptGroup in languages ) { - var languagesInScript = languages[scriptGroup]; + languagesInScript = languages[scriptGroup]; languagesInScript.sort( $.uls.data.sortByAutonym ); -- To view, visit https://gerrit.wikimedia.org/r/60825 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ic1bcfb82ad433600ebb4896e303f3cf205d384e1 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/UniversalLanguageSelector Gerrit-Branch: master Gerrit-Owner: Amire80 amir.ahar...@mail.huji.ac.il Gerrit-Reviewer: Nikerabbit niklas.laxst...@gmail.com Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Add help text above the buttons - change (mediawiki...UniversalLanguageSelector)
jenkins-bot has submitted this change and it was merged. Change subject: Add help text above the buttons .. Add help text above the buttons Change-Id: I73dfb7e9386f965a49ae8734d136972286f82605 --- M i18n/en.json M i18n/qqq.json M resources/css/ext.uls.languagesettings.css M resources/js/ext.uls.displaysettings.js 4 files changed, 8 insertions(+), 3 deletions(-) Approvals: Nikerabbit: Looks good to me, approved jenkins-bot: Verified diff --git a/i18n/en.json b/i18n/en.json index cf43331..9e90a7a 100644 --- a/i18n/en.json +++ b/i18n/en.json @@ -16,6 +16,7 @@ ext-uls-language-settings-title: Language settings, ext-uls-language-settings-apply: Apply settings, ext-uls-language-settings-cancel: Cancel, +ext-uls-language-buttons-help: Change the language of menus. Content language will not be affected., ext-uls-display-settings-font-settings: Font settings, ext-uls-display-settings-ui-language: Display language, ext-uls-webfonts-settings-title: Download font when needed, diff --git a/i18n/qqq.json b/i18n/qqq.json index 0307f2b..1304c5d 100644 --- a/i18n/qqq.json +++ b/i18n/qqq.json @@ -18,6 +18,7 @@ ext-uls-language-settings-title: Title text for language settings screen.\n{{Identical|Language settings}}, ext-uls-language-settings-apply: Label for apply settings button in language settings screen, ext-uls-language-settings-cancel: Label for cancel button in language settings screen, +ext-uls-language-buttons-help: Help text that appears above the language selection buttons in the Display settings panel., ext-uls-display-settings-font-settings: Subsection title for font settings, ext-uls-display-settings-ui-language: Sub section title for selecting UI language.\n{{Identical|Display language}}, ext-uls-webfonts-settings-title: Short title for enabling webfonts, @@ -44,4 +45,4 @@ ext-uls-input-enable: Label for enable input tools button, ext-uls-input-disable-info: Info text for the disable input tools button, ext-uls-input-settings-noime: Text to be shown when no input methods are available for a selected language -} \ No newline at end of file +} diff --git a/resources/css/ext.uls.languagesettings.css b/resources/css/ext.uls.languagesettings.css index cb2e7f2..65cf430 100644 --- a/resources/css/ext.uls.languagesettings.css +++ b/resources/css/ext.uls.languagesettings.css @@ -138,6 +138,7 @@ margin-left: 15px; } +.uls-ui-languages p, .checkbox { color: #55; font-size: 10pt; diff --git a/resources/js/ext.uls.displaysettings.js b/resources/js/ext.uls.displaysettings.js index 08709ed..b98e352 100644 --- a/resources/js/ext.uls.displaysettings.js +++ b/resources/js/ext.uls.displaysettings.js @@ -42,7 +42,9 @@ // UI languages buttons row + 'div class=row' - + 'div class=uls-ui-languages eleven columns/div' + + 'div class=uls-ui-languages eleven columns' + + 'p data-i18n=ext-uls-language-buttons-help/p' + + '/div' + '/div' + '/div' // End display language section @@ -162,7 +164,7 @@ // This is needed when drawing the panel for the second time // after selecting a different language - $languages.empty(); + $languages.find( 'button' ).remove(); // UI language must always be present if ( this.uiLanguage !== this.contentLanguage ) { -- To view, visit https://gerrit.wikimedia.org/r/60402 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I73dfb7e9386f965a49ae8734d136972286f82605 Gerrit-PatchSet: 5 Gerrit-Project: mediawiki/extensions/UniversalLanguageSelector Gerrit-Branch: master Gerrit-Owner: Amire80 amir.ahar...@mail.huji.ac.il Gerrit-Reviewer: Amire80 amir.ahar...@mail.huji.ac.il Gerrit-Reviewer: Nikerabbit niklas.laxst...@gmail.com Gerrit-Reviewer: Pginer pgi...@wikimedia.org Gerrit-Reviewer: Siebrand siebr...@wikimedia.org Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Add pmtpa suffix - change (operations/puppet)
Mark Bergsma has uploaded a new change for review. https://gerrit.wikimedia.org/r/60827 Change subject: Add pmtpa suffix .. Add pmtpa suffix Change-Id: I30936d8e27813d096234ca8da71c0f569bc59837 --- M manifests/ganglia.pp 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/27/60827/1 diff --git a/manifests/ganglia.pp b/manifests/ganglia.pp index c20b36e..4a32176 100644 --- a/manifests/ganglia.pp +++ b/manifests/ganglia.pp @@ -294,7 +294,7 @@ LVS loadbalancers pmtpa = lvs1.wikimedia.org lvs2.wikimedia.org, Miscellaneous = hooper.wikimedia.org tarin.pmtpa.wmnet, Text squids = sq59.wikimedia.org sq60.wikimedia.org, - Bits caches = manutius.wikimedia.org:8670 sq67.wikimedia.org sq68.wikimedia.org, + Bits caches pmtpa = manutius.wikimedia.org:8670 sq67.wikimedia.org sq68.wikimedia.org, Fundraiser payments = payments1.wikimedia.org payments2.wikimedia.org, Fundraising eqiad = pay-lvs1001.frack.eqiad.wmnet pay-lvs1002.frack.eqiad.wmnet, SSL cluster = ssl1.wikimedia.org ssl2.wikimedia.org, -- To view, visit https://gerrit.wikimedia.org/r/60827 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I30936d8e27813d096234ca8da71c0f569bc59837 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Mark Bergsma m...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Add pmtpa suffix - change (operations/puppet)
Mark Bergsma has submitted this change and it was merged. Change subject: Add pmtpa suffix .. Add pmtpa suffix Change-Id: I30936d8e27813d096234ca8da71c0f569bc59837 --- M manifests/ganglia.pp 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Mark Bergsma: Verified; Looks good to me, approved diff --git a/manifests/ganglia.pp b/manifests/ganglia.pp index c20b36e..4a32176 100644 --- a/manifests/ganglia.pp +++ b/manifests/ganglia.pp @@ -294,7 +294,7 @@ LVS loadbalancers pmtpa = lvs1.wikimedia.org lvs2.wikimedia.org, Miscellaneous = hooper.wikimedia.org tarin.pmtpa.wmnet, Text squids = sq59.wikimedia.org sq60.wikimedia.org, - Bits caches = manutius.wikimedia.org:8670 sq67.wikimedia.org sq68.wikimedia.org, + Bits caches pmtpa = manutius.wikimedia.org:8670 sq67.wikimedia.org sq68.wikimedia.org, Fundraiser payments = payments1.wikimedia.org payments2.wikimedia.org, Fundraising eqiad = pay-lvs1001.frack.eqiad.wmnet pay-lvs1002.frack.eqiad.wmnet, SSL cluster = ssl1.wikimedia.org ssl2.wikimedia.org, -- To view, visit https://gerrit.wikimedia.org/r/60827 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I30936d8e27813d096234ca8da71c0f569bc59837 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Mark Bergsma m...@wikimedia.org Gerrit-Reviewer: Mark Bergsma m...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Add nickel as gmetad host - change (operations/puppet)
Mark Bergsma has uploaded a new change for review. https://gerrit.wikimedia.org/r/60828 Change subject: Add nickel as gmetad host .. Add nickel as gmetad host Change-Id: I9027204398885216f71dd5cfe167e58bfe652137 --- M modules/ganglia_new/manifests/configuration.pp 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/28/60828/1 diff --git a/modules/ganglia_new/manifests/configuration.pp b/modules/ganglia_new/manifests/configuration.pp index 7879153..adcf860 100644 --- a/modules/ganglia_new/manifests/configuration.pp +++ b/modules/ganglia_new/manifests/configuration.pp @@ -109,7 +109,7 @@ case $::realm { 'production': { $url = http://ganglia.wikimedia.org; - $gmetad_hosts = [ 208.80.152.15 ] + $gmetad_hosts = [ 208.80.152.15, 208.80.154.150 ] $base_port = 8649 } 'labs': { -- To view, visit https://gerrit.wikimedia.org/r/60828 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I9027204398885216f71dd5cfe167e58bfe652137 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Mark Bergsma m...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Add nickel as gmetad host - change (operations/puppet)
Mark Bergsma has submitted this change and it was merged. Change subject: Add nickel as gmetad host .. Add nickel as gmetad host Change-Id: I9027204398885216f71dd5cfe167e58bfe652137 --- M modules/ganglia_new/manifests/configuration.pp 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Mark Bergsma: Verified; Looks good to me, approved jenkins-bot: Verified diff --git a/modules/ganglia_new/manifests/configuration.pp b/modules/ganglia_new/manifests/configuration.pp index 7879153..adcf860 100644 --- a/modules/ganglia_new/manifests/configuration.pp +++ b/modules/ganglia_new/manifests/configuration.pp @@ -109,7 +109,7 @@ case $::realm { 'production': { $url = http://ganglia.wikimedia.org; - $gmetad_hosts = [ 208.80.152.15 ] + $gmetad_hosts = [ 208.80.152.15, 208.80.154.150 ] $base_port = 8649 } 'labs': { -- To view, visit https://gerrit.wikimedia.org/r/60828 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I9027204398885216f71dd5cfe167e58bfe652137 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Mark Bergsma m...@wikimedia.org Gerrit-Reviewer: Mark Bergsma m...@wikimedia.org Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Remove svnstat stuff used in Doxygen generation - change (mediawiki/core)
Krinkle has uploaded a new change for review. https://gerrit.wikimedia.org/r/60829 Change subject: Remove svnstat stuff used in Doxygen generation .. Remove svnstat stuff used in Doxygen generation Change-Id: I9d8db5fae6e0c99d59fcb9a43d7ed4aab953c300 --- M maintenance/Doxyfile M maintenance/mwdocgen.php 2 files changed, 5 insertions(+), 36 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/29/60829/1 diff --git a/maintenance/Doxyfile b/maintenance/Doxyfile index b60a196..e3ba4e5 100644 --- a/maintenance/Doxyfile +++ b/maintenance/Doxyfile @@ -5,7 +5,6 @@ # {{OUTPUT_DIRECTORY}} # {{CURRENT_VERSION}} # {{STRIP_FROM_PATH}} -# {{SVNSTAT}} # {{INPUT}} # # To generate documentation run: php mwdocgen.php --no-extensions @@ -114,7 +113,7 @@ SHOW_DIRECTORIES = YES SHOW_FILES = YES SHOW_NAMESPACES= NO -FILE_VERSION_FILTER= {{SVNSTAT}} +FILE_VERSION_FILTER= LAYOUT_FILE= CITE_BIB_FILES = #--- @@ -174,7 +173,6 @@ *.MM \ *.PY RECURSIVE = YES -EXCLUDE= {{EXCLUDE}} EXCLUDE_SYMLINKS = YES EXCLUDE_PATTERNS = LocalSettings.php AdminSettings.php StartProfiler.php .svn */.git/* {{EXCLUDE_PATTERNS}} EXCLUDE_SYMBOLS= diff --git a/maintenance/mwdocgen.php b/maintenance/mwdocgen.php index 583249a..e36674e 100644 --- a/maintenance/mwdocgen.php +++ b/maintenance/mwdocgen.php @@ -60,9 +60,6 @@ /** doxygen input filter to tweak source file before they are parsed */ $doxygenInputFilter = php {$mwPath}maintenance/mwdoc-filter.php; -/** svnstat command, used to get the version of each file */ -$svnstat = $mwPath . 'bin/svnstat'; - /** where Phpdoc should output documentation */ $doxyOutput = $mwPath . 'docs' . DIRECTORY_SEPARATOR ; @@ -105,30 +102,11 @@ } /** - * Copied from SpecialVersion::getSvnRevision() - * @param $dir String - * @return Mixed: string or false - */ -function getSvnRevision( $dir ) { - // http://svnbook.red-bean.com/nightly/en/svn.developer.insidewc.html - $entries = $dir . '/.svn/entries'; - - if ( !file_exists( $entries ) ) { - return false; - } - - $content = file( $entries ); - - return intval( $content[3] ); -} - -/** * Generate a configuration file given user parameters and return the temporary filename. * @param $doxygenTemplate String: full path for the template. * @param $outputDirectory String: directory where the stuff will be output. * @param $stripFromPath String: path that should be stripped out (usually mediawiki base path). * @param $currentVersion String: Version number of the software - * @param $svnstat String: path to the svnstat file * @param $input String: Path to analyze. * @param $exclude String: Additionals path regex to exclude * @param $excludePatterns String: Additionals path regex to exclude @@ -136,7 +114,7 @@ * @param $doxyGenerateMan Boolean * @return string */ -function generateConfigFile( $doxygenTemplate, $outputDirectory, $stripFromPath, $currentVersion, $svnstat, $input, $exclude, $excludePatterns, $doxyGenerateMan ) { +function generateConfigFile( $doxygenTemplate, $outputDirectory, $stripFromPath, $currentVersion, $input, $exclude, $excludePatterns, $doxyGenerateMan ) { global $doxygenInputFilter; $template = file_get_contents( $doxygenTemplate ); @@ -145,7 +123,6 @@ '{{OUTPUT_DIRECTORY}}' = $outputDirectory, '{{STRIP_FROM_PATH}}' = $stripFromPath, '{{CURRENT_VERSION}}' = $currentVersion, - '{{SVNSTAT}}' = $svnstat, '{{INPUT}}'= $input, '{{EXCLUDE}}' = $exclude, '{{EXCLUDE_PATTERNS}}' = $excludePatterns, @@ -258,20 +235,14 @@ $excludePatterns = 'extensions'; } -$versionNumber = getSvnRevision( $input ); -if ( $versionNumber === false ) { # Not using subversion ? - $svnstat = ''; # Not really useful if subversion not available - # @todo FIXME - $version = 'trunk'; -} else { - $version = trunk (r$versionNumber); -} +// @todo FIXME to work on git +$version = 'master'; // Generate path exclusions $excludedPaths = $mwPath . join( $mwPath, $mwExcludePaths ); print EXCLUDE: $excludedPaths\n\n; -$generatedConf = generateConfigFile( $doxygenTemplate, $doxyOutput, $mwPath, $version, $svnstat, $input, $excludedPaths, $excludePatterns, $doxyGenerateMan ); +$generatedConf = generateConfigFile( $doxygenTemplate, $doxyOutput, $mwPath, $version, $input, $excludedPaths, $excludePatterns, $doxyGenerateMan ); $command = $doxygenBin . ' ' . $generatedConf; echo TEXT -- To view, visit https://gerrit.wikimedia.org/r/60829 To unsubscribe, visit
[MediaWiki-commits] [Gerrit] mwdocgen.php: Implement --version option. - change (mediawiki/core)
Krinkle has uploaded a new change for review. https://gerrit.wikimedia.org/r/60830 Change subject: mwdocgen.php: Implement --version option. .. mwdocgen.php: Implement --version option. So that the job that runs it can pass along what it should display (e.g. branch, tag, hash etc. whatever is appropiate for the context of that run). Change-Id: I1d5b6266e49a71672b0a53069e6ea6bb4658c3d2 --- M maintenance/mwdocgen.php 1 file changed, 11 insertions(+), 5 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/30/60830/1 diff --git a/maintenance/mwdocgen.php b/maintenance/mwdocgen.php index e36674e..37e626b 100644 --- a/maintenance/mwdocgen.php +++ b/maintenance/mwdocgen.php @@ -63,6 +63,8 @@ /** where Phpdoc should output documentation */ $doxyOutput = $mwPath . 'docs' . DIRECTORY_SEPARATOR ; +$doxyVersion = 'master'; + /** MediaWiki subpaths */ $mwPathI = $mwPath . 'includes/'; $mwPathL = $mwPath . 'languages/'; @@ -165,6 +167,12 @@ $doxyOutput = realpath( $argv[$i] ); } break; + case '--version': + $i++; + if ( isset( $argv[$i] ) ) { + $doxyVersion = $argv[$i]; + } + break; case '--generate-man': $doxyGenerateMan = true; break; @@ -184,8 +192,9 @@ If no command is given, you will be prompted. Other options: ---output dir Set output directory (default $doxyOutput) +--output dir Set output directory (default: $doxyOutput) --generate-man Generates man page documentation +--version Project version to display in the outut (default: $doxyVersion) --help Show this help and exit. @@ -235,14 +244,11 @@ $excludePatterns = 'extensions'; } -// @todo FIXME to work on git -$version = 'master'; - // Generate path exclusions $excludedPaths = $mwPath . join( $mwPath, $mwExcludePaths ); print EXCLUDE: $excludedPaths\n\n; -$generatedConf = generateConfigFile( $doxygenTemplate, $doxyOutput, $mwPath, $version, $input, $excludedPaths, $excludePatterns, $doxyGenerateMan ); +$generatedConf = generateConfigFile( $doxygenTemplate, $doxyOutput, $mwPath, $doxyVersion, $input, $excludedPaths, $excludePatterns, $doxyGenerateMan ); $command = $doxygenBin . ' ' . $generatedConf; echo TEXT -- To view, visit https://gerrit.wikimedia.org/r/60830 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I1d5b6266e49a71672b0a53069e6ea6bb4658c3d2 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: REL1_20 Gerrit-Owner: Krinkle krinklem...@gmail.com ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Fix Undefined offset notice - change (mediawiki...UniversalLanguageSelector)
Nikerabbit has uploaded a new change for review. https://gerrit.wikimedia.org/r/60831 Change subject: Fix Undefined offset notice .. Fix Undefined offset notice Bug: 45327 Change-Id: I1f70ef0ec4f2434f9f072e718140ff8050b81ba3 --- M data/LanguageNameSearch.php 1 file changed, 8 insertions(+), 5 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/UniversalLanguageSelector refs/changes/31/60831/1 diff --git a/data/LanguageNameSearch.php b/data/LanguageNameSearch.php index b662afc..c1b237e 100644 --- a/data/LanguageNameSearch.php +++ b/data/LanguageNameSearch.php @@ -28,11 +28,17 @@ if ( self::$languagenames === null ) { self::init(); } + + // @todo: Shouldn't this be unicode aware? $searchKey = strtolower( $searchKey ); - $bucket = self::$languagenames[self::getIndex( $searchKey )]; - if ( !$bucket ) { + $index = self::getIndex( $searchKey ); + + if ( !self::$languagenames[$index] ) { return array(); } + + $bucket = self::$languagenames[$index]; + $results = array(); foreach ( $bucket as $name = $code ) { // Prefix search @@ -54,9 +60,6 @@ $bucket = $codepoint; } else { $bucket = $codepoint % 1000; - } - if ( !isset( $buckets[$bucket] ) ) { - $buckets[$bucket] = array(); } return $bucket; -- To view, visit https://gerrit.wikimedia.org/r/60831 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I1f70ef0ec4f2434f9f072e718140ff8050b81ba3 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/UniversalLanguageSelector Gerrit-Branch: master Gerrit-Owner: Nikerabbit niklas.laxst...@gmail.com ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Remove svnstat stuff used in Doxygen generation - change (mediawiki/core)
Krinkle has submitted this change and it was merged. Change subject: Remove svnstat stuff used in Doxygen generation .. Remove svnstat stuff used in Doxygen generation Change-Id: I9d8db5fae6e0c99d59fcb9a43d7ed4aab953c300 --- M maintenance/Doxyfile M maintenance/mwdocgen.php 2 files changed, 5 insertions(+), 36 deletions(-) Approvals: Krinkle: Verified; Looks good to me, approved diff --git a/maintenance/Doxyfile b/maintenance/Doxyfile index b60a196..e3ba4e5 100644 --- a/maintenance/Doxyfile +++ b/maintenance/Doxyfile @@ -5,7 +5,6 @@ # {{OUTPUT_DIRECTORY}} # {{CURRENT_VERSION}} # {{STRIP_FROM_PATH}} -# {{SVNSTAT}} # {{INPUT}} # # To generate documentation run: php mwdocgen.php --no-extensions @@ -114,7 +113,7 @@ SHOW_DIRECTORIES = YES SHOW_FILES = YES SHOW_NAMESPACES= NO -FILE_VERSION_FILTER= {{SVNSTAT}} +FILE_VERSION_FILTER= LAYOUT_FILE= CITE_BIB_FILES = #--- @@ -174,7 +173,6 @@ *.MM \ *.PY RECURSIVE = YES -EXCLUDE= {{EXCLUDE}} EXCLUDE_SYMLINKS = YES EXCLUDE_PATTERNS = LocalSettings.php AdminSettings.php StartProfiler.php .svn */.git/* {{EXCLUDE_PATTERNS}} EXCLUDE_SYMBOLS= diff --git a/maintenance/mwdocgen.php b/maintenance/mwdocgen.php index 583249a..e36674e 100644 --- a/maintenance/mwdocgen.php +++ b/maintenance/mwdocgen.php @@ -60,9 +60,6 @@ /** doxygen input filter to tweak source file before they are parsed */ $doxygenInputFilter = php {$mwPath}maintenance/mwdoc-filter.php; -/** svnstat command, used to get the version of each file */ -$svnstat = $mwPath . 'bin/svnstat'; - /** where Phpdoc should output documentation */ $doxyOutput = $mwPath . 'docs' . DIRECTORY_SEPARATOR ; @@ -105,30 +102,11 @@ } /** - * Copied from SpecialVersion::getSvnRevision() - * @param $dir String - * @return Mixed: string or false - */ -function getSvnRevision( $dir ) { - // http://svnbook.red-bean.com/nightly/en/svn.developer.insidewc.html - $entries = $dir . '/.svn/entries'; - - if ( !file_exists( $entries ) ) { - return false; - } - - $content = file( $entries ); - - return intval( $content[3] ); -} - -/** * Generate a configuration file given user parameters and return the temporary filename. * @param $doxygenTemplate String: full path for the template. * @param $outputDirectory String: directory where the stuff will be output. * @param $stripFromPath String: path that should be stripped out (usually mediawiki base path). * @param $currentVersion String: Version number of the software - * @param $svnstat String: path to the svnstat file * @param $input String: Path to analyze. * @param $exclude String: Additionals path regex to exclude * @param $excludePatterns String: Additionals path regex to exclude @@ -136,7 +114,7 @@ * @param $doxyGenerateMan Boolean * @return string */ -function generateConfigFile( $doxygenTemplate, $outputDirectory, $stripFromPath, $currentVersion, $svnstat, $input, $exclude, $excludePatterns, $doxyGenerateMan ) { +function generateConfigFile( $doxygenTemplate, $outputDirectory, $stripFromPath, $currentVersion, $input, $exclude, $excludePatterns, $doxyGenerateMan ) { global $doxygenInputFilter; $template = file_get_contents( $doxygenTemplate ); @@ -145,7 +123,6 @@ '{{OUTPUT_DIRECTORY}}' = $outputDirectory, '{{STRIP_FROM_PATH}}' = $stripFromPath, '{{CURRENT_VERSION}}' = $currentVersion, - '{{SVNSTAT}}' = $svnstat, '{{INPUT}}'= $input, '{{EXCLUDE}}' = $exclude, '{{EXCLUDE_PATTERNS}}' = $excludePatterns, @@ -258,20 +235,14 @@ $excludePatterns = 'extensions'; } -$versionNumber = getSvnRevision( $input ); -if ( $versionNumber === false ) { # Not using subversion ? - $svnstat = ''; # Not really useful if subversion not available - # @todo FIXME - $version = 'trunk'; -} else { - $version = trunk (r$versionNumber); -} +// @todo FIXME to work on git +$version = 'master'; // Generate path exclusions $excludedPaths = $mwPath . join( $mwPath, $mwExcludePaths ); print EXCLUDE: $excludedPaths\n\n; -$generatedConf = generateConfigFile( $doxygenTemplate, $doxyOutput, $mwPath, $version, $svnstat, $input, $excludedPaths, $excludePatterns, $doxyGenerateMan ); +$generatedConf = generateConfigFile( $doxygenTemplate, $doxyOutput, $mwPath, $version, $input, $excludedPaths, $excludePatterns, $doxyGenerateMan ); $command = $doxygenBin . ' ' . $generatedConf; echo TEXT -- To view, visit https://gerrit.wikimedia.org/r/60829 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged
[MediaWiki-commits] [Gerrit] mwdocgen.php: Implement --version option. - change (mediawiki/core)
Krinkle has submitted this change and it was merged. Change subject: mwdocgen.php: Implement --version option. .. mwdocgen.php: Implement --version option. So that the job that runs it can pass along what it should display (e.g. branch, tag, hash etc. whatever is appropiate for the context of that run). Change-Id: I1d5b6266e49a71672b0a53069e6ea6bb4658c3d2 --- M maintenance/mwdocgen.php 1 file changed, 11 insertions(+), 5 deletions(-) Approvals: Krinkle: Verified; Looks good to me, approved diff --git a/maintenance/mwdocgen.php b/maintenance/mwdocgen.php index e36674e..37e626b 100644 --- a/maintenance/mwdocgen.php +++ b/maintenance/mwdocgen.php @@ -63,6 +63,8 @@ /** where Phpdoc should output documentation */ $doxyOutput = $mwPath . 'docs' . DIRECTORY_SEPARATOR ; +$doxyVersion = 'master'; + /** MediaWiki subpaths */ $mwPathI = $mwPath . 'includes/'; $mwPathL = $mwPath . 'languages/'; @@ -165,6 +167,12 @@ $doxyOutput = realpath( $argv[$i] ); } break; + case '--version': + $i++; + if ( isset( $argv[$i] ) ) { + $doxyVersion = $argv[$i]; + } + break; case '--generate-man': $doxyGenerateMan = true; break; @@ -184,8 +192,9 @@ If no command is given, you will be prompted. Other options: ---output dir Set output directory (default $doxyOutput) +--output dir Set output directory (default: $doxyOutput) --generate-man Generates man page documentation +--version Project version to display in the outut (default: $doxyVersion) --help Show this help and exit. @@ -235,14 +244,11 @@ $excludePatterns = 'extensions'; } -// @todo FIXME to work on git -$version = 'master'; - // Generate path exclusions $excludedPaths = $mwPath . join( $mwPath, $mwExcludePaths ); print EXCLUDE: $excludedPaths\n\n; -$generatedConf = generateConfigFile( $doxygenTemplate, $doxyOutput, $mwPath, $version, $input, $excludedPaths, $excludePatterns, $doxyGenerateMan ); +$generatedConf = generateConfigFile( $doxygenTemplate, $doxyOutput, $mwPath, $doxyVersion, $input, $excludedPaths, $excludePatterns, $doxyGenerateMan ); $command = $doxygenBin . ' ' . $generatedConf; echo TEXT -- To view, visit https://gerrit.wikimedia.org/r/60830 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I1d5b6266e49a71672b0a53069e6ea6bb4658c3d2 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: REL1_20 Gerrit-Owner: Krinkle krinklem...@gmail.com Gerrit-Reviewer: Krinkle krinklem...@gmail.com ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Remove svnstat stuff used in Doxygen generation - change (mediawiki/core)
Krinkle has uploaded a new change for review. https://gerrit.wikimedia.org/r/60832 Change subject: Remove svnstat stuff used in Doxygen generation .. Remove svnstat stuff used in Doxygen generation Change-Id: I9d8db5fae6e0c99d59fcb9a43d7ed4aab953c300 --- M maintenance/Doxyfile M maintenance/mwdocgen.php 2 files changed, 5 insertions(+), 61 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/32/60832/1 diff --git a/maintenance/Doxyfile b/maintenance/Doxyfile index b7c1e5e..5cbcb5f 100644 --- a/maintenance/Doxyfile +++ b/maintenance/Doxyfile @@ -5,7 +5,6 @@ # {{OUTPUT_DIRECTORY}} # {{CURRENT_VERSION}} # {{STRIP_FROM_PATH}} -# {{SVNSTAT}} # {{INPUT}} # # To generate documentation run: php mwdocgen.php --no-extensions @@ -114,7 +113,7 @@ SHOW_DIRECTORIES = YES SHOW_FILES = YES SHOW_NAMESPACES= NO -FILE_VERSION_FILTER= {{SVNSTAT}} +FILE_VERSION_FILTER= LAYOUT_FILE= CITE_BIB_FILES = #--- @@ -174,7 +173,6 @@ *.MM \ *.PY RECURSIVE = YES -EXCLUDE= {{EXCLUDE}} EXCLUDE_SYMLINKS = YES EXCLUDE_PATTERNS = LocalSettings.php AdminSettings.php StartProfiler.php .svn */.git/* {{EXCLUDE_PATTERNS}} EXCLUDE_SYMBOLS= diff --git a/maintenance/mwdocgen.php b/maintenance/mwdocgen.php index 0c3b262..0d9f3ab 100644 --- a/maintenance/mwdocgen.php +++ b/maintenance/mwdocgen.php @@ -57,9 +57,6 @@ /** doxygen configuration template for mediawiki */ $doxygenTemplate = $mwPath . 'maintenance/Doxyfile'; -/** svnstat command, used to get the version of each file */ -$svnstat = $mwPath . 'bin/svnstat'; - /** where Phpdoc should output documentation */ $doxyOutput = $mwPath . 'docs' . DIRECTORY_SEPARATOR ; @@ -100,62 +97,18 @@ } /** - * Copied from SpecialVersion::getSvnRevision() - * @param $dir String - * @return Mixed: string or false - */ -function getSvnRevision( $dir ) { - // http://svnbook.red-bean.com/nightly/en/svn.developer.insidewc.html - $entries = $dir . '/.svn/entries'; - - if ( !file_exists( $entries ) ) { - return false; - } - - $content = file( $entries ); - - // check if file is xml (subversion release = 1.3) or not (subversion release = 1.4) - if ( preg_match( '/^\?xml/', $content[0] ) ) { - // subversion is release = 1.3 - if ( !function_exists( 'simplexml_load_file' ) ) { - // We could fall back to expat... YUCK - return false; - } - - $xml = simplexml_load_file( $entries ); - - if ( $xml ) { - foreach ( $xml-entry as $entry ) { - if ( $xml-entry[0]['name'] == '' ) { - // The directory entry should always have a revision marker. - if ( $entry['revision'] ) { - return intval( $entry['revision'] ); - } - } - } - } - return false; - } else { - // subversion is release 1.4 - return intval( $content[3] ); - } -} - -/** * Generate a configuration file given user parameters and return the temporary filename. * @param $doxygenTemplate String: full path for the template. * @param $outputDirectory String: directory where the stuff will be output. * @param $stripFromPath String: path that should be stripped out (usually mediawiki base path). * @param $currentVersion String: Version number of the software - * @param $svnstat String: path to the svnstat file * @param $input String: Path to analyze. * @param $exclude String: Additionals path regex to exclude * @param $exclude_patterns String: Additionals path regex to exclude * (LocalSettings.php, AdminSettings.php, .svn and .git directories are always excluded) * @return string */ -function generateConfigFile( $doxygenTemplate, $outputDirectory, $stripFromPath, $currentVersion, $svnstat, $input, $exclude, $exclude_patterns ) { - +function generateConfigFile( $doxygenTemplate, $outputDirectory, $stripFromPath, $currentVersion, $input, $exclude, $exclude_patterns ) { global $wgDoxyGenerateMan; $template = file_get_contents( $doxygenTemplate ); @@ -165,7 +118,6 @@ '{{OUTPUT_DIRECTORY}}' = $outputDirectory, '{{STRIP_FROM_PATH}}' = $stripFromPath, '{{CURRENT_VERSION}}' = $currentVersion, - '{{SVNSTAT}}' = $svnstat, '{{INPUT}}'= $input, '{{EXCLUDE}}'
[MediaWiki-commits] [Gerrit] mwdocgen.php: Implement --version option. - change (mediawiki/core)
Krinkle has uploaded a new change for review. https://gerrit.wikimedia.org/r/60833 Change subject: mwdocgen.php: Implement --version option. .. mwdocgen.php: Implement --version option. So that the job that runs it can pass along what it should display (e.g. branch, tag, hash etc. whatever is appropiate for the context of that run). Change-Id: I1d5b6266e49a71672b0a53069e6ea6bb4658c3d2 --- M maintenance/mwdocgen.php 1 file changed, 11 insertions(+), 5 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/33/60833/1 diff --git a/maintenance/mwdocgen.php b/maintenance/mwdocgen.php index 0d9f3ab..3c35335 100644 --- a/maintenance/mwdocgen.php +++ b/maintenance/mwdocgen.php @@ -60,6 +60,8 @@ /** where Phpdoc should output documentation */ $doxyOutput = $mwPath . 'docs' . DIRECTORY_SEPARATOR ; +$doxyVersion = 'master'; + /** MediaWiki subpaths */ $mwPathI = $mwPath . 'includes/'; $mwPathL = $mwPath . 'languages/'; @@ -159,6 +161,12 @@ $doxyOutput = realpath( $argv[$i] ); } break; + case '--version': + $i++; + if ( isset( $argv[$i] ) ) { + $doxyVersion = $argv[$i]; + } + break; case '--generate-man': $wgDoxyGenerateMan = true; break; @@ -178,8 +186,9 @@ If no command is given, you will be prompted. Other options: ---output dir Set output directory (default $doxyOutput) +--output dir Set output directory (default: $doxyOutput) --generate-man Generates man page documentation +--version Project version to display in the outut (default: $doxyVersion) --help Show this help and exit. @@ -228,14 +237,11 @@ $exclude_patterns = 'extensions'; } -// @todo FIXME to work on git -$version = 'master'; - // Generate path exclusions $excludedPaths = $mwPath . join( $mwPath, $mwExcludePaths ); print EXCLUDE: $excludedPaths\n\n; -$generatedConf = generateConfigFile( $doxygenTemplate, $doxyOutput, $mwPath, $version, $input, $excludedPaths, $exclude_patterns ); +$generatedConf = generateConfigFile( $doxygenTemplate, $doxyOutput, $mwPath, $doxyVersion, $input, $excludedPaths, $exclude_patterns ); $command = $doxygenBin . ' ' . $generatedConf; echo TEXT -- To view, visit https://gerrit.wikimedia.org/r/60833 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I1d5b6266e49a71672b0a53069e6ea6bb4658c3d2 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: REL1_19 Gerrit-Owner: Krinkle krinklem...@gmail.com ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Restart aggregator instances on corresponding config changes - change (operations/puppet)
Mark Bergsma has uploaded a new change for review. https://gerrit.wikimedia.org/r/60834 Change subject: Restart aggregator instances on corresponding config changes .. Restart aggregator instances on corresponding config changes Change-Id: I597ab3c62af710ccb69f7ddf0949aba122d5a6ff --- M modules/ganglia_new/files/upstart/ganglia-monitor-aggregator.conf 1 file changed, 6 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/34/60834/1 diff --git a/modules/ganglia_new/files/upstart/ganglia-monitor-aggregator.conf b/modules/ganglia_new/files/upstart/ganglia-monitor-aggregator.conf index b189426..85a984c 100644 --- a/modules/ganglia_new/files/upstart/ganglia-monitor-aggregator.conf +++ b/modules/ganglia_new/files/upstart/ganglia-monitor-aggregator.conf @@ -11,6 +11,11 @@ for gmonconf in /etc/ganglia/aggregators/*.conf do gmonid=${gmonconf##*/} - start ganglia-monitor-aggregator-instance ID=${gmonid%.conf} || true + if status ganglia-monitor-aggregator-instance ID=${gmonid%.conf} [ /etc/ganglia/aggregators/$gmonid -nt /var/run/gmond-${gmonid%.conf}.pid ] + then + restart ganglia-monitor-aggregator-instance ID=${gmonid%.conf} || true + else + start ganglia-monitor-aggregator-instance ID=${gmonid%.conf} || true + fi done end script -- To view, visit https://gerrit.wikimedia.org/r/60834 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I597ab3c62af710ccb69f7ddf0949aba122d5a6ff Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Mark Bergsma m...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Restart aggregator instances on corresponding config changes - change (operations/puppet)
Mark Bergsma has submitted this change and it was merged. Change subject: Restart aggregator instances on corresponding config changes .. Restart aggregator instances on corresponding config changes Change-Id: I597ab3c62af710ccb69f7ddf0949aba122d5a6ff --- M modules/ganglia_new/files/upstart/ganglia-monitor-aggregator.conf 1 file changed, 6 insertions(+), 1 deletion(-) Approvals: Mark Bergsma: Verified; Looks good to me, approved jenkins-bot: Verified diff --git a/modules/ganglia_new/files/upstart/ganglia-monitor-aggregator.conf b/modules/ganglia_new/files/upstart/ganglia-monitor-aggregator.conf index b189426..85a984c 100644 --- a/modules/ganglia_new/files/upstart/ganglia-monitor-aggregator.conf +++ b/modules/ganglia_new/files/upstart/ganglia-monitor-aggregator.conf @@ -11,6 +11,11 @@ for gmonconf in /etc/ganglia/aggregators/*.conf do gmonid=${gmonconf##*/} - start ganglia-monitor-aggregator-instance ID=${gmonid%.conf} || true + if status ganglia-monitor-aggregator-instance ID=${gmonid%.conf} [ /etc/ganglia/aggregators/$gmonid -nt /var/run/gmond-${gmonid%.conf}.pid ] + then + restart ganglia-monitor-aggregator-instance ID=${gmonid%.conf} || true + else + start ganglia-monitor-aggregator-instance ID=${gmonid%.conf} || true + fi done end script -- To view, visit https://gerrit.wikimedia.org/r/60834 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I597ab3c62af710ccb69f7ddf0949aba122d5a6ff Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Mark Bergsma m...@wikimedia.org Gerrit-Reviewer: Mark Bergsma m...@wikimedia.org Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Test the new ganglia monitor classes with pmtpa bits caches - change (operations/puppet)
Mark Bergsma has uploaded a new change for review. https://gerrit.wikimedia.org/r/60835 Change subject: Test the new ganglia monitor classes with pmtpa bits caches .. Test the new ganglia monitor classes with pmtpa bits caches Change-Id: Ic5188bb488a285f1566b74bb1e850d5f5e44e93f --- M manifests/site.pp 1 file changed, 7 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/35/60835/1 diff --git a/manifests/site.pp b/manifests/site.pp index c75d397..85fde0a 100644 --- a/manifests/site.pp +++ b/manifests/site.pp @@ -51,9 +51,15 @@ # Class for *most* servers, standard includes class standard { include base, - ganglia, ntp::client, exim::simple-mail-sender + + # FIXME: remove after the ganglia module migration + if $::site == pmtpa and $cluster in [cache_bits] { + class { ganglia_new::monitor: cluster = $cluster } + } else { + include ganglia + } } class newstandard { -- To view, visit https://gerrit.wikimedia.org/r/60835 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ic5188bb488a285f1566b74bb1e850d5f5e44e93f Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Mark Bergsma m...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Test the new ganglia monitor classes with pmtpa bits caches - change (operations/puppet)
Mark Bergsma has submitted this change and it was merged. Change subject: Test the new ganglia monitor classes with pmtpa bits caches .. Test the new ganglia monitor classes with pmtpa bits caches Change-Id: Ic5188bb488a285f1566b74bb1e850d5f5e44e93f --- M manifests/site.pp 1 file changed, 7 insertions(+), 1 deletion(-) Approvals: Mark Bergsma: Verified; Looks good to me, approved diff --git a/manifests/site.pp b/manifests/site.pp index c75d397..85fde0a 100644 --- a/manifests/site.pp +++ b/manifests/site.pp @@ -51,9 +51,15 @@ # Class for *most* servers, standard includes class standard { include base, - ganglia, ntp::client, exim::simple-mail-sender + + # FIXME: remove after the ganglia module migration + if $::site == pmtpa and $cluster in [cache_bits] { + class { ganglia_new::monitor: cluster = $cluster } + } else { + include ganglia + } } class newstandard { -- To view, visit https://gerrit.wikimedia.org/r/60835 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ic5188bb488a285f1566b74bb1e850d5f5e44e93f Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Mark Bergsma m...@wikimedia.org Gerrit-Reviewer: Mark Bergsma m...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Add file type for python_modules directory - change (operations/puppet)
Mark Bergsma has uploaded a new change for review. https://gerrit.wikimedia.org/r/60836 Change subject: Add file type for python_modules directory .. Add file type for python_modules directory Change-Id: I093ebd9901dc82748c76f7781816b2f2c4835acf --- M modules/ganglia_new/manifests/monitor/packages.pp 1 file changed, 5 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/36/60836/1 diff --git a/modules/ganglia_new/manifests/monitor/packages.pp b/modules/ganglia_new/manifests/monitor/packages.pp index fb24018..f9712f3 100644 --- a/modules/ganglia_new/manifests/monitor/packages.pp +++ b/modules/ganglia_new/manifests/monitor/packages.pp @@ -2,4 +2,9 @@ if !defined(Package[ganglia-monitor]) { package { ganglia-monitor: ensure = latest } } + + file { /usr/lib/ganglia/python_modules: + require = Package[ganglia-monitor], + ensure = directory + } } -- To view, visit https://gerrit.wikimedia.org/r/60836 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I093ebd9901dc82748c76f7781816b2f2c4835acf Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Mark Bergsma m...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Add file type for python_modules directory - change (operations/puppet)
Mark Bergsma has submitted this change and it was merged. Change subject: Add file type for python_modules directory .. Add file type for python_modules directory Change-Id: I093ebd9901dc82748c76f7781816b2f2c4835acf --- M modules/ganglia_new/manifests/monitor/packages.pp 1 file changed, 5 insertions(+), 0 deletions(-) Approvals: Mark Bergsma: Verified; Looks good to me, approved diff --git a/modules/ganglia_new/manifests/monitor/packages.pp b/modules/ganglia_new/manifests/monitor/packages.pp index fb24018..f9712f3 100644 --- a/modules/ganglia_new/manifests/monitor/packages.pp +++ b/modules/ganglia_new/manifests/monitor/packages.pp @@ -2,4 +2,9 @@ if !defined(Package[ganglia-monitor]) { package { ganglia-monitor: ensure = latest } } + + file { /usr/lib/ganglia/python_modules: + require = Package[ganglia-monitor], + ensure = directory + } } -- To view, visit https://gerrit.wikimedia.org/r/60836 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I093ebd9901dc82748c76f7781816b2f2c4835acf Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Mark Bergsma m...@wikimedia.org Gerrit-Reviewer: Mark Bergsma m...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Add file type for /etc/ganglia/conf.d as well - change (operations/puppet)
Mark Bergsma has uploaded a new change for review. https://gerrit.wikimedia.org/r/60837 Change subject: Add file type for /etc/ganglia/conf.d as well .. Add file type for /etc/ganglia/conf.d as well Change-Id: I6b7675be90182706979ba0deab532f0a5a240125 --- M modules/ganglia_new/manifests/monitor/packages.pp 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/37/60837/1 diff --git a/modules/ganglia_new/manifests/monitor/packages.pp b/modules/ganglia_new/manifests/monitor/packages.pp index f9712f3..7fcb846 100644 --- a/modules/ganglia_new/manifests/monitor/packages.pp +++ b/modules/ganglia_new/manifests/monitor/packages.pp @@ -3,7 +3,7 @@ package { ganglia-monitor: ensure = latest } } - file { /usr/lib/ganglia/python_modules: + file { [/usr/lib/ganglia/python_modules, /etc/ganglia/conf.d]: require = Package[ganglia-monitor], ensure = directory } -- To view, visit https://gerrit.wikimedia.org/r/60837 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I6b7675be90182706979ba0deab532f0a5a240125 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Mark Bergsma m...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Add file type for /etc/ganglia/conf.d as well - change (operations/puppet)
Mark Bergsma has submitted this change and it was merged. Change subject: Add file type for /etc/ganglia/conf.d as well .. Add file type for /etc/ganglia/conf.d as well Change-Id: I6b7675be90182706979ba0deab532f0a5a240125 --- M modules/ganglia_new/manifests/monitor/packages.pp 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Mark Bergsma: Verified; Looks good to me, approved diff --git a/modules/ganglia_new/manifests/monitor/packages.pp b/modules/ganglia_new/manifests/monitor/packages.pp index f9712f3..7fcb846 100644 --- a/modules/ganglia_new/manifests/monitor/packages.pp +++ b/modules/ganglia_new/manifests/monitor/packages.pp @@ -3,7 +3,7 @@ package { ganglia-monitor: ensure = latest } } - file { /usr/lib/ganglia/python_modules: + file { [/usr/lib/ganglia/python_modules, /etc/ganglia/conf.d]: require = Package[ganglia-monitor], ensure = directory } -- To view, visit https://gerrit.wikimedia.org/r/60837 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I6b7675be90182706979ba0deab532f0a5a240125 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Mark Bergsma m...@wikimedia.org Gerrit-Reviewer: Mark Bergsma m...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Add alias gmond for ganglia-monitor service - change (operations/puppet)
Mark Bergsma has uploaded a new change for review. https://gerrit.wikimedia.org/r/60838 Change subject: Add alias gmond for ganglia-monitor service .. Add alias gmond for ganglia-monitor service Change-Id: Ie446255170e7879fcf34946252b7a66e38d21a93 --- M modules/ganglia_new/manifests/monitor/service.pp 1 file changed, 1 insertion(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/38/60838/1 diff --git a/modules/ganglia_new/manifests/monitor/service.pp b/modules/ganglia_new/manifests/monitor/service.pp index df7f07a..efc57d6 100644 --- a/modules/ganglia_new/manifests/monitor/service.pp +++ b/modules/ganglia_new/manifests/monitor/service.pp @@ -10,6 +10,7 @@ service { ganglia-monitor: require = File[/etc/init/ganglia-monitor.conf], + alias = gmond, ensure = running, provider = upstart } -- To view, visit https://gerrit.wikimedia.org/r/60838 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ie446255170e7879fcf34946252b7a66e38d21a93 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Mark Bergsma m...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Add alias gmond for ganglia-monitor service - change (operations/puppet)
Mark Bergsma has submitted this change and it was merged. Change subject: Add alias gmond for ganglia-monitor service .. Add alias gmond for ganglia-monitor service Change-Id: Ie446255170e7879fcf34946252b7a66e38d21a93 --- M modules/ganglia_new/manifests/monitor/service.pp 1 file changed, 1 insertion(+), 0 deletions(-) Approvals: Mark Bergsma: Verified; Looks good to me, approved diff --git a/modules/ganglia_new/manifests/monitor/service.pp b/modules/ganglia_new/manifests/monitor/service.pp index df7f07a..efc57d6 100644 --- a/modules/ganglia_new/manifests/monitor/service.pp +++ b/modules/ganglia_new/manifests/monitor/service.pp @@ -10,6 +10,7 @@ service { ganglia-monitor: require = File[/etc/init/ganglia-monitor.conf], + alias = gmond, ensure = running, provider = upstart } -- To view, visit https://gerrit.wikimedia.org/r/60838 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ie446255170e7879fcf34946252b7a66e38d21a93 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Mark Bergsma m...@wikimedia.org Gerrit-Reviewer: Mark Bergsma m...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Cleanup: Fixed some comments, formatting, removed dead code - change (mediawiki...Parsoid)
Cscott has submitted this change and it was merged. Change subject: Cleanup: Fixed some comments, formatting, removed dead code .. Cleanup: Fixed some comments, formatting, removed dead code * No change in functionality or parser test results. Change-Id: I66a7b1f2a1618d0809d6783156fcc6bc89b44885 --- M js/lib/ext.Cite.js M js/lib/mediawiki.DOMPostProcessor.js M js/lib/mediawiki.WikitextSerializer.js 3 files changed, 42 insertions(+), 92 deletions(-) Approvals: Cscott: Looks good to me, approved jenkins-bot: Verified diff --git a/js/lib/ext.Cite.js b/js/lib/ext.Cite.js index 696a22e..174cf41 100644 --- a/js/lib/ext.Cite.js +++ b/js/lib/ext.Cite.js @@ -256,12 +256,10 @@ group = null; } - // Re-emit a references placeholder token - // to be processed in post-expansion Sync phase + // Emit a placeholder meta for the references token + // so that the dom post processor can generate and + // emit references at this point in the DOM. var emitPlaceholderMeta = function() { - // Emit a placeholder meta for the references token - // so that the dom post processor can generate and - // emit references at this point in the DOM. var placeHolder = new SelfclosingTagTk('meta', refsTok.attribs, refsTok.dataAttribs); placeHolder.setAttribute('typeof', 'mw:Ext/References'); placeHolder.setAttribute('about', '#' + manager.env.newObjectId()); diff --git a/js/lib/mediawiki.DOMPostProcessor.js b/js/lib/mediawiki.DOMPostProcessor.js index 2b1927f..6bb1aa5 100644 --- a/js/lib/mediawiki.DOMPostProcessor.js +++ b/js/lib/mediawiki.DOMPostProcessor.js @@ -2470,12 +2470,12 @@ this.options = options; // DOM traverser that runs before the in-order DOM handlers. - var firstDOMHandlerPass = new DOMTraverser(); - firstDOMHandlerPass.addHandler( null, migrateDataParsoid ); + var dataParsoidLoader = new DOMTraverser(); + dataParsoidLoader.addHandler( null, migrateDataParsoid ); // Common post processing this.processors = [ - firstDOMHandlerPass.traverse.bind( firstDOMHandlerPass ), + dataParsoidLoader.traverse.bind( dataParsoidLoader ), handleUnbalancedTableTags, migrateStartMetas, //normalizeDocument, @@ -2501,12 +2501,11 @@ var lastDOMHandler = new DOMTraverser(); lastDOMHandler.addHandler( 'a', handleLinkNeighbours.bind( null, env ) ); lastDOMHandler.addHandler( 'meta', stripMarkerMetas ); - - var reallyLastDOMHandler = new DOMTraverser(); - reallyLastDOMHandler.addHandler( null, saveDataParsoid ); - this.processors.push(lastDOMHandler.traverse.bind(lastDOMHandler)); - this.processors.push(reallyLastDOMHandler.traverse.bind(reallyLastDOMHandler)); + + var dataParsoidSaver = new DOMTraverser(); + dataParsoidSaver.addHandler( null, saveDataParsoid ); + this.processors.push(dataParsoidSaver.traverse.bind(dataParsoidSaver)); } // Inherit from EventEmitter diff --git a/js/lib/mediawiki.WikitextSerializer.js b/js/lib/mediawiki.WikitextSerializer.js index c89535e..bab9f11 100644 --- a/js/lib/mediawiki.WikitextSerializer.js +++ b/js/lib/mediawiki.WikitextSerializer.js @@ -189,9 +189,6 @@ // console.warn(---HWT---:onl: + onNewline + : + text); // tokenize the text - // this is synchronous for now, will still need sync version later, or - // alternatively make text processing in the serializer async - var prefixedText = text; if (!onNewline) { // Prefix '_' so that no start-of-line wiki syntax matches. @@ -320,18 +317,37 @@ /* * * Here is what the state attributes mean: * + * rtTesting + *Are we currently running round-trip tests? If yes, then we know + *there won't be any edits and we more aggressively try to use original + *source and source flags during serialization since this is a test of + *Parsoid's efficacy in preserving information. + * * sep *Separator information: *- constraints: min/max number of newlines *- text: collected separator text from DOM text/comment nodes *- lastSourceNode: -- to be documented -- * + * onSOL + *Is the serializer at the start of a new wikitext line? + * + * atStartOfOutput + *True when wts kicks off, false after the first char has been output + * + * inIndentPre + *Is the serializer currently handling indent-pre tags? + * + * inPHPBlock + *Is the serializer currently handling a tag that the PHP parser + *treats as a block tag? + * * wteHandlerStack - *stack of wikitext escaping handlers -- these handlers are responsible + *Stack of wikitext escaping handlers --
[MediaWiki-commits] [Gerrit] Fixed test stats -- unexpected passing tests output was inco... - change (mediawiki...Parsoid)
Cscott has submitted this change and it was merged. Change subject: Fixed test stats -- unexpected passing tests output was incorrect .. Fixed test stats -- unexpected passing tests output was incorrect Change-Id: I10faa493394f55fa238f38137f9f8fd4e2e36284 --- M js/tests/parserTests.js 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Cscott: Looks good to me, approved jenkins-bot: Verified diff --git a/js/tests/parserTests.js b/js/tests/parserTests.js index 77d4be5..c8d05bf 100755 --- a/js/tests/parserTests.js +++ b/js/tests/parserTests.js @@ -1195,7 +1195,7 @@ thisMode = stats.modes[modes[i]]; if ( thisMode.passedTests + thisMode.passedTestsWhitelisted + thisMode.failedTests 0 ) { curStr += colorizeCount( thisMode.passedTests + stats.passedTestsWhitelisted, 'green' ) + ' passed ('; - curStr += colorizeCount( stats.passedTestsUnexpected, 'red' ) + ' unexpected, '; + curStr += colorizeCount( thisMode.passedTestsUnexpected, 'red' ) + ' unexpected, '; curStr += colorizeCount( thisMode.passedTestsWhitelisted, 'yellow' ) + ' whitelisted) / '; curStr += colorizeCount( thisMode.failedTests, 'red' ) + ' failed ('; curStr += colorizeCount( thisMode.failedTestsUnexpected, 'red') + ' unexpected)'; -- To view, visit https://gerrit.wikimedia.org/r/60815 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I10faa493394f55fa238f38137f9f8fd4e2e36284 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Parsoid Gerrit-Branch: master Gerrit-Owner: Subramanya Sastry ssas...@wikimedia.org Gerrit-Reviewer: Cscott wikime...@cscott.net Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Hack to escape angle brackets in data-parsoid attribute - change (mediawiki...VisualEditor)
Esanders has uploaded a new change for review. https://gerrit.wikimedia.org/r/60840 Change subject: Hack to escape angle brackets in data-parsoid attribute .. Hack to escape angle brackets in data-parsoid attribute Parsoid is sending us some unescaped HTML in the data-parsoid attribute. When we try to rebuild ref nodes (inline aliens) this confuses Firefox which tries to sanitise the HTML by converting ref/ to ref/span. As a temporary fix we can manually escape 's inside the data-parsoid attribute. Also in this commit the new MWReference nodes have been moved to experimental as they are incomplete. Bug: 47417 Change-Id: Ib6a0cfb880e769f28b42c9fa63ddc1abc75c399d --- M VisualEditor.php M modules/ve/dm/nodes/ve.dm.AlienNode.js 2 files changed, 17 insertions(+), 5 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/VisualEditor refs/changes/40/60840/1 diff --git a/VisualEditor.php b/VisualEditor.php index b30756b..1dd7ec8 100644 --- a/VisualEditor.php +++ b/VisualEditor.php @@ -279,8 +279,6 @@ 've/dm/nodes/ve.dm.MWEntityNode.js', 've/dm/nodes/ve.dm.MWHeadingNode.js', 've/dm/nodes/ve.dm.MWPreformattedNode.js', - 've/dm/nodes/ve.dm.MWReferenceListNode.js', - 've/dm/nodes/ve.dm.MWReferenceNode.js', 've/dm/annotations/ve.dm.LinkAnnotation.js', 've/dm/annotations/ve.dm.MWExternalLinkAnnotation.js', @@ -334,8 +332,6 @@ 've/ce/nodes/ve.ce.MWEntityNode.js', 've/ce/nodes/ve.ce.MWHeadingNode.js', 've/ce/nodes/ve.ce.MWPreformattedNode.js', - 've/ce/nodes/ve.ce.MWReferenceListNode.js', - 've/ce/nodes/ve.ce.MWReferenceNode.js', 've/ce/annotations/ve.ce.LinkAnnotation.js', 've/ce/annotations/ve.ce.MWExternalLinkAnnotation.js', @@ -492,9 +488,13 @@ 'scripts' = array( 've/dm/nodes/ve.dm.MWInlineImageNode.js', 've/dm/nodes/ve.dm.MWTemplateNode.js', + 've/dm/nodes/ve.dm.MWReferenceListNode.js', + 've/dm/nodes/ve.dm.MWReferenceNode.js', 've/ce/nodes/ve.ce.MWInlineImageNode.js', 've/ce/nodes/ve.ce.MWTemplateNode.js', + 've/ce/nodes/ve.ce.MWReferenceListNode.js', + 've/ce/nodes/ve.ce.MWReferenceNode.js', ), 'dependencies' = array( 'ext.visualEditor.core', diff --git a/modules/ve/dm/nodes/ve.dm.AlienNode.js b/modules/ve/dm/nodes/ve.dm.AlienNode.js index 7275c88..a17b29a 100644 --- a/modules/ve/dm/nodes/ve.dm.AlienNode.js +++ b/modules/ve/dm/nodes/ve.dm.AlienNode.js @@ -48,7 +48,19 @@ ve.dm.AlienNode.static.toDomElements = function ( dataElement, doc ) { var wrapper = doc.createElement( 'div' ); - $( wrapper ).html( dataElement.attributes.html ); + + // Filthy hack: Parsoid is currently sending us unescaped angle brackets + // inside data-parsoid. For some reason FF picks this up as html and tries + // to sanitise it, converting ref/ to ref/span (!?). + // As a *very temporary* fix we can regex replace them here. + $( wrapper ).html( + dataElement.attributes.html.replace( + /data-parsoid=([^]+)/g, + function( r0, r1 ) { + return 'data-parsoid=' + r1.replace( //g, 'lt;' ).replace( //g, 'gt;' ) + ''; + } + ) + ); // Convert wrapper.children to an array return Array.prototype.slice.call( wrapper.childNodes, 0 ); }; -- To view, visit https://gerrit.wikimedia.org/r/60840 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ib6a0cfb880e769f28b42c9fa63ddc1abc75c399d Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/VisualEditor Gerrit-Branch: master Gerrit-Owner: Esanders esand...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Remove svnstat stuff used in Doxygen generation - change (mediawiki/core)
jenkins-bot has submitted this change and it was merged. Change subject: Remove svnstat stuff used in Doxygen generation .. Remove svnstat stuff used in Doxygen generation Change-Id: I9d8db5fae6e0c99d59fcb9a43d7ed4aab953c300 --- M maintenance/Doxyfile M maintenance/mwdocgen.php 2 files changed, 5 insertions(+), 61 deletions(-) Approvals: Krinkle: Looks good to me, approved jenkins-bot: Verified diff --git a/maintenance/Doxyfile b/maintenance/Doxyfile index b7c1e5e..5cbcb5f 100644 --- a/maintenance/Doxyfile +++ b/maintenance/Doxyfile @@ -5,7 +5,6 @@ # {{OUTPUT_DIRECTORY}} # {{CURRENT_VERSION}} # {{STRIP_FROM_PATH}} -# {{SVNSTAT}} # {{INPUT}} # # To generate documentation run: php mwdocgen.php --no-extensions @@ -114,7 +113,7 @@ SHOW_DIRECTORIES = YES SHOW_FILES = YES SHOW_NAMESPACES= NO -FILE_VERSION_FILTER= {{SVNSTAT}} +FILE_VERSION_FILTER= LAYOUT_FILE= CITE_BIB_FILES = #--- @@ -174,7 +173,6 @@ *.MM \ *.PY RECURSIVE = YES -EXCLUDE= {{EXCLUDE}} EXCLUDE_SYMLINKS = YES EXCLUDE_PATTERNS = LocalSettings.php AdminSettings.php StartProfiler.php .svn */.git/* {{EXCLUDE_PATTERNS}} EXCLUDE_SYMBOLS= diff --git a/maintenance/mwdocgen.php b/maintenance/mwdocgen.php index 0c3b262..0d9f3ab 100644 --- a/maintenance/mwdocgen.php +++ b/maintenance/mwdocgen.php @@ -57,9 +57,6 @@ /** doxygen configuration template for mediawiki */ $doxygenTemplate = $mwPath . 'maintenance/Doxyfile'; -/** svnstat command, used to get the version of each file */ -$svnstat = $mwPath . 'bin/svnstat'; - /** where Phpdoc should output documentation */ $doxyOutput = $mwPath . 'docs' . DIRECTORY_SEPARATOR ; @@ -100,62 +97,18 @@ } /** - * Copied from SpecialVersion::getSvnRevision() - * @param $dir String - * @return Mixed: string or false - */ -function getSvnRevision( $dir ) { - // http://svnbook.red-bean.com/nightly/en/svn.developer.insidewc.html - $entries = $dir . '/.svn/entries'; - - if ( !file_exists( $entries ) ) { - return false; - } - - $content = file( $entries ); - - // check if file is xml (subversion release = 1.3) or not (subversion release = 1.4) - if ( preg_match( '/^\?xml/', $content[0] ) ) { - // subversion is release = 1.3 - if ( !function_exists( 'simplexml_load_file' ) ) { - // We could fall back to expat... YUCK - return false; - } - - $xml = simplexml_load_file( $entries ); - - if ( $xml ) { - foreach ( $xml-entry as $entry ) { - if ( $xml-entry[0]['name'] == '' ) { - // The directory entry should always have a revision marker. - if ( $entry['revision'] ) { - return intval( $entry['revision'] ); - } - } - } - } - return false; - } else { - // subversion is release 1.4 - return intval( $content[3] ); - } -} - -/** * Generate a configuration file given user parameters and return the temporary filename. * @param $doxygenTemplate String: full path for the template. * @param $outputDirectory String: directory where the stuff will be output. * @param $stripFromPath String: path that should be stripped out (usually mediawiki base path). * @param $currentVersion String: Version number of the software - * @param $svnstat String: path to the svnstat file * @param $input String: Path to analyze. * @param $exclude String: Additionals path regex to exclude * @param $exclude_patterns String: Additionals path regex to exclude * (LocalSettings.php, AdminSettings.php, .svn and .git directories are always excluded) * @return string */ -function generateConfigFile( $doxygenTemplate, $outputDirectory, $stripFromPath, $currentVersion, $svnstat, $input, $exclude, $exclude_patterns ) { - +function generateConfigFile( $doxygenTemplate, $outputDirectory, $stripFromPath, $currentVersion, $input, $exclude, $exclude_patterns ) { global $wgDoxyGenerateMan; $template = file_get_contents( $doxygenTemplate ); @@ -165,7 +118,6 @@ '{{OUTPUT_DIRECTORY}}' = $outputDirectory, '{{STRIP_FROM_PATH}}' = $stripFromPath, '{{CURRENT_VERSION}}' = $currentVersion, - '{{SVNSTAT}}' = $svnstat, '{{INPUT}}'= $input, '{{EXCLUDE}}' = $exclude,
[MediaWiki-commits] [Gerrit] mwdocgen.php: Implement --version option. - change (mediawiki/core)
jenkins-bot has submitted this change and it was merged. Change subject: mwdocgen.php: Implement --version option. .. mwdocgen.php: Implement --version option. So that the job that runs it can pass along what it should display (e.g. branch, tag, hash etc. whatever is appropiate for the context of that run). Change-Id: I1d5b6266e49a71672b0a53069e6ea6bb4658c3d2 --- M maintenance/mwdocgen.php 1 file changed, 11 insertions(+), 5 deletions(-) Approvals: Krinkle: Looks good to me, approved jenkins-bot: Verified diff --git a/maintenance/mwdocgen.php b/maintenance/mwdocgen.php index 0d9f3ab..3c35335 100644 --- a/maintenance/mwdocgen.php +++ b/maintenance/mwdocgen.php @@ -60,6 +60,8 @@ /** where Phpdoc should output documentation */ $doxyOutput = $mwPath . 'docs' . DIRECTORY_SEPARATOR ; +$doxyVersion = 'master'; + /** MediaWiki subpaths */ $mwPathI = $mwPath . 'includes/'; $mwPathL = $mwPath . 'languages/'; @@ -159,6 +161,12 @@ $doxyOutput = realpath( $argv[$i] ); } break; + case '--version': + $i++; + if ( isset( $argv[$i] ) ) { + $doxyVersion = $argv[$i]; + } + break; case '--generate-man': $wgDoxyGenerateMan = true; break; @@ -178,8 +186,9 @@ If no command is given, you will be prompted. Other options: ---output dir Set output directory (default $doxyOutput) +--output dir Set output directory (default: $doxyOutput) --generate-man Generates man page documentation +--version Project version to display in the outut (default: $doxyVersion) --help Show this help and exit. @@ -228,14 +237,11 @@ $exclude_patterns = 'extensions'; } -// @todo FIXME to work on git -$version = 'master'; - // Generate path exclusions $excludedPaths = $mwPath . join( $mwPath, $mwExcludePaths ); print EXCLUDE: $excludedPaths\n\n; -$generatedConf = generateConfigFile( $doxygenTemplate, $doxyOutput, $mwPath, $version, $input, $excludedPaths, $exclude_patterns ); +$generatedConf = generateConfigFile( $doxygenTemplate, $doxyOutput, $mwPath, $doxyVersion, $input, $excludedPaths, $exclude_patterns ); $command = $doxygenBin . ' ' . $generatedConf; echo TEXT -- To view, visit https://gerrit.wikimedia.org/r/60833 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I1d5b6266e49a71672b0a53069e6ea6bb4658c3d2 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: REL1_19 Gerrit-Owner: Krinkle krinklem...@gmail.com Gerrit-Reviewer: Krinkle krinklem...@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] Reorganization of DataValues extension's JS resources - change (mediawiki...DataValues)
Henning Snater has submitted this change and it was merged. Change subject: Reorganization of DataValues extension's JS resources .. Reorganization of DataValues extension's JS resources - Moved dataValues.util.inherit into separate file. - Test resource definitions cleanup (proper dependencies) and moved into separate file. - DataValues Extension's QUnit tests are not longer dependent on MediaWiki (no longer using QUnit.newMwEnvironment). Change-Id: I9ba230dba1c1df572b5d6eac952ea6043c2b2a8a --- M DataValues/DataValues.mw.php R DataValues/DataValues.resources.php A DataValues/DataValues.tests.qunit.php A DataValues/resources/dataValues.util.inherit.js M DataValues/resources/dataValues.util.js D DataValues/tests/qunit/DataValues.tests.js R DataValues/tests/qunit/dataValues.DataValue.tests.js M ValueView/ValueView.tests.qunit.php 8 files changed, 200 insertions(+), 224 deletions(-) Approvals: Henning Snater: Verified; Looks good to me, approved jenkins-bot: Verified diff --git a/DataValues/DataValues.mw.php b/DataValues/DataValues.mw.php index db2197d..dc461a8 100644 --- a/DataValues/DataValues.mw.php +++ b/DataValues/DataValues.mw.php @@ -92,7 +92,7 @@ }; /** - * Hook to add QUnit test cases. + * Hook for registering QUnit test cases. * @see https://www.mediawiki.org/wiki/Manual:Hooks/ResourceLoaderTestModules * @since 0.1 * @@ -101,53 +101,16 @@ * @return boolean */ $wgHooks['ResourceLoaderTestModules'][] = function ( array $testModules, \ResourceLoader $resourceLoader ) { - $moduleTemplate = array( + // Register DataValue QUnit tests. Take the predefined test definitions and make them + // suitable for registration with MediaWiki's resource loader. + $ownModules = include( __DIR__ . '/DataValues.tests.qunit.php' ); + $ownModulesTemplate = array( 'localBasePath' = __DIR__, - 'remoteExtPath' = 'DataValues/DataValues', + 'remoteExtPath' = 'DataValues/DataValues', ); - - $testModules['qunit']['ext.dataValues.DataValues'] = $moduleTemplate + array( - 'scripts' = array( - 'tests/qunit/DataValues.tests.js', - ), - 'dependencies' = array( - 'dataValues', - ), - ); - - $testModules['qunit']['ext.dataValues.DataValue'] = $moduleTemplate + array( - 'scripts' = array( - 'tests/qunit/DataValue.tests.js', - ), - 'dependencies' = array( - 'dataValues.values', - ), - ); - - $testModules['qunit']['ext.dataValues.values'] = $moduleTemplate + array( - 'scripts' = array( - 'tests/qunit/values/BoolValue.tests.js', - 'tests/qunit/values/MonolingualTextValue.tests.js', - 'tests/qunit/values/MultilingualTextValue.tests.js', - 'tests/qunit/values/StringValue.tests.js', - 'tests/qunit/values/NumberValue.tests.js', - 'tests/qunit/values/UnknownValue.tests.js', - ), - 'dependencies' = array( - 'ext.dataValues.DataValue', - ), - ); - - $testModules['qunit']['ext.dataValues.util'] = $moduleTemplate + array( - 'scripts' = array( - 'tests/qunit/dataValues.util.inherit.tests.js', - 'tests/qunit/dataValues.util.Notifier.tests.js', - ), - 'dependencies' = array( - 'dataValues.util', - ), - ); - + foreach( $ownModules as $ownModuleName = $ownModule ) { + $testModules['qunit'][ $ownModuleName ] = $ownModule + $ownModulesTemplate; + } return true; }; @@ -172,5 +135,5 @@ // Resource Loader module registration $wgResourceModules = array_merge( $wgResourceModules, - include( __DIR__ . '/Resources.php' ) + include( __DIR__ . '/DataValues.resources.php' ) ); diff --git a/DataValues/Resources.php b/DataValues/DataValues.resources.php similarity index 93% rename from DataValues/Resources.php rename to DataValues/DataValues.resources.php index 1a4f7dc..50b4ac0 100644 --- a/DataValues/Resources.php +++ b/DataValues/DataValues.resources.php @@ -3,6 +3,9 @@ * Definition of 'DataValues' resourceloader modules. * When included this returns an array with all the modules introduced by 'DataValues' extension. * + * External dependencies: + * - jQuery 1.8 + * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or @@ -24,7 +27,7 @@ * @ingroup DataValues * * @licence GNU GPL
[MediaWiki-commits] [Gerrit] Add a field sites to the ganglia cluster configuration - change (operations/puppet)
Mark Bergsma has uploaded a new change for review. https://gerrit.wikimedia.org/r/60841 Change subject: Add a field sites to the ganglia cluster configuration .. Add a field sites to the ganglia cluster configuration As most clusters only reside in the primary data centers, this helps the aggregators to not start unnecessary aggregator instances of gmond. Change-Id: I7b927cf66979c3518f823c510d309a0aa46a2a45 --- M modules/ganglia_new/manifests/configuration.pp 1 file changed, 20 insertions(+), 10 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/41/60841/1 diff --git a/modules/ganglia_new/manifests/configuration.pp b/modules/ganglia_new/manifests/configuration.pp index adcf860..bc5e8b1 100644 --- a/modules/ganglia_new/manifests/configuration.pp +++ b/modules/ganglia_new/manifests/configuration.pp @@ -7,10 +7,12 @@ $clusters = { decommissioned = { name = Decommissioned servers, - id= 1 }, + id= 1, + sites = [pmtpa, eqiad, esams] }, lvs = { name = LVS loadbalancers, - id= 2 }, + id= 2, + sites = [pmtpa, eqiad, esams] }, search= { name = Search, id= 4 }, @@ -19,13 +21,16 @@ id= 5 }, squids_upload = { name = Upload squids, - id= 6 }, + id= 6, + sites = [pmtpa, esams] }, squids_text = { name = Text squids, - id= 7 }, + id= 7, + sites = [pmtpa, eqiad, esams] }, misc = { name = Miscellaneous, - id= 8 }, + id= 8, + sites = [pmtpa, eqiad, esams] }, appserver = { name = Application servers, id= 11 }, @@ -40,13 +45,16 @@ id= 15 }, cache_text= { name = Text caches, - id= 20 }, + id= 20, + sites = [pmtpa, eqiad, esams] }, cache_bits= { name = Bits caches, - id= 21 }, + id= 21, + sites = [pmtpa, eqiad, esams] }, cache_upload = { name = Upload caches, - id= 22 }, + id= 22, + sites = [pmtpa, eqiad, esams] }, payments = { name = Fundraiser payments, id= 23 }, @@ -58,13 +66,15 @@ id= 25 }, ssl = { name = SSL cluster, - id= 26 }, + id= 26, + sites = [pmtpa, eqiad, esams] }, swift = { name = Swift, id= 27 }, cache_mobile = { name = Mobile caches, - id= 28 }, + id= 28, + sites = [pmtpa, eqiad, esams] }, virt = { name = Virtualization cluster, id= 29 }, -- To view, visit https://gerrit.wikimedia.org/r/60841 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I7b927cf66979c3518f823c510d309a0aa46a2a45 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Mark Bergsma m...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Support aggregators responsible for multiple sites - change (operations/puppet)
Mark Bergsma has uploaded a new change for review. https://gerrit.wikimedia.org/r/60842 Change subject: Support aggregators responsible for multiple sites .. Support aggregators responsible for multiple sites Change-Id: I0ec2576b1ed9d3214d5b71566222987b065ad670 --- M manifests/site.pp M modules/ganglia_new/manifests/configuration.pp M modules/ganglia_new/manifests/monitor/aggregator.pp M modules/ganglia_new/manifests/monitor/aggregator/instance.pp 4 files changed, 33 insertions(+), 10 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/42/60842/1 diff --git a/manifests/site.pp b/manifests/site.pp index 85fde0a..9e35097 100644 --- a/manifests/site.pp +++ b/manifests/site.pp @@ -1072,7 +1072,7 @@ hosts = $storagehosts } - include ganglia_new::monitor::aggregator + class { ganglia_new::monitor::aggregator: sites = [pmtpa] } } node hooper.wikimedia.org { diff --git a/modules/ganglia_new/manifests/configuration.pp b/modules/ganglia_new/manifests/configuration.pp index bc5e8b1..8282d29 100644 --- a/modules/ganglia_new/manifests/configuration.pp +++ b/modules/ganglia_new/manifests/configuration.pp @@ -121,11 +121,21 @@ $url = http://ganglia.wikimedia.org; $gmetad_hosts = [ 208.80.152.15, 208.80.154.150 ] $base_port = 8649 + $site_port_prefix = { + pmtpa = 0, + eqiad = 1000, + esams = 3000, + } + $default_sites = [pmtpa, eqiad] } 'labs': { $url = http://ganglia.wmflabs.org; $gmetad_hosts = [ 10.4.0.79] $base_port = 8649 - } + $site_port_prefix = { + pmtpa = 0, + eqiad = 0, + } + $default_sites = [pmtpa] } } \ No newline at end of file diff --git a/modules/ganglia_new/manifests/monitor/aggregator.pp b/modules/ganglia_new/manifests/monitor/aggregator.pp index 2ba6f95..e8d64db 100644 --- a/modules/ganglia_new/manifests/monitor/aggregator.pp +++ b/modules/ganglia_new/manifests/monitor/aggregator.pp @@ -1,4 +1,4 @@ -class ganglia_new::monitor::aggregator { +class ganglia_new::monitor::aggregator($sites) { require ganglia_new::monitor::packages include ganglia_new::configuration @@ -20,9 +20,13 @@ upstart_job { ganglia-monitor-aggregator-instance: } - # Instantiate aggregators for all clusters - $cluster_list = keys($ganglia_new::configuration::clusters) - instance{ $cluster_list: } + define site_instances() { + # Instantiate aggregators for all clusters for this site ($title) + $cluster_list = suffix(keys($ganglia_new::configuration::clusters), _${title}) + instance{ $cluster_list: site = $title } + } + + site_instances{ $sites: } service { ganglia-monitor-aggregator: provider = upstart, diff --git a/modules/ganglia_new/manifests/monitor/aggregator/instance.pp b/modules/ganglia_new/manifests/monitor/aggregator/instance.pp index 4e952c8..2ee7220 100644 --- a/modules/ganglia_new/manifests/monitor/aggregator/instance.pp +++ b/modules/ganglia_new/manifests/monitor/aggregator/instance.pp @@ -1,25 +1,34 @@ -define ganglia_new::monitor::aggregator::instance() { +define ganglia_new::monitor::aggregator::instance($site) { Ganglia_new::Monitor::Aggregator::Instance[$title] - Service[ganglia-monitor-aggregator] include ganglia_new::configuration, network::constants $aggregator = true - # TODO: support multiple $site + if has_key($ganglia_new::configuration::clusters[$cluster], 'sites') { + $sites = $ganglia_new::configuration::clusters[$cluster]['sites'] + } else { + $sites = $ganglia_new::configuration::default_sites + } $cluster = $title $id = $ganglia_new::configuration::clusters[$cluster]['id'] $desc = $ganglia_new::configuration::clusters[$cluster]['name'] - $portnr = $ganglia_new::configuration::base_port + $id + $portnr = $ganglia_new::configuration::base_port + $ganglia_new::configuration::site_port_prefix[$site] + $id $gmond_port = $::realm ? { production = $portnr, labs = $::project_gid } $cname = ${desc} ${::site} + $ensure = $site in $sites ? + true = present, + default = absent + } file { /etc/ganglia/aggregators/${id}.conf: require = File[/etc/ganglia/aggregators], mode = 0444,
[MediaWiki-commits] [Gerrit] Add a field sites to the ganglia cluster configuration - change (operations/puppet)
Mark Bergsma has submitted this change and it was merged. Change subject: Add a field sites to the ganglia cluster configuration .. Add a field sites to the ganglia cluster configuration As most clusters only reside in the primary data centers, this helps the aggregators to not start unnecessary aggregator instances of gmond. Change-Id: I7b927cf66979c3518f823c510d309a0aa46a2a45 --- M modules/ganglia_new/manifests/configuration.pp 1 file changed, 20 insertions(+), 10 deletions(-) Approvals: Mark Bergsma: Verified; Looks good to me, approved diff --git a/modules/ganglia_new/manifests/configuration.pp b/modules/ganglia_new/manifests/configuration.pp index adcf860..bc5e8b1 100644 --- a/modules/ganglia_new/manifests/configuration.pp +++ b/modules/ganglia_new/manifests/configuration.pp @@ -7,10 +7,12 @@ $clusters = { decommissioned = { name = Decommissioned servers, - id= 1 }, + id= 1, + sites = [pmtpa, eqiad, esams] }, lvs = { name = LVS loadbalancers, - id= 2 }, + id= 2, + sites = [pmtpa, eqiad, esams] }, search= { name = Search, id= 4 }, @@ -19,13 +21,16 @@ id= 5 }, squids_upload = { name = Upload squids, - id= 6 }, + id= 6, + sites = [pmtpa, esams] }, squids_text = { name = Text squids, - id= 7 }, + id= 7, + sites = [pmtpa, eqiad, esams] }, misc = { name = Miscellaneous, - id= 8 }, + id= 8, + sites = [pmtpa, eqiad, esams] }, appserver = { name = Application servers, id= 11 }, @@ -40,13 +45,16 @@ id= 15 }, cache_text= { name = Text caches, - id= 20 }, + id= 20, + sites = [pmtpa, eqiad, esams] }, cache_bits= { name = Bits caches, - id= 21 }, + id= 21, + sites = [pmtpa, eqiad, esams] }, cache_upload = { name = Upload caches, - id= 22 }, + id= 22, + sites = [pmtpa, eqiad, esams] }, payments = { name = Fundraiser payments, id= 23 }, @@ -58,13 +66,15 @@ id= 25 }, ssl = { name = SSL cluster, - id= 26 }, + id= 26, + sites = [pmtpa, eqiad, esams] }, swift = { name = Swift, id= 27 }, cache_mobile = { name = Mobile caches, - id= 28 }, + id= 28, + sites = [pmtpa, eqiad, esams] }, virt = { name = Virtualization cluster, id= 29 }, -- To view, visit https://gerrit.wikimedia.org/r/60841 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I7b927cf66979c3518f823c510d309a0aa46a2a45 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Mark Bergsma m...@wikimedia.org Gerrit-Reviewer: Mark Bergsma m...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Remove globals unneeded after 47d1060 - change (mediawiki/core)
Platonides has uploaded a new change for review. https://gerrit.wikimedia.org/r/60843 Change subject: Remove globals unneeded after 47d1060 .. Remove globals unneeded after 47d1060 Change-Id: I39b6fa829e0d6ea7861b06edd8f5c599edcf4b76 --- M includes/Title.php 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/43/60843/1 diff --git a/includes/Title.php b/includes/Title.php index cf34171..b5dd6de 100644 --- a/includes/Title.php +++ b/includes/Title.php @@ -2046,7 +2046,7 @@ return $errors; } - global $wgContLang, $wgLang, $wgEmailConfirmToEdit; + global $wgEmailConfirmToEdit; if ( $wgEmailConfirmToEdit !$user-isEmailConfirmed() ) { $errors[] = array( 'confirmedittext' ); -- To view, visit https://gerrit.wikimedia.org/r/60843 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I39b6fa829e0d6ea7861b06edd8f5c599edcf4b76 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Platonides platoni...@gmail.com ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] use git show instead of git diff to find changed files - change (integration/jenkins)
Hashar has uploaded a new change for review. https://gerrit.wikimedia.org/r/60844 Change subject: use git show instead of git diff to find changed files .. use git show instead of git diff to find changed files git diff was using HEAD^ which would not exist on the initial commit. We also want to make sure we list the files introduced by a merge commit, something I am not sure diff handled fine. Change-Id: I58089552a0f192e50d5a4ff92a169c54bbe74acc --- M bin/git-changed-in-head 1 file changed, 18 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/integration/jenkins refs/changes/44/60844/1 diff --git a/bin/git-changed-in-head b/bin/git-changed-in-head index 20da6dc..d711bbb 100755 --- a/bin/git-changed-in-head +++ b/bin/git-changed-in-head @@ -27,4 +27,21 @@ for ext in $@; do PATH_ARGS+=(*.$ext) done; -git diff HEAD^..HEAD --name-only --diff-filter=ACM -- ${PATH_ARGS[@]} + +# Some explanations for the git command below: +# HEAD^ will not exist for an initial commit, we thus need `git show` +# --name-only : strip the patch payload, only report the file being altered +# --diff-filter=ACM : only care about files Added, Copied or Modified +# -m : show differences for merge commits ... +# --first-parent : ... but only follow the first parent commit +# --format=format: : strip out the commit summary +# +# Then we pass the wildcard generated above +# And finally we need to strip out the empty line generated by format: +git show HEAD \ + --name-only \ + --diff-filter=ACM \ + -m \ + --first-parent \ + --format=format: \ + -- ${PATH_ARGS[@]} | egrep -v '^$' -- To view, visit https://gerrit.wikimedia.org/r/60844 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I58089552a0f192e50d5a4ff92a169c54bbe74acc Gerrit-PatchSet: 1 Gerrit-Project: integration/jenkins Gerrit-Branch: master Gerrit-Owner: Hashar has...@free.fr ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] use git show instead of git diff to find changed files - change (integration/jenkins)
Hashar has submitted this change and it was merged. Change subject: use git show instead of git diff to find changed files .. use git show instead of git diff to find changed files git diff was using HEAD^ which would not exist on the initial commit. We also want to make sure we list the files introduced by a merge commit, something I am not sure diff handled fine. Change-Id: I58089552a0f192e50d5a4ff92a169c54bbe74acc --- M bin/git-changed-in-head 1 file changed, 18 insertions(+), 1 deletion(-) Approvals: Hashar: Verified; Looks good to me, approved diff --git a/bin/git-changed-in-head b/bin/git-changed-in-head index 20da6dc..d711bbb 100755 --- a/bin/git-changed-in-head +++ b/bin/git-changed-in-head @@ -27,4 +27,21 @@ for ext in $@; do PATH_ARGS+=(*.$ext) done; -git diff HEAD^..HEAD --name-only --diff-filter=ACM -- ${PATH_ARGS[@]} + +# Some explanations for the git command below: +# HEAD^ will not exist for an initial commit, we thus need `git show` +# --name-only : strip the patch payload, only report the file being altered +# --diff-filter=ACM : only care about files Added, Copied or Modified +# -m : show differences for merge commits ... +# --first-parent : ... but only follow the first parent commit +# --format=format: : strip out the commit summary +# +# Then we pass the wildcard generated above +# And finally we need to strip out the empty line generated by format: +git show HEAD \ + --name-only \ + --diff-filter=ACM \ + -m \ + --first-parent \ + --format=format: \ + -- ${PATH_ARGS[@]} | egrep -v '^$' -- To view, visit https://gerrit.wikimedia.org/r/60844 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I58089552a0f192e50d5a4ff92a169c54bbe74acc Gerrit-PatchSet: 1 Gerrit-Project: integration/jenkins Gerrit-Branch: master Gerrit-Owner: Hashar has...@free.fr Gerrit-Reviewer: Hashar has...@free.fr ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Resolve ganglia resource conflicts on manutius - change (operations/puppet)
Mark Bergsma has uploaded a new change for review. https://gerrit.wikimedia.org/r/60845 Change subject: Resolve ganglia resource conflicts on manutius .. Resolve ganglia resource conflicts on manutius Change-Id: Ie2f219b19a1e3fdbac93258ae23d2e4035bbd3b9 --- M manifests/site.pp 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/45/60845/1 diff --git a/manifests/site.pp b/manifests/site.pp index 85fde0a..0fec1dd 100644 --- a/manifests/site.pp +++ b/manifests/site.pp @@ -55,7 +55,7 @@ exim::simple-mail-sender # FIXME: remove after the ganglia module migration - if $::site == pmtpa and $cluster in [cache_bits] { + if $::hostname == manutius or ($::site == pmtpa and $cluster in [cache_bits]) { class { ganglia_new::monitor: cluster = $cluster } } else { include ganglia -- To view, visit https://gerrit.wikimedia.org/r/60845 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ie2f219b19a1e3fdbac93258ae23d2e4035bbd3b9 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Mark Bergsma m...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Resolve ganglia resource conflicts on manutius - change (operations/puppet)
Mark Bergsma has submitted this change and it was merged. Change subject: Resolve ganglia resource conflicts on manutius .. Resolve ganglia resource conflicts on manutius Change-Id: Ie2f219b19a1e3fdbac93258ae23d2e4035bbd3b9 --- M manifests/site.pp 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Mark Bergsma: Verified; Looks good to me, approved diff --git a/manifests/site.pp b/manifests/site.pp index 85fde0a..0fec1dd 100644 --- a/manifests/site.pp +++ b/manifests/site.pp @@ -55,7 +55,7 @@ exim::simple-mail-sender # FIXME: remove after the ganglia module migration - if $::site == pmtpa and $cluster in [cache_bits] { + if $::hostname == manutius or ($::site == pmtpa and $cluster in [cache_bits]) { class { ganglia_new::monitor: cluster = $cluster } } else { include ganglia -- To view, visit https://gerrit.wikimedia.org/r/60845 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ie2f219b19a1e3fdbac93258ae23d2e4035bbd3b9 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Mark Bergsma m...@wikimedia.org Gerrit-Reviewer: Mark Bergsma m...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Support aggregators responsible for multiple sites - change (operations/puppet)
Mark Bergsma has submitted this change and it was merged. Change subject: Support aggregators responsible for multiple sites .. Support aggregators responsible for multiple sites Change-Id: I0ec2576b1ed9d3214d5b71566222987b065ad670 --- M manifests/site.pp M modules/ganglia_new/manifests/configuration.pp M modules/ganglia_new/manifests/monitor/aggregator.pp M modules/ganglia_new/manifests/monitor/aggregator/instance.pp 4 files changed, 33 insertions(+), 9 deletions(-) Approvals: Mark Bergsma: Looks good to me, approved jenkins-bot: Verified diff --git a/manifests/site.pp b/manifests/site.pp index 0fec1dd..4e4b070 100644 --- a/manifests/site.pp +++ b/manifests/site.pp @@ -1072,7 +1072,7 @@ hosts = $storagehosts } - include ganglia_new::monitor::aggregator + class { ganglia_new::monitor::aggregator: sites = [pmtpa] } } node hooper.wikimedia.org { diff --git a/modules/ganglia_new/manifests/configuration.pp b/modules/ganglia_new/manifests/configuration.pp index bc5e8b1..4fd18e4 100644 --- a/modules/ganglia_new/manifests/configuration.pp +++ b/modules/ganglia_new/manifests/configuration.pp @@ -121,11 +121,22 @@ $url = http://ganglia.wikimedia.org; $gmetad_hosts = [ 208.80.152.15, 208.80.154.150 ] $base_port = 8649 + $site_port_prefix = { + pmtpa = 0, + eqiad = 1000, + esams = 3000, + } + $default_sites = [pmtpa, eqiad] } 'labs': { $url = http://ganglia.wmflabs.org; $gmetad_hosts = [ 10.4.0.79] $base_port = 8649 + $site_port_prefix = { + pmtpa = 0, + eqiad = 0, + } + $default_sites = [pmtpa] } } } \ No newline at end of file diff --git a/modules/ganglia_new/manifests/monitor/aggregator.pp b/modules/ganglia_new/manifests/monitor/aggregator.pp index 2ba6f95..e8d64db 100644 --- a/modules/ganglia_new/manifests/monitor/aggregator.pp +++ b/modules/ganglia_new/manifests/monitor/aggregator.pp @@ -1,4 +1,4 @@ -class ganglia_new::monitor::aggregator { +class ganglia_new::monitor::aggregator($sites) { require ganglia_new::monitor::packages include ganglia_new::configuration @@ -20,9 +20,13 @@ upstart_job { ganglia-monitor-aggregator-instance: } - # Instantiate aggregators for all clusters - $cluster_list = keys($ganglia_new::configuration::clusters) - instance{ $cluster_list: } + define site_instances() { + # Instantiate aggregators for all clusters for this site ($title) + $cluster_list = suffix(keys($ganglia_new::configuration::clusters), _${title}) + instance{ $cluster_list: site = $title } + } + + site_instances{ $sites: } service { ganglia-monitor-aggregator: provider = upstart, diff --git a/modules/ganglia_new/manifests/monitor/aggregator/instance.pp b/modules/ganglia_new/manifests/monitor/aggregator/instance.pp index 4e952c8..b0cf918 100644 --- a/modules/ganglia_new/manifests/monitor/aggregator/instance.pp +++ b/modules/ganglia_new/manifests/monitor/aggregator/instance.pp @@ -1,25 +1,34 @@ -define ganglia_new::monitor::aggregator::instance() { +define ganglia_new::monitor::aggregator::instance($site) { Ganglia_new::Monitor::Aggregator::Instance[$title] - Service[ganglia-monitor-aggregator] include ganglia_new::configuration, network::constants $aggregator = true - # TODO: support multiple $site + if has_key($ganglia_new::configuration::clusters[$cluster], 'sites') { + $sites = $ganglia_new::configuration::clusters[$cluster]['sites'] + } else { + $sites = $ganglia_new::configuration::default_sites + } $cluster = $title $id = $ganglia_new::configuration::clusters[$cluster]['id'] $desc = $ganglia_new::configuration::clusters[$cluster]['name'] - $portnr = $ganglia_new::configuration::base_port + $id + $portnr = $ganglia_new::configuration::base_port + $ganglia_new::configuration::site_port_prefix[$site] + $id $gmond_port = $::realm ? { production = $portnr, labs = $::project_gid } $cname = ${desc} ${::site} + $ensure = $site in $sites ? { + true = present, + default = absent + } file { /etc/ganglia/aggregators/${id}.conf: require = File[/etc/ganglia/aggregators], mode = 0444, content =
[MediaWiki-commits] [Gerrit] Add second key for myself - change (operations/puppet)
Demon has uploaded a new change for review. https://gerrit.wikimedia.org/r/60846 Change subject: Add second key for myself .. Add second key for myself Change-Id: I2f84b105522b5bf873542dd36a026a04f8e32dbb --- M manifests/admins.pp 1 file changed, 7 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/46/60846/1 diff --git a/manifests/admins.pp b/manifests/admins.pp index 9fa2856..bf9d3f8 100644 --- a/manifests/admins.pp +++ b/manifests/admins.pp @@ -1525,6 +1525,13 @@ user= $username, type= ssh-rsa, key = B3NzaC1yc2EDAQABAAABAQD74a9VKRGqzCmiWZZUkZoy1XnPgd9nlFTsPrBn8Nnf9mMBbzEArMupuolHOSFhczk5lC9y7KSRKiWJ6sypvVjfGZypr98SA1SEe5AxvBN+8DbWEpxxwbOGCMhHo+GPVucILa5cjzZn2iKlCli39oMa0Dxwzd7v+SuswNtfqjp47RlrJoG5hTZMYcbICjEVGNDvSxSXBX2E17Kxdw3CiPnvZun+twTRYEuTo0GshGjO/2fQaTnyYHfPKOyFYC8HDsaaSaOWzXPXb7ey8s4lY+vEt5Imj5OqHhNOuG+thH/5dxuSv6Jkfi1Ygl2t3j1aYdo5g/0IRQ1lIqhRQuFqxe7j; + chad@ubuntu-desktop: + ensure = present, + user= $username, + type= ssh-rsa, + key = B3NzaC1yc2EDAQABAAABAQDptp6lYbp9jlCe/wjp2gHH9i6BcL5pgrEUnjz3f+q8Scfm4Tzs7wTSsaAsfYmdYcI8ERJW2ZYU3BRiPqPIyCmOF7WaUMSM0qTf+NoZpfFb+hV0J9CNfdjwNCQGbsZyq39i9u8hCmZg9+fg+eSZ5q3ceH9MJCckx571YtFJs+F6DioCUlad5uGg+2sPE36cbJtQOmmC+Oys+E9go/vJ72mrxEaPoBUP9Z1p8c5GhJ5TjoSqg+bYUsnV0d9yZPTrcyWeeCWeumeQe5YKtG9Z0EJ86axQgKp7nIBAL3EovTTaPTBSMusfjvftCjkIocbS7eLt+6LqgOyxtUWco5oKCtQn; + + } } } -- To view, visit https://gerrit.wikimedia.org/r/60846 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I2f84b105522b5bf873542dd36a026a04f8e32dbb Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Demon ch...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] JSHint cleanups: forward declarations, disambiguate variables. - change (mediawiki...Parsoid)
Cscott has uploaded a new change for review. https://gerrit.wikimedia.org/r/60847 Change subject: JSHint cleanups: forward declarations, disambiguate variables. .. JSHint cleanups: forward declarations, disambiguate variables. Rearrange code where it's possible to ensure functions appear before uses. In other places, add an explicit forward declaration. This isn't strictly necessary, but it technically ensures that behavior is the same across JavaScript implementations (the spec allows different initialization behavior) and it shuts jshint up. Seems easy enough to make jshint happy. One case where two variables named 'tsr0' appear in the same scope; renamed them slightly to avoid the conflict. (This lets jshint catch if I missed a renaming; if I'd just moved the declaration to the top of the method it would be possible to hide a scope error.) Change-Id: I35699cdd5cee02883a9f35fc5de3954080e72e0c --- M js/lib/ext.core.LinkHandler.js M js/lib/ext.core.PreHandler.js M js/lib/mediawiki.DOMPostProcessor.js M js/lib/mediawiki.Title.js M js/lib/mediawiki.TokenTransformManager.js M js/lib/mediawiki.parser.defines.js M js/lib/mediawiki.parser.js 7 files changed, 61 insertions(+), 48 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Parsoid refs/changes/47/60847/1 diff --git a/js/lib/ext.core.LinkHandler.js b/js/lib/ext.core.LinkHandler.js index 7eb2666..1458981 100644 --- a/js/lib/ext.core.LinkHandler.js +++ b/js/lib/ext.core.LinkHandler.js @@ -858,9 +858,9 @@ // // targetOff covers all spaces before content // and we need src without those spaces. - var tsr0 = dataAttribs.tsr[0] + 1, - tsr1 = dataAttribs.targetOff - (token.getAttribute('spaces') || '').length; - aStart.addNormalizedAttribute( 'href', href, env.page.src.substring(tsr0, tsr1) ); + var tsr0a = dataAttribs.tsr[0] + 1, + tsr1a = dataAttribs.targetOff - (token.getAttribute('spaces') || '').length; + aStart.addNormalizedAttribute( 'href', href, env.page.src.substring(tsr0a, tsr1a) ); } cb( { tokens: [aStart].concat(content, [new EndTagTk('a')]) @@ -877,11 +877,11 @@ var da = token.dataAttribs, // targetOff covers all spaces before content // and we need src without those spaces. - tsr0 = da.tsr[0] + 1, - tsr1 = da.targetOff - spaces.length, + tsr0b = da.tsr[0] + 1, + tsr1b = da.targetOff - spaces.length, span = new TagTk('span', [new KV('typeof', 'mw:Placeholder')], { - tsr: [tsr0, tsr1], - src: env.page.src.substring(tsr0, tsr1) + tsr: [tsr0b, tsr1b], + src: env.page.src.substring(tsr0b, tsr1b) } ); tokens.push(span); diff --git a/js/lib/ext.core.PreHandler.js b/js/lib/ext.core.PreHandler.js index 1c4a194..ee66131 100644 --- a/js/lib/ext.core.PreHandler.js +++ b/js/lib/ext.core.PreHandler.js @@ -79,6 +79,8 @@ SelfclosingTagTk = defines.SelfclosingTagTk, EndTagTk = defines.EndTagTk; +var init; // forward declaration. + // Constructor function PreHandler( manager, options ) { this.manager = manager; @@ -118,7 +120,7 @@ 5: 'ignore ' }; -function init(handler, addAnyHandler) { +init = function(handler, addAnyHandler) { handler.state = PreHandler.STATE_SOL; handler.lastNlTk = null; // Initialize to zero to deal with indent-pre @@ -133,7 +135,7 @@ handler.manager.addTransform(handler.onAny.bind(handler), PreHandler:onAny, handler.anyRank, 'any'); } -} +}; PreHandler.prototype.moveToIgnoreState = function() { this.state = PreHandler.STATE_IGNORE; diff --git a/js/lib/mediawiki.DOMPostProcessor.js b/js/lib/mediawiki.DOMPostProcessor.js index 6bb1aa5..75a5e5c 100644 --- a/js/lib/mediawiki.DOMPostProcessor.js +++ b/js/lib/mediawiki.DOMPostProcessor.js @@ -2174,6 +2174,8 @@ return [cs, e]; } +var saveDataParsoid; // forward declaration + function dumpDomWithDataAttribs( root ) { function cloneData(node, clone) { var d = node.data; @@ -2287,6 +2289,8 @@ } } +var findAndHandleNeighbour; // forward declaration + /** * Function for fetching the link prefix based on a link node. * @@ -2330,7 +2334,7 @@ /** * Abstraction of both
[MediaWiki-commits] [Gerrit] Remove unused variables. - change (mediawiki...Parsoid)
Cscott has uploaded a new change for review. https://gerrit.wikimedia.org/r/60848 Change subject: Remove unused variables. .. Remove unused variables. 'jshint --show-non-errors' shows unused variables. Some of these are unused function arguments, which are rarely bugs. But try to fix the ones which are forgotten/dead code and unnecessary require()s. Change-Id: I685ccd8e388fd3acf75053a07e2f729398fa2855 --- M js/api/ParserService.js M js/lib/ext.Cite.js M js/lib/ext.core.AttributeExpander.js M js/lib/ext.core.BehaviorSwitchHandler.js M js/lib/ext.core.ExtensionHandler.js M js/lib/ext.core.LinkHandler.js M js/lib/ext.core.ListHandler.js M js/lib/ext.core.NoIncludeOnly.js M js/lib/ext.core.ParagraphWrapper.js M js/lib/ext.core.ParserFunctions.js M js/lib/ext.core.PreHandler.js M js/lib/ext.core.QuoteTransformer.js M js/lib/ext.core.Sanitizer.js M js/lib/ext.core.TemplateHandler.js M js/lib/ext.core.TokenStreamPatcher.js M js/lib/ext.util.TokenCollector.js M js/lib/fakejquery.js M js/lib/mediawiki.ApiRequest.js M js/lib/mediawiki.DOMDiff.js M js/lib/mediawiki.DOMPostProcessor.js M js/lib/mediawiki.HTML5TreeBuilder.node.js M js/lib/mediawiki.SelectiveSerializer.js M js/lib/mediawiki.TokenTransformManager.js M js/lib/mediawiki.Util.js M js/lib/mediawiki.WikiConfig.js M js/lib/mediawiki.WikitextSerializer.js M js/lib/mediawiki.parser.environment.js M js/lib/mediawiki.parser.js M js/lib/mediawiki.tokenizer.peg.js M js/tests/dumpReader.js M js/tests/mockAPI.js M js/tests/parse.js M js/tests/parserTests.js M js/tests/roundtrip-test.js M js/tests/server/server.js 35 files changed, 48 insertions(+), 171 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Parsoid refs/changes/48/60848/1 diff --git a/js/api/ParserService.js b/js/api/ParserService.js index 1b75ff7..8ed1902 100644 --- a/js/api/ParserService.js +++ b/js/api/ParserService.js @@ -17,19 +17,11 @@ * @private */ -/** - * Configuration object. - * @property - */ -var config = {}; - // global includes var express = require('express'), jsDiff = require('diff'), childProc = require('child_process'), spawn = childProc.spawn, - fork = childProc.fork, - path = require('path'), cluster = require('cluster'), fs = require('fs'); @@ -60,9 +52,6 @@ SelectiveSerializer = require( mp + 'mediawiki.SelectiveSerializer.js' ).SelectiveSerializer, Util = require( mp + 'mediawiki.Util.js' ).Util, libtr = require(mp + 'mediawiki.ApiRequest.js'), - DoesNotExistError = libtr.DoesNotExistError, - ParserError = libtr.ParserError, - WikiConfig = require( mp + 'mediawiki.WikiConfig' ).WikiConfig, ParsoidConfig = require( mp + 'mediawiki.ParsoidConfig' ).ParsoidConfig, MWParserEnvironment = require( mp + 'mediawiki.parser.environment.js' ).MWParserEnvironment, TemplateRequest = libtr.TemplateRequest; diff --git a/js/lib/ext.Cite.js b/js/lib/ext.Cite.js index 174cf41..d766587 100644 --- a/js/lib/ext.Cite.js +++ b/js/lib/ext.Cite.js @@ -9,9 +9,7 @@ $ = require( './fakejquery' ); // define some constructor shortcuts varKV = defines.KV, - TagTk = defines.TagTk, - SelfclosingTagTk = defines.SelfclosingTagTk, - EndTagTk = defines.EndTagTk; +SelfclosingTagTk = defines.SelfclosingTagTk; // FIXME: Move out to some common helper file? // Helper function to process extension source @@ -234,8 +232,6 @@ */ References.prototype.handleReferences = function ( manager, pipelineOpts, refsTok, cb ) { refsTok = refsTok.clone(); - - var cite = this.cite; // group is the only recognized option? var refsOpts = Util.KVtoHash(refsTok.getAttribute(options)), diff --git a/js/lib/ext.core.AttributeExpander.js b/js/lib/ext.core.AttributeExpander.js index 15ade81..e458bfd 100644 --- a/js/lib/ext.core.AttributeExpander.js +++ b/js/lib/ext.core.AttributeExpander.js @@ -3,19 +3,14 @@ */ use strict; -var request = require('request'), - events = require('events'), - qs = require('querystring'), - Util = require('./mediawiki.Util.js').Util, - ParserFunctions = require('./ext.core.ParserFunctions.js').ParserFunctions, +var Util = require('./mediawiki.Util.js').Util, AttributeTransformManager = require('./mediawiki.TokenTransformManager.js'). AttributeTransformManager, defines = require('./mediawiki.parser.defines.js'); // define some constructor shortcuts var KV = defines.KV, TagTk = defines.TagTk, -SelfclosingTagTk = defines.SelfclosingTagTk, -EndTagTk = defines.EndTagTk; +SelfclosingTagTk = defines.SelfclosingTagTk; /* -- * This helper method does two different things: diff --git a/js/lib/ext.core.BehaviorSwitchHandler.js
[MediaWiki-commits] [Gerrit] Fix jshint warnings in ext.cite.taghook. Is this module use... - change (mediawiki...Parsoid)
Cscott has uploaded a new change for review. https://gerrit.wikimedia.org/r/60849 Change subject: Fix jshint warnings in ext.cite.taghook. Is this module used anywhere? .. Fix jshint warnings in ext.cite.taghook. Is this module used anywhere? Change-Id: I8e8db9de6befbf340bd7d7366bc2e63f6d6ebe10 --- M js/lib/ext.cite.taghook.ref.js 1 file changed, 4 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Parsoid refs/changes/49/60849/1 diff --git a/js/lib/ext.cite.taghook.ref.js b/js/lib/ext.cite.taghook.ref.js index c359597..d82023e 100644 --- a/js/lib/ext.cite.taghook.ref.js +++ b/js/lib/ext.cite.taghook.ref.js @@ -9,8 +9,9 @@ * * Pretty neat huh! */ +// XXX CSA: is this module used anywhere? -MWRefTagHook = function( env ) { +var MWRefTagHook = function( env ) { if (!('cite' in env)) { env.cite = { refGroups: {} @@ -95,7 +96,7 @@ }; }; -MWReferencesTagHook = function( env ) { +var MWReferencesTagHook = function( env ) { if (!('cite' in env)) { env.cite = { refGroups: {} @@ -166,4 +167,5 @@ if (typeof module === object) { module.exports.MWRefTagHook = MWRefTagHook; + module.exports.MWReferencesTagHook = MWReferencesTagHook; } -- To view, visit https://gerrit.wikimedia.org/r/60849 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I8e8db9de6befbf340bd7d7366bc2e63f6d6ebe10 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Parsoid Gerrit-Branch: master Gerrit-Owner: Cscott wikime...@cscott.net ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] WIP: questions about hrefRE. - change (mediawiki...Parsoid)
Cscott has uploaded a new change for review. https://gerrit.wikimedia.org/r/60850 Change subject: WIP: questions about hrefRE. .. WIP: questions about hrefRE. Change-Id: Ic2888b25431affc8f69fdb696b71aeabd653a90c --- M js/lib/ext.core.Sanitizer.js 1 file changed, 2 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Parsoid refs/changes/50/60850/1 diff --git a/js/lib/ext.core.Sanitizer.js b/js/lib/ext.core.Sanitizer.js index 98c7827..ed2c3b9 100644 --- a/js/lib/ext.core.Sanitizer.js +++ b/js/lib/ext.core.Sanitizer.js @@ -614,6 +614,7 @@ proto = bits[1]; host = bits[2]; path = bits[3]; + // XXX this.hrefRE is used here (but never defined?) if ( ! proto.match(this.hrefRE)) { // invalid proto, disallow URL return null; @@ -884,6 +885,7 @@ var html5Mode = this.constants.globalConfig.html5Mode; var xmlnsRE = this.constants.XMLNS_ATTRIBUTE_RE; var evilUriRE = this.constants.EVIL_URI_RE; +// XXX should be this.hrefRE? It is unused. var hrefRE= this.constants.validProtocolsRE; var wlist = this.getAttrWhiteList(tag); -- To view, visit https://gerrit.wikimedia.org/r/60850 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ic2888b25431affc8f69fdb696b71aeabd653a90c Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Parsoid Gerrit-Branch: master Gerrit-Owner: Cscott wikime...@cscott.net ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] contint: 100% passing puppet-lint - change (operations/puppet)
Hashar has uploaded a new change for review. https://gerrit.wikimedia.org/r/60851 Change subject: contint: 100% passing puppet-lint .. contint: 100% passing puppet-lint I have added a few dummy class comments to make puppet-lint happy: BEFORE: $ cd modules/contint/ $ puppet-lint --with-filename . ./manifests/packages.pp - WARNING: class not documented on line 1 ./manifests/testswarm.pp - WARNING: class not documented on line 1 ./manifests/tmpfs.pp - WARNING: class not documented on line 1 $ AFTER: $ cd modules/contint/ $ puppet-lint --with-filename . $ \O/ Change-Id: I2de54b7badc9314008f2130ff3109efcd49b --- M modules/contint/manifests/packages.pp M modules/contint/manifests/testswarm.pp M modules/contint/manifests/tmpfs.pp 3 files changed, 13 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/51/60851/1 diff --git a/modules/contint/manifests/packages.pp b/modules/contint/manifests/packages.pp index daad6e9..3bdae07 100644 --- a/modules/contint/manifests/packages.pp +++ b/modules/contint/manifests/packages.pp @@ -1,3 +1,8 @@ +# +# Holds all the packages needed for continuous integration. +# +# FIXME: split this! +# class contint::packages { # Make sure we use ant version 1.8 or we will have a conflict diff --git a/modules/contint/manifests/testswarm.pp b/modules/contint/manifests/testswarm.pp index 8b94cde..1e007c5 100644 --- a/modules/contint/manifests/testswarm.pp +++ b/modules/contint/manifests/testswarm.pp @@ -1,3 +1,9 @@ +# Dummy class to keep the testswarm user on the contint box. +# +# Although we are not using testswarm as of April 2013, we might use it again. +# +# Upstream: https://github.com/jquery/testswarm +# class contint::testswarm { # Create a user to run the cronjob with diff --git a/modules/contint/manifests/tmpfs.pp b/modules/contint/manifests/tmpfs.pp index 3311ec1..b1fbde4 100644 --- a/modules/contint/manifests/tmpfs.pp +++ b/modules/contint/manifests/tmpfs.pp @@ -1,3 +1,5 @@ +# Wikimedia uses a small tmpfs disk to help soften I/O on the contint server. +# A typical use cases are the MediaWiki sqlite files class contint::tmpfs { include jenkins::user -- To view, visit https://gerrit.wikimedia.org/r/60851 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I2de54b7badc9314008f2130ff3109efcd49b Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Hashar has...@free.fr ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Allow equal chars in wikilink targets - change (mediawiki...Parsoid)
GWicke has uploaded a new change for review. https://gerrit.wikimedia.org/r/60852 Change subject: Allow equal chars in wikilink targets .. Allow equal chars in wikilink targets This fixes link parsing and -roundtripping on [[ja:岩波版聖書]]. Simple test case: [[Special:Booksources/isbn=4-00-026157-6]] Change-Id: I6b87013fccec2ff1d524f853684f5f4c1d8d5a17 --- M js/lib/pegTokenizer.pegjs.txt 1 file changed, 2 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Parsoid refs/changes/52/60852/1 diff --git a/js/lib/pegTokenizer.pegjs.txt b/js/lib/pegTokenizer.pegjs.txt index c9bd101..5b297d6 100644 --- a/js/lib/pegTokenizer.pegjs.txt +++ b/js/lib/pegTokenizer.pegjs.txt @@ -2350,7 +2350,8 @@ wikilink_preprocessor_text = r:( t:[^~[{\n\r\t|!\]}{ =]+ { return t.join(''); } -/ !inline_breaks ( directive / !]] ( text_char / [!] ) ) +// XXX gwicke: any more chars we need to allow here? +/ !inline_breaks ( directive / !]] ( text_char / [!=] ) ) )+ { return flatten_stringlist ( r ); } -- To view, visit https://gerrit.wikimedia.org/r/60852 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I6b87013fccec2ff1d524f853684f5f4c1d8d5a17 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Parsoid Gerrit-Branch: master Gerrit-Owner: GWicke gwi...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Remove globals unneeded after 47d1060 - change (mediawiki/core)
jenkins-bot has submitted this change and it was merged. Change subject: Remove globals unneeded after 47d1060 .. Remove globals unneeded after 47d1060 Change-Id: I39b6fa829e0d6ea7861b06edd8f5c599edcf4b76 --- M includes/Title.php 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: IAlex: Looks good to me, approved jenkins-bot: Verified diff --git a/includes/Title.php b/includes/Title.php index cf34171..b5dd6de 100644 --- a/includes/Title.php +++ b/includes/Title.php @@ -2046,7 +2046,7 @@ return $errors; } - global $wgContLang, $wgLang, $wgEmailConfirmToEdit; + global $wgEmailConfirmToEdit; if ( $wgEmailConfirmToEdit !$user-isEmailConfirmed() ) { $errors[] = array( 'confirmedittext' ); -- To view, visit https://gerrit.wikimedia.org/r/60843 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I39b6fa829e0d6ea7861b06edd8f5c599edcf4b76 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Platonides platoni...@gmail.com Gerrit-Reviewer: IAlex coderev...@emsenhuber.ch Gerrit-Reviewer: PleaseStand pleasest...@live.com Gerrit-Reviewer: Reedy re...@wikimedia.org Gerrit-Reviewer: Tim Starling tstarl...@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 missing parser function suffix() from puppet stdlib 4.x - change (operations/puppet)
Mark Bergsma has uploaded a new change for review. https://gerrit.wikimedia.org/r/60853 Change subject: Add missing parser function suffix() from puppet stdlib 4.x .. Add missing parser function suffix() from puppet stdlib 4.x Change-Id: Ieecd2f75e2d5b76b081934a0107a53bb623fa29a --- A modules/ganglia_new/lib/puppet/parser/functions/suffix.rb 1 file changed, 45 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/53/60853/1 diff --git a/modules/ganglia_new/lib/puppet/parser/functions/suffix.rb b/modules/ganglia_new/lib/puppet/parser/functions/suffix.rb new file mode 100644 index 000..f7792d6 --- /dev/null +++ b/modules/ganglia_new/lib/puppet/parser/functions/suffix.rb @@ -0,0 +1,45 @@ +# +# suffix.rb +# + +module Puppet::Parser::Functions + newfunction(:suffix, :type = :rvalue, :doc = -EOS +This function applies a suffix to all elements in an array. + +*Examples:* + +suffix(['a','b','c'], 'p') + +Will return: ['ap','bp','cp'] +EOS + ) do |arguments| + +# Technically we support two arguments but only first is mandatory ... +raise(Puppet::ParseError, suffix(): Wrong number of arguments + + given (#{arguments.size} for 1)) if arguments.size 1 + +array = arguments[0] + +unless array.is_a?(Array) + raise Puppet::ParseError, suffix(): expected first argument to be an Array, got #{array.inspect} +end + +suffix = arguments[1] if arguments[1] + +if suffix + unless suffix.is_a? String +raise Puppet::ParseError, suffix(): expected second argument to be a String, got #{suffix.inspect} + end +end + +# Turn everything into string same as join would do ... +result = array.collect do |i| + i = i.to_s + suffix ? i + suffix : i +end + +return result + end +end + +# vim: set ts=2 sw=2 et : -- To view, visit https://gerrit.wikimedia.org/r/60853 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ieecd2f75e2d5b76b081934a0107a53bb623fa29a Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Mark Bergsma m...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Add missing parser function suffix() from puppet stdlib 4.x - change (operations/puppet)
Mark Bergsma has submitted this change and it was merged. Change subject: Add missing parser function suffix() from puppet stdlib 4.x .. Add missing parser function suffix() from puppet stdlib 4.x Change-Id: Ieecd2f75e2d5b76b081934a0107a53bb623fa29a --- A modules/ganglia_new/lib/puppet/parser/functions/suffix.rb 1 file changed, 45 insertions(+), 0 deletions(-) Approvals: Mark Bergsma: Looks good to me, approved jenkins-bot: Verified diff --git a/modules/ganglia_new/lib/puppet/parser/functions/suffix.rb b/modules/ganglia_new/lib/puppet/parser/functions/suffix.rb new file mode 100644 index 000..f7792d6 --- /dev/null +++ b/modules/ganglia_new/lib/puppet/parser/functions/suffix.rb @@ -0,0 +1,45 @@ +# +# suffix.rb +# + +module Puppet::Parser::Functions + newfunction(:suffix, :type = :rvalue, :doc = -EOS +This function applies a suffix to all elements in an array. + +*Examples:* + +suffix(['a','b','c'], 'p') + +Will return: ['ap','bp','cp'] +EOS + ) do |arguments| + +# Technically we support two arguments but only first is mandatory ... +raise(Puppet::ParseError, suffix(): Wrong number of arguments + + given (#{arguments.size} for 1)) if arguments.size 1 + +array = arguments[0] + +unless array.is_a?(Array) + raise Puppet::ParseError, suffix(): expected first argument to be an Array, got #{array.inspect} +end + +suffix = arguments[1] if arguments[1] + +if suffix + unless suffix.is_a? String +raise Puppet::ParseError, suffix(): expected second argument to be a String, got #{suffix.inspect} + end +end + +# Turn everything into string same as join would do ... +result = array.collect do |i| + i = i.to_s + suffix ? i + suffix : i +end + +return result + end +end + +# vim: set ts=2 sw=2 et : -- To view, visit https://gerrit.wikimedia.org/r/60853 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ieecd2f75e2d5b76b081934a0107a53bb623fa29a Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Mark Bergsma m...@wikimedia.org Gerrit-Reviewer: Mark Bergsma m...@wikimedia.org Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits