How to patch Xcode to work with Subversion 1.5

The latest version (3.1.2 as of this writing) of Xcode is linked to Subversion 1.4. Unfortunately, I tend to use the SVN integration as well as the command line, and would like to use subversion 1.5 – but the working directory formats are not compatible. After looking for solutions everywhere, I found a couple of possibilities, some that didn’t work, and some that almost worked.

One popular solution is to just copy offending shared libraries from svn 1.5 over those in /usr/lib. There are two problems with this. The first is that doing so you are messing with the default libraries and something may not be happy. In fact, apache isn’t happy. This solution appeared to work fine until I restarted apache and it complained about missing libraries. A better solution is as follows.

I originally found the basis of this solution on this thread, thanks to a follow up by Jean-Daniel Dupas and subsequent changes by Philippe Casgrain. The idea is to install svn 1.5 into /opt/local, leaving the stock svn and libraries untouched, and then patch the Xcode subversion plugin to use these new dynamic libraries. This is nice and clean, and leaves everything else in its original condition. It didn’t work entirely for me on the latest Xcode, so I updated the script accordingly. Here are the steps I followed:

Step 1: Install Subversion 1.5 binaries

Download subversion binaries and install them into /opt/local. Modify your search path to run subversion from this directory, or create appropriate aliases. This won’t effect Xcode directly yet, but gives you both subversion 1.4 and subversion 1.5 installed.

Step 2: Run the patch script

Quit Xcode. Download this SVN Xcode Patch o your computer, chmod 755 to make it executable, and run as super user. The first argument is the full path to the Xcode subversion plugin and the second is the root directory where svn libraries are installed. For example:

sudo UpdateXCodePluginToSVN1-5.sh /Developer/Library/Xcode/Plug-ins/XcodeSubversionPlugin.xcplugin/Contents/MacOS/XcodeSubversionPlugin /opt/local/

The script makes a backup of the plugin first, feel free to make your own if you don’t trust it. It then uses install_name_tool to patch the executable to change its dynamic library paths from /usr/lib to /opt/lib. You’re done!

  Permalink |  Comments[0]


Related Items


Recent Entries

 » How to make the Flip Mino HD import into iMovie 09
 » How to patch Xcode to work with Subversion 1.5
 » iTunes 8 on Windows XP x64
 » iPhone SDK Code Signing Insights
 » Making iPhone Distribution Profiles Show Up


Both comments and pings are currently closed.



Comments are closed.