Skip to content

Remove Problematic ClearCase Views

June 19, 2012

This handy little Perl script removes all traces of a view which is irremovable via conventional means – e.g. when the view storage is missing or inaccessible.

The script is design to run on UNIX in an interop environment, but can be easily be adjusted to other cases.

## Usage: perl <region> <view tag>
$region = $ARGV[0];
$region || die "Region must be specified!";
$tag = $ARGV[1];
$tag || die "View tag must be specified!";
## Detect view UUID
@uuid = `cleartool lsview -l -region $region $tag`;
foreach (@uuid)
  if (/View uuid/)
    s/View uuid: //;
    $uuid = $_;
# Remove the tag from the registry
system "cleartool rmtag -view -region $region $tag";
# Unregister the view
system "cleartool unreg -view -uuid $uuid";
# Remove view-related records from all VOBs
system "cleartool rmview -all -uuid $uuid";

Reference: Removing a view


From → ClearCase

Leave a Comment

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: