In typical lazy developer fashion, I went with updating SVN to version 1.7 for Mac OS X. To give due credit, the foundations of this post came from a post on Building SVN 1.7. Although I expanded on it, I encourage you to read the original post. Jul 09, 2013 Note: To compile and install SVN 1.8 you need Xcode with the Command Line Tools installed. This has been tested with SVN 1.8.0 on Mac OSX 10.8 with XCode 4.6.3. Download the SVN.
In this post I’m using Subclipse. I am not too sure whether you’d have the same problem with Subversive or whether it can be fix in the same way. Also I am working on a Mac. Of course the actual solution to this problem is not Mac OS X specific but would also work with Linux. So if you are using Eclipse and Subversion, just ignore the Mac specifics (e.g. Homebrew) and keep reading.
I installed subversion 1.8 using Homebrew some time ago but Eclipse kept using the old svn version so I didn’t have to upgrade my working copies. Now I tried to update a working copy from the command line (it contains documents and not code. That’s why I didn’t do it in Eclipse) and saw that I hadn’t upgraded it yet:
![Mac Mac](https://td-demo.titaniasoftware.com/portals/ui/oxygen18.1/viewer/58123c90b3fbe80001821122/nocontext/userguide-tekom2016/DITA/img/svn_pre_merge_checks.png)
No big deal, I just upgraded all working copies:
Now I could update them:
But now I couldn’t synchronize the working copies with the repository using Eclipse any more because eclipse was using the old svn version:
Problems reported while synchronizing SVNStatusSubscriber. 0 of 1 resources were synchronized.
An error occurred synchronizing /kanban: Error getting status for resource P/kanban org.apache.subversion.javahl.ClientException: svn: E155021: This client is too old to work with the working copy at
‘/Users/henribenoit/workspace/kanban’ (format ’31’).
Error getting status for resource P/kanban org.apache.subversion.javahl.ClientException: svn: E155021: This client is too old to work with the working copy at
‘/Users/henribenoit/workspace/kanban’ (format ’31’).
org.apache.subversion.javahl.ClientException: svn: E155021: This client is too old to work with the working copy at
‘/Users/henribenoit/workspace/kanban’ (format ’31’).
org.apache.subversion.javahl.ClientException: svn: E155021: This client is too old to work with the working copy at
‘/Users/henribenoit/workspace/kanban’ (format ’31’).
An error occurred synchronizing /kanban: Error getting status for resource P/kanban org.apache.subversion.javahl.ClientException: svn: E155021: This client is too old to work with the working copy at
‘/Users/henribenoit/workspace/kanban’ (format ’31’).
Error getting status for resource P/kanban org.apache.subversion.javahl.ClientException: svn: E155021: This client is too old to work with the working copy at
‘/Users/henribenoit/workspace/kanban’ (format ’31’).
org.apache.subversion.javahl.ClientException: svn: E155021: This client is too old to work with the working copy at
‘/Users/henribenoit/workspace/kanban’ (format ’31’).
org.apache.subversion.javahl.ClientException: svn: E155021: This client is too old to work with the working copy at
‘/Users/henribenoit/workspace/kanban’ (format ’31’).
Actually I had already installed subversion 1.8 but I didn’t install it with the Java language bindings (which I did when I installed svn 1.7). So to get a clean system, I removed svn:
And wanted to install it again with the java bindings and as universal binaries (with 32bits and 64bits support), but got an error message:
So I had to remove serf so that it can be installed also as a universal binary:
And after serf, came sqlite:
Now I could install subversion but it didn’t manage to create all the links because some links were left over from an older installation:
It’s easy to fix by using the –overwrite option with brew link:
Now svn 1.8 is installed properly (including the Java language binding for the Subversion API i.e. JavaHL). But when I tried in Eclipse to synchronize with an svn repository, I got the following error message:
Incompatible JavaHL library loaded. Subversion 1.7.x required.
This basically means that this version of JavaHL is not supported by the installed version of subclipse. In fact, the Subversion Wiki also gives you this info:
Subclipse Version | SVN/JavaHL Version |
1.10.x | 1.8.x |
1.8.x | 1.7.x |
1.6.x | 1.6.x |
1.4.x | 1.5.x |
1.2.x | 1.4.x |
1.0.x | 1.4.x |
You can check which version of Subclipse is installed in the “About Eclipse” menu item (click there on “Installation details” and search for Subclipse). If you see e.g. that Subclipse 1.8.1 is installed, the table tells you it will only work with svn 1.7. So we need a newer version of Subclipse. My first idea was to run an update in Eclipse. But it updated some other software but nothing related to subclipse. Then I notice that the update site I had used to install subclipse was: http://subclipse.tigris.org/update_1.8.x
This means that it will provide minor updates like 1.8.2, 1.8.3 and so on but no major update like the version 1.10.x that we need for svn 1.8. So I added a new update site for Subclipse 1.10.x: http://subclipse.tigris.org/update_1.10.x/
Then installed Sublipse 1.10.2 from this update site and after my sync with the svn repository was successful !
Related posts:
If you get the following error
svn: This client is too old to work with working copy '.';
please get a newer Subversion client
... or you just want to update your subversion client (command line), try the following:
- In Terminal, type 'svn --version' to find out what version you currently have
- Go to http://www.wandisco.com/subversion/download#osx and download the latest client for OS X and install it. This will install the new svn into /opt/subversion/bin
- Got to your terminal and check your $PATH by typing 'echo $PATH'. If you don't see /opt/subversion/bin in there, make sure you add it by typing export PATH=/opt/subversion/bin:$PATH. If it DOES exist and appears AFTER /usr/bin, then you may need to remove an older copy of svn that came installed on OS X. To do so, go to /usr/bin and remove all files starting with svn. This isn't an exact science but it should do the trick.
- Make sure you reload your .profile first by typing
. ./.profile
* - Type 'svn --version'. You should see that you have the newest version installed!
NOTE: If /opt/subversion/bin already exists, it will be backed up to /opt/subversion_backup.MMDDYYHHMMSSS. See the readme for more information.
![Updating To Svn 1.8 For Mac Updating To Svn 1.8 For Mac](/uploads/1/2/6/3/126370522/293387450.png)
*See http://www.tech-recipes.com/rx/2621/os_x_change_path_environment_variable/ for a great explanation of this.
UPDATE: 7/28/2013
The url http://www.open.collab.net/downloads/community do not contain installer for osx. anybody know where to download it?
The url http://www.open.collab.net/downloads/community do not contain installer for osx. anybody know where to download it?
That link is still correct, however, you now need to register in order to download the installer AFAIK. Another option is to go here: http://www.wandisco.com/subversion/download#osx, which does NOT require registration.
SVN also, apparently, comes with OS X now: http://www.apple.com/opensource/