use of org.apache.maven.scm.provider.jazz.command.consumer.DebugLoggerConsumer in project maven-scm by apache.
the class JazzEditCommand method executeEditCommand.
/**
* {@inheritDoc}
*/
protected ScmResult executeEditCommand(ScmProviderRepository repo, ScmFileSet fileSet) throws ScmException {
if (getLogger().isDebugEnabled()) {
getLogger().debug("Executing edit command...");
}
DebugLoggerConsumer editConsumer = new DebugLoggerConsumer(getLogger());
ErrorConsumer errConsumer = new ErrorConsumer(getLogger());
JazzScmCommand editCmd = createEditCommand(repo, fileSet);
int status = editCmd.execute(editConsumer, errConsumer);
if (status != 0) {
return new EditScmResult(editCmd.getCommandString(), "Error code for Jazz SCM edit command - " + status, errConsumer.getOutput(), false);
}
return new EditScmResult(editCmd.getCommandString(), "Successfully Completed.", editConsumer.getOutput(), true);
}
use of org.apache.maven.scm.provider.jazz.command.consumer.DebugLoggerConsumer in project maven-scm by apache.
the class JazzUnEditCommand method executeUnEditCommand.
/**
* {@inheritDoc}
*/
protected ScmResult executeUnEditCommand(ScmProviderRepository repo, ScmFileSet fileSet) throws ScmException {
if (getLogger().isDebugEnabled()) {
getLogger().debug("Executing unedit command...");
}
DebugLoggerConsumer uneditConsumer = new DebugLoggerConsumer(getLogger());
ErrorConsumer errConsumer = new ErrorConsumer(getLogger());
JazzScmCommand uneditCmd = createUneditCommand(repo, fileSet);
int status = uneditCmd.execute(uneditConsumer, errConsumer);
if (status != 0) {
return new UnEditScmResult(uneditCmd.getCommandString(), "Error code for Jazz SCM unedit command - " + status, errConsumer.getOutput(), false);
}
return new UnEditScmResult(uneditCmd.getCommandString(), "Successfully Completed.", uneditConsumer.getOutput(), true);
}
Aggregations