Memory Alpha
Advertisement
Memory Alpha
Help Contents → Diff

A diff is the difference between two versions of a page. There are a number of ways to access a diff.

In the page history for a given page, each reversion is accompanied by two radio buttons. Using these buttons, select two revisions, then press "compare selected reversions." This should bring you to the diff between the two versions. Other methods of accessing a diff are clicking the cur or prev link next to a revision in the page history or the diff link next to an edit on the recent changes page or your watchlist.

The diff is also shown during an edit conflict so you can see exactly what you need to reintegrate. Diff also works in preview, showing the difference between the currently stored version and the current version in the edit box.

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 makes the diff function more useful in checking each edit, while the changes can become harder to follow otherwise.

How it looks[]

The following is an example diff page (some of the links are dummies).

(Edit summaries in diffs are great)
(Tag: VE: Source)
m (correction, +external link)
Line 8: Line 8:
  For sysops, a {{h|Revert a page|rollback}} button is shown allowing them to revert from the new version to the old one.   For sysops, a {{h|Revert a page|rollback}} button is shown allowing them to revert from the new version to the old one.
   
  This is only shown when viewing the diff between the version and the one .
 
This is only shown when viewing the diff between the current version and the one immediately preceding it.  
   
This example shows the top of the diff page, with links the described above. + This example shows the top of the diff page, with links described above.
   
Line 25: Line 25:
  == See also ==   == See also ==
  + * {{MediaWiki|Help: Diff}}
  * {{wikipedia|Help: Diff}}   * {{wikipedia|Help: Diff}}

On the old-version side, paragraphs which differ from the new version are highlighted with red, and on the new-version side with green. Altered text within a paragraph is highlighted with blue on both sides. Unchanged text is displayed as black or white on grey, depending on whether you have the light or dark theme activated.

After the table of differences, the latest of the two compared versions is shown fully, unless one specifies otherwise in their preferences.

The "Revision as of date" and "Latest revision as of date" links point to their respective revisions of the page.

The (undo) link on the newer revision's side will revert that specific edit. When you click the link, you will be shown the diff of the edit you are about to ensure that it is intentional. Often, versions older than the current one cannot be undone in this way. Instead, click the (edit) link shown next to the timestamp. You may be warned that you are editing an out-of-date revision. If you continue, you will revert all the edits done after that revision.

Below that are links to the user page, talk page, and contributions page for the user who made the given edit. For sysops, block and rollback buttons are also shown.

The "older edit" and "newer edit" links make it possible to check through the earlier or later diffs for that page. When you are checking the differences between two non-adjacent versions, you will see "(x intermediate revisions by y users not shown)".

Diff links[]

Any two reversions, even of two different pages, can be compared using Special:Diff.

First, open one of the revisions you wish to compare, for example, https://memory-alpha.fandom.com/wiki/Bajoran?oldid=3090521. Next, open the other revision, for example, https://memory-alpha.fandom.com/wiki/Cardassian?oldid=3111369. At or near the end of each URL, there should be a string of numbers, in this case, 3090521 for the first and 3111369 for the second.

Now, create a link with the syntax [[Special:Diff/NumberOne/NumberTwo]], where NumberOne and NumberTwo are the two strings of numbers taken from the URLs. In this example, you would write [[Special:Diff/3090521/3111369]], which renders as Special:Diff/3090521/3111369.

If you wish to link to a diff between one version of a page and the previous version, simply use the current revision ID and remove the second part of the link, i.e., Special:Diff/3090521. To compare the current version of the page and an old revision, you can add /0 (slash zero) after the revision ID in a Special:Diff link, i.e., Special:Diff/3087641/0.

Advertisement