| MATLAB® | ![]() |
| On this page… |
|---|
Getting the Latest Version of Files for Viewing or Compiling Removing Files from the Source Control System Comparing the Working Copy of a File to the Latest Version in Source Control |
You can get the latest version of a file from the source control system for viewing or running. Getting a file differs from checking it out. When you get a file, it is write protected so you cannot edit it, but when you check out a file, you can edit it.
To get the latest version, follow these steps:
In the MATLAB Current Directory browser, select the directories or files that you want to get. If you select files, you cannot also select directories.
Right-click, and from the context menu, select Source Control > Get Latest Version.
The MATLAB Get latest version dialog box opens, listing the files or directories you selected.

You can now open the file to view it, run the file, or check out the file for editing.
The function alternative is verctrl with the get argument.
To remove files from the source control system, follow these steps:
In the MATLAB Current Directory browser, select the files you want to remove.
Right-click, and from the context menu, select Source Control > Remove from Source Control.
The MATLAB Remove from source control dialog box opens, listing the files you selected.

The function alternative is verctrl with the remove argument.
To show the history of a file in the source control system, follow these steps:
In the MATLAB Current Directory browser, select the file for which you want to view the history.
Right-click, and from the context menu, select Source Control > History.
A dialog box, which is specific to your source control system, opens. For Microsoft Visual SourceSafe, the History Options dialog box opens, as shown in the following example illustration.

Complete the dialog box to specify the range of history you want for the selected file and click OK. For example, enter my_name for User.
The history presented depends on your source control system. For Microsoft Visual SourceSafe, the History dialog box opens for that file, showing the file's history in the source control system.

The function alternative is verctrl with the history argument.
You can compare the current working copy of a file with the latest checked-in version of the file in the source control system. This highlights the differences between the two files, showing the changes you made since you checked out the file.
To view the differences, follow these steps:
In the MATLAB Current Directory browser, select the file for which you want to view differences. This is a file that has been checked out and edited.
Right-click, and from the context menu, select Source Control > Differences.
A dialog box, which is specific to your source control system, opens. For Microsoft Visual SourceSafe, the Difference Options dialog box opens.
Review the default entries in the dialog box, make any needed changes, and click OK. The following example is for Microsoft Visual SourceSafe.

The method of presenting differences depends on your source control system. For Microsoft Visual SourceSafe, the Differences for dialog box opens. This highlights the differences between the working copy of the file and the latest checked-in version of the file.

The function alternative is verctrl with the showdiff or isdiff argument.
To view the source control properties of a file, follow these steps:
In the MATLAB Current Directory browser, select the file for which you want to view properties.
Right-click, and from the context menu, select Source Control > Properties.
A dialog box, which is specific to your source control system, opens. The following example shows the Microsoft Visual SourceSafe properties dialog box.

The function alternative is verctrl with the properties argument.
All the MATLAB source control actions automatically start the source control system to perform the action, if the source control system is not already open. If you want to start the source control system from MATLAB without performing a specific action source control action,
Right-click any directory or file in the MATLAB Current Directory browser
From the context menu, select Source Control > Start Source Control System.
The interface to your source control system opens, showing the source control project associated with the current directory in MATLAB. The following example shows the Microsoft Visual SourceSafe Explorer interface.

The function alternative is verctrl with the runscc argument.
![]() | Checking Files Into and Out of Source Control from the MATLAB Desktop on Microsoft Windows | Performing Source Control Actions from the Editor, Simulink, or Stateflow File Menu on Microsoft Windows | ![]() |
| © 1984-2008- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |