Use Svn in eclipse

Source: Internet
Author: User
Tags svn update
Using Svn in eclipse [go]

1. Download Required Software
1.1svnservice end (svn-1.4.3-setup.exe)
Http://subversion.tigris.org/project_packages.html
1.2set svnto windowservice (svnservice.exe)
I don't have it. Leave your email if necessary.
1.3eclipse SVN plug-in (downloaded using Eclipse plug-in ):

2. Configure the server
2.1install svn-1.4.3-setup.exe
2.2 start-> Run-> cmd-> enter the bin directory under the svn Server Installation Directory
2.3cmd run svnadmin create SVN repository location (for example, D: \ svn_prj)
2.4copy svnservice.exe to the bin directory under the svn Server installation directory.
Run svnservice-install-D-r d: \ svn_prj under 2.5cmd (SVN repository location)
2.6 if you want to cancel the background service, run svnservice-Remove
2.7 go to the D: \ svn_prj \ conf directory and edit svnserve. conf. The content is as follows (note that there is no space before the following lines ):
[General]
Anon-access = read # anonymous access permission; Value: read, write, none
Auth-access = write # authenticate user permissions
Password-DB = passwd # authenticate the user database, that is, the user that can be connected to SVN (the user and password stored in the passwd file in the current directory)
Realm = testing # prompt statement displayed on the user authentication Interface
2.8 edit the D: \ svn_prj \ conf \ passwd file with the following content:
[Users]
Test = PASSWORD # When you connect to SVN, you can use the user name "test" and password "to connect to SVN.
2.9 start-> Settings-> Control Panel-> management tools-> services-> Start the svnservice Service

3. Configure the svn plug-in eclipse
3.1 help-> Software Update-> Find and install-> search for new feature components to install-> Create remote site-> enter any name-> enter URL

Http://subclipse.tigris.org/update_1.2.x-> OK-> select the remote site you just added-> done-> select subclipse-> perform installation

3.2 window-> open perspective-> SVN repository research-> right-click-> New-> repository location-> input Svn in URL: // 127.0.0.1/-> enter the user name test and password defined in 2.7.

Password

4. submit the project
4.1 right-click the project-> group-> shared project-> select svn-> select SVN: // 127.0.0.1 (if not, create a new resource library)-> next-> complete

5. Download the project
5.1 In the svn resource library perspective, click SVN: // 127.0.0.1 to display all projects on the local SVN, right-click the project you want to download-> check out as-> next-> complete

6. Basic operations
6.1 Synchronization
Under the myeclipse J2EE perspective, right-click the project you want to synchronize-> group-> synchronize with the resource library-> the synchronization perspective is displayed, the local file and SVN file have different content. Double-click the file name to display the differences between the two files;
6.2 submit
Under the synchronization perspective, there is a "gray-to-right arrow indicating that your local machine has been modified". Right-click the file and you can choose to submit the file;
6.3 overwrite/update
Under the synchronization perspective, there is a "blue arrow to the left, indicating that your local machine has been modified". Right-click the file and choose overwrite/update;

7. Icon description
7.1 gray right arrow: changed locally
7.2 blue to left arrow: SVN modified
7.3 gray-to-right arrow with a plus sign in the middle: more local files than SVN
7.4 blue arrow with a plus sign in the middle to the left: SVN more files than local
7.5 gray-to-right arrow with a minus sign in the middle: deleted locally, but undeleted files on SVN
7.6 blue to the left, there is a minus arrow in the middle: SVN deleted, but local files not deleted
7.7 Red Two-way arrow: Files modified locally on SVN

8. Some error messages I encountered
8.1 The "svnserve. conf: 12: Option expected" error occurs when you enter the URL (SVN: // 127.0.0.1) in step 1 above.
Open row 12th in the svnserve. conf file. This error is caused by a space in front of the row. Delete the extra space on the left;
8.2 The following error occurs when you enter the URL (SVN: // 127.0.0.1/svn_prj) in step 1 above: "SVN: // 127.0.0.1/svn_prj non-existent in revision '7 '"
The URL is incorrect. Enter SVN: // 127.0.0.1.
9. Command Line-based operation statements provided by the svn Server
9.1 set/bin under the svn Server installation directory to environment variables;
9.2 run SVN import C:/test SVN: // 127.0.0.1/test-M "Initial import" -- username test -- password passwd on the command line to upload
9.3 go to the directory you want to check out and run SVN checkout SVN: // 127.0.0.1/test -- username test-Password passwd on the command line to check out the project.
9.4 run SVN commit test.txt-M "modified" -- username test-Password passwd on the command line to submit
9.5 run SVN update-r head test.txt -- username test-Password passwd on the command line to update the file.

Note:The above mentioned 127.0.0.1 can be changed to an Internet IP address or a lan ip address (that is, you can create an SVN server at home to access the home SVN at the company)

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.