use of org.apache.maven.scm.provider.perforce.repository.PerforceScmProviderRepository in project maven-scm by apache.
the class PerforceChangeLogCommandTest method testCommandLine.
// ----------------------------------------------------------------------
//
// ----------------------------------------------------------------------
private void testCommandLine(String scmUrl, String commandLine) throws Exception {
ScmRepository repository = getScmManager().makeScmRepository(scmUrl);
PerforceScmProviderRepository repo = (PerforceScmProviderRepository) repository.getProviderRepository();
Commandline cl = PerforceChangeLogCommand.createCommandLine(repo, workingDirectory, System.getProperty(PerforceScmProvider.DEFAULT_CLIENTSPEC_PROPERTY), null, null, null, null, null);
assertCommandLine(commandLine, null, cl);
}
use of org.apache.maven.scm.provider.perforce.repository.PerforceScmProviderRepository in project maven-scm by apache.
the class PerforceInfoCommandTest method testPerforceInfo.
public void testPerforceInfo() throws Exception {
ScmRepository repo = makeScmRepository("scm:perforce://depot/projects/pathname");
PerforceScmProviderRepository p4Repo = (PerforceScmProviderRepository) repo.getProviderRepository();
PerforceScmProvider prov = new PerforceScmProvider();
PerforceTagCommand cmd = new PerforceTagCommand();
cmd.setLogger(prov.getLogger());
if (PerforceScmProvider.isLive()) {
assertNotNull(PerforceInfoCommand.getInfo(prov.getLogger(), p4Repo).getEntry("User name"));
assertNotNull(PerforceInfoCommand.getInfo(prov.getLogger(), p4Repo).getEntry("Client root"));
assertNotNull(PerforceInfoCommand.getInfo(prov.getLogger(), p4Repo).getEntry("Client name"));
assertNotNull(PerforceInfoCommand.getInfo(prov.getLogger(), p4Repo).getEntry("Client host"));
assertNull(PerforceInfoCommand.getInfo(prov.getLogger(), p4Repo).getEntry("foobar"));
}
}
use of org.apache.maven.scm.provider.perforce.repository.PerforceScmProviderRepository in project maven-scm by apache.
the class PerforceCheckOutCommandTest method testCommandLine.
// ----------------------------------------------------------------------
//
// ----------------------------------------------------------------------
private void testCommandLine(String scmUrl, String commandLine) throws Exception {
workingDirectory.mkdirs();
ScmRepository repository = getScmManager().makeScmRepository(scmUrl);
PerforceScmProviderRepository svnRepository = (PerforceScmProviderRepository) repository.getProviderRepository();
Commandline cl = PerforceCheckOutCommand.createCommandLine(svnRepository, workingDirectory, new ScmRevision("somelabel"), "test-test-maven");
assertCommandLine(commandLine, null, cl);
}
use of org.apache.maven.scm.provider.perforce.repository.PerforceScmProviderRepository in project maven-scm by apache.
the class PerforceLoginCommandTest method disabledTestLoginWithoutPassword.
/**
* This test requires P4 installed
*
* @throws Exception
*/
public void disabledTestLoginWithoutPassword() throws Exception {
ScmRepository repository = getScmManager().makeScmRepository("scm:perforce://depot/projects/pathname");
PerforceScmProviderRepository scmRepository = (PerforceScmProviderRepository) repository.getProviderRepository();
ScmFileSet fileSet = new ScmFileSet(new File("."));
PerforceLoginCommand command = new PerforceLoginCommand();
ScmLogger logger = new DefaultLog();
command.setLogger(logger);
command.executeLoginCommand(scmRepository, fileSet, null);
}
use of org.apache.maven.scm.provider.perforce.repository.PerforceScmProviderRepository in project maven-scm by apache.
the class PerforceRemoveCommandTest 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 = PerforceRemoveCommand.createCommandLine(svnRepository, workingDirectory, files);
assertCommandLine(commandLine, null, cl);
}
Aggregations