Index: trunk/tools/wsor/diffs/revision_differ.py |
— | — | @@ -140,6 +140,13 @@ |
141 | 141 | else: |
142 | 142 | namespace, title = wmf.normalizeTitle(page.getTitle(), namespaces=dump.namespaces) |
143 | 143 | 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 | + |
144 | 151 | row = [ |
145 | 152 | repr(revision.getId()), |
146 | 153 | repr(page.getId()), |
— | — | @@ -148,8 +155,8 @@ |
149 | 156 | repr(revision.getTimestamp()), |
150 | 157 | repr(revision.getComment()), |
151 | 158 | repr(revision.getMinor()), |
152 | | - repr(revision.getContributor().getId()), |
153 | | - repr(revision.getContributor().getUsername()) |
| 159 | + repr(userId), |
| 160 | + repr(userName) |
154 | 161 | ] |
155 | 162 | |
156 | 163 | for d in simpleDiff(lastRev.getText(), revision.getText(), report=[-1,1]): |
Index: trunk/tools/wsor/diffs/README.txt |
— | — | @@ -12,6 +12,6 @@ |
13 | 13 | |
14 | 14 | Author: Aaron Halfaker (aaron.halfaker@gmail.com) |
15 | 15 | |
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 |
17 | 17 | is provided WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or |
18 | 18 | implied. |
Index: trunk/tools/wsor/diffs/page_sample.xml |
— | — | @@ -35,3 +35,19 @@ |
36 | 36 | * [[Leon Wilkeson]] from [[Lynyrd Skynyrd]]</text> |
37 | 37 | </revision> |
38 | 38 | </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> |