@echo off :: :: This is the simplest NT command script, write checks that "Bug:" :: appears in a changelist description. :: :: It's included as an example, and is a good SMALL example that's :: used in the most recent Perforce classes on machines that might :: not have perl or a C compiler or python. :: :: Run this script with the changelist number as the only argument. :: Note that if there are multiple servers, it'll connect to a default :: and not necessarily the one that ran this script. :: :: Trigger "specification" section to run this follows: :: Triggers: :: bug_check change-submit //depot/r2.2/... "c:\Perforce\scripts\bug_check.bat %change%" :: (Of course, the full pathname will probably change!) if "%1" == "" goto error :start p4 describe %1 | findstr "Bug:" if errorlevel 1 goto error :done goto end :: :: run a non-existent command, to give a 'failing' exit code. :: :error garbagecommand 2>NULL: :end