以前用svn只是在服务上发布一个工程,今天需求来了,要求部署两个,以前没有发布两个,只有现琢磨了,不过最后还是成功了,看下文:
为了方便首先切换到svn的bin目录下,我的是这个
- D:\Program Files\Subversion\bin>
依次在cmd中执行下列命令
- mkdir d:\myproject1
- svnadmin create d:\myproject1\project1
- svnserve -d -r d:\myproject1
在输入完第二条命令时,修改下D:\myproject1\project1\conf下的三个文件的内容(只显示修改过的部分)
authz
- [groups]
- # harryharry_and_sally = harry,sally
- # harryharry_sally_and_joe = harry,sally,&joe
- [/]
- * = rw
- ql = rw
passwd
- [users]
- # harry = harryssecret
- # sally = sallyssecret
- ql = ql
svnserve.conf
- [general]
- ### These options control access to the repository for unauthenticated
- ### and authenticated users. Valid values are "write", "read",
- ### and "none". The sample settings below are the defaults.
- anon-access = read
- auth-access = write
- ### 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 directory containing
- ### this configuration file.
- ### If SASL is enabled (see below), this file will NOT be used.
- ### 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 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.
- authzauthz-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.
- # realm = My First Repository
修改完三个文件后,再执行
- svnserve -d -r d:\myproject1
用同样的方法,在myproject1中建立project2,完成后,打开myeclipse,在svn中新建刚才的两个工程svn url为
- svn://localhost/project1
- svn://localhost/project2
提示输入用户名和密码后,给每个工程添加一个项目,成功后如图
这样以来,在一个svn中就成功的创建了两个或者多个工程了。
本文转自sucre03 51CTO博客,原文链接:http://blog.51cto.com/sucre/392617,如需转载请自行联系原作者