‹ Version Control Setup

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.

Windows Explorer menu with TortoiseSVN open and Settings circled in red

Configuring SimDiff as a diff tool

  1. In the sidebar tree, select Diff Viewer.
  2. Click Advanced to open the advanced settings.
  3. Edit the entry for extension .mdl, or add a new entry if it does not exist.
  4. Enter the command below and press OK in every dialog.
"C:\Program Files\EnSoft\SimDiff\simdiff4.exe" -l %base -r %mine
TortoiseSVN advanced diff settings, numbered 1 to 5: Diff Viewer, Advanced, Add, extension .mdl, and an external program path cut off at gram Files (x86)\\EnSoft\\SimDiff 4_3\\simdiff4.exe with -l %base -r %mine

Configuring SimDiff as a merge tool

  1. In the sidebar tree, select Diff Viewer, then Merge Tool.
  2. Click Advanced to open the advanced settings.
  3. Edit the entry for extension .mdl, or add a new entry if it does not exist.
  4. 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
TortoiseSVN Merge Tool settings, numbered 1 to 4: Merge Tool, Advanced, Add, extension .mdl, and an external program that ends in simdiff4.exe with -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.