Merge Requirement Set and Link Set Files with No Conflicts
This example explains how you can merge changes from multiple requirement set and link set files when there is no conflict.
If you are editing a requirements file which is also concurrently modified by another user, you can get the changes from the other user using Git™ merge. If you want to merge the files, you first have to make sure you have Git and run the comparisons.ExternalSCMLink.setupGitConfig
command.
To merge a file without any conflict:
1. At the MATLAB® command prompt, enter:
openProject("CruiseRequirementsMergeExample");
Running the script slreqCCMergeSetup.m
, attached with this example sets up two branches, User1Feature
and User2Feature
, where User2Feature
is the current active branch.
2. To inspect the changes in each branch, switch to that branch. In the Files panel, right-click and select Source Control > Branch Manager.
3. To view the revision of the files in the Comaprison tool, right-click the crs_req_func_spec.slreqx
requirement set file and click Show Differences.
The Comparison Tool shows the revision of the requirements set file.
4. To merge changes from User1Feature
branch to User2Feature
branch, set User2Feature
branch as the current branch and select User1Feature
branch in Branch Browser. Then, click Merge to execute the merge operation.
5. Close the project by entering:
close(currentProject);