Reputation: 661
We have a VOB with about 12 components and we only use component baselines.
They are normally created by using the GUI under Windows (UNIX is only used by some developers, most of them are more familiar with Windows).
Now to create the component baseline you have to right-click on the stream you want to create the baseline in and select 'Properties
' before going to the 'Baselines' tab and create the new component baseline there.
The problem is that if you right-click on the stream the menu already has an entry called 'Make Baseline
'. Unfortunately it happens (not too often but still sometimes) that someone clicks on the 'Make Baseline
' option here and creates a baseline for all components instead of only the one he intended.
I already experimented with some preop triggers of mkbl
but as far as I figured out they are not fired when using the GUI in Windows and they cannot prevent the creation of the baseline as the name of the baseline is not know at that point in time.
Is there a way - be it a trigger script or whatever - to prevent the creation of a baseline if it's supposed to be applied to more than one component or will we just have to accept the situation and waste our time - it takes time for someone to discover that there is a wrong baseline on some components and then we have to obsolete the baseline for the wrongly 'labeled' components?
Upvotes: 1
Views: 73
Reputation: 109
You can definitely write triggers that work on baseline creation! If your trigger's not firing then there's something wrong with either the trigger definition, or the script it runs.
For a simple test, create a trigger that just executes:
clearprompt proceed -prompt "You're creating a trigger" -mask proceed
If you've done it right, every time you create a trigger you'll get a dialog box come up with "You're creating a trigger" as the message. If that works, then it's your script at fault; if it doesn't, there's something wrong with how you've created the trigger.
Upvotes: 0
Reputation: 1324537
Is there a way - be it a trigger script or whatever - to prevent the creation of a baseline if it's supposed to be applied to more than one component
Not that I know of, considering the project explorer (clearprojexp.exe
) directly manages the GUI for creating baselines (it isn't delegated to an exe in <Rational\ClearCase>/bin
.
The only (more complex) approach would be a cron job detecting the latest baselines created and, if created in an interval of a few minutes by the same owner, would (if no other baselines have been created since) remove them (with cleartool rmbl
) and send an email to the baseline owner.
Upvotes: 1