ClearCase: Stop making baseline if there are checkouts
Asked Answered
G

1

1

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.

Gradin answered 21/12, 2011 at 11:2 Comment(0)
U
2

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.

Unhook answered 21/12, 2011 at 12:2 Comment(3)
Ugh. This is so not what I wanted to hear.Gradin
@Gradin why a trigger wouldn't be a good solution for your case?Unhook
Actually, it is, thanks. I was just hoping for something simpler, ready out of the box.Gradin

© 2022 - 2024 — McMap. All rights reserved.