从Clearcase复制具有特定标签的元素,而不使用配置规范 [英] Copying an element from Clearcase with a particular label without using config specs
问题描述
如何从带有特定标签
的 Clearcase
复制元素或文件,而不应用该<$ c $在配置规范中的c> label
。
我不想更改我的视图的配置规范,但是我需要访问所选文件之一的旧版本,我想直接从现有视图中访问(再次,不做任何更改)。
我知道我要还原的版本(从实例版本2,即使我在视图中选择了当前版本3)。
什么 cleartool
您将使用命令访问旧版本吗?
您可以使用:
如果将版本标签定义为每个元素,一个附加的链接/文件系统对象将出现在元素目录树的顶层。
例如,如果BL3
是每个元素的标签,则这些版本扩展的路径名都是对相同对象的明确引用版本:
hello.c @@ / BL3
hello.c @@ / main / bugfix / patch2 / BL3
实际上,此功能使您可以引用版本而无需知道版本树中的确切位置。
在动态视图中,当您在视图中看到hello.c(并且可以是任何个选定的版本,而不是您想要的带有标签的版本)时,您实际上可以执行以下操作:
cd hello.c @@
目录
这将列出所有唯一标签供您选择。
How to copy an element or file from Clearcase
with a particular label
, without applying that label
in config specs
.
I don't want to change the config spec of my view, but I need to access an older version of one of my selected files, and I would like to do so directly from my existing view (again, without changing anything).
I know the version I want to restore (from instance version 2, even though I am selecting currently version 3 in my view).
What cleartool
command would you use in order to access said old version?
You can use the extended pathname, but only using a dynamic view (any existing dynamic view, not particular config spec required).
The article "To open a version not currently in your view from a command prompt using a version-extended path" mentions that you can use a snapshot view too, but you would need for:
- the element to be already loaded (obviously not at the version you want)
- the old version to be copied into the view (as a private file):
cleartool get -to prog.old.c prog.c@@/main/r1_fix/1
Note that the contextual menu of a version tree includes a "Send To" entry which would effectively do the cleartool get (i.e. the copy) for you.
But in a dynamic view, you don't need to copy anything, you can directly reference any old version:
cp foo.c@@/RLS4.3
cp include.h@@/main/bugfix/REL2
See also version selector:
If a version label was defined to be one-per-element, an additional link/file system object appears at the top level of an element's directory tree.
For example, ifBL3
is a one-per-element label, these version-extended pathnames are both unambiguous references to the same version:
hello.c@@/BL3
hello.c@@/main/bugfix/patch2/BL3
In effect, this feature allows you to reference a version without knowing its exact location in the version tree.
In a dynamic view, when you see hello.c in your view (and that can be any selected version, not the one you want with the label), you actually can do:
cd hello.c@@
dir
That will list all the unique labels for you to choose from.
这篇关于从Clearcase复制具有特定标签的元素,而不使用配置规范的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!