[p4] Triggers

Christopher Hahn christopher.hahn at peregrine.com
Mon Oct 29 12:41:16 PST 2001


This email was originally sent last thursday in the
evening (PST).  Why it is appearing in the list so late
(It arrived 12:25 PM 10/29/01), I do not know.

I am well past this issue, and should thank all responders
for their kind attention.

(I confirmed that indeed the trigger script wasn't running
at all.  This is solved).

Thank you again,

Christopher

-----Original Message-----
From: Christopher Hahn [mailto:christopher.hahn at peregrine.com]
Sent: Thursday, October 25, 2001 9:48 PM
To: Perforce-User (E-mail)
Subject: RE: [p4] Triggers



Mike,

You "order of trigger rules" comment is excellent,
but the trigger name is only used once.

I am going to confirm that the script is really 
running, as suggested by another user.

Thank you for the time,

Christopher

P.S. The current form that I am testing is:
===========================
#!/usr/local/bin/perl

use strict;

our $port;
our $clistnum;

#
# Grab params
#
$clistnum = shift;
$port = shift or $port = "perforce-sd:1666";

print STDOUT "This test message should appear when the submission fails";
print STDOUT "The arguments to this script were $clistnum and $port";

exit(1);
===========================
-----Original Message-----
From: Mike Castle [mailto:mcastle at yy.com]
Sent: Thursday, October 25, 2001 6:26 PM
To: Perforce-User (E-mail)
Subject: Re: [p4] Triggers


On Thu, Oct 25, 2001 at 05:32:55PM -0700, Christopher Hahn wrote:
> I could swear that I have seen this done, but it
> does not appear that either the triggers stdout
> nor it's stderr are grabbed by perforce, for display.

Are you sure your script is being ran?  Put a date > /tmp/foo or something
like that in the script to verify it's being ran.

Then do a simple one like:

fail.sh
#!/bin/sh
set 
exit 1

or 

fail.cmd (for win32)
set
echo.0|find "1"

One thing I had to remember to do was to make sure that different types of
triggers have different names.

If I have something like

foo //tree/branch/... "my.cmd %client%"
foo //tree/branch2/... "my2.cmd %client%"

That my.cmd was going to be ran in both cases.  Are you sure that's not
your problem?

mrc
_______________________________________________
perforce-user mailing list  -  perforce-user at perforce.com
http://maillist.perforce.com/mailman/listinfo/perforce-user
_______________________________________________
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