Merging Versions of a Link

The Merge command can merge changes made to element in two different contributor versions.

Basic Merge Algorithm

The basic procedure for handling changes in a merge operation is the same for all elements, including link elements:

At the time of the merge, one contributor is located in a workspace, where the new version will be created); the other contributor is the version in the workspace's backing stream or some other dynamic stream. (You might have specified this second version as part of a particular transaction or change package.)

If just one contributor makes a change from the contributors' closest common ancestor, AccuRev incorporates the change into the new, merged version automatically.

If both contributors make a change from the contributors' closest common ancestor, AccuRev regards this as a conflict, which you must resolve during the merge process.

For a more detailed discussion, in the context of changes to the contents of a text file, see Handling Change Sections.

Back to top

What Constitutes a Change to a Link?

Given that the algorithm for handling changes is basically the same for all elements, the only thing special about merging versions of a link is the nature of changes to a link element.

  • AccuRev tracks namespace changes to a link:

    • Initial creation of the link.

      Note: A link object is created as either an element link or a symbolic link. You cannot switch the type of an existing link object.

    • Renaming the link.
    • Moving the link to another location in the depot's directory tree.

      Each of the above changes creates a new version of the link element.

  • AccuRev also tracks changes to the contents of a link — that is, changes to the link's target element (for an element link) or to the link's target pathname (for a symbolic link). Each such change creates a new version of the link element.

Back to top

Link Merge Procedure

Executing Merge on a link element never involves the Merge tool (or third-party tool), which is designed to process the contents of text files.

A conflict at the content-level merge is handled by a link-specific dialog:

A conflict at the namespace-level merge involves making choices in the same one or two dialogs used for all kinds of elements.

Back to top