Subject: | Cannot get log entries of path other than '/' with bindings |
When using the Perl bindings, targetting a repos path other than root is
impossible, whereas with the commandline client it works fine,
In other words,
file://path/to/repos/branches
will correctly display the log entries for the /branches path only when
forcing the commandline client. The attached path fixes that limitation.
NOTE also that the patch fixes the @INC path for one of the tests (which
I include merely as an example). I discovered that the tests were using
the already installed files, rather than the newly changed files. You
should either apply a similar patch to all test files or figure out why
blib is not coming first automatically.
John
Subject: | SVN-Log-0.03.diff |
diff -ruNp -ruNp SVN-Log-0.03/lib/SVN/Log.pm SVN-Log-0.03.mine/lib/SVN/Log.pm
--- SVN-Log-0.03/lib/SVN/Log.pm 2006-01-11 04:27:13.000000000 -0500
+++ SVN-Log-0.03.mine/lib/SVN/Log.pm 2006-11-09 21:21:24.000000000 -0500
@@ -185,6 +185,9 @@ sub _do_log_bindings {
my ($repos, $start_rev, $end_rev, $callback) = @_;
my $r = SVN::Ra->new (url => $repos) or die "error opening RA layer: $!";
+ my $root = $r->get_repos_root;
+ (my $path = $repos) =~ s/^$root//;
+ $path = '/' unless $path;
if($start_rev eq 'HEAD') {
$start_rev = $r->get_latest_revnum();
@@ -194,7 +197,7 @@ sub _do_log_bindings {
$end_rev = $r->get_latest_revnum();
}
- $r->get_log (['/'], $start_rev, $end_rev, 0, 1, 0,
+ $r->get_log ([$path], $start_rev, $end_rev, 0, 1, 0,
sub { _handle_log_bindings($callback, @_); });
}
diff -ruNp -ruNp SVN-Log-0.03/t/02basics.t SVN-Log-0.03.mine/t/02basics.t
--- SVN-Log-0.03/t/02basics.t 2006-01-11 04:27:13.000000000 -0500
+++ SVN-Log-0.03.mine/t/02basics.t 2006-11-09 21:17:59.000000000 -0500
@@ -1,5 +1,9 @@
#!perl -w
+BEGIN {
+ unshift @INC, "./blib/lib", "./blib/arch";
+}
+
use strict;
use warnings;