Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Ruby > Accessing SVN repository through Ruby

Reply
Thread Tools

Accessing SVN repository through Ruby

 
 
Andrey R-andrey
Guest
Posts: n/a
 
      04-28-2009
Hi people!

My boss ask me about a ruby library that can provide checking-out,
updating and management code-bases from SVN's repositories. Wich is the
better way to get access and manipulate code-bases from SVN's
repositories using ruby?

Is there any library can provide me these functionality?

Can i use CUI's (Command User Interface) SVN through Ruby to do that?

I just need a little light...

Thank you.
--
Posted via http://www.ruby-forum.com/.

 
Reply With Quote
 
 
 
 
Juan Zanos
Guest
Posts: n/a
 
      04-28-2009

On 28 avr. 09, at 08:57, Andrey R-andrey wrote:

> Hi people!
>
> My boss ask me about a ruby library that can provide checking-out,
> updating and management code-bases from SVN's repositories. Wich is
> the
> better way to get access and manipulate code-bases from SVN's
> repositories using ruby?
>
> Is there any library can provide me these functionality?
>
> Can i use CUI's (Command User Interface) SVN through Ruby to do that?
>
> I just need a little light...
>
> Thank you.
> --
> Posted via http://www.ruby-forum.com/.
>


The first question I'd ask is why svn in this day and age? You
might consider svn an evolutionary dead end. I don't know of a ruby
svn library although one might exist. You could just call the
command line functions. There happens to be a ruby implementation of
git here: http://github.com/schacon/ruby-git/tree/master. That might
be a better solution assuming you didn't have to use svn.

 
Reply With Quote
 
 
 
 
Brian Candler
Guest
Posts: n/a
 
      04-28-2009
Andrey R-andrey wrote:
> My boss ask me about a ruby library that can provide checking-out,
> updating and management code-bases from SVN's repositories. Wich is the
> better way to get access and manipulate code-bases from SVN's
> repositories using ruby?


Invoking the command-line svn client from ruby is a reasonable approach.
Have a look at the source for Capistrano, which does that.

I'm also pretty sure there's a native ruby binding (or at least a SWIG
binding) as part of libsvn. Google "svn ruby binding" or "libsvn ruby
binding"

That gives you a very low level guts interface, and last time I looked
it wasn't very well documented, but there are examples out there if you
search for them.

--
Posted via http://www.ruby-forum.com/.

 
Reply With Quote
 
Juan Zanos
Guest
Posts: n/a
 
      04-28-2009

On 28 avr. 09, at 15:37, Brian Candler wrote:

> Andrey R-andrey wrote:
>> My boss ask me about a ruby library that can provide checking-out,
>> updating and management code-bases from SVN's repositories. Wich
>> is the
>> better way to get access and manipulate code-bases from SVN's
>> repositories using ruby?

>
> Invoking the command-line svn client from ruby is a reasonable
> approach.
> Have a look at the source for Capistrano, which does that.
>
> I'm also pretty sure there's a native ruby binding (or at least a SWIG
> binding) as part of libsvn. Google "svn ruby binding" or "libsvn ruby
> binding"
>
> That gives you a very low level guts interface, and last time I looked
> it wasn't very well documented, but there are examples out there if
> you
> search for them.
>
> --
> Posted via http://www.ruby-forum.com/.
>



Invoking the command line is reasonable depending on how much
efficiency you need. In most instances the time to call the command
line function is going to be trivial. That isn't always the case.
The Github folks found that it was too slow. So they ended up re-
implementing git with Ruby. My guess is that in your case it
doesn't matter. But I don't know enough about your project to say
for sure.


 
Reply With Quote
 
Brian Candler
Guest
Posts: n/a
 
      04-28-2009
Juan Zanos wrote:
> Invoking the command line is reasonable depending on how much
> efficiency you need.


And as usual - benchmark before making any premature decisions about
performance.

svn itself is not fast, especially when accessing a remote repository,
so the overhead of invoking an external program is likely to be small in
the overall scheme of things.

That is, unless you're thinking of writing "svnhub" and having millions
of users checking into your repositories

--
Posted via http://www.ruby-forum.com/.

 
Reply With Quote
 
Xeno Campanoli
Guest
Posts: n/a
 
      05-20-2009
Did anyone ever get comfortable with any interface to Subversion from Ruby? I'm
seeing a lot of stuff lying around, and I wonder how good it is. My interest
has to do with secure authentication:

When I pass an svn --username me --password mine cat http://h/repo/mfile

it of course ends up on the process list. If I could use a ruby interface that
can allow me to run everything with individual authentication and keeps it all
off the process list and other public areas, I would be better off. This is not
a real big deal otherwise, but if I can do it for auth, it would be worth
migrating.

Brian Candler wrote:
> Juan Zanos wrote:
>> Invoking the command line is reasonable depending on how much
>> efficiency you need.

>
> And as usual - benchmark before making any premature decisions about
> performance.
>
> svn itself is not fast, especially when accessing a remote repository,
> so the overhead of invoking an external program is likely to be small in
> the overall scheme of things.
>
> That is, unless you're thinking of writing "svnhub" and having millions
> of users checking into your repositories
>



 
Reply With Quote
 
Brian Candler
Guest
Posts: n/a
 
      05-20-2009
Xeno Campanoli wrote:
> Did anyone ever get comfortable with any interface to Subversion from
> Ruby?


I just came across detailled info on installing the ruby subversion
bindings here:
http://warehouseapp.com/installing/r...rsion-bindings

warehouseapp itself is now open source, so you can look through it and
see how they use it.
--
Posted via http://www.ruby-forum.com/.

 
Reply With Quote
 
Xeno Campanoli
Guest
Posts: n/a
 
      05-21-2009
Brian Candler wrote:
> Xeno Campanoli wrote:
>> Did anyone ever get comfortable with any interface to Subversion from
>> Ruby?

>
> I just came across detailled info on installing the ruby subversion
> bindings here:
> http://warehouseapp.com/installing/r...rsion-bindings
>
> warehouseapp itself is now open source, so you can look through it and
> see how they use it.

Thank you. That looks helpful.

 
Reply With Quote
 
David Wright
Guest
Posts: n/a
 
      10-13-2010
I just wanted to post that there is now a svn ruby gem, which makes this
sort of thing very easy.

see this thread http://www.ruby-forum.com/topic/222624

--
Posted via http://www.ruby-forum.com/.

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
ANN: Generating svn:externals by inspecting a repository -z3c.repoexternals Ross Patterson Python 0 09-30-2007 09:14 PM
Creating/Installing a gem from a SVN repository? Joe Ruby Ruby 6 09-17-2006 05:54 PM
compiling from the svn repository didier.prophete@gmail.com Ruby 4 01-09-2006 03:41 PM
Accessing SVN through Ruby/DL Jim Morris Ruby 1 06-09-2005 01:45 PM
Accessing SVN through Ruby Bob Aman Ruby 28 04-13-2005 03:58 AM



Advertisments