Last modified: 2013-06-06 06:07:57 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 T51136, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 49136 - expose revisions.rev_sha1 as query field
expose revisions.rev_sha1 as query field
Status: NEW
Product: MediaWiki
Classification: Unclassified
API (Other open bugs)
unspecified
All All
: Low enhancement (vote)
: ---
Assigned To: Nobody - You can work on this!
:
Depends on: 49138
Blocks:
  Show dependency treegraph
 
Reported: 2013-06-04 15:49 UTC by Carl Fürstenberg
Modified: 2013-06-06 06:07 UTC (History)
6 users (show)

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


Attachments

Description Carl Fürstenberg 2013-06-04 15:49:26 UTC
I would want revision.rev_sha1 exposed in the api, so I can retrieve revisions which contains the same content (I assume rev_sha1 is the sha1 of the content and thus should be same for different revisions with the same content)
Comment 1 Carl Fürstenberg 2013-06-04 15:51:58 UTC
I meant expose it as field for query so you can limit the query to sha1
Comment 2 Bartosz Dziewoński 2013-06-04 15:55:17 UTC
This would probably require adding an index covering it, as it's currently not indexed at all (although img_sha1 is).
Comment 3 Brad Jorsch 2013-06-04 15:57:58 UTC
(In reply to comment #1)
> I meant expose it as field for query so you can limit the query to sha1

Good thing you clarified, I was about to close this as a dup of bug 21860.

What exactly is the use case for this, that isn't served by processing the output of prop=revisions&rvprop=sha1 on the client?


(In reply to comment #2)
> This would probably require adding an index covering it, as it's currently
> not indexed at all (although img_sha1 is).

That is correct.
Comment 4 Carl Fürstenberg 2013-06-04 16:03:18 UTC
Sometimes there can be way too many revisions to practically loop through them all to find out which one is the oldest one. For example in a edit war/revert war, I would want to be able to quickly get the original revision which started it all, and of someone reverts to a really old revision, it's good to be able to quickly find out whom made that revision in case of sockery
Comment 5 Asher Feldman 2013-06-06 06:07:57 UTC
If rev_sha1 will always be queried with a page id, a (rev_page, rev_sha1(5)) index should be fine, even on enwiki.

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


Navigation
Links