ClearCase Config Spec: load only files with specific label from certain directory

匿名 (未验证) 提交于 2019-12-03 02:29:01

问题:

Suppose I have a VOB foo/. In this VOB lies a directory bar/ which contains labeled and non-labeled files. But bar/ is not the only directory in foo/, but all others don't have labeled files. Is there a way to write a config spec with the following behaviour:

  • load all elements that are checked out
  • for every directory except foo/bar/ load the main/LATEST version
  • for the directory foo/bar/ load only the files which have that specific label, if this label does not exist, do not load the main/LATEST version

The normal config spec would be

element * CHECKEDOUT element * LABEL element * /main/LATEST load /foo 

But obviously it would then load also the non-labeled versions in /foo/bar. Thanks in advance.

回答1:

You can add paths to your config spec in order to apply specific selection rule to said paths:

element * CHECKEDOUT element foo/bar/... MYLABEL element foo/bar/... -none element * /main/LATEST load /foo 

I would recommend testing that config spec in a dynamic view first, then apply it to the snapshot view.

The three dots notation (foo/bar/...) means: the bar folder and all its subelements.

Note that this won't always display all elements labelled with MYLABEL: if one the parent folders has not the label MYLABEL, no other sub-element will be visible, accessible and selected.
This is especially true here considering the rule element foo/bar/... -none which is there to prevent selecting /main/LATEST for foo/bar (is there is no MYLABEL)

The order of the rules is important here, since the first one which applies is the one used by ClearCase: you can find a similar idea in "ClearCase view that ONLY shows files/directories attached to a label (not latest)"



标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!