Package org.uberfire.java.nio.base.version

Examples of org.uberfire.java.nio.base.version.VersionAttributes


                                final VersionRecord o2 ) {
                return o1.date().compareTo( o2.date() );
            }
        } );

        return new VersionAttributes() {
            @Override
            public VersionHistory history() {
                return new VersionHistory() {
                    @Override
                    public List<VersionRecord> records() {
View Full Code Here


            final OutputStream outStream = PROVIDER.newOutputStream( path );
            outStream.write( cherryPickContent.getBytes() );
            outStream.close();

            final VersionAttributes versionAttributes = PROVIDER.readAttributes( path, VersionAttributes.class );

            assertThat( versionAttributes.history().records() ).isNotNull().hasSize( 2 );
            commit2CherryPick = versionAttributes.history().records().get( 0 ).id();

            final OutputStream outStream2 = PROVIDER.newOutputStream( path );
            outStream2.write( "my 3rd cool content".getBytes() );
            outStream2.close();
        }

        final Path source = PROVIDER.getPath( URI.create( "git://user_branch@cherrypick-test-repo" ) );
        final Path target = PROVIDER.getPath( URI.create( "git://other_branch@cherrypick-test-repo" ) );

        PROVIDER.copy( source, target );

        String commit2CherryPick2;
        String cherryPickContent2 = "my 4tn cool content";
        {
            final Path path = PROVIDER.getPath( URI.create( "git://master@cherrypick-test-repo/myfile1.txt" ) );

            final OutputStream outStream = PROVIDER.newOutputStream( path );
            outStream.write( cherryPickContent2.getBytes() );
            outStream.close();

            final VersionAttributes versionAttributes = PROVIDER.readAttributes( path, VersionAttributes.class );

            commit2CherryPick2 = versionAttributes.history().records().get( 0 ).id();
        }

        final Path target2 = PROVIDER.getPath( URI.create( "git://other_branch2@cherrypick-test-repo" ) );
        PROVIDER.copy( source, target2 );
View Full Code Here

TOP

Related Classes of org.uberfire.java.nio.base.version.VersionAttributes

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.