ClearCase中的配置规范 [英] Config spec in ClearCase

查看:69
本文介绍了ClearCase中的配置规范的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我对ClearCase有一个小问题。请帮帮我!配置规范什么时候开始起作用?当我单击签出或签入时?我有 test.c 并有配置说明

I have tiny question about ClearCase. Help me please! When does config spec start to work? When I click CHECK OUT or CHECK IN ? I have test.c and I have config spec

element * CHECKEDOUT
element * .../branch_1/LATEST
element * /main/LATEST -mkbranch branch_1

然后修改 test.c ,然后更改配置规范:

then I modify test.c, then I change config spec:

element * CHECKEDOUT
element * .../branch_2/LATEST
element * /main/LATEST -mkbranch branch_2

然后我在 test.c 中签入,并且我已经:创建了 / main / branch_1 / 1 。但是为什么?

Then I Check in test.c and I have: created /main/branch_1/1. BUT WHY???

推荐答案

配置规范会将规则应用于每次更新,签出和签入(但不包括)如您所愿)。

The config spec will apply the rules on each update and on checkout, and on checkin (but not as you think it would).

在签入时,新版本将在已签出的分支中创建(此处 branch_1 )。

新的配置规范可能不会选择新版本,但已被检出的分支不会被新的更改配置规格

On checkin, the new version will be created in the branch it has been checked out (here branch_1).
That new version might not be selected by the new config spec, BUT the branch in which it has been checked out is NOT changed by said new config spec.

在<$ c $中更改分支2 中的分支1 c> test.c 已被签出(在 branch1 中)没有任何更改。它将在 branch_1 中检入。

Changing branch1 in branch2 while test.c is already checked out (in branch1) doesn't change anything. It will be checked in in branch_1.

现在,您将在上创建一个版本。 test.c 的签入中的branch1 (即使使用第二个配置规范),您也需要意识到所有以后的签入/签入将在 test.c 的同一分支,因为:

Now that you will create a version on branch1 on checkin for test.c (even with your second config spec), you need to realize that all future checkout/checkins will take place on that same branch for test.c, because:


  • 规则 element * branch_1 / LATEST 将新版本保留在该分支上

  • 规则 element * / main / LATEST -mkbranch branch_2 仅对从main检出的版本有效(并且test.c不再位于 / main 上,而位于 branch1 : / main / branch1

  • the rule element * branch_1/LATEST will keep the new versions on that branch
  • the rule element * /main/LATEST -mkbranch branch_2 is only valid for version checked out from main (and test.c is no longer on /main, it is on branch1: /main/branch1)

此配置规范将确保所有新版本(在 branch1 上的 test.c 首次签入之后)在 branch2 上完成:

This config spec would make sure that all new versions (after the first checkin of test.c on branch1) are done on branch2:

element * CHECKEDOUT
element * .../branch_2/LATEST
element * ../branch_1/LATEST  -mkbranch branch_2
element * /main/LATEST -mkbranch branch_2

顺序很重要,因为第一个可以应用的规则是胜利(即

请参阅 配置规范以显示来自2的带标签文件分支

The order of the rules is important, because the first one that can be applied "wins" (i.e. the pothers are ignored).
See this concrete example of config spec in "Config Spec to display labeled files from 2 branches".

请注意,在第一次登录后, test.c ,您将在 branch1 上创建一个新版本,如前所述。

Note that after the first checkin of test.c, you will get a new version created on branch1, as explained before.

您的第二个配置规范将选择 / main / 1 ,而不是 / main / branch1 / 1

Yet your second config spec will select /main/1, not /main/branch1/1.

那是因为第二个配置规范中的规则不正确:

That is because of an incorrect rule in your second config spec:

element * branch_1/LATEST

这将选择正确的版本:

element * .../branch_1/LATEST

但是,如果您的第二个配置规范没有关于 branch1 的规则,则 test.c 仍将被选择为 / main / 1 :在 branch2 上没有创建任何版本,因此 element * / main /最新是可以应用的 only 规则。

But if your second config spec has no rule regarding branch1, test.c will still be selected as /main/1: there is no version created on branch2, so element * /main/LATEST is the only rule that can be applied.

这篇关于ClearCase中的配置规范的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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