Last Updated: February 25, 2016
·
1.484K
· helmedeiros

Git Svn Broken in MacOSX - Maverick and Lion

Some days ago, I was using the git module called svn which includes connectors between SVN and GIT, and after a Mountain Lion upgrade, some commands stopped working. The solution follows.

DETECTING THE PROBLEM
After the upgrade, when I'm tempting to run a git svn command and see what happens. I received the following output:

Picture

SOLVING PROBLEM

Mavericks
After some searching, I've discovered that the path for the svn perl library has moved as part of the Xcode 5 restructuring, and git svn command requires Perl libraries that aren’t linked in Mavericks

So, the first step is to download and install the latest Xcode version.
https://developer.apple.com/downloads/index.action?name=%20Xcode%20

After you will need ensure that the Xcode command line tools are installed (this is now done from within Xcode under Preferences -> Downloads -> Components) or access, download and install
https://developer.apple.com/downloads/index.action?name=for%20Xcode%20-#

After that manually link SVN and PERL. Run the following in your terminal to link it.

$ sudo ln -s /Applications/Xcode.app/Contents/Developer/Library/Perl/5.16/darwin-thread-multi-2level/auto/SVN/ /System/Library/Perl/Extras/5.16/auto/SVN

Maybe your Perl version wasn't update, or the git for the new pearl and xcode version... so if you had already installed it via brew upgrade it:

$ brew upgrade git perl

Lion:
After some searching, I've discovered that the path for the svn perl library has moved as part of the Xcode 4.4 restructuring, and git svn command requires Perl libraries that aren’t linked in Mountain Lion.

So, the first step is to download and install the latest Xcode version.
https://developer.apple.com/downloads/index.action?name=for%20Xcode%20-#

After you will need ensure that the Xcode command line tools are installed (this is now done from within Xcode under Preferences -> Downloads -> Components) or access, download and install
https://developer.apple.com/downloads/index.action?name=for%20Xcode%20-#

After that manually link SVN and PERL. Run the following in your terminal to link it.

$ sudo ln -s /Applications/Xcode.app/Contents/Developer/Library/Perl/5.12/darwin-thread-multi-2level/SVN /System/Library/Perl/Extras/5.12/SVN