Question

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.

Was it helpful?

Solution

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:

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.

OTHER TIPS

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".

I used this command (in a DOS shell, not Cygwin) to (1) ignore directories, and (2) get check-in comments in addition:

cleartool find . -ver "eltype(text_file) && created_by(your_login)" -exec "cleartool descr -fmt \"%n: %c\n\n--\n\n\" \"%CLEARCASE_XPN%\"" >> checkins.txt
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top