Search in sources :

Example 6 with PerforceScmProviderRepository

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

the class PerforceScmProviderTest method testParseConnectionWithHostPortAndUsername.

public void testParseConnectionWithHostPortAndUsername() throws Exception {
    ScmRepository repo = makeScmRepository("scm:perforce:host:1234:username@//depot/projects/pathname");
    PerforceScmProviderRepository p4Repo = (PerforceScmProviderRepository) repo.getProviderRepository();
    assertEquals("host", p4Repo.getHost());
    assertEquals(1234, p4Repo.getPort());
    assertEquals("username", p4Repo.getUser());
    assertNull(p4Repo.getPassword());
    assertEquals("//depot/projects/pathname", p4Repo.getPath());
}
Also used : ScmRepository(org.apache.maven.scm.repository.ScmRepository) PerforceScmProviderRepository(org.apache.maven.scm.provider.perforce.repository.PerforceScmProviderRepository)

Example 7 with PerforceScmProviderRepository

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

the class PerforceScmProviderTest method testParseConnectionWithHostAndUsername.

public void testParseConnectionWithHostAndUsername() throws Exception {
    ScmRepository repo = makeScmRepository("scm:perforce:username@host://depot/projects/pathname");
    PerforceScmProviderRepository p4Repo = (PerforceScmProviderRepository) repo.getProviderRepository();
    assertEquals("host", p4Repo.getHost());
    assertEquals(0, p4Repo.getPort());
    assertEquals("username", p4Repo.getUser());
    assertNull(p4Repo.getPassword());
    assertEquals("//depot/projects/pathname", p4Repo.getPath());
}
Also used : ScmRepository(org.apache.maven.scm.repository.ScmRepository) PerforceScmProviderRepository(org.apache.maven.scm.provider.perforce.repository.PerforceScmProviderRepository)

Example 8 with PerforceScmProviderRepository

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

the class PerforceScmProviderTest method testParseConnectionWithHost.

public void testParseConnectionWithHost() throws Exception {
    ScmRepository repo = makeScmRepository("scm:perforce:host://depot/projects/pathname");
    PerforceScmProviderRepository p4Repo = (PerforceScmProviderRepository) repo.getProviderRepository();
    assertEquals("host", p4Repo.getHost());
    assertEquals(0, p4Repo.getPort());
    assertNull(p4Repo.getUser());
    assertNull(p4Repo.getPassword());
    assertEquals("//depot/projects/pathname", p4Repo.getPath());
}
Also used : ScmRepository(org.apache.maven.scm.repository.ScmRepository) PerforceScmProviderRepository(org.apache.maven.scm.provider.perforce.repository.PerforceScmProviderRepository)

Example 9 with PerforceScmProviderRepository

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

the class PerforceChangeLogCommandTest method testCommandLineRevs.

private void testCommandLineRevs(String commandLine, ScmVersion version1, ScmVersion version2) throws Exception {
    ScmRepository repository = getScmManager().makeScmRepository("scm:perforce://depot/projects/pathname");
    PerforceScmProviderRepository repo = (PerforceScmProviderRepository) repository.getProviderRepository();
    Commandline cl = PerforceChangeLogCommand.createCommandLine(repo, workingDirectory, System.getProperty(PerforceScmProvider.DEFAULT_CLIENTSPEC_PROPERTY), null, null, null, version1, version2);
    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 10 with PerforceScmProviderRepository

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

the class PerforceUnEditCommandTest method testCommandLine.

// ----------------------------------------------------------------------
// 
// ----------------------------------------------------------------------
private void testCommandLine(String scmUrl, String commandLine) throws Exception {
    ScmRepository repository = getScmManager().makeScmRepository(scmUrl);
    PerforceScmProviderRepository svnRepository = (PerforceScmProviderRepository) repository.getProviderRepository();
    ScmFileSet files = new ScmFileSet(new File("."), Arrays.asList(new File[] { new File("foo.xml"), new File("bar.xml") }));
    Commandline cl = PerforceUnEditCommand.createCommandLine(svnRepository, workingDirectory, files);
    assertCommandLine(commandLine, null, cl);
}
Also used : ScmRepository(org.apache.maven.scm.repository.ScmRepository) ScmFileSet(org.apache.maven.scm.ScmFileSet) Commandline(org.codehaus.plexus.util.cli.Commandline) PerforceScmProviderRepository(org.apache.maven.scm.provider.perforce.repository.PerforceScmProviderRepository) File(java.io.File)

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