#!/usr/bin/perl
use SVN::Core;
use SVN::Ra;
use SVN::Delta;

my $ra = SVN::Ra->new('http://svn.apache.org/repos/asf/subversion/');
my $path = 'trunk/BUGS';
open($fh, '>', \$text) || die;
my ($revnum, $props) = $ra->get_file($path, $SVN::Core::INVALID_REVNUM, $fh);
close $fh || die;
print "Revision: $revnum\n\n$text\n";

my $logmsg = "test commit via the SVN:Ra Perl API";
sub commit_callback {
    my ($arg) = @_;
    use Data::Dumper;
    print STDERR "commit_callback(".Dumper($arg).")\n";
}
my $editor = SVN::Delta::Editor->new(
    $ra->get_commit_editor2($logmsg, \&commit_callback, undef, {}, 0));

