Copying an element from Clearcase with a particular label without using config specs

三世轮回 提交于 2019-12-01 09:33:35
VonC

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, if BL3 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.

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!