Search in sources :

Example 1 with PerforceTagCommand

use of org.apache.maven.scm.provider.perforce.command.tag.PerforceTagCommand in project maven-scm by apache.

the class PerforceScmProvider method tag.

protected TagScmResult tag(ScmProviderRepository repository, ScmFileSet fileSet, CommandParameters params) throws ScmException {
    PerforceTagCommand command = new PerforceTagCommand();
    command.setLogger(getLogger());
    return (TagScmResult) command.execute(repository, fileSet, params);
}
Also used : PerforceTagCommand(org.apache.maven.scm.provider.perforce.command.tag.PerforceTagCommand) TagScmResult(org.apache.maven.scm.command.tag.TagScmResult)

Example 2 with PerforceTagCommand

use of org.apache.maven.scm.provider.perforce.command.tag.PerforceTagCommand 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"));
    }
}
Also used : ScmRepository(org.apache.maven.scm.repository.ScmRepository) PerforceTagCommand(org.apache.maven.scm.provider.perforce.command.tag.PerforceTagCommand) PerforceScmProvider(org.apache.maven.scm.provider.perforce.PerforceScmProvider) PerforceScmProviderRepository(org.apache.maven.scm.provider.perforce.repository.PerforceScmProviderRepository)

Aggregations

PerforceTagCommand (org.apache.maven.scm.provider.perforce.command.tag.PerforceTagCommand)2 TagScmResult (org.apache.maven.scm.command.tag.TagScmResult)1 PerforceScmProvider (org.apache.maven.scm.provider.perforce.PerforceScmProvider)1 PerforceScmProviderRepository (org.apache.maven.scm.provider.perforce.repository.PerforceScmProviderRepository)1 ScmRepository (org.apache.maven.scm.repository.ScmRepository)1