Ruby subversion bindings

Dear all,

I’m trying to run one of the examples included with the Ruby Subversion
bindings:

$ svnlook.rb repos tree
/usr/lib/ruby/site_ruby/1.8/svn/util.rb:58:in svn_repos_fs_wrapper': uninitialized constant Svn::Client (NameError) from /usr/lib/ruby/site_ruby/1.8/svn/util.rb:58:infs_wrapper’
from /usr/lib/ruby/site_ruby/1.8/svn/repos.rb:85:in fs' from ./svnlook.rb:34:ininitialize’
from ./svnlook.rb:538

Now, the mentioned util.rb seems to be full of Ruby magic that i’m
having a hard time debugging it. Isn’t this the correct way of calling
svnlook.rb?

PS. Ending the repository path with a ‘/’ results in a different error:

$ svnlook.rb svn/ tree
ruby: subversion/libsvn_subr/path.c:114: svn_path_join: Assertion
`is_canonical (base, blen)’ failed.
Geannuleerd

This is with ruby 1.8.4 (2005-12-24) [i686-linux] on Gentoo.

What am i doing wrong?

Thanks a lot,

Hi,

In [email protected]
“Ruby subversion bindings” on Thu, 20 Apr 2006 06:08:27 +0900,
Pieter E. [email protected] wrote:

Now, the mentioned util.rb seems to be full of Ruby magic that i’m
having a hard time debugging it. Isn’t this the correct way of calling
svnlook.rb?

The following will solve the problem:

% ruby -r svn/client -r svnlook.rb …

Or, could you add

require ‘svn/client’

into the svnlook.rb.

I’ll fix the problem and commit the fix into the svn repository.

PS. Ending the repository path with a ‘/’ results in a different error:

$ svnlook.rb svn/ tree
ruby: subversion/libsvn_subr/path.c:114: svn_path_join: Assertion
`is_canonical (base, blen)’ failed.
Geannuleerd

This is with ruby 1.8.4 (2005-12-24) [i686-linux] on Gentoo.

What am i doing wrong?

A repository path passed to Svn::Repos.open must be canonical.

If you want to use svnlook.rb with more convenience, replace
the following line in svnlook.rb (last line)

SvnLook.new(path, rev, txn).run(cmd)

with

SvnLook.new(basename(path), rev, txn).run(cmd)

Thanks,

Kouhei S. wrote:

I’ll fix the problem and commit the fix into the svn repository.

[…]

PS. Ending the repository path with a ‘/’ results in a different error:

A repository path passed to Svn::Repos.open must be canonical.

If you want to use svnlook.rb with more convenience, replace
the following line in svnlook.rb (last line)

SvnLook.new(path, rev, txn).run(cmd)

with

SvnLook.new(basename(path), rev, txn).run(cmd)

Thanks a lot Kou!

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs