Welcome

Welcome to our blog about all kind of topics that are related to software development. We blog about:

SOA, BPM, EDA, ECM and all the other buzz words. Beware some post might not be so common as you think. We are not scared to go against main stream thoughts.

Technologies like java, maven, springframework, OSGi and front end technologies and frameworks like jQuery, DWR, Flex.

Finally to make this happen we need tools and of course a Mac (well some of us do). So we blog about that as well.

Technorati

Add to Technorati Favorites

Upgrade subversion client on mac osx

subversion_logo_hor-468x64.pngThe mac is a pretty complete system for developing applications. Once I was surprised that tools like subversion and maven come pre-installed. There is a big advantage for the non-technical users that these tools are pre installed. Although I doubt that these people will use it a lot. Would you teach a person to use command line subversion? I guess not. You would teach them to use a tool like Versions. As a developer you can run into problems when you want to upgrade one of these libraries. Some time a go I have already written a post about upgrading maven on the mac. This is a short post about upgrading subversion.

Like I said, mac osx comes with a subversion client out of the box. At least Leopard does. If you do not believe me, try the following command and watch the output:

svn –version

svn, version 1.4.4 (r25188)
   compiled May 31 2008, 03:45:57
Copyright (C) 2000-2006 CollabNet.
Subversion is open source software, see http://subversion.tigris.org/
This product includes software developed by CollabNet (http://www.Collab.Net/).
The following repository access (RA) modules are available:
* ra_dav : Module for accessing a repository via WebDAV (DeltaV) protocol.
  - handles 'http' scheme
  - handles 'https' scheme
* ra_svn : Module for accessing a repository using the svn network protocol.
  - handles 'svn' scheme
* ra_local : Module for accessing a repository on local disk.
  - handles 'file' scheme

This is not the most recent version of subversion. That comes with performance as well as use ability problems. I am not going into details here. The biggest problem to me is that I use Versions and IntelliJ with subversion 1.5. Now my command line client does not work anymore. This is a problem for some of the maven projects. Therefore I want to upgrade the commandline subversion client. I was surprised that there are almost no resources on the web to do this without installing other libraries. But I found a pretty easy way. Execute the following steps:

  • Download the binaries from the website : http://subversion.tigris.org/getting.html#osx. I used the openCollabnet version. You do have to provided your details to download, just leave everything empty.
  • Use the downloaded installer to install all the subversion binaries.
  • Make sure that the new binaries are on the path before the original subversion libraries. Issue the following command in a terminal.
    export PATH=/usr/local/bin:$PATH

Those are the most important steps. If you do this in a terminal and execute the svn –version again you get the following output

svn, version 1.5.4 (r33841)
   compiled Oct 27 2008, 11:19:10
Copyright (C) 2000-2008 CollabNet.
Subversion is open source software, see http://subversion.tigris.org/
This product includes software developed by CollabNet (http://www.Collab.Net/).
The following repository access (RA) modules are available:
* ra_neon : Module for accessing a repository via WebDAV protocol using Neon.
  - handles 'http' scheme
  - handles 'https' scheme
* ra_svn : Module for accessing a repository using the svn network protocol.
  - with Cyrus SASL authentication
  - handles 'svn' scheme
* ra_local : Module for accessing a repository on local disk.
  - handles 'file' scheme
* ra_serf : Module for accessing a repository via WebDAV protocol using serf.
  - handles 'http' scheme
  - handles 'https' scheme

That worked, the version is now 1.5.4. If you do not want to execute this command every time you need it, you can add it to you .profile. If you need more info on how to do just that, you can find a good explenation here.

Hope this post helps you use the new and improved subversion.

26 comments to Upgrade subversion client on mac osx

  • Chandana

    Using macports to update subversion client is a good idea. Its a one step process. Installing macports is a prerequisite, but it will help installing many other packages like tomcat, mysql etc.

  • James

    I hate the way OS X comes with these things and when you want to update then you have 2 versions. Python is the same way. OS X needs some kind of apt-get or something. I know there’s Fink, but you’re still out of luck with the stuff that comes preinstalled, right? Pretty lame.

  • Calvin

    Solved it… obvious I suppose but you also need to update the path of dav_svn_module in ServerAdmin to point to the new module that comes with subversion install default at /opt/subversion/lib/svn-apache/mod_dav_svn.so

    Assuming you are using OS X Leopard Server.

    Great though. Thanks.

  • Calvin

    I’m having same issue as Yves De Billoez…

    I removed the old svn* files from /usr/bin … setup the symlinks and was still getting 1.4.4. showing on Repository …

    I thought I’d delete and recreate the Repository using 1.6.5 … now when I try to browse via Safari, I get cannot connect o svn repository show in browser and this in console….

    [Fri Oct 16 20:37:55 2009] [error] A subtree cannot specify a different DAV provider than its parent.
    [Fri Oct 16 20:37:55 2009] [error] [client ::1] (20014)Internal error: Expected FS format ’2′; found format ’4′
    [Fri Oct 16 20:37:55 2009] [error] [client ::1] Could not fetch resource information. [500, #0]
    [Fri Oct 16 20:37:55 2009] [error] [client ::1] Could not open the requested SVN filesystem [500, #160043]
    [Fri Oct 16 20:37:55 2009] [error] [client ::1] Could not open the requested SVN filesystem [500, #160043]

  • Quang Thanh

    Thanks for your tip, Jettro

  • Yves De Billoez

    Problem with the upgrade is that Apache 2 is still compiled with Subversion 1.4.4.

    Apache version on Leopard:
    Apache/2.2.11 (Unix) mod_ssl/2.2.11 OpenSSL/0.9.7l DAV/2 PHP/5.2.10 SVN/1.4.4

    Is there any way to upgrade Apache dav svn to the SVN 1.5 or 1.6 after doing previous stepsN

  • This worked – for a hot minute, rebooted and the changes went away. /usr/local/bin is in my .profile, and when I echo $PATH it is before /usr/local.

    I tried to get the version of the binary directly. This is the result:

    homestar:bin ltackett$ pwd
    /usr/local/bin
    homestar:bin ltackett$ ls
    change-svn-wc-format.py
    irb
    rdoc
    svn
    svnlook
    svnversion
    erb
    rails
    ri
    svnadmin
    svnserve
    testrb
    gem
    rake
    ruby
    svndumpfilter
    svnsync
    homestar:bin ltackett$ ./svn –version
    -bash: ./svn: No such file or directory
    homestar:bin ltackett$ cd svn
    -bash: cd: svn: No such file or directory

    Am I doing it wrong? Any help here would rock, I am having trouble connecting to one of my work repositories because of this (the whole reason I upgraded).

    • In my home directory I have a file called .bash_profile. This file contains a few lines for java, maven and one for subversion. I have the following line that might be the thing you are looking for:

      export PATH=/opt/subversion/bin:$PATH

      Hope that helps

  • Joey

    Thanks. I had to do one more thing to get it working in OS X (10.5.6). I had to create a symbolic link to point to /opt/subversion/bin/svn in /usr/local/bin. I don’t know why, but svn –version was still showing 1.4.4, even after updating.

    $: sudo cp /usr/local/bin/svn /usr/local/bin/svn_copy
    $: sudo ln -s /opt/subversion/bin/svn /usr/local/bin/svn

    and then it worked.

  • Thanks! Worked great here.

  • Mo.

    thanks for the post, worked perfectly

  • Thanks. Like what you said, I just needed to add the new svn version to the path before everything else.

  • trimax

    Thanks for the tip. It worked perfectly.
    @hamy: yes, unfortunate that the collabnet installer misses this.

  • hamy

    thanks for the tip. It is unfortunate the installer that comes from open collabnet doesn’t do this automatically

  • Ben

    Thank you sir, this was very helpful.

  • Thanks a lot. I just noticed the 1.4.4 version because usually I use Eclipse with the Subversive plugin.

    Now that one comes in really handy!

  • joe

    Awesome! Thanks. Been wanting to upgrade SVN but messed it up once before going the manual route :) The link to the installer is greatly appreciated.

  • A small addition; just add the path to /etc/profile and you’re done for all users.

  • Daniel

    For some reason when I installed 1.5.5 it didn’t replace the svn executable in /user/local/bin. I had to move file that in order for the installer to make a symlink to 1.5.5. Not sure if I’m doing something wrong…

  • Daniel Soto

    on my machine, there are now two installations. 1.4.4 in /usr/bin and 1.5.4 in /usr/local/bin. is it safe to remove the earlier version?

    • It should be possible yes, BUT, I would not do it. Like magomarcelo comments, there are some issues with maven. It could be there are other issues as well. It is also not the binaries coming from apple. Maybe in time, apple comes with their own upgrade. I’d recommend to leave it there, it is not in your way.

      greetz Jettro

  • Nicolas

    For those of you that have are using bash:

    - Please edit your .bash_profile (instead of .profile as mentioned in the post).
    - Add the following line: export PATH=/usr/local/bin:$PATH
    - Launch a new terminal window and you’re done

  • If you use Maven, be careful with the maven-release-plugin, it has a few issues with subversion 1.5:
    http://weblogs.java.net/blog/johnsmart/archive/2008/12/subversion_mave.html

Leave a Reply

  

  

  

You can use these HTML tags

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>