问题
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