Software development benefits from the ability to track changes to source code. Graphical differencing makes this possible by enabling developers to see exactly what changes were made between different versions of VIs, which is an important part of code reviews and helps focus software validation efforts. This functionality is now available from the command-line prompt to facilitate better integration with source code control (SCC) providers.
Graphical differencing shows a visual comparison of two VIs and specifically highlights and lists everything that is different between them. The example below has highlighted objects on the block diagram that have been moved outside of a case structure. The lower window shows the comprehensive list and checks off all of the items that have been examined, which is beneficial for code reviews.
Figure 1: Graphical differencing highlights and lists everything that has been modified between different versions of VIs.
This feature can be invoked in one of two ways:
The second option enables SCC providers to override default, text-based editors so that differencing can be performed outside of the LabVIEW development environment. Consult your SCC provider for information on how to override the default text-based comparison tool.
Use the following syntax to configure any arguments that LVCompare.exe needs.
lvcompare.exe <absolute path to VI 1> <absolute path to VI 2> [-lvpath <path to LabVIEW>][-noattr][-nofp][-nofppos][-nobd][-nobdcosm][-nobdpos]
As an example, if you have this configured with TortoiseSVN, you can simply right click on the file in the Windows Explorer and select 'Diff' to launch the comparison utility.
Figure 2: The TortoiseSVN Client for Subversion can invoke graphical differencing with the command-line interface in LabVIEW 2009 or later.