1. SVN1.4.4下载地址:http://subversion.tigris.org/files/documents/15/38369/svn-1.4.4-setup.exe,下载,安装(安装文件自动配好环境变量,如果是下载的压缩包则需要手工配置)。
2. 下载SVNService.exe,拷贝到svn安装目录下的bin文件夹中。
3. 在dos命令环境中执行svnadmin create d:\svnDB\TechInfo,会自动生成很多文件
4. 在目录d:\svnDB\TechInfo\conf下的passwd文件修改如下:
[users]
wusz = wusz
在svnserve.conf文件中修改如下:
[general]
anon-access = read
auth-access = write
password-db = passwd
authz-db = authz
realm = TechInfo
在文件authz中修改如下:
[groups]
manage =wusz
user = wusz
[/]
@Manage = rw
@user = r
= r
[text]
@Manage = rw
@user = rw
= r
5. 在dos命令环境中执行svnservice -install -d -r d:\svnDB\TechInfo
6. 在服务中设置svnservice为自动启动,并将其启动。
7. 测试导入项目,在dos命令环境中执行:
svn import . svn://localhost/TechInfo -m "initial import" --username wusz --password wusz
其中[.]表示当前目录,你也可以指定项目的绝对路径。
如果出现错误:svn: D:\svnDB\TechInfo\conf\svnserve.conf:12: Option expected,原因是svnserve.conf前边有空格,去掉即可。如果出现错误:svn: 认证失败,则检查authz和passwd中是否设置正确。
如果正常的话会出现如下信息:
增加 .classpath
增加 WebRoot
增加 WebRoot\META-INF
增加 WebRoot\META-INF\MANIFEST.MF
增加 WebRoot\index.jsp
增加 WebRoot\WEB-INF
增加 WebRoot\WEB-INF\lib
增加 WebRoot\WEB-INF\web.xml
增加 WebRoot\WEB-INF\classes
增加 .mymetadata
增加 .project
增加 src
增加 .myeclipse
提交后的版本为 1。
8. 测试导出项目,在dos命令环境中转到一个新目录,执行:
D:\>svn checkout svn://localhost/TechInfo --username wusz --password wusz
出现如下信息
A TechInfo\.classpath
A TechInfo\WebRoot
A TechInfo\WebRoot\META-INF
A TechInfo\WebRoot\META-INF\MANIFEST.MF
A TechInfo\WebRoot\index.jsp
A TechInfo\WebRoot\WEB-INF
A TechInfo\WebRoot\WEB-INF\lib
A TechInfo\WebRoot\WEB-INF\web.xml
A TechInfo\WebRoot\WEB-INF\classes
A TechInfo\.mymetadata
A TechInfo\.project
A TechInfo\src
A TechInfo\.myeclipse
取出版本 1。
转到D盘根目录下,就可以在当前目录下生成一个TechInfo的项目目录,目录中的内容就是我们刚才所提交的所有文件。
9. Eclipse下的Svn配置
版本控制软件SVN的eclipse插件Subclipse,下载地址:http://subclipse.tigris.org/
添加方式:打开MyEclipse,Help—Software Updates—Find and Install…-- Search for new features to install. 下一步,New Remote site,在弹出框中,name写“svn”,URL写http://subclipse.tigris.org/update_1.2.x,一路确定下去。
Windows->Preferences->Team检查是否有SVN节点,点击SVN即可看到该插件的设置界面。右击项目名->Team->Share Project…打开项目共享对话框,对话框有两个选择,一是Eclipse内置的对CVS的支持,还有另外一个就是我们刚装上的SVN。选择SVN进入服务器设置界面,输入svn服务路径,用户名,密码,确认下去,到此完成。
SVN官网提供的图片示例:
Begin the installation from the Eclipse Help menu item.
Step 2:
This screenshot show the screen as it initially comes up. In this case you will need to change the radio button to indicate that this is a new install.
Step 3:
This screen will vary depending on the features you have installed already. You want to click on the New Remote Site button. If you are behind a proxy and the Eclipse install mechanism does not work, then you can download a zipped version of the update site and then click the New Local Site button instead.
Step 4:
This screen is showing the New Remote Site dialog, filled in with the correct information to install Subclipse
Name: Subclipse 1.2.x (Eclipse 3.2+)
URL: http://subclipse.tigris.org/update_1.2.x
Name: Subclipse 1.0.x (Eclipse 3.0/3.1)
URL: http://subclipse.tigris.org/update_1.0.x
Step 5:
When you first come back to this screen, the site you added will NOT be selected. Be sure to select it before clicking Next.
Step 6:
This next screen shows all of the features that are available to install.
Step 7:
Click the button to accept the license agreement.
Step 8:
Confirm the install location
Step 9:
There is an Eclipse preference to turn off this next dialog. I have never seen a signed feature. Not even Eclipse.org nor IBM sign their features.
Step 10:
Just a screenshot of the in-process installation.
Step 11:
Eclipse needs to be restarted after installing Subclipse.
Step 12:
Finally, after restarting Eclipse, the first thing you will typically want to do is open the Subclipse Repository perspective where you can define your repositories. Be sure to also check the online help as well as the Subclipse preferences located under Team -> SVN.