Search in sources :

Example 26 with ScmRevision

use of org.apache.maven.scm.ScmRevision in project maven-scm by apache.

the class PerforceChangeLogCommandTest method testGetCommandLineWithStartAndEndChangelists.

public void testGetCommandLineWithStartAndEndChangelists() throws Exception {
    System.setProperty(PerforceScmProvider.DEFAULT_CLIENTSPEC_PROPERTY, "foo");
    testCommandLineRevs(cmdPrefix + " -c foo changes -t ...@123456,234567", new ScmRevision("123456"), new ScmRevision("234567"));
}
Also used : ScmRevision(org.apache.maven.scm.ScmRevision)

Example 27 with ScmRevision

use of org.apache.maven.scm.ScmRevision 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);
}
Also used : ScmRepository(org.apache.maven.scm.repository.ScmRepository) Commandline(org.codehaus.plexus.util.cli.Commandline) ScmRevision(org.apache.maven.scm.ScmRevision) PerforceScmProviderRepository(org.apache.maven.scm.provider.perforce.repository.PerforceScmProviderRepository)

Example 28 with ScmRevision

use of org.apache.maven.scm.ScmRevision in project maven-scm by apache.

the class GitChangeLogCommandTest method testCommandLineDateVersionRanges.

public void testCommandLineDateVersionRanges() throws Exception {
    Date startDate = getDate(2003, Calendar.SEPTEMBER, 10, 1, 1, 1, GMT_TIME_ZONE);
    Date endDate = getDate(2005, Calendar.NOVEMBER, 13, 23, 23, 23, GMT_TIME_ZONE);
    testCommandLine("scm:git:http://foo.com/git", null, startDate, endDate, new ScmRevision("1"), new ScmRevision("10"), "git whatchanged \"--since=2003-09-10 01:01:01 +0000\" \"--until=2005-11-13 23:23:23 +0000\" --date=iso 1..10" + " -- " + StringUtils.quoteAndEscape(workingDirectory.getPath(), '"'));
}
Also used : ScmRevision(org.apache.maven.scm.ScmRevision) Date(java.util.Date)

Aggregations

ScmRevision (org.apache.maven.scm.ScmRevision)28 File (java.io.File)12 ScmFileSet (org.apache.maven.scm.ScmFileSet)12 Commandline (org.codehaus.plexus.util.cli.Commandline)10 Date (java.util.Date)5 CommandParameters (org.apache.maven.scm.CommandParameters)5 AbstractAccuRevCommandTest (org.apache.maven.scm.provider.accurev.command.AbstractAccuRevCommandTest)5 Test (org.junit.Test)5 ChangeFile (org.apache.maven.scm.ChangeFile)4 ScmException (org.apache.maven.scm.ScmException)4 ScmFile (org.apache.maven.scm.ScmFile)4 ScmVersion (org.apache.maven.scm.ScmVersion)4 ChangeLogScmResult (org.apache.maven.scm.command.changelog.ChangeLogScmResult)4 ScmRepository (org.apache.maven.scm.repository.ScmRepository)4 ChangeFileMatcher.changeFile (org.apache.maven.scm.ChangeFileMatcher.changeFile)3 ScmBranch (org.apache.maven.scm.ScmBranch)3 ChangeLogSet (org.apache.maven.scm.command.changelog.ChangeLogSet)3 FileDifference (org.apache.maven.scm.provider.accurev.FileDifference)3 Stream (org.apache.maven.scm.provider.accurev.Stream)3 Transaction (org.apache.maven.scm.provider.accurev.Transaction)3