This is a post I’ve wanted to make for a while.
It turns out that this page — a previous blog post of mine — is my most visited page on this site. This isn’t a bad thing (I think it’s great!), but I’ve noticed the info there is either obsolete or naive, and there are better ways of doing things.
Instead of recreating that page (and rewriting a lot of what I’ve already written), I’m instead giving a bit of code with some unit tests that shows how repository interaction can be done.
Now, the file above is in no way meant to be an exhaustive list of what you can do with the Subversion Bindings. Also, I don’t guarantee it to be correct. My use of the subversion bindings faded about six months ago (the project I was working on no longer needed them), but I didn’t want to see useful information go to waste. So, with that, I hope this file is useful, and I would encourage people to let me know how it is used, and how it can be improved.
[...] 12/22/07: This page is obsolete. Please see my new post here. So, I’m visiting my parents in Atlanta, and I finally have some free time. (You know how [...]
Thanks a lot for posting this code. It took some serious googling and web browsing to find it. I hope it finds itself into a more prominent position on the web.
Again — thanks!
[From Tim: Ya, no problem. I'm glad it was useful.
]
This is greatly useful… Is there a way to do something similar on repositories that are not on a local disk?
[From Tim: A lot of people have been asking for that. I'm not sure how to do that, but it has something to do with the Svn::Ra classes. If you find something out, I'd be very interested.]
Many kudos for you assertions. It’s very useful for me.
I was looking for some documentation and no doc is available. Thanks for doing that!
Thank you very much for publishing your library and especially for the unit tests. Did you ever think about making it available as a RubyGem via rubyforge.org?
[From Tim: No, I haven't because I've been out of the Ruby world for a while. If you're interested, I'd be more than happy to turn the code over to you to do so.]
Hello Tim,
I know it is an old post but I have a few questions, how can this be used to actually commit a file on the filesystem? Because in this example you are just writing streams as files into a new or existing svn repository. Can these ruby bindings be used as a normal svn client commands: like determining which file should be added and the commited to repository?
Thanks,
Valeriu Craciun
[From Tim: Thanks for the comment Valeriu. These files alone won't substitute for the svn command line utility; for that, you'd have to recreate the functionality yourself in ruby, or make ruby call the command line utility on its own. I would love to know if you find something.]