如何确定SVN工作副本版式? [英] How do I determine the SVN working copy layout version?
问题描述
例如,SVN 1.5客户端具有一种用于工作副本的布局,而SVN 1.6客户端具有不同的布局.我了解到,当新客户触摸布局时,该布局会自动升级.
For example, the SVN 1.5 client has one layout for working copies, and the SVN 1.6 client has a different layout. I understand that the layout automatically gets upgraded when it gets touched by a newer client.
如果我的系统上有工作副本,如何找出其使用的布局版本?
If I have a working copy on my system, how can I find out the version of the layout it's using?
推荐答案
如果.svn/format
存在,则读取其中的数字:
If .svn/format
exists, then read the number in it:
- 版本7为SVN 1.3
- 版本8是SVN 1.4
- 版本9为SVN 1.5
如果.svn/format
不存在,则版本号位于.svn/entries
的第一行:
If .svn/format
doesn't exist then the version number is on the first line in .svn/entries
:
- 版本10为SVN 1.6
- 版本12为SVN 1.7
Subversion 1.6是第一个不使用.svn/format
的人.版本7和更早的版本使用基于XML的.svn/entries
文件,而较新的版本则使用较少的基于行的冗长文件格式.
Subversion 1.6 was the first one not to use .svn/format
. Version 7 and older used XML-based .svn/entries
file, newer versions use less verbose line-based file format.
从Subversion 1.7开始,版本号存储在.svn/wc.db
SQLite数据库的"user_version"字段中.因此,即使.svn/format
撞到了版本12,实际的格式版本还是29,以后的版本可能不再更新.svn/format
.要从.svn/wc.db
获取版本号,有两种方法:
Since Subversion 1.7 the version number is stored in the .svn/wc.db
SQLite database in the "user_version" field. So even though .svn/format
is bumped to version 12 the actual format version is 29 and future versions may not update .svn/format
anymore. To obtain the version number from .svn/wc.db
there are two methods:
- 如果您的路径中有
sqlite3
,则为sqlite3 .svn/wc.db "PRAGMA user_version"
- 如果您的路径中没有
sqlite3
,请在十六进制编辑器中打开.svn/wc.db
,然后读取偏移量为0x3c的DWORD
- if you have
sqlite3
in your path,sqlite3 .svn/wc.db "PRAGMA user_version"
- if you DO NOT have
sqlite3
in your path, open.svn/wc.db
in a hex editor and read the DWORD at offset 0x3c
wc中介绍了所有格式的版本号. h 以及各个Subversion发行版的版本号.
All the format version numbers are described in wc.h along with the version numbers of respective Subversion releases.
这篇关于如何确定SVN工作副本版式?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!