[p4] Need help to debug this simple trigger

G2345C g2345c at yahoo.com
Fri Nov 21 10:00:32 PST 2008

Hell all,
I dont understand what did i do wrong in this trigger?. I just want to print the output of "p4 describe -s $change_num" when i submit something, but it keeps showing me nothing. but if i change that line to "p4 info" it show the output. Please help me please
Server version: P4D/LINUX26X86_64/2006.1/114363 (2007/01/10)

Here is the trigger:

test-trigger change-submit //depot/test/... "/usr/local/bin/perl /tmp/scripts/testtrigger.pl %changelist% %serverport% %client%"

And Here is the perl script


my $change_num, $server_port, $client_name;
my $p4;
my @change_info, @change_info_long;


$P4="/tools/bin/p4 -p $P4PORT -u $P4USER -P $P4PASSWD";

#login to perforce
system ("export P4USER=hbnguyen");
`echo $P4PASSWD | $P4 login`;

$change_num = $ARGV[0];
$server_port = $ARGV[1];
$client_name = $ARGV[2];

@change_info=`$P4 describe -s $change_num`;

#If i replace the line above with this line, i got the output 
#@change_info=`$P4 info`;

print "@change_info";
exit 1;


More information about the perforce-user mailing list