Merge files in Eclipse

In the Eclipse IDE, you can merge your local files with files in a Dimensions CM repository or another Dimensions CM project.

Merge with a repository file

You may need to merge two revisions of a file if the current revision in the repository is newer than your local revision. This scenario occurs in a concurrent development paradigm, where multiple developers are working on the same project.

For example, you get revision 4 of the file from the Dimensions CM repository. You mark the file as local and update the file without checking it out. You decide that you want to commit these changes to the repository but you find that someone has checked in revision 5 of the file while you were performing the updates. You need to merge your locally changed revision with the new revision in the repository.

Note: Your local revision of the file may be either checked out or in local mode. The Dimensions CM for Eclipse integration supports the merging of either type of file with the more recent tip.

If you synchronize your project, you can see that the file has an arrow pointing both directions, meaning that the file has changed in both locations.

The process involves merging the local and repository files into your local directory, and then committing the new file into the repository. Note that merges that resolve concurrent conflicts never result in merge transitions stored in the pedigree.

To merge from the Synchronize view:

  1. Right-click the file in the Project Explorer and select Team > Synchronize with Repository. The Synchronize view opens.

  2. Merge the two files into your local file.

    1. Right-click the file and select Open in Compare editor.

    2. Move the changes to keep into the local version of the file.

    3. Save the merged file.

  3. Mark the local file as merged: right-click the file, and select Mark as Merged.

  4. Commit the merged file into the repository.

Back to top

Merge with a file from another project

You can merge two versions of a file found in different projects in the repository.

This scenario occurs during parallel development, in which two releases of an application are developed in parallel from a single baseline.

Example: After the product release 2.0 is released, and the project is baselined, the projects release 2.1 and release 3.0 start from the baseline at the same time. A developer may be editing a file in project release_2.1, while another user works on the same file in the product release 3.0, under project release_3.0 in the repository. It's decided to merge the changes from release 3.0 into release 2.1. This means that the developer has to merge the file from project release_2.1 with the similar file from project release_3.0.

For parallel merge, transitions are not stored in the pedigree when the local file is checked out. It is recommended to perform merge in local mode.

The process involves merging the two files into your local directory, and then committing the new file into the repository.

To merge with a file from another Dimensions CM project:

  1. Right-click the file and select Team > Merge. The Merge dialog box opens.

  2. Select the Dimensions CM project or baseline containing the file that you want to merge with, and click Next.

  3. Select the common ancestor baseline (this is the most recent baseline that both merge participants are derived from) and click Next.

  4. Click Finish on the Merge Summary pane. The Synchronize view opens.

  5. In the Synchronize view, merge the file. Then mark the local file as merged: right-click the file and select Mark as Merged.

  6. Commit the merged file into the repository.

Back to top