我写过一个Trigger,你可以试一下,不过这个是有一个Checkout就生效的,同时文件名或目录中不能有CHECKOUT
这是Trigger的脚本,注意,如果是针对某个流或是View需要修改脚本
###########################################
# Begin of Perl section
$start_dir = $ARGV[0];
$CLEARCASE_PN = $ENV{CLEARCASE_PN};
$S = "\\";
$list_file = "c:".$S."list_file";
sub clean_file
{
$status = system("del $list_file > NUL 2> NUL");
}
#
# Start of the script...
#
clean_file();
$status = system("cleartool lsvtree -s $CLEARCASE_PN > $list_file");
open(LIST_ELEMENT,$list_file);
while ($element=<LIST_ELEMENT>)
{
chop $element;
if ($element =~ /CHECKEDOUT/)
{
$text = "该配置项已被Check out,不能再Check out";
$status = system("clearprompt proceed -prompt \"$text\" -prefer_gui");
clean_file();
exit -1
}
}
clean_file();
__END__