6 messages in com.perforce.perforce-user[p4] Building a post-submit trigger (...
FromSent OnAttachments
Michael Bass06 Aug 1999 10:23 
Michael Bass06 Aug 1999 10:37 
Dave Lewis06 Aug 1999 10:38 
Ted Eiles06 Aug 1999 11:06 
Mike Meyer06 Aug 1999 11:23 
Jeff A. Bowles06 Aug 1999 17:49 
Subject:[p4] Building a post-submit trigger (opposed to daemons)
From:Ted Eiles (ted.@interpath.net)
Date:08/06/1999 11:06:27 AM
List:com.perforce.perforce-user

I'm trying to use a trigger to update a client instead of polling. I've noticed that the following implementation causes the p4 submit (from a different user) to take at least the number of seconds that doSyncDoc sleeps.

This implementation DOES NOT work. Any suggestions? A feature request is to add more trigger hooks.

Thanks --- Ted

I have my triggers configuration as...

-------------------------------------------------------- Triggers: SyncDocs //ipath/doc/... /p4/triggers/syncDoc

I have my trigger implementated as a shell script named /p4/triggerws/syncDoc

----------------------------------------------- #!/bin/sh /p4/triggers/doSyncDoc& echo 0

And a second shell script named /p4/triggers/doSyncDoc that sleeps for 10 seconds and then syncs

----------------------------------------------- #!/bin/sh sleep 10 P4USER=teiles P4PORT=idpath01.interpath.net:1666 P4CLIENT=teiles-docs-unix export P4USER export P4PORT export P4CLIENT /usr/local/bin/p4 sync