剛配置基於svnserve的svn服務器後,在客戶端訪問svn時出現這個錯誤:
svnserve.conf:12: Option expected
出現這個問題的緣由是svn讀取配置文件svnserve.conf時,沒法識別有前置空格的配置文件,如
java
### The authz-db option controls the location of the authorization ### rules for path-based access control. Unless you specify a path ### starting with a /, the file's location is relative to the the ### directory containing this file. If you don't specify an ### authz-db, no path-based access control is done. ### Uncomment the line below to use the default authorization file. authz-db = authz ### This option specifies the authentication realm of the repository. ### If two repositories have the same authentication realm, they should ### have the same password database, and vice versa. The default realm ### is repository's uuid.
像上面的配置文件中,服務器
authz-db = authz
是頂行的,沒問題,而authz-db = authz就存在前置空格,會致使這個錯誤。
要避免出現這個錯誤,應該在去掉這些行前的#時,也要順手去掉前面的空格。less