You can use different versions of an object or add existing objects as new project members under the specified directory. The directory objects added in must be specified in a form that provides a context project, such as a project reference form or a work area reference form.
If a directory entry exists for an object, then the command uses the specified object under its corresponding directory entry. If a directory entry does not exist for the object, then the directory is automatically checked out and associated with the specified task. A new directory entry is then created for the object, which is used in the context project for the directory. If the context project is in the working state, you must be the owner of that project. If the context project is in the prep state, you must be a build manager.
The following applies if you are using a different version of a subcomponent. If the subcomponent is a non-modifiable product with a component that is different from the parent project, the different version of the product is associated with the current task.
About this task
ccm use -p|-project -dir dir_spec [-t|-task task_spec] project_spec...
ccm use -dir dir_spec [-t|-task task_spec] file_spec...
- -dir dir_spec
- Specifies the directory under which different versions of objects or existing objects are added. The dir_spec is a file_spec (see File specification) that you can set to a single directory object and provides a context project. A Project reference form or a Work area reference form provides such a context project.
- file_spec
- Specifies the object versions you are using. See File specification for details.
- project_spec
- Specifies the projects to be used. See Project specification for details.
Special handling might be required in shared projects (see shared_project_directory_checkin).
- -t|-task -task_spec
- Specifies the task that is associated with any directory that was checked out when a new member was added. If omitted, the current task is used. When an object is added to a directory, if the directory is in a static state such as integrate, it is automatically checked out. If the directory is in a state that is writable by you, then the existing directory version is updated with the new member. See Task specification for details.
Example
- Use different version of the project SubPrj-2:
ccm use -p SubPrj-2:project:1
- Use the version of clear.c chosen by the selection rules.
ccm use -rules clear.c
- Add the SubPrj-one:project:1 project to the root directory of the TopPrj-top:project:1 project. (The current directory can be any directory; the projects might not have maintained work areas.)
ccm use -p -dir TopPrj@TopPrj-top -task 31 SubPrj-one:project:1
- Use the a.txt-1.2:ascii:1 object to the dir1 directory under the root directory of the TopPrj-top:project:1 project.
ccm use -dir TopPrj\dir1@TopPrj-top -task 31 a.txt-1.2:ascii:1
- Use a different version for the a.txt-1.1:ascii:1 object.
ccm use -dir TopPrj\dir1@TopPrj-top a.txt-1.1:ascii:1