You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ant.apache.org by bo...@apache.org on 2001/07/13 15:10:22 UTC
cvs commit: jakarta-ant/src/main/org/apache/tools/ant/taskdefs/optional/perforce P4Base.java
bodewig 01/07/13 06:10:20
Modified: src/main/org/apache/tools/ant/taskdefs/optional/perforce
P4Base.java
Log:
fix log messages of perforce tasks.
Submitted by: Les Hughes <le...@rubus.com>
Revision Changes Path
1.5 +19 -12 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.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- P4Base.java 2001/03/09 08:47:48 1.4
+++ P4Base.java 2001/07/13 13:10:12 1.5
@@ -112,12 +112,12 @@
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 @@
}
/** 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,8 +147,15 @@
}
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);
Execute exe = new Execute(handler, null);
@@ -168,9 +175,9 @@
}
-
- }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());
+ }
}
}