[p4] Need help to debug this simple trigger

G2345C g2345c at yahoo.com
Fri Nov 21 11:12:58 PST 2008


Hello all,
I captured the STDERR as all of you suggested. and the error is: 
Password not allowed at this server security level, use 'p4 login'.

So, i change this line: 
$P4="/tools/bin/p4 -p $P4PORT -u $P4USER -P $P4PASSWD";

to: 
$P4="/tools/bin/p4 -p $P4PORT -u $P4USER";


Then it works. WOW 

Thanks for your help


--- On Fri, 11/21/08, Michael Delaney <mdelaney at upromise.com> wrote:

> From: Michael Delaney <mdelaney at upromise.com>
> Subject: Re: [p4] Need help to debug this simple trigger
> To: g2345c at yahoo.com
> Cc: perforce-user at perforce.com
> Date: Friday, November 21, 2008, 10:38 AM
> You could try to print out the command to a log file, or
> stdout, and see 
> what command is actually being ran ... that might help you
> debug it
> 
> $command = "$P4 describe -s $change_num"
> print "running command ... $command"
> @change_info=`$command`;
> 
> print "@change_info";
> exit 1;
> 
> G2345C wrote:
> > 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
> >
> >
> > #!/usr/local/bin/perl
> >
> > my $change_num, $server_port, $client_name;
> > my $p4;
> > my @change_info, @change_info_long;
> >
> > $P4PORT='perforce:1666';
> > $P4USER='g2345c';
> > $P4PASSWD='password';
> > $ENV{P4USER}='g2345c';
> > $ENV{P4PASSWD}='password';
> >
> > $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;
> >
> >
> >
> >       
> > _______________________________________________
> > perforce-user mailing list  - 
> perforce-user at perforce.com
> >
> http://maillist.perforce.com/mailman/listinfo/perforce-user
> >


      



More information about the perforce-user mailing list