Verify label creation

You can create a trigger that runs before anyone creates a new UVCS label. In the following example, if the user enters a label name that doesn't start with release, the label creation fails.

Validate that a label name starts with 'RELEASE'

if (ENV['PLASTIC_LABEL_NAME'] !~ /^release/) then exit(1) end

Trigger creation command

cm trigger create before-mklabel "check label name" "ruby c:\plastic\triggers\validate-label.rb"