Desktop Tools and Development Environment |
Checking Files Out of the Source Control System
Check out files using the Current Directory browser for one or more files. For only one file, you can also use the Editor/Debugger, Simulink, or Stateflow.
Checking Out Files Using the Current Directory Browser
An error appears in the Command Window if the file is already checked out.
After checking out files, make changes to them in MATLAB or another product, and save the files. For example, edit an M-file in the Editor/Debugger.
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 directly from your source control system.
Checking Out a File Using the Editor/Debugger, Simulink, or Stateflow
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.
lock
option value to off
.
force
option value to on
.
revision
option, and assign the version number to the value
argument.
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
.
Checking Files Into the Source Control System | Undoing the Checkout |
© 1994-2005 The MathWorks, Inc.