Last modified: 2014-11-01 07:05:20 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 T56573, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 54573 - Add diff method for revisions
Add diff method for revisions
Status: NEW
Product: Pywikibot
Classification: Unclassified
General (Other open bugs)
unspecified
All All
: Normal enhancement
: ---
Assigned To: Pywikipedia bugs
:
Depends on:
Blocks: pwb20
  Show dependency treegraph
 
Reported: 2013-09-24 22:36 UTC by Kunal Mehta (Legoktm)
Modified: 2014-11-01 07:05 UTC (History)
6 users (show)

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


Attachments

Description Kunal Mehta (Legoktm) 2013-09-24 22:36:28 UTC
Originally from: http://sourceforge.net/p/pywikipediabot/patches/447/
Reported by: Anonymous user
Created on: 2010-05-27 03:19:29
Subject: rvdiffto parameter implementation
Original description:
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 1 Kunal Mehta (Legoktm) 2013-09-24 22:36:30 UTC
rvdiffto parameter implementation
Comment 2 Kunal Mehta (Legoktm) 2013-09-24 22:36:31 UTC
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.
Comment 3 Kunal Mehta (Legoktm) 2013-09-24 22:36:33 UTC
housekeeper's note:the patch does not apply cleanly to r10035
Comment 4 Ricordisamoa 2014-03-16 13:34:37 UTC
I do not think we should go with this.
Comment 5 Amir Ladsgroup 2014-07-24 08:47:12 UTC
Since the patch is really old and lots of changes made to base repo, the whole patch needs to be rewritten. Personally I think it's cool to have something like this
Comment 6 John Mark Vandenberg 2014-11-01 06:55:29 UTC
Any idea who created this patch. sf.net just says 'Anonymous' ;-(

Related: we now have a module pywikibot.diff which could be used to do the diff client site.

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


Navigation
Links