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

查看:17
本文介绍了如何确定 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. 如果你的路径中有 sqlite3sqlite3 .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天全站免登陆