svnserve

当对远程源版本库使用svnsync时,使用Subversion的自定义网络协议。

svnserve允许Subversion版本库使用svn网络协议,你可以作为独立服务器进程运行svnserve,或者是使用其它进程,如inetdxinetd(也是svn://)或使用svn+ssh://访问方法的sshd为你启动进程。

一旦客户端已经选择了一个版本库来传递它的URL,svnserve会读取版本库目录的conf/svnserve.conf文件,来检测版本库特定的设置,如使用哪个认证数据库和应用怎样的授权策略。关于svnserve.conf文件的详情见svnserve, a Custom Server”一节

svnserve选项

Unlike the previous commands we've described, svnserve has no subcommands—it is controlled exclusively by options.

--daemon (-d)

Causes svnserve to run in daemon mode. svnserve backgrounds itself and accepts and serves TCP/IP connections on the svn port (3690, by default).

--foreground

When used together with -d, this option causes svnserve to stay in the foreground. This is mainly useful for debugging.

--inetd (-i)

导致svnserve使用标准输出/标准输入文件描述符,更准确的是使用inetd作为守护进程。

--help (-h)

显示有用的摘要和选项。

--listen-host=HOST

svnserve监听的HOST,可能是一个主机名或是一个IP地址。

--listen-once (-X)

Causes svnserve to accept one connection on the svn port, serve it, and exit. This option is mainly useful for debugging.

--listen-port=PORT

Causes svnserve to listen on PORT when run in daemon mode. (FreeBSD daemons listen only on tcp6 by default—this option tells them to also listen on tcp4.)

--pid-file FILENAME

Causes svnserve to write its process ID to FILENAME, which must be writeable by the user under which svnserve is running.

--root=ROOT (-r=ROOT)

Sets the virtual root for repositories served by svnserve. The pathname in URLs provided by the client will be interpreted relative to this root and will not be allowed to escape this root.

--threads (-T)

When running in daemon mode, causes svnserve to spawn a thread instead of a process for each connection (e.g., for when running on Windows). The svnserve process still backgrounds itself at startup time.

--tunnel (-t)

Causes svnserve to run in tunnel mode, which is just like the inetd mode of operation (both modes serve one connection over stdin/stdout, and then exit), except that the connection is considered to be preauthenticated with the username of the current UID. This flag is automatically passed for you by the client when running over a tunnel agent such as ssh. That means there's rarely any need for you to pass this option to svnserve. So if you find yourself typing svnserve --tunnel on the command line and wondering what to do next, see “SSH 隧道”一节.

--tunnel-user NAME

--tunnel选项结合使用;告诉svnserve假定NAME就是认证用户,而不是svnserve进程的UID用户,当希望多个用户通过SSH共享同一个系统帐户,但是维护各自的提交标示符时非常有用。

--version

Displays version information and a list of repository backend modules available, and then exits.