Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 678321
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T01:08:12+00:00 2026-05-14T01:08:12+00:00

I’m using the Ruby SVN bindings built with SWIG. Here’s a little tutorial. When

  • 0

I’m using the Ruby SVN bindings built with SWIG. Here’s a little tutorial.

When I do this

@repository = Svn::Repos.open('/path/to/repository')

I can access the repository fine. But when I do this

@repository = Svn::Repos.open('svn://localhost/some/path')

It fails with

/SourceCache/subversion/subversion-35/subversion/subversion/libsvn_subr/io.c:2710: 2: Can't open file 'svn://localhost/format': No such file or directory

When I do this from the command line, I do get output

svn ls svn://localhost/some/path

Any ideas why I can’t use the svn:// protocol?

EDIT

Here’s what I ended up doing, and it works.

require 'svn/ra'

class SvnWrapper
  def initialize(repository_uri, repository_username, repository_password)
    # Remove any trailing slashes from the path, as the SVN library will choke
    # if it finds any.
    @repository_uri = repository_uri.gsub(/[\/]+$/, '')

    # Initialize repository session.
    @context = Svn::Client::Context.new
    @context.add_simple_prompt_provider(0) do |cred, realm, username, may_save|
      cred.username = repository_username
      cred.password = repository_password
      cred.may_save = true
    end

    config = {}
    callbacks = Svn::Ra::Callbacks.new(@context.auth_baton)
    @session = Svn::Ra::Session.open(@repository_uri, config, callbacks)
  end

  def ls(relative_path, revision = nil)
    relative_path = relative_path.gsub(/^[\/]+/, '').gsub(/[\/]+$/, '')
    entries, properties = @session.dir(relative_path, revision)

    return entries.keys.sort
  end

  def info(relative_path, revision = nil)
    path = File.join(@repository_uri, relative_path)
    data = {}

    @context.info(path, revision) do |dummy, infoStruct|
      # These values are enumerated at http://svn.collab.net/svn-doxygen/structsvn__info__t.html.
      data['url'] = infoStruct.URL
      data['revision'] = infoStruct.rev
      data['kind'] = infoStruct.kind
      data['repository_root_url'] = infoStruct.repos_root_url
      data['repository_uuid'] = infoStruct.repos_UUID
      data['last_changed_revision'] = infoStruct.last_changed_rev
      data['last_changed_date'] = infoStruct.last_changed_date
      data['last_changed_author'] = infoStruct.last_changed_author
      data['lock'] = infoStruct.lock
    end

    return data
  end
end

Enjoy.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-14T01:08:12+00:00Added an answer on May 14, 2026 at 1:08 am

    The svn command is a client. It communicates with the Subversion server using several protocols (http(s)://, svn:// and file:///).

    Repos.open is a repository function (much like svnadmin for instance). It operates directly on the database, and doesn’t use a client protocol to communicate with the server.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 386k
  • Answers 386k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer There is absolutely no bug; you simply misunderstood the subtyping… May 14, 2026 at 11:47 pm
  • Editorial Team
    Editorial Team added an answer As far as I can tell, DataTableReader does not override… May 14, 2026 at 11:47 pm
  • Editorial Team
    Editorial Team added an answer JSON is not .NET specific, it is a form of… May 14, 2026 at 11:47 pm

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.