[dumb] Re: [dumb] [p4] RE: Automated build trigger
rmg at datadomain.com
Fri Jun 25 13:01:23 PDT 2004
Hi Jeff & all...
jab by jove:
> Put something like this in a script, then run every N minutes from
> 'at' or 'cron':
> NewChangelists=`p4 review -t checkcompile_cntr | cut -d' ' -c2`
> for n in $NewChangelists
> echo Processing changelist $n
> # put in code to actually *do* something, here*
> p4 review -t checkcompile_cntr $n
> (Now, that's written in Bourne shell from memory, but you get the
Lately, I've been using "journal-tailing" for various post-submit (or
other action!) triggers. Basically, you have a program reading the end
of the journal file as things happen, and dispatching actions
("instantly" - no pesk 47 second delays!) based on what it sees.
For example code, see
`p4 -p public.perforce,com:1666 print -q //guest/richard_geiger/utils/p4jd`
(This is production code we use here; I haven't done any
"productization", but should give the general idea).
Among other things, we use this to trigger syncs in our webspace
whenever changes are checked in to the "live" branches for our
internal web and external support web. It's nice to be able submit,
and then go directly to the live web and see the change immediately.
I also have it rigged to do an "aural" display - whenever the server
updates a User Spec's Access time field, it plays a sound clip I've
assigned to that user; any time a submit happens, it greets me with
More information about the perforce-user