Forum: Ruby Ruby subversion bindings

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
28fc8639c02a2d392d6fcb7dcf1b1afb?d=identicon&s=25 Pieter Ennes (Guest)
on 2006-04-19 23:10
(Received via mailing list)
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:in `fs_wrapper'
         from /usr/lib/ruby/site_ruby/1.8/svn/repos.rb:85:in `fs'
         from ./svnlook.rb:34:in `initialize'
         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,
Ee6ffca720cc428d70247dcd7377dd48?d=identicon&s=25 Kouhei Sutou (Guest)
on 2006-04-20 00:54
(Received via mailing list)
Hi,

In <4446A6C5.7070502@spam.ennes.net>
  "Ruby subversion bindings" on Thu, 20 Apr 2006 06:08:27 +0900,
  Pieter Ennes <ruby-list@spam.ennes.net> 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,
28fc8639c02a2d392d6fcb7dcf1b1afb?d=identicon&s=25 Pieter Ennes (Guest)
on 2006-04-20 19:27
(Received via mailing list)
Kouhei Sutou 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 topic is locked and can not be replied to.