Helix Core is now P4. Product user interfaces will be updated soon. Learn more >>

P4 Server Administration Documentation | 2025.1

# Shelve-delete triggers

Use the `shelve-delete` trigger to create triggers that fire after users discard shelved files.

Example:

Here is an example of a shelve-delete trigger that notifies reviewers that shelved files have been abandoned.

Copy

    #!/bin/sh
    # shelve3.sh - Send email to reviewers when files deleted from shelf
    changelist=$1
    workspace=$2
    user=$3

    mail -s "shelve3.sh: Shelf $changelist deleted" reviewers << EOM
       $user has deleted shelved changelist $changelist"
    EOM

    exit 0

To use the trigger, add the following line to your triggers table:

    shelving3  shelve-delete //... "shelve3.sh %change% %client% %user%"

Whenever a user deletes files from the shelf, reviewers receive an email notification. A more realistic example might check an external (or internal) data source to verify that code review was complete complete before permitting the user to delete the shelved files.

Your search for returned results