我们可以在基本透明案例项目的配置规范中省略元素*/main/LATEST吗? [英] Can we omit element * /main/LATEST in the config spec of base clear case project?

查看:113
本文介绍了我们可以在基本透明案例项目的配置规范中省略元素*/main/LATEST吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在我拥有的一个基本的透明案例项目中,交给我的配置规范如下:

In a base clear case project that I have, the config spec handed to me reads like this:

element * CHECKEDOUT
element * .../PROJ_1.5.0/LATEST
element * .../main/LATEST -mkbranch PROJ_1.5.0
element * /main/LATEST

我在他的指南中阅读了一些配置规格: http://www.philforhumanity.com/ClearCase_Support_17.html 在我看来,在我的配置规范中,最后一行没有任何价值.因为 element * /main/LATEST已经在倒数第二行了.我的理解正确吗?

I read up a bit on config specs here at his guide: http://www.philforhumanity.com/ClearCase_Support_17.html It seems to me that in my config spec, the last line has no value. Because element * /main/LATEST is already there on the second last line. Is my understanding correct?

推荐答案

最后一行是选择规则塞子:如果其他所有规则均失败,则将始终选择该规则.
(那是因为始终存在一个名为main的分支-除非您将其重命名,但这很少见-并且总是至少要为每个元素添加一个版本0-占位符 到ClearCase中的源代码控件中

That last line is a selection rule stopper: it is a rule which will always be selected if all the other fail.
(That would be because there always is a branch named main -- unless you renamed it, but that is rare --, and always at least a version 0 -- placeholder -- for each element added to source control in ClearCase)

所以拥有它很重要.

假设根本没有选择任何目录(通过其他任何规则),即使子目录及其内容可能已被其中一个规则选择,所有目录内容也将不可见.
但是使用element * /main/LATEST时,您可以确定 all 元素在规则选择的版本中是可见的,或者默认情况下在/main/LATEST中可见.

Suppose a directory isn't selected at all (by any of the other rules), all that directory content will be invisible, even though the sub-directories and their content might have been selected by one of the rules.
But with element * /main/LATEST, you are sure all the elements will be visible, at the version selected by your rules, or, by default, at /main/LATEST.

话虽如此,重新阅读您的配置规范,您可以将最后两行替换为:

That being said, re-reading your config spec, you can replace the last two lines with:

element * /main/LATEST -mkbranch PROJ_1.5.0

.../main/LATEST毫无意义:它的意思是主要来自任何其他分支",这与您在常规配置规范中不会看到的一样:所有其他分支均来自主要,而不是相反.

.../main/LATEST makes no sense: it means "main coming from any other branch", which isn't what you would see in a normal config spec: all the other branches comes from main, not the reverse.

因此,使用最后一条规则,不仅您可以确定将看到所有元素,而且如果签出它们,还将创建并进入分支PROJ_1.5.0.

So with that last rule, not only you are sure you will see all the elements, but if you checkout them, you will create and go into branch PROJ_1.5.0.

这篇关于我们可以在基本透明案例项目的配置规范中省略元素*/main/LATEST吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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