理性 clearcase 中的配置规范 [英] Config spec in rational clearcase

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

问题描述

我对这些清晰的案例工具非常陌生.我正在学习,因为我有一个项目要处理.我刚刚了解到默认配置规范是

I am so much new to these clear case tool.I am learning because i have a project to work on. i just learned the default config spec is

element *CHECKEDOUT
element */main/LATEST 

所以新版本是在上一个版本之后的 main 分支中创建的.
但我一直在尝试这些,我只是将我的配置规范更改为这些

So the new version is created in the main branch after the previous version.
But I have been trying these, and I just changed my config spec to these

element *CHECKEDOUT
element */main/2

完成这些设置后,当我点击文件时,它会显示file not found":我无法签入或签出.
然后我更改为默认配置规范,它再次工作.

After those settings, when I click the file it says "file not found": I cannot check in or check out.
And then I changed to default config spec its working again.

怎么了?
还告诉我这些如果我的最新版本是 main 中的 6,我如何转到 version 4 以在那里创建一个分支?

Whats wrong?
Also tell me these How can I go to a version 4 to create a branch over there if my latest version is 6 in main ?

推荐答案

通过制定选择规则:

 element */main/2

您指示 ClearCase 只向您显示...的版本 2":

You instruct ClearCase to only show you "version 2" of... Everything:

 /my/path/to/a/File

因此,如果aFile"的任何父目录还没有版本 2",您将无法访问 aFile.

So if any of the parent directory of 'aFile' has no "version 2' yet, you won't be able to access aFile.

如果之前的任何规则不起作用,您应该始终在配置规范的末尾保持一个/main/LATEST"选择规则, 回退到那个通用规则(通用,因为任何元素至少有它的 version 0 存储在 'main' 分支中,除非'main' 改名了,很烂)

You should always keep a '/main/LATEST' selection rule at the end of your config spec in order, if any of the previous rules don't work, to fall back to that one universal rule (universal because any element has at least its version 0 stored in the 'main' branch, unless 'main' has been renamed, which is very bad)

例如:

 element * CHECKEDOUT
 element * /main/2
 element * /main/LATEST

会起作用,如果有的话,会显示version 2的所有内容,如果没有,则显示最新版本.

will work, and will show you version 2 of everything if they have one, or the LATEST version if they don't.

当您想从某个点创建分支时,最好不要依赖版本号(因为您所说的版本 4"仅对您的文件有效,对您的目录无效).
不要忘记文件和目录是基于元素进行版本控制的:您对一个文件进行版本控制,然后是一个目录,然后是另一个文件......:它以文件为中心,而不是像其他 VCS(SVN、Git、Mercurial,...) 具有原子提交和一个修订号,用于所有存储库:这里有每个元素(文件或目录)的单独版本号.
请参阅ClearCase 的基本概念是什么每个开发者都应该知道?"了解更多

When you want to create a branch from a certain point, it is best to not rely on a version number (because what you call 'version 4' is only valid for your file, not for your directory).
Don't forget that files and directory are versioned in a element-basis: you version a file, then a directory, then another file...: it is file-centric, not repository-centric like other VCS (SVN, Git, Mercurial, ...) with an atomic commit and one revision number for the all repo: here you have individual version number for each element (file or directory).
See "What are the basic ClearCase concepts every developer should know?" for more

最好先设置一个标签,以便从那里分支.

It is best to have set a label first, in order to branch from there.

但如果您没有标签,我的建议是:

But if you don't have a label, my advice would be to:

  • 确定您的代码处于您希望它为您的分支所处的状态的时间点
  • 制定基于时间的选择规则
  • 使用 mkbranch 指令完成该选择规则
  • 不要忘记您将在该分支上添加的新文件(这是/main/0"规则)

所以:

element * CHECKEDOUT
element * .../myBranch/LATEST
element * /main/LATEST -time dd-Month-yyyy -mkbranch myBranch
element * /main/0 -mkbranch myBranch
element * /main/LATEST 

将为最多在 dd-Month-yyy 日期创建的任何元素创建一个新分支myBranch".

will create a new branch 'myBranch' for any element created at most at the dd-Month-yyy date.

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

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