<HTML> <HEAD> <TITLE> Perforce Triggers Examples </TITLE> </HEAD> <BODY BGCOLOR="#FFFFFF"> <CENTER> <P> <A NAME="toc"></A> <h2> <sub><A HREF=http://public.perforce.com/public/index.html>Perforce Public Depot</A></sub><br> Perforce Triggers Examples<br> </H2> <P> <TABLE BORDER=0><TR><TD> <B> <UL> <LI><A HREF="#about">About This Project </A> <LI><A HREF="#triggers">Triggers Scripts </A> </UL> </TABLE> </CENTER> <br> <br> <br> <!------------------------------------------------------------------> <P> <TABLE CELLSPACING=0 BORDER=0 WIDTH=100%><TR><TD BGCOLOR=FFCC66> <A NAME="about"></A> <H2>About This Project </H2> <TD WIDTH=5% BGCOLOR=FFCC66 ALIGN=RIGHT><FONT SIZE="-2"><A HREF="#toc"> Back to<BR>Table of<BR>Contents</A></TD></TR> </TABLE> <!------------------------------------------------------------------> <p> <table cellpadding=5%> <tr> <td valign=top> <b>Content</b> </td> <td valign=top> The "Perforce Triggers Scripts" is a collection of usable scripts that can be used as triggers in a Perforce server. about using (The server needs to be at level '99.1' or later.) </td> </tr> <tr> <td valign=top> <b>Curator</b> </td> <td valign=top> <a href="http://beyond.perforce.com/guest/jeff_bowles/jab.html">Jeff Bowles</a> is the curator of this project. Please contact him if you have any submitted contributions you'd like integrated into the public project branch. </td> </tr> </table> <!------------------------------------------------------------------> <P> <TABLE CELLSPACING=0 BORDER=0 WIDTH=100%><TR><TD BGCOLOR=FFCC66> <A NAME="triggers"></A> <H2>Triggers Scripts </H2> <TD WIDTH=5% BGCOLOR=FFCC66 ALIGN=RIGHT><FONT SIZE="-2"><A HREF="#toc"> Back to<BR>Table of<BR>Contents</A></TD></TR> </TABLE> <!------------------------------------------------------------------> <P> <table border=1> <tr> <td><b>Script Name</b><td><b>Status<sup>*</sup></b><td><center><b>Description</b></center></tr> <tr> <td> <B><A HREF="Jobs.pl"> Jobs.pl </A></B> <td><img src="smiley.gif"> <td> Example trigger to enforce a rule "submissions must be associated with a job.". <tr> <td> <B><A HREF="Jobs.sh"> Jobs.pl </A></B> <td><img src="smiley.gif"> <td> Similar to above, but contributed by <A HREF="mailto:wes@softweyr.com">Wes Peters</A> and written in Unix "shell". <i>Takes a different approach to the problem, running "p4 fixes" to determine whether you're fixing something with this submission.</i> <tr> <td> <B><A HREF="CheckC.pl"> CheckC.pl </A></B> <td><img src="afraid.gif"> <td> A script to notice when you're creating new files (or integrating to a new branch) and the directory name you're writing the [new] file to isn't the same case as an existing directory name. <p><i>(For example, if "//depot/<u>x</u>/<u>y</u>/z.c" exists, this won't allow you to create a file named "//depot/<u>X</u>/<u>Y</u>/one.c".)</i> <tr> <td> <B><A HREF="Pairs.pl"> Pairs.pl </A></B> <td><img src="smiley.gif"> <td> Example trigger to enforce a rule "files of suffix .x/.y need to be checked in as pairs". <tr> <td> <B><A HREF="Binary.pl"> Binary.pl </A></B> <td><img src="smiley.gif"> <td> Example trigger to enforce a rule "submissions of .gif must binary files and .sh files should be text and...." <tr> <td> <B><A HREF="simple.cmd"> simple.cmd </A></B> <td><img src="teaching.gif"> <td> Classroom example of writing a trigger using the Windows/NT command shell, a.k.a. "a <i>.cmd</i> script". (It checks that "Bug:" is included in the change description.) Doesn't do a lot, but gets the idea across. </table> <p> <sup>*</sup>How to interpret the "Status" field: <ul><li>a smiley face means "it's probably simple enough to use without any worries that it'll corrupt or slow down anything" ; <li>a scared face means "you probably want to read the comments at the top of the script - this might need localization/tailoring or might have performance implications you want to investigate before deploying on your production Perforce server" ; <li>a 'teacher in front of a class' means that it's a classroom example, and probably incomplete or really, really simple. Better for learning something than for deploying in a production environment. <li>and "under construction" means just that - you can look, you can make copies, but it's getting reworked at the moment. </ul> <br><br><br> <!------------------------------------------------------------------> <P> <TABLE CELLSPACING=0 BORDER=0 WIDTH=100%> <TR> <TD WIDTH=15% BGCOLOR=FFCC66 ALIGN=LEFT VALIGN=CENTER> <FONT SIZE="-2"> Copyright ©<br> 1998, 1999<br> <a href="http://www.perforce.com">Perforce Software</a><br> </FONT> </TD> <TD WIDTH=70% BGCOLOR=FFCC66 ALIGN=CENTER> <FONT SIZE="-2"> You're browsing a file stored as<br> <code>$Id: //guest/jeff_bowles/perforce-triggers/index.html#3 $</code><br> in the <A HREF=http://public.perforce.com/public/index.html>Perforce Public Depot</A>. </FONT> </TD> <TD WIDTH=15% BGCOLOR=FFCC66 ALIGN=RIGHT> <FONT SIZE="-2"><A HREF="#toc"> Back to<BR>Table of<BR>Contents</A></TD></TR> </FONT> </TD> </TR> </TABLE> <!------------------------------------------------------------------> </BODY>
# | Change | User | Description | Committed | |
---|---|---|---|---|---|
#11 | 3564 | Jeff Bowles |
Updating to remove CheckC.pl entirely. Too many people have taken it as a supported, nifty thing and ignored the comments saying "this is an example and a potential performance-killer." |
||
#10 | 374 | Jeff Bowles | Pulling over simple changes into ~jab to keep it current. | ||
#9 | 110 | Jeff Bowles | Making Wes Peters a bit more prominent in the description(s) | ||
#8 | 107 | Jeff Bowles | Change to reflect structure of 'utils' directory to which this will be pushed. | ||
#7 | 106 | Jeff Bowles | Branching these suckers to mimic the utils area. | ||
#6 | 105 | Jeff Bowles | deleting original names, in order to match the 'utils' area. | ||
#5 | 103 | Jeff Bowles | updating info for wes peters | ||
#4 | 102 | Jeff Bowles | Dealing with a typo in a filename | ||
#3 | 101 | Jeff Bowles | Adding trigger written in "shell" by Wes Peters. | ||
#2 | 99 | Jeff Bowles | Adding Jo's classroom example using an NT command file as a trigger. | ||
#1 | 81 | Jeff Bowles | adding some trigger examples.... |