I am new to this whole contribution thing, but I did manage to fix a bug
in ant 1.3's optional taskdef package.

The perforce/P4Sync.java file is incorrect. It currently looks like:


//Check API for these - it's how CVS does it...
commandline.createArgument().setValue(P4Port);
commandline.createArgument().setValue(P4User);
commandline.createArgument().setValue(P4Client);

However, this added spurious spaces to the command line which caused p4
running on linux to bomb for some mysterious reason. To fix: it should
be:

//Check API for these - it's how CVS does it...
if (P4Port != null && P4Port.length() > 0)
  commandline.createArgument().setValue(P4Port);
if (P4User != null && P4User.length() > 0)
                commandline.createArgument().setValue(P4User);
if (P4Client != null && P4Client.length() > 0)
                commandline.createArgument().setValue(P4Client);

Honestly, this is a hack. The change should be made to the segment of
code that actually composed the command to be executed. If one of the
elements of the argument array is of length 0, then it should not add
any additional spaces to the command line. Just my 2 cents.

Anyway, that is my first contribution to open source. I feel so much
better about myself now. ;)

^byrne
[EMAIL PROTECTED]

Reply via email to