关于CC CS几个用法

1) element本身带有mkbranch 参数

 

element -file  /vobs/test/...  BASE-Main_test_1.0.0 -mkbranch  test_nj_main_test.1.0.0

这个参数叫做auto-make-branch,就是说在创建element的时候会创建branch 并且将branch所对应的内容check out

来看IBM 标准文档的例子:

 

 

If your config spec has a/main/LATEST rule with a -mkbranch clause,mkelem checks out a subbranch instead of the main branch. For example, suppose your view has this config spec:

element * CHECKEDOUT
element * .../gopher_port/LATEST
element * V1.0.1 -mkbranch gopher_port
element * /main/0 -mkbranch gopher_port 

The /main/0 rule in the last line allows you to createelements. In this case, agopher_port branch is created for the newelement, and this branch is checked out instead ofmain:

cleartool mkelem -c "new element for Gopher porting work" base.h
Created element "base.h" (type "text_file").
Created branch "gopher_port" from "base.h" version "\main\0".
Checked out "base.h" from version "\main\gopher_port\0". 

 

 

2)第二个命令是 -nocheckout 参数,这个参数的作用是可以防止当前lable 所标示的内容被check out
element * R1.0 –nocheckout

This view always selects the set of versions labeled R1.0. In this scenario, all these versions are on themain branch of their elements. If the R1.0 label type is one-per-element, notone-per-branch, this config spec selects the R1.0 version on a subbranch. (For more information, see themklbtype reference page.)

The nocheckout qualifier prevents anyelement from being checked out in this view. (It also prevents creation of newelements, because the parent directoryelement must be checked out.) Thus, there is no need for the CHECKEDOUT configuration rule. 
Tip: The set of versions selected by this view can change, because version labels can be moved and deleted. For example, using the command mklabel –replace to move R1.0 from version 5 of anelement to version 7 changes which version appears in the view. Similarly, using rmlabel suppresses the specified elements from the view. (The cleartool ls command lists them with a [no version selected] annotation.) If the label type is locked with the lock command, the configuration cannot change.

You can use this configuration to rebuild Release 1.0, verifying that all sourceelements have been labeled properly. You can also use it to browse the old release.

3)mkbranch 和mkbrtype之间的区别:

The mkbrtype command creates one or more branch types with the specified names for future use within a particular VOB. After creating a branch type in a VOB, you can create branches of that type in that VOB's elements, using mkbranch.

 

The mkbranch command creates a new branch in the version trees of one or more elements. The new branch is checked out, unless you use the –nco option.

 

A branch belongs to an element (a file or directory).  A brtype or branch type is a name for some branches, which can be applied to any number of elements.

For example, file.c@@/main/int is a branch of the element file.c.  Its brtype is int.  And file.c@@/main/int/2 is a version which belongs to that branch.

Similarly, a label belongs to a version of an element.  An lbtype or label type is the name for some labels, and can be applied to any number of versions of different elements.  A common use is to create labels with the same type for each element in your repository, to stamp a certain release.

cleartool mklbtype -global TEST

makes a label type.

cleartool mklabel TEST file.c

creates a label on the version of element file.c which is currently selected in your view.  Now file.c@@TEST is a permanent synonym for that version.

cleartool mklabel -rec TEST .

does the same for the current directory and all its contents, recursively.

 

 

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

惹不起的程咬金

来都来了,不赏点银子么

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值