I am trying to understand how this works: https://www.mediawiki.org/wiki/API:Revisions
There is a parameter DiffTo which says: Revision ID to diff each revision to. Use "prev", "next" and "cur" for the previous, next and current revision respectively.
I suppose that I can give it revision ID instead of that string hint. So let's say we have 4 edits made to the page [[X]], their ID's are:
* 520 * 510 * 20 * 1
Now I want to create a diff of last three changes, so that I see what has changed from revision 20 until revision 520 INCLUDING these 2 revisions, that means, I want to see all changes that were made in 20, 510 and 520 up to the current version.
I suppose in that case I would set RevID to 520 and DiffTo to 20. That however doesn't seem to work. It shows the diff, but other way, it shows diff from 520 to 20 (and I think it even excludes that revision) not from 20 to 520, including both 20 and 520.
How does the whole thing actually work? I might need something like "DiffFrom" when I think of that, but there is no such a thing. Even more weird thing that happens to me, is that when I swap RevID and DiffTo, the results seem to be identical.
On Tue, Sep 15, 2015 at 10:39 AM, Petr Bena benapetr@gmail.com wrote:
I suppose in that case I would set RevID to 520 and DiffTo to 20. That however doesn't seem to work. It shows the diff, but other way, it shows diff from 520 to 20 (and I think it even excludes that revision) not from 20 to 520, including both 20 and 520.
Yes, because you're diffing *from* 520 *to* 20.
If you have two specific revisions you're trying to compare, you might just want to look at action=compare https://en.wikipedia.org/w/api.php?modules=compare.
Even more weird thing that happens to me, is that when I swap RevID and DiffTo, the results seem to be identical.
That seems doubtful.
That "compare" feature look promising. Thanks
On Tue, Sep 15, 2015 at 5:36 PM, Brad Jorsch (Anomie) bjorsch@wikimedia.org wrote:
On Tue, Sep 15, 2015 at 10:39 AM, Petr Bena benapetr@gmail.com wrote:
I suppose in that case I would set RevID to 520 and DiffTo to 20. That however doesn't seem to work. It shows the diff, but other way, it shows diff from 520 to 20 (and I think it even excludes that revision) not from 20 to 520, including both 20 and 520.
Yes, because you're diffing *from* 520 *to* 20.
If you have two specific revisions you're trying to compare, you might just want to look at action=compare https://en.wikipedia.org/w/api.php?modules=compare.
Even more weird thing that happens to me, is that when I swap RevID and DiffTo, the results seem to be identical.
That seems doubtful.
-- Brad Jorsch (Anomie) Senior Software Engineer Wikimedia Foundation _______________________________________________ Wikitech-l mailing list Wikitech-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikitech-l
Just to make clear what my problem is, here is example. There is a user 75.69.113.86 who made 3 consecutive edits to page "Battle Tendency". These edits can be displayed using these 3 API's:
* https://en.wikipedia.org/w/api.php?action=query&prop=revisions&rvpro... * https://en.wikipedia.org/w/api.php?action=query&prop=revisions&rvpro... * https://en.wikipedia.org/w/api.php?action=query&prop=revisions&rvpro...
The combined diff of all three edits I am trying to get has link https://en.wikipedia.org/w/api.php?action=query&prop=revisions&rvpro...
but as you can see, it's not actually containing all these changes. Why is that? I would like to see a diff of these 3 edits from 681167574 which is oldest to 681167909 which in time of me writing this was last revision.
On Tue, Sep 15, 2015 at 5:39 PM, Petr Bena benapetr@gmail.com wrote:
That "compare" feature look promising. Thanks
On Tue, Sep 15, 2015 at 5:36 PM, Brad Jorsch (Anomie) bjorsch@wikimedia.org wrote:
On Tue, Sep 15, 2015 at 10:39 AM, Petr Bena benapetr@gmail.com wrote:
I suppose in that case I would set RevID to 520 and DiffTo to 20. That however doesn't seem to work. It shows the diff, but other way, it shows diff from 520 to 20 (and I think it even excludes that revision) not from 20 to 520, including both 20 and 520.
Yes, because you're diffing *from* 520 *to* 20.
If you have two specific revisions you're trying to compare, you might just want to look at action=compare https://en.wikipedia.org/w/api.php?modules=compare.
Even more weird thing that happens to me, is that when I swap RevID and DiffTo, the results seem to be identical.
That seems doubtful.
-- Brad Jorsch (Anomie) Senior Software Engineer Wikimedia Foundation _______________________________________________ Wikitech-l mailing list Wikitech-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikitech-l
You would need to use the rev_id of the page prior to the IP editing to get all changes that they made. Otherwise your not comparing to the page text prior to their first edit
On Tue, Sep 15, 2015 at 11:53 AM, Petr Bena benapetr@gmail.com wrote:
Just to make clear what my problem is, here is example. There is a user 75.69.113.86 who made 3 consecutive edits to page "Battle Tendency". These edits can be displayed using these 3 API's:
https://en.wikipedia.org/w/api.php?action=query&prop=revisions&rvpro...
https://en.wikipedia.org/w/api.php?action=query&prop=revisions&rvpro...
https://en.wikipedia.org/w/api.php?action=query&prop=revisions&rvpro...
The combined diff of all three edits I am trying to get has link
https://en.wikipedia.org/w/api.php?action=query&prop=revisions&rvpro...
but as you can see, it's not actually containing all these changes. Why is that? I would like to see a diff of these 3 edits from 681167574 which is oldest to 681167909 which in time of me writing this was last revision.
On Tue, Sep 15, 2015 at 5:39 PM, Petr Bena benapetr@gmail.com wrote:
That "compare" feature look promising. Thanks
On Tue, Sep 15, 2015 at 5:36 PM, Brad Jorsch (Anomie) bjorsch@wikimedia.org wrote:
On Tue, Sep 15, 2015 at 10:39 AM, Petr Bena benapetr@gmail.com wrote:
I suppose in that case I would set RevID to 520 and DiffTo to 20. That however doesn't seem to work. It shows the diff, but other way, it shows diff from 520 to 20 (and I think it even excludes that revision) not from 20 to 520, including both 20 and 520.
Yes, because you're diffing *from* 520 *to* 20.
If you have two specific revisions you're trying to compare, you might
just
want to look at action=compare https://en.wikipedia.org/w/api.php?modules=compare.
Even more weird thing that happens to me, is that when I swap RevID and DiffTo, the results seem to be identical.
That seems doubtful.
-- Brad Jorsch (Anomie) Senior Software Engineer Wikimedia Foundation _______________________________________________ Wikitech-l mailing list Wikitech-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikitech-l
Wikitech-l mailing list Wikitech-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikitech-l
On Tue, Sep 15, 2015 at 11:53 AM, Petr Bena benapetr@gmail.com wrote:
Just to make clear what my problem is, here is example. There is a user 75.69.113.86 who made 3 consecutive edits to page "Battle Tendency". These edits can be displayed using these 3 API's:
https://en.wikipedia.org/w/api.php?action=query&prop=revisions&rvpro...
This diff is from 679358832 to 681167574.
https://en.wikipedia.org/w/api.php?action=query&prop=revisions&rvpro...
This is from 681167574 to 681167835.
https://en.wikipedia.org/w/api.php?action=query&prop=revisions&rvpro...
And this is from 681167835 to 681167909.
The combined diff of all three edits I am trying to get has link
https://en.wikipedia.org/w/api.php?action=query&prop=revisions&rvpro...
but as you can see, it's not actually containing all these changes. Why is that?
Because you're asking for the diff from 681167574 to 681167909 (which covers only the last two of your three links), not the diff from *679358832* to 681167909.
yay, that fixed the problem, thanks :o
On Tue, Sep 15, 2015 at 6:24 PM, Brad Jorsch (Anomie) bjorsch@wikimedia.org wrote:
On Tue, Sep 15, 2015 at 11:53 AM, Petr Bena benapetr@gmail.com wrote:
Just to make clear what my problem is, here is example. There is a user 75.69.113.86 who made 3 consecutive edits to page "Battle Tendency". These edits can be displayed using these 3 API's:
https://en.wikipedia.org/w/api.php?action=query&prop=revisions&rvpro...
This diff is from 679358832 to 681167574.
https://en.wikipedia.org/w/api.php?action=query&prop=revisions&rvpro...
This is from 681167574 to 681167835.
https://en.wikipedia.org/w/api.php?action=query&prop=revisions&rvpro...
And this is from 681167835 to 681167909.
The combined diff of all three edits I am trying to get has link
https://en.wikipedia.org/w/api.php?action=query&prop=revisions&rvpro...
but as you can see, it's not actually containing all these changes. Why is that?
Because you're asking for the diff from 681167574 to 681167909 (which covers only the last two of your three links), not the diff from *679358832* to 681167909.
-- Brad Jorsch (Anomie) Senior Software Engineer Wikimedia Foundation _______________________________________________ Wikitech-l mailing list Wikitech-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikitech-l
wikitech-l@lists.wikimedia.org