使用 Clearcase 远程客户端进行分支
我正在尝试在 ClearCase 远程客户端中分支文件。 我已经设置了分支,并且更新了配置规范以处理该分支。 但我找不到这个选项,而且谷歌搜索也没有多大帮助。
I am trying to branch a file in ClearCase Remote Client.
I have the branch set up and the config spec is updated to handle the branch.
But I can't find the option, and the googling isn't helping much.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我理解你的问题的方式,听起来你想以某种方式从 Clearcase RC 菜单中选择一个命令并显式创建分支(?)
Clearcase 没有明确的“为此文件生成分支”命令; 在这种情况下,您需要“结账”命令。 分支是间接的,是在具有包含“-mkbranch”操作的配置规范的视图中签出文件版本的结果。 即,一旦我签出(对于任何和所有 vobs 和文件),以下配置规范将创建
dev_1.0_branch
:第一行是您正在其中进行开发的视图的标准行,第 2 行将确保我看到任何具有
dev_1.0_branch
的文件(对于 checkout+mkbranch 按预期工作特别重要:-),第 3 行将选择任何不具有 dev_1.0_branch 的文件的最新版本当(且仅当)签出该规则选择的文件版本时,dev_1.0_branch
and 将创建分支。如果您觉得上述任何内容听起来很奇怪,请告诉我,特别是任何配置规范规则。 使用 ClearCase 很长时间后,我假设并使用了它的许多术语和概念,就好像它们是常识一样:-P。
值得注意的一件事:如果您签出该文件,然后立即取消签出该文件,您将在该文件上留下一个空分支(即在上面您将拥有一个版本如下的文件: foo.c@@/main/
dev_1.0_branch
/0,但没有 /main/dev_1.0_branch
/1 版本)。 许多站点更喜欢保持版本树干净并删除空分支(可以在 这篇 IBM Rational 技术文章)需要明确的是,我熟悉 ClearCase Base 和 ClearCase Base。 ClearCase MultiSite,但尚未与远程客户端一起使用。
--- 2009年6月29日更新
针对 Paul 下面的评论,如果您想选择性地对哪些文件进行分支,您可以将“*”修改得更具体。 例如,如果您只想在 FOODEV VOB 中分支 foo.c,但将其他所有内容保留在 main 上:
UNIX 配置规范:(
对于 Windows,您需要使用 Windows 约定。即 \FOODEV\src\foo.c) 。
您还可以选择一个目录以及该目录下的所有元素(同样是 UNIX 配置规范):
config
_
spec 的主页(在 Windows 或 UNIX 上从命令行使用cleartool man config_spec)提供了不错的指导“模式”部分介绍如何编写元素/版本选择器(第二列)。您可以使用配置规范进行许多复杂的版本选择。 如果您想了解更多详细信息或具体情况,请告诉我。
The way I understand your question, it sounds like you want to somehow select a command from a Clearcase RC menu(s) and have the branch explicitly created(?)
Clearcase has no explicit "Generate Branch for this File" command; you would want the "Checkout" command in this case. Branching is indirect and is a result of checking out a version of a file in a view that has a config spec with the '-mkbranch ' operation in it. I.e. the following config spec will create the
dev_1.0_branch
once I check it out (for any and all vobs and files):The first line is standard for views in which you are doing development, line 2 will assure that I see any file that has a
dev_1.0_branch
(particularly important for the checkout+mkbranch to work as expected :-), and line 3 will select the latest version of any file that does not have adev_1.0_branch
and will create the branch if (and only if) the file version selected by that rule is checked out.Please let me know if any of the above sounds greek to you, particularly any of the config spec rules. Having worked with ClearCase for a long time, I assume and use a lot of its terminology and concepts as if it's common knowledge :-P.
One thing of note: if you checkout the file, then immediately uncheckout the file, you will leave an empty branch on that file (i.e. in the above you would have a file with a version such as: foo.c@@/main/
dev_1.0_branch
/0, but no /main/dev_1.0_branch
/1 version). Many sites prefer to keep the version tree clean and remove empty branches (one can be found in this IBM Rational Technical article)Just to be clear, I'm familiar with ClearCase Base & ClearCase MultiSite, but have not worked with the Remote Client yet.
--- 2009-Jun-29 Update
In response to Paul's comment below, if you want to be selective in what files are branched, you can modify the "*" to be more specific. For example, if you want to only branch foo.c in the FOODEV VOB, but leave everything else on main:
UNIX config spec:
(For windows, you would want to use Windows conventions. I.e. \FOODEV\src\foo.c).
You can also select a directory and all elements below the directory (again UNIX config spec):
The main page for config
_
spec (cleartool man config_spec from the command line on windows or unix) provides decent guidance in the "Pattern" section for how to write the element/version selector (2nd column).You can do a lot of complex version selection with the config specs. Please let me know if you would like more details or specifics.
这是我用来修复特定错误的配置规范,更改了名称以掩盖一些错误。
为了创建分支,在每个 VOB 中,我使用了一个命令:
以前,我们使用配置规范,并将
-mkbranch
规则附加到各个element
行。Here's a config spec that I used for fixing a particular bug, with names changed to disguise some of the guilty.
To create the branch, in each VOB, I used a command:
Previously, we used config specs with
-mkbranch
rules appended to the variouselement
lines.