Changes
→External link: rm obsolete CVS link
{{H:h|Reader toc}}
A '''diff''' is the difference between two versions of a page. It can be viewed from the [[Help:Page history|page history]]: for every version there are potentially two [[w:radio button|radio button]]s: the left column is for selecting the older version, the right column for selecting the newer one. Pressing "Compare selected versions" gives the difference between the two versions.
For special cases (the diff for a single edit or between an old and the current version) other possibilities are clicking ''cur'' or ''last'' in the page history or on the [[Help:Recent changes|Recent Changes page]]. The diff is also shown during an [[Help:Edit conflict|edit conflict]] so you can see exactly what you need to reintegrate.
From [[m:MediaWiki 1.5|MediaWiki 1.5]] diff works also in preview, showing the difference between the currently stored version and the current version in the edit box
==How it looks ==
The two versions are shown side-by-side. In the old version paragraphs which differ are yellow and in the new version they are green. In left-to-right languages, the old version is on the left. This is reversed in [[m:RTL|right-to-left]] scripts. Text removed within a paragraph is shown in red on the old version. New text within a paragraph is shown in red on the new version. If a whole paragraph was removed or added, the text is not red but just black, while the other side is blank (white). Unchanged text is black on grey, only parts before and after changed text is shown.
The diff shows differences per line. Some editors find that adding manual line breaks improves the diff function.
As well as showing the difference between versions, the diff page has links to the user page and talk page of the users who edited both the last and current versions. Links to the users' contribution lists are also shown. For sysops, a [[Help:Reverting a page to an earlier version|rollback]] button is shown allowing them to revert from the new version to the old one. Note however that this is even shown when viewing the diff between the recent version of a page and a version older than the last version by an author other than the one of the most current version, in which case the rollback would not undo the change that is displayed. Thus if user A vandalized a page, and user B partially reverted that vandalism, the diff of the two together shows the remaining vandalism, but rollback reverts the partial repair by user B!
[[Help:Edit summary|Edit summaries]] are also shown on the diff page. These appear in the row beneath the user names. If the user has used links in their edit summary, these act as links on the diff page as well.
In 1.4 there are also links to both versions, and the previous and next diff.
This example shows the top of the diff page, with the links described above.
{| width=100%
|- align="center" bgcolor="#cccccc"
| width=50%|<strong>Revision as of 22:32, Aug 03, 2003</strong><br/>
[[User:Angela|Angela]] ([[User_talk:Angela|Talk]] | [[Special:Contributions/Angela|contribs]])<br/>
[[Help:Edit summary|Edit summaries]] in diffs are great
|
<strong>Revision as of 00:10, Aug 18, 2003</strong><br/>
[[User:Tim Starling|Tim Starling]] ([[User_talk:Tim Starling|Talk]] | [[Special:Contributions/Tim_Starling|contribs]]) '''['''''[[Main Page|rollback]]''''']'''<br/>
Reverted edits by Angela to last version by Anthere
|}
When moving or copying a piece of text within a page or from another page, and also making other edits, it is useful to separate these edits. This way the diff function can be usefully applied for checking these other edits.
==Width==
After the table of differences, the latest of the two compared versions is shown fully.
In the case of the Classic skin with quickbar, the diff page does not have the quickbar, to provide more space. Therefore the diff page is also useful for viewing the page on full screen width, without changing the preferences.
With the Monobook skin the panels on the left are also on the diff page.
[[w:en:Page widening|Page widening]] is more likely on a diff page, because there are two columns, but also because URLs (especially long ones) are not hidden.
==URL==
To do a comparison with the older page rendered below the table of differences, provide the URL as follows.
Open the revision of one page that you wish to compare to another, for example <code><nowiki>http://meta.wikimedia.org/w/index.php?title=Help:Diff&oldid=78722</nowiki></code>, and the revision of the other page that you wish to compare, for example <code><nowiki>http://meta.wikimedia.org/w/index.php?title=Main_Page&oldid=98420</nowiki></code>. Copy the oldid number of one page (<code>&oldid=78722</code> in the first example) and replace the text <code>oldid</code> with <code>diff</code>: <code>&diff=78722</code>. Paste this string into the URL of the other page between that page's title and its oldid (<code>&oldid=98420</code> in the second example), so you have something like this:
:<code><nowiki>http://meta.wikimedia.org/w/index.php?title=Main_Page&diff=78722&oldid=98420</nowiki></code>
You may remove the page title (<code>title=Main_Page</code> in the example above) from the URL if you wish, but this is not necessary. The resulting diff will compare the given versions of the two pages [http://meta.wikimedia.org/w/index.php?title=Main_Page&diff=78722&oldid=98420].
To compare the current version of the page and a given oldid, you can put "current" after "diff=" instead of an oldid. For example,
<code><nowiki>http://meta.wikimedia.org/w/index.php?title=Help:Diff&diff=current&oldid=124558</nowiki></code>
would compare the current version of this page with the version that has oldid 124558.
{{h:f|langs=|enname=Diff}}
A '''diff''' is the difference between two versions of a page. It can be viewed from the [[Help:Page history|page history]]: for every version there are potentially two [[w:radio button|radio button]]s: the left column is for selecting the older version, the right column for selecting the newer one. Pressing "Compare selected versions" gives the difference between the two versions.
For special cases (the diff for a single edit or between an old and the current version) other possibilities are clicking ''cur'' or ''last'' in the page history or on the [[Help:Recent changes|Recent Changes page]]. The diff is also shown during an [[Help:Edit conflict|edit conflict]] so you can see exactly what you need to reintegrate.
From [[m:MediaWiki 1.5|MediaWiki 1.5]] diff works also in preview, showing the difference between the currently stored version and the current version in the edit box
==How it looks ==
The two versions are shown side-by-side. In the old version paragraphs which differ are yellow and in the new version they are green. In left-to-right languages, the old version is on the left. This is reversed in [[m:RTL|right-to-left]] scripts. Text removed within a paragraph is shown in red on the old version. New text within a paragraph is shown in red on the new version. If a whole paragraph was removed or added, the text is not red but just black, while the other side is blank (white). Unchanged text is black on grey, only parts before and after changed text is shown.
The diff shows differences per line. Some editors find that adding manual line breaks improves the diff function.
As well as showing the difference between versions, the diff page has links to the user page and talk page of the users who edited both the last and current versions. Links to the users' contribution lists are also shown. For sysops, a [[Help:Reverting a page to an earlier version|rollback]] button is shown allowing them to revert from the new version to the old one. Note however that this is even shown when viewing the diff between the recent version of a page and a version older than the last version by an author other than the one of the most current version, in which case the rollback would not undo the change that is displayed. Thus if user A vandalized a page, and user B partially reverted that vandalism, the diff of the two together shows the remaining vandalism, but rollback reverts the partial repair by user B!
[[Help:Edit summary|Edit summaries]] are also shown on the diff page. These appear in the row beneath the user names. If the user has used links in their edit summary, these act as links on the diff page as well.
In 1.4 there are also links to both versions, and the previous and next diff.
This example shows the top of the diff page, with the links described above.
{| width=100%
|- align="center" bgcolor="#cccccc"
| width=50%|<strong>Revision as of 22:32, Aug 03, 2003</strong><br/>
[[User:Angela|Angela]] ([[User_talk:Angela|Talk]] | [[Special:Contributions/Angela|contribs]])<br/>
[[Help:Edit summary|Edit summaries]] in diffs are great
|
<strong>Revision as of 00:10, Aug 18, 2003</strong><br/>
[[User:Tim Starling|Tim Starling]] ([[User_talk:Tim Starling|Talk]] | [[Special:Contributions/Tim_Starling|contribs]]) '''['''''[[Main Page|rollback]]''''']'''<br/>
Reverted edits by Angela to last version by Anthere
|}
When moving or copying a piece of text within a page or from another page, and also making other edits, it is useful to separate these edits. This way the diff function can be usefully applied for checking these other edits.
==Width==
After the table of differences, the latest of the two compared versions is shown fully.
In the case of the Classic skin with quickbar, the diff page does not have the quickbar, to provide more space. Therefore the diff page is also useful for viewing the page on full screen width, without changing the preferences.
With the Monobook skin the panels on the left are also on the diff page.
[[w:en:Page widening|Page widening]] is more likely on a diff page, because there are two columns, but also because URLs (especially long ones) are not hidden.
==URL==
To do a comparison with the older page rendered below the table of differences, provide the URL as follows.
Open the revision of one page that you wish to compare to another, for example <code><nowiki>http://meta.wikimedia.org/w/index.php?title=Help:Diff&oldid=78722</nowiki></code>, and the revision of the other page that you wish to compare, for example <code><nowiki>http://meta.wikimedia.org/w/index.php?title=Main_Page&oldid=98420</nowiki></code>. Copy the oldid number of one page (<code>&oldid=78722</code> in the first example) and replace the text <code>oldid</code> with <code>diff</code>: <code>&diff=78722</code>. Paste this string into the URL of the other page between that page's title and its oldid (<code>&oldid=98420</code> in the second example), so you have something like this:
:<code><nowiki>http://meta.wikimedia.org/w/index.php?title=Main_Page&diff=78722&oldid=98420</nowiki></code>
You may remove the page title (<code>title=Main_Page</code> in the example above) from the URL if you wish, but this is not necessary. The resulting diff will compare the given versions of the two pages [http://meta.wikimedia.org/w/index.php?title=Main_Page&diff=78722&oldid=98420].
To compare the current version of the page and a given oldid, you can put "current" after "diff=" instead of an oldid. For example,
<code><nowiki>http://meta.wikimedia.org/w/index.php?title=Help:Diff&diff=current&oldid=124558</nowiki></code>
would compare the current version of this page with the version that has oldid 124558.
{{h:f|langs=|enname=Diff}}