[Switch] SVN Server Client and environment establishment and use

Source: Internet
Author: User
Tags tortoisesvn
VSS, CVS, and SVN are all version control tools.
VSS is the lock-edit-Unlock mode. Although SVN also supports locking, the default value is modify-conflict-merge mode. The version number of VSS corresponds to a single file, the SVN version number corresponds to the entire version library.
VSS is charged by Microsoft, and SVN is open-source and free.
"CVS is the predecessor of SVN"
Currently, SVN is the most widely used, because it is open-source, free, and supports many other software.

 

SVN server Construction and Use (1)

Subversion is an excellent version control tool. Its advantages and details are not described here.

First, download and set up the svn server.

Now the subversion has been migrated to the Apache website ,:

Http://subversion.apache.org/packages.html

This is a binary package. You can find the source code and documentation in the left-side navigation bar.

Windows operating system Binary Package A total of 5 types: http://subversion.apache.org/packages.html

I personally think it is best to use the visualsvn server and tortoisesvn client together.

Click to open the above visual SVN connection, download visual SVN server,: http://www.visualsvn.com/downloads/

Then download tortoisesvn client, Official Website: http://tortoisesvn.net/downloads.html

Download the installation package that matches your computer. On the page, you can find the Language Pack ,:

After the download is complete, these installation packages should be available ,:

Tortoisesvn installation package and simplified Chinese Language Pack

Visual SVN Server Installation Package

Install the installation package of the visual SVN server and double-click the installation package of the visual SVN server ,:

Click Next to go to the next step ,:

Click agree to go to the next step ,:

Select the above option and click Next to go to the next step ,:

Location is the installation directory of the visualsvn server, and repositorys is the directory of your version library. the server port specifies a port. The use secure connection check indicates that a secure connection is used, and the Use Subversion authentication indicates that subversion user authentication is used. click Next to go to the next step ,:

Click Install to go to the next step ,:

Wait until the installation is complete ,:

After the installation is complete, start the visualsvn Server Manager ,:

Next, install tortoisesvn and double-click the installation package to go to the next step .:

Click Next to go to the next step ,:

Select accept, and click Next to go to the next step ,:

Select the installation path and click Next to go to the next step ,:

Click Install to start installation ,:

Wait until the installation is complete. After the installation is complete:

Next, we will install the Simplified Chinese Language Pack. This is very simple, and it won't work until next. after the Language Pack is installed, right-click any blank area on the desktop and select SVN from the shortcut menu ,:

Select Settings to go to the next step ,:

Select Simplified Chinese in the language on the right, and click "application". Click "Chinese" to complete the process ,:

By now, both the server and client have been installed. The next article describes how to create a version library with visual SVN server and how to use tortoisesvn.

 

SVN server Construction and Use (2)

 

The previous article introduced the download, installation, and localization of visual SVN server and tortoisesvn. This article describes how to use visual SVN server to build a version library and how to use tortoisesvn.

First open the visualsvn Server Manager ,:

You can view information about the version library on the right of the window, such as status, log, user authentication, and version library. To create a version library, right-click repositores in the left window ,:

In the pop-up context menu, choose create new repository or create-> repository to go to the next step:

Enter the version library name and check the create default structure check box (this is recommended ). click OK. The version library is created. The trunk, branches, and tags folders are created by default in the version library ,:

At this time, we will import the project to the version library, find your project folder, right-click the project folder, find the svn menu, and choose import ,:

In the displayed dialog box, enter the version library URL, which can be obtained from visual SVN Server Manager. Right-click your version library and choose copy URL to clipboard, in this way, copy the version library URL to your clipboard.:

Paste the copied version library URL and add the trunk sub-path to the URL. Then, enter the import information "Import project to version library" in the import information ".:

Click OK to import the selected project to the version library .:

After the project is imported to the version library, no one can read or write the version library. Therefore, you need to create user groups and users.

In the visualsvn Server Manager window, right-click the user group on the left and choose create user or create-> User ,:

In the displayed dialog box, enter the user name and password, and click OK ,:

Create six developers, test1, Test2, and manger in the same way, representing three developers, two testers, and one project manager respectively ,:

Create a user group, right-click the user group on the left side of the visualsvn Server Manager window, and select create group or create-> group ,:

In the pop-up window, set group name to developers, click the Add button, select three developers in the pop-up window, add them to the group, and click OK ,:

Create group managers, testers, in the same way ,:

Next, Set permissions for the user group, right-click myrepository, and select Properties ,:

In the displayed dialog box, select the Security tab, click the Add button, and select the three groups developers, managers, and testers. Then, add them to developers and set the management permission to read/write, set the tester permission to read only ,:

At this point, the server is complete.

Next, we use the client to check out the code, right-click the blank area on the desktop, select SVN check-out, and fill in the version library URL in the pop-up dialog box (specific acquisition method, as mentioned above when uploading a project to the version Library), select the check directory and click OK.:

Start to check out the project ,:

After the check-out is complete, open the work copy folder and you will see that all files and folders have a green √ .:

Now, you have created a version library and imported the project using tortoisesvn.

The next article describes how to use tortoisesvn and how to solve the conflict.

SVN server Construction and Use (3)

Next, try to use tortoisesvn to modify files, add files, delete files, and resolve conflicts.

Add File

Upload a readme.txt text file in the current work notebook. At this time, the text file will be displayed in a state without version control ,:

In this case, you need to inform tortoisesvn of your operations ,:

After adding the file, your file will become in this state ,:

In this case, use tortoisesvn to submit the file, so that others can see your changes ,.

Modify file

Use tortoisesvnto update, modify the readme.txt file in the work appendix, and add "Hello world! ", After saving, you will find that the icon of the readme.txt file has changed ,:

This red exclamation mark indicates that the file has been modified. At this time, submit the change and others will see your change.

Rename a file

Use tortoisesvnto update the file "readme1.txt'" in the "RENAME" Work subitem, and save it later. You will find that the icon in the "readme.txt" file has changed ,:

Add a file. In this case, you need to tell tortoisesvn about your operations ,:

The readme.txt file in the waiting database will be renamed to "readme1.txt ".

Delete an object

Use tortoisesvnto update the file. Use tortoisesvnto Delete the readme.txt file in the subfile and submit the file. The corresponding file in the version library is deleted ,:

Write comments forcibly

To give you a clearer picture of the cause of each change you have made in the future, you should write comments each time you submit them and try to make them as detailed as possible .:

However, some people may find it too cumbersome to enter comments without entering comments, which is not conducive to future version control. You can force the comments to be written at submission, right-click, select tortoisesvn-> attribute ,:

In the displayed dialog box, click New> log size to set the minimum number of characters for the submitted log and the minimum number of characters for the locked log to 20, in the submit text box, the character position of the edge is set to 100. Click OK ,:

Submit. If the input comments are less than 20 characters, they cannot be submitted.

Conflict Resolution

Conflict is the most common problem. It is generated in this way. User A checks out a working copy, and user B checks out a working copy B. then, user a modifies the file C in copy a (it can be content modification, file deletion, renaming, and location movement) and submits the file. at this time, user B also made changes to the same part of file C. If user B submits the changes, the system will first be notified that the version is out of date and requires updates. Then, a conflict will be prompted during the update, at this time, you can use the conflict editor to manually select.

The tortoisesvn client resets the user name and password

When you use tortoisesvn to checkout from the server for the first time, you are required to enter the user name and password. In this case, an option under the input box is to save the authentication information. If you select this option, you do not need to enter the user name and password every time.

However, if you modify the user name and password on the server, an error will occur when you check again, and the client is very mentally retarded. After the error occurs, the user name and password input box is not automatically displayed for updates, I haven't found a place to change the user name and password for a long time.

Finally, find two solutions:

Method 1: In the Settings dialog box of tortoisesvn, select "saved data" and click "clear" in the "authentication data" line to clear the saved authentication data, then, the user name and password input box will be displayed again.

 

If method 1 does not work, method 2 can be used:

The authentication information such as tortoise's username and password is cached in the directory of the client file system:

C:/Documents and Settings/Administrator/Application Data/subversion/auth

Delete all the folders under auth and reconnect to the remote server for check. The dialog box appears!

[Switch] SVN Server Client and environment establishment and use

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.