Last modified: 2011-04-14 15:11:08 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T26279, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 24279 - CodeReview's parsers suck
CodeReview's parsers suck
Status: NEW
Product: MediaWiki extensions
Classification: Unclassified
CodeReview (Other open bugs)
unspecified
All All
: Low normal (vote)
: ---
Assigned To: Nobody - You can work on this!
: tracking
Depends on: 18614 19299 24541 23203 26045
Blocks: tracking
  Show dependency treegraph
 
Reported: 2010-07-06 04:00 UTC by MZMcBride
Modified: 2011-04-14 15:11 UTC (History)
3 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description MZMcBride 2010-07-06 04:00:10 UTC
Both the parsers for commit messages and the code comments are broken in odd ways.

http://www.mediawiki.org/wiki/Special:Code/MediaWiki/16967#code-comments is a fairly good example of two issues.

This query...

mysql> select cc_text from code_comment where cc_rev_id = 16967\G
*************************** 1. row ***************************
cc_text: The line "if($vCode==$wgContLang->getCode()) continue; // we don't want default variant" doesn't work correctly on zhwiki (and other wikis with $wgLanguageCode = 'zh'), where the language code 'zh' is also used as a variant name (which means 'no conversion'; technically it's a variant). Omitting zh variant causes /zh/Page_Name urls (when $wgArticlePath = '/$2/$1') not to be purged.
*************************** 2. row ***************************
cc_text: Filed to bugzilla as [[bugzilla:24027|bug 24027]].
*************************** 3. row ***************************
cc_text: <nowiki>bug 24027</nowiki> will link to bugzilla :)
3 rows in set (0.02 sec)

... shows the raw text. The parser doesn't listen to <nowiki> and it doesn't properly expand interwiki links like "bugzilla:".

http://www.mediawiki.org/wiki/Special:Code/MediaWiki/67090 demonstrates a problem with the commit message parser. The raw text is "The reason for this change is given in <http://lists.wikimedia.org/pipermail/wikitech-l/2010-April/047617.html>." However the trailing ">" is turned into &gt; inexplicably.

Some parser tests (or a change in the overall implementation of CodeReview's message parsing) would be good.
Comment 1 Liangent 2010-07-06 04:37:13 UTC
I guess the Code Review parser is not really parsing something. It simply replaces every "bug 12345" with "[https://bugzilla.wikimedia.org/show_bug.cgi?id=12345 bug 12345]" and sends the replaced text to normal MediaWiki parser. In this way, this bug appears.
Comment 2 MZMcBride 2010-07-13 05:53:48 UTC
Another example at http://www.mediawiki.org/wiki/Special:Code/MediaWiki/63214#c7615

The text "bug 13518#c9" doesn't include the section anchor as it should.
Comment 3 Liangent 2010-07-13 05:58:16 UTC
and bug 13518 comment 9 does not work either.
Comment 4 MZMcBride 2010-07-15 01:40:37 UTC
This is related to bug 21239.
Comment 5 Sam Reed (reedy) 2010-07-20 18:37:06 UTC
(In reply to comment #3)
> and bug 13518 comment 9 does not work either.

That seems to... It's linked
Comment 6 Liangent 2010-07-21 02:06:50 UTC
(In reply to comment #5)
> (In reply to comment #3)
> > and bug 13518 comment 9 does not work either.
> 
> That seems to... It's linked

It's not linked to the comment specified.
Comment 7 Sam Reed (reedy) 2010-07-22 12:10:55 UTC
Ignore me

MaxSem has started some parser tests under r69611
Comment 10 p858snake 2011-02-13 02:33:05 UTC
*** Bug 27371 has been marked as a duplicate of this bug. ***

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links