Shelve-commit triggers
Use the shelve-commit
trigger to create triggers that fire
after shelving and file transfer. Use shelve-commit triggers for
processes that assume (or require) the successful submission of a
shelving operation.
Example
Here is an example of a shelve-commit trigger that notifies users (in this case, reviewers) about a shelved changelist.
#!/bin/sh # shelve2.sh - Send email to reviewers when open files are shelved changelist=$1 workspace=$2 user=$3 mail -s "shelve2.sh: Files available for review" reviewers << EOM $user has created shelf from $workspace in $changelist" EOM exit 0
To use the trigger, add the following line to your triggers table:
shelving2 shelve-commit //... "shelve2.sh %change% %client% %user%"
Whenever a user shelves a changelist, reviewers receive an email notification.