Integrating Simulink and Stateflow with Tortoise SVN using SimDiff
TortoiseSVN launches SimDiff for .mdl files when you compare versions or resolve a merge conflict.
TortoiseSVN can launch an external diff or merge tool when you compare versions or resolve a merge conflict. One external tool can cover every file. That is not recommended for SimDiff. Configure the tool for particular file extensions instead.
If there is no merge conflict, TortoiseSVN does not launch the external tool. For example, if a model file changed on a branch and did not change on the main branch, merging the branch does not open SimDiff.
More on merging and resolving conflicts is in the TortoiseSVN documentation: Merging and Resolving conflicts.
Configuring SimDiff with TortoiseSVN
You can configure SimDiff for diff, for merge, or for both. Open the TortoiseSVN Settings dialog first: right-click in Windows Explorer, then TortoiseSVN, then Settings.

Configuring SimDiff as a diff tool
- In the sidebar tree, select Diff Viewer.
- Click Advanced to open the advanced settings.
- Edit the entry for extension
.mdl, or add a new entry if it does not exist. - Enter the command below and press OK in every dialog.
"C:\Program Files\EnSoft\SimDiff\simdiff4.exe" -l %base -r %mine
Configuring SimDiff as a merge tool
- In the sidebar tree, select Diff Viewer, then Merge Tool.
- Click Advanced to open the advanced settings.
- Edit the entry for extension
.mdl, or add a new entry if it does not exist. - Enter the command below and press OK in every dialog.
"C:\Program Files\EnSoft\SimDiff\simdiff4.exe" -merge -b %base -l %mine
-r %theirs -o %merged
The commands above assume SimDiff is in its default install directory. Change the command if it is installed somewhere else. More on external tools is in the TortoiseSVN settings documentation.
Using another client? See Version Control Setup.
