ClearCase UCM - How to get only latest versions from latest baseline

ⅰ亾dé卋堺 提交于 2020-02-15 05:56:05

问题


How to get only latest versions from latest baseline -

For example, First time in ClearCase, developers check in for the first time, we would have a.zip, b.zip ; ClearCase does the incremental baseline baseline_1. Then the build tool comes in, does it gets artifact..and deploy it - everything looks good.

Second time in ClearCase, they check in c.zip and d.zip ; ClearCase does an incremental baseline again baseline_2... now how can I get the ClearCase snapshot view to only present the new files (c.zip and d.zip) so the buil tool can only get the latest files (or last baseline)

This will go on and on and on.. so baseline will change each time.. so would the file.... and the date will not work since we don;t know the schedule or cycle. The files name can also change from *.zip to whatever...


回答1:


A baseline references all the files of a component, even if it is incremental.

Using an incremental baseline in a non-UCM snapshot view wouldn't work, because it applies a label only on the elements which are changing (which means the parent directories might not have that label, because they haven't changed, which results in a config spec incapable of selecting the changed files, since said parent directory isn't even selected).

If you are after a view able to show all the latest files, what you can do is:

  • a sub-stream ST to stream S which produce those baselines
  • a rebase of ST with the latest baseline from S:
    cleartool lsbl -fmt "%[latest_bls]p" -component C -stream S
  • a diffbl with the previous baseline, in order to get all the new versions

But you also can:

  • list only the changed/new files:
    cleartool diffbl -pred -ver latestBl@\aPVob
  • access those files through a dynamic view with the extended pathnames returned by the diffbl -pred -ver command.

That would allow to list/access only the new/changed versions between 'latestBl' and its previous baseline (with latestBl obtained from the lsbl command shown above).



来源:https://stackoverflow.com/questions/16573937/clearcase-ucm-how-to-get-only-latest-versions-from-latest-baseline

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