[英]How to find my Subversion server version number?
I want to know if my server is running Subversion 1.5.我想知道我的服务器是否正在运行 Subversion 1.5。
How can I find that out?我怎样才能找到它?
Also would be nice to know my SVN client version number.也很高兴知道我的 SVN 客户端版本号。 svn help
hasn't been helpful. svn help
没有帮助。
Note: I don't want my project's revision number, etc. This question is about the Subversion software itself.注意:我不想要我的项目的修订号等。这个问题是关于Subversion 软件本身的。
To find the version of the subversion REPOSITORY you can:要查找 subversion REPOSITORY 的版本,您可以:
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就足够了
Let's merge these responses:让我们合并这些响应:
From an earlier answer by Manuel , run the following on the SVN server:从Manuel较早的回答中,在 SVN 服务器上运行以下命令:
svnadmin --version
See the "powered by Subversion" line when accessing the server via a browser.通过浏览器访问服务器时,请参阅“由 Subversion 提供支持”这一行。
Access the repository via browser and then look for the version string embedded in the HTML source.通过浏览器访问存储库,然后查找嵌入在 HTML 源代码中的版本字符串。 From earlier answers by elviejo and jaredjacobs .来自elviejo和jaredjacobs 的早期回答。 Similarly, from ??, use your browser's developer tools (usually Ctrl + Shift + I ) to read the full response.同样,从 ?? 开始,使用浏览器的开发人员工具(通常是Ctrl + Shift + I )阅读完整响应。 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检查响应标签(这些未显示在 HTML 源代码中),来自Christopher 较早的回答
wget -S --spider 'http://svn.server.net/svn/repository' 2>&1 | sed -n '/SVN/s/.*\\(SVN[0-9\\/\\.]*\\).*/\\1/p'
From an earlier answer by Milen来自Milen 较早的回答
svnserve --version (run on svn server)
From an earlier answer by Glenn来自格伦早先的回答
ssh user@host svnserve --version
Check out the current version in a FAQ:
http://code.google.com/p/support/wiki/SubversionFAQ#What_version_of_Subversion_do_you_use?
TBD
Please edit to finish this answer请编辑以完成此答案
svn --version
On the server: svnserve --version
在服务器上: svnserve --version
in case of svnserve-based configuration (svn:// and svn+xxx://).如果是基于 svnserve 的配置(svn:// 和 svn+xxx://)。
(For completeness). (为了完整性)。
Here's the simplest way to get the SVN server version.这是获取SVN服务器版本的最简单方法。 HTTP works even if your SVN repository requires HTTPS .即使您的 SVN 存储库需要HTTPS, HTTP 也能工作。
$ 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>
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对于基于 HTTP 的服务器,有一个 Python 脚本可以在以下位置找到服务器版本: http : //svn.apache.org/repos/asf/subversion/trunk/tools/client-side/server-version.py
You can get the client version with您可以通过以下方式获取客户端版本
`svn --version`
If the Subversion server version is not printed in the HTML listing, it is available in the HTTP RESPONSE header returned by the server.如果 Subversion 服务器版本没有打印在 HTML 列表中,它在服务器返回的 HTTP RESPONSE 标头中可用。 You can get it using this shell command您可以使用此 shell 命令获取它
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如果 SVN 服务器要求你提供用户名和密码,那么在命令中添加wget
参数--user
和--password
像这样
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:还有一种选择:如果您有 Firefox(我使用的是 14.0.1)和一个 SVN Web 界面:
There should be an "SVN/1.7.4" string or similar there.那里应该有一个“SVN/1.7.4”字符串或类似的字符串。 Again, this will probably only work if you have "ServerTokens Full" as mentioned above.同样,这可能只有在您拥有上述“ServerTokens Full”时才有效。
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.确实没有一种简单的方法可以找出您的服务器正在运行的 Subversion 版本——除了进入服务器并亲自查看。
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. Subversion 客户端处理了大部分繁重的工作,并且大多数版本的 Subversion 客户端可以与几乎任何版本的服务器一起工作。
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.服务器版本真正对客户端产生影响的最后一个版本是在添加合并跟踪时从 1.4 版更改为 1.5 版。 Merge tracking had been greatly improved in version 1.6, but that doesn't really affect the interactions between the client and server.合并跟踪在 1.6 版中得到了很大改进,但这并没有真正影响客户端和服务器之间的交互。
Let's take the latest changes in Subversion 1.8:让我们看看 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
. svn move
现在是一流的操作:Subversion 终于明白svn move
不是svn copy
和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. svn merge --reintegrate
deprecated :同样,只要服务器是 1.5 或更高版本,这不是问题。svn:global-ignores
and svn:auto-props
: Alas!两个新的可继承属性 - svn:global-ignores
和svn:auto-props
:唉! What we really wanted.我们真正想要的。 A way to setup these two properties without depending upon the Subversion configuration file itself.一种设置这两个属性而不依赖于 Subversion 配置文件本身的方法。 However, this is a client-only issue, so it again doesn't matter what version of the server 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.在所有功能中,只有一个取决于服务器的版本为 1.5 或更高版本(并且 1.4 已经过时了很长时间。1.8 的新功能将提高您的工作副本的性能,但修订版为 1.8 的服务器不是没有必要。与服务器版本相比,客户端版本对您的影响要大得多。
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.我知道这不是您想要的答案(没有查看服务器版本的官方方法),但幸运的是,服务器版本对您的影响并不大。
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.我希望它有帮助。
For a svn+ssh configuration, use ssh to run svnserve --version on the host machine:对于 svn+ssh 配置,使用 ssh 在主机上运行 svnserve --version:
$ ssh user@host svnserve --version $ ssh user@host svnserve --version
It is necessary to run the svnserve command on the machine that is actually serving as the server.需要在实际充当服务器的机器上运行 svnserve 命令。
Just use a web browser to go to the SVN address.只需使用网络浏览器转到 SVN 地址即可。 Check the source code ( Ctrl + U ).检查源代码( Ctrl + U )。 Then you will find something like in the HTML code:然后你会在 HTML 代码中找到类似的东西:
<svn version="1.6. ..." ...
For Subversion 1.7 and above, the server doesn't provide a footer that indicates the server version.对于 Subversion 1.7 及更高版本,服务器不提供指示服务器版本的页脚。 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.请注意,这也适用于您无权访问的 Subversion 服务器。
您可以使用HTTP连接到 Subversion 服务器并在 HTTP 标头中找到版本号。
A repository is not automatically updated unless the administrator runs 'svnadmin upgrade'. 除非管理员运行“ svnadmin upgrade”,否则不会自动更新存储库。 To be sure of the version number of the repository, check the 'format' file. 要确定存储库的版本号,请检查“格式”文件。 See @bdumitriu's comment . 参见@bdumitriu的评论 。
Go to the repository folder and type 转到存储库文件夹并输入
svnadmin info .
it will return what you need, like the repository format and the client compatibility version. 它将返回您需要的内容,例如存储库格式和客户端兼容性版本。
Path: .
UUID: e65b8a35-4d38-7941-a369-78be7fd1bdf9
Revisions: 1294
Repository Format: 5
Compatible With Version: 1.10.0
Repository Capability: mergeinfo
Filesystem Type: fsfs
Filesystem Format: 8
FSFS Sharded: yes
FSFS Shard Size: 1000
FSFS Shards Packed: 1/1
FSFS Logical Addressing: yes
Configuration File: db\fsfs.conf
If you use VisualSVN Server, you can find out the version number by several different means.如果您使用 VisualSVN Server,您可以通过几种不同的方式找到版本号。
Follow these steps to find out the version via the management console:按照以下步骤通过管理控制台查找版本:
If you click Version you will also see the versions of the components.如果单击版本,您还将看到组件的版本。
Follow these steps to find out the version from the readme.txt file:按照以下步骤从 readme.txt 文件中找出版本:
命令行上的以下内容应为您提供版本号
svn --version
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.