Install and use SVN in Myeclipse (1)

Source: Internet
Author: User
Tags tortoisesvn

It took two days to complete the graduation project recently. I suddenly found that my thinking was wrong and I could find a better way. There is no way for me to start deleting it. It is difficult to restore it. I found that there were errors in other places that were not wrong, and it was still an inexplicable error, but it was impossible to restore it. Who told me that I didn't install SVN. So I decided to learn SVN.

I. SVN Introduction

1.1. What is SVN?

There is a simple but not very accurate metaphor:

SVN = Version Control + Backup Server

Simply put, you can use SVN as your backup server. Better, it helps you remember the file content uploaded to this server each time. And automatically assign a version to each change.

Svn (Subversion) is a version management tool that has emerged in recent years. In the current open-source project (J2EE), almost 95% of projects use SVN. The original intention of the Subversion project is to replace CVS, the most popular version control software in the open source community, with many improvements based on the features of CVS and better solutions to the shortcomings of the CVS system.

 

TortoiseSVN is a Windows extension of Subversion. It prevents you from accessing the tedious and inconvenient CommandLine of Subversion. It is completely embedded in WindowsExplorer. You only need to right-click the window to use it.

Subversion is the server end of the version control software.

TortoiseSVN is the client of the version control software.

 

1.2. Why SVN?

1. Backing up work files is very important. You never know when the hard disk on your computer will break down.

2. version control is very important. You cannot guarantee that the latest version is always correct.

3. Data synchronization between partners is also very important. Many times, apart from yourself, other partners also need your files.

4. If there is no good method, backing up different versions will consume a lot of hard disk space.

Can SVN help us solve the above problems? The answer is yes:

1. SVN Repository can be a directory on your computer or a flash drive (not recommended ). Of course, it can also be a company server.

2. SVN has a great version control mechanism. All uploaded versions are recorded for you. You can obtain the version at any time in the future. In addition, it also provides easy-to-use features such as version branch and merge.

3. SVN allows different developers to access the same file and uses SVN Server as the file synchronization mechanism. In other words, when you have an archive update, you do not need to send the archive to your developer. You only need to tell him that the new version is already on the SVN Server. Ask him to go to the SVN Server to obtain the latest version. In addition, the SVN Server can automatically send emails to relevant members after you upload a new version.

4. SVN stores files in differential backup mode. That is to say, the backup will only be different. Therefore, it saves hard disk space. In addition, it can also perform differential backup for so-called non-text files.

 

Ii. Download and install SVN

2.1 Server

Server Subversion can be downloaded on the official website, I use the version is: Setup-Subversion-1.7.5.msi. Load the server software, double-click the Setup-Subversion-1.7.5.ms to run the installer, this is nothing to say, all the way to Next on the good, so the default installation directory I D \ ProgramFiles \ Subversion \.

How can we verify that the Subversion is successfully installed on our server? When installing Subversion, it will automatically set the bin directory under the installation directory to the system variables, just like installing the JAVA Development Environment (JDK. If you are using the green version, you have to manually set the system variables. For example:

 

If we execute svnserve -- version under the doc

If the version information is displayed normally, the installation is successful. For example:

 

2.2 Client

Client Software TortoiseSVN can also be downloaded on the official website, I use the version is: TortoiseSVN-1.7.6.22632-win32-svn-1.7.4.msi. Installation in a silly way.

If the client software is successfully installed, right-click the client and the following page appears:

 

3. Create a local Repository

Repository is the centralized storage of source code. The source code submitted after all modifications is saved here, and all the modified versions, branch versions, version merge, and concurrent modification processing are recorded.

There are two ways to create Repository

First, run the SVN server command svnadmin.

Svnadmin create D: \ workspace \ svnRepository

Type 2: Create a folder in the corresponding directory, such as svnRepository. Right-click the folder and choose TortoiseSVN-> Create repository here.

After creation, some directories and files are automatically created under this directory.

 

Directory description:

Db Directory: stores all version control worker data files.

Hooks Directory: directory for storing hook script files.

Locks Directory: used to hold the Subversion file library to lock the data inventory directory, used to track access to the inventory client of the file library.

The format file is a text file with only one integer in it, indicating that the inventory version number is configured in the current file library.

Conf directory: it is the inventory configuration file of the warehouse ).

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.