Browse Source

PR: 18154

Make logging from p4 submit be done using the SimpleP4OutputHandler in order
to make this logging more homogeneous


git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@275363 13f79535-47bb-0310-9956-ffa450edef68
master
Antoine Levy-Lambert 21 years ago
parent
commit
bf7313fbcd
1 changed files with 6 additions and 3 deletions
  1. +6
    -3
      src/main/org/apache/tools/ant/taskdefs/optional/perforce/P4Submit.java

+ 6
- 3
src/main/org/apache/tools/ant/taskdefs/optional/perforce/P4Submit.java View File

@@ -98,7 +98,7 @@ public class P4Submit extends P4Base {
*/
public void execute() throws BuildException {
if (change != null) {
execP4Command("submit -c " + change, (P4HandlerAdapter) new P4SubmitAdapter());
execP4Command("submit -c " + change, (P4HandlerAdapter) new P4SubmitAdapter(this));
} else {
//here we'd parse the output from change -o into submit -i
//in order to support default change.
@@ -109,13 +109,16 @@ public class P4Submit extends P4Base {
/**
* internal class used to process the output of p4 submit
*/
public class P4SubmitAdapter extends P4HandlerAdapter {
public class P4SubmitAdapter extends SimpleP4OutputHandler {
public P4SubmitAdapter(P4Base parent) {
super(parent);
}
/**
* process a line of stdout/stderr coming from Perforce
* @param line line of stdout or stderr coming from Perforce
*/
public void process(String line) {
log(line, Project.MSG_VERBOSE);
super.process(line);
getProject().setProperty("p4.needsresolve", "0");
// this type of output might happen
// Change 18 renamed change 20 and submitted.


Loading…
Cancel
Save