sekimura (owner)

Revisions

gist: 46209 Download_button fork
public
Public Clone URL: git://gist.github.com/46209.git
Embed All Files: show embed
Perl #
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
#!/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
    };
}