Is it possible to lock the applying label option for a work_branch in clearcase?

别来无恙 提交于 2020-02-23 04:52:05

问题


But check in/out & merge should happen for the same work_branch.The only aim is that work_branch should not allow applying any label.


回答1:


Since:

  • locking the brtype for that branch would also prevent checkout/checkin,
  • locking the lbtype would prevent any mklabel on any branch,

You can try instead definining a pre-op trigger on mklabel:

If that mklabel operation is done on the wrong branch, that pre-op trigger would exit with a non-zero status, preventing the mklabel to proceed and apply the label.
See EV (Environment Variables) section of the mktrtype command.

See an example (not based on branches) in this thread:

ct mktrtype -element -all -preop mklabel -exec "/path/to/script"



回答2:


Actually. You can also use a trigger with an inclusion list.

cleartool mktrtype -element -all -preop mklabel -brtype nolabel -exec "ccperl -e \" die();\"" NOLABEL_TRIG

Will block any attempt to make a label on a given brtype. Pardon the windows centric nature of the above.



来源:https://stackoverflow.com/questions/48515716/is-it-possible-to-lock-the-applying-label-option-for-a-work-branch-in-clearcase

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