How to find out Subversion repository version?

守給你的承諾、 提交于 2019-11-29 22:34:47

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

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.

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.

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

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

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)

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

I think what you want is "svnlook youngest"

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!