Main Content

Three-Way AutoMerge Solution for Requirement Set and Link Set

If multiple users are working on the same set of requirement set and link set files in Git™, you can merge the changes into a single file by using the mlAutoMerge.

Configure Git Environment for AutoMerge

You can follow the process described in Customize External Source Control to Use MATLAB for Diff and Merge with Requirements Toolbox™ to merge changes in different branches in Git.

To use mlAutoMerge with the Git tool:

  1. At the MATLAB® command prompt, enter:

    comparisons.ExternalSCMLink.setupGitConfig()
  2. Create a project and add the project to Git. For more information, see Add Existing Project to Source Control.

Select and Merge Branches in Git

To select a branch and merge the changes:

  1. Change the current folder to your Git repository folder.

  2. Select Branches from the toolstrip.

  3. From Branches drop-down list, select a branch from which you want to merge the changes.

  4. Click Merge to merge from the selected branch.

    After merging of a requirement set file is complete, a log file <requirement_set_name>_merge_<timestamp>.log is generated in the Git repository folder. The log file contains changes in the SID values of the requirements during merging of requirement set (slreqx) files.

    Note

    If there are no conflicts in merging the branches, then merge modifies the target file. If, the changes conflict, you must view and resolve the conflicts manually.

Limitations

  • Git is the only supported source control tool.

  • You must resolve the merge conflicts manually.

  • When you Move up or Move down a requirement under its parent requirement, the change in order or sequence may not reflect in the merged requirement set.

  • You cannot merge the requirement set files that contain images.

Related Topics