Search in sources :

Example 36 with CommandParameters

use of org.apache.maven.scm.CommandParameters in project maven-scm by apache.

the class AbstractScmProvider method diff.

/**
 * {@inheritDoc}
 */
public DiffScmResult diff(ScmRepository repository, ScmFileSet fileSet, ScmVersion startVersion, ScmVersion endVersion) throws ScmException {
    login(repository, fileSet);
    CommandParameters parameters = new CommandParameters();
    parameters.setScmVersion(CommandParameter.START_SCM_VERSION, startVersion);
    parameters.setScmVersion(CommandParameter.END_SCM_VERSION, endVersion);
    return diff(repository.getProviderRepository(), fileSet, parameters);
}
Also used : CommandParameters(org.apache.maven.scm.CommandParameters)

Example 37 with CommandParameters

use of org.apache.maven.scm.CommandParameters in project maven-scm by apache.

the class AbstractScmProvider method tag.

/**
 * {@inheritDoc}
 */
public TagScmResult tag(ScmRepository repository, ScmFileSet fileSet, String tagName, ScmTagParameters scmTagParameters) throws ScmException {
    login(repository, fileSet);
    CommandParameters parameters = new CommandParameters();
    parameters.setString(CommandParameter.TAG_NAME, tagName);
    parameters.setScmTagParameters(CommandParameter.SCM_TAG_PARAMETERS, scmTagParameters);
    return tag(repository.getProviderRepository(), fileSet, parameters);
}
Also used : CommandParameters(org.apache.maven.scm.CommandParameters)

Example 38 with CommandParameters

use of org.apache.maven.scm.CommandParameters in project maven-scm by apache.

the class AbstractScmProvider method tag.

/**
 * {@inheritDoc}
 */
public TagScmResult tag(ScmRepository repository, ScmFileSet fileSet, String tagName, String message) throws ScmException {
    login(repository, fileSet);
    CommandParameters parameters = new CommandParameters();
    parameters.setString(CommandParameter.TAG_NAME, tagName);
    if (StringUtils.isNotEmpty(message)) {
        parameters.setString(CommandParameter.MESSAGE, message);
    }
    ScmTagParameters scmTagParameters = new ScmTagParameters(message);
    parameters.setScmTagParameters(CommandParameter.SCM_TAG_PARAMETERS, scmTagParameters);
    return tag(repository.getProviderRepository(), fileSet, parameters);
}
Also used : ScmTagParameters(org.apache.maven.scm.ScmTagParameters) CommandParameters(org.apache.maven.scm.CommandParameters)

Example 39 with CommandParameters

use of org.apache.maven.scm.CommandParameters in project maven-scm by apache.

the class AbstractScmProvider method update.

/**
 * {@inheritDoc}
 */
public UpdateScmResult update(ScmRepository repository, ScmFileSet fileSet, ScmVersion scmVersion, Date lastUpdate, String datePattern) throws ScmException {
    login(repository, fileSet);
    CommandParameters parameters = new CommandParameters();
    parameters.setScmVersion(CommandParameter.SCM_VERSION, scmVersion);
    if (lastUpdate != null) {
        parameters.setDate(CommandParameter.START_DATE, lastUpdate);
    }
    parameters.setString(CommandParameter.CHANGELOG_DATE_PATTERN, datePattern);
    parameters.setString(CommandParameter.RUN_CHANGELOG_WITH_UPDATE, "true");
    return update(repository.getProviderRepository(), fileSet, parameters);
}
Also used : CommandParameters(org.apache.maven.scm.CommandParameters)

Example 40 with CommandParameters

use of org.apache.maven.scm.CommandParameters in project maven-scm by apache.

the class AbstractScmProvider method mkdir.

/**
 * {@inheritDoc}
 */
public MkdirScmResult mkdir(ScmRepository repository, ScmFileSet fileSet, String message, boolean createInLocal) throws ScmException {
    login(repository, fileSet);
    CommandParameters parameters = new CommandParameters();
    if (message == null) {
        message = "";
        if (!createInLocal) {
            getLogger().warn("Commit message is empty!");
        }
    }
    parameters.setString(CommandParameter.MESSAGE, message);
    parameters.setString(CommandParameter.SCM_MKDIR_CREATE_IN_LOCAL, Boolean.toString(createInLocal));
    return mkdir(repository.getProviderRepository(), fileSet, parameters);
}
Also used : CommandParameters(org.apache.maven.scm.CommandParameters)

Aggregations

CommandParameters (org.apache.maven.scm.CommandParameters)68 ScmFileSet (org.apache.maven.scm.ScmFileSet)44 File (java.io.File)39 AbstractAccuRevCommandTest (org.apache.maven.scm.provider.accurev.command.AbstractAccuRevCommandTest)38 Test (org.junit.Test)38 ScmFileMatcher.assertHasScmFile (org.apache.maven.scm.ScmFileMatcher.assertHasScmFile)23 ScmFile (org.apache.maven.scm.ScmFile)8 ScmTag (org.apache.maven.scm.ScmTag)7 CheckOutScmResult (org.apache.maven.scm.command.checkout.CheckOutScmResult)7 Date (java.util.Date)6 ChangeFile (org.apache.maven.scm.ChangeFile)5 ChangeFileMatcher.changeFile (org.apache.maven.scm.ChangeFileMatcher.changeFile)5 ScmRevision (org.apache.maven.scm.ScmRevision)5 ExportScmResult (org.apache.maven.scm.command.export.ExportScmResult)5 InfoScmResult (org.apache.maven.scm.command.info.InfoScmResult)5 LoginScmResult (org.apache.maven.scm.command.login.LoginScmResult)5 AccuRevInfo (org.apache.maven.scm.provider.accurev.AccuRevInfo)5 Transaction (org.apache.maven.scm.provider.accurev.Transaction)5 ArrayList (java.util.ArrayList)4 ScmException (org.apache.maven.scm.ScmException)4