Navigation
Other Sites
My Stuff:
Search
Twitterings
Sunday
22Jul2007

Getting git-svn working on the Mac

I had a little trouble getting the `git-svn` command working on my Mac. For future Google reference, here's how I did it:

Firstly, install Subversion (currently 1.4.4) from downloads.open.collab.net - this version is compiled with all the language bindings, so you don't have to mess about with building SWIG by yourself. The `git-svn` integration depends on having the Perl bindings available.

Next, I downloaded and built git 1.5.2.4 by hand. Unless you have the Expat XML parser installed, you'll want to define the `NO_EXPAT` environment variable to prevent the part of git that depends on it failing to compile.

Finally, and this is the trick, you need to add `/usr/local/lib/svn-perl` to `$PERL5LIB` so that `git-svn` can find the Perl bindings to Subversion. If you're getting errors about "can't find SVN/Core.pm" or some such, this is what you're missing.

Reader Comments (2)

Or, for the lazy MacPorts users, sudo port install git-core +svn :-)

July 23, 2007 | Unregistered CommenterGraeme Mathieson

Hi,

What does adding `/usr/local/lib/svn-perl` to `$PERL5LIB` mean? What is $PERL5LIB, where do I find it and how do I add to it?

January 7, 2010 | Unregistered CommenterMike

PostPost a New Comment

Enter your information below to add a new comment.

My response is on my own website »
Author Email (optional):
Author URL (optional):
Post:
 
Some HTML allowed: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <code> <em> <i> <strike> <strong>