ClearCase:如何列出附加到分支的属性
ClearCase: how to list the attributes attached to a branch
通过以下,我可以将属性附加到分支:
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
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,请检查其类型(全局或本地)。
我在使用 "cleartool desc" 命令时发现了类似的问题。您可以使用 "cleartool dump" 命令来查看属性的值。
cleartool dump -l brtype:YOUR-BRANCH@/YOUR-VOB
通过以下,我可以将属性附加到分支:
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
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,请检查其类型(全局或本地)。
我在使用 "cleartool desc" 命令时发现了类似的问题。您可以使用 "cleartool dump" 命令来查看属性的值。
cleartool dump -l brtype:YOUR-BRANCH@/YOUR-VOB