Clearcase report needed by month and by users - clearcase

In IBM clearcase, I wanted to list all checkins by month and by users?
I have tried cleartool lshistroy but that did not do any good.

Regarding a "statistic usage" tool natively provided with ClearCase:
You can check (on a ClearCase Windows client) the ClearCase reports.
See "How Rational ClearCase Reports works".
But that might not be supported anymore with more recent version of ClearCase (8.x or 9.x)
The other workaround would be to use a cleartool find command associated with a fmt_ccase format
That is:
cd /path/to/my/view/myVob
cleartool find -all -exec "cleartool describe \"%CLEARCASE_XPN%\" -fmt \"%d %u\""
That would give the date and user associated with each version of a vob, which you can then sort, generating your own report that way.

You can also run
cleartool lshistory -all
and then add in the -fmt switch to format the output. The -user switch can be used to list the operations by user. There is a Perl script floating around out there which will do this for you. It is not thrifty as it loops a few times over the output but it works rather nicely. I'll post a link here if I find it.

Related

How to retrieve the integration-stream that belongs to my development view

I have a development view, which is linked to a development stream, which delivers to an integration stream.
What is the best way to find the integration stream using console commands ?
You could use a fmt_ccase query with cleartool describe, by looking at the UCM project:
cleartool descr -fmt "%[istream]Xp" project:myProject#\myPVob
If you don't have the project name ready, you can:
get the stream from your view
list all pvobs and find the one which includes said dev stream: the current project will be your project name, from which you can get the integration stream name.
If you CD or set into your view, cleartool lsstream -long -cview should tell you your default deliver target, which is usually the integration stream. If it's not, you can get the information from the project listed or by looking at the default deliver target...

How do I delete check-outs from a particular view in clearcase?

I have Rational ClearCase v7.1.2.13
I need to delete certain checkouts from a view as these check-outs are reserved and the user has gone for a vacation.
Please help me.
The easiest to do is to "unregister" the user's checkouts:
cleartool descr -l vob:\myVob
# get the uuid of the user's view from the description of the vob
cleartool mount \myVob
cd m:\mynewView\myVob
cleartool rmview -force -uuid old_view_uuid
That will not modify anything in the user's views: the files are still being modified, but they won't be considered as checked out.
Instead, they will be "hijacked" (identified in snapshot view) or "eclipsed" (dynamic view).
The other option (put a reserved checkout as unreserved) is rarely possible, as it require access to the view as well as elevated privileges.

How do I check if I have a base clearcase or UCM?

I am new to ClearCase . I have used rational synergy before.
We use ClearCase in our project for version control.
In my old project, I have used rational synergy, in which we used to create "tasks" for any modifications in the files.
I got to know that we have activities in ClearCase, which I want to use in our projects.
As of now, we just check-out the files and modify and checkin the changes.
But when I check my ClearCase --> Actions, I don't see the option ->WorkOn to start creating an activity.
We are currently using the following version of ClearCase:
Version: 7.0.1.D061004
Build id: BALTIC_MR1.D070516
Please tell me if i need to install anything else?
The "work on" would be (setact man page):
cd /path/to/your/ucm/view
cleartool setact anActivity#\yourPVob
To check on what activity you are currently working (lsact man page):
cd /path/to/your/ucm/view
cleartool lsact -cact
To check if a view is an UCM one or not:
cd /path/to/your/view
cleartool lsstream -cview
If there is a stream attached to your view, it is an UCM one. If not, it is a base ClearCase one (not this is separate for the nature of the view: dynamic or snapshot: you can have dynamic or snapshot view both for UCM or for base ClearCase).
another way is:
cleartool catcs
The config spec for an UCM view is automatically generated and quite more complex than the one for a base ClearCase view.

How to delete clearcase views created by other users?

My friend who recently left our organisation also left his ClearCase view undeleted.
Now we wanted to delete it.
I was trying to delete but it did not allow. It said:
Unable to remove "\\hostname\viewsharefolder\Viewname.vws"
Operation not permitted
Can administrator only delete his views?
If I deleted the (.vws) folder associated with view, for ex: "Components_int.vws", will it be enough?
Yes you can (for any view, snapshot or dynamic, UCM or base ClearCase).
You also can remove it without ever accessing it. (So removing the view storage isn't enough, or even necessary)
If you still have access to the view storage:
cleartool rmview theViewToRemove
If there is any access/right issue when trying to remove said view:
cleartool lsview -l theViewToRemove # get its uuid
cleartool rmtag -view theViewToRemove
cleartool unregister -view -uuid uuid_of_viewToRemove
That second solution is very handy in that you don't need access to the view storage.
You simply remove reference to that view in the central registry of ClearCase (specifically the view_object and view_tag files of your ClearCase registry server)
Tamir Gefen mentions in the comment the IBM script rmview.pl, which is also mention in the SO question "Delete ClearCase Views Script".
A simpler script is in my answer of that same question: "muke_view.pl"

how to get a notification for every checkin in clearcase for a particular Vob

In our project so many file changes are happening, I want some notification for every checkin. so that every one in the team can know the files changed in the project.
I want some basic information about the file like comments and the branch.
That means "trigger": specifically a post-op checking trigger:
cleartool mktrtype -c "Trigger to notify on checking" -element -all -postop checkin -execwin "ccperl \\path\to\notification\script" -execunix "Perl /path/to/notification.pl" NOTIFY_ON_CHECKING
You can get some ideas from the "ten best triggers" IBM page.
See also the E-mail notification postoperation trigger script, which is on deliver, but that can also give you a good idea for adapting it for each checkin.

Resources