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