reject.sh
Called by the Perforce trigger function to filter out unwanted file types.
For example, if you try to submit a changelist containing filename.log, you will get an error message similar to the following:
Change 2415 created with 1 open file(s). Submitting change 2415. Locking 1 files ... Submit validation failed -- fix problems then use 'p4 submit -c 2415'. Submit check 'reject04' failed: Files of type .log are not allowed. //depot/intranet/main/test.log#1 - add change 2415 (text) by username@DevBox.mn.acme.com.username *locked*
### ### ### Check submissions for disallowed file types and structures. ### ### ### PATH=$PATH:/usr/local/bin P4PORT=DevBox:1666 P4ROOT=/usr/p4 P4USER=username P4PASSWD=password P4JOURNAL=/usr/p4/journal export PATH P4PORT P4ROOT P4USER P4PASSWD P4ROOT P4JOURNAL change=$1 rchange=$2 echo "Files of type $rchange are not allowed." p4 opened -a -c $1 | grep $rchange exit 1
![]()