Jump to content

Help:Merge history

From mediawiki.org
PD Note: When you edit this page, you agree to release your contribution under the CC0. See Public Domain Help Pages for more info. PD

Merge history is a special page that makes it possible to automatically merge the history of two pages.

This feature is accessible for users with the mergehistory user right at Special:MergeHistory. Users in the sysop user group have this right assigned to them by default.

Pages merged through this special page are logged in a "merge log".

Usage

The primary use case of merge history is to clean up after the situation in which someone moves a page by cut and paste (rather than going through the proper move page forms ).

This tool allows for the licensing violation caused by the original cut and paste to be repaired, and the history to be reconnected, creating a situation almost indistinguishable from if the cut-paste had never happened.

To perform a history merge, go to Special:MergeHistory. Enter the titles of the source page and the destination page in the input fields provided. The source page is the page whose revision you want to merge into another page while the destination page is the page that the revision will be merged into.

Click on Show mergeable edits. You will be shown a list of revisions from the source page, along with a set of radio buttons. Initially, only the right column of radio buttons is visible, and the left column is hidden.

Simple merges

  • For a simple merge, only edits that are older than the oldest version of the destination page can be moved.
  • If you want to merge all of the edits to the source page, and they are all older than the oldest version of the destination page, then you can leave both sets of radio buttons blank. The source page will become a redirect to the destination page.
  • Otherwise, click on the radio button next to a revision (in the right column) to select it, and leave the left column of radio buttons blank. That revision, and any revisions older than it, will be moved to the destination page.
  • Once you've selected the revisions you want, click on Merge revisions to perform the merge.
  • If the merge was successful, you should see a page similar to this.

Clearing the way for a simple merge

  • If the destination page started as a redirect to the source page, a simple merge may fail with the error message Specified time period overlaps preexisting revisions of the destination page..

To fix this:

  • Delete the destination page.
  • Restore all but previously deleted and the redirect revisions.
  • It is now possible for a simple merge to occur.

Complex merges

MediaWiki version:
1.45

While the simple merge UI should be sufficient for cleaning up after a standard cut-paste move, in unusual circumstances you may want more control over which revisions to merge.

In that case, you can select a newest revision to merge in the right column of radio buttons, and an oldest revision to merge in the left column of radio buttons. Only those two revisions, and the revisions between them (if any) will be merged.

The revisions at 05:00, 05:59, and 06:00 will be merged. The revisions either before or after those ones will not be.

Complex merges are not subject to the limitation that all of the revisions merged are older than the oldest version of the destination page. However, they are subject to their own separate requirements.

  • The merged revisions must fit as a clean block in the destination page history. That is, there must be no revisions of the destination page between the oldest merged revision and the newest merged revision.
    If you really want to entangle two pages like that, you can do it via multiple complex merges.
  • You can't change the current revision of either page via a complex merge (hence, the newest revision of the source page can't be merged, nor can revisions of the source page newer than the newest revision of the destination page).

Complex merges are a powertool that can easily do unexpected and dangerous things, such as decontextualizing a diff and making it appear that an editor did something they did not do. Only do this if you are very sure you know what you are doing.

Undoing a merge

Go to Special:Log/merge then click Unmerge.

See also