Branch Applications
 What is CM?

 Versions & Branches

 Branch Applications

 Elements

 VOBs

 Branch Quiz

 Views

 ClearCase on NT

 Projects

 Essential Commands





Elements
A ClearCase element is the history for one file or directory. It contains all the versions on all the branches for that file. It also contains all the information about the file, such as which versions are labeled with what labels, which versions are checked out, when versions were checked in, by whom, etc. An element contains everything there is to know about a file.

In RCS and SCCS these are called history files. RCS history files end with ,v. SCCS history files begin with s..

All files and directories managed by ClearCase have exactly one element. You can change the name of a file or directory at any time, or move it from one directory to another, but it still associated with the same element.

Element and File Safety
Elements should never be removed, because it compromises older configurations! The following sequences are completely safe and do not harm older configurations:

Remove a file from the current directory:
cleartool checkout .
cleartool rmname filename

Rename a file in the current directory:
cleartool checkout .
cleartool mv oldname newname

Move a file from one directory to another:
cleartool checkout fromdir
cleartool checkout tomdir
cleartool mv fromdir/filename todir/.

You will be prompted for a checkout comment when you check out the directory.

Note that removing a file from a directory is not the same as removing the element. Removing a file from a directory just tells ClearCase that from now on that file is not in the directory. It still remains in previous versions of the directory.

This course does not even show you how to remove an element. Chances are good that your company has taken steps to prevent you from removing elements by making the command privileged.

An Element's Branch Structure
In all but the most trivial cases, each element is likely to have a unique branching structure. Even it it has all the same branches and labels as another element, those branches likely sprout from different versions and the labels are likely on different versions. Fortunately there is a simple way to see the entire branching structure for an element.

You can see it in a text report:
cleartool lsvtree filename

You can see a graphical window display:
cleartool xlsvtree filename

In both cases the element associated with filename is used to generate the report.

The report shows the branching structure, but also which versions have what labels, and which versions are checked out. This is the big picture for what is happening and has happened with this element, and in general every element's big picture is unique.


Previous Page Next Page
Branch Applications VOBs
Course Map
Search Help


Problems? Contact the webmaster: hoco@timefold.com
All content Copyright 1998-2007 Howard Cohen.
All rights reserved worldwide.
Do not print or duplicate.