Last modified: 2014-11-17 09:21:14 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 T25621, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 23621 - Diff two pages
Diff two pages
Status: RESOLVED FIXED
Product: MediaWiki
Classification: Unclassified
History/Diffs (Other open bugs)
1.17.x
All All
: Normal enhancement with 2 votes (vote)
: ---
Assigned To: Nobody - You can work on this!
: patch, patch-need-review
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2010-05-21 20:21 UTC by Derk-Jan Hartman
Modified: 2014-11-17 09:21 UTC (History)
6 users (show)

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


Attachments
add difftopage option (1.91 KB, patch)
2010-05-21 20:21 UTC, Derk-Jan Hartman
Details
draft of a Special:Diff (5.77 KB, patch)
2010-05-22 00:30 UTC, Derk-Jan Hartman
Details
Screenshot of proposed new special page (71.33 KB, image/png)
2010-05-22 00:32 UTC, Derk-Jan Hartman
Details

Description Derk-Jan Hartman 2010-05-21 20:21:09 UTC
Created attachment 7393 [details]
add difftopage option

On the english wikipedia we have long since had the desire to create an easy diff between a Template and its Sandbox page.

At the moment this is pretty hard, because you can only diff two specific revisions if you want to diff between two pages. We currently use a JS to find those revisions and make the diff.

I made a quick patch that adds a difftopage option, to diff between the title= and difftopage=

The following works:

page1: r5 and r4
page2: r50 and r49

http://localhost/index.php?title=page1&difftopage=page2 Creates a diff between the most recent versions of the two pages, page1 left and page2 on the right

http://localhost/index.php?title=page1&difftopage=page2&oldid=4 Creates a diff between rev 4 of page1 and rev 50 of page2 on the right

http://localhost/index.php?title=page1&difftopage=page2&oldid=4&diff=49 Creates a diff between rev 4 of page1 and rev 49 of page2 on the right

The following may be unexpected however by users:
http://localhost/index.php?title=page1&difftopage=page2&diff=49 Creates a diff between rev 50 of page2 and rev 49 of page2 on the right. This is because if diff= specified and oldid is not, it is used as oldid instead, thus title= becomes irrelevant.
Comment 1 Platonides 2010-05-21 20:38:41 UTC
I'm not convinced it's the appropiate place to do it. I would create a Special page for page comparing instead of overloading page views.

Some notes:
Use tabs, not spaces http://www.mediawiki.org/wiki/Coding_style
Use DB_SLAVE instead of DB_MASTER
Comment 2 Derk-Jan Hartman 2010-05-22 00:30:07 UTC
Created attachment 7396 [details]
draft of a Special:Diff

Ok, this is a working draft of how to implement it with a Special:Diff page.

Strings still require work, layout may not be perfect yet either.
Comment 3 Derk-Jan Hartman 2010-05-22 00:32:41 UTC
Created attachment 7397 [details]
Screenshot of proposed new special page
Comment 4 Sam Reed (reedy) 2010-05-22 10:09:37 UTC
If we do this, may be worth exposing in the API also...
Comment 5 Roan Kattouw 2010-05-22 20:53:47 UTC
(In reply to comment #4)
> If we do this, may be worth exposing in the API also...
You can already do this with the rvdiffto parameter, with which you can diff any revision to any other arbitrary revision, which doesn't necessarily have to belong to the same page.
Comment 6 Platonides 2010-05-22 20:58:13 UTC
What do you think on calling it Special:DiffPages instead of Special:Diff? Do you have a strong preference?
Comment 7 Mike.lifeguard 2010-05-22 21:14:43 UTC
(In reply to comment #5)
> (In reply to comment #4)
> > If we do this, may be worth exposing in the API also...
> You can already do this with the rvdiffto parameter, with which you can diff
> any revision to any other arbitrary revision, which doesn't necessarily have to
> belong to the same page.

I think the point is that this would allow you do to it without knowing the revid for the other page. You'd just diff based on page titles, not revids.
Comment 8 Roan Kattouw 2010-05-22 21:29:22 UTC
(In reply to comment #7)
> I think the point is that this would allow you do to it without knowing the
> revid for the other page. You'd just diff based on page titles, not revids.
So rvdifftopage?
Comment 9 Derk-Jan Hartman 2010-05-24 13:04:25 UTC
(In reply to comment #8)
> So rvdifftopage?

Yes exactly.

On Special:Diff vs. Special:DiffPages, I have little preference, but Diff is shorter and easier to remember I think.
Comment 10 Derk-Jan Hartman 2010-06-19 21:18:06 UTC
Added as Special:ComparePages in r68289

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


Navigation
Links