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

前端 未结 1 1140
轮回少年
轮回少年 2021-01-14 09:10

How to copy an element or file from Clearcase with a particular label, without applying that label in config specs.

1条回答
  •  礼貌的吻别
    2021-01-14 09:45

    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.

    enter image description here


    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.

    0 讨论(0)
提交回复
热议问题