I am writing a pre-op trigger for formatting user's baseline name. How to get baseline name in pre-op trigger? Thank you!
This topic has been locked.
4 replies Latest Post - 2013-01-10T02:11:26Z by SystemAdmin
Pinned topic How to get baseline name in pre-op trigger
Answered question This question has been answered.
Unanswered question This question has not been answered yet.
Updated on 2013-01-10T02:11:26Z at 2013-01-10T02:11:26Z by SystemAdmin
Lumart 120000GQG6114 PostsACCEPTED ANSWER
Re: How to get baseline name in pre-op trigger2013-01-07T11:27:39Z in response to SystemAdminThis piece of information might be stored in the CLEARCASE_BASELINES environment variable (I am not sure whether this EV is available in a pre-op trigger).
Anyway, the baseline name is formatted on the "baseline template name" property of the UCM project.
If the user provides a name to the baseline, that name is attached to the other parts of the template (component, timestamp, etc.) in order to compose the actual baseline name.
brcowan 2000005CYP721 PostsACCEPTED ANSWER
Re: How to get baseline name in pre-op trigger2013-01-09T14:59:12Z in response to SystemAdminThe CLEARCASE_BASELINES environment variable is not available to preop mkbaseline triggers. This is because the value is set to the names of the database objects created, which may not exactly match the names given on the command line (this is particularly true if the mkbaseline command was run against multiple components).
If you are not using the GUI, you can parse the baseline name out of the CLEARCASE_CMDLINE environment variable, which is available when triggers are fired by command line operations.
If you need to do this in the GUI, I'm afraid that the only solution would be a custom CC wrapper script/executable at this time.
This statement confuses me, probably because something is getting lost in translation:
"Use baseline template is not flexible."
What kind of naming convention are you trying to enforce?
Advisory Software Engineer
ClearCase Software Advisory Team (SWAT)
IBM Software Group
550 King St
Littleton, MA 01460
Re: How to get baseline name in pre-op trigger2013-01-10T02:11:26Z in response to brcowanThank you for your answer. How can I to do custom CC wrapper script/executable ?
I define baseline rule is following statement.
1. baseline name is all capitalization.
2. baseline name is begin with "B_<first options>_<second options>".
3. "<first options>" contain one of the "SYNC,USERS.......".
4. "<second options>" contain one of the "LR13L,R4.4,R5.0....".