You can add files or directories to source
control at any time during the development cycle. On Windows® systems,
you can also use cleartool mkelem to
create placeholders for nonexistent files and directories.
Tip: Do not rely on case to distinguish the names
of elements.
In UCM projects, if you add files and directories to your
development stream, they are not available to the rest of the project until
you deliver their corresponding activities.
In base ClearCase® projects,
the version selection rules for your view determine the branch on which the
first version of an element is created. Verify that the view you use to add
elements creates versions on an appropriate branch.
Other views attached to your stream (or in base ClearCase configured to
select versions from your branch) do not see the element until you check in
the parent directory of the element (on Windows systems, the Add
to Source Control command does this for you) and check in the
file or directory.
Tip: VOB links make it possible to have more than
one copy of a directory in a snapshot view. When you add a file or directory
to a snapshot view, all other instances of the parent directory that are loaded
into your view are updated.
The initial version of an element
The Add
to Source Control (on Windows systems only) or mkelem command
always creates an element and initializes its version tree by creating a single
branch (named main) and a single, empty version (version
0) on that branch.

Options for adding files to source control
The
following arguments for items in the Add to Source Control window (on Windows systems
only) or the mkelem command determine optional Rational® ClearCase behavior:
- Selecting Keep checked out in the
Add to Source Control window (Windows systems only) or using mkelem with
no arguments checks out the element. Any view-private data that corresponds
to the element path remains in your view only and is added to version 1 in
the VOB when you check in.
- Clearing Keep checked out in the
Add to Source Control window (Windows systems only) or using mkelem -ci checks
in the element, using any existing view-private data that corresponds to the
element path as the content for version 1. Your view config spec determines
the branch on which version 1 is created.
- Using mkelem -nco suppresses
automatic checkout; mkelem creates the new element, along
with the main branch and version /main/0 (on UNIX® systems)
or \main\0 (on Windows systems), but does not check
it out. If the element path exists, it is moved aside to a .keep file.
Importing files
If
you add a large number of files and directories to source control, use the clearexport_ccase command
(or other clearexport commands) and clearimport command.