[p4] Perforce triggers

Slava Imeshev imeshev at yahoo.com
Thu Jul 13 17:51:14 PDT 2006


> Much to the annoyance of some of the developers at our organization I've
> added certain code format checks into a Perforce change-content trigger.
> This seems to work very well.
> 
> However, one of the side affects is that should the submission fail it
> will leave the file locked and read only on the client.     So the file
> then has to be at the very least chmod'd and possibly unlocked too.
> Even the people who support the spirit of what I'm trying to do aren't
> too keen on this second aspect.
> 
> Is there something I'm doing wrong or is it a bug?   

I generally recommend our customers running code formatting checks
and automated bug detection as a part of an integration build rather than 
a part of a P4 submission trigger. 

The main reason for this is this: the job of a version control system is 
to provide efficient change management. Ensuring coding standards 
is not natural for VCS because it impedes its main goal. 

Done by a build management server verification procedures are batched. 
Those processes requiring significant server resources such as automated 
bug detection can be ran on a scheduled (hourly, daily, weekly ) basis.

All this makes a software build management server a natural place to run 
automated code verification procedures. A useful side effect is that you don't 
have to deal with the problems described in the original message.

Hope this helps.

Regards,

Slava Imeshev
www.viewtier.com



More information about the perforce-user mailing list