Re: [cciug] Trigger for Unreserved Element

From: Baskaran Tranquebar (Baskaran.Tranquebar@oracle.com)
Date: Thu Sep 14 2000 - 20:46:12 EDT


Hi,

We use a postop checkout trigger for making the checkout unreserved.

here it is....
-------------------make_co_unres.pl---------------------------------
#!/usr/local/bin/perl
################################################################
# force_unres_co.pl
#
# Make sure that the checkout being performed is with unreserved
# status except for the integrator.
#
#
################################################################

$author = "$ENV{'CLEARCASE_USER'}";

if($ENV{'CLEARCASE_RESERVED'} eq "1")
{
if(( $author ne "vobadm") && ($author ne "omeprod"))
 {
  system "cleartool unreserve \"$ENV{'CLEARCASE_PN'}\"";
   $prompt="\"Your Checkout has been changed to unreserved status.
\n\"";

# $prompt="\"Your Checkout has been changed to unreserved status. To
avoid this in future, please do only unreserved checkout!\n Ex:
Cleartool co -unres file_name. \n If you are using GUI, you can change
the default setting by opening Clearcase Home base and going to options
tab and UNCHECKing \'reserved\' box. \n\"";

   `clearprompt yes_no -mask yes -default yes -pre -prompt $prompt`;
   exit 0;
 }
}

exit 0;
---------------------------------------------------------------------------------------------
Here is the trigger implementation:

ct mktrtype -nc -element -all -postop checkout -execunix
/net/hqvob53/hqv53/omep_triggers/make_co_unres.pl -execwin "perl.exe
\\hqvob53\hqv53\omep_triggers\make_co_unres.pl"
postop_checkout_trigger@/<VOBNAME>

(Just make sure the command syntax is correct).
---------------------------------------------------------------------------------------------
 C:>ct lstype -long trtype:postop_checkout_trigger@\<VOBNAME>
trigger type "postop_checkout_trigger"
 28-Mar-00.17:36:54 by ClearCase VOB Administrator (vobadm.g680@hqvob53)
  owner: vobadm
  group: unknown
  all element trigger
  post-operation checkout
  action: -execunix /net/hqvob53/hqv53/omep_triggers/make_co_unres.pl
  action: -execwin perl.exe
\\hqvob53\hqv53\omep_triggers\make_co_unres.pl
---------------------------------------------------------------------------------------------

Hope this helps...

Baskaran Tranquebar
ORACLE Corporation.

"Cathcart, Dawn" wrote:
>
> Hi CCIUG Members,
>
> I was wondering if anyone knows if there is a way to make a trigger
> on a specified file element, that will allow
> only Unreserved checkouts. This particular file has been causing
> problems when trying to build when it's been checkedout as Reserve.
>
> Thanks,
>
> Dawn Cathcart
> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
>

 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



This archive was generated by hypermail 2b29 : Sun May 06 2001 - 00:26:37 EDT