Skip to content

Instantly share code, notes, and snippets.

@sekimura
Created January 12, 2009 22:50
Show Gist options
  • Save sekimura/46209 to your computer and use it in GitHub Desktop.
Save sekimura/46209 to your computer and use it in GitHub Desktop.
#!/usr/bin/perl
use strict;
use warnings;
use SVN::Client;
use Data::Dumper;
my $repo = shift || 'http://svn.coderepos.org/share';
my $ctx = SVN::Client->new;
my $last_revnum;
$ctx->info( $repo, undef, 'HEAD', sub { $last_revnum = $_[1]->rev }, 0 );
my $start = $last_revnum;
my $end = $last_revnum - 10;
my $discover_changed_paths = 1;
my $strict_node_history = 1;
$ctx->log( $repo, $start, $end, $discover_changed_paths, $strict_node_history,
\&log_receiver );
sub log_receiver {
my ( $changed_paths, $revision, $author, $date, $message, $pool ) = @_;
print Dumper {
revision => $revision,
author => $author,
date => $date,
message => $message
};
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment