Unset activity for deleted view in clearcase - clearcase

How to release activity for view that has been deleted.
There are no reference in pvob or cvob for that removed view Tried cleartool desc -l vob:/vobs/test_pvb
There are no refernece in either pvob or cvob

You could try setting the activity to an existing view. If you do not have an existing view associated with the stream, create a new one with cleartool mkview -stream option. Then:
$ cleartool setact -view <new-view-tag> activity:<activity-name>#<pvob>
Once the activity transferred to , you could then do:
$ cleartool setact -view <new-view-tag> -none
So that the activity will not be associated with any view at all.

The normal command to release an activity is cleartool setact -none -view viewtag.
But if the view has been rmtagged as well as unregistered, that would no longer be possible.
The view would need to be at least registered and tagged again: check if a cleartool descr -l activity:myActivity/vobs/test_pvb does mention anything about the view in which the activity is set.
Check also if this activity is an integration activity that is in use as part of a deliver or rebase operation: as mentioned in "IBM technote", you could not clear it that way either.

Related

Clearcase: Activity branch information

Is there any command which will display all the information associated with a particular activity branch. Like:
On which label it was created?
On which label currently it is?
What are the files are checked in the branch. What are there latest versions?
Who created this branch?
Is there any single command for all those which will display these information (not in graphical view)
The only two commands are:
cleartool lsact
cleartool descr -l activity:anActivity#/apvob
You can get that way the list of versions for each file.
See also "Cleartool command to list all files part of a changeset"
You can combine the second command (descr) with a -fmt (fmt_ccase) directive in order to get other activity attributes, like its associated view (from which you can deduce the stream)
But that won't give you from which label the activity started. For that, you can list the foundation baseline of the stream.
And that won't give you "On which label currently it is?": the activity list versions. The fact that those versions are or are not labelled is not relevant for the activity. You would need to describe the version in order to see if it has a label attached to it.
If this is UCM, and by "activity branch" you mean the stream it is on, you can get the information about the stream by using cleartool lsstream -long -cview while in the view in question. The output will look something like this:
stream "brian_testrep1_2"
2017-08-17T17:50:15-04:00 by Brian.None#DESKTOP-LQ0QA86
owner: DESKTOP-LQ0QA86\Brian
group: DESKTOP-LQ0QA86\None
project: testrep1#\testproject (development stream)
default deliver stream: testrep1_Int#\testproject
development streams:
contains activities:
foundation baselines:
test_2#\testproject (testcomp1#\testproject) (modifiable)
recommended baselines:
views:
Brian_testrep1_2
policies:
...

How can i get the activity name in clearcase if i have the baseline and version number

I am a beginner with CleaCase.
The view i was working in is now deleted, post delivery of the code changes. Only thing that is accessible now is activities.
I can get the list of activities by issuing "ct lsact " on the Integration Stream SDS
I have the following info from which i want to know which activity has my changes
--12-24T20:13 user create version "/vob/abc/xyz/mno/src/hello.c##/main/abc_1.0_integration/ver_2.0_integration/Mars_plm_1.0_SDS/**7**" (VER_2.0_BL21_09_01_2014_13_43.9104, Mars_abc1.0_mysqldb_07_01_2014_15_01.5788, VER_2.0_BL21_27_12_2013_19_07.4516, VER_2.0_BL21_24_12_2013_20_13.4521)
I want to find out which activity has the below version of the checked in file.
/vob/abc/xyz/mno/src/hello.c##/main/abc_1.0_integration/ver_2.0_integration/Mars_plm_1.0_SDS/7
Thanks in Advance
You can try and use cleartool describe to see if the activity is displayed:
cleartool describe -l hello.c##/main/...
Using fmt_ccase options, you can display the activity directly:
cleartool describe -fmt "%[activity]p" hello.c##/main/...

Removal of clearcase views involves any housekeeping?

Removing views which outlived its purpose, simple removal(Removing a view and its related records from a VOB) or should we perform any sort of housekeeping on the branches, elements etc. the views have been used to amend?
No: the versions/branches can exist independently from the views.
You can simply do a cleatool rmview (in order to remove the tag and unregister the view).
The only cleanup you can do is to remove the checked out versions which are still recorded by a vob (even when a view has been removed):
cleartool descr -l vob:\avob | grep uuid
Then:
cleartool rmview --force -vob \avob -uuid an_uuid

How to associate a clearcase view with stream or vob?

Below command is to make a view:
ct mkview -tag myview /var/tmp/your-username_dynview.vws
However, how do we know that [myview] is a view to certain stream ?
There's no specified arguments on above command indicating which stream a view is for.
Please read this:
https://publib.boulder.ibm.com/infocenter/cchelp/v7r1m0/index.jsp?topic=/com.ibm.rational.clearcase.tutorial.doc/topics/a_crview_ux.htm
Is it because that above command is for base clearcase view, not for UCM view ?
If so, how it is possible for a view to work with stream or vob in base clearcase ?
I'm confused.
You need to add the -stream parameter (following cleartool mkview man page).
ct mkview -tag myview -stream MyStream#/vobs:MyPVob /var/tmp/your-username_dynview.vws
See for instance "How do I create a snapshot view of some project or stream in ClearCase?".
-str/eam stream-selector
Specifies a UCM stream. The view being created is attached to this stream. (Cannot be used with –reg/ion.)
stream-selector is of the form [stream:]stream-name[#vob-selector], where vob-selector specifies the stream's project VOB.
So the -stream is the only difference between a base ClearCase view, and an UCM view.

Remove dynamic ClearCase view from specific Region

Is it possible to remove a dynamic view out of a particular clearcase region?
cleartool -rmview seems to not take a e.g. -region parameter and I was wondering whether there's a more elegant way to achieve this.. or is the only way to change the system's CC settings?
If you want to remove a view from a region, that means you don't want to erase it completely, as it still has to work in other regions.
In that case, the right command is:
cleartool rmtag -view -tag dynamic-view-tag -region theRightRegion
See rmtag command:
The rmtag command removes one or more entries from the network's view tag registry or VOB tag registry
A rmview would both math a rmtag, and un-register the view id (and remove any local trace of the view, like removing the view storage).

Resources