ClearCase 配置规范:仅从特定目录加载具有特定标签的文件 [英] ClearCase Config Spec: load only files with specific label from certain directory

查看:21
本文介绍了ClearCase 配置规范:仅从特定目录加载具有特定标签的文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

假设我有一个 VOB foo/.在此 VOB 中有一个目录 bar/,其中包含标记和未标记的文件.但是 bar/不是 foo/中唯一的目录,而且所有其他目录都没有标记文件.有没有办法编写具有以下行为的配置规范:

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:

  • 加载所有签出的元素
  • 对于每个目录除了 foo/bar/加载主/最新版本
  • 对于目录 foo/bar/加载具有该特定标签的文件,如果该标签不存在,加载主/最新版本
  • 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

正常的配置规范是

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

但显然它还会在/foo/bar 中加载未标记的版本.提前致谢.

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

推荐答案

您可以在配置规范中添加路径,以便将特定的选择规则应用于所述路径:

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.

三点符号 (foo/bar/...) 表示:bar 文件夹及其所有子元素.

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

请注意,这不会总是显示 所有 标有 MYLABEL 的元素:如果一个父文件夹有 而不 标签 MYLABEL,没有其他子元素可见、可访问和选择.
考虑到规则 element foo/bar/... -none 在这里尤其如此,它可以防止为 foo/bar<选择 /main/LATEST/code>(是否没有MYLABEL)

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)

规则的顺序在这里很重要,因为第一个适用的是 ClearCase 使用的规则:您可以在ClearCase 视图只显示附加到标签的文件/目录(不是最新的)"

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)"

这篇关于ClearCase 配置规范:仅从特定目录加载具有特定标签的文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆