Topic
  • 2 replies
  • Latest Post - ‏2013-11-17T23:35:03Z by Dave-Robinson
BoeBrian
BoeBrian
25 Posts

Pinned topic Config spec rule to select VOB roots

‏2013-11-14T17:22:45Z |

I've a user working with several VOBs that needs rules like this for several VOB. The root element of the VOB must never branch.

element -directory /CA1_VOB                /main/LATEST
element -directory /CA2_VOB                /main/LATEST
element -directory /CA3_VOB                /main/LATEST
element -directory /CA4_VOB                /main/LATEST

I don't see anything in the config spec syntax that would allow these rules to be combined. I tried a couple thoughts which didn't work.

element -directory /*                /main/LATEST
and
element -directory /.                /main/LATEST

Is there a generic config spec rule that I'm missing to make ClearCase select the latest version on the /main branch of the root of all VOBs?

Brian

  • brcowan
    brcowan
    763 Posts

    Re: Config spec rule to select VOB roots

    ‏2013-11-15T17:27:01Z  

    No, I'm afraid not. There isn't any way to say "ALL VOB roots may not branch." VOB-specific rules need the VOB tag... You can remove the -directory from the first 4 rules. It's not needed because you are specifying a specific element (the VOB root).

    If you wanted to say "No directory under these VOB roots could branch, that would look like this:

    element -directory /CA1_VOB/...                /main/LATEST
    element -directory /CA2_VOB/...                /main/LATEST
    element -directory /CA3_VOB/...                /main/LATEST
    element -directory /CA4_VOB/...                /main/LATEST

    If you wanted to say "NO directory in this view can branch out from the versions in the view, that would be:

    element -directory * /main/LATEST

     

  • Dave-Robinson
    Dave-Robinson
    116 Posts

    Re: Config spec rule to select VOB roots

    ‏2013-11-17T23:35:03Z  

    Another point to consider is, you cannot enforce a policy of "The root element of the VOB must never branch." by config spec rules.

    If that really is the business policy you are implementing then you probably should apply a trigger. And rather than a "-element -all" trtype, mktrtype  without -all and apply it (mktrigger) to the root directory element only.