Search in sources :

Example 1 with AccuRevCheckOutCommand

use of org.apache.maven.scm.provider.accurev.command.checkout.AccuRevCheckOutCommand in project maven-scm by apache.

the class AccuRevScmProvider method checkout.

@Override
protected CheckOutScmResult checkout(ScmProviderRepository repository, ScmFileSet fileSet, CommandParameters parameters) throws ScmException {
    // workaround deprecated behaviour
    // TODO pull up to AbstractScmProvider
    AccuRevScmProviderRepository accuRevRepo = (AccuRevScmProviderRepository) repository;
    if (!repository.isPersistCheckout() && accuRevRepo.shouldUseExportForNonPersistentCheckout()) {
        ExportScmResult result = export(repository, fileSet, parameters);
        if (result.isSuccess()) {
            return new CheckOutScmResult(result.getCommandLine(), result.getExportedFiles(), accuRevRepo.getExportRelativePath());
        } else {
            return new CheckOutScmResult(result.getCommandLine(), result.getProviderMessage(), result.getCommandOutput(), false);
        }
    }
    AccuRevCheckOutCommand command = new AccuRevCheckOutCommand(getLogger());
    return command.checkout(repository, fileSet, parameters);
}
Also used : AccuRevCheckOutCommand(org.apache.maven.scm.provider.accurev.command.checkout.AccuRevCheckOutCommand) ExportScmResult(org.apache.maven.scm.command.export.ExportScmResult) CheckOutScmResult(org.apache.maven.scm.command.checkout.CheckOutScmResult)

Aggregations

CheckOutScmResult (org.apache.maven.scm.command.checkout.CheckOutScmResult)1 ExportScmResult (org.apache.maven.scm.command.export.ExportScmResult)1 AccuRevCheckOutCommand (org.apache.maven.scm.provider.accurev.command.checkout.AccuRevCheckOutCommand)1