ClearCase: Stop making baseline if there are checkouts

白昼怎懂夜的黑 提交于 2019-12-11 07:56:35

问题


I'm using cleartool to make baselines in my stream, using

cleartool mkbl -full <baseline-name>

If I have files checked out in my view (in my case, always an oversight), I get the warning

cleartool: Warning: There are checkouts in view "<JXG-view-name>".

But as this is just a warning, cleartool continues with making the baseline.

What I need to do is stop immediately when given this warning.

How can I abort the command automatically when I get this warning? I thought it would be a cleartool command-line option for mkbl, but I couldn't find it in the documentation.


回答1:


No, there is no native way to look for checked out files on a cleartool mkbl itself.
It will simply labelled any checked-in elements, leaving the current checked-out version untouched.

However, you could try and write a pre-op trigger on mkbl (a bit as in this thread) in order to perform an cleartool lsco -cview and see if there are any files checked out.

cleartool mktrtype -element -all -preop mkbl -nuser ccadmin -exec "..."

You can limit the lsco to a branch (the one named after the Stream) in order to avoid any performance issue.



来源:https://stackoverflow.com/questions/8588781/clearcase-stop-making-baseline-if-there-are-checkouts

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