Re: Perl bindings
From: Nik Clayton <nik_at_ngo.org.uk>
Date: 2006-07-13 13:39:45 CEST
Garrett Rooney wrote:
Because I've found a bug in either the RA layer or my use of it.
Here's two 'svn list' commands, using different access methods but
% svn list -v file:///home/nik/.svk/jc
% svn list -v svn://127.0.0.1/home/nik/.svk/jc
Same results, as expected.
Here's my code, using file:///
% ./bug.pl file:///home/nik/.svk/jc
Same (well, similar, I don't format the timestamp) results.
Here's the result using svn://
% ./bug.pl svn://127.0.0.1/home/nik/.svk/jc
Line 36 is a call to $ra->get_file().
I can understand that that might fail if I call it on a directory, since
However, since it does work when using the file:/// RA layer I'm not
I've attached bug.pl. The results above were obtained using Subversion
N
#!/usr/bin/perl
use strict;
use SVN::Ra;
my $repo_url = shift;
my $ra = SVN::Ra->new(url => $repo_url);
# Get the directories entries for $path at the repo's youngest revision.
# Iterate over these entries. Build up a list of hashes. Each list
my($name, $dirent);
# Iterate over the entries, fetching additional information and storing
$entry->{irev} = recent_interesting_rev($ra, "$path/$entry->{name}", $yrev);
my %props = %{ ($ra->get_file($path, $entry->{irev}, undef))[1] };
$entry->{author} = $props{'svn:entry:last-author'};
$ra->get_log([ "$path/$entry->{name}" ], $entry->{irev}, 1, 1, 0, 1,
}
# Iterate over the entries, printing the information in a format similar
# Find and return the most recent interesting rev for a path that is <= $rev
$ra->get_log([$path], $rev, 1, 1, 0, 1,
return $rev;
---------------------------------------------------------------------
|
This is an archived mail posted to the Subversion Dev mailing list.
This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.