Jump to content

Help:Diff

From Wikiquote

This is a copy of the master help page at m:Help:Diff. Do not edit this page. Edits will be lost in the next update from the master page. Either edit the master help page for all projects at Meta, or edit the project-specific text at Template:Ph:Diff. You are welcome to copy the exact wikitext from the master page at Meta and paste it into this page at any time.


Navigating

  1. Searching, Go Button
  2. What links here
  3. Random page
  4. Special Pages
  5. Printable Version

Tracking Changes

  1. Recent Changes
  2. Enhanced recent Changes
  3. Related Changes
  4. Watching pages
  5. Page History
  6. Diff
  7. User Contributions

Accounts

  1. Logging in
  2. Preferences
  3. User Style


A diff is the difference between two versions of a page. It can be viewed from the page history: for every version there are potentially two radio buttons: 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 Recent Changes page. The diff is also shown during an edit conflict so you can see exactly what you need to reintegrate.

From 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

[edit]

The two versions are shown side-by-side. In the old version paragraphs which differ are yellow and the new version is they are green. In left-to-right languages, the old version on the left. This is reversed in 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 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!

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.

Revision as of 22:32, Aug 03, 2003

Angela (Talk | contribs)
Edit summaries in diffs are great

Revision as of 00:10, Aug 18, 2003
Tim Starling (Talk | contribs)    [rollback]
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

[edit]

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.

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

[edit]

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 http://meta.wikimedia.org/w/index.php?title=Help:Diff&oldid=78722, and the revision of the other page that you wish to compare, for example http://meta.wikimedia.org/w/index.php?title=Main_Page&oldid=98420. Copy the oldid number of one page (&oldid=78722 in the first example) and replace the text oldid with diff: &diff=78722. Paste this string into the URL of the other page between that page's title and its oldid (&oldid=98420 in the second example), so you have something like this:

http://meta.wikimedia.org/w/index.php?title=Main_Page&diff=78722&oldid=98420

You may remove the page title (title=Main_Page 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 [1].

To compare the current version of the page and a given oldid, you can put "current" after "diff=" instead of an oldid. For example, http://meta.wikimedia.org/w/index.php?title=Help:Diff&diff=current&oldid=124558

would compare the current version of this page with the version that has oldid 124558.

[edit]

Wikiquote-specific content

[edit]
[edit]
Help contents - all pages in the Help namespace: Meta b: c: n: w: q: wikisource wiktionary


Reading: Overview | Go | Search | URL | Namespace | Page name | Section | Link | Backlinks | Piped link | Interwiki link | Redirect | Variable | Category
Tracking changes: Recent | (enhanced) | Related | Watching pages | Page history | Diff | User contributions | Edit summary | Minor edit
Logging in and preferences: Logging in | Preferences | User style
Editing: Overview| New page | Images/files | Image description page | Special characters | Formula | Table | EasyTimeline | Template intro | Renaming (moving) a page | Automatic conversion of wikitext | Talk page | Testing | rlc
Projects: Meta (master page) | Wikibooks | Wikicommons | Wikinews | Wikipedia | Wikiquote | Wikisource | Wiktionary
For other languages see Meta.

[edit]
commons
commons
Wikimedia Commons has media related to: