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

Examples of org.apache.maven.scm.provider.accurev.Stream


            String basisStreamNumber = attributes.get( "basisStreamNumber" );
            long basisStreamId = basisStreamNumber == null ? 0 : Long.parseLong( basisStreamNumber );
            String depot = attributes.get( "depotName" );
            Date startTime = new Date( Long.parseLong( attributes.get( "startTime" ) ) * 1000 );
            String streamType = attributes.get( "type" );
            streams.add( new Stream( name, streamId, basis, basisStreamId, depot, startTime, streamType ) );
        }
    }
View Full Code Here


        // end tran (42)
        List<Transaction> endTransaction = Collections.singletonList( new Transaction( 42L, new Date(), "sometran",
                                                                                       "anyone" ) );
        when( accurev.history( "aStream", "now", null, 1, true, true ) ).thenReturn( endTransaction );

        Stream basisStream = new Stream( "aStream", 10, "myDepot", 1, "myDepot", getDate( 2008, 1, 1 ), "normal" );
        when( accurev.showStream( "aStream" ) ).thenReturn( basisStream );

        List<FileDifference> emptyList = Collections.emptyList();
        when( accurev.diff( "myStream", "12", "42" ) ).thenReturn( emptyList );
View Full Code Here

        // end tran (42)
        List<Transaction> endTransaction = Collections.singletonList( new Transaction( 42L, new Date(), "sometran",
                                                                                       "anyone" ) );

        Stream basisStream = new Stream( "myStream", 10, "myDepot", 1, "myDepot", getDate( 2008, 1, 1 ), "normal" );
        when( accurev.showStream( "myStream" ) ).thenReturn( basisStream );

        when( accurev.history( "myStream", "2009/01/12 13:00:00", null, 1, true, true ) ).thenReturn( endTransaction );

        // now we call diff between the tran ids - 35 to 42
View Full Code Here

        // changeset as a promote transaction
        // Keep WS5 - not in diffS4, not in histS4, in histWS5 - in changeset as
        // a keep transaction

        // This workspace is stream 5, attached to basis mystream 5
        Stream workspaceStream = new Stream( "workspace5", 5, "stream4", 4, "myDepot", getDate( 2008, 10, 1, 10, 0, 0,
                                                                                                null ), "workspace" );
        when( accurev.showStream( "workspace5" ) ).thenReturn( workspaceStream );

        Stream basisStream = new Stream( "stream4", 4, "myDepot", 1, "myDepot", getDate( 2008, 1, 1 ), "normal" );
        when( accurev.showStream( "stream4" ) ).thenReturn( basisStream );

        // now we call diff between the tran ids - 35 to 42
        FileDifference diffWS3toS2 = new FileDifference( 32L, "/promoted/WS3toS2", "3/2", "/promoted/WS3toS2", "6/1" );
        FileDifference diffWS5toS4 = new FileDifference( 54L, "/promoted/WS5toS4", "5/3", "/promoted/WS5toS4", "8/1" );
View Full Code Here

        StringBuilder errorMessage = new StringBuilder();

        AccuRev accurev = repository.getAccuRev();

        Stream changelogStream = accurev.showStream( stream );
        if ( changelogStream == null )
        {
            errorMessage.append( "Unknown accurev stream -" ).append( stream ).append( "." );
        }
        else
        {

            String message =
                "Changelog on stream " + stream + "(" + changelogStream.getStreamType() + ") from " + fromTranId + " ("
                    + startDate + "), to " + toTranId + " (" + endDate + ")";

            if ( startDate != null && startDate.after( endDate ) || fromTranId >= toTranId )
            {
                getLogger().warn( "Skipping out of range " + message );
            }
            else
            {

                getLogger().info( message );

                // In 4.7.2 and higher we have a diff command that will list all the file differences in a stream
                // and thus can be used to detect upstream changes
                // Unfortunately diff -v -V -t does not work in workspaces.
                Stream diffStream = changelogStream;
                if ( changelogStream.isWorkspace() )
                {

                    workspaceHistory =
                        accurev.history( stream, Long.toString( fromTranId + 1 ), Long.toString( toTranId ), 0, false,
                                         false );

                    if ( workspaceHistory == null )
                    {
                        errorMessage.append( "history on workspace " + stream + " from " + fromTranId + 1 + " to "
                            + toTranId + " failed." );

                    }

                    // do the diff/hist on the basis stream instead.
                    stream = changelogStream.getBasis();
                    diffStream = accurev.showStream( stream );

                }

                if ( AccuRevCapability.DIFF_BETWEEN_STREAMS.isSupported( accurev.getClientVersion() ) )
                {
                    if ( startDate.before( diffStream.getStartDate() ) )
                    {
                        getLogger().warn( "Skipping diff of " + stream + " due to start date out of range" );
                    }
                    else
                    {
View Full Code Here

        when( accurev.getCommandLines() ).thenReturn( "accurev mock" );
        when( accurev.getErrorOutput() ).thenReturn( "accurev mock error output" );
        when( accurev.getClientVersion() ).thenReturn( "4.9.0" );
        when( accurev.showStream( "myStream" ) ).thenReturn(
                                                             new Stream( "myStream", 10L, "myDepot", 1L, "myDepot",
                                                                         new Date(), "normal" ) );

        when( accurev.info( null ) ).thenReturn( info );
        when( accurev.info( basedir ) ).thenReturn( info );
View Full Code Here

        XppStreamConsumer consumer = new StreamsConsumer( new DefaultLog(), streams );
        AccuRevJUnitUtil.consume( "/showstreams.xml", consumer );

        assertThat( streams.size(), is( 5 ) );

        Stream s = streams.get( 2 );
        /*
         * <stream name="mvnscm_1275484086_initRepo_ggardner" basis="mvnscm_1275484086_tckTests" basisStreamNumber="2"
         * depotName="mvnscm_1275484086" streamNumber="3" isDynamic="false" type="workspace" startTime="1275484091"
         * hidden="true"/>
         */
        assertThat( s.getBasis(), is( "mvnscm_1275484086_tckTests" ) );
        assertThat( s.getId(), is( 3L ) );
        assertThat( s.getBasisId(), is( 2L ) );
        assertThat( s.getName(), is( "mvnscm_1275484086_initRepo_ggardner" ) );
        assertThat( s.getStartDate(), is( new Date( 1275484091L * 1000L ) ) );
        assertThat( s.getStreamType(), is( "workspace" ) );
        assertThat( s.isWorkspace(), is( true ) );
    }
View Full Code Here

            String basisStreamNumber = attributes.get( "basisStreamNumber" );
            long basisStreamId = basisStreamNumber == null ? 0 : Long.parseLong( basisStreamNumber );
            String depot = attributes.get( "depotName" );
            Date startTime = new Date( Long.parseLong( attributes.get( "startTime" ) ) * 1000 );
            String streamType = attributes.get( "type" );
            streams.add( new Stream( name, streamId, basis, basisStreamId, depot, startTime, streamType ) );
        }
    }
View Full Code Here

        StringBuilder errorMessage = new StringBuilder();

        AccuRev accurev = repository.getAccuRev();

        Stream changelogStream = accurev.showStream( stream );
        if ( changelogStream == null )
        {
            errorMessage.append( "Unknown accurev stream -" ).append( stream ).append( "." );
        }
        else
        {

            String message =
                "Changelog on stream " + stream + "(" + changelogStream.getStreamType() + ") from " + fromTranId + " ("
                    + startDate + "), to " + toTranId + " (" + endDate + ")";

            if ( startDate != null && startDate.after( endDate ) || fromTranId >= toTranId )
            {
                getLogger().warn( "Skipping out of range " + message );
            }
            else
            {

                getLogger().info( message );

                // In 4.7.2 and higher we have a diff command that will list all the file differences in a stream
                // and thus can be used to detect upstream changes
                // Unfortunately diff -v -V -t does not work in workspaces.
                Stream diffStream = changelogStream;
                if ( changelogStream.isWorkspace() )
                {

                    workspaceHistory =
                        accurev.history( stream, Long.toString( fromTranId + 1 ), Long.toString( toTranId ), 0, false,
                                         false );

                    if ( workspaceHistory == null )
                    {
                        errorMessage.append( "history on workspace " + stream + " from " + fromTranId + 1 + " to "
                            + toTranId + " failed." );

                    }

                    // do the diff/hist on the basis stream instead.
                    stream = changelogStream.getBasis();
                    diffStream = accurev.showStream( stream );

                }

                if ( AccuRevCapability.DIFF_BETWEEN_STREAMS.isSupported( accurev.getClientVersion() ) )
                {
                    if ( startDate.before( diffStream.getStartDate() ) )
                    {
                        getLogger().warn( "Skipping diff of " + stream + " due to start date out of range" );
                    }
                    else
                    {
View Full Code Here

        StringBuffer errorMessage = new StringBuffer();

        AccuRev accurev = repository.getAccuRev();

        Stream changelogStream = accurev.showStream( stream );
        if ( changelogStream == null )
        {
            errorMessage.append( "Unknown accurev stream -" ).append( stream ).append( "." );
        }
        else
        {

            String message =
                "Changelog on stream " + stream + "(" + changelogStream.getStreamType() + ") from " + fromTranId + " ("
                    + startDate + "), to " + toTranId + " (" + endDate + ")";

            if ( startDate != null && startDate.after( endDate ) || fromTranId >= toTranId )
            {
                getLogger().warn( "Skipping out of range " + message );
            }
            else
            {

                getLogger().info( message );

                // In 4.7.2 and higher we have a diff command that will list all the file differences in a stream
                // and thus can be used to detect upstream changes
                // Unfortunately diff -v -V -t does not work in workspaces.
                Stream diffStream = changelogStream;
                if ( changelogStream.isWorkspace() )
                {

                    workspaceHistory =
                        accurev.history( stream, Long.toString( fromTranId + 1 ), Long.toString( toTranId ), 0, false,
                                         false );

                    if ( workspaceHistory == null )
                    {
                        errorMessage.append( "history on workspace " + stream + " from " + fromTranId + 1 + " to "
                            + toTranId + " failed." );

                    }

                    // do the diff/hist on the basis stream instead.
                    stream = changelogStream.getBasis();
                    diffStream = accurev.showStream( stream );

                }

                if ( AccuRevCapability.DIFF_BETWEEN_STREAMS.isSupported( accurev.getClientVersion() ) )
                {
                    if ( startDate.before( diffStream.getStartDate() ) )
                    {
                        getLogger().warn( "Skipping diff of " + stream + " due to start date out of range" );
                    }
                    else
                    {
View Full Code Here

TOP

Related Classes of org.apache.maven.scm.provider.accurev.Stream

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.