[p4] Triggers not working for me.

Jeff A. Bowles jab at piccoloeng.com
Tue Oct 23 16:30:05 PDT 2001

God, this is confusing.

I believe that a paraphrase of Robert's words might
         if a command run by a trigger exits with a zero
         status, the trigger has succeeded and the
         submit continues (to the next trigger or the next
         part of the submission process; if it's non-zero,
         well, that's all she wrote.


At 04:03 PM 10/23/2001 -0700, Christopher Hahn wrote:
>In saying:
>    "For a trigger to "work" it needs to exit with non zero status"
>You are really saying that if you want the submit to fail, correct?
>The trigger *could* be satisfied that some criteria was met and
>return a zero status, to allow the submit to proceed.
>Thank you!
>-----Original Message-----
>From: Robert Cowham [mailto:robert at vaccaperna.co.uk]
>Sent: Thursday, October 18, 2001 2:00 AM
>To: Joseph Fota; Perforce-User (E-mail)
>Subject: RE: [p4] Triggers not working for me.
>For a trigger to "work" it needs to exit with non zero status (and 
>preferably put some text to standard out). Your echo is exiting with zero 
>status so the trigger doesn't "fire" or have any effect on the submit. Try 
>the following:
>robert:/usr/home/robert/temp$ p4 triggers -o
># See 'p4 help triggers' for more information about triggers.
>         something //... "/bin/echo 'hello world'; /bin/badcommand"
>Then when I do a submit:
>sh: /bin/badcommand: No such file or directory
>Change 2 created with 2 open file(s).
>Submitting change 2.
>Locking 2 files ...
>Submit validation failed -- fix problems then use 'p4 submit -c 2'.
>Submit check 'something' failed: hello world
>/bin/badcommand is a non existent command which produces a non zero error.
>-----Original Message-----
>From: perforce-user-admin at perforce.com 
>[mailto:perforce-user-admin at perforce.com]On Behalf Of Joseph Fota
>Sent: Thursday, October 18, 2001 01:10
>To: perforce-user at perforce.com
>Subject: [p4] Triggers not working for me.
>After trying various permutations of a script, I have whittled my trigger 
>down to the following:
>         whatswrong      //depot/...     "/bin/echo 'Hello World!'"
>But that doesn't work either after doing a "p4 submit".  Am I missing 
>p4d is running on a Solaris 8 box.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://maillist.perforce.com/pipermail/perforce-user/attachments/20011023/30c2842a/attachment-0011.html>

More information about the perforce-user mailing list