1

another question regarding ClearCase...

We have about 30 developers world wide working in our UCM project. All of them can create baselines in the different components of the project.

In order to have a common naming of the baselines we defined a naming scheme for the baselines. It can be expressed with a regular expression. Now we would like to check the name of a baseline to be created against this regular expression - because naming conventions might be nice but if you don't enforce them you don't have to define them.

The regular expression is too complex to be handled with the baseline naming template

(DEV|REV)[0-9]+_PartOfComponentName_.*


I tried to define a preop-trigger for mkbl but found out that in the preop trigger it's not possible to access the baseline name to be created - at least not if the command was executed using the GUI, from the command line I could parse the command, but honestly that's not what I would like to do and I do not want to make the users use the command line.

So at the moment the only possibility I can think of to enforce the naming convention would be to define a postop trigger for mkbl and (as far as the baseline name would be available there, I haven't tried yet) set the baseline to obsolete if the naming convention was breached. But honestly, that doesn't sound right to me...

So is there a way to enforce a naming convention for baseline within UCM ClearCase - without ending up with lots of obsolete baselines?

Thanks for reading!

user2606240
  • 641
  • 1
  • 6
  • 20

1 Answers1

0

Not easy, as described in this thread:

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.

So check what CLEARCASE_CMDLINE includes, in order for you to check the name.

VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250
  • Thanks for the answer. I found this thread, too. But unfortunately the question "How can I to do custom CC wrapper script/executable?" was never answered. As I said I don't want to limit the users to the command line, they should be allowed to use the GUI (and then CLEARCASE_CMDLINE is not available). – user2606240 Mar 19 '14 at 10:03