@echo off rem rem This is the simplest NT command script, write checks that "Bug:" rem appears in a changelist description. rem rem It's included as an example, and is a good SMALL example that's rem used in the most recent Perforce classes on machines that might rem not have perl or a C compiler or python. rem rem Run this script with the changelist number as the only argument. rem Note that if there are multiple servers, it'll connect to a default rem and not necessarily the one that ran this script. if "%1" == "" goto error :start p4 describe %1 | findstr "Bug:" if errorlevel 1 goto error :done goto end rem rem We couldn't figure out how to exit with a "failed" status code, rem except to run a non-existent command. (If you know a way, tell us!) rem :error foo 2>NULL: :end