Documentation

This is machine translation

Translated by Microsoft
Mouse over text to see original. Click the button below to return to the English verison of the page.

Check Files In and Out from MSSCCI Source Control

    Note:   MSSCCI support will be removed in a future release. Replace this functionality with one of the following options.

    • Use a source control system that is part of the MathWorks® Source Control Integration with the Current Folder browser.

    • Use the Source Control Software Development Kit to create a plug-in for your source control.

    • Use the MATLAB® system function and the command-line API for your source control tool to replicate existing functionality.

Before checking files into and out of your source control system from the MATLAB desktop, be sure to set up your system for use with MATLAB as described in Set Up MSSCCI Source Control.

Check Files Into Source Control

After creating or modifying files using MATLAB software or related products, check the files into the source control system by performing these steps:

  1. In the Current Folder browser, select the files to check in. A file can be open or closed when you check it in, but it must be saved, that is, it cannot contain unsaved changes.

  2. Right-click, and from the context menu, select Source Control > Check In.

  3. In the resulting Check in file(s) dialog box, you can add text in the Comments field. If you want to continue working on the files, select the check box Keep checked out. Click OK.

If a file contains unsaved changes when you try to check it in, you will be prompted to save the changes to complete the checkin. If you did not keep the file checked out and you keep the file open, note that it is a read-only version.

Check Files Out of Source Control

From MATLAB, to check out the files you want to modify, perform these steps:

  1. In the Current Folder browser, select the files to check out.

  2. Right-click, and from the context menu, select Source Control > Check Out.

  3. The resulting Check out file(s) dialog box lists files you selected to check out. Enter comment text in the Comments field, which appears if your source control system supports comments on checkout. Click OK.

After checking out a file, make changes to it in MATLAB or another product, and save the file. For example, edit a file in the Editor.

If you try to change a file without first having checked it out, the file is read-only, as seen in the title bar, and you will not be able to save any changes. This protects you from accidentally overwriting the source control version of the file.

If you end the MATLAB session, the file remains checked out. You can check in the file from within MATLAB during a later session, or folder from your source control system.

Undoing the Checkout

You can undo the checkout for files. The files remain checked in, and do not have any of the changes you made since you last checked them out. To save any changes you have made since checking out a particular file click Save on the Editor or Live Editor tab, select Save As, and supply a different file name before you undo the checkout.

To undo a checkout, follow these steps:

  1. In the MATLAB Current Folder browser, select the files for which you want to undo the checkout.

  2. Right-click, and from the context menu, select Source Control > Undo Checkout.

    The MATLAB Undo checkout dialog box opens, listing the files you selected.

  3. Click OK.

Was this topic helpful?