How to list all my check-ins using ClearCase?

走远了吗. 提交于 2019-12-05 13:22:00

问题


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.


回答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.




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




回答3:


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


来源:https://stackoverflow.com/questions/574742/how-to-list-all-my-check-ins-using-clearcase

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!