MATLAB Function Reference |
Source control actions (Windows only)
Graphical Interface
As an alternative to the verctrl
function, use Source Control in the File menu for the Editor/Debugger, Simulink, or Stateflow, or in the context menu of the Current Directory browser.
Syntax
verctrl('action
',{'filename1','filename2',....},0
) result = verctrl('action
',{'filename1','filename2',....},0
) verctrl('action
','filename',0
) result = verctrl('isdiff
','filename',0
) list = verctrl('all_systems
')
Description
verctrl('
action
',{'filename1','filename2',....},
0
)
performs the source control operation specified by '
action
'
for a single file or multiple files. Enter one file as a string; specify multiple files using a cell array of strings. Use the full paths for each filename and include the extensions. Specify 0
as the last argument. Complete the resulting dialog box to execute the operation; for details about the dialog boxes, see the topic Source Control Interface on Windows Platforms in the MATLAB Desktop Tools and Development Environment documentation. Available values for '
action
'
are as follows:
result=verctrl('
performs the source control operation specified by action
',{'filename1','filename2',....},0
)
'
action
'
on a single file or multiple files. The action can be any one of: 'add'
, 'checkin'
, 'checkout'
, 'get'
, 'history'
, or 'undocheckout'
. result
is a logical 1
(true) when you complete the operation by clicking OK in the resulting dialog box, and is a logical 0
(false) when you abort the operation by clicking Cancel in the resulting dialog box.
verctrl('
performs the source control operation specified by action
','filename',0
)
'
action
'
for a single file. Use the full pathname for 'filename'
. Specify 0
as the last argument. Complete any resulting dialog boxes to execute the operation. Available values for 'action'
are as follows:
action Argument |
Purpose |
'showdiff' |
Displays the differences between a file and the latest checked in version of the file in the source control system. |
'properties' |
Displays the properties of a file. |
result=verctrl('
compares isdiff
','filename',0
)
filename
with the latest checked in version of the file in the source control system. result
is a logical 1
(true) when the files are different, and is a logical 0
(false) when the files are identical. Use the full path for 'filename'
. Specify 0
as the last argument.
list = verctrl('
displays in the Command Window a list of all source control systems installed on your computer.all_systems
')
Check In a File
Check in D:\file1.ext
to the source control system.
This opens the Check in file(s) dialog box. Click OK to complete the check in. MATLAB displays result = 1
, indicating the checkin was successful.
Add Files to the Source Control System
Add D:\file1.ext
and D:\file2.ext
to the source control system.
This opens the Add to source control dialog box. Click OK to complete the operation.
Display the Properties of a File
Display the properties of D:\file1.ext
.
This opens the source control properties dialog box for your source control system. The function is complete when you close the properties dialog box.
Show Differences for a File
To show the differences between the version of file1.ext
that you just edited and saved, with the last version in source control, run
MATLAB displays differences dialog boxes and results specific to your source control system. After checking in the file, if you run this statement again, MATLAB displays
List All Installed Source Control Systems
To view all of the source control systems installed on your computer, type
MATLAB displays all the source control systems currently installed on your computer. For example:
See Also
checkin
, checkout
, undocheckout
, cmopts
Source Control Interface on Windows Platforms topic in MATLAB Desktop Tools and Development Environment documentation
ver | version |
© 1994-2005 The MathWorks, Inc.