How to find root folder in which a component is associated?
I am able to find it manually through project explorer -> Components-> properties
How to do it using cleartool command. I need it as i need to create config spec which can be applied in base clearcase view and view the UCM view contents.
Have a look to the options of "Format strings for command output" (fmt_ccase):
You can get that way to root directory (usually
\aVob
for "vob component" or "\aVob\aRootDir
" for components within a Vob).From there, for managing access to specific baselines of UCM components in non-UCM views, you can follow an approach similar to "Merging from a Project to a Non-UCM Branch" in a perl script (done to merge, but you can adapt it, in order to build a config spec for said non-UCM view):
This script below is for projects which uses recommended baselines, and is given as an example of using the "
%[root_dir]p
".If you don't use recommended baselines, you would simply list all components for a given stream:
cleartool descr -fmt "%[components]CXp" stream:aStream@\aPVob
You would then generate (and apply to a config spec) a file similar to your other question "Clearcase config spec behaves odd when using
setcs
command".The OP reports getting this approach working, using Powershell:
(he had initally issues with my example copied form the IBM site, where hyphens-minus '
-
' are replaced by non-ASCII minus '–
': , '- vs. –: -–
': see "What's the toughest bug you ever found and fixed?"):