Overview
Most source code control providers have built-in diff and merge capabilities for text-based files, but they also typically allow users to override the default utilities for specific file-types. The binary nature of LabVIEW file-types requires the use of custom utilities for diff and merge, which are available in the professional version of LabVIEW 2009 or later.
Calling graphical merge from an external application requires the ability to pass parameters to the command line. In windows, the executable to be run for Graphical Diff is available at the following location: C:\Program Files\National Instruments\Shared\LabVIEW Compare\LVCompare.exe. The analogous executable for Graphical Merge is available at C:\Program Files\National Instruments\Shared\LabVIEW Merge\LVMerge.exe.
Both executables offer a variety of command-line parameters that can be used to customize the behavior and results of the utility. As an example, these settings can be used to exclude changes that are purely cosmetic and do not affect the behavior of code.
Configuring TortoiseSVN for Graphical Diff
- Right-click in Windows Explorer to expose the TortoiseSVN options
- Mouse-over 'TortoiseSVN >> Settings'
- In the list of settings on the left, select 'Diff Viewer' under 'External Programs'
- On the right side of the dialog, select 'Advanced'
- When the 'Advanced diff settings' dialog appears, select 'Add'
- In the dialog that appears, type .vi as the extension
- Where it prompts you for the path to the external program, type the following: "C:\Program Files\National Instruments\Shared\LabVIEW Compare\LVCompare.exe" %mine %base -nobdcosm -nobdpos
- Repeat this operation for the file-type .ctl
Configuring TortoiseSVN for Graphical Merge
- Right-click in Windows Explorer to expose the TortoiseSVN options
- Mouse-over 'TortoiseSVN >> Settings'
- In the list of settings on the left, select 'Merge Tool' under 'External Programs'
- On the right side of the dialog, select 'Advanced'
- When the 'Advanced merge settings' dialog appears, select 'Add'
- In the dialog that appears, type .vi as the extension
- Where it prompts you for the path to the external program, type the following: "C:\Program Files\National Instruments\Shared\LabVIEW Merge\LVMerge.exe" %base %mine %theirs %merged
- Repeat this operation for the file-type .ctl
Related Links