Share this page

# Merge changes across streams in Visual Studio

This topic explains how to merge changes across streams or their folders in the Visual Studio IDE. You can also merge from a baseline into a stream, or from requests owned by another stream into a stream.

In this topic:

## Overview

For an overview of merge guidelines and behaviors, see Merge changes.

Note: To display Dimensions CM merge commands, attach your Visual Studio solution to source control and connect to a Dimensions CM repository.

When merging changes between streams, you can select changes related to specific requests, commonly known as cherrypicking. For details, see Merge specific changes between streams.

The merge process uses changesets to find the common ancestor. A changeset is a logical grouping of changes that is created automatically every time that you deliver changes to a stream or project in a repository. For details, see Work with changesets in Visual Studio.

Back to top

## Merge from one stream to another

You can merge changes from one stream into the latest version of another stream. Before performing a merge, update your work area and deliver local changes.

To merge changes in streams:

1. Use one of the following methods:

- In Solution Explorer, right-click a solution, a project, or an item and select Merge.
- In the Dimensions Projects view, right-click a stream and select Merge from Stream.

- In the Changesets view, right-click a changeset and select Merge from Stream Version.

  The Merge Streams wizard opens.

  Tip: The context from which you merge determines the scope. For example, if you select a Dimensions CM stream or a Visual Studio project the whole stream is merged. If you select a subfolder, only the file types scoped by the folder and its subfolders are merged.

2. In the Merge Changes from This Stream box, specify a stream to be the source for this merge:

- Click Select and specify a stream in the Select Stream dialog box. Optionally, specify a stream version.

- Enter the name of a stream, and optionally a version number, in this format:

  PRODUCT:STREAM_NAME;VERSION

  Note: Omitting a version number merges changes from the latest stream version.

3. (Optional) To select a different target stream, in Merge changes into this target stream box, enter the stream name, or click Select to select a stream.

4. To change the direction of the merge, click the Swap button.

   After swapping, you may need to change the work area to one that is associated with the target stream.

5. Accept the default project work area or specify one. To use a different work area, enter its path or click Select and browse for one.
6. To interactively (manually) verify the merge results before applying them to the work area, select Perform an interactive merge.

7. To restrict the scope of the merge to a specific folder and its subfolders, select Limit the scope of the merge to this folder and browse to the folder, or enter its path.

8. (Optional) Click Advanced to configure more merge options.

9. To restrict the merge to particular files or folders, enter wildcard filters for including or excluding repository files. The default filters are determined by the context from which you opened the merge.

   For details, see Include and exclude files and folders.

10. To apply the repository date and time to the files in the merge, select Apply repository date and time.

11. To automatically merge files that don't have conflicts, select Auto merge non-conflicting file content. Select a default character set.

12. To perform an automatic non-interactive merge, click Merge. To merge manually, click Next.

    If there are no conflicts, the merge completes successfully.

    If there are conflicts, the Review Changes page is displayed. Review the list of conflicts, select an appropriate resolution for each one, and click Merge.

After the successful merge, you are prompted to deliver the files to the repository.

Back to top

## Merge from a baseline into a stream

You can merge changes from a baseline into the latest version of your stream.

To merge changes from a baseline:

1. In the Baseline view, right-click a baseline and select Merge from Baseline.

2. The baseline ID is displayed in the Merge changes from this baseline box. To select a different baseline:

- Click Select and use the Select Baseline dialog box to specify a baseline.

- Enter the name of a baseline in this format:

  PRODUCT:BASELINE_NAME

3. (Optional) To select a different target stream, in Merge changes into this target stream box, enter the stream name, or click Select to select a stream.

4. Continue from step 5 in Merge from one stream to another.

Back to top

## Merge from requests owned by another stream

Merge requests across streams to consolidate changes associated only with specific requests. You can merge only into the latest version of the target stream.

To merge changes from requests:

1. In the Requests view, select one or more requests, right-click, and select Merge from Request. The Merge Streams wizard opens.

2. (Optional) In the Merge changes from the request(s), add more requests to merge from. Enter request IDs separated with a comma. To specify different requests, click Select and use the Request Selection wizard to select a product and requests.

   Note: The Merge operation can merge only from one stream at a time.

3. (Optional) To select a different stream that contains the requests, in the Include changes from this stream box, click Select to select a stream.

4. (Optional) To select a different target stream, in the Merge changes into this target stream box, enter the stream name, or click Select to select a stream.

5. To change the direction of the merge, click the Swap button.

6. Accept the default project work area or specify one. To use a different work area, enter its path or click Select and browse for one.

7. To interactively (manually) verify the merge results before applying them to the work area, select Perform an interactive merge.

8. To include all items in the merge that are related to child requests of the selected request, select Also include items related to child requests.

9. (Optional) Click Advanced.

10. To restrict the merge to particular files or folders, enter wildcard filters for including or excluding repository files. For details, see Include and exclude files and folders.

11. To apply the repository date and time to the files in the merge, select Apply repository date and time.

12. By default, only the file changes associated with the specified request are merged. To merge all changes, clear Cherrypick file changes. For details, see Merge specific changes between streams.

13. To automatically merge files that don't have conflicts, select Auto merge non-conflicting file content. In the desktop client and Windows Explorer integration you can also select a default character set that is used to transcode Unicode files before merging.

14. To perform an automatic non-interactive merge, click Merge. To merge manually, click Next.

    If there are no conflicts, the merge completes successfully.

    If there are conflicts, the Review Changes page is displayed. Review the list of conflicts, select an appropriate resolution for each one, and click Merge.

After the successful merge, you are prompted to deliver the files to the repository.

Back to top

## Compare files and revisions

In the Visual Studio IDE, you can compare the following:

Type of differences | Description
--- | ---
Latest revision differences | The line-by-line differences between the file open in Visual Studio and its immediate ancestor in the Dimensions CM repository.
Previous revision differences | The line-by-line differences between the current working file and specific previous revisions.

You can merge different files or specific revisions of items.

The following table explains how to compare files and file revisions:

Task | Description
--- | ---
Compare the current and last file revisions | You can compare the latest file open in Visual Studio and its immediate ancestor in the Dimensions CM repository. Select a file in Solution Explorer, and select File > Source Control > Compare with Latest. The Merge tool opens and displays the line-by-line differences between the file revision open in Visual Studio and its ancestor in the Dimensions repository.
Compare the working file with previous revisions | You can compare the current working version of a file in Visual Studio to any previous revision in the Dimensions CM repository: Right-click the file that contains the revisions you want to compare and select History. The History view is displayed. Select the revision, and click the Compare Revisions button. The Merge tool opens and displays the line-by-line differences between the working copy and the revision in Dimensions CM.

Back to top

## Default file merge tool

The default file merge tool in the Visual Studio integration is Araxis Merge, an advanced two and three-way file comparison (diff), merging, and folder synchronization tool.

To access help in Araxis Merge:

- Use the commands in the Help menu.
- Press the F1 key. Some windows also contain a Help button.

Note: You can change the default file merge tool to the legacy merge tool or any other third-party application. For details about configuring the default merge tools, see Administration.

Back to top

https://admhelp.microfocus.com Dimensions CM 8942
Tips to improve your search results... Dimensions CM Help Center CM Help 14.7 All View Local Help Center View Online Help Center Version: