Package org.apache.maven.scm

Examples of org.apache.maven.scm.ScmRevision


    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" ) );
    }
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

        SvnScmProviderRepository svnRepository = (SvnScmProviderRepository) repository.getProviderRepository();

        Commandline cl =
            cl =
                SvnCheckOutCommand.createCommandLine( svnRepository, workingDirectory,
                                                      new ScmRevision( revision ), svnRepository.getUrl(),
                                                      recursive );

        assertCommandLine( commandLine, workingDirectory.getParentFile(), cl );
    }
View Full Code Here

    }

    public void testCommandLineWithEmptyVersion()
        throws Exception
    {
        testCommandLine( "scm:svn:http://foo.com/svn/trunk", new ScmRevision( "" ),
                         "svn --non-interactive update " + getUpdateTestFile().getAbsolutePath() );
    }
View Full Code Here

    }

    public void testCommandLineWithWhitespaceRevision()
        throws Exception
    {
        testCommandLine( "scm:svn:http://foo.com/svn/trunk", new ScmRevision( "  " ),
                         "svn --non-interactive update " + getUpdateTestFile().getAbsolutePath() );
    }
View Full Code Here

    }

    public void testCommandLineTag()
        throws Exception
    {
        testCommandLine( "scm:svn:http://anonymous@foo.com/svn/trunk", new ScmRevision( "10" ),
                         "svn --username anonymous --no-auth-cache --non-interactive update -r 10 " +
                             getUpdateTestFile().getAbsolutePath() );
    }
View Full Code Here

    }

    public void testCommandLineWithUsernameAndTag()
        throws Exception
    {
        testCommandLine( "scm:svn:http://anonymous@foo.com/svn/trunk", new ScmRevision( "10" ),
                         "svn --username anonymous --no-auth-cache --non-interactive update -r 10 " +
                             getUpdateTestFile().getAbsolutePath() );
    }
View Full Code Here

        ScmVersion startRevision = null;
        ScmVersion endRevision = null;

        if ( StringUtils.isNotEmpty( startTag ) )
        {
            startRevision = new ScmRevision( startTag );
        }

        if ( StringUtils.isNotEmpty( endTag ) )
        {
            endRevision = new ScmRevision( endTag );
        }

        return changeLog( repository, fileSet, startRevision, endRevision, null );
    }
View Full Code Here

        ScmVersion startVersion = null;
        ScmVersion endVersion = null;

        if ( StringUtils.isNotEmpty( startRevision ) )
        {
            startVersion = new ScmRevision( startRevision );
        }

        if ( StringUtils.isNotEmpty( endRevision ) )
        {
            endVersion = new ScmRevision( endRevision );
        }

        return diff( repository, fileSet, startVersion, endVersion );
    }
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.