Basecamp SVN Integration
As promised, here is the follow-up to the SVN for Web Developers post, Basecamp integration.
Why?
Transparency is very important to my business. The #1 complaint I hear about web developers is that they rarely meet deadlines and the client has no idea what is happening with the work until one day it magically appears. To combat that, I use Basecamp to lay out milestones for all my projects. I’ve found that even if a project takes longer than a client would like, as long as they can count on a date that it will be delivered, they’re happy.
Milestones are usually pretty spread out and don’t give clients a good idea of what I’m doing day-to-day to meet them. Writing each Subversion commit to Basecamp gives my clients quick access to the current status of their project.
How?
Luckily, all the hard work is done for us here. Subversion has a post commit hook to automatically run a script after a commit and a Ruby script has already been built to upload these details to Basecamp. We just have to put all the pieces in place to make it happen.
Since my experience with Subversion and Ruby are both limited, I banged my head against the wall for a while trying to get this to work. Here is my Mac-centric cookbook, but it should be trivial to port to other platforms.
1. Get the Prerequisites
wget http://basecamphq.com/api/basecamp.rb
sudo mv basecamp.rb /usr/lib/ruby/1.8/
wget http://rubyforge.org/frs/download.php/17190/rubygems-0.9.2.tgz
tar xvzf rubygems-0.9.2.tgz
cd rubygems-0.9.2.tgz
sudo ruby setup.rb
sudo gem update
sudo gem install xml-simple
2. The Post Commit Script
The original script is here, but it doesn’t work out of the box. I had to change each reference of
To use it, you’ll need to change the constants at the top of the file to match your Basecamp setup. SHOW_CODE_CHANGES will display a list of changed files in the Basecamp message. LOG_PREPEND causes an unordered list to be built from the commit message where ever it encounters a line break followed by two hyphens.
Move it to the hooks folder of your repo and make it executable:
chmod +x post-commit.rb mv post-commit.rb /[path to svn repo]/hooks/post-commit
Wrap Up
That’s it. Every commit automatically creates a message in Basecamp. Hope you found this helpful. I know it would have saved me a couple of hours.
Comments
Comments are closed for this post.
This was written on May, 4 2007 and is filed in code, subversion.
Our Products
Categories
- SEO
- accessiblity
- code
- company news
- django
- gondola
- portfolio
- presentation
- screencast
- software
- subversion
- trailmapping
- wordpress
Archives
- December, 2008
- November, 2008
- September, 2008
- August, 2008
- July, 2008
- June, 2008
- May, 2008
- April, 2008
Elsewhere
What we’ve been up to online
-
pushed to master at lincolnloop/django-beancounter
Pete, 0 minutes ago -
committed to lincolnloop/django-beancounter
Pete, 0 minutes ago -
pushed to master at lincolnloop/django-beancounter
Pete, 0 minutes ago -
committed to lincolnloop/django-beancounter
Pete, 0 minutes ago -
committed to lincolnloop/django-beancounter
Pete, 0 minutes ago -
pushed to master at lincolnloop/django-beancounter
Pete, 0 minutes ago -
committed to lincolnloop/django-beancounter
Pete, 0 minutes ago -
committed to lincolnloop/django-beancounter
Pete, 16 hours, 36 minutes ago -
committed to lincolnloop/django-beancounter
Pete, 16 hours, 36 minutes ago -
committed to lincolnloop/django-beancounter
Pete, 16 hours, 36 minutes ago -
committed to lincolnloop/django-beancounter
Pete, 16 hours, 36 minutes ago -
committed to lincolnloop/django-beancounter
Pete, 16 hours, 36 minutes ago -
pushed to master at lincolnloop/django-beancounter
Pete, 16 hours, 36 minutes ago -
applied fork commits to lincoln-loop-deploy/master
Pete, 1 week, 5 days ago -
Anybody used www.earthclassmail.com? I'm considering routing my business mail through them.
Pete, 1 week, 5 days ago


Just wanted to say thanks! :)
I still have to install the post-commit hook, but the first part went flawlessly so I expect no problems :)
I tried to follow this guide and noticed that basecamp no longer has a basecamp.rb file at that path. any ideas around this?
answering my own questions, its been relocated to this link:
http://developer.37signals.com/basecamp/basecamp.rb
hope this helps others!