Merging from Features to Versions

Versions

When a feature has no more open tasks it will appear in the My Tasks view under Features. From here you are able to merge the changes back into the version.

The 'Preview' button launches the Stream Comparer showing the file differences between the feature stream and the version stream. The Stream Comparer is described in the section called “Comparing Streams”.

The 'Merge' button launches the Feature Merge wizard. While the Feature Merge wizard is launched the version stream is locked to prevent other developers submitting changes to the version while you are performing the merge.

Note

You can also navigate to the feature in the Projects view. You can right-click the feature and select 'Show Differences' or 'Merge'.

The Feature Merge wizard initially asks whether you want to merge all the feature changes or select some specific changes. Typically you will want to merge all the feature changes.

Figure 5.8. Feature Merge Wizard - Merge All Changes?

Feature Merge Wizard - Merge All Changes?

After selecting to merge all the changes you will are asked for a description and whether you want to complete the feature. The description will be the version changeset description and is the feature name by default. Completing the feature will deactivate the feature so it no longer appears in the list. You can also preview the feature changes you are going to merge.

Figure 5.9. Feature Merge Wizard - Description

Feature Merge Wizard - Description

On selecting Finish all the feature changes will be merged into the version - so the version files will be identical to the feature files. If the feature was not up to date (i.e. not all the version changes had been merged into the feature) then the merge will fail.

If you choose to select which changes to merge then you will be presented with a list of the feature changes.

Figure 5.10. Feature Merge Wizard - Select Changesets

Feature Merge Wizard - Select Changesets

Check the changesets you want to merge and select 'Finish'. You will be asked if you want to merge the changesets automatically. If you choose the automatic merge then each changeset will be merged as a separate changeset. If you choose the manual merge then the Resolve Tool will be launched as described in the User Guide 'File Conflicts' section. If multiple changesets were selected for manual merge then they will be combined into a single changeset. Press 'Submit' to merge the changes into the version.

Figure 5.11. Resolve Tool

Resolve Tool