tags:

views:

13590

answers:

9

I want to know if my server is running suberversion 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.

A: 

The following on the command line should give you the version number

   svn --version
Paul Wicks
That only gives you the client's version (unless you run it on the server). (And even then, the server's svn client isn't necessarily the same version as the svn server, although it most likely is.)
cjm
-1 This give only the subversion client number which isn't related to the server number.
Andrea Francia
+13  A: 

For a http-based server there is a python script to find the server version at: http://svn.collab.net/repos/svn/trunk/tools/client-side/server-version.py

You can get the client version with

`svn --version`
PiedPiper
Unless I am mistaken, it looks like that script only works with http or https based servers, and not svn or ssh+svn servers
crashmstr
yes you are right
PiedPiper
If it's ssh based just ssh into the box and run "svn --version".
John Meagher
'svn --version' on the server only gives you the client version running on the server, it might not necessarily be the same as the server version
PiedPiper
+12  A: 

svnserve --version

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

(For completeness).

Milen A. Radev
+19  A: 

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>

Now for the subversion CLIENT:

svn --version

will suffice

This works only if the server will display this information, some server like google code hosting does not.
Andrea Francia
I doesn't look like source forge displays that data either.
caspin
Is that the server version, or the repository version? (they can be different AFAIK)
GraemeF
+11  A: 

Here's the simplest way to get the SVN server version. http works even if your SVN repo 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>
jaredjacobs
This is what I needed. Vote up please!
bentford
Works only when "ServerTokens Full" (http://httpd.apache.org/docs/2.2/mod/core.html#servertokens).
Milen A. Radev
+3  A: 

In order to get the version number for your Subversion server, type this into the command line on the server:

svnadmin --version

To get your Subversion client version, type this into the command line

svn --version
Manuel
+3  A: 

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.

Glenn
A: 

You can connect to your subversion server using http and find the version number in the http header.

eaubin
A: 

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 --spider 'http://svn.server.net/svn/repository' 2>&1 | \ 
grep 'SVN' | sed 's/.*\(SVN[0-9\/\.]*\).*/\1/';
Christopher