问题
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