[SPAM] - Re: [p4perl] Help for a beginner - Sender is forged (SPF Fail)

Tony Smith tony@smee.org
Tue, 21 Dec 2004 23:43:52 +0000


On Tuesday 21 December 2004 21:59, Craig Leigh wrote:
> Hi,
>
> This code fragment with proper setup does list changelist, unfortunately
> all.
>
>  my $chglist = $p4->Run ("changes");
>
>
> When I add params for the command to display time '-t', limit to depot
> '//LS/mainline', and range based on time
> '@2004/12/20:1:08,@2004/12/21:1:07
>
> I get nothing.  Note I have broken down the parameter and
> re-concatenated them into one variable and used this.
>
>  $atsign = "@";
>  $timeSwitch = "-t";
>  $pathSwitch = "  //LS/mainline/...";
>  $fromDate = "2004/12/20:1:08,";
>  $toDate = "2004/12/21:1:07";
>  $fromDate = $atsign.$fromDate;
>  $toDate = $atsign.$toDate;
>  $param = $timeSwitch.$pathSwitch.$fromDate.$toDate;
>
>  my $chglist = $p4->Run ("changes", $param");
>
> Still does not work.  Works from the command line fine like this:
>
> P4 changes -t //LS/mainline/... @2004/12/20:1:08,@ 2004/12/21:1:07
>
> Any ideas why?

You're running:

 p4 changes "-t //LS/mainline/...@2004/12/20:1:08,@2004/12/21:1:07"

(i.e. with one argument to 'p4 changes') and since there's no such file 
Perforce returns no data. What you're trying to run is:

   p4 changes "-t" "//LS/mainline/...@2004/12/20:1:08,@2004/12/21:1:07"

(with two arguments to 'p4 changes') and the way to do it is:

$atsign = "@";
$timeSwitch = "-t";
$pathSwitch = "  //LS/mainline/...";
$fromDate = "2004/12/20:1:08,";
$toDate = "2004/12/21:1:07";
$fromDate = $atsign.$fromDate;
$toDate = $atsign.$toDate;
$param = $pathSwitch.$fromDate.$toDate;

my $chglist = $p4->Run ("changes", $timeSwitch, $param);

Tony