使用configspec的ClearCase分支 [英] ClearCase Branching using configspec

查看:62
本文介绍了使用configspec的ClearCase分支的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



我对ClearCase的了解很少,想了解更多。

我创建了一个分支 BR_PHASE2 / main 下。

我使用以下命令将文件检出到分支中:


I have very little knowledge about ClearCase and would like to learn more.
I have created a branch BR_PHASE2 under /main.
I have used the following command to checkout the files into the branch:

element * CHECKEDOUT
element * .../BR_PHASE2/LATEST
element * /main/LBL_MS_PHASE2_04-NOV-2010 -mkbranch BR_PHASE2 

现在的问题是如何从分支访问文件??

我无法甚至如果我切换到此配置规格,也可以打开VOB:

The problem now is how do I access files from the branch ??
I am not able to even open the VOB if I switch to this config spec:

element * CHECKEDOUT
element * /main/BR_PHASE2/LATEST

我在写配置说明时写错了吗?当我尝试如上所述设置配置规范时出现错误:

警告:新的配置规范使当前工作目录不可见。

Am I writing the config spec wrong ?? The error i am getting when I try to set the config spec as above:
Warning: New config spec makes current working dir invisible.

什么是实际访问我创建的分支的步骤?

What are the steps to actually access the branch that I have created ??

推荐答案

问题是:

实际具有的目录:


  • 分支中的版本 BR_PHASE2

  • 标记为 LBL_MS_PHASE2_04-NOV-2010 的版本?

  • a version in the branch BR_PHASE2 ?
  • a version labeled LBL_MS_PHASE2_04-NOV-2010 ?

如果仅分支/标记了 / myVob / myDirectory 下的所有文件,则目录 / myVob 本身永远不会被分支/标记。

If you only branch/labeled all files under /myVob/myDirectory, then the directory /myVob itself won't never be branched/labeled.

这意味着以下配置规范将无法为<$ c选择任何版本$ c> / myVob ,使 / myVob 下的任何文件的所有其他规则都无效:

直到ClearCase可以至少选择一个有效版本的 / myVob ,它将无法选择任何版本 / myVob 下的任何文件的版本。

That means the following config spec won't be able to select any version for /myVob, making all the other rules for any file under /myVob useless:
Until ClearCase is able to select at leat one valid version of /myVob, it won't be able to select any version for any file under /myVob.

element * CHECKEDOUT 
element * /main/BR_PHASE2/LATEST

您应始终结束配置规范带有配置停止规则,例如:

You should always end your config spec with a "config stop-rule" like:

element * /main/LATEST

或至少:

element /myVob /main/LATEST

在配置末尾添加之一

ClearCase配置规范机制是一种基于组合的机制:要知道有关它的更多信息,请参见SO回答 灵活还是静态分支(GIT与Clearcase / Accurev)

The ClearCase config spec mechanism is a composition-based one: to know more about it, see the SO answer "Flexible vs static branching (GIT vs Clearcase/Accurev)".

OP添加:


您提到总是以以下字符结束CS: element * / m ain / LATEST

不一定:

如果您想确保只查看/ myVob / myDir下带有正确分支/标签的文件,则可以按照我上面提到的方式使用:

If you want to be sure to only view the files under /myVob/myDir with the right branch/label, you could use as I mentioned above:

element /myVob /main/LATEST

该规则仅适用于 / myVob (不适用于 / myVob 以下的任何内容)。

这使ClearCase能够通过 / myVob (因为它至少可以为其选择一个有效的版本),并开始将其他选择规则应用于子目录。

The rule applies only to /myVob (not to anything under /myVob).
That allows ClearCase to get past /myVob (because it can at least select a valid version for it) and start applying the other selection rules to the sub-directories.


但是如果我只想从分支 BR_PHASE2 中检出文件,将不会产生错误。我说的是,当我以/ main / LATEST结束并签出并签入文件时,它在main分支中进行了更新。我该怎么办?

but if I want to check out the files only from the branch BR_PHASE2, wont this create an error. I am saying that when I end it with /main/LATEST and checkout and check in files , it is updated in main branch. what do I do about it ?

这取决于您使用的配置规格:

It depends on the config spec you are using:

element * CHECKEDOUT
element * /main/BR_PHASE2/LATEST
element * /main/LATEST

确实会在主分支中创建新版本

would indeed create new version in the main branch

element * CHECKEDOUT
element * .../BR_PHASE2/LATEST
element * /main/LBL_MS_PHASE2_04-NOV-2010 -mkbranch BR_PHASE2 
element * /main/LATEST

不会,因为如果元素被标记为 LBL_MS_PHASE2_04-NOV-2010 。

would not, because the third rule would apply first, if the element has been labeled LBL_MS_PHASE2_04-NOV-2010.

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

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