Windows安装Subversion

时间:2024-10-03 16:06:32

1、安装Setup-Subversion-1.8.16.msi
下载地址:https://sourceforge.net/projects/win32svn/

2、将svn添加到Windows系统服务
sc create SVNserver binPath= “C:\Program Files\Subversion\bin\svnserve --service -r D:\SVN”

3、创建配置库:
svnadmin create D:\SVN\ESCM

4、修改配置文件:passwd
[users]
# harry = harryssecret
# sally = sallyssecret
cm = 1q2w3e4R
escm = 1q2w3e4R

5、修改配置文件:authz
[groups]
# harry_and_sally = harry,sally
# harry_sally_and_joe = harry,sally,&joe
g_admin = cm
g_guest = escm

# [/foo/bar]
# harry = rw
# &joe = r
# * =

# [repository:/baz/fuz]
# @harry_and_sally = rw
# * = r

[/]
@g_admin = rw
* = r

[/branches]
@g_guest = rw

6、修改配置文件:svnserve.conf
### Uncomment the line below to use the default password file.
password-db = passwd
### 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
### directory containing this file. The specified path may be a
### repository relative URL (^/) or an absolute file:// URL to a text
### file in a Subversion repository. 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

7、导入数据(需要输入用户名、密码)
svn import -m "first import project" D:\SVN\import svn://localhost/ESCM

8、checkout项目
svn checkout svn://localhost/ESCM

注意:如果是XP系统,请安装TortoiseSVN-1.7.15.25753-win32-svn-1.7.18.msi