通过以下内容,我可以将属性附加到分支:
cleartool mkattr islocked \"true\" brtype:MY_BRANCH_NAME
如何验证此属性的值?
根据VonC的建议,我在命令中指定了VOB名称:
首先,请确保该属性存在且已注册:
$ ct mkattype -replace -nc -enum \"true\",\"false\" -default \"false\" islocked
Replaced definition of attribute type "islocked".
-
$ ct mkattr -replace islocked \"true\" brtype:MY_BRANCH_NAME@\\myVOB
Created attribute "islocked" on "MY_BRANCH_NAME".
然后我们可以询问属性的值:
$ ct desc -l brtype:MY_BRANCH_NAME@\\myVOB
branch type "MY_BRANCH_NAME"
created 2016-02-22T13:16:51Z by Nowox
master replica: cpAdmin@\myVOB
request for mastership: allowed for branch type
request for mastership: allowed for all instances
owner: user
group: group
scope: global
constraint: one version per element
Hyperlinks:
GlobalDefinition@78418@\myVOB <- brtype:MY_BRANCH_NAME@\myVOB
不幸的是,我没有看到我的属性......
与此相同的问题:
$ ct desc -l -aattr islocked brtype:MY_BRANCH_NAME@\\myVOB
MY_BRANCH_NAME
答案 0 :(得分:1)
cleartool describe
可以提供帮助:
cleartool desc -aattr myattribute brtype:MY_BRANCH_NAME
fmt_ccase
还有一个显示值的选项:
clearcase desc -fmt "%Sa" brtype:MY_BRANCH_NAME
在评论中提及Brian Cowan时,cleartool descr -l
可以帮助确定是否存在属性集及其值是什么。
将该输出与cleartool descr -l -local
进行比较,以查看属性是否不同,以及对象是否为全局类型的本地实例。
如果属性已定义in an AdminPVob,请检查其类型(全局或本地)。
答案 1 :(得分:1)
我注意到了“cleartool desc”命令在我身边的类似问题。您可以使用“cleartool dump”命令查看属性的值。
cleartool dump -l brtype:YOUR-BRANCH @ / YOUR-VOB