Hi there,
Following the thread from last week about 'sanity checks' that
some commands perform BEFORE a preop trigger fires, here's
another one specifically for ClearCase 4.x :
"Can't use a preop trigger to request mastership of a
branch if you do not already master the branch."
See below for the details.
Does anyone have a list of other situations like this where
triggers can't be used?
Thanks,
Andy Shanks
LSU Central Test Engineering
Sun Microsystems Scotland BV
andrew.shanks@uk.sun.com
+44 (0)1506 672958
------------- Begin Forwarded Message -------------
X-Priority: 3 (Normal)
To: andrew.shanks@uk.sun.com
Subject: CaseID: v0563881 preop checkout trigger
Mime-Version: 1.0
Content-Transfer-Encoding: 7bit
Hello Andrew,
About trying to request mastership before doing a checkout of
something you are not mastering.
As you have seen we do some off our sanity checks before a trigger
fires. There is already an RFE to chance this but this is very
unlikely to happen because of the internal structure of the code.
The workaround is to make a wrapper which is something we have done
with the checkout gui on NT in 4.1. However I can't see any way to
get this working with clearimport which means you will have to get
mastership before running the import.
Regards,
Huib
Huib van Gent
Technical Support Engineer
----------------------------------------------------------------------------
Rational Software Technical Support - Asia Pacific
Tel: +61-2-9419 0111 Fax: +61-2-9419 0123
mailto:support@apac.rational.com
URL: http://www.rational.com
------------- End Forwarded Message -------------
------------- Begin Forwarded Message -------------
Subject: Problem with preop checkout trigger
To: support@europe.rational.com
Cc: Andrew.Shanks@uk.sun.com
Mime-Version: 1.0
Hi there,
I am trying to implement a preop trigger in CC4.1 (Solaris 7)
which checks the mastership of a branch and, if required,
runs reqmaster to transfer mastership to the local site so
the element can be checked out. My problem is that checkout
seems to be doing it's own mastership check and it bails
out before my trigger fires.
e.g. if the local site already has mastership of the branch ....
<tadpole-[ccmsdev]> ct describe /source/T1/SUNWt1tsk/adm/MINORVERSION@@/main
branch "/source/T1/SUNWt1tsk/adm/MINORVERSION@@/main"
created 07-Sep-00.16:25:41 by VOB Administrator (vobadm.teccms@zenith)
branch type: main
master replica: bvt@/source/T1
request for mastership: allowed
Element Protection:
User : vobadm : r--
Group: teccms : r--
Other: : r--
element type: text_file
<tadpole-[ccmsdev]> ct co -nc /source/T1/SUNWt1tsk/adm/MINORVERSION
Firing pre-operation trigger type "RequestMastership_co_ci"...
... trigger type "RequestMastership_co_ci" done.
Checked out "/source/T1/SUNWt1tsk/adm/MINORVERSION" from version "/main/13".
<tadpole-[ccmsdev]>
... the trigger fires and the checkout succeeds.
BUT if a remote site has mastership of the branch ...
<tadpole-[ccmsdev]> ct describe /source/T1/SUNWt1tsk/adm/MINORVERSION@@/main
branch "/source/T1/SUNWt1tsk/adm/MINORVERSION@@/main"
created 07-Sep-00.16:25:41 by VOB Administrator (vobadm.teccms@zenith)
branch type: main
master replica: lsu@/source/T1
request for mastership: allowed
Element Protection:
User : vobadm : r--
Group: teccms : r--
Other: : r--
element type: text_file
<tadpole-[ccmsdev]> ct co -nc /source/T1/SUNWt1tsk/adm/MINORVERSION
cleartool: Error: Cannot checkout branch "/main".
The branch is mastered by replica "lsu".
Current replica is "bvt".
cleartool: Error: Unable to check out "/source/T1/SUNWt1tsk/adm/MINORVERSION".
<tadpole-[ccmsdev]>
... the trigger does not even get a chance to fire.
The trigger was defined as follows:
ct mktrtype -print -element -all -preop checkout,checkin \
-exec /tools/trg/request_mastership \
RequestMastership_co_ci@/source/T1
So, what's happening here? Is this a feature or a bug with either
checkout or preop triggers or am I doing something wrong?
Can you suggest a workaround for this problem?
I considered creating a wrapper for checkout which incorporates the
funtionality of the trigger. This would be fine for most situations
but I also need the same functionality when running clearimport.
Any help/advice appreciated.
Thanks in advance,
Andy Shanks
LSU Central Test Engineering
Sun Microsystems Scotland BV
andrew.shanks@uk.sun.com
+44 (0)1506 672958
------------- End Forwarded Message -------------
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
This archive was generated by hypermail 2b29 : Sun May 06 2001 - 00:26:35 EDT