How do I properly upgrade SVN on MAC?

15,827

Solution 1

The Python script you downloaded from there was to downgrade your SVN version - you need to upgrade your SVN version. I recommend going the homebrew route - it will save you lots of pain in upgrading / installing OSX packages in the future.

Follow the instructions here: http://brew.sh/

(copy that line into a terminal an press ENTER, then follow the prompts)

Then, when homebrew is installed, so update SVN, just do brew install svn.

Solution 2

  1. In Terminal, type "svn --version" to find out what version you currently have
  2. 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
  3. 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. For me export PATH=/opt/subversion/bin:$PATH worked as it was installed in /opt/subversion/bin

  4. Make sure you reload your .profile first by typing . ./.profile*

  5. Type "svn --version". You should see that you have the newest version installed!

Solution 3

brew upgrade subversion

Others solutions require you to register an Account?? forget them.

Share:
15,827
dcp3450
Author by

dcp3450

Updated on June 20, 2022

Comments

  • dcp3450
    dcp3450 almost 2 years

    I'm starting on a new team who are all on PCs using TortoiseSVN with SVN version 1.9.2. I'm on a Mac OSX (El Capitan) using the Versionsapp. When I check svn --version in terminal i get 1.7.10.

    When I try any svn command such as svn update I get

    svn: E155021: This client is too old to work with the working copy at
    '/Users/dpowell/Desktop/sites/site.org.new' (format 31).
    You need to get a newer Subversion client. For more details, see
      http://subversion.apache.org/faq.html#working-copy-format-change
    

    I've gone to the site and downloaded the python script but don't know it will do anything to help (i.e. I don't know how to use it). I've also downloaded the 1.9 package and tried installing svn that way.

    I'm not sure what path to take to solve this issue

  • dcp3450
    dcp3450 about 8 years
    I just did this (no errors) and checked svn --version and it's still 1.7.10
  • mprat
    mprat about 8 years
    What is the output when you type which svn? How did you install SVN originally?
  • dcp3450
    dcp3450 about 8 years
    which svn outputs /usr/bin/svn. I don't remember how I installed it originally, it's been quite a while since then. I do have Versionsapp installed but that was very recent.
  • dcp3450
    dcp3450 about 8 years
    do I need to reset or restart anything?
  • mprat
    mprat about 8 years
    Ok, /usr/bin/svn is where svn gets installed NOT through homebrew. So what you want to do is make sure you have a file /usr/local/bin/svn. If you do /usr/local/bin/svn --version you should get version 1.9.3. If that is the case, then you want to do sudo rm /usr/bin/svn, then sudo ln -s /usr/local/lib/svn /usr/lib/svn. Then do svn --version and you should be all set.
  • humblePilgrim
    humblePilgrim over 7 years
    This tells me that the operation is not permitted when trying the last command
  • mprat
    mprat over 7 years
    svn --version is not permitted?
  • Dayo
    Dayo about 7 years
    @mprat I think he means sudo rm /usr/bin/svn
  • c4sh
    c4sh over 6 years
    It does say operation operation not permitted to sudo rm /usr/bin/svn
  • mprat
    mprat over 6 years
    Is this a laptop administered by someone else? You can try updating the version you currently have (svn upgrade), which might not require root permissions. If that is also not allowed, you might have to be stuck with doing /usr/local/bin/svn --version and typing the full path all the time.
  • Nightmare Games
    Nightmare Games over 6 years
    Took hours of online searching just to find "brew install svn". Fixed everything.
  • Anoop D
    Anoop D over 6 years
    This works only if subversion was installed by brew , otherwise it will show Error: subversion not installed .
  • Davideas
    Davideas over 6 years
    @AnoopD, so you install it, don't upgrade it.
  • Anoop D
    Anoop D over 6 years
    Mac comes preinstalled with older versions of subversion . I updated it to the current stable following the link here by replacing the version in curl command jason.pureconcepts.net/2012/10/updating-svn-mac-os-x
  • leopold
    leopold over 3 years
    as @mprat points out in Catalina you need to install subversion with brew install svn