Topic
4 replies Latest Post - ‏2013-01-10T02:11:26Z by SystemAdmin
SystemAdmin
SystemAdmin
47293 Posts
ACCEPTED ANSWER

Pinned topic How to get baseline name in pre-op trigger

‏2013-01-06T05:50:11Z |
Hello: all
I am writing a pre-op trigger for formatting user's baseline name. How to get baseline name in pre-op trigger? Thank you!
Updated on 2013-01-10T02:11:26Z at 2013-01-10T02:11:26Z by SystemAdmin
  • Lumart
    Lumart
    114 Posts
    ACCEPTED ANSWER

    Re: How to get baseline name in pre-op trigger

    ‏2013-01-07T11:27:39Z  in response to SystemAdmin
    This 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.
    • SystemAdmin
      SystemAdmin
      47293 Posts
      ACCEPTED ANSWER

      Re: How to get baseline name in pre-op trigger

      ‏2013-01-09T01:11:28Z  in response to Lumart
      Thank you for your help. I try to use "CLEARCASE_BASELINES" to get baseline name. But, failure. Use baseline template is not flexible. Do you have any good ideas ?
      • brcowan
        brcowan
        721 Posts
        ACCEPTED ANSWER

        Re: How to get baseline name in pre-op trigger

        ‏2013-01-09T14:59:12Z  in response to SystemAdmin
        The 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?

        =================================================================
        Brian Cowan
        Advisory Software Engineer
        ClearCase Software Advisory Team (SWAT)
        Rational Software
        IBM Software Group
        550 King St
        Littleton, MA 01460

        Phone: 1.978.899.5436
        Web: http://www.ibm.com/software/rational/support/
        • SystemAdmin
          SystemAdmin
          47293 Posts
          ACCEPTED ANSWER

          Re: How to get baseline name in pre-op trigger

          ‏2013-01-10T02:11:26Z  in response to brcowan
          Thank 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....".