use of org.apache.maven.scm.provider.jazz.command.JazzScmCommand in project maven-scm by apache.
the class JazzTagCommand method createTagDeliverCommand.
// Create the JazzScmCommand to execute the "scm deliver ..." command
// This will deliver the changes to the flow target (stream or other workspace).
public JazzScmCommand createTagDeliverCommand(JazzScmProviderRepository repo, ScmFileSet fileSet, String tag) {
JazzScmCommand command = new JazzScmCommand(JazzConstants.CMD_DELIVER, repo, fileSet, getLogger());
if (repo.getWorkspace() != null && !repo.getWorkspace().equals("")) {
// Don't deliver from the workspace, as it has the release.properties etc files in it
// and jazz will choke on them, so use the workspace that we just created (tag) instead.
command.addArgument(JazzConstants.ARG_DELIVER_SOURCE);
command.addArgument(tag);
}
if (repo.getFlowTarget() != null && !repo.getFlowTarget().equals("")) {
command.addArgument(JazzConstants.ARG_DELIVER_TARGET);
command.addArgument(repo.getFlowTarget());
}
return command;
}
use of org.apache.maven.scm.provider.jazz.command.JazzScmCommand in project maven-scm by apache.
the class JazzUnEditCommand method createUneditCommand.
public JazzScmCommand createUneditCommand(ScmProviderRepository repo, ScmFileSet fileSet) {
JazzScmCommand command = new JazzScmCommand(JazzConstants.CMD_LOCK, JazzConstants.CMD_SUB_RELEASE, repo, fileSet, getLogger());
List<File> files = fileSet.getFileList();
if (files != null && !files.isEmpty()) {
for (File file : files) {
// Un-Lock only the files specified
command.addArgument(file.getPath());
}
} else {
// Un-Lock all files
command.addArgument(".");
}
return command;
}
use of org.apache.maven.scm.provider.jazz.command.JazzScmCommand in project maven-scm by apache.
the class JazzUpdateCommand method createAcceptCommand.
public JazzScmCommand createAcceptCommand(ScmProviderRepository repo, ScmFileSet fileSet) {
JazzScmCommand command = new JazzScmCommand(JazzConstants.CMD_ACCEPT, repo, fileSet, getLogger());
command.addArgument(JazzConstants.ARG_FLOW_COMPONENTS);
return command;
}
use of org.apache.maven.scm.provider.jazz.command.JazzScmCommand in project maven-scm by apache.
the class JazzUpdateCommand method executeUpdateCommand.
/**
* {@inheritDoc}
*/
protected UpdateScmResult executeUpdateCommand(ScmProviderRepository repo, ScmFileSet fileSet, ScmVersion version) throws ScmException {
if (getLogger().isDebugEnabled()) {
getLogger().debug("Executing update command...");
}
JazzUpdateConsumer updateConsumer = new JazzUpdateConsumer(repo, getLogger());
ErrorConsumer errConsumer = new ErrorConsumer(getLogger());
JazzScmCommand updateCmd = createAcceptCommand(repo, fileSet);
int status = updateCmd.execute(updateConsumer, errConsumer);
if (status != 0) {
return new UpdateScmResult(updateCmd.getCommandString(), "Error code for Jazz SCM update command - " + status, errConsumer.getOutput(), false);
}
if (getLogger().isDebugEnabled()) {
if (!updateConsumer.getUpdatedFiles().isEmpty()) {
getLogger().debug("Iterating over \"Update\" results");
for (ScmFile file : updateConsumer.getUpdatedFiles()) {
getLogger().debug(file.getPath() + " : " + file.getStatus());
}
} else {
getLogger().debug("There are no updated files");
}
}
// We can use the checkout directory for this.
return new UpdateScmResult(updateCmd.getCommandString(), updateConsumer.getUpdatedFiles());
}
use of org.apache.maven.scm.provider.jazz.command.JazzScmCommand in project maven-scm by apache.
the class JazzCheckInCommand method createCreateChangesetCommand.
public JazzScmCommand createCreateChangesetCommand(ScmProviderRepository repo, ScmFileSet fileSet, String message) {
JazzScmCommand command = new JazzScmCommand(JazzConstants.CMD_CREATE, JazzConstants.CMD_SUB_CHANGESET, repo, false, fileSet, getLogger());
command.addArgument(message);
return command;
}
Aggregations