做者:PCplayerhtml
來自:我用Subversion - http://www.iUseSVN.com服務器
常常有新手配置基於svnserve的subversion服務器後,
在客戶端訪問subversion版本庫時出現這個錯誤:
svnserve.conf:12: Option expected
爲何會出現這個錯誤呢,就是由於subversion讀取配置文件svnserve.conf時,沒法識別有前置空格的配置文件,如
### This file controls the configuration of the svnserve daemon, if you
### use it to allow access to this repository. (If you only allow
### access through http: and/or file: URLs, then this file is
### irrelevant.)
### Visit http://subversion.tigris.org/ for more information.
[general]
### These options control access to the repository for unauthenticated
### and authenticated users. Valid values are "write", "read",
### and "none". The sample settings below are the defaults.
anon-access = read
auth-access = write
像上面的配置文件中,anon-access是頂行的,沒問題,而auth-access就存在前置空格,會致使這個錯誤。
要避免出現這個錯誤,應該在去掉這些行前的#時,也要順手去掉前面的空格,這一點,在鄭新星老早的文章《Subversion之路--實現精細的目錄訪問權限控制》就提到過。svn