Skip Menu |

This queue is for tickets about the SVN-Log CPAN distribution.

Report information
The Basics
Id: 22926
Status: open
Priority: 0/
Queue: SVN-Log

People
Owner: Nobody in particular
Requestors: jpeacock [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: Important
Broken in: 0.03
Fixed in: (no value)



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;
Subject: Re: [rt.cpan.org #22926] Cannot get log entries of path other than '/' with bindings
Date: Wed, 15 Nov 2006 16:08:37 +0000
To: bug-SVN-Log [...] rt.cpan.org
From: Nik Clayton <nikclayton [...] gmail.com>
via RT wrote: Show quoted text
> 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.
Thanks. Applied, and I'll roll a new release shortly. Show quoted text
> 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.
How were you running the tests? ./Build test or prove -b test should automatically add 'blib/lib' to the front of @INC. N
Subject: Re: [rt.cpan.org #22926] Cannot get log entries of path other than '/' with bindings
Date: Wed, 15 Nov 2006 11:21:04 -0500
To: bug-SVN-Log [...] rt.cpan.org
From: John Peacock <jpeacock [...] rowman.com>
Nik Clayton via RT wrote: Show quoted text
> How were you running the tests? > > ./Build test > > or > > prove -b test > > should automatically add 'blib/lib' to the front of @INC.
Actually, now that you mention it, I think I was using the compatibility Makefile.PL instead of the Build.PL. But, I can't get it to fail now, so it may have been something else going on. Thanks John -- John Peacock Director of Information Research and Technology Rowman & Littlefield Publishing Group 4501 Forbes Boulevard Suite H Lanham, MD 20706 301-459-3366 x.5010 fax 301-429-5748