I’ve spent hours and looked for a solution on internet to figure out how to disallow a checkin operation when comment is not provided by the developer.
I am trying to write a preop checkin trigger which is triggered before every checkin that checks if comment field is empty or not.
So far I’ve managed only display message to the user, but I couldn’t find a way to interrupt checkin operation.
Thanks in advance, any help would be appreciated.
edit: the command for installing trigger as follows:
mktrtype -element -all -preop checkin -exec <trigger_path> COMMENT_CONTROL
Depending on what language you’re using, returning a non-zero return code (i.e.
1) should do the trick. I’ve written this line of Perl many, many times to make a ClearCase trigger not allow an operation to proceed.Worked every time.