Hi, Sounds like a problem in the CommandLine.Argument class maybe? I guess you're saying that p4 sync works but p4 sync doesn't - what about running the p4 command directly on the command line, does it choke then?
I wonder if this affects any other externally executed process on Linux? Les > -----Original Message----- > From: Byrne Reese [mailto:[EMAIL PROTECTED] > Sent: 08 March 2001 02:52 > To: [EMAIL PROTECTED] > Subject: Bug Fix to taskdefs.optional.perforce.P4Sync > > > 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] > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
