Moves elements and directory trees from one VOB to another
Product | Command Type |
|---|---|
ClearCase | cleartool subcommand |
Attache | command |
Platform |
|---|
UNIX |
Windows |
The relocate command moves elements, including directory trees, from one VOB to another. All related VOB database entries and data containers are moved to the target VOB. relocate preserves the "move from" VOB's namespace by substituting VOB symbolic links for moved elements.
NOTE: In Attache, after moving elements from one VOB to another, relocate does not move the corresponding elements in the workspace.
The more common use of relocate involves splitting a piece from one VOB and moving it to a newly created VOB. However, you can move an arbitrary collection of elements from one VOB to a location in any other VOB. You cannot use relocate to move an element to a new location in the same VOB. Use cleartool mv for this purpose.
For a dynamic view, view-private files and nonversioned DOs are not relocated. If a relocated directory contains view-private files, they are stranded; DOs are removed.
WARNING: The relocate command makes irreversible changes to at least two VOBs and their event histories. We recommend that you not use it frivolously or routinely for minor adjustments. Furthermore, you are advised to stop VOB update activity before and during a relocate operation.
Identities: You must have one of the following identities:
VOB owner (for both VOBs)
root (UNIX)
Member of the ClearCase group (ClearCase on Windows)
Local administrator of the ClearCase LT server host (ClearCase LT on Windows)
Locks: An error occurs if one or more of these objects are locked in the source VOB: VOB, element. An error occurs if one or more of these objects are locked in the destination VOB: VOB, element, branch type, element type, label type, hyperlink type, attribute type.
Mastership: (Replicated VOBs only) Your current replica must master any element to be relocated.
Other: The following restrictions apply:
relocate cannot move checked-out elements. It fails during the selection phase if it finds any checked-out files among the ones it is going to move.
relocate may fail if there are restrictive triggers on checkout, checkin, and rmelem commands. Because relocate runs these commands, triggers on these operations are also executed. If these triggers cause relocate to fail, you must disable the triggers or remove them from those operations, and run relocate again.
SUPPRESSING THE CONFIRMATION QUERY. Default: After displaying the relocate set, relocate asks you to confirm that these are the elements you want to relocate.
CONTROLLING SPECIAL CASE HANDLING. Default: See the Administrator's Guide for information on how the selection set is filtered.
WRITING A LOG FILE. Default: relocate creates a log file in the current directory with the name
relocate.log.date-time.
RELOCATING IN UPDATE MODE. Default: relocate proceeds as described in the Administrator's Guide.
SPECIFYING WHICH FILES TO RELOCATE. Default: None.
SPECIFYING A TARGET VOB AND DIRECTORY. Default: None. You must supply a target directory in a second VOB.
| Valid | Invalid |
|---|---|
\foo\bar | m:\foo\bar |
foo | f:foo |
..\foo | g:..\foo |
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.
NOTE: In the UNIX examples that follow, arguments and output that show multicomponent VOB tags are not applicable to ClearCase LT, which recognizes only single-component VOB tags. In this manual, a multicomponent VOB tag is by convention a two-component VOB tag of the form /vobs/vob-tag-leaf-for example, /vobs/src. A single-component VOB tag consists of a leaf only-for example, /src. In all other respects, the examples are valid for ClearCase LT.
Move subdirectory glib (and its one file, file.c) from /vobs/lib to the newly created VOB /vobs/gui. Query on borderline elements. To illustrate how relocate replaces element names with symbolic links in the source VOB, the example uses a relative pathname to specify the target VOB.
After relocating glib, examine the RelocationVOB hyperlink added to /vobs/gui.
% cd /vobs/lib
cmd-context setcs -default
cmd-context relocate -qall ./glib ../gui
Logfile is "relocate.log.09-Apr-99.14:11:37".
Selected "glib".
Selected "glib/file.c".
Do you want to relocate these objects? [no] yes
Checked out "." from version "/main/3".
Checked out "/vobs/gui" from version "/main/0".
Locking selected objects
Locked "glib"
Locked "glib/file.c"
Recreating selected objects
Created "glib"
updated branch "/main"
updated version "/main/0"
created version "/main/1"
Created "glib/file.c"
updated branch "/main"
updated version "/main/0"
created version "/main/1"
Cataloging new objects
cataloged symbolic link "/vobs/lib/glib/.@@/main/2/glib" ->
"../gui/glib"
cataloged symbolic link "/vobs/lib/glib/.@@/main/3/glib" ->
"../gui/glib"
cataloged "/vobs/lib/.@@/main/CHECKEDOUT.32/glib"
cataloged symbolic link "/vobs/lib/glib/.@@/main/1/file.c" ->
"../gui/glib/file.c"
cataloged symbolic link "/vobs/lib/glib/.@@/main/2/file.c" ->
"../gui/glib/file.c"
cataloged "/vobs/gui/glib@@/main/1/file.c"
Removing original objects
removed "glib/file.c"
removed "glib"
Checked in "/vobs/lib/." version "/main/4".
Checked in "/vobs/gui/." version "/main/1".
cmd-context describe vob:/vobs/gui
versioned object base "/vobs/gui"
created 09-Apr-99.13:50:16 by CCase Admin (clearadm.sys@propane)
"relocate target for former directory /vobs/lib/gui"
VOB storage host:pathname "propane:/usr1/vobstore/gui.vbs"
VOB storage global pathname "/net/propane/usr1/vobstore/gui.vbs"
VOB ownership:
owner clearadm
group sys
Hyperlinks:
RelocationVOB@33@/vobs/gui vob:/vobs/gui -> vob:/vobs/lib/
|
Feedback on the documentation in this site? We welcome any comments!
Copyright © 2001 by Rational Software Corporation. All rights reserved. |