Branch Applications
What is CM?

Versions & Branches

 Branch Applications

 Elements

 VOBs

 Branch Quiz

Views

ClearCase on NT

Projects

Essential Commands
 |  | 
 |  |
|

- Versions & Branches
-
One key reason ClearCase is an exceptional CM system is
because of its efficient support for branching. What
does that mean?
- A branch is a named
collection of sequential versions of a file. A given file
may have many different branches, each with its own
sequence of versions.
A branch name is first defined and then files and directories
may begin to accumulate versions on that branch. Not all
files in the ClearCase directory structure will have versions
on each defined branch. We say a file "has a branchname
branch" when there are versions "on branch branchname".
You can think of a branch as a sparse copy of the entire
ClearCase directory structure.
A simple branching structure for one file is depicted below.
It shows that there is a central branch called /main
and two side branches called /bugfixes and
/release2.
The branching structure of a file looks like a hierarchical
filesystem, where branches are directories and versions are
files.
NT Note:
Branch names use backslashes on NT. For example: \main,
\bugfixes, and \release2.
- /main
-
In fact, /main is a very special branch called the
trunk. Like an oak tree, the ClearCase branches all
sprout from the trunk, or from other branches. The /main
branch is always defined for every file, but other branches
may or may not be defined for any given file.
- Automatic Branching
-
Traditional Version Control systems like RCS, SCCS and
PVCS primarily operate on their own notion of a trunk.
They also support branching from that trunk, but they do
not support branches off of branches. Even though they
support branches, it is up to the engineer to manually
branch files and check files in on the correct branch.
Any mistake has terrible consequences.
In ClearCase, all branching is done automatically, so there
is no opportunity for an engineer to make a mistake.
- Version Identifiers
-
Until now we have referred to versions abstractly, without
actually naming them. In ClearCase, a version identifier
is a list of branch names followed by a numeric version
number which applies to the last branch in the list, all
separated by forward slashes. It looks suspiciously like
a unix-style pathname. The version number could
instead be a label.
Here are some examples of version identifiers. UNIX versions are in
black, NT versions are in brown:
/main/4
\main\4 |
The fourth version on the trunk. |
/main/release2/1
\main\release2\1 |
The first version on the release2 branch, which
sprouts from the trunk. |
/main/bugfixes/LATEST
\main\bugfixes\LATEST |
The latest (most recently checked-in version) on
the bugfixes branch, which sprouts from the trunk. |
The examples above show pairs of UNIX and NT versions which refer to
the same versions. Versions created on UNIX appear with backslashes on
NT, and versions created on NT appear with forward slashes on UNIX.
|
|
|
 |
|
|