There may be other Ruby scripts that achieve the same - it was a while ago when I looked and at the time nothing significant came up in my Googling.
The script makes use of John Nunemaker's twitter gem - it reduces our Twitter involvement to a single line!
To setup is simple - put the script somewhere accessible and make it executable. Next, edit the post-commit file in the hooks directory of your SVN repository to contain:
REPOS="$1"
REV="$2"
<path to script>/ruby_scm_twitter.rb -u <twitter username> -p <twitter password> -f "${REPOS}" -r "${REV}"
Obviously replacing the path to the script and username and password with the correct values.
You also need to make sure svnlook is available from your PATH - otherwise you might need to edit the script and put in the absolute path to the tool. I did look at using the Ruby SVN bindings - but decided not to spend an hour figuring out how to do something that I could already do in 10 seconds.
My initial plan was to add in some more complex configuration ability - i.e. to specify specific twitter accounts for specific repositories or paths - but given all the cool kids have moved to Github then i'm not sure how much demand there would be for this.
Happy Twitter committing!


4 comments
Comment on Twitter your SVN Commit Messages by Jason Green
March 8th, 2009 @ 23:20 – permalink
Comment on Twitter your SVN Commit Messages by Grencucheme
April 17th, 2009 @ 18:13 – permalink
Comment on Twitter your SVN Commit Messages by jack
September 6th, 2009 @ 09:51 – permalink
Comment on Twitter your SVN Commit Messages by Chris Anderton
September 6th, 2009 @ 15:42 – permalink
Leave a reply
You can use Markdown in your comment as well as plain HTML. You can use
<filter:jscode lang="ruby">and</filter:jscode>tags to surround code blocks (supported languages are css, html, javascript and ruby). Your email address will not be published.If your comment doesn’t appear immediately after posting it could have been marked as spam. Don’t worry: we regularly check for and approve incorrectly filtered comments so you shouldn’t have to wait too long for it to be shown.