[p4perl] help for output of p4 revert -a file
Tony Smith
tony at smee.org
Wed Apr 13 12:59:32 PDT 2005
vik y wrote:
>> When I type this command: p4 revert -a //depot/...
>> some infomation will be print to the screen, showing that if the file
>> reverted or file not found. I try to get those infomation in my script,
>> what I get is always 0. Could anybody know how to figure it out?
>
>
>> The output should be returned from the $p4->Revert( '-a',
>> '//depot/...' ) call. Note the way arguments are quoted above.
>
>
> What is $p4? I did not use the p4perl package.
Ah. I rather assumed you were using P4Perl as this is the P4Perl mailing
list...
> when I use the statement:
> system ("p4 revert -a //depot/..."); it always returns 0. Could you pls
> give me the details of how to get the output if I do not use the package
> p4perl? or where is the code of p4::Revert?
If you want the output you'll have to use Perl's 'backtick' operator. i.e.
my $output = `p4 revert -a //depot/...`;
Tony
More information about the p4perl
mailing list