On Thursday, February 16 2012, Apple released the first beta of OS X 10.8 named Mountain Lion to Developers. I will refrain from discussing anything about the upcoming release for fear of violating Apple’s NDA, but I did come across one problem that interfered with my workflow which I solved and the disclosure that solution will not violate the NDA.
I use git to connect to my employer’s subversion server. I was using a package called git-svn which includes connectors between the two systems. Upon upgrading to the Mountain Lion beta, my git svn commands stopped working. The solution follows.
First, install the latest version of Xcode (version 4.4) for Mountain Lion. An interesting note is that in Mountain Lion, Apple decided to move it from its former home in /Developer/Xcode to /Applications/Xcode. This was the root source of many of the issues as many of the utilities were searching in the wrong place for the appropriate binaries.
Install Xcode Command Line Tools
Another change they’ve made is that the command line tools are no longer installed by default. Previously, they were included with Xcode with no additional installation necessary. To install the command line tools, launch Xcode, open the Preferences, and switch to the Downloads tab:
One of the entries there is Command Line Tools. Mine already says Installed as I’ve already installed it, but if you haven’t, it’ll appear as an Install button as the iOS 4.0 and 3.0 Device Debugging Support entries do in my screenshot above.
Link the svn Libraries
After this, you may be tempted to run a git svn command and see what happens. I received the following output:
1 2 3 4 5
The problem here is that the git svn command requires Perl libraries that aren’t linked in Mountain Lion.  So, we’ll have to manually link them. Run the following in your terminal to link the library:
Now when you run git svn rebase you will likely be presented with a different error. This is good because it indicates progress! But obviously poor because it’s not working.
1 2 3 4 5 6 7
So now it appears it can find the Subversion core, but cannot find some other libraries it requires. Issue the following command to remedy this:
By doing this, we’ve now linked all of the Subversion Perl directories necessary for this command to run correctly.
Update - March 19 I installed Mountain Lion DP2 over the weekend which broke this again. However, my exact instructions still applied and fixed the issue. I simply needed to install the latest version of Xcode 4.4 (available from developer.apple.com) and then run the commands listed above.
- Note, I am using the version of git from Homebrew. Your outcome may differ slightly if you are using a different version or not using Homebrew.