MacOS – Subversion – Homebrew vs. Xcode command line tools

macossubversionxcode

I have to update Subversion on my system because I'm working with a server which is running the version 1.7 and this stops me to make commits.

This is the error it returns:

$ svn commit
svn: The path '...' appears to be part of a Subversion 1.7 or greater working copy.  
Please upgrade your Subversion client to use this working copy.

Currently I'm running the version 1.6.18

$ svn --version
svn, version 1.6.18 (r1303927)
   compiled Aug  4 2012, 19:46:53

Copyright (C) 2000-2009 CollabNet.
Subversion is open source software, see http://subversion.apache.org/
This product includes software developed by CollabNet (http://www.Collab.Net/).

I read this question in which the user asked how is it possible to install the version 1.7. They said that this is possible through MacPorts. However I'm using Homebrew as package manager. It provides Subversion 1.7.7

$ brew info subversion
subversion: stable 1.7.7
http://subversion.apache.org/
Depends on: pkg-config, neon, sqlite, serf
Not installed

However I suppose that having two SVN version installed could bring to some conflicts. Is that true? How can I manage it without removing the Xcode command line tools?

Best Answer

No, there shouldn't be a problem having 2 different versions of Subversion installed at the same time. MacPorts and Homebrew will install their executable binaries to a different path.

The version which actually gets executed when executing svn in the shell depends on your $PATH environment variable, which contains a list of directories to search through, in order.

If your $PATH variable lists the directory where Homebrew installs binaries first (I believe this is the default configuration), svn will use the more recent version.