天天看點

MyEclipse下SVN的配置

來源:http://hi.baidu.com/gaigaishiwo/blog/item/29881d1f54ba61cfa686695a.html

官方位址:

Myeclipse 的插件:

http://subclipse.tigris.org/servlets/ProjectProcess;jsessionid=B1363521102428FBA0A20149CFB84245?pageID=p4wYuA

1、擷取 Subversion 伺服器程式

http://subversion.tigris.org/servlets/ProjectDocumentList?folderID=91&expandFolder=91&folderID=91

到官方網站(http://subversion.tigris.org/)下載下傳最新的伺服器安裝程式。目前最新的是1.4.6版本,具體下載下傳位址在:http://subversion.tigris.org/servlets/ProjectDocumentList?folderID=8100&expandFolder=8100&folderID=91,注意找for apache 2.2.x 版本的。

2、擷取 TortoiseSVN 用戶端程式

http://tortoisesvn.net/downloads

從官方網站 http://tortoisesvn.net/downloads 擷取最新的TortoiseSVN 。TortoiseSVN 是一個用戶端程式,用來與 subversion 伺服器端通訊。Subversion 自帶一個用戶端程式 svn.exe ,但 TortoiseSVN 更好操作,提高效率。

文章出處:http://www.diybl.com/course/1_web/webjs/2008410/109655.html

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官網提供的圖檔示例:

Install Subclipse in Eclipse 3.x

Step 1:

Begin the installation from the Eclipse Help menu item.

[img]http://subclipse.tigris.org/images/install-1.png[/img]

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.

[img]http://subclipse.tigris.org/images/install-2.png[/img]

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.

[img]http://subclipse.tigris.org/images/install-3.png[/img]

Step 4:

This screen is showing the New Remote Site dialog, filled in with the correct information to install Subclipse

Name: Subclipse 1.4.x (Eclipse 3.2+) URL: http://subclipse.tigris.org/update_1.4.x

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

[img]http://subclipse.tigris.org/images/install-4.png[/img]

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.

[img]http://subclipse.tigris.org/images/install-5.png[/img]

Step 6:

This next screen shows all of the features that are available to install.

[img]http://subclipse.tigris.org/images/install-6.png[/img]

Step 7:

Click the button to accept the license agreement.

[img]http://subclipse.tigris.org/images/install-7.png[/img]

Step 8:

Confirm the install location

[img]http://subclipse.tigris.org/images/install-8.png[/img]

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.

[img]http://subclipse.tigris.org/images/install-9.png[/img]

Step 10:

Just a screenshot of the in-process installation.

[img]http://subclipse.tigris.org/images/install-10.png[/img]

Step 11:

Eclipse needs to be restarted after installing Subclipse.

[img]http://subclipse.tigris.org/images/install-11.png[/img]

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.

[img]http://subclipse.tigris.org/images/install-12.png[/img]

Updating Subclipse in Eclipse 3.x

Eclipse 3.x has a feature in preference to automatically check for updates. Provided you are not behind a proxy that does not allow this feature, it should work for Subclipse. Otherwise just follow the instructions for installing Subclipse, except take the option to check for updates in Step 2.

If you are behind a proxy that does not work with Eclipse, then to install updates you just always follow the same instructions you used to install a new version. If you always unzip the site to the same local folder, you will not have to define the local site each time.

繼續閱讀