2. svnadmin—Subversion Repository Administration

svnadmin is the administrative tool for monitoring and repairing your Subversion repository. For detailed information on repository administration, see the maintenance section for 第 4.1.1 节 “svnadmin”.

因为svnadmin直接访问版本库(因此只可以在存放版本库的机器上使用),它通过路径访问版本库,而不是URL。

2.1. svnadmin 选项

svnadmin 的选项是全局的,效果与他们在 svn 中一样:

--bdb-log-keep

(Berkeley DB-specific.) Disable automatic log removal of database logfiles. Having these logfiles around can be convenient if you need to restore from a catastrophic repository failure.

--bdb-txn-nosync

(Berkeley DB-specific.) Disables fsync when committing database transactions. Used with the svnadmin create command to create a Berkeley DB-backed repository with DB_TXN_NOSYNC enabled (which improves speed but has some risks associated with it).

--bypass-hooks

绕过版本库钩子系统。

--clean-logs

删除不使用的Berkeley DB日志。

--config-dir DIR

指导Subversion从指定目录而不是默认位置(用户主目录的.subversion)读取配置信息。

--deltas

When creating a repository dump file, specify changes in versioned properties and file contents as deltas against their previous state.

--fs-type ARG

When creating a repository, use ARG as the requested filesyste type. ARG may be either bdb or fsfs.

--force-uuid

By default, when loading data into a repository that already contains revisions, svnadmin will ignore the UUID from the dump stream. This option will cause the repository's UUID to be set to the UUID from the stream.

--ignore-uuid

By default, when loading data into an empty repository, svnadmin will set the repository's UUID to the UUID from the dump stream. This option will cause the UUID from the stream to be ignored.

--incremental

导出一个修订版本针对前一个修订版本的区别,而不是通常的完全结果。

--parent-dir DIR

当加载一个转储文件时,根路径为DIR而不是/

--pre-1.4-compatible

When creating a new repository, use a format that is compatible with versions of Subversion earlier than Subversion 1.4.

--pre-1.5-compatible

When creating a new repository, use a format that is compatible with versions of Subversion earlier than Subversion 1.5.

--pre-1.6-compatible

When creating a new repository, use a format that is compatible with versions of Subversion earlier than Subversion 1.6.

--revision (-r) ARG

指定一个操作的修订版本。

--quiet (-q)

Do not show normal progress—show only errors.

--use-post-commit-hook

When loading a dump file, runs the repository's post-commit hook after finalizing each newly loaded revision.

--use-post-revprop-change-hook

When changing a revision property, runs the repository's post-revprop-change hook after changing the revision property.

--use-pre-commit-hook

When loading a dump file, runs the repository's pre-commit hook before finalizing each newly loaded revision. If the hook fails, aborts the commit and terminates the load process.

--use-pre-revprop-change-hook

When changing a revision property, runs the repository's pre-revprop-change hook before changing the revision property. If the hook fails, aborts the modification and terminates.

--wait

For operations which require exclusive repository access, wait until the requisite repository lock has been obtained instead of immediately erroring out when it cannot be.

2.2. svnadmin 子命令

Here are the various subcommands for the svnadmin program.