You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by "Miller, Eric" <Er...@amd.com> on 2006/12/18 16:03:49 UTC
Perl bindings
I'm attempting to use the swig'd perl bindings in the 1.4.2 installation
and ran into some difficulties with lock discovery.
Basically the svn_wc_status_t interface doesn't seem to be doing what I
expect.
Consider the following working copy as reported by 'svn status -u':
? SVNWc.ps
K 6 b
M 11 c
* 6 d
? SVNClient.ps
O 6 a
So 'b' is locked in this wc, 'a' is locked in some other wc, and the .ps
files are not svn controlled.
Also I am using svn+ssh:// for the url in this wc.
My perl code:
sub locked {
my ($path, $status) = @_;
print "$path is locked? ";
if($status->locked()) {
print "Yep\n";
} else {
print "Nope\n";
}
}
$o->{_svn_client}->status($o->{wc},'HEAD', \&locked, $o->{recursive},
$o->{get_all},
$o->{show_updates}, $o->{no_ignore});
Consider this output (get_all=0, show_updates=0):
SVNWc.ps is locked? Yep
SVNClient.ps is locked? Yep
b is locked? Yep
c is locked? Nope
Problem A: Unversioned files are reported as locked when show_updates
is 0.
And this output (get_all=0, show_updates=1):
SVNWc.ps is locked? Nope
b is locked? Nope
c is locked? Nope
d is locked? Nope
SVNClient.ps is locked? Nope
a is locked? Nope
Problem B: Locks are not reported when show_updates is 1.
I have also tried using the entry method with $status->entry->locked()
with no luck.
Can anyone tell me if my problems stem from misuse of the bindings or
with the bindings themselves?
As a follow on question - If these problems stem from the perl bindings,
would the python bindings be a better choice?
Eric