r94810 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r94809‎ | r94810 | r94811 >
Date:20:27, 17 August 2011
Author:halfak
Status:deferred
Tags:
Comment:
Fixed deleted username error
Modified paths:
  • /trunk/tools/wsor/diffs/README.txt (modified) (history)
  • /trunk/tools/wsor/diffs/page_sample.xml (modified) (history)
  • /trunk/tools/wsor/diffs/revision_differ.py (modified) (history)

Diff [purge]

Index: trunk/tools/wsor/diffs/revision_differ.py
@@ -140,6 +140,13 @@
141141 else:
142142 namespace, title = wmf.normalizeTitle(page.getTitle(), namespaces=dump.namespaces)
143143 nsId = dump.namespaces[namespace]
 144+ if revision.getContributor() != None:
 145+ userId = revision.getContributor().getId()
 146+ userName = revision.getContributor().getUsername()
 147+ else:
 148+ userId = None
 149+ userName = None
 150+
144151 row = [
145152 repr(revision.getId()),
146153 repr(page.getId()),
@@ -148,8 +155,8 @@
149156 repr(revision.getTimestamp()),
150157 repr(revision.getComment()),
151158 repr(revision.getMinor()),
152 - repr(revision.getContributor().getId()),
153 - repr(revision.getContributor().getUsername())
 159+ repr(userId),
 160+ repr(userName)
154161 ]
155162
156163 for d in simpleDiff(lastRev.getText(), revision.getText(), report=[-1,1]):
Index: trunk/tools/wsor/diffs/README.txt
@@ -12,6 +12,6 @@
1313
1414 Author: Aaron Halfaker (aaron.halfaker@gmail.com)
1515
16 -This software licensed as GPLv2(http://www.gnu.org/licenses/gpl-2.0.html). and
 16+This software licensed as GPLv2(http://www.gnu.org/licenses/gpl-2.0.html) and
1717 is provided WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
1818 implied.
Index: trunk/tools/wsor/diffs/page_sample.xml
@@ -35,3 +35,19 @@
3636 * [[Leon Wilkeson]] from [[Lynyrd Skynyrd]]</text>
3737 </revision>
3838 </page>
 39+ <page>
 40+ <title>AccessibleComputing</title>
 41+ <id>10</id>
 42+ <revision>
 43+ <id>100</id>
 44+ <timestamp>2009-04-12T17:03:02Z</timestamp>
 45+ <contributor deleted="deleted" />
 46+ <text xml:space="preserve">foo bar</text>
 47+ </revision>
 48+ <revision>
 49+ <id>200</id>
 50+ <timestamp>2009-04-12T17:03:02Z</timestamp>
 51+ <contributor deleted="deleted" />
 52+ <text xml:space="preserve">baz</text>
 53+ </revision>
 54+ </page>

Status & tagging log