HomeGeneralMerging ChangesetsHow to apply changes to non-conflicting file edits when merging

5.8. How to apply changes to non-conflicting file edits when merging

There are times when you are merging an edit to a file, but you need to modify the edit. For example, suppose you had versions 1 and 2 of a product (V1 and V2) both with a method M1.

In V2 you change the signature for M1 so it takes in an extra argument.

In V1 you make a call to M1 within another method. You then want to merge this change into V2. The problem is that you need to modify the new call to M1 to include the extra argument.

Prior to the 2009/2 release you would need to perform the merge within a workspace. After merging the changeset you can edit the file to add the new argument and then submit the file.

In 2009/2 we introduced the ability to launch the Resolve Tool for all file edits. To do this merge the changeset as normal and selecting for PureCM to NOT automatically merge the changeset. This will launch the changeset dialog and clicking on the file will show the edits made in V1.

You can now right-click on the file and select 'Resolve Interactively'. This will launch the Resolve Tool which should be familiar. You can double-click either side to use those changes, or we can hand edit the bottom pane. In this case I will add the new argument in the bottom pane.

When I have completed the edits for this file, I press the Save button. I am then taken back to the changeset dialog where I can see my changes have been applied.

After I have checked all the other files, I can save the Changeset Dialog. This will apply these changes to the server the same as any other merge.

 

This page was: Helpful | Not Helpful