Comparing Files in Source Control

You can use LabVIEW to compare a local version of a file in source control with the latest version from the source control provider. Comparing files is useful when you are working on a large project in which files might change frequently. You can perform this operation on only one file at a time.

You can use a sort option to organize items within a project. The sort option you select does not alter the organization of the project on disk, which allows you to merge and compare fewer changes when you submit the project to source control.

If you select a VI to compare, LabVIEW displays the results in the Differences dialog box.

Note  If LabVIEW and the third-party source control provider are not compatible, LabVIEW launches the default comparison tool of the third-party source control provider. Perforce SCM and Rational ClearCase are not compatible with the procedure LabVIEW uses to complete a graphical differencing of VIs. Refer to the KnowledgeBase for more information about comparing VIs using Rational ClearCase.

Complete the following steps to compare two VIs in source control.

  1. If you are in a LabVIEW project, right-click the VI you want to compare and select Show Differences from the shortcut menu to display the VI Compare Options dialog box.

    If you are working on individual VIs outside a project, open the VI you want to compare. Select Tools»Source Control»Show Differences to display the VI Compare Options dialog box.
Note  If the VI contains any unsaved changes, the Unsaved Files dialog box appears and prompts you to save changes before continuing with the compare operation.
  1. Select the options you want to include in the comparison.
  2. Click the Compare button. When the comparison is complete, LabVIEW displays the differences between the two VIs.

Complete the following steps to compare two non-VI files in source control. You can compare non-VI files only within a project.

  1. From the project, right-click the file you want to compare and select Show Differences from the shortcut menu. The default comparison tool of the source control provider launches.
  2. When the comparison is complete, the third-party provider displays the differences between the two files.