Subversion的文档里的那个命令是错误的,错误的地方一个是 binpath 应该是 binPath, displayname 也应该是 DisplayName:
sc create svn binPath= "\"e:\Program Files\Subversion\bin\svnserve.exe\" --service -r G:/svnRepository" DisplayName= "Subversion Server" depend= Tcpip start= auto
请注意,
- 如果你的svnserve的path中有空格,那么用 \" 是必须的
- --service 也是必须的
- "-r D:\SVN" 定义的是你的repository的根目录,也就是包含了”conf“、”dav“、”hooks“等目录的那个目录
sc create svn binPath= "\"e:\Program Files\Subversion\bin\svnserve.exe\" --service -r G:/svnRepository" DisplayName= "Subversion Server" depend= Tcpip start= auto
请注意,
- 如果你的svnserve的path中有空格,那么用 \" 是必须的
- --service 也是必须的
- "-r D:\SVN" 定义的是你的repository的根目录,也就是包含了”conf“、”dav“、”hooks“等目录的那个目录