Package org.apache.maven.scm.provider.accurev.cli

Examples of org.apache.maven.scm.provider.accurev.cli.AccuRevCommandLine


    @Test
    public void testUpstreamChangesIncludedInChangeLog()
        throws Exception
    {

        AccuRevCommandLine accurev = accurevTckTestUtil.getAccuRevCL();

        // UpdatingCopy is a workspace rooted at a substream
        String workingStream = accurevTckTestUtil.getWorkingStream();
        String subStream = accurevTckTestUtil.getDepotName() + "_sub_stream";
        accurev.mkstream( workingStream, subStream );

        ScmRepository mainRepository = getScmRepository();
        ScmProvider provider = getScmManager().getProviderByRepository( mainRepository );

        // Create a workspace at the updating copy location backed by the substream
        ScmBranch branch = new ScmBranch( "sub_stream" );
        provider.checkOut( mainRepository, new ScmFileSet( getUpdatingCopy() ), branch );

        Thread.sleep( 1000 );
        ScmFileSet fileSet = new ScmFileSet( getWorkingCopy() );

        // Make a timestamp that we know are after initial revision but before the second
        Date timeBeforeUpstreamCheckin = new Date(); // Current time

        // pause a couple seconds... [SCM-244]
        Thread.sleep( 2000 );

        // Make a change to the readme.txt and commit the change
        ScmTestCase.makeFile( getWorkingCopy(), "/readme.txt", "changed readme.txt" );
        ScmTestCase.makeFile( getWorkingCopy(), "/src/test/java/Test.java", "changed Test.java" );
        CheckInScmResult checkInResult = provider.checkIn( mainRepository, fileSet, "upstream workspace promote" );
        assertTrue( "Unable to checkin changes to the repository", checkInResult.isSuccess() );

        Thread.sleep( 2000 );

        Date timeBeforeDownstreamCheckin = new Date();

        Thread.sleep( 2000 );

        ScmFileSet updateFileSet = new ScmFileSet( getUpdatingCopy() );
        provider.update( mainRepository, updateFileSet );
        ScmTestCase.makeFile( getUpdatingCopy(), "/pom.xml", "changed pom.xml" );
        ScmTestCase.makeFile( getUpdatingCopy(), "/src/test/java/Test.java", "changed again Test.java" );
        checkInResult = provider.checkIn( mainRepository, updateFileSet, "downstream workspace promote" );
        assertTrue( "Unable to checkin changes to the repository", checkInResult.isSuccess() );

        Thread.sleep( 2000 );

        Date timeBeforeDownstreamPromote = new Date();

        List<File> promotedFiles = new ArrayList<File>();
        accurev.promoteStream( subStream, "stream promote", promotedFiles );

        Thread.sleep( 2000 );

        Date timeEnd = new Date();
View Full Code Here


            repo.setHost( host );
        }
        repo.setPort( port );
        repo.setTagFormat( properties.get( TAG_FORMAT_PROPERTY ) );

        AccuRevCommandLine accuRev = new AccuRevCommandLine( host, port );
        accuRev.setLogger( getLogger() );
        accuRev.setExecutable( properties.get( ACCUREV_EXECUTABLE_PROPERTY ) );
        repo.setAccuRev( accuRev );

        return repo;

    }
View Full Code Here

            repo.setHost( host );
        }
        repo.setPort( port );
        repo.setTagFormat( properties.get( TAG_FORMAT_PROPERTY ) );

        AccuRevCommandLine accuRev = new AccuRevCommandLine( host, port );
        accuRev.setLogger( getLogger() );
        accuRev.setExecutable( properties.get( ACCUREV_EXECUTABLE_PROPERTY ) );
        repo.setAccuRev( accuRev );

        return repo;

    }
View Full Code Here

            repo.setHost( host );
        }
        repo.setPort( port );
        repo.setTagFormat( properties.get( TAG_FORMAT_PROPERTY ) );

        AccuRevCommandLine accuRev = new AccuRevCommandLine( host, port );
        accuRev.setLogger( getLogger() );
        accuRev.setExecutable( properties.get( ACCUREV_EXECUTABLE_PROPERTY ) );
        repo.setAccuRev( accuRev );

        return repo;

    }
View Full Code Here

TOP

Related Classes of org.apache.maven.scm.provider.accurev.cli.AccuRevCommandLine

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.