Attempting to submit a change list without files is considered a Perforce error ( p4 submit ... returns exit code 1). This leads to a failure of periodic integration on our build server (we use the Zutubi Pulse system ); , in this case, I would prefer the assembly to be successful , perhaps with a warning.
Pulse has the functionality of reassigning the exit code, but Perforce does not seem ambiguous between the inability to send an empty change list and any other send failure (such a validation trigger failure that I want to build failure).
The immediately obvious (but in my opinion inelegant) solution that comes to mind is to wrap the execution of p4 submit in a batch file, which first checks if the target change list is empty by counting the lines of output from p4 opened or just p4 submit output for the message "no files" and successfully return from the batch file.
Are there any better methods to handle this that I don't see?
perforce build build-server pulse
Josh petrie
source share