Checking Files Out of the Source Control System on UNIX®

Checking Out One or More Files Using the Current Directory Browser

  1. In the Current Directory browser, select the file or files to check out.

  2. Right-click, and from the context menu, select Source Control > Check Out. The Check out file(s) dialog box opens.

    Image of Check out of source control dialog box.

  3. Complete the dialog box:

    1. To check out the versions that were most recently checked in, select the Latest version option.

    2. To check out a specific version of the files, select the Version number option and type the version number in the field.

    3. To prevent others from checking out the files while you have them checked out, select Lock latest version. To check out read-only versions of the file, clear Lock latest version.

  4. Click OK.

An error appears in the Command Window if a file is already checked out.

After checking out files, make changes to them using MATLAB® software or another software product, and save the files. For example, edit an M-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 or files remain checked out. You can check in files from within MATLAB during a later session, or directly from your source control system.

Checking Out a Single File Using the Editor, or the Simulink® or Stateflow® Products

  1. Open the M-file, Simulink® model, or Stateflow® chart you want to check out. The title bar indicates the file is read-only.

  2. Select File > Source Control > Check Out. The Check out file(s) dialog box opens.

  3. Complete the dialog box as described in step 3 of Checking Out One or More Files Using the Current Directory Browser, and click OK.

Function Alternative

Use checkout to check out a file from the source control system. You can check out multiple files at once and specify checkout options. The checkout function takes this form:

checkout({'file1','file2', ...},'option','value')

For filen, use the complete path and include the file extension.

Use the option argument to

The options apply to all files being checked out. The files can be open or closed when you use checkout.

Example Using checkout Function—Check Out a Specific Version of a File

To check out the 1.1 version of the file clock.m, type

checkout('\myserver\mymfiles\clock.m','revision','1.1')

For other examples, see the reference page for checkout.

  


 © 1984-2008- The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS