如何确定SVN工作副本版式? [英] How do I determine the SVN working copy layout version?

查看:136
本文介绍了如何确定SVN工作副本版式?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

例如,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:

  1. 如果您的路径中有sqlite3,则为sqlite3 .svn/wc.db "PRAGMA user_version"
  2. 如果您的路径中没有sqlite3,请在十六进制编辑器中打开.svn/wc.db,然后读取偏移量为0x3c的DWORD
  1. if you have sqlite3 in your path, sqlite3 .svn/wc.db "PRAGMA user_version"
  2. 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屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆