Looking at your "trigger line", it should fire when there is a change to
files in: //depot/project/...
Looking at your "trigger script", it runs the command:
/usr/local/bin/p4 files //depot/orb_main/...@=$CHANGE
Comments:
1. I'm sure there's a reason why the directory names are different, but
it looks like a coding error to me. If you submit changes to
//depot/orb_main and expect this trigger to you, the trigger line needs to
be changed.
2. I would not put a "p4 print" (or "p4 anything") inside a loop, if I
had a choice. It is not efficient server usage. You might consider this:
- "p4 print -q @=$CHANGE | grep-for-tabs"
I suggest the above command because it's short, has one-trip-to-server
(protocol people would quibble, but they also would understand the
motivation for this recommendation), and because you do not *CARE* which
file has a tab except (perhaps) to have a better error message. (Do not
misunderstand me - the better error message is worth the time, but there are
more efficient ways to get to that better error message.)
Anyhow, the directory names are wrong. Start there, and change the 'p4cmd='
to include port / user. Pass the port/user/etc from the server as part of
the trigger spec, and you avoid a later headache. (That headache is, "I have
multiple servers on the same machines, but the triggers are trying to
connect to the wrong server.")
-jab
Post by Jonathan BiggarIt is a programming question, and so it's time to debug the sucker.
I'd start with the following, because triggers are always fun to
debug. (Why? Because the run-time environment and the development
environment have different userids, permissions, and environment
variables/registries unless you are very careful.)
I'm willing to bet that the output of "p4 info" when run "by you" and
then when run "by the trigger" produce wildly different output.
Redirect that output to a file (hard-code the name for debugging) and
see how different.
Odds are good that your trigger needs to set environment variables
like "P4USER" and perhaps even "P4CLIENT" (or workspace) and the like.
-Jeff Bowles
ps. Throw in a "p4 clients" and "p4 users" into the script,
redirecting the output, just to see if that behavior's different also.
It'll revolve around authentication / environment, I betcha.
That's good advice, but the problem is that the trigger doesn't even
touch /tmp/notabs
as the first line of the script, and the file doesn't get created.
Somehow my trigger specification is broken. Any ideas?
--
Jon Biggar
Floorboard Software
_______________________________________________
http://maillist.perforce.com/mailman/listinfo/perforce-user
--
---
Jeff Bowles - ***@gmail.com