This section explains how to move, remove, and rename elements.
Because directories as well as files are under ClearCase control, you can move or remove elements from specific versions of directories without affecting the element itself. Moving or removing elements creates new versions of the parent directories to record the modifications.
For example, version 4 of \gui_vob\hello_world\src contains an element named prog.c. If you remove prog.c from the hello_world\src directory, ClearCase creates version 5 of \gui_vob\hello_world\src, which does not contain the prog.c file element. The element prog.c itself is not modified (Figure 32).
Figure 32 Removing an Element Name from a Directory
Before you move or remove an element name from a directory, verify with your project manager that your changes will not adversely affect other team members or break project builds.
In the ClearCase Explorer Details pane, drag an element to its destination directory in the Folder Window.
In the ClearCase Explorer Details pane, right-click an element and click Cut. In the Details pane, right-click the destination directory and click Paste.
Use the cleartool relocate command.
WARNING: The relocate command makes irreversible changes to at least two VOBs and their event histories. We recommend that you not use it for minor adjustments. Furthermore, we recommend that you stop VOB update activity before and during a relocate operation. Check with your project manager and ClearCase administrator before using the relocate command.
In the ClearCase Explorer Details pane, right-click an element and click Delete.
Removing an element from its parent directory does not affect the element itself, but two other types of a removal operation do irrevocably affect an element, and we recommend that you be very conservative in using these operations:
Removing a version from an element's version tree. For more information, see the rmver reference page in the Command Reference.
Removing an element from a VOB. For more information, see the rmelem reference page in the Command Reference.
Renaming an element creates a new version of the parent directory to catalog the new element name. The element uses its new name in subsequent versions of its parent directory, but previous versions of the parent directory refer to the element by its previous name (Figure 33).
Before you move or remove an element name from a directory, verify with your project manager that your changes will not adversely affect other team members or break project builds.
In the ClearCase Explorer Details pane, right-click an element and click Rename.
In the Details pane, type a new name for the element
Press ENTER.
|
Feedback on the documentation in this site? We welcome any comments!
Copyright © 2001 by Rational Software Corporation. All rights reserved. |