After you configure LabVIEW to work with a third-party source control provider, you can perform source control operations on any file or folder of items in a LabVIEW project or on individual VIs. If you perform source control operations on a folder, all appropriate items within the hierarchy are affected. For example, if you add files to source control, LabVIEW adds only files within the folder that you have not yet added to source control. Access the following operations by selecting Tools�Source Control and selecting among the available options. Within a LabVIEW project, you also can use the Source Control toolbar buttons or right-click a file or folder in the Project Explorer window and select the option from the shortcut menu.
You also can configure source control on individual LabVIEW projects from the Source Control page of the Project Properties dialog box. Configure source control for individual LabVIEW projects if you want to use a different source control project than the one you specify for the LabVIEW environment, or if you do not want to use source control with a LabVIEW project. LabVIEW projects use the source control configuration you specify for the LabVIEW environment by default. Select Project�Properties or right-click the project root and select Properties from the shortcut menu to display the Project Properties dialog box. Select Source Control from the Category list to display the Source Control page.
Refer to the following caveats when you use source control:
Consider separating compiled code from VIs and other file types that you store in source control. By default, when you edit a VI, LabVIEW automatically recompiles all VIs that call the changed VI, which introduces unsaved changes to the calling VIs. If the calling VIs are stored in source control, you must check them out and then check them back in. However, if you separate compiled code from the VIs within a VI hierarchy, changes to one VI do not produce unsaved changes elsewhere in the VI hierarchy. This behavior allows you to check out only the VI you want to modify.
If you use source control with VIs outside of a LabVIEW project, you cannot perform source control operations on project-specific items, such as project libraries (.lvlib) or projects (.lvproj).
If you attempt to perform source control operations on a VI in an LLB, LabVIEW performs the operations on the LLB that contains the VI, not on the VI itself. You cannot perform a source control operation on only one VI in an LLB.
If a VI is reentrant, you cannot perform source control operations on the clone of the source VI. LabVIEW dims the source control operation items in the Tools�Source Control menu of the clone VI.
You can complete the following source control operations in LabVIEW:
Get Latest Version�Copies the latest version of the selected file from source control to the local directory to synchronize the two versions. The latest version of the file in source control overwrites the version in the local directory.
Check In�Checks the selected file into source control. The version of the file in source control is updated to reflect the changes you made. If the file selected has unsaved changes, the Unsaved Files dialog box appears. You do not have to save the file to check it into source control.
Check Out�Checks out the selected file from source control. If you try to edit a file in source control that you did not check out, LabVIEW prompts you to check out the file if you configured source control to enable the prompt.
Undo Check Out�Cancels a previous check-out operation and restores the contents of the selected file to the previous version. Any changes you made to the file are lost.
Add to Source Control�Adds the selected file to source control. LabVIEW prompts you to add any dependent files, such as subVIs, to source control if you configured source control to enable the prompt.
Note��This operation is available after you save a file.
Caution��Be careful when you remove files from source control. Some source control providers delete the local directory copy of the file, all previous versions of the file that the provider maintains, and the history log for the file.
Show History�Displays the source control history of the selected file. The history contains a record of changes to the file after it was added to source control. The history provides information about the previous versions of the file, such as file check-in dates and user actions. You cannot perform this operation on folders.
Show Differences�Displays the differences between the local copy of the selected file and the version in source control. For text files, LabVIEW uses the default comparison tool of the source control provider. If you select a VI to compare, LabVIEW displays the results in the Differences dialog box. You cannot perform this operation on folders.
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.
Properties�Displays the source control properties for the selected file, including its check-out status and modification dates. You cannot perform this operation on folders.
Refresh Status�Updates the source control status of the files in the LabVIEW project or of the VI if you are working outside a LabVIEW project.
Run Source Control Client�Launches the file management client of the source control provider.
Note��The following source control operation appears in the shortcut menu when you right-click the project root.
Get Latest Version of All Files�Locates and retrieves the latest version of files that are missing from the project or that are out-of-date. LabVIEW retrieves the latest version of any missing or out-of-date files from source control. Information about missing files that LabVIEW cannot retrieve appears in the Missing File Information dialog box.