cleartool provides several online help facilities for its subcommands:
Reference pages are also accessible from the Windows help system's main contents.
You can use cleartool in either single-command mode or interactive mode. A single cleartool command can be invoked from a UNIX or Linux shell or the Windows command interpreter using this syntax:
If you want to enter a series of subcommands, enter the cleartool command with no arguments. This places you at the interactive mode prompt:
You can then issue any number of subcommands (referred to as “commands” from now on), ending with quit to return to the shell or command interpreter. You can continue cleartool commands onto additional lines as follows:
Command options may be displayed in any order, but all options must precede any nonoption arguments (typically, names of files, versions, branches, and so on). If an option is followed by an additional argument, such as –branch /main/bugfix, there must be white space between the option string and the argument. If the argument itself includes space characters, it must be enclosed in quotes.
If a nonoption argument begins with a hyphen (–) character, you may need to precede it with a double-hyphen argument, to prevent it from being interpreted as an option:
Many subcommand names and option words can be abbreviated. A subcommand's syntax summary indicates all valid abbreviations. For example:
The position of the dot (/ ) indicates that you can abbreviate the option to –pre, or to any intermediate spelling: –pred, –prede, and so on.
For option words, the minimal abbreviation is always three characters or fewer.
A few cleartool commands have a built-in command alias. For example, the alias for checkin is ci; the alias for checkout is co. These commands are equivalent:
Arguments in cleartool commands specify objects, either file system objects (which may or may not be in a VOB) or non-file-system VOB objects. file system objects are elements, versions, VOB symbolic links, derived objects, view-private directories, and view-private files. file system objects also include files, UNIX and Linux symbolic links, and directories that have been loaded into a snapshot view. Examples of arguments that specify file system objects:
Non-file-system VOB objects include types (attribute, branch, element, hyperlink, label, replica, trigger), pools, hyperlinks, replicas, and VOBs. Examples of arguments that specify non-file-system VOB objects:
The sections File system objects and Non-file-system VOB objects provide more details about specifying objects.
To specify a file system object as an argument, you can use either a full or relative path name. In many cases, you can also use these variants: a view-extended path name (full or relative) or a version-extended path name (full or relative).
On UNIX and Linux systems, a full path name begins with a slash. For example:
On Windows systems, a full path name begins with an optional drive letter and a backslash. For example:
On UNIX and Linux systems, a relative pathname does not begin with a slash or an implied slash (for example, ~user). For example:
On Windows systems, a relative path name does not begin with a backslash. For example:
For both full and relative path names:
For more information, see the version_selector and pathnames_ccase reference pages.
In cleartool commands, you specify non-file-system VOB objects (VOBs, types, pools, hyperlinks, and replicas) with object selectors.
Object selectors identify non-file-system VOB objects with a single string:
cleartool mkbrtype brtype:v3_bugfix
is equivalent to '
cleartool mkbrtype v3_bugfix
If a context does not imply any particular kind of object, cleartool assumes that a name argument with no prefix is a path name. For example, the command cleartool describe ddft describes a file system object named ddft, but cleartool describe pool:ddft describes the ddft pool.
If the name of a file system object looks like a prefix:name argument, you must use the –pname option to identify it. (In the mkhlink command, the options –fpname and –tpname serve the same function.) For example, to describe a file named lbtype:L, enter this command:
In object-creation commands, you must compose the object name according to these rules:
cleartool supports object names of up to 1024 bytes in length, although Windows imposes a limit of 260 bytes on object names. Consult your operating system documentation for more information about the maximum length of object names; keep in mind that in a multiplatform environment, object names should conform to the rules of the most restrictive platform.
In general, cleartool commands do not traverse VOB symbolic links; rather, they operate on the link objects themselves. For example:
In single-command mode, the cleartool command you enter is first processed by the UNIX or Linux shell. The shell expands file name patterns and environment variables, and it interprets quotes and other special characters. cleartool processes the resulting argument list directly, without any further interpretation.
In interactive mode, cleartool itself interprets the command line similarly, but not identically, to the UNIX and Linux shells:
In interactive mode, cleartool does not expand environment variables and does not perform command substitution.
In single-command mode, the cleartool command you enter is processed first by the Windows command interpreter and C run-time library, then by cleartool:
Some third-party shells perform additional command-line processing before passing the argument list through to cleartool. All descriptions and examples of cleartool command usage assume the standard cmd.exe interpreter.
In interactive mode, cleartool itself interprets the command line; it recognizes various special characters and constructs:
In interactive mode, cleartool does not expand environment variables.
ClearCase provides temporary access control through explicit locking of individual objects with the lock command. When an object is locked, it cannot be modified by anyone (except those explicitly excluded from the lock).
cleartool command descriptions list the locks that can prevent a command from being executed, even if you have the necessary permissions. For example, the chtype command lists three locks that would prevent you from changing an element type:
This means that chtype would fail if the VOB that contains the element were locked, if the element's type were locked (such as the text_file type), or if the storage pool containing the (nondirectory) element were locked.
comments, fmt_ccase, pathnames_ccase, permissions, profile_ccase, version_selector, wildcards_ccase, IBM Rational ClearCase Administrator's Guide