Search in sources :

Example 11 with PerforceScmProviderRepository

use of org.apache.maven.scm.provider.perforce.repository.PerforceScmProviderRepository in project maven-scm by apache.

the class PerforceCheckInCommandTest method testCommandLine.

// ----------------------------------------------------------------------
// 
// ----------------------------------------------------------------------
private void testCommandLine(String scmUrl, String commandLine, ScmFileSet files) throws Exception {
    ScmRepository repository = getScmManager().makeScmRepository(scmUrl);
    PerforceScmProviderRepository svnRepository = (PerforceScmProviderRepository) repository.getProviderRepository();
    Commandline cl = PerforceCheckInCommand.createCommandLine(svnRepository, workingDirectory);
    assertCommandLine(commandLine, null, cl);
    String change = PerforceCheckInCommand.createChangeListSpecification(svnRepository, files, "Test checkin", "//depot/projects/pathname", "testjob");
    assertContains(change, "//depot/projects/pathname/foo.xml");
    assertContains(change, "//depot/projects/pathname/bar.xml");
    assertContains(change, "Test checkin");
    assertContains(change, "testjob");
}
Also used : ScmRepository(org.apache.maven.scm.repository.ScmRepository) Commandline(org.codehaus.plexus.util.cli.Commandline) PerforceScmProviderRepository(org.apache.maven.scm.provider.perforce.repository.PerforceScmProviderRepository)

Example 12 with PerforceScmProviderRepository

use of org.apache.maven.scm.provider.perforce.repository.PerforceScmProviderRepository in project maven-scm by apache.

the class PerforceDiffCommandTest method testCommandLine.

// ----------------------------------------------------------------------
// 
// ----------------------------------------------------------------------
private void testCommandLine(ScmVersion startRev, ScmVersion endRev, String commandLine) throws Exception {
    ScmRepository repository = getScmManager().makeScmRepository("scm:perforce://depot/projects/pathname");
    PerforceScmProviderRepository svnRepository = (PerforceScmProviderRepository) repository.getProviderRepository();
    Commandline cl = PerforceDiffCommand.createCommandLine(svnRepository, workingDirectory, startRev, endRev);
    assertCommandLine(commandLine, null, cl);
}
Also used : ScmRepository(org.apache.maven.scm.repository.ScmRepository) Commandline(org.codehaus.plexus.util.cli.Commandline) PerforceScmProviderRepository(org.apache.maven.scm.provider.perforce.repository.PerforceScmProviderRepository)

Example 13 with PerforceScmProviderRepository

use of org.apache.maven.scm.provider.perforce.repository.PerforceScmProviderRepository in project maven-scm by apache.

the class PerforceEditCommandTest method testCommandLine.

// ----------------------------------------------------------------------
// 
// ----------------------------------------------------------------------
private void testCommandLine(String scmUrl, String commandLine, File workingDir, ScmFileSet files) throws Exception {
    ScmRepository repository = getScmManager().makeScmRepository(scmUrl);
    PerforceScmProviderRepository svnRepository = (PerforceScmProviderRepository) repository.getProviderRepository();
    Commandline cl = PerforceEditCommand.createCommandLine(svnRepository, workingDir, files);
    assertCommandLine(commandLine, null, cl);
}
Also used : ScmRepository(org.apache.maven.scm.repository.ScmRepository) Commandline(org.codehaus.plexus.util.cli.Commandline) PerforceScmProviderRepository(org.apache.maven.scm.provider.perforce.repository.PerforceScmProviderRepository)

Example 14 with PerforceScmProviderRepository

use of org.apache.maven.scm.provider.perforce.repository.PerforceScmProviderRepository in project maven-scm by apache.

the class PerforceLoginCommandTest method testCommandLine.

// ----------------------------------------------------------------------
// 
// ----------------------------------------------------------------------
private void testCommandLine(String commandLine) throws Exception {
    ScmRepository repository = getScmManager().makeScmRepository("scm:perforce://depot/projects/pathname");
    PerforceScmProviderRepository scmRepository = (PerforceScmProviderRepository) repository.getProviderRepository();
    // CommandParameters params = new CommandParameters();
    Commandline cl = PerforceLoginCommand.createCommandLine(scmRepository, workingDirectory);
    assertCommandLine(commandLine, null, cl);
}
Also used : ScmRepository(org.apache.maven.scm.repository.ScmRepository) Commandline(org.codehaus.plexus.util.cli.Commandline) PerforceScmProviderRepository(org.apache.maven.scm.provider.perforce.repository.PerforceScmProviderRepository)

Example 15 with PerforceScmProviderRepository

use of org.apache.maven.scm.provider.perforce.repository.PerforceScmProviderRepository in project maven-scm by apache.

the class PerforceStatusCommandTest method testCommandLine.

// ----------------------------------------------------------------------
// 
// ----------------------------------------------------------------------
private void testCommandLine(String commandLine) throws Exception {
    ScmRepository repository = getScmManager().makeScmRepository("scm:perforce://depot/projects/pathname");
    PerforceScmProviderRepository svnRepository = (PerforceScmProviderRepository) repository.getProviderRepository();
    Commandline cl = PerforceStatusCommand.createOpenedCommandLine(svnRepository, workingDirectory, "//depot/projects/pathname");
    assertCommandLine(commandLine, null, cl);
}
Also used : ScmRepository(org.apache.maven.scm.repository.ScmRepository) Commandline(org.codehaus.plexus.util.cli.Commandline) PerforceScmProviderRepository(org.apache.maven.scm.provider.perforce.repository.PerforceScmProviderRepository)

Aggregations

PerforceScmProviderRepository (org.apache.maven.scm.provider.perforce.repository.PerforceScmProviderRepository)31 ScmRepository (org.apache.maven.scm.repository.ScmRepository)23 Commandline (org.codehaus.plexus.util.cli.Commandline)19 File (java.io.File)6 ScmFileSet (org.apache.maven.scm.ScmFileSet)5 CommandLineException (org.codehaus.plexus.util.cli.CommandLineException)5 CommandLineUtils (org.codehaus.plexus.util.cli.CommandLineUtils)5 ByteArrayInputStream (java.io.ByteArrayInputStream)2 CheckOutScmResult (org.apache.maven.scm.command.checkout.CheckOutScmResult)2 BufferedReader (java.io.BufferedReader)1 IOException (java.io.IOException)1 InputStreamReader (java.io.InputStreamReader)1 HashSet (java.util.HashSet)1 CommandParameters (org.apache.maven.scm.CommandParameters)1 ScmException (org.apache.maven.scm.ScmException)1 ScmFile (org.apache.maven.scm.ScmFile)1 ScmRevision (org.apache.maven.scm.ScmRevision)1 BlameLine (org.apache.maven.scm.command.blame.BlameLine)1 BlameScmResult (org.apache.maven.scm.command.blame.BlameScmResult)1 ChangeLogScmResult (org.apache.maven.scm.command.changelog.ChangeLogScmResult)1