bodewig     01/03/09 00:47:48

  Modified:    src/main/org/apache/tools/ant/taskdefs/optional/perforce
                        P4Base.java
  Log:
  Fix bug in P4 tasks when port, user or client have not been specified.
  
  Submitted by: Byrne Reese <[EMAIL PROTECTED]>
  
  Revision  Changes    Path
  1.4       +9 -3      
jakarta-ant/src/main/org/apache/tools/ant/taskdefs/optional/perforce/P4Base.java
  
  Index: P4Base.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-ant/src/main/org/apache/tools/ant/taskdefs/optional/perforce/P4Base.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- P4Base.java       2001/01/12 15:28:34     1.3
  +++ P4Base.java       2001/03/09 08:47:48     1.4
  @@ -136,9 +136,15 @@
               commandline.setExecutable("p4");
   
               //Check API for these - it's how CVS does it...
  -            commandline.createArgument().setValue(P4Port);
  -            commandline.createArgument().setValue(P4User);
  -            commandline.createArgument().setValue(P4Client);
  +            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);
  +            }
               commandline.createArgument().setLine(command);
   
                log("Execing "+commandline.getCommandline(), 
Project.MSG_VERBOSE);
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to