How to update the property for all member baseline in UCM?

谁说胖子不能爱 提交于 2020-01-05 15:06:31

问题


We have composite baseline for our components.

Whenever we release the product after recommend the baseline, I would change the property of baseline to change the promotion level.

By default the promotion level is "INITIAL".
While we release the product i would change the Promotion property as "EXTERNAL RELEASE".

But to do this, I have to go and edit each any every member baseline property.
Is there any way to make changes in composite baseline properties to replicate in it's member?


回答1:


No, the re is no "inheritance" between the custom values of a composite baseline and its baseline member.

It is best to script the operation, by describing the composite baseline, extract the baseline members name, and do a cleartool mkattr -replace on each one with the new value.
(cleartool mkattr has a -recurs - recursive - option, but it would be for directory only, it doesn't work for non-file-system objects)

cleartool descr -fmt "%[depends_on]Cp\n" aCompositeBaseline@\aPVob
# for each member baselines
cleartool mkattr -replace PromotionLevel "EXTERNAL RELEASE" baseline:aBaseline@\aPVob

Note how I use the fully qualifed name of the object on which I want to modify the custom attribute value: baseline:aBaseline@\aPVob.

Since "EXTERNAL_RELEASE" isn't a default promotion level, you need to define it first: see "About creating custom promotion levels and attribute types for UCM baselines".



来源:https://stackoverflow.com/questions/12418673/how-to-update-the-property-for-all-member-baseline-in-ucm

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