Patches item #3007742, was opened at 2010-05-26 20:19 Message generated for change (Comment added) made by valhallasw You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=603140&aid=3007742...
Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: rewrite Group: None Status: Open Resolution: None Priority: 5 Private: No Submitted By: Pyr0 () Assigned to: Nobody/Anonymous (nobody) Summary: rvdiffto parameter implementation
Initial Comment: No revisions diff text loading function is implemented in the framework. Here is one:
Changelog: Modified site.loadrevisions() method to support rvdiffto parameter. Added a Page.Revision.Diff class for storing the diff text and revto id. Modified api.update_page() to save the new diff information.
A method from Page.py is still missing to get diffs just like you get a revision now. But you can get the diff text from page._revision[id].diff.text directly for now.
----------------------------------------------------------------------
Comment By: Merlijn S. van Deen (valhallasw)
Date: 2012-03-21 09:38
Message: Sorry for the slow slow slow sloooow response.
I think diffs are a useful thing to have, but I'm not quite sure what the goal here is - what is the advantage of using rvdiffto instead of getting both revisions and comparing them with a python diff function?
I can see the use case for, for instance, an antivandalism bot, but I'm not quite sure how you would use it with this.
Then on the implementation - I can imagine it makes sense to store diffs for a certain revision, but I'd expect, for instance, a dict with revid's such that
page, revid=10001 diffs = {10000: <diff object between 10000 and 10001>, 9000: <diff object between 9000 and 10001>}, and storing e.g. revision.prev = 10000.
----------------------------------------------------------------------
You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=603140&aid=3007742...
pywikipedia-bugs@lists.wikimedia.org