SVN User Manual in Windows

Source: Internet
Author: User
Tags svn update tortoisesvn

From: http://flatfish2000.javaeye.com/blog/425198

Chapter 1 Installation
Tortoisesvn Installation
· You can download the latest version from http://tortoisesvn.tigris.org/. the system uses:

TortoiseSVN-1.6.1.16129-win32-svn-1.6.1.msi.

· Install the SDK after the download. Restart the machine to make the directory icon take effect.

· In resource manager, right-click any location and choose SVN checkout from the shortcut menu, which means the installation is successful.

Chapter II usage
1. SVN operation procedure
The general process for developers to use SVN for development is:

· Checkout (check out) project

· Update files or directories --> Update

· Modify a file or directory-commit (submit) Change

· Add a file or directory --> Add (ADD) file or directory --> commit (submit)

· Delete a file or directory --> commit (submit) The upper-level directory

Here, checkout is only performed once, and you can use update later. Update, commit, and add operations are frequently used as needed.

Now that you have detected a work copy from the Subversion library, you can check the icon changes of these files in the resource manager. This is one of the reasons why tortoisesvn is so popular. Tortoisesvn adds the function called overload icon to reload the original file icon. The reload icons vary depending on the file's Subversion status.

· Use a green check box to reload a new detected work copy. Indicates that the Subversion status is normal.
· After you start editing a file, the status changes to modified, and the icon reload changes to a red exclamation point. In this way, you can easily see which files have been modified since the last update work copy and need to be submitted.
· If a conflict icon appears during the submission process, it becomes a yellow exclamation point.
· If you set the svn: Needs-lock attribute for a file, subversion will make the File Read-Only until you get the file lock. Read-Only files have this overload icon to indicate that you must get a lock before editing.
· If you have a file lock and the subversion status is normal, this overload icon reminds you to release the lock if the file is not used, allow others to submit modifications to the file.
· The cross icon indicates that some files or folders in the current folder are planned to be deleted from version control, or a controlled file in the folder is lost.
· The plus sign indicates that a file or directory has been planned to be added to version control.

2. Operation Details
L checkout (check out) Operation

In resource manager, right-click any location and choose SVN checkout from the menu ".

In the displayed dialog box, enter the svn string in the format of URL of repository: "Protocol: // ip: Port/version Library/project/directory ". Enter according to the actual situation, such as http://code.google.com/p/google-web-toolkit/source. If you have any questions, contact the svn server administrator.

URL used by the system: "SVN: // 192.168.0.181: 3690"

The username and password are the initials of your own name. This user is a SVN user, not a system user.

Enter the local code directory in "checkout directory". Select an empty directory or a new directory. SVN clears all files in the directory. After entering the information, click "OK.

If necessary, you will be prompted to enter the user name and password. After "Save authentication" is selected, you can log on automatically later without losing your password.

Checkout... Sometimes it takes a long time. End, click "OK ".

L update operation

In resource manager, select a local directory or file, right-click the menu, and choose SVN update ". The system will prompt whether the file needs to be updated. Click "OK" to complete.

L commit (submit) Operation

Submit the changed files or directories in the local directory to the version library and use commit. To add a new file or directory, you must first add it and then commit it. Delete a file or directory, and commit a level-1 directory.

In resource manager, select a local directory or file, right-click the menu, and choose SVN commit ".

The interface is displayed in the upper and lower boxes. Enter the description text in the above box. We recommend that you write the version number or reasons for the change for future search. The content to be submitted is listed in the following box. There is no content to submit. A text description is displayed in the following box. Click "OK ".

The submission is complete and the result is displayed. Click "OK ".

L resolve code conflicts

If the message "you have to update your work copy first." appears in red during commit, the file in the version library has been modified by others. Click "OK" to exit. Execute update and then commit.

If the modified Code does not conflict with the updated code, it is automatically merged. If the conflict occurs (for example, the same line of code has been modified), a red warning is displayed, and several file records conflict occurs. In general, do not directly edit conflicting files. Follow these steps to manually resolve the conflict.

In resource manager, select the file that conflicts with the commit file and right-click the file and choose edit conficts from the shortcut menu ".

The interface is divided into three parts: "theirs", "mine", and "merged, "modified by others", "modified by me", and "merged result. We want to combine the "modified content by others" and "modified content by me" to form a "merged result ".

Merge is generally divided into four situations:

Retain "My changes" and discard "others' changes ". Right-click the line in the mine box and click "use this text block ".

Discard "My changes" and keep "others' changes ". Right-click the corresponding row in the theirs box and click "use this text block ".

Keep "My changes" and "others' changes" at the same time, and put "My changes" in front. Right-click the line in the mine box and click "use text block from mine before theirs ".

Keep "My changes" and "others' changes" at the same time, and put "others' changes" in front. Right-click the line in the mine box and click "use text block from theirs before mine ".

After merging, press Ctrl + S to save the disk and exit.

Then, in resource manager, select the conflict file and right-click the file and choose resolved from the shortcut menu to mark that the conflict has been resolved. The system automatically deletes the files created due to the conflict. Now, you can continue the commit operation.

L add (ADD) Operation

To add a new file or directory, you must first add it and then commit it.

In resource manager, select the newly added directory or file, right-click the menu and choose add ".

Indicates the file to be added. Click "OK" to continue. The end point is "OK ".

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.