Package org.apache.maven.scm

Examples of org.apache.maven.scm.ScmRevision


    }

    public void testGetCommandLineWithRevs()
        throws Exception
    {
        testCommandLine( new ScmRevision( "somelabel" ), new ScmRevision( "someend" ),
                         cmdPrefix + " diff2 -u ...@somelabel ...@someend" );
    }
View Full Code Here


    // revisionArgument
    // ----------------------------------------------------------------------

    public void testIsRevisionArgumentSimple()
    {
        assertTrue( SvnTagBranchUtils.isRevisionSpecifier( new ScmRevision( "12345" ) ) );

        assertTrue( SvnTagBranchUtils.isRevisionSpecifier( new ScmRevision( "hEaD" ) ) );

        assertTrue( SvnTagBranchUtils.isRevisionSpecifier( new ScmRevision( "bAsE" ) ) );

        assertTrue( SvnTagBranchUtils.isRevisionSpecifier( new ScmRevision( "cOmMiTtEd" ) ) );

        assertTrue( SvnTagBranchUtils.isRevisionSpecifier( new ScmRevision( "pReV" ) ) );

        assertTrue( SvnTagBranchUtils.isRevisionSpecifier( new ScmRevision( "{2005-1-1}" ) ) );

    }
View Full Code Here

    }

    public void testIsRevisionArgumentRange()
    {
        assertTrue( SvnTagBranchUtils.isRevisionSpecifier( new ScmRevision( "12345:12345" ) ) );

        assertTrue( SvnTagBranchUtils.isRevisionSpecifier( new ScmRevision( "1:2" ) ) );

        assertTrue( SvnTagBranchUtils.isRevisionSpecifier( new ScmRevision( "hEaD:bAsE" ) ) );

        assertTrue( SvnTagBranchUtils.isRevisionSpecifier( new ScmRevision( "BaSe:CoMmItTeD" ) ) );

        assertTrue( SvnTagBranchUtils.isRevisionSpecifier( new ScmRevision( "{2004-1-1}:{2005-1-1}" ) ) );

        assertFalse( SvnTagBranchUtils.isRevisionSpecifier( new ScmRevision( "BASE:" ) ) );
        assertFalse( SvnTagBranchUtils.isRevisionSpecifier( new ScmRevision( ":BASE" ) ) );

    }
View Full Code Here

    public void testCommandline()
        throws Exception   
    {
        TfsScmProviderRepository repo = getScmProviderRepository();
        ScmRevision rev = new ScmRevision( "revision" );
        String path = getScmFileSet().getBasedir().getAbsolutePath();
        Commandline cmd = new TfsCheckOutCommand().createGetCommand( repo, getScmFileSet(), rev, true ).getCommandline();
        String expected = "tf get -login:user,password -recursive -force -version:Crevision " + path;
        assertCommandLine( expected, getWorkingDirectory(), cmd );
    }
View Full Code Here

            return new ScmTag( version );
        }

        if ( "revision".equals( versionType ) )
        {
            return new ScmRevision( version );
        }

        throw new MojoExecutionException( "Unknown '" + versionType + "' version type." );
    }
View Full Code Here

        }
        if ( scmVersion.length() > 0 )
        {
            if ( "revision".equals( scmVersionType ) )
            {
                return new ScmRevision( scmVersion );
            }
            else if ( "tag".equals( scmVersionType ) )
            {
                return new ScmTag( scmVersion );
            }
View Full Code Here

                {
                    while ( tagsIter.hasNext() )
                    {
                        endTag = tagsIter.next();

                        result = provider.changeLog( repository, new ScmFileSet( basedir ), new ScmRevision( startTag ),
                                                     new ScmRevision( endTag ) );

                        checkResult( result );

                        changeSets.add( result.getChangeLog() );

                        startTag = endTag;
                    }
                }
                else
                {
                    result = provider.changeLog( repository, new ScmFileSet( basedir ), new ScmRevision( startTag ),
                                                 new ScmRevision( endTag ) );

                    checkResult( result );

                    changeSets.add( result.getChangeLog() );
                }
View Full Code Here

        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(), '"' ) );
    }
View Full Code Here


    public void testCommandLineWithStartVersion()
        throws Exception
    {
        testCommandLine( "scm:git:http://foo.com/git", null, new ScmRevision( "1" ), null,
                         "git whatchanged --date=iso 1.."
                         + " -- " + StringUtils.quoteAndEscape( workingDirectory.getPath(), '"' ) );
    }
View Full Code Here

    }

    public void testCommandLineWithStartVersionAndEndVersion()
        throws Exception
    {
        testCommandLine( "scm:git:http://foo.com/git", null, new ScmRevision( "1" ), new ScmRevision( "10" ),
                         "git whatchanged --date=iso 1..10"
                         + " -- " + StringUtils.quoteAndEscape( workingDirectory.getPath(), '"' ) );
    }
View Full Code Here

TOP

Related Classes of org.apache.maven.scm.ScmRevision

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.