Salesforce

Branch Merge (Magic xpa 4.x)

« Go Back

Information

 
Created BySalesforce Service User
Approval Process StatusPublished
Objective
Description

Branch Merge

You can merge two project branches using the Compare & Merge tool.

This tool is available by contacting your local representative.

Preliminary Actions

The Compare & Merge tool supports source files saved in Magic xpa 3.1 or later. Source files saved in Magic xpa V2.x are still in the old structure.

In this case, you should update the source files before attempting to merge the branch. This can be done by activating the Update Project Source Files entry from the Options menu.

Working with Branches

When working with branches, it is important to make the following changes in the branch’s .edp file:

  1. Change the value of the VCProjectName property to refer to the branch name.

  2. Change the value of the VCProjectID project to a unique number between all your branches. This number will identify the newly created item per the branch to better identify changes.

Defining the Compare & Merge Tool

To perform the merge action using the Compare & Merge tool, you need to define it in the Version Control software that you use.

For Vault, click the Tools menu, followed by Options. Then park on Diff/Merge, and define the following under the Merge group:

  1. Program – The path to the merge program, such as: C:\Program Files (x86)\Magic Compare 3\merge.exe

  2. Arguments – The value of: "%OTHER_PATH%" "%WORKING_PATH%" "%BASELINE_PATH%" "%DEST_PATH%"

For TFS, click the Tools menu, followed by Options. Under the Source Control entry, park on Visual Studio Team Foundation Server and click the Configure User Tools button. Click Add, and enter the following details:

  1. Extension – The value of: .xml

  2. Operation – The value of: Merge

  3. Command – The path to the merge program, such as: C:\Program Files (x86)\Magic Compare 3\merge.exe

  4. Arguments – The value of: %1 %2 %3 %4

Performing Branch Merge

After you have made changes in your code, you can execute the branch merge action from your Version Control software.

For example, in Vault, click the Tools menu, followed by Merge Branches, and then complete the wizard steps. In TFS, right click on the Source folder of either the branch or the main project and choose Branching and Merging \ Merge.

Note: Make sure to perform the merge on the Source folder and not the project folder. Performing the merge on the project folder will also change the VC project in the EDP.

For each change that you make in your application, there are two possible scenarios:

  1. The Compare & Merge tool can safely merge the change. This often happens when a change was made in the source but not in the destination. In this case, the Compare & Merge tool will automatically apply the changes to the destination branch and no manual intervention is required.

  2. The Compare & Merge tool cannot merge the changes. This often happens when a change was made to the same object both in the source and destination branches. In this case, the Compare & Merge tool will alert you that there is a conflict. The Compare & Merge tool will display the conflicts, and you will be asked to choose which change should be used. Note that a conflict is defined as a change made to the same object in both the source and destination branches. For example, if a variable size was changed in one branch and the init value of the same variable was changed in the other branch, this will be defined as a conflict.

Since version: 3.2

Reference
Attachment 
Attachment