Merge branches

Users with administrative rights can merge branches back to the master branch in Tosca in order to merge changes from one version to another without manually redoing the work.

To merge a branch back to the master branch, follow the steps below:

  1. Open a workspace in your master branch.

Branches are pulled back into the master branch. This means that the merge needs to be done from the master branch. The window header displays the branch you are currently in.

  1. Navigate to the Home menu and click on Project. A project window will open.

  2. Right-click on the project root element and select the option Merge Branch in the context menu.

Merge branch

  1. Select the branch you want to merge back to the master branch, and click OK.

Select branch to merge

  1. Click Merge to complete the merge. If there are conflicts that need to be resolved, a Conflict Overview window opens.

  2. After the merge, the changes from your branch are applied locally to your master branch workspace. Check them in to your common repository to make them available to other users.

When a branch is successfully merged back to the master and checked in, the branch is deleted from the database.

Branches can only be merged back to the master branch if there are no conflicts. In case there are conflicts, you need to resolve them in order to complete the merge.

Resolve Conflicts

When you merge a branch back to the master branch and there are conflicts, a Conflict Overview window opens. This shows conflicts that need to be resolved before the merge can be completed.

A conflict occurs when you merge a branch back to the master branch, but you have made different changes to the same object in the master and in the branch. In this case, you need to tell Tosca Commander which change to accept in order to resolve the conflict.

In the Conflict Overview window, the navigation tree on the left indicates which objects have conflicts, and how many. Select an object from the navigation tree to see its node path and current state in the master and branch.

Conflict Overview window

To resolve a conflict, select the state you want to keep by enabling the checkbox in either the Master or the Branch.

When you have resolved all conflicts on an object, a blue checkmark appears next to that object in the navigation tree. When you have resolved all conflicts on all objects, the Merge button becomes available.

Conflict Overview window

Association changes

If the same object has a change to the same association in both the master and the branch, it cannot be merged.

Possible association changes are:

  • An object is moved, deleted, or inserted in both the master and the branch thus creating conflicting changes to the tree structure of the master and the branch.

    For example, if you add a new module to a module folder in the branch, and then add a different module to that same module folder in the master, you will not be able to complete the merge.

  • Changes to users or user groups in the master and branch.

  • Changes to bookmarks in the master and branch.

  • Changes to TestStep Libraries in the master and branch.

  • Changes to the business relevance of TestCase-Design Attributes in the master and branch.

  • Changes to the Dataset Definition or PrintGroup in the master and branch.

Association changes cannot be resolved. This means that any branch that contains such objects cannot be merged back to the master branch.