76

How can I determine current version of my repository to see if I need to upgrade it (svnadmin upgrade)?

In reality I'm hosting SVN with 3rd party and I want to find out if I need to ask them to upgrade my repos or not.

I'm asking since 1.5 server will keep repo version at 1.4, unless I miss something?

bahrep
  • 26,679
  • 12
  • 95
  • 136
Sumrak
  • 3,700
  • 7
  • 28
  • 36

8 Answers8

46

Have a look at <REPO>/db/format. After upgrading to 1.5 format, my format file shows:

3
layout sharded 1000

Before it used to be:

2
bdumitriu
  • 1,313
  • 9
  • 12
  • 11
    It's '4' for Subversion 1.6. This is /probably/ the best way to determine the version of the repository. – James Skemp Mar 24 '09 at 02:38
  • 2
    where is this information? I'm on windows and using tortoisesvn. – Kugel Mar 25 '10 at 14:38
  • 12
    -1. The questioner has stated that the repo is on a third party SVN host. They don't give you access to the physical repository. There is no way for the questioner to directly access this file. BTW, no argument this is the best way to determine the version if you have access to it. – Ken Gentle May 25 '10 at 14:10
  • I have my repo url , and see branches , tags, truck folder but don't see any db or format folder? Where I can find this Db or db/format folder? I don't have access to higher levels of repo directory structure? – supernova Aug 07 '13 at 16:18
  • 2
    @supernova, you need to go to the file system it self where svn stores all it's files. Not view the svn contents through a svn client. – JackDev Sep 17 '13 at 01:29
27

Take the http or https link to your repository and cut & paste it into a browser. The Subversion repository server version appears in the footer by default.

Powered by Subversion version 1.4.5 (r25188).

One would assume that a 1.4 server won't be running against a 1.5 repository.

For details, see the Subversion 1.5 Release Notes

Thanks to @Omus for the correction.

Ken Gentle
  • 13,047
  • 2
  • 39
  • 49
  • 5
    I thought this was SVN server software version, not repository version? – Sumrak Nov 12 '08 at 00:05
  • 1
    but it could run the other way around, no? – Sumrak Nov 12 '08 at 03:55
  • That's where the "one would assume" comes in - possible, but doesn't make much sense, does it? – Ken Gentle Nov 12 '08 at 13:57
  • 11
    "The Subversion 1.5 server works with 1.4 and older repositories, and it will not upgrade such repositories to 1.5 unless specifically requested to via the svnadmin upgrade command." - http://subversion.tigris.org/svn_1.5_releasenotes.html#repos-upgrades So you shouldn't assume :) – James Skemp Mar 24 '09 at 02:37
  • This doesn't work for VisualSVN server - it doesn't seem to provide the version number. – Richard Beier Apr 13 '11 at 01:39
6

You can check the content of the file "format" under the "db" directory. If it shows 3 then it has been upgraded to 1.5 (that's the version of the updated fielsystem). If it is 2 then it is 1.4 or older.

5

There is a difference between Subversion Repository Version / Schema (1), and Subversion Repository FSFS Version (2).

FSFS, in contrast to Berkeley DB, or the developmental FSX, is a backend data storage method. FSFS is "a versioned filesystem implementation that uses the native OS filesystem directly".

(1): The Subversion repository version / schema is found in the [REPO]/format file. The current versions from the Subversion repos_upgrade_HOWTO document are:

SUBVERSION VERSION NUMBER           SCHEMA VERSION
-------------------------           --------------
Up to and including 0.27            1
0.28 - 0.33.1                       2
0.34 - 1.3                          3
(no released version used this)     4
1.4 -                               5

(2): The repository FSFS format however, is found in the [REPO]/db/format file. The current versions are in the libsvn_fs_fs FSFS Structure document, in the Filesystem formats section. They currently are:

Format 1, understood by Subversion 1.1+
Format 2, understood by Subversion 1.4+
Format 3, understood by Subversion 1.5+
Format 4, understood by Subversion 1.6+
Format 5, understood by Subversion 1.7-dev, never released
Format 6, understood by Subversion 1.8
Format 7, understood by Subversion 1.9
Format 8, understood by Subversion 1.10+

Also, as of Subversion 1.9 you can now use the svnadmin info command to gain both the Subversion Repository Version / Schema, as well as the Subversion Repository FSFS Version (See: Subversion 1.9 Release Notes - FSFS Improvements as well as Subversion 1.9 Release Notes - svnadmin Changes and Improvements)

Brian Minton
  • 2,562
  • 3
  • 33
  • 38
user7457877
  • 141
  • 2
  • 2
4

For VisualSVN Server, even it uses custom pages, you can still view the page source:)

sken130
  • 153
  • 1
  • 6
1

I would also suggest spoofing response headers because some server installations (VisualSVN Server comes to mind) uses custom pages which unfortunately doesn't show Subversion server version.

You could use Fiddler2 to spoof request/response to the server. If You're using an HTTPS connection be sure to check "Decrypt HTTPS traffic" option in: Tools->Fiddler Options->HTTPS

iacoware
  • 231
  • 1
  • 8
0

If you use VisualSVN Server you can find out the format of the repository via the VisualSVN Server Manager console or via PowerShell. Read the article KB135: Understanding the Subversion repository types and formats for more information.

VisualSVN Server Manager

Follow these steps to find out the format of a repository:

  1. Start the VisualSVN Server Manager console.
  2. Right-click a repository and click Properties.
  3. Click the Details tab.

PowerShell

Follow these steps to find out the format of a repository via PowerShell:

  1. Start the PowerShell console.
  2. Execute the following command: Get-SvnRepository MyRepo | Format-List

Ivan Zhakov
  • 4,055
  • 25
  • 24
bahrep
  • 26,679
  • 12
  • 95
  • 136
-2

I think what you want is "svnlook youngest"

Wangmao
  • 13
  • 2