ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Les Hughes <leslie.hug...@rubus.com>
Subject RE: Bug Fix to taskdefs.optional.perforce.P4Sync
Date Fri, 09 Mar 2001 13:18:58 GMT

Bit off topic but it's got me interested.

Since Ant's passing an array of args, instead of a String representing the
commandline, I guess p4's getopts routine finds an empty string as an arg
and croaks (as in p4 "" depots). I've reproduced this on NT and Solaris on
the command line and yep, all of the clients seem to be broken in this way.

I'll get our support guys to raise a bug with Perforce.

Bye,

Les


> -----Original Message-----
> From: Stefan Bodewig [mailto:bodewig@apache.org]
> Sent: 09 March 2001 07:30
> To: ant-dev@jakarta.apache.org
> Subject: Re: Bug Fix to taskdefs.optional.perforce.P4Sync
> 
> 
> Les Hughes <leslie.hughes@rubus.com> wrote:
> 
> > Sounds like a problem in the CommandLine.Argument class maybe?
> 
> Not really.
> 
> What Byrne sees looks like spaces, but they themselves wouldn't cause
> a problem. Ant doesn't pass the arguments to the executable as one
> long line, but as an array of arguments.
> 
> If P4User is empty,
> 
> >> commandline.createArgument().setValue(P4User);
> 
> will result in an empty String as part of the array - and this is what
> p4 can not deal with.
> 
> I think his patch is going to be submitted rather soon, as this is the
> correct fix IMHO - there may be times where an empty argument is
> exactly what you want to pass to a process, changing
> CommandLine.Argument to prohibit such arguments would be the wrong
> way, again IMHO.
> 
> Stefan
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: ant-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: ant-dev-help@jakarta.apache.org
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: ant-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: ant-dev-help@jakarta.apache.org


Mime
View raw message