我如何知道当前svn存储库的版本?

时间:2022-10-03 06:59:10

Recently, I made a decision to upgrade my svn repository from v1.5 to v1.6. After I run the upgrading command then I saw the message left in CMD windows.

最近,我决定将我的svn存储库从v1.5升级到v1.6。运行升级命令后,我在CMD窗口中看到了消息。

D:\svn>svnadmin upgrade repo
Repository lock acquired. 
Please wait; upgrading the repository may take some time...

Upgrade completed.

D:\svn>_

Ya!! It seems great... but.... How do I know which version current repository is? Is it upgraded to v1.6 or still is v1.5. There are few repositories I have. How can I find out their version?

雅!看起来很棒......但是......我怎么知道当前存储库是哪个版本?是升级到v1.6还是v1.5。我有很少的存储库。我怎样才能找到他们的版本?

3 个解决方案

#1


Take a look into the file 'format' in your repository-path. It should contain the schema of your repository. Since Subversion 1.4 that is 5 and will probably not changing before Subversion 2. As long as the schema don't change a 'svnadmin upgrade' is unnecessary.

查看repository-path中的文件'format'。它应该包含存储库的架构。由于Subversion 1.4是5并且可能在Subversion 2之前不会改变。只要架构不改变'svnadmin升级'就没必要了。

To cite http://svn.apache.org/repos/asf/subversion/trunk/notes/repos_upgrade_HOWTO:

引用http://svn.apache.org/repos/asf/subversion/trunk/notes/repos_upgrade_HOWTO:

Anyone upgrading between versions of subversion that have different
repository schemas.  Schema versions are as follows:

    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

If necessary you can see which schema version your repository is
currently using by looking at the format file in the repository.

It should be noted that these changes are extremely rare.  Now that
subversion has reached 1.0.0 our compatibility guarantees require
forward and backward compatible repository formats for all patch
releases and backward compatible for minor releases.  So until
2.0.0 comes out there will be no change that should require a 
dump for upgrading to newer versions.

While Subversion does create version 5 repositories by default as of
version 1.4, it still supports reading and writing version 3
repositories for backwards compatibility.  Additionally, a pre-1.3
client can communicate with a 1.4+ server accessing a version 5
repository.

Don't mix up the repository-schema with the one of the working-copy. The format-file in working-copy contains a '9' for current versions of subversion.

不要将存储库架构与工作副本混淆。工作副本中的格式文件包含当前版本的subversion的“9”。

#2


Apart from /format, now there's also a file /db/format, e.g. in default repo created with 1.6.x it has the following content:

除了/ format之外,现在还有一个文件/ db /格式,例如在使用1.6.x创建的默认仓库中,它具有以下内容:

4 layout sharded 1000

4个布局分片1000

For a repo upgraded to 1.5.5:

对于升级到1.5.5的仓库:

3 layout linear

3布局线性

For plain vanilla 1.4.2 repos:

对于普通香草1.4.2回购:

2

#3


Looking at this code to change the format of subversion working copy

查看此代码以更改subversion工作副本的格式

the latest formats are

最新的格式是

LATEST_FORMATS = { "1.4" : 8,
                   "1.5" : 9,
                   "1.6" : 10

#1


Take a look into the file 'format' in your repository-path. It should contain the schema of your repository. Since Subversion 1.4 that is 5 and will probably not changing before Subversion 2. As long as the schema don't change a 'svnadmin upgrade' is unnecessary.

查看repository-path中的文件'format'。它应该包含存储库的架构。由于Subversion 1.4是5并且可能在Subversion 2之前不会改变。只要架构不改变'svnadmin升级'就没必要了。

To cite http://svn.apache.org/repos/asf/subversion/trunk/notes/repos_upgrade_HOWTO:

引用http://svn.apache.org/repos/asf/subversion/trunk/notes/repos_upgrade_HOWTO:

Anyone upgrading between versions of subversion that have different
repository schemas.  Schema versions are as follows:

    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

If necessary you can see which schema version your repository is
currently using by looking at the format file in the repository.

It should be noted that these changes are extremely rare.  Now that
subversion has reached 1.0.0 our compatibility guarantees require
forward and backward compatible repository formats for all patch
releases and backward compatible for minor releases.  So until
2.0.0 comes out there will be no change that should require a 
dump for upgrading to newer versions.

While Subversion does create version 5 repositories by default as of
version 1.4, it still supports reading and writing version 3
repositories for backwards compatibility.  Additionally, a pre-1.3
client can communicate with a 1.4+ server accessing a version 5
repository.

Don't mix up the repository-schema with the one of the working-copy. The format-file in working-copy contains a '9' for current versions of subversion.

不要将存储库架构与工作副本混淆。工作副本中的格式文件包含当前版本的subversion的“9”。

#2


Apart from /format, now there's also a file /db/format, e.g. in default repo created with 1.6.x it has the following content:

除了/ format之外,现在还有一个文件/ db /格式,例如在使用1.6.x创建的默认仓库中,它具有以下内容:

4 layout sharded 1000

4个布局分片1000

For a repo upgraded to 1.5.5:

对于升级到1.5.5的仓库:

3 layout linear

3布局线性

For plain vanilla 1.4.2 repos:

对于普通香草1.4.2回购:

2

#3


Looking at this code to change the format of subversion working copy

查看此代码以更改subversion工作副本的格式

the latest formats are

最新的格式是

LATEST_FORMATS = { "1.4" : 8,
                   "1.5" : 9,
                   "1.6" : 10