[p4perl] Issues running p4 diff2 using p4perl

stuart.moore at symbian.com stuart.moore at symbian.com
Fri Nov 30 06:47:01 PST 2007

We recently upgraded our perforce server version to 2006.2, which broke 
some scripts that had been using an old version of p4perl, so I've 
upgraded to the newest - 3.6001.

This seems to have solved most things, however I cannot persuade diff2 to 
work - using ParseForms() and running either of the following lines

        my @diff2 = $self->{p4}->Run("diff2", 
$file."\@".$self->{previous}, $file."\@".$self->{number});

        my @diff2_context = $self->{p4}->Run("diff2", "-dc", 
$file."\@".$self->{previous}, $file."\@".$self->{number});

results in a data structure that doesn't contain a diff - in both cases 
the output is 

  DB<5> x @diff2
0  HASH(0x32f97cc)
   'depotFile' => ARRAY(0x32f9de4)
      0  $file
      1  $file
   'rev' => ARRAY(0x3224948)
      0  3
      1  4
   'status' => 'content'
   'type' => ARRAY(0x32f9f34)
      0  'text'
      1  'text'

Am I doing something wrong? Running the equivalent command on the command 
line produces the diff I'd expect, as does P4Perl without ParseForms.

Stuart Moore

 Symbian Software Ltd is a company registered in England and Wales
with registered number 4190020 and registered office at 2-6
Boundary Row, Southwark, London,  SE1 8HP, UK. This message is
intended only for use by the named addressee and may contain
privileged and/or confidential information. If you are not the
named addressee you should not disseminate, copy or take any action
in reliance on it. If you have received this message in error
please notify postmaster at symbian.com and delete the message and any
attachments accompanying it immediately. Neither Symbian nor any of
its Affiliates accepts liability for any corruption, interception,
amendment, tampering or viruses occurring to this message in
transit or for any message sent by its employees which is not in
compliance with Symbian corporate policy.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://maillist.perforce.com/pipermail/p4perl/attachments/20071130/b341a0f8/attachment-0001.html>

More information about the p4perl mailing list