名称

svnsync initialize (init) — Initialize a mirror repository for synchronization from the source repository.

概要

svnsync initialize MIRROR_URL SOURCE_URL

描述

svnsync initialize verifies that a repository meets the requirements of a new mirror repository—that it has no previous existing version history and that it allows revision property modifications—and records the initial administrative information that associates the mirror repository with the source repository (specified by SOURCE_URL). This is the first svnsync operation you run on a would-be mirror repository.

Ordinarily, SOURCE_URL is the URL of the root directory of the Subversion repository you wish to mirror. Subversion 1.5 and newer allow you to use svnsync for partial repository mirroring, though — simply specify the URL of the source repository subdirectory you wish to mirror as SOURCE_URL.

选项

--config-dir DIR
--no-auth-cache
--non-interactive
--quiet (-q)
--source-password ARG
--source-username ARG
--sync-password ARG
--sync-username ARG
--trust-server-cert

例子

因为无法修改修订版本属性而初始化镜像版本库失败:

$ svnsync initialize file:///var/svn/repos-mirror http://svn.example.com/repos
svnsync: Repository has not been enabled to accept revision propchanges;
ask the administrator to create a pre-revprop-change hook
$

以镜像初始化版本库,包含已创建允许所有修订版本属性修改的pre-revprop-change钩子:

$ svnsync initialize file:///var/svn/repos-mirror http://svn.example.com/repos
Copied properties for revision 0.
$