Last modified: 2014-11-04 20:23:33 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 T73396, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 71396 - Add revid handling (revids=, drstartid= and drendid=) to list=deletedrevs
Add revid handling (revids=, drstartid= and drendid=) to list=deletedrevs
Status: RESOLVED FIXED
Product: MediaWiki
Classification: Unclassified
API (Other open bugs)
unspecified
All All
: Normal enhancement (vote)
: ---
Assigned To: Nobody - You can work on this!
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2014-09-28 19:56 UTC by Aaron Halfaker
Modified: 2014-11-04 20:23 UTC (History)
5 users (show)

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


Attachments

Description Aaron Halfaker 2014-09-28 19:56:00 UTC
Currently "list=deletedrevs" does not support look-ups with revision IDs.  However, "prop=revisions" does support look-ups based on revision IDs.  I would like to be able to use revision IDs to do lookups of both deleted and non-deleted revisions in the same manner.

This means that revids would be supported for extracting specific revisions, drstartid would allow searching after a certain revision and drendid would allow searching before a certain revision. 

Here is an example of what currently happens when trying the obvious with "revids": 

https://en.wikipedia.org/w/api.php?action=query&list=deletedrevs&revids=48686706&drprop=revid|content&drlimit=1&format=jsonfm

returns:

{
    "query-continue": {
        "deletedrevs": {
            "drcontinue": "0|\udbff\udfff|20060416102417|59516453"
        }
    },
    "query": {
        "badrevids": {
            "48686706": {
                "revid": 48686706
            }
        },
        "deletedrevs": [
            {
                "revisions": [
                    {
                        "timestamp": "2006-08-19T00:06:25Z",
                        "revid": 70501255,
                        "*": <snip>
                    }
                ],
                "ns": 0,
                "title": "\udbff\udfff"
            }
        ]
    }
}
Comment 1 Jackmcbarn 2014-09-28 19:59:13 UTC
By the way, I think Special:Undelete has the same problem.
Comment 2 Brad Jorsch 2014-09-29 13:32:25 UTC
The reason for the "badrevids" is because deletedrevs is a bit of a strange module: it tries to combine the equivalent of both "list=allrevisions" (were that to exist) and "prop=revisions" into one module. The pageset functionality (which handles the "titles", "pageids", "revids", and "generator") is really intended for pages and revisions that exist, hence the error.

I'm inclined to deprecate list=deletedrevs using the pageset at all, and instead add all three of "drtitles", "drpageids", and "drrevids" to make it more like all other 'list' submodules. I'll have to check whether anyone is using list=deletedrevs with a generator though, as "drgenerator" would be insane.
Comment 3 Brad Jorsch 2014-09-29 13:42:08 UTC
(In reply to Brad Jorsch from comment #2)
> I'm inclined to deprecate list=deletedrevs using the pageset at all, and
> instead add all three of "drtitles", "drpageids", and "drrevids" to make it
> more like all other 'list' submodules. I'll have to check whether anyone is
> using list=deletedrevs with a generator though, as "drgenerator" would be
> insane.

Or else make "prop=deletedrevisions" for mode 1 and "list=alldeletedrevisions" for modes 2 and 3, and deprecate list=deletedrevs entirely.
Comment 4 Brad Jorsch 2014-09-29 13:56:45 UTC
I added this to the list at https://www.mediawiki.org/wiki/Requests_for_comment/API_roadmap#Fix_list.3Ddeletedrevs for some further discussion.
Comment 5 Gerrit Notification Bot 2014-10-24 19:19:03 UTC
Change 168646 had a related patch set uploaded by Anomie:
API: Split list=deletedrevs into prop=deletedrevisions and list=alldeletedrevisions

https://gerrit.wikimedia.org/r/168646
Comment 6 Gerrit Notification Bot 2014-11-04 20:22:14 UTC
Change 168646 merged by jenkins-bot:
API: Split list=deletedrevs into prop=deletedrevisions and list=alldeletedrevisions

https://gerrit.wikimedia.org/r/168646

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


Navigation
Links