From 537a07b019e2de8769ae71acad23e90e725050f8 Mon Sep 17 00:00:00 2001 From: Stefan Bodewig Date: Fri, 13 Jul 2001 13:10:12 +0000 Subject: [PATCH] fix log messages of perforce tasks. Submitted by: Les Hughes git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@269341 13f79535-47bb-0310-9956-ffa450edef68 --- .../taskdefs/optional/perforce/P4Base.java | 31 ++++++++++++------- 1 file changed, 19 insertions(+), 12 deletions(-) diff --git a/src/main/org/apache/tools/ant/taskdefs/optional/perforce/P4Base.java b/src/main/org/apache/tools/ant/taskdefs/optional/perforce/P4Base.java index 647e23686..6450cf278 100644 --- a/src/main/org/apache/tools/ant/taskdefs/optional/perforce/P4Base.java +++ b/src/main/org/apache/tools/ant/taskdefs/optional/perforce/P4Base.java @@ -112,12 +112,12 @@ public abstract class P4Base extends org.apache.tools.ant.Task { util = new Perl5Util(); - //Get default P4 settings from environment - Mark would have done something cool with - //introspection here.....:-) - String tmpprop; + //Get default P4 settings from environment - Mark would have done something cool with + //introspection here.....:-) + String tmpprop; if((tmpprop = project.getProperty("p4.port")) != null) setPort(tmpprop); if((tmpprop = project.getProperty("p4.client")) != null) setClient(tmpprop); - if((tmpprop = project.getProperty("p4.user")) != null) setUser(tmpprop); + if((tmpprop = project.getProperty("p4.user")) != null) setUser(tmpprop); } protected void execP4Command(String command) throws BuildException { @@ -125,9 +125,9 @@ public abstract class P4Base extends org.apache.tools.ant.Task { } /** Execute P4 command assembled by subclasses. - @param command The command to run - @param p4input Input to be fed to command on stdin - @param handler A P4Handler to process any input and output + @param command The command to run + @param p4input Input to be fed to command on stdin + @param handler A P4Handler to process any input and output */ protected void execP4Command(String command, P4Handler handler) throws BuildException { try{ @@ -147,7 +147,14 @@ public abstract class P4Base extends org.apache.tools.ant.Task { } commandline.createArgument().setLine(command); - log("Execing "+commandline.getCommandline(), Project.MSG_VERBOSE); + + String[] cmdline = commandline.getCommandline() ; + String cmdl = ""; + for (int i=0 ; i < cmdline.length ; i++) { + cmdl += cmdline[i] + " "; + } + + log("Execing "+cmdl, Project.MSG_VERBOSE); if(handler == null ) handler = new SimpleP4OutputHandler(this); @@ -168,9 +175,9 @@ public abstract class P4Base extends org.apache.tools.ant.Task { } - - }catch(Exception e) { - throw new BuildException("Problem exec'ing P4 command: "+e.getMessage()); - } + + }catch(Exception e) { + throw new BuildException("Problem exec'ing P4 command: "+e.getMessage()); + } } }