[svn] How to find my Subversion server version number?

I want to know if my server is running Subversion 1.5.

How can I find that out?

Also would be nice to know my SVN client version number. svn help hasn't been helpful.

Note: I don't want my project's revision number, etc. This question is about the Subversion software itself.

This question is related to svn

The answer is


If the Subversion server version is not printed in the HTML listing, it is available in the HTTP RESPONSE header returned by the server. You can get it using this shell command

wget -S --no-check-certificate \
  --spider 'http://svn.server.net/svn/repository' 2>&1 \
  | sed -n '/SVN/s/.*\(SVN[0-9\/\.]*\).*/\1/p';

If the SVN server requires you provide a user name and password, then add the wget parameters --user and --password to the command like this

wget -S --no-check-certificate \
  --user='username' --password='password' \
  --spider 'http://svn.server.net/svn/repository' 2>&1 \
  | sed -n '/SVN/s/.*\(SVN[0-9\/\.]*\).*/\1/p';

One more option: If you have Firefox (I am using 14.0.1) and a SVN web interface:

  • Open Tools->Web Developer->Web Console on a repo page
  • Refresh page
  • Click on the GET line
  • Look in the Response Headers section at the Server: line

There should be an "SVN/1.7.4" string or similar there. Again, this will probably only work if you have "ServerTokens Full" as mentioned above.


For a svn+ssh configuration, use ssh to run svnserve --version on the host machine:

$ ssh user@host svnserve --version

It is necessary to run the svnserve command on the machine that is actually serving as the server.


Try this:

ssh your_user@your_server svnserve --version

svnserve, version 1.3.1 (r19032)
   compiled May  8 2006, 07:38:44

I hope it helps.


To find the version of the subversion REPOSITORY you can:

  1. Look to the repository on the web and on the bottom of the page it will say something like:
    "Powered by Subversion version 1.5.2 (r32768)."
  2. From the command line: <insert curl, grep oneliner here>

If not displayed, view source of the page

<svn version="1.6.13 (r1002816)" href="http://subversion.tigris.org/"> 

Now for the subversion CLIENT:

svn --version

will suffice


Here's the simplest way to get the SVN server version. HTTP works even if your SVN repository requires HTTPS.

$ curl -X OPTIONS http://my-svn-domain/
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><head>...</head>
<body>...
<address>Apache/2.2.11 (Debian) DAV/2 SVN/1.5.6 PHP/5.2.9-4 ...</address>
</body>
</html>

Browse the repository with Firefox and inspect the element with Firebug. Under the NET tab, you can check the Header of the page. It will have something like:

Server: Apache/2.2.14 (Win32) DAV/2 SVN/1.X.X

You can connect to your Subversion server using HTTP and find the version number in the HTTP header.


For an HTTP-based server there is a Python script to find the server version at: http://svn.apache.org/repos/asf/subversion/trunk/tools/client-side/server-version.py

You can get the client version with

`svn --version`

Just use a web browser to go to the SVN address. Check the source code (Ctrl + U). Then you will find something like in the HTML code:

<svn version="1.6. ..." ...

For Subversion 1.7 and above, the server doesn't provide a footer that indicates the server version. But you can run the following command to gain the version from the response headers

$ curl -s -D - http://svn.server.net/svn/repository
HTTP/1.1 401 Authorization Required
Date: Wed, 09 Jan 2013 03:01:43 GMT
Server: Apache/2.2.9 (Unix) DAV/2 SVN/1.7.4

Note that this also works on Subversion servers where you don't have authorization to access.


Let's merge these responses:

For REPOSITORY / SERVER (the original question):

If able to access the Subversion server:

  • From an earlier answer by Manuel, run the following on the SVN server:

    svnadmin --version
    

If HTTP/HTTPS access:

  • See the "powered by Subversion" line when accessing the server via a browser.

  • Access the repository via browser and then look for the version string embedded in the HTML source. From earlier answers by elviejo and jaredjacobs. Similarly, from ??, use your browser's developer tools (usually Ctrl + Shift + I) to read the full response. This is also the easiest (non-automated) way to deal with certificates and authorization - your browser does it for you.

  • Check the response tags (these are not shown in the HTML source), from an earlier answer by Christopher

    wget -S --spider 'http://svn.server.net/svn/repository' 2>&1 |
    sed -n '/SVN/s/.*\(SVN[0-9\/\.]*\).*/\1/p'
    

If svn:// or ssh+svn access

If GoogleCode SVN servers

    Check out the current version in a FAQ: 
    http://code.google.com/p/support/wiki/SubversionFAQ#What_version_of_Subversion_do_you_use?

If another custom SVN servers

    TBD

Please edit to finish this answer

For CLIENT (not the original question):

svn --version

If you use VisualSVN Server, you can find out the version number by several different means.

Use VisualSVN Server Manager

Follow these steps to find out the version via the management console:

  1. Start the VisualSVN Server Manager console.
  2. See the Version at the bottom-right corner of the dashboard.

enter image description here

If you click Version you will also see the versions of the components.

enter image description here

Check the README.txt file

Follow these steps to find out the version from the readme.txt file:

  1. Start notepad.exe.
  2. Open the %VISUALSVN_SERVER%README.txt file. The first line shows the version number.

enter image description here


There really isn't an easy way to find out what version of Subversion your server is running -- except to get onto the server and see for yourself.

However, this may not be as big a problem as you may think. Subversion clients is were much of the grunt work is handled, and most versions of the Subversion clients can work with almost any version of the server.

The last release where the server version really made a difference to the client was the change from release 1.4 to release 1.5 when merge tracking was added. Merge tracking had been greatly improved in version 1.6, but that doesn't really affect the interactions between the client and server.

Let's take the latest changes in Subversion 1.8:

  • svn move is now a first class operation: Subversion finally understands the svn move is not a svn copy and svn delete. However, this is something that the client handles and doesn't really affect the server version.
  • svn merge --reintegrate deprecated: Again, as long as the server is at version 1.5 or greater this isn't an issue.
  • Property Inheritance: This is another 1.8 release update, but this will work with any Subversion server -- although Subversion servers running 1.8 will deliver better performance on inheritable properties.
  • Two new inheritable properties - svn:global-ignores and svn:auto-props: Alas! What we really wanted. A way to setup these two properties without depending upon the Subversion configuration file itself. However, this is a client-only issue, so it again doesn't matter what version of the server you're using.
  • gnu-agent memory caching: Another client-only feature.
  • fsfs performance enhancements and authz in-repository authentication. Nice features, but these work no matter what version of the client you're using.

Of all the features, only one depends upon the version of the server being 1.5 or greater (and 1.4 has been obsolete for quite a while. The newer features of 1.8 will improve performance of your working copy, but the server being at revision 1.8 isn't necessary. You're much more affected by your client version than your server version.

I know this isn't the answer you wanted (no official way to see the server version), but fortunately the server version doesn't really affect you that much.


To find the version of the subversion REPOSITORY you can:

  1. Look to the repository on the web and on the bottom of the page it will say something like:
    "Powered by Subversion version 1.5.2 (r32768)."
  2. From the command line: <insert curl, grep oneliner here>

If not displayed, view source of the page

<svn version="1.6.13 (r1002816)" href="http://subversion.tigris.org/"> 

Now for the subversion CLIENT:

svn --version

will suffice


On the server: svnserve --version

in case of svnserve-based configuration (svn:// and svn+xxx://).

(For completeness).