You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by Nik Clayton <ni...@ngo.org.uk> on 2006/07/13 11:39:45 UTC

Re: Perl bindings

Garrett Rooney wrote:
> On 7/12/06, Nik Clayton <ni...@ngo.org.uk> wrote:
> With regard to your question, it's likely just isn't exposed by the
> client level code, either because it's just not there, or because the
> perl bindings haven't been brought up to date with the new APIs.  If
> you already know how to do it with the RA layer what's the problem
> with just using that?

Because I've found a bug in either the RA layer or my use of it. 
'file:///' URIs work fine, any other (e.g., 'svn://') fail.

Here's two 'svn list' commands, using different access methods but 
referring to the same underlying repository.

% svn list -v file:///home/nik/.svk/jc
    1072 nik                   Jul 12 20:22 local/
    1066 nik                   Jul 07 09:31 mirror/

% svn list -v svn://127.0.0.1/home/nik/.svk/jc
    1072 nik                   Jul 12 20:22 local/
    1066 nik                   Jul 07 09:31 mirror/

Same results, as expected.

Here's my code, using file:///

% ./bug.pl file:///home/nik/.svk/jc
    1066 nik      2006-07-07T08:31:26.127831Z mirror/
    1072 nik      2006-07-12T19:22:44.772832Z local/

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
Name does not refer to a filesystem file: Attempted to get checksum of a 
*non*-file node at ./bug.pl line 36

Line 36 is a call to $ra->get_file().

I can understand that that might fail if I call it on a directory, since 
the function name suggests that it's only supposed to work on files.

However, since it does work when using the file:/// RA layer I'm not 
sure.  And if it's *not* supposed to work I'm still in the dark as to 
the correct way to retrieve this information in the directory case.

I've attached bug.pl.  The results above were obtained using Subversion 
1.3.2 (r19776).

N

Re: Perl bindings

Posted by Nik Clayton <ni...@ngo.org.uk>.
Garrett,

Did you (or anyone else) get the chance to take a look at this?

N

PS: Original message here, to save people having to search through the archives.

Nik Clayton wrote:
> Garrett Rooney wrote:
>  > Could you possibly reproduce the problem from scratch, with a clean
>  > subversion repository?  It's difficult to figure out what's going
>  > wrong from just the problem description, if I could try it locally
>  > it's much more likely that I can fix it...
> 
> Sure.  Use the repo dump from
> 
>     svn://jc.ngo.org.uk/nik/CPAN/SVN-Web/trunk/t/test_repo.dump
> 
> It's the test repo that I use when I'm running automated tests against 
> SVN::Web.  It's about 4K.  Create a repo, load that dump file in to it, 
> then point the bug.pl that I posted earlier at it.
> 
> Here are the results I get (loaded in to /tmp/repo):
> 
> % svn list -v file:///tmp/repo
>       2 svk                   Dec 06  2004 A/
>       2 svk                   Dec 06  2004 B/
>       1 svk                   Dec 06  2004 C/
>       2 svk                   Dec 06  2004 D/
>       3 nik                   May 06 13:29 E F/
>       2 svk                38 Dec 06  2004 me
> 
> % ./bug.pl file:///tmp/repo
>       2 svk      2004-12-06T08:05:35.468804Z A/
>       3 nik      2006-05-06T12:29:41.721774Z E F/
>       2 svk      2004-12-06T08:05:35.468804Z D/
>       1 svk      2004-12-06T08:05:35.445932Z C/
>       2 svk      2004-12-06T08:05:35.468804Z me
>       2 svk      2004-12-06T08:05:35.468804Z B/
> 
> % svn list -v svn://127.0.0.1/tmp/repo
>       2 svk                   Dec 06  2004 A/
>       2 svk                   Dec 06  2004 B/
>       1 svk                   Dec 06  2004 C/
>       2 svk                   Dec 06  2004 D/
>       3 nik                   May 06 13:29 E F/
>       2 svk                38 Dec 06  2004 me
> 
> % ./bug.pl svn://127.0.0.1/tmp/repo
> Name does not refer to a filesystem file: Attempted to get checksum of a 
> *non*-file node at ./bug.pl line 36
> 
> N
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
> For additional commands, e-mail: dev-help@subversion.tigris.org
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: Perl bindings

Posted by Nik Clayton <ni...@ngo.org.uk>.
Garrett Rooney wrote:
 > Could you possibly reproduce the problem from scratch, with a clean
 > subversion repository?  It's difficult to figure out what's going
 > wrong from just the problem description, if I could try it locally
 > it's much more likely that I can fix it...

Sure.  Use the repo dump from

     svn://jc.ngo.org.uk/nik/CPAN/SVN-Web/trunk/t/test_repo.dump

It's the test repo that I use when I'm running automated tests against 
SVN::Web.  It's about 4K.  Create a repo, load that dump file in to it, then 
point the bug.pl that I posted earlier at it.

Here are the results I get (loaded in to /tmp/repo):

% svn list -v file:///tmp/repo
       2 svk                   Dec 06  2004 A/
       2 svk                   Dec 06  2004 B/
       1 svk                   Dec 06  2004 C/
       2 svk                   Dec 06  2004 D/
       3 nik                   May 06 13:29 E F/
       2 svk                38 Dec 06  2004 me

% ./bug.pl file:///tmp/repo
       2 svk      2004-12-06T08:05:35.468804Z A/
       3 nik      2006-05-06T12:29:41.721774Z E F/
       2 svk      2004-12-06T08:05:35.468804Z D/
       1 svk      2004-12-06T08:05:35.445932Z C/
       2 svk      2004-12-06T08:05:35.468804Z me
       2 svk      2004-12-06T08:05:35.468804Z B/

% svn list svn://127.0.0.1/tmp/repo
       2 svk                   Dec 06  2004 A/
       2 svk                   Dec 06  2004 B/
       1 svk                   Dec 06  2004 C/
       2 svk                   Dec 06  2004 D/
       3 nik                   May 06 13:29 E F/
       2 svk                38 Dec 06  2004 me

% ./bug.pl svn://127.0.0.1/tmp/repo
Name does not refer to a filesystem file: Attempted to get checksum of a 
*non*-file node at ./bug.pl line 36

N

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: Perl bindings

Posted by Garrett Rooney <ro...@electricjellyfish.net>.
On 7/14/06, Nik Clayton <ni...@ngo.org.uk> wrote:
> Garrett Rooney wrote:
> >> I can understand that that might fail if I call it on a directory, since
> >> the function name suggests that it's only supposed to work on files.
> >>
> >> However, since it does work when using the file:/// RA layer I'm not
> >> sure.  And if it's *not* supposed to work I'm still in the dark as to
> >> the correct way to retrieve this information in the directory case.
> >>
> >> I've attached bug.pl.  The results above were obtained using Subversion
> >> 1.3.2 (r19776).
> >
> > Could you possibly try with trunk?  Or the 1.4.x release branch?
>
> I've just built trunk/ and tried against that.  I get the same error
> (i.e., file:/// works, svn:// doesn't).
>
> I double checked that I was using libs built from trunk/ -- I run the
> test with truss, and verified that the new libs were being opened.
>
> > Also, what are the exact arguments being passed to get_file in the
> > failure case?
>
> In the file:/// case, the path is '/' and the rev is 1066 (and 1072 in
> the second call).
>
> In the svn:// case, the path is '/' and the rev is 1066.  Then the
> program crashes and it never gets to the 1072 case.

Could you possibly reproduce the problem from scratch, with a clean
subversion repository?  It's difficult to figure out what's going
wrong from just the problem description, if I could try it locally
it's much more likely that I can fix it...

-garrett

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: Perl bindings

Posted by Nik Clayton <ni...@ngo.org.uk>.
Garrett Rooney wrote:
>> I can understand that that might fail if I call it on a directory, since
>> the function name suggests that it's only supposed to work on files.
>>
>> However, since it does work when using the file:/// RA layer I'm not
>> sure.  And if it's *not* supposed to work I'm still in the dark as to
>> the correct way to retrieve this information in the directory case.
>>
>> I've attached bug.pl.  The results above were obtained using Subversion
>> 1.3.2 (r19776).
> 
> Could you possibly try with trunk?  Or the 1.4.x release branch?

I've just built trunk/ and tried against that.  I get the same error 
(i.e., file:/// works, svn:// doesn't).

I double checked that I was using libs built from trunk/ -- I run the 
test with truss, and verified that the new libs were being opened.

> Also, what are the exact arguments being passed to get_file in the 
> failure case?

In the file:/// case, the path is '/' and the rev is 1066 (and 1072 in 
the second call).

In the svn:// case, the path is '/' and the rev is 1066.  Then the 
program crashes and it never gets to the 1072 case.

N

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: Perl bindings

Posted by Garrett Rooney <ro...@electricjellyfish.net>.
On 7/13/06, Nik Clayton <ni...@ngo.org.uk> wrote:
> Garrett Rooney wrote:
> > On 7/12/06, Nik Clayton <ni...@ngo.org.uk> wrote:
> > With regard to your question, it's likely just isn't exposed by the
> > client level code, either because it's just not there, or because the
> > perl bindings haven't been brought up to date with the new APIs.  If
> > you already know how to do it with the RA layer what's the problem
> > with just using that?
>
> Because I've found a bug in either the RA layer or my use of it.
> 'file:///' URIs work fine, any other (e.g., 'svn://') fail.
>
> Here's two 'svn list' commands, using different access methods but
> referring to the same underlying repository.
>
> % svn list -v file:///home/nik/.svk/jc
>     1072 nik                   Jul 12 20:22 local/
>     1066 nik                   Jul 07 09:31 mirror/
>
> % svn list -v svn://127.0.0.1/home/nik/.svk/jc
>     1072 nik                   Jul 12 20:22 local/
>     1066 nik                   Jul 07 09:31 mirror/
>
> Same results, as expected.
>
> Here's my code, using file:///
>
> % ./bug.pl file:///home/nik/.svk/jc
>     1066 nik      2006-07-07T08:31:26.127831Z mirror/
>     1072 nik      2006-07-12T19:22:44.772832Z local/
>
> 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
> Name does not refer to a filesystem file: Attempted to get checksum of a
> *non*-file node at ./bug.pl line 36
>
> Line 36 is a call to $ra->get_file().
>
> I can understand that that might fail if I call it on a directory, since
> the function name suggests that it's only supposed to work on files.
>
> However, since it does work when using the file:/// RA layer I'm not
> sure.  And if it's *not* supposed to work I'm still in the dark as to
> the correct way to retrieve this information in the directory case.
>
> I've attached bug.pl.  The results above were obtained using Subversion
> 1.3.2 (r19776).

Could you possibly try with trunk?  Or the 1.4.x release branch?

Also, what are the exact arguments being passed to get_file in the failure case?

-garrett

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org