Cherrypicking Multiple Non-Consecutive Changes

The file below contains multiple changes:

Each delivery has created a new revision of the file and a new changeset:

cherrypick-changesets.png

You need to:

You can cherrypick the required lines of code by specifically selecting request CR_42 during a merge from request operation.

If you interactively review and do not automatically merge non-conflicting file content, the change tree on the Review Changes page of the Merge wizard looks similar to this:

cherrypick-review1.png

The default resolution for both revisions is Unresolved. Revision r2016#2 of the file was made before r2016#4. The changes applied by revision r2016#3 need to be excluded. Two merge operations are required, one for each delivery that was related to request CR_42:

  1. Merge revision r2016#2 into the target file.

  2. Save the target file.

  3. Merge revision r2016#4 with the target file saved in the previous step.

TIP  To cherrypick one specific revision ignore the revisions that you do not want to merge.

If you automatically merge non-conflicting file conflicts, the change tree on the Review Changes page of the Merge wizard looks similar to this:

cherrypick-review2.png

The default resolution for both revisions is Merge. The changes have been merged successfully by the default merge tool into the target.