How to list all my check-ins using ClearCase?

22,055

Solution 1

This would involved a cleartool find command with:

  • an -exec directive to describe the versions found
  • a -fmt to better format the result
  • a -created_by query language operator to restrict the results to only your checkins versions.

You can either display all versions of the checkins files, or only one file per all versions checked-in, that is the 'element'. In your case, to see when the checkin has been made, you need to list the versions.

Something like:

REM Windows syntax
cleartool find . -ver "created_by(myLogin)" -exec "cleartool descr -fmt \"%En : %Sn made %Vd\n\" \"%CLEARCASE_XPN%\""

# Linux syntax
cleartool find . -ver 'created_by(myLogin)' -exec 'cleartool descr -fmt "%En : %Sn made %Vd\n" "$CLEARCASE_XPN"'

'.' will designate the current directory from which you are looking your versions.

%Sn will give you branch/versionNumber, %Ln would only give you the version number.

Solution 2

I know the original question was about cleartool, but lots of people don't realize you can also do this with the ClearCase ReportBuilder GUI. The advantage of using the GUI (other than not having to learn the syntax of cleartool find), is in the result you can right-click the selected elements and immediately popup a "compare with previous version" or version tree. It depends on what you want to do with the output.

The ReportBuilder is found under the "Administration" folder (All Programs > IBM Rational ClearCase XXX > Administration > ReportBuilder). You may not have noticed it because it's tucked away under "Administration" but it's not just for administrators - there are many useful queries for anybody using ClearCase.

Under the Report Builder, go to Elements > Checkins Since Date by User and select the directories to report on, date since, and your user ID, then click "Run Report".

Share:
22,055
John Topley
Author by

John Topley

Programming languages I have known: BASIC (both Sinclair and Visual), Object Pascal (Delphi), Smalltalk, Java, JavaScript, Ruby, Objective-C and Go. Also: SQL, HTML, XML & CSS. Follow me on Twitter Fork me on GitHub Side Project Software, an occasional blog about software development Listen to John Topley Music Email [email protected] to contact me

Updated on July 09, 2022

Comments

  • John Topley
    John Topley almost 2 years

    Is it possible to get a list of all the check-ins I've made within a given source code directory tree using cleartool? If possible I'd like to see when the check-in was made and the file version. I'm using Windows.

    Thanks in advance.