Subject: | [patch] Update SVN::Log with new SVN API |
At some point in the past the SVN::Ra API has changed out from under SVN::Log, and the SVN::Ra->get_log() function now takes an extra argument that SVN::Log is not aware of.
The attached patch adds the missing parameter.
It also fixes the test suite -- again, the SVN API has changed, the value of the 'paths' key is now an object in its own right. The new tests verify that a path was created, and that the correct action was taken.
One more thing -- I see this module hasn't been updated in a while. If you'd like then I'm happy to take over maintainership.
All the best,
Nik
diff -ru SVN-Log-0.01.org/CHANGES SVN-Log-0.01/CHANGES
--- SVN-Log-0.01.org/CHANGES Mon Jun 14 11:50:08 2004
+++ SVN-Log-0.01/CHANGES Thu Dec 15 10:46:10 2005
@@ -1,3 +1,7 @@
+[ Changes for 0.02 - xxx xx, 2005 ]
+
+* Update to use the new svn_ra_get_log() API.
+
[ Changes for 0.01 - Jun 11, 2004 ]
* Fixed bug in command line client log parsing that was causing us to skip
diff -ru SVN-Log-0.01.org/META.yml SVN-Log-0.01/META.yml
--- SVN-Log-0.01.org/META.yml Mon Jun 14 11:51:05 2004
+++ SVN-Log-0.01/META.yml Thu Dec 15 10:46:29 2005
@@ -1,6 +1,6 @@
--- #YAML:1.0
name: SVN-Log
-version: 0.01
+version: 0.02
license: perl
distribution_type: module
requires:
@@ -13,5 +13,5 @@
provides:
SVN::Log:
file: lib/SVN/Log.pm
- version: 0.01
+ version: 0.02
generated_by: Module::Build version 0.21
diff -ru SVN-Log-0.01.org/lib/SVN/Log.pm SVN-Log-0.01/lib/SVN/Log.pm
--- SVN-Log-0.01.org/lib/SVN/Log.pm Sat Jun 12 14:45:21 2004
+++ SVN-Log-0.01/lib/SVN/Log.pm Thu Dec 15 10:44:58 2005
@@ -5,7 +5,7 @@
use strict;
use warnings;
-our $VERSION = 0.01;
+our $VERSION = 0.02;
=head1 NAME
@@ -154,7 +154,7 @@
my $r = SVN::Ra->new (url => $repos) or die "error opening RA layer: $!";
- $r->get_log ([''], $start_rev, $end_rev, 1, 0,
+ $r->get_log ([''], $start_rev, $end_rev, 0, 1, 0,
sub { $callback->(@_); });
}
diff -ru SVN-Log-0.01.org/t/02basics.t SVN-Log-0.01/t/02basics.t
--- SVN-Log-0.01.org/t/02basics.t Fri Jun 11 20:26:37 2004
+++ SVN-Log-0.01/t/02basics.t Thu Dec 15 10:44:09 2005
@@ -2,7 +2,7 @@
# $Id: 02basics.t 147 2004-06-11 19:34:53Z rooneg $
-use Test::More tests => 8;
+use Test::More tests => 10;
use strict;
@@ -31,7 +31,8 @@
is (scalar @{ $revs }, 1, "and now the second");
-is_deeply ($revs->[0]{paths}, { '/branches' => 1 }, "and the paths from 2");
+ok(exists $revs->[0]{paths}{'/branches'}, " Shows that '/branches' changed");
+is($revs->[0]{paths}{'/branches'}->action(), 'A', ' and that it was an add');
$revs = SVN::Log::retrieve ($repospath, 1, 2);
@@ -39,7 +40,8 @@
like ($revs->[0]{message}, qr/a log message/, "1's log message is ok");
-is_deeply ($revs->[1]{paths}, { '/branches' => 1 }, "paths in 2 look right");
+ok(exists $revs->[1]{paths}{'/branches'}, " Shows that '/branches' changed");
+is($revs->[1]{paths}{'/branches'}->action(), 'A', ' and that it was an add');
my $count = 0;