[p4] Is there a way to fail submit if specific code was found on it?

Michael Mirman Michael.Mirman at mathworks.com
Thu Mar 9 06:03:21 PST 2017

A content trigger is the only reliable way to do this.
It is possible to have tools and plugins on the client side, but it's easy enough to work around them and use the actual submit.

My 0.02

Michael Mirman
MathWorks, Inc.
3 Apple Hill Drive, Natick, MA 01760

> -----Original Message-----
> From: perforce-user [mailto:perforce-user-bounces at perforce.com] On
> Behalf Of MaxBk
> Sent: Thursday, March 09, 2017 8:50 AM
> To: perforce-user at perforce.com
> Subject: [p4] Is there a way to fail submit if specific code was found on it?
> Posted on behalf of forum user 'MaxBk'.
> Hi,
> So recently some team leaders asked if it's possible to force fail a submit
> if some code pattern was found on the "submitting files".
> For example.
> John doe wants to submit Test.cs
> Test.cs Has many functions and one of the functions uses the next code:
> public string badUsage(){ var a = 0; var b ="Password"; return
> otherFunction(a,B); }
> And I want to fail submit if I see the next pattern:
> var b ="Password"; return otherFunction(
> I was thinking about making a tiger for submission the code for specific regex
> but I think that there might be a better way/tool/plugin that could do that.
> What do you guys think?
> What's the best way to implement this?
> Thanks in advance,
> Max.
> --
> Please click here to see the post in its original format:
>   http://forums.perforce.com/index.php?/topic/5224-is-there-a-way-to-fail-
> submit-if-specific-code-was-found-on-it
> _______________________________________________
> perforce-user mailing list  -  perforce-user at perforce.com
> http://maillist.perforce.com/mailman/listinfo/perforce-user

More information about the perforce-user mailing list