Merging
| Chapter 3. Using eSvn |

## Merging

To apply the differences between two sources use the Merge option ( Modify->Merge (Alt+M) ). The `Merge` dialog provides two modes:

- Mode 1 - the difference between two revisions can be merged to a third working copy (File) or to a remote repository (URL). The first and second revision sources can reside either on a working copy (2 Files) or a remote repository (2 URLs). The merged copy is output to a working copy (File) or remote repository (URL). If revision is omitted the default is HEAD.

- Mode 2 - the difference between two remote repository (URL) versions can be merged into one. The output is merged to the URL unless a working copy path is specified.

In all instances the URL/File path at revision is specified using the syntax [`URL/File`]@[`REVISION`]

For example: svn://esvn.umputun.com/esvn/trunk/ChangeLog@PREV

If the path is omitted for mode 1 or 2, a default value of '.' is assumed, unless the sources have identical basenames that match a file within '.': in which case, the differences will be applied to that file. The following is therefore true when the `URL/File` path is a omitted (where N = Revision 1, M = Revision 2, WC = Working Copy, URL = Remote Repository):

- If N = WC & M = WC | WC

- If N = WC & M = URL | WC

- If N = URL & M = WC | WC

- If N = URL & M = URL | URL

The `Merge` dialog provides the following field for mode 1 and mode 2 respectively:

Mode 1

Revision 1

  The source for first revision. Can be local path (File) or remote repository (URL).

  HEAD

    The latest revision in the repository.

  BASE

    The "pristine" revision of an item in a working copy.

  COMMITTED

    The last revision in which an item changed before (or at) BASE.

  PREV

    The revision just before the last revision in which an item changed. (Technically, COMMITTED - 1.)

  Use the R to select a revision using the `Log` dialog. Use H or P to select `HEAD` or `PREV` respectively.

Revision 2

  The source for second revision. Can be local path (File) or remote repository (URL).

  HEAD

    The latest revision in the repository.

  BASE

    The "pristine" revision of an item in a working copy.

  COMMITTED

    The last revision in which an item changed before (or at) BASE.

  PREV

    The revision just before the last revision in which an item changed. (Technically, COMMITTED - 1.)

  Use the R to select a revision using the `Log` dialog. Use H or P to select `HEAD` or `PREV` respectively.

URL/File

  The destination to the differences between revision 1 and 2 will be merged. Can be working copy (File) or remote repository (URL).

Mode 2

URL 1

  The URL source for the first revision. Use U to display the `URL wizard`.

URL 2

  The URL source for the second revision. Use U to display the `URL wizard`.

WCPATH

  Path to working copy where output will be made as apposed to the default which is to a remote repository. Use ... to display the common `Open` dialog used to change and specify the local path.

Non-recursive

  Operate on single directory only.

Dry-run

  Try operation but make no changes.

Moving Items |  | Switching a Working Copy