rename

Assigns a new name to an existing object.

APPLICABILITY


Product

Command Type

ClearCase


cleartool subcommand


ClearCase LT


cleartool subcommand


Attache


command


MultiSite


multitool subcommand


Platform

UNIX


Windows

SYNOPSIS

rename [ -c·omment comment | -cfi·le comment-file-pname |-cq·uery | -cqe·ach | -nc·omment ]

[ -acq·uire ] old-object-selector new-object-selector

DESCRIPTION

NOTE: To move or change the name of a ClearCase or ClearCase LT file or directory element, use the mv command.

The rename command renames a ClearCase, ClearCase LT or MultiSite object-for example, a VOB storage pool, a replica, or a type object such as a label type.

If you are renaming a pool, no data container in the pool is affected.

If you are renaming a replica, the name change is propagated to other replicas, through the standard synchronization mechanism. This command is valid only at the replica that masters the VOB-replica object being renamed.

If you are renaming a type object, all instances of the type object, throughout the VOB, are also renamed. If the type object is global, all local copies of the type object are renamed. For example, if you rename a branch type from bugfix to rel1.3_fixes, all existing bugfix branches are also renamed to rel1.3_fixes. (For more information about global type renaming, see the Administrator's Guide.)

RESTRICTION: A VOB cannot contain a branch type and a label type with the same name.

NOTE: Do not use this command to rename an instance of a type, for example to rename a particular branch of a particular element. For that purpose, use chtype.

RESTRICTIONS

Identities: You must have one of the following identities:

Locks: An error occurs if one or more of these objects are locked: VOB, object.

Mastership: (Replicated VOBs only) Your current replica must master the object.

OPTIONS AND ARGUMENTS

EVENT RECORDS AND COMMENTS. Default: Creates one or more event records, with commenting controlled by your .clearcase_profile file (default: -nc). See the comments reference page. Comments can be edited with chevent.

-c·omment comment | -cfi·le comment-file-pname |-cq·uery | -cqe·ach | -nc·omment

Overrides the default with the option you specify. See the comments reference page.

HANDLING ECLIPSED OBJECTS.  Default: If renaming the object in an administrative VOB would eclipse an existing object in a client VOB, this command fails.

-acq·uire

Converts eclipsing objects to local copies of the new global type. The definitions of the of the object to be renamed and the object that would be eclipsed as a result of the rename operation must match, else this command fails.

SPECIFYING THE OLD AND NEW NAMES. Default: None.

old-object-selector
new-object-selector

The name of an existing object and a new name for it. Specify object-selector in one of the following forms:

vob-selector

vob:pname-in-vob

pname-in-vob can be the pathname of any file-system object within the VOB (if the VOB is mounted). It cannot be the pathname of the VOB storage directory or a VOB-tag. (Use mktag to change the name of a VOB-tag.)

attribute-type-selector

attype:type-name[@vob-selector]

branch-type-selector

brtype:type-name[@vob-selector]

element-type-selector

eltype:type-name[@vob-selector]

hyperlink-type-selector

hltype:type-name[@vob-selector]

label-type-selector

lbtype:type-name[@vob-selector]

trigger-type-selector

trtype:type-name[@vob-selector]

pool-selector

pool:pool-name[@vob-selector]

hlink-selector

hlink:hlink-id[@vob-selector]

oid-obj-selector

oid:object-oid[@vob-selector]

The following object selector is valid only if you use MultiSite:

replica-selector

replica:replica-name[@vob-selector]

The following object selectors apply to UCM:

activity-selector

activity:actvity-name[@vob-selector]

baseline-selector

baseline:baseline-name[@vob-selector]

component-selector

component:component-name[@vob-selector]

folder-selector

folder:folder-name[@vob-selector]

project-selector

project:project-name[@vob-selector]

stream-selector

stream:stream-name[@vob-selector]

For more information about object selectors, see the cleartool reference page.

EXAMPLES

The UNIX examples in this section are written for use in csh. If you use another shell, you may need to use different quoting and escaping conventions.

The Windows examples that include wildcards or quoting are written for use in cleartool interactive mode. If you use cleartool single-command mode, you may need to change the wildcards and quoting to make your command interpreter process the command appropriately.

In cleartool single-command mode, cmd-context represents the UNIX shell or Windows command interpreter prompt, followed by the cleartool command. In cleartool interactive mode, cmd-context represents the interactive cleartool prompt. In Attache, cmd-context represents the workspace prompt.

SEE ALSO

chactivity, chevent, chpool, chtype, describe, lspool, lstype, mkpool, mkreplica (in the Administrator's Guide for Rational ClearCase MultiSite), rmpool, rmtype, chmod(1)