1. 從CollabNet下載subversion的Windows版
http://downloads.open.collab.net/collabnet-subversion.html
2. 使用svnserve模式安裝,指定倉庫位置: d:\svn_repository
3. run->cmd打開命令行窗口
4. 創建一個subversion的倉庫
cd
svnadmin create
E.g.
cd d:\svn_repository
svnadmin create repository
5. 修改密碼
編輯svnserve.conf文件
E.g. d:\svn_repository\repository\conf\svnserve.conf,
找到下面的信息
### The password-db option controls the location of the password
### database file. Unless you specify a path starting with a /,
### the file's location is relative to the conf directory.
### Uncomment the line below to use the default password file.
#password-db = passwd
去掉password-db前的#號
password-db = passwd
6. 增加用戶名和密碼
編輯svnserve.conf同一目錄下的'passwd'文件,在下面信息的后面追加用戶名和密碼:
### This file is an example password file for svnserve.
### Its format is similar to that of svnserve.conf. As shown in the
### example below it contains one section labelled [users].
### The name and password for each user follow, one account per line.
[users]
#harry = harryssecret
#sally = sallyssecret
例如:
lucky = ××××
7. 打開Windows防火墻的屏蔽.
參考文件
http://www.microsoft.com/windowsxp/using/security/internet/sp2_wfexceptions.mspx
在例外中添加subversion使用的svnserve.exe,或者增加例外的端口:3690.
8. 運行svnserve
可以使用windows的服務或者使用命令行
net start svnserve
9. 對匿名用戶指定讀權限,修改conf/svnserve.conf文件
anon-access = write
10. Checkout倉庫
svn co svn://localhost/
E.g. svn co svn://localhost/repository
11. 權限設置
編輯svnserve.conf同一目錄下的'authz'文件,在下面信息的后面追加用戶名和密碼:
[groups]
dev = lucky,jiang,yu
[repository:/]
lucky= rw
* = r
[repository:/ECOMockup]
@dev= rw
* = r
上面的設置表示 在根目錄 只有lucky有讀寫的權力,其他人都是只讀。 在根目錄下的/ECOMockup工程dev小組有讀寫的權力 其他的就是只讀。
svn import -m "first import of AARKeywords" C:\Usr\THA\AARKeywods http://localhost/svn/AARKeywords