Duplicating selected changes across branches

Duplicate changes to choose a set of changes from one branch and apply them to another branch. You can select specific files with changes to duplicate or changes based on a changelist, issue, or label. Specific changes can be duplicated to any branch in the same branch tree without promoting changes to a common parent first.

For example, Steve makes a change in his workspace branch that fixes an issue related to two different products. He can duplicate the changes in files attached to the issue to each product's baseline branch without merging all other changes he made in his workspace branch. After duplicating, he can track the changes to make sure the changes are included in all branches that contain files attached to the related issue.

Only changes that affect the file version, such as changes to file contents or file addition and removal, can be duplicated.

1. To duplicate changes associated with specific files, select the files and choose Branch > Duplicate Changes.

To duplicate changes associated with a changelist, issue, or label, choose Branch > Duplicate Changes.

The Duplicate Changes dialog box opens.

2. Select the branch that contains the changes in the From Branch list. If you selected files before opening the Duplicate Changes dialog box, the branch containing the files is already selected.

3. Select the To Branch to duplicate the changes to.

4. Select a Select files and versions by option. If you selected files with changes before opening the Duplicate Changes dialog box, <Selected files> is selected and the files are displayed.

  • Changelist duplicates changes associated with the selected changelist. Click Select to search for a changelist or view changelist details. See Selecting changelists.
  • Issue duplicates changes associated with files attached to the selected Helix ALM issue. Click Select to search for an issue or view issue details. See Selecting Helix ALM items.
  • Label duplicates changes associated with the selected label. Click Select to search for a label or view label details. See Selecting labels.

5. Select a file and click the select button in the Differences between versions column to select different historical file versions to duplicate changes from. If multiple actions incremented the file version number, you can change the file versions to duplicate from to ensure that all changes are duplicated and to avoid auto-merge conflicts.

The History dialog box opens. Ctrl+click two file versions and click Select Versions.

6. Click Track Changes to view the branches that include the selected changes.

The Track Changes dialog box opens. You can view changes in branches by changelist, issue, or label. See Tracking duplicated changes.

7. Click Preview.

The Duplicate Changes Preview dialog box opens. Files that will be duplicated, files that will not be duplicated, reasons for duplicating, and the file versions that will be used to duplicate changes are displayed.

8. Select a file and click a button to perform an action. The actions you can perform depend on the file status and your security permissions.

Button Use to: More information
Differences Compare the From and To branch file versions. Viewing file differences
History View file history. Viewing file history
Properties View file properties. Viewing file properties
Duplicate Changes Duplicate file changes to the destination branch. Duplicating selected changes across branches
Merge Locally Manually merge the files. Merging files
Force Overwrite Duplicate the file changes and overwrite the file in the destination branch.
 

9. Select Label changed files in destination to label the files in the destination branch. Select a label or select <New label> to create a new label. See Creating labels. Click Select to view label details or search for a label. See Selecting labels.

Labels are only added to files that are successfully duplicated, force overwritten, or merged locally. Any duplicate comments you entered are also added to the label history.

10. Select a file and click Duplicate Changes to duplicate it or click Duplicate All to duplicate all files.

The Duplicate Changes Status dialog box opens and displays files with duplicate actions and reasons. See Duplicate changes actions. You can also perform many of the same actions available in the Duplicate Changes Preview dialog box.

11. Click Save As to save the results list or click Print to print it.

12. Click Close when you finish.

cherry-picking, cherry picking, cherrypicking