Initial commit
[clearscm.git] / cc / triggers / CheckComment.pl
1 #!/usr/bin/perl
2 #################################################################################
3 # File:         CheckComment.pl,v
4 # Revision:     1.1.1.1
5 # Description:  This trigger checks to insure that the user enters a comment
6 #               during checkin time.
7 # Trigger Type: All element
8 # Operation:    Preop checkin
9 # Author:       Andrew@DeFaria.com
10 # Created:      May 24, 2004
11 # Modified:     2007/05/17 07:45:48
12 # Language:     Perl
13 #
14 # (c) Copyright 2006, Andrew@DeFaria.com, all rights reserved
15 #
16 ################################################################################
17 use strict;
18 use warnings;
19
20 # Get comment
21 my $comment = $ENV {"CLEARCASE_COMMENT"};
22
23 # Check if it's empty
24 if ($comment eq "") {
25   # Alert user
26   `clearprompt proceed -type error -prompt "You must specify a comment" -mask proceed`;
27   # Exit with non-zero status so checkin aborts
28   exit 1
29 } # if