Package org.apache.maven.scm

Examples of org.apache.maven.scm.ScmBranch


        try
        {
            long start = System.currentTimeMillis();

            CheckInScmResult checkinResult =
                checkScmResult( scmProvider.checkIn( scmRepository, updatedFileSet, new ScmBranch( scmBranch ),
                                                     checkinComment ), "check-in files to SCM" );

            logInfo( "Checked in %d file(s) to revision %s in %s", checkinResult.getCheckedInFiles().size(),
                     checkinResult.getScmRevision(),
                     DurationFormatUtils.formatPeriod( start, System.currentTimeMillis(), "H' h 'm' m 's' s'" ) );
View Full Code Here


            String branch = getScmBranch();
            UpdateScmResult result;
            if (!branch.equals(DEFAULT_BRANCH_NAME)) {
              getLog().debug("Updating from branch: " + branch);
              result = scmProvider.update( repository, new ScmFileSet( scmDirectory ), new ScmBranch( branch ) );
            } else {
              getLog().debug("Updating from provider's chosen tag/branch/revision");
              result = scmProvider.update( repository, new ScmFileSet( scmDirectory ) );
            }
           
View Full Code Here

            if ( providerRepo instanceof GitScmProviderRepository )
            {
                String branchName = GitBranchCommand.getCurrentBranch( new PlexusLogger( getLogger() ),
                                                                       (GitScmProviderRepository) providerRepo,
                                                                       workingDirSet );
                scmTag = new ScmBranch( branchName );
            }

            if ( workingDirectory.listFiles().length > 1 )
            {
                updateScmResult = provider.update( repository, workingDirSet, scmTag );
View Full Code Here

            {
                return new ScmTag( scmVersion );
            }
            else if ( "branch".equals( scmVersionType ) )
            {
                return new ScmBranch( scmVersion );
            }
        }

        return null;
    }
View Full Code Here

    }

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

    }

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

            return null;
        }

        if ( "branch".equals( versionType ) )
        {
            return new ScmBranch( version );
        }

        if ( "tag".equals( versionType ) )
        {
            return new ScmTag( version );
View Full Code Here

        assertFalse( "check previous assertion copy deleted", getAssertionCopy().exists() );

        checkoutResult = getScmManager().getProviderByUrl( getScmUrl() ).checkOut( getScmRepository(),
                                                                                   new ScmFileSet( getAssertionCopy() ),
                                                                                   new ScmBranch( branch ) );

        assertResultIsSuccess( checkoutResult );

        assertEquals( "check readme.txt contents is from branched version", "/readme.txt",
                      FileUtils.fileRead( readmeTxt ) );
View Full Code Here

        assertEquals( firstLogSize + 1, secondResult.getChangeLog().getChangeSets().size() );

        //Now only retrieve the changelog after timeBeforeSecondChangeLog
        Date currentTime = new Date();
        ChangeLogScmResult thirdResult = provider
            .changeLog( getScmRepository(), fileSet, timeBeforeSecond, currentTime, 0, new ScmBranch( "" ) );

        //Thorough assert of the last result
        assertTrue( thirdResult.getProviderMessage(), thirdResult.isSuccess() );
        assertEquals( 1, thirdResult.getChangeLog().getChangeSets().size() );
        ChangeSet changeset = thirdResult.getChangeLog().getChangeSets().get( 0 );
View Full Code Here

    implements ScmTranslator
{
    public String translateBranchUrl( String url, String branchName, String branchBase )
    {
        return SvnTagBranchUtils.resolveUrl( url, branchBase, SvnTagBranchUtils.SVN_BRANCHES,
                                             new ScmBranch( branchName ) );
    }
View Full Code Here

TOP

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

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.