You can create an object and add it to the project
associated with the specified object. If you use a work area reference
form, the context project is associated with the specified work area
path. If you use a project reference specification form, the context
project is specified in that specification.
When you
create an object in a non-shared project, its default state is working.
When you create a file or directory in a shared project, its default
state is visible if it is a non-product, and shared if
it is a product.
When you create an object in a non-writable
directory, a new directory version is checked out automatically. Check
in the directory and the new object to make the new object available
to other users.
If you are in a shared project and your current
directory is not modifiable, the directory is checked out. The directory
is automatically associated with the specified task and checked in
to the integrate state. You can disable automatic check-in
by setting shared_project_directory_checkin to FALSE in your initialization
file.
About this task
ccm create [-t|-type type] [-v|-version version] [-task task_spec]
[-c|-comment comment_string] [-ce|-commentedit]
[-cf|-commentfile file_path] new_file_spec...
- -c|-comment comment
- Specifies to append a comment to all baseline projects and their
members when they are checked in to the released state. The comment 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 invoke 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.
- new_file_spec
- Specifies the new file or directory to be created. Thenew_file_spec must
be in one of these forms:
- A Work area reference form with a relative path ending
with the name of the new object, and optionally, the version delimiter
and version or a colon and version. The parent directory must reference
a controlled directory in a maintained work area.
- A Project reference form with a relative path ending
with the name of the new object. Optionally, the relative path can
end with the version delimiter and version or colon and version located
under a directory in the specified project.
- A File contents forms that contains either a work
area reference form or a project reference form.
The forms provide a context project and a context
parent directory. The object is created under the parent directory
in the specified context project. The new_file_spec is
not a general file_spec. You cannot use forms such
as an object reference form or query selection set reference form.
If the version is not specified, then 1 is used as the
default version.
When allow_delimiter_in_name is set to TRUE and ifnew_file_spec includes
a single version delimiter, the string is used as the name of the
object. For example, newfile-2 has the name newfile-2 with
a default version. With this setting, if you want to create a file
named newfile with version 2, specify
a new_file_spec of newfile and
use -version 2. If allow_delimiter_in_name is
set to FALSE, then any version delimiter in the new_file_spec is
processed as a version delimiter and you can specify the version.
- -task task_spec
- Specifies the task with which the new object is associated. If
the directory under which the new object is to be created is not modifiable,
it is automatically checked out and associated with that task. You
can set the task_spec to a single task. By default,
the new object and any automatically checked out directory are associated
with the current task. See Task specification for details.
- -t|-type type
- Specifies the type of the new object. If you do not specify a
type, the default is calculated from the extension (for example, a .c object
defaults to a csrc type).
- -v|-version version
- When specified, overrides any version specified in the new_file_spec.
This option is primarily intended for use when allow_delimiter_in_name is
set to TRUE. If new_file_spec includes a single
version delimiter, the string is used as the name of the object. For
example, newfile-2 has the name newfile-2 with
a default version. With this setting, if you want to create a file
named newfile with version 2, specify
a new_file_spec of newfile and
use -version 2. If allow_delimiter_in_name is
set to FALSE, then any version delimiter in the new_file_spec is
processed as a version delimiter and you can specify the version.
Example
- On Windows, create a C source object called sort.c in
the utils\sym_tool directory.
ccm create -type csrc utils\sym_tool\sort.c
- On UNIX, create
a C source object called sort.c in the utils/sym_tool directory.
ccm create -type csrc utils/sym_tool/sort.c
- Create a directory object called testcase under
the current directory.
ccm create -t dir
testcase