Desktop Tools and Development Environment Previous page   Next Page

Checking Files Into the Source Control System

After creating or modifying files in MATLAB or related products, check them into the source control system. Check in from the Current Directory browser for one or more files. For only one file, you can also use the Editor/Debugger, Simulink, or Stateflow.

Checking In Files Using the Current Directory Browser

  1. From the Current Directory 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.

    Image of Check in dialog box.

The file is checked into the source control system. If a file contains unsaved changes when you try to check it in, you will be prompted to and must then save the changes to complete the checkin.

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

If you did not keep the file checked out and you keep the file open, note that it is a read-only version.

Checking In a File Using the Editor/Debugger, Simulink, or Stateflow

  1. From the Editor/Debugger, Simulink, or Stateflow, with the file open and saved, select File -> Source Control -> Check In.
  2. 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.

Function Alternative

Use checkin to check files into the source control system. The files can be open or closed when you use checkin. The checkin function takes this form:

checkin({'file1','file2', ...},'comments','comment_text',...
'option','value')

For filen, use the complete path and include the file extension. You must supply the comments argument and a comments string with checkin.

Use the option argument to

The comments argument and the lock and force options apply to all files checked in.

Example Using checkin Function.   To check in the file clock.m with the comment Adjustment for leap year, type

checkin('\myserver\mymfiles\clock.m','comments', ...
'Adjustment for leap year')

For other examples, see the reference page for checkin.


Previous page  Specifying the Source Control System Checking Files Out of the Source Control System Next page

© 1994-2005 The MathWorks, Inc.