2

But, mac os x comes with 1.6 version of svn. I wanted to update my version of svn, so I installed svn using

brew install svn

which installed svn version 1.7

But if I try to check my svn version using

svn --version

It still shows 1.6

How can I change which installation to use?

(Note: It was very difficult to find right words to google this question.)

2
  • This question is about different versions but the solution might still be valid. – madth3 Oct 9 '12 at 18:39
  • no, that solution did not work for me. – hrishikeshp19 Oct 9 '12 at 19:06
2

Use which svn to see the path to your svn executable. If it isn't your brew install directory (/usr/local by default), you'll need to change your PATH variable so it looks in your brew install directory before the directory where it's currently finding svn. echo $PATH will show you your current path search list. Edit your ~/.bash_profile and look at all the statements that create the PATH variable. Edit or rearrange them so your desired path winds up before the current path.

1
  • well I did. port install subversion. That installed one more version of svn on my mac. It seems like "port > default > brew" – hrishikeshp19 Oct 10 '12 at 4:16
1

I did

port install subversion

This command installed one more version of svn on my mac.

And it seems priority is like

macports installation > default mac installation > brew installation

So, I did not try to get my brew's svn on the top, instead I accidentally installed something (macports svn) which overridden the default installation of svn. So, my mac has 3 svns, but only 1.7 is used now.

-1

I have the same problem and I think my PATH env variable is correct.

/usr/local/bin:/usr/bin:/bin:/usr/sbin

I don't know why but I solved the problem by renaming the system svn to other.

sudo mv /usr/bin/svn /usr/bin/svn.old

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy