IPnom Home • Manuals • ClearCase

 Rational ClearCase Commands Reference

ClearCase Stuff:ClearCase LinksClearCase BooksClearCase Commands ReferenceClearCase ForumsClearCase News
Keyword Live Search (10 results max):
 Type in part of a ClearCase command in the search box.
 
Commands Index:
  intro
  annotate
  apropos
  catcr
  catcs
  cc.icon
  cc.magic
  cd
  chactivity
  chbl
  checkin
  checkout
  checkvob
  chevent
  chflevel
  chfolder
  chmaster
  chpool
  chproject
  chstream
  chtype
  chview
  clearaudit
  clearbug
  cleardescribe
  cleardiffbl
  cleardiff
  clearexport_ccase
  clearexport_cvs
  clearexport_pvcs
  clearexport_rcs
  clearexport_sccs
  clearexport_ssafe
  clearfsimport
  cleargetlog
  clearhistory
  clearimport
  clearjoinproj
  clearlicense
  clearmake
  clearmake.options
  clearmrgman
  clearprojexp
  clearprompt
  cleartool
  clearviewupdate
  clearvobadmin
  comments
  config_ccase
  config_spec
  cptype
  credmap
  creds
  deliver
  describe
  diffbl
  diffcr
  diff
  dospace
  edcs
  endview
  env_ccase
  events_ccase
  export_mvfs
  exports_ccase
  file
  find
  findmerge
  fmt_ccase
  getcache
  get
  getlog
  help
  hostinfo
  init_ccase
  ln
  lock
  lsactivity
  lsbl
  lscheckout
  lsclients
  lscomp
  lsdo
  lsfolder
  lshistory
  ls
  lslock
  lsmaster
  lspool
  lsprivate
  lsproject
  lsregion
  lsreplica
  lssite
  lsstgloc
  lsstream
  lstype
  lsview
  lsvob
  lsvtree
  makefile_aix
  makefile_ccase
  makefile_gnu
  makefile_pmake
  makefile_smake
  makefile_sun
  man
  merge
  mkactivity
  mkattr
  mkattype
  mkbl
  mkbranch
  mkbrtype
  mkcomp
  mkdir
  mkelem
  mkeltype
  mkfolder
  mkhlink
  mkhltype
  mklabel
  mklbtype
  mkpool
  mkproject
  mkregion
  mkstgloc
  mkstream
  mktag
  mktrigger
  mktrtype
  mkview
  mkvob
  mount_ccase
  mount
  msdostext_mode
  mvfslog
  mvfsstorage
  mvfstime
  mvfsversion
  mv
  omake
  pathnames_ccase
  permissions
  profile_ccase
  promote_server
  protect
  protectvob
  pwd
  pwv
  query_language
  quit
  rebase
  recoverview
  reformatview
  reformatvob
  register
  relocate
  rename
  reqmaster
  reserve
  rgy_backup
  rgy_check
  rgy_passwd
  rgy_switchover
  rmactivity
  rmattr
  rmbl
  rmbranch
  rmcomp
  rmdo
  rmelem
  rmfolder
  rmhlink
  rmlabel
  rmmerge
  rmname
  rmpool
  rmproject
  rmregion
  rmstgloc
  rmstream
  rmtag
  rmtrigger
  rmtype
  rmver
  rmview
  rmvob
  schedule
  schemes
  scrubber
  setactivity
  setcache
  setcs
  setplevel
  setsite
  setview
  shell
  snapshot.conf
  softbench_ccase
  space
  startview
  type_manager
  umount
  uncheckout
  unlock
  unregister
  unreserve
  update
  version_selector
  view_scrubber
  vob_restore
  vob_scrubber
  vob_sidwalk
  vob_snapshot
  vob_snapshot_setup
  wildcards_ccase
  winkin
  xclearcase
  xcleardiff
  xmldiffmrg

cleartool

ClearCase and ClearCase LT user-level commands (command-line interface)

APPLICABILITY

ProductCommand type
ClearCasecommand
ClearCase LTcommand

Platform
UNIX
Windows

SYNOPSIS

  • Single-command mode:

    cleartool subcommand [ options/args ]

  • Interactive mode:

    cleartool [ –e ] [ –status ]

    cleartool> subcommand [ options/args ] 
    .
    .
    .
    cleartool> quit 

  • Display version information for ClearCase or ClearCase LT, the kernel, and cleartool:

    cleartool –ver·sion

  • Display version information for ClearCase or ClearCase LT, the kernel, cleartool, and the UNIX libraries or ClearCase or ClearCase LT DLLs on Windows that cleartool uses:

    cleartool –VerAll

DESCRIPTION

cleartool is the primary command-line interface to ClearCase and ClearCase LT version-control and configuration management software. It has a rich set of subcommands that create, modify, and manage the information in VOBs and views.

CLEARTOOL SUBCOMMANDS

Each cleartool subcommand is described in its own reference page, but not all subcommands are available in ClearCase LT. See the Applicability section of individual reference pages to determine whether the command is available in ClearCase LT.

annotate

apropos

catcr

catcs

cd

chactivity

chbl

checkin

checkout

checkvob

chevent

chflevel

chfolder

chmaster

chpool

chproject

chstream

chtype

chview

cptype

deliver

describe

diff

diffbl

diffcr

dospace

edcs

endview

file

find

findmerge

get

getcache

getlog

help

hostinfo

ln

lock

ls

lsactivity

lsbl

lscheckout

lsclients

lscomp

lsdo

lsfolder

lshistory

lslock

lsmaster

lspool

lsprivate

lsproject

lsregion

lsreplica

lssite

lsstgloc

lsstream

lstype

lsview

lsvob

lsvtree

man

merge

mkactivity

mkattr

mkattype

mkbl

mkbranch

mkbrtype

mkcomp

mkdir

mkelem

mkeltype

mkfolder

mkhlink

mkhltype

mklabel

mklbtype

mkpool

mkproject

mkregion

mkstgloc

mkstream

mktag

mktrigger

mktrtype

mkview

mkvob

mount

mv

protect

protectvob

pwd

pwv

quit

rebase

recoverview

reformatview

reformatvob

register

relocate

rename

reqmaster

reserve

rmactivity

rmattr

rmbl

rmbranch

rmcomp

rmdo

rmelem

rmfolder

rmhlink

rmlabel

rmmerge

rmname

rmpool

rmproject

rmregion

rmstgloc

rmstream

rmtag

rmtrigger

rmtype

rmver

rmview

rmvob

setactivity

schedule

setcache

setcs

setplevel

setsite

setview

shell

space

startview

umount

uncheckout

unlock

unregister

unreserve

update

winkin

GETTING HELP

cleartool provides several online help facilities for its subcommands:

  • Syntax summary. To display a syntax summary for an individual subcommand, use the help subcommand or the –help option:
    cleartool help Syntax of all subcommands
    cleartool help mklabel Syntax of one subcommand
    cleartool mklabel –help Syntax of one subcommand
  • Reference pages. cleartool has its own interface to the UNIX man(1) command and Windows Help Viewer. Enter cleartool man command-name to display the reference page for a command.

    Reference pages are also accessible from the Windows help system's main contents. On UNIX systems, type hyperhelp main.hlp to view the main contents.

    See the man and hyperhelp reference pages for more information.

USAGE OVERVIEW

You can use cleartool in either single-command mode or interactive mode. A single cleartool command can be invoked from a UNIX shell or the Windows command interpreter using this syntax:

cleartool subcommand [ options-and-args ] 

If you want to enter a series of subcommands, enter the cleartool command with no arguments. This places you at the interactive mode prompt:

cleartool>

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:

  • On UNIX systems, use the backslash (\)
  • On Windows systems, use the caret (^)

Interactive Mode Options

These options apply to interactive mode:

  • –e causes cleartool to exit upon encountering an error.
  • –status returns the status (0 or 1) of each cleartool subcommand executed.

Command Options

Command options may appear 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:

cleartool rmtype -lbtype -- -temporary_label-

Command Abbreviations and Aliases

Many subcommand names and option words can be abbreviated. A subcommand's syntax summary indicates all valid abbreviations. For example:

–pre·decessor

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:

cleartool checkin test.c
cleartool ci test.c 

ARGUMENTS IN CLEARTOOL COMMANDS

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 symbolic links, and directories that have been loaded into a snapshot view. Examples of arguments that specify file system objects:

cleartool ls .
cleartool mkelem new_doc
cleartool checkin -nc ..\src\main.h
 

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:

cleartool lock brtype:v2_release
cleartool describe vob:/vobs/smg_tmp
cleartool mkhltype tested_by
 

The sections “File System Objects” and “Non-File-System VOB Objects” more details about specifying objects.

Note: If a nonoption argument begins with a hyphen (), you may need to precede it with a double-hyphen argument to prevent it from being interpreted as an option.

Use of Slashes and Backslashes on Windows Systems

Slashes (/) and backslashes (\) can be used interchangeably in pathnames in cleartool commands. For example, the following command is valid on a Windows host:

z:\myvob> cleartool ls /srcvob/util.c

File System Objects

To specify a file system object as an argument, you can use either a full or relative pathname. In many cases, you can also use these variants: a view-extended pathname (full or relative) or a version-extended pathname (full or relative).

On UNIX systems, a full pathname begins with a slash. For example:

/usr/src/projectFull pathname
/usr/bin/ccFull pathname
/view/jpb/usr/src/project/test.cView-extended full pathname
/usr/src/project@@/main/3/test.c/main/bugfix/4Version-extended full pathname

On Windows systems, a full pathname begins with an optional drive letter and a backslash. For example:

C:\users\smg\test\test.c Full pathname (non-VOB object)
E:\myvob\src\main.c Full pathname to VOB object — E: is assigned to a view
\myvob\src\main.c Full pathname to VOB object; also called an absolute VOB pathname, because it begins with a VOB tag (\myvob); only legal if current drive is assigned to a view; also used in config specs
M:\smg_view\myvob\src\main.c View-extended full pathname (VOB object); drive M constitutes view-extended namespace
E:\vob_src\view_priv_dir\view_priv_file Full pathname (view-private file)
\myvob\src\main.c@@\main\3 Version-extended full pathname

Note: In general, you perform ClearCase and ClearCase LT operations on Windows in a view context, on a drive assigned with the Windows net use command, or by clicking Tools > Map Network Drive ➔ in Windows Explorer. It is rare to work directly on drive M, the default dynamic-views drive. However, it is common to use view-extended pathnames that include the M:\view-tag prefix.

On UNIX systems, a relative pathname does not begin with a slash or an implied slash (for example, ~user). For example:

test.cRelative pathname
../libRelative pathname
motif/libX.aRelative pathname
../../beta_vu/usr/src/projectView-extended relative pathname
test.c@@/main/4Version-extended relative pathname

On Windows systems, a relative pathname does not begin with a backslash. For example:

test.cRelative pathname
..\libRelative pathname
tcp\libw.lib Relative pathname
test.c@@\main\4 Version-extended relative pathname

Note: On Windows systems, pathnames relative to another drive (for example, C:\lib\util.o when C:\ is not the current drive) are not supported.

For both full and relative pathnames:

  • The standard operating system pathname of an element implicitly references the version selected by the current view.
  • A view-extended pathname references the version of the element selected by the specified view.
  • A version-extended pathname directly references a particular version in an element's version tree.

For more information, see the version_selector and pathnames_ccase reference pages.

Note: On Windows systems, although the ClearCase MVFS uses case-insensitive lookup by default, cleartool itself is case-sensitive.

Non-File-System VOB Objects

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:

[prefix:]name[@vob-selector]

where

prefix
Identifies the kind of object. The prefix is optional if the context of the command implies the kind of object. For example,

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 pathname. 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:

cleartool describe –pname lbtype:L

name
The name of the object. See the section “Object Names” for the rules about composing names.

vob-selector
VOB specifier. The default is the current working directory, unless the reference page specifies otherwise. Specify vob-selector in the form [vob:]pname-in-vob (for some commands, the vob: prefix is required; this is noted in the reference page)
pname-in-vob Pathname of the VOB tag (whether or not the VOB is mounted) or of any file system object within the VOB (if the VOB is mounted)

Object Names

In object-creation commands, you must compose the object name according to these rules:

  • It must contain only letters, digits, and the special characters underscore (_), period (.), and hyphen (-). A hyphen cannot be used as the first character of a name.
  • It must not be an integer; this restriction includes octal and hexadecimal integer values. However, non-integer names are allowed.
  • It must not be one of the special names “ . “, “ .. “, or “ ... “.

Although Windows imposes a limit of 260 bytes on object names, cleartool on Windows supports object names of up to 1024 bytes in length. 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.

PROCESSING OF VOB SYMBOLIC LINKS

In general, cleartool commands do not traverse VOB symbolic links; rather, they operate on the link objects themselves. For example:

  • You cannot check out a VOB symbolic link, even if it points to an element.
  • A describe command lists information on a VOB symbolic link object, not on the object to which it points.
  • A mklabel –recurse command walks the entire subtree of a directory element, but does not traverse any VOB symbolic links it encounters.

UNIX COMMAND-LINE PROCESSING

In single-command mode, the cleartool command you enter is first processed by the UNIX 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 shells:

Line continuationA \<NL> sequence is replaced by a <SPACE> character.
Character escapeThe two-character sequence \ special-char suppresses the special meaning of the character.
Single-quotingAllows white-space characters and other special characters to be included in command argument. Within a single-quoted string (' ... '), a double-quote character (") has no special meaning, and \ ' is replaced by '.
Double-quotingAllows white-space characters and other special characters to be included in command argument. Within a double-quoted string (" ... "), \" is replaced by ", and \ ' is replaced by '.
CommentingCommand lines that begin with a number sign (#) are ignored.
WildcardsFile name patterns (including *, ?, and so on) that are not enclosed in quotes are expanded as described in the wildcards_ccase reference page. These patterns are also supported in config specs and, except for ellipsis (...), by the UNIX shells. (The meaning of ellipsis is slightly different in config specs; see the config_spec reference page.)

In interactive mode, cleartool does not expand environment variables and does not perform command substitution.

WINDOWS COMMAND-LINE PROCESSING

Single-Command Mode

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:

  1. The standard command interpreter, cmd.exe, expands environment variables, but does no special processing for file name patterns, quotes, or other special characters (including the asterisk (*) and question mark (?) characters, which are expanded by individual commands).
  2. The C run-time library does interpret quotes, stripping each pair and passing its contents through to cleartool as a single argument. (To pass a quote character through to cleartool, escape it with the backslash ( \ ).)
  3. cleartool processes the resulting argument list directly, without any further interpretation.

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.

Interactive Mode

In interactive mode, cleartool itself interprets the command line; it recognizes various special characters and constructs:

Line continuation (^)A ^<NEWLINE> sequence is replaced by a <SPACE> character.
Character escape (\)The two-character sequence \ special-char suppresses the special meaning of the character.
Single-quoting (‘  ‘)Allows white-space characters and other special characters to be included in command argument. Within a single-quoted string (' ... '), a double-quote character (") has no special meaning, and \ ' is replaced by '.
Double-quoting (" ")Allows white-space characters and other special characters to be included in command argument. Within a double-quoted string (" ... "), \" is replaced by ", and \ ' is replaced by '.
Commenting (#)Command lines that begin with a number sign (#) are ignored.
WildcardsFile name patterns (including *, ?, and so on) that are not enclosed in quotes are expanded as described in the wildcards_ccase reference page. These patterns are also supported in config specs. (The meaning of ellipsis is slightly different in config specs; see the config_spec reference page.)

In interactive mode, cleartool does not expand environment variables.

OBJECT LOCKING

ClearCase and ClearCase LT provide 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:

VOB, element type, pool (non-directory elements only)

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.

EXIT STATUS

If you exit cleartool by entering a quit command in interactive mode, the exit status is 0. The exit status from single-command mode depends on whether the command succeeded (zero exit status) or generated an error message (nonzero exit status).

Note that for the diff command, success means finding no differences.

UNIX FILES

ccase-home-dir/doc/man/whatis whatis file
ccase-home-dir/doc/man/whatis.aux auxiliary whatis

SPONSORED LINKS



 

ClearCase Links • ClearCase Books • ClearCase Commands Reference • ClearCase Forums • ClearCase News