You can check out files to own them and make them writable.
You can check out directories, but directories are checked out automatically
when you add a file to or move a file from the directory.
About this task
ccm co|checkout [-task task_spec] [-t|-to version|file_spec]
[-c|-comment comment_string] [-ce|-commentedit]
[-cf|-commentfile file_path] file_spec...
- -c|-comment comment
- Specifies to append a comment on baseline projects and their members
when they are checked in to the released state.
The -comment option can contain more than one line
and accepts backslash encoded values.
You can use
this option with -commentedit and -commentfile.
If you use the -commentedit option, the comment displays
in the default text editor.
- -ce|-commentedit
- Specifies to start the default text editor to compose and edit
the comment. The result saved from the text editor is used as the
final comment. You can use this option with the -comment and -commentfile options.
- -cf|-commentfile file_path
- Specifies to use the contents of the specified file for the comment.
If you specified -comment, it is appended to that
comment. You can use this option with the -commentedit option.
- file_spec
- Specifies the file or directory to be checked out. The object
must be specified using either a Work area reference form or a Project reference form to provide a context project
for the check out. See Folder specification for details.
- -t|-to version|file_spec
- Specifies the version and changes the name of the new, non-project
object, or specify the version of a new project or project hierarchy.
By default, the -to argument is interpreted
as a new version. For example, run this command:
ccm co foo.c -to bar
The new object version is foo.c-bar.
To change the name, you must include the object name
and the version in the destination argument. For example, run this
command:
ccm co foo.c -to bar.c-1
The new object version is bar.c-1.
If you are checking out a project, you can specify the
version only. If you are checking out a hierarchy of projects, the
new version is used for the project as well as its subprojects. Use
the -versions option to map new versions to old versions
of projects in the hierarchy. The -to and -versions options
are mutually exclusive. Also, if you do not specify the -to or -version option,
the default next version is computed automatically using a built-in
algorithm.
If you are checking out a version
of an object that is used in your current project, the new version
(the "to" version) is also used in your project.
Note: When you check out
to a new object name in a non-writable directory, a new directory
version is checked out automatically.
Note: If
you are in a shared project and your current directory is non-writable,
the directory is checked out and associated automatically with the
default (or specified) task. The directory is then checked in to the
integrate state.
You can disable this feature by setting
shared_project_directory_checkin to
FALSE in
your initialization file.
- -task task_spec
- Specifies the task to associate the newly checked out objects
with. If the current task is set and you do not specify a different
task, the objects you are checking out are associated with the current
task automatically. (See Setting or
clearing the current task for details).
You can set the task_spec to a single task. See Task specification for details.
Example
- Check out version
patch1 from version 1 of foo.c (version 3 of foo.c is
in the current directory).
ccm co -c "patch1:
fix symbol table bug" -to patch1 foo.c-1
- Check out the utils\tools (Windows)
or utils/tools (UNIX) directory, which currently
is at version 4.
Windows:
>
ccm co -c "added new files" c:\users\john\ccm_wa\test_db\projA-3\utils\tools
UNIX:
$ ccm co -c "added new
files" ~/ccm_wa/test_db/projA-3/utils/tools
- Set the comment and associate a task with the object
versions you are checking out.
ccm co -c
"comment string" -task task_number object_name1 object_name2