SVN and TortoiseSVN Combat: a detailed conflict (i.)

Source: Internet
Author: User
Tags tortoisesvn

Hard canton: "SVN and TortoiseSVN Combat" series has written three, the first "SVN and TortoiseSVN Combat: from Beginner to Proficient", the second "SVN and TortoiseSVN Combat: Tags and branches" and the third " SVN and TortoiseSVN: TortoiseSVN New and merged branch focuses on the concept of labeling and branching and the demonstration of practical operation.

When writing to the SVN branch merger, there are also comments on the conflict after the merger, I believe that the knowledge of the conflict is the pain point of the developer.

On the knowledge of conflict, the following areas are highlighted:

1. What is the situation that will cause conflict?

2. What is the meaning of the three documents generated when the conflict occurs?

3. How to use TortoiseSVN to resolve conflicts?

What is the situation that will cause conflict?

When I first used project management tools like SVN, I had a question in my mind: what happens when multiple people edit a file at the same time?

To simulate this, I use another account to check out the project in the previous article, to simulate the simultaneous operation of multiple users (in the TortoiseSVN Settings dialog box via saved data can delete the saved account information to re-login).

Now create a new test text file in the test directory, enter the following, check in, and check out to the Testother directory:

1 2 3 4 5 6

First edit the test text file in the test directory, change the first line of 1 to 11, save and check in to SVN:

 One 2 3 4 5 6

Now edit the test text file in the Testother directory, change the last line 6 to 66, save and check in to SVN:

1234566

When you check in a testother modification, you are prompted that the file has expired and you need to check out the latest version first:

When we check out the TortoiseSVN will prompt us to try to check in again, this signing join success, there is no conflict in the process, the content of the test text file in the Testother directory is:

 One 2 3 4 5  the

You can see that the content is automatically merged with changes from two directories, and under what circumstances can a person have a headache?

The above operation is not a conflict because the contents of the file in the two directory modification is not in the same location, if the first row in the Testother directory to modify (such as not modify 6, and change 1 to 111), there will be a conflict.

It may be seen here that the following is the case, or in the test directory, modify 1 to 11:

1123456

Create a new line before the first line in Testother, and modify it to:

0123456

Does this situation create a conflict?

The result: Yes.

This is because SVN is not so smart, think you are a new line, SVN's judgment of the conflict is to change the content in the same location, so when you create a new row, you change all the back position.

The understanding of these basic principles of SVN conflict should be understood very thoroughly.

A few other questions about the conflict are explained later, and one cannot be written in much detail.

Record, for the better of myself!

SVN vs TortoiseSVN Combat: conflict Detail (i)

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.