Homebrew – How to Downgrade Subversion to Version 1.7 on MacOS

homebrewmacossubversion

I'm on OS Sierra.

I currently have subversion 1.9 and I want to downgrade to 1.7.

I tried this so far with no luck:

$ brew tap homebrew/versions
$ brew install subversion17
Error: No available formula with the name "subversion17" 
==> Searching for similarly named formulae...
Error: No similarly named formulae found.
==> Searching taps...
Error: No formulae found in taps.
$ brew search subversion
homebrew/versions/subversion18   

What other options might I have?

Edit: More background:

I'm getting this message when I run svn commands in my working directory:

> svn: E155036: Please see the 'svn upgrade' command svn: E155036: The
> working copy at '/Users/MyProject' is too old (format 29) to work with
> client version '1.9.4 (r1740329)' (expects format 31). You need to
> upgrade the working copy first.

I'm worried if I run the upgrade I won't be able to talk to the server anymore? And I have no control over what version the server is running and I don't think they would be willing to upgrade it.

Best Answer

If

  • your SVN client tells you it wants you to upgrade your working copy from format 29 to format 31,

  • and the server is not under your control,

  • and you’re not sure whether the server is going to support the newer format,

then these steps might help you get an updated working copy:

  1. Make a backup of the entire folder that is your working copy, including all subdirectories, especially those named .svn. Store your backup in a safe place that is outside your working copy.

  2. If you’re comfortable with losing your uncommitted changes, you can simply check out a fresh working copy. Clients are made to work with old servers, so chances are this is the easiest option for you. If you’re fine with that, stop here. There is no step 3.

  3. If you’re still determined to upgrade your existing working copy, cd to it and run svn upgrade. Don’t worry about breaking something; svn upgrade is not going to affect server state. If it fails, simply restore your backup or check out a fresh working copy.

  4. If svn upgrade succeeds, you might want to make sure whether the server is still going to well with your newly upgraded working copy. So it’s time to do a quick check and see for yourself. To prepare for that, do svn update first. If svn update fails, try fixing all the issues before you go on to the next step.

  5. As a final test, make a change and check it in so you can see whether the server accepts that, too. For example, create a dummy change you’re comfortable with checking into the repository, e. g. a new file named deleteme.txt. Or just add a newline to some existing source code. If your working copy already has some uncommitted changes you’re comfortable with committing, you can simply use those.

  6. Commit the changes you’ve chosen.

  7. If svn commit returns an error, you still have a few options: as a first step, try and fix the issue yourself; or open another question to ask for help (stating exactly what you did, what you expected, and what actually happened); or edit your existing question; alternatively, simply check out a fresh working copy (see step 2). No matter what, do not be tempted to downgrade your Subversion client to version 1.7.