Can we get the list of baselines of a project in clearcase within in a certain time period, say, last 6 months.
The cleartool lsbl command usually lists baselines:
per streams
from the oldest to the most recent
If you can restrict your search to one stream (ct lsbl -stream ...), you need to list everything and then filter the result.
You can use the fmt option to display only the name of the baseline and its date.
cleartool lsbl -fmt "%d %n\" -stream...
You would get results like:
2007-01-10T12:41:45+01:00 MYBL_20070110.1263
2007-01-25T16:33:13+01:00 MYBL_20070125.3901
2007-01-26T12:25:23+01:00 MYBL_20070126.7020
2007-01-31T12:21:44+01:00 MYBL_20070131.7277
2007-02-01T16:54:21+01:00 MYBL_20070201.7671
From there, you can filter and/or sort the results.
Related
Is there a cleartool describe format string or any other command that will print only the hyperlinks from an object? Like:
cleartool describe -long -ahlink -all vob:\MyVOB
but without the leading information.
When I run the formatted describe, as long as you're not dealing with > 150K of hyperlink data per version, you get the hyperlinks:
[brian#bullwinkle bcowan-testvob1]$ cleartool desc -fmt "%n\t%[hlink:TextType]p\n" .##/main/0
.##/main/0 "TextType#2#/vobs/bcowan-testvob1" -> "foobar"
And without the filter (another element):
[brian#bullwinkle bc-linuxtest]$ cleartool desc -fmt "%n\t%[hlink]p\n" /view/bc-linuxtest/vobs/bc-linuxtest/.##/main/foo/2
/view/bc-linuxtest/vobs/bc-linuxtest/.##/main/foo/2 "Merge#2#/vobs/bc-linuxtest" <- "/view/bc-linuxtest/vobs/bc-linuxtest/.##/main/18"
I need to retrieve the list of changes or activity in same branch for different component(or Project group). Say I am committing the changes for two components ABC & xyz in same branch. And whenever I create build I apply the label abc.00.date & xyz.00.date respectively. Now major CQ's are of abc so whenever I make build for xyz and apply lable, label attach to abc chnages and when I compare the baseline with comapre tool, it shows the chnages of abc project also.
My requirement is to get the changes between label of xyz.00.date group ONLY as there is numerous lables of two groups in same branch.
I need to retrieve the list of changes or activity in same branch for different component
The main command remains cleartool lsactivity, as illustrated here:
foreach act ( `cleartool lsact -in astream#/vobs/avob` )
set changeset = `cleartool lsact -fmt "%[versions]p" $act`
echo $changeset | tr ' ' '\n' >> $tmpoutput
end
For the difference between baselines, use cleartool diffbl, as in "Why does Clearcase diffbl include activities from my development stream when I diff integration stream baselines?"
cleartool diffbl -nmerge -act bl1 bl2
That will give you a list of activities that you can feed to the foreach loop above, modified as:
foreach act ( `cleartool diffbl -nmerge -act bl1 bl2` )
On Windows, those unix commands are available with the installation of Gnu On Windows: uncompress, and add GoW\bin to your %PATH%.
Running CC 8.0.0.3 w/UCM and ClearQuest enabled.
We have a build system which is supposed to run mkbl -view after a successful build in the integration stream. Normally this completes in a few seconds after each build. That works fine, but it turns out one build job omitted the mkbl command.
I am trying to retroactively apply the mkbl command for those. I need to do this 4x to come up to date.
BL label - #activities - # element versions
1.2.6 - 57 - 513
1.2.7 - 16 - 107
1.3.0 - 26 - 159
1.4.0 - 60 - 460
I have attempted the command:
cleartool mkbl -view my_view -act ${ACT_LIST} -inc -c "${LABEL}" ${LABEL}
where ACT_LIST is the list of activities (activity#/mypvob), since the prior baseline, LABEL is my label
It's been running over 12 hours and still has not even come back indicating creating baseline.
Am I doing this wrong? Is it just slow? Is it possible to retroactively apply a baseline?
Thanks.
First, it would be quicker for your first non-missing baseline is promoted to "full" instead of incremental: the delta (of files or activities) between two baselines would be quicker to compute.
You can keep creating incremental baselines on top of that full one.
Then you can start testing making a baseline with just one activity and see if that complete: making multiple baselines with the same label will lead to multiple baselines with different ID (same title).
Is it possible to retroactively apply a baseline?
Baselines are created sequentially on the stream: they cannot be "inserted".
If you already started to put new baselines on that stream (after missing a couple), you cannot try and create ones before.
But the OP mentions:
No, there were no subsequent baselines and the first baseline's list of activities goes back to the last actual baseline.
Since mkbl fails (too long), I would:
change the config spec of the UCM view in order to select files before a certain date (add a time-based selection rule at the start of its config spec)
put a label on all files of the component (mklbtype+mklabel)
import that non-UCM label as a baseline (mkbl -import)
See if you can create your baselines that way.
The OP Ian W concludes in the comments:
neither incremental nor full worked.
I tried mkbl -import, but then I could not recommend and use as a future baseline, so I gave up.
I had the 4 baseline equivalents all labelled, then made a full of the latest, which worked and should keep me moving forward
I would like to get the number of total checkins per user within a certain time frame. This is the kind of result I am looking for:
User: xxxxx Count: 432
User: yyyyy Count: 22
etc
I can use find to list all checkins done by a user, but I am only interested in the count!
Edit: Finding number of checkins per one (known) user at a time would also be ok!
Edit: I also need to filter on a certain filetype, e.g. *.java !
Basically, you need to experiment with cleartool find, using directives from the query language such has:
created_since: For instance, this limit a query for the month of May:
cleartool find . –version "{brtype(main_dev) && created_since(30-Apr) && (! created_since(31-May)) }" -print
-user (login-name) : this limit for a period, for a given user
cleartool find . -user user1 -element "{created_since(date1) && !created_since(date2)}" -print
So basically, you need to process the result of a find query, in order to sort it by user, and by filename extension.
The only native tool (so without counting external non-free third-party tool) would be to experiment with the ClearCase Report Builder (or "Report Wizard"), and see if you can set the right filters.
(mentioned in "ClearCase list of files with given label type applied").
We use to take nightly builds irrespective of any files were delivered to integration stream or not. What i would like to do is , find the list of deliveries done on a particular day.
If there were no deliveries to integration stream then build will not be triggered.
Through project explorer itself we can see. but i would like to know from commands.
Any deliver in UCM will generate an activity call deliver.xxx.
Simply list all activities for a given Stream (see cleartool lsact man page)
–in stream-selector [ –r/ecurse ]
Displays a list of all activities in the specified stream.
With –r/ecurse, includes activities in child streams.
So:
cleartool lsact -in stream:aStream#\aPVob -fmt "%n %d\n"|grep deliver
And filter through the dates (%d) in order to get only the deliver activities for that day.
(stream:aStream#\aPVob is a "stream selector", although you can directly use aStream#\aPVob in this case: cleartool is expecting a stream name parameter after the -in option)