This looks like a serious problem to me. I can't get the foundation baseline info on the integration stream.
Can not view the properties/baselines in spider1_wells_integration in clearprojexp tool!
I got the error message:
Unable to read the foundation baselines
If you cannot do it from the GUI, try it from the command line (DOS or shell)
cd /path/to/your/view
cleartool lsstream -anc -cview # just to check your current stream
cleartool descr -fmt "%[found_bls]CXp" stream:myStream#\myPVob
See "Display Current Baseline with Cleartool".
If there is an issue, chances are you will get a more complete error message that way (through the command-line interface 'cleartool', rather than relying on GUI error messages)
Related
I'm using windows. I need to extract activity ids of check ins in ClearCase.
I can get the current one through cleartool describe and then parsing the response for the word 'Activity'.
I'm looking to get the activity ids of it's previous versions.
How can I do that?
You don't have to parse the output of cleartool describe, if you combine it with fmt_ccase.
That allows you to:
get the previous version of an existing version
cd /path/to/view
cleartool describe -fmt "%[version_predecessor]p" afile
get all activity id with that version involved:
cd /path/to/view
cleartool describe -fmt "%[activity]p" afile##/a/previous/version
(that is using the version-extended pathname ##/... returned by the first cleartool describe)
I have an integration stream in ClearCase. I want to get a list with the names of all of its child streams that aren't marked as obsolete. Which command should I run?
A simple cleartool lsstream -tree myIntStream#\myPvob should be enough.
(Unix: cleartool lsstream -tree myIntStream#/vobs/myPvob)
As mentioned in cleartool lsstream:
Default
Lists only nonobsolete streams.
neves adds in the comments:
This also list all the activities of the stream. I think it is necessary to pass something the fmt option. I'd like just the name of the streams.
As I mention in "cleartool lsstream -tree get only list of child streams" (using fmt_ccase):
cleartool describe -fmt "%[dstreams]CXp" stream:myStream#\myPVob
The OP neves mentions in the comments having just the names with:
cleartool describe -fmt "%[dstreams]p" stream:myStream#\myPVo
As we are having many components , I am trying to describe all the baselines using following command
cleartool describe -l baseline:Baseline_2.1.0.13#\My_PVOB
It provides output like follows
"Build 13"
master replica: My_PVOB#\My_PVOB
owner: Admin
group: ABC
stream:Components_Integration#\My_PVOB
component: Baselines#\My_PVOB
label status: No Versions to Label
change sets:
promotion level: INITIAL
depends on:
Baseline_2.1.0.13.8206#\My_PVOB (Comp1#\My_PVOB)
Baseline_2.1.0.13.433#\My_PVOB (Comp2#\My_PVOB)
Baseline_2.1.0.13.423#\My_PVOB (Comp3#\My_PVOB)
Baseline_2.1.0.13.3763#\My_PVOB (Comp4#\My_PVOB)
Actually i want to get contents only below depends on: ( Want to get Just following contents)
Baseline_2.1.0.13.8206#\My_PVOB (Comp1#\My_PVOB)
Baseline_2.1.0.13.433#\My_PVOB (Comp2#\My_PVOB)
Baseline_2.1.0.13.423#\My_PVOB (Comp3#\My_PVOB)
Baseline_2.1.0.13.3763#\My_PVOB (Comp4#\My_PVOB)
How to omit the remaining information?
From the fmt_ccase man page:
%[depends_on]Cp
(UCM baselines) The baselines that the composite baseline directly depends on
So for a composite baseline:
cleartool descr -fmt "%[depends_on]Cp" baseline:aBaseline#\apvob
could do the trick, except it will print only the dependent baselines on one line, each name separated by space, and without their associated component name.
So you need to parse that output, and for each baseline name, do a:
cleartool descr -fmt "%[component]Xp" baseline:aBaseline#\apvob
(Or, if your naming convention for baselines allows for it, a simple:
cleartool describe -l baseline:Baseline_2.1.0.13#\My_PVOB | grep Baseline_
would be easier!)
Actually, the OP samselvaprabu took the last proposition to grep what he needed from the initial output. His grep is better than my proposal, because it doesn't depend on the Baseline naming convention, but on the PVob name of said baselines:
I am using windows so your last(simple) command gave me the idea.
Following command works in Dos
cleartool describe -l baseline:Baseline_2.1.0.13#\My_PVOB | find "#\My_PVOB)"
Read "fmt_ccase" manual, you'll find it over there:
cleartool man fmt_ccase
Running this command gives an error in Windows:
H:\>cleartool describe -fmt "%[object_kind]p" "M:\\my_cc_view\\"
it gives:
cleartool: Error: Unable to access "M:\\my_cc_view\": Input/output error.
Running the same command on a vob works:
H:\>cleartool describe -fmt "%[object_kind]p" "M:\\my_cc_view\\vob1"
directory version
H:\>cleartool describe -fmt "%[object_kind]p" "M:\\my_cc_view\\vob2"
directory version
In Linux it gives:
; cleartool describe -fmt "%[object_kind]p" /view/my_cc_view/vobs/
; null meta type**
I've been unable to find if this is a bug in clearcase, the closest one I could find was this.
It seems that running a describe on the the vobroot element is is a special case we must handle separately, is there a way to check if the path is the root?
Views, vobs, label types, branch types (etc) are referenced directly as follows. In the docs these are called "object-selector".
cleartool describe view:my_cc_view
cleartool describe vob:vob1
See cleartool describe man page.
Also, try a dot at the end to get the root directory element of a given vob.
cleartool describe /view/my_cc_view/vobs/.
cleartool: Error: Unable to access "M:\my_cc_view\": Input/output error.
Not sure why you get two '\' here: with one, it works on my Windows session, but it won't give you much:
ct descr -fmt "%[object_kind]p" "m:\my_cc_view"
**null meta type**
A view hasn't really an "object type". And it has no "object-selector" like "view:"
To see all characteristic of a view, type:
cleartool lsview -l -full -pro my_cc_view
(using the tag of the view).
I would like to list the available labels matching a particular string applied in the view.
I confirm a filter in cleartool find is not possible:
ct find . -ele "lbtype_sub(My_LAB*)" -print
would not work (no wildcard in query argument.
If you cannot use a grep in a shell pipe, can you consider using grep in an exec part of a find, like in this example?
ct find . -kind lbtype -exec "echo %CLEARCASE_PN%|grep MY_LAB"
If this is not acceptable, you need to write the result in a file and process it with another tool (sed?)
You have packages for Windows including Unix commands: see this SO question.
Of you have freeware emulating the grep command.
If you must stay with native Windows commands, you must redirect the result in a file, and use FIND (English translation).
Hmm. I'm not entirely sure about this although the following will list all labels used for a given VOB (entered using ClearTool command line application).
lstype -kind lbtype -invob vob_path_and_name -short
for example with a View mapped to drive U: VOB "Some_VOB" would be:
lstype -kind lbtype -invob U:\Some_VOB -short