Created
January 12, 2009 22:50
-
-
Save sekimura/46209 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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