Question

I am trying to add a script to the change-commit trigger for perforce. But every time I make a change in the trigger form and save the file and goes back to command prompt, I get a message saying Triggers not changed.

What I have done is, executed the command p4 triggers and in the newly opened form added the trigger for running a python script.

Is there a way to see all the triggers that have been added for a server? Whenever I run p4 triggers the trigger section is always empty.

This must be a silly question, but I tried searching for an answer for a long time. But couldn't find any.

I am new to perforce.

Was it helpful?

Solution

Are you perhaps entering your trigger definition with a '#' sign at the start, which would make it a comment and seem like you hadn't changed the table at all?

To display the current triggers definitions, the 'p4 triggers -o' command will print the server's current triggers table to the screen.

OTHER TIPS

Make sure you have a space (or TAB) at the start of your trigger line. I was tripped up by this for a good 30 minutes before seeing the "Trigger Definitions" example on this page:

https://www.perforce.com/perforce/r14.2/manuals/p4sag/chapter.scripting.html

You'll see that each trigger is indented beneath the "Triggers:" heading.

Anyway, this worked for me.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top