Claudia,
I usually do something link this:
in post_unco do this or similar:
"just b4 your rmbranch"
UNIQUE_TAG="$CLEARCASE_USER.$CLEARCASE_VIEW_TAG.RM_BRANCH"
TOKEN_FILE="/tmp/POST_UNCO.sh.$UNIQUE_TAG"
touch $TOKEN_FILE
in pre_rmbranch do this or similar:
UNIQUE_TAG="$CLEARCASE_USER.$CLEARCASE_VIEW_TAG.RM_BRANCH"
TOKEN_FILE="/tmp/POST_UNCO.sh.$UNIQUE_TAG"
if [ -f "$TOKEN_FILE" ] then
# this rmbranch is because of the POST_UNCO trigger so allow it.. #
rm $TOKEN_FILE
exit 0
else
"do you already written code for this trigger"
fi
You can find more hints here
http://www.abs-consulting.com/abs_consulting_triggers.html
Hope this helps...
-Charles
--- VOB Corleone
"One day.. and this day may never come... I might ask you for a favor.."
A Better Solution, Inc.
----------------------------------------------------
Charles Clarke III ClearCase Consultant
A Better Solution, Inc. (770) 252-1500 x22 [phone]
50 Springridge Ct.
Newnan, Ga. 30265 (770) 252-1501 [fax]
Email:
charles@abs-consulting.com
http://www.abs-consulting.com
At 08:15 AM 2/9/00 -0500, Wagner, Claudia wrote:
>We have a trigger postop unco that fires off a script. one of the things
>that it does in the script is that if the element was branched off and at
>version 0, then the branch is removed since clearcase by default leaves the
>branch with only one version on it.
>
>we have a new trigger on preop rmbranch that is set to /bin/false - this is
>to ensure that we do not have any loss of data. So now, the part of
>post_unco script that calls on rmbranch fails - and the branch with only one
>version is left behind, dangling.
>
>we can write a script for rmbranch so that any branches with only one
>version is exemption from it. However, our release engineers sometimes
>create branches with only one version for reasons of their own and those
>branches can not be allowed to be removed by a overzealous developer.
>
>is there a way to set up the triggers so rmbranch always fire unless
>rmbranch is called as a part of the post_unco script? This is the only case
>where a branch should be removed. I am not sure if there is a way to set it
>up so that if the post_unco trigger is fired, then it bypasses the rmbranch
>trigger (or set up the rmbranch trigger to allow unco commands to runs its
>rmbranch when needed).
>
>any ideas?
>
>-c
> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
>
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
This archive was generated by hypermail 2b29 : Sun May 06 2001 - 00:23:07 EDT