Configure svnserve password file with absolute path on Windows
Here’s one for Subversion administrators. If you set up the svnserve daemon you’ll usually need two configuration files. svnserve.conf lives in the repository’s conf/ directory, and has a setting pointing to a second file containing usernames and passwords, like so:
[general] password-db = users.txt
According to the Subversion book,
The value of password-db can be an absolute or relative path to the users file
The way svnserve determines this is by checking for the first character of the path, if it is a “/” then it is an absolute path.
This is fine on a *nix platform. But how does this work on Windows? If my password file is, say F:/svn/users.txt, then do I specify one of these?
password-db = F:/svn/users.txt password-db = /F:/svn/users.txt
As described on this (rather old) thread, neither of these work, giving an error message like ” svn: Can’t open file ‘F:\svn\repos\test\conf\F:/svn/users.txt’: The filename, directory name, or volume label syntax is incorrect.”
Fortunately there is a solution - use a UNC path. On Windows, the prefix “\\.\” (or //./) represents the local machine, and the following works just fine, with no need to resort to any other tricks like setting up a network share, or duplicate copies of the password file:
password-db = //./F:/svn/users.txt