"SVN" SVN basic operations and FAQs

Source: Internet
Author: User
Tags commit comparison file copy svn svn update tortoisesvn

SVN base Operation

SVN Download Address:

Client: tortoisesvn:http://tortoisesvn.net/downloads.html

Server side: Visualsvn:http://www.visualsvn.com/server/download

1. Install the server side, open the server side, create the warehouse and new users.


1. Install the client and download the server-side repository.

SVN basic Operation

 

Add a file and choose SVN commit to commit the file. Update to SVN update.

SVN FAQ 1:

b The user accidentally deleted the code of a and changed it to their own code.

How to retrieve the code:

Select File-tortoisesvn-show log to view the modified record of the file

If you want to restore the modified file, select the commit record, click Revert to this version (revert to the release), and then resubmit.

If you accidentally delete the file, then the SVN root directory Select Show log, you can see all the commit record, select the file to retrieve, right-click Save revision to, and then resubmit the file.

SVN FAQ 2:

A user and B user updated the code at the same time and made a change, and then B commits the earlier, a commit slow. A commit will remind you of the need to update the code, in good case A and B changes in different places, SVN will help us to automatically merge the code.

In another case, A and B modify the same line of code. Then B commits first, at this time a again to submit, will prompt the file is outdated, at this time to update the code, will prompt the conflict, as shown below:

Four files were generated under a folder

Test.java represents the merged file.

Test.java.mine represents the file you want to submit after you modify it.

Test.java.r10 represents the latest version you think of before you modify it.

Test.java.r11 represents the latest version of the server before you modify it.

According to the above file, according to their actual needs to modify the code.

Revert changes, revert

SVN FAQ 3:

In a real-world problem, if A and B have multiple conflicts, and both A and B have valid code that needs to be submitted. If B commits first, a re-submit will fail, at this time do not update the code, will create a conflict file, the modified file copy to another place, and then choose to revert to the modified version, and then update the code, the backup code to replace a name copy to the directory, Use SVN's comparison tool to choose which code to keep and modify, delete the backup code after the modification is complete, and commit the code.

In another case, B modified the method of a, but a did not find, mercifully this problem buried a hidden trouble, this time the code has passed a lot of versions, at this time can choose Show Log, the different version of the comparison.

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.