Question

Is it possible to rename a clearcase view ? If yes how to do it.

I usually give view name based on fix or enhancements that I would make in that view. Once complete I end up reusing that view for some other task. With other SCMs I do not have any problem, I understand based on its changes to the build tree. The clearcase very slow, if I have to know by change set it will take me 2-5 mins.

Was it helpful?

Solution

For a snapshot view, you can rename the root directory safely.

But for any view, (snapshot or dynamic), check cleartool mkview -view -replace. It should allow you to replace a tag, effectively renaming your view.

Make sure your view is stopped first (cleartool endview -server yourView)

-rep/lace

Replaces an existing tag registry entry with a new entry. (No error occurs if the tag does not exist.)
You can use this option to change the tag comment and access paths.
You cannot use -replace to change an existing tag's name; to do this, delete the tag with rmtag and then use mktag.

The last part actually points out the need to remove and then recreate the tag associated to your view.

Make sure to cleartool lsview -l -full -pro yourView first, in order to get all the parameters you will need when recreating the tag with the new name.

OTHER TIPS

For a dynamic view, you can use the following:

cleartool mktag -view -replace -tag <new view name> -host <Server host> \
-gpath <Global path> <Global path>

Where Server host and Global path can be obtained from the output of

cleartool lsview -l <view name to be renamed>

Then you remove the tag of the renamed view (old view name) via

cleartool rmtag -view <old view name>
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top