SVN version conflict resolution

Source: Internet
Author: User
Tags tortoisesvn
SVN version conflict resolution classification: SVN (subversion) 3344 people read comments (2) collect reports

 

Cause of version conflict:

The version number of the hosts file has changed to 101. At the same time, user B makes modifications to the kingtuns.txt file with the upload number 100. when the modifications are completed and submitted to the server, the submission fails because the modifications are not made in the latest version 101.

 

Version conflict:

When a conflict occurs, subversion will save all target file versions in the current working directory [last updated version, current obtained version (version submitted by someone else), your own version, target file].

The hypothetical file name is kingtuns.txt.

The corresponding file names are:

Kingtuns.txt. r101

Kingtuns.txt. R102

Kingtuns.txt. Mine

Kingtuns.txt. Mark the changes from different users in the target file.

 

Version Conflict Resolution:

Scenario:

Currently, both users of aw.bare updating the kingtuns.txt file to the local device.

 

2. The content of the original file is as follows:

 

 

3. If user a modifies the file and adds the content "User A modifies the content", the file is submitted to the server.

 

 

 

4. User B modifies the file and adds "User B modifies the content" to the file before submitting the file to the server.

 

When user B submits an update to the server, the following message is displayed:

 

When the user B submits the file to the server, the system prompts that the version has expired: first, update the version from the version library, and then resolve the conflict. After the conflict is resolved, the svn resolved (solution) should be executed ), then, check in to the version library. After the conflict is resolved, you must use SVN resolved to notify the Subversion to resolve the conflict so that updates can be submitted.

 

Conflict resolution has three options:

 

A. Discard your own updates, use SVN revert (rollback), and then submit. SVN resolved is not required in this way (solution)

 

B. Discard your own updates and use others' updates. Overwrite the target file with the latest version, execute resolved filename, and submit the file (right-click the file and choose "solve ).

 

C. Manual resolution: when a conflict occurs, manually update the target file after communicating with other users. Then execute resolved filename to remove the conflict and finally submit the file.

 

The solution is as follows:

1. Execute the "Update" Operation in the current directory.

 

 

2. On a conflicting file (select the file -- Right-click the menu-tortoisesvn-edit conflicts (resolve the conflict), the following window appears:

 

Theirs window is the latest version on the server

The mine window is the locally modified version.

The merged window displays the merged file content.

3. If you want to use the server version, right-click the differential content in the theirs window and choose use this text block (use this text block ).

Similarly, if you want to use the local version, right-click the negotiate button in the mine window and select use this text block (use this text block ).

 

4. Save the contents of the kingtuns.txt file after modification.

 

5. In User B's conflict directory, right-click the file and choose tortoisesvn-resolved ). The list of conflicting files is listed. If you confirm that the file has been resolved, click OK.

 

6. Conflict Resolution

 

7. Submit the file after resolving the conflict.

 

 

 

 

How to reduce the complexity of conflict resolution:

1. After the document is edited, submit the document as soon as possible. Frequent submission/updates can reduce the probability of conflict occurrence and the complexity of conflict resolution.

2. When submitting a request, write a clear message so that you can find out the reasons for the user's update later. After all, the reasons for the original update may be forgotten over time.

3. develop a good habit of using SVN. When SVN is used, it is submitted first and updated later. After opening it every morning, you must first obtain the latest version from the version library. You must submit all edited documents to the version library before getting off work every day.

 

Cause of version conflict:

The version number of the hosts file has changed to 101. At the same time, user B makes modifications to the kingtuns.txt file with the upload number 100. when the modifications are completed and submitted to the server, the submission fails because the modifications are not made in the latest version 101.

 

Version conflict:

When a conflict occurs, subversion will save all target file versions in the current working directory [last updated version, current obtained version (version submitted by someone else), your own version, target file].

The hypothetical file name is kingtuns.txt.

The corresponding file names are:

Kingtuns.txt. r101

Kingtuns.txt. R102

Kingtuns.txt. Mine

Kingtuns.txt. Mark the changes from different users in the target file.

 

Version Conflict Resolution:

Scenario:

Currently, both users of aw.bare updating the kingtuns.txt file to the local device.

 

2. The content of the original file is as follows:

 

 

3. If user a modifies the file and adds the content "User A modifies the content", the file is submitted to the server.

 

 

 

4. User B modifies the file and adds "User B modifies the content" to the file before submitting the file to the server.

 

When user B submits an update to the server, the following message is displayed:

 

When the user B submits the file to the server, the system prompts that the version has expired: first, update the version from the version library, and then resolve the conflict. After the conflict is resolved, the svn resolved (solution) should be executed ), then, check in to the version library. After the conflict is resolved, you must use SVN resolved to notify the Subversion to resolve the conflict so that updates can be submitted.

 

Conflict resolution has three options:

 

A. Discard your own updates, use SVN revert (rollback), and then submit. SVN resolved is not required in this way (solution)

 

B. Discard your own updates and use others' updates. Overwrite the target file with the latest version, execute resolved filename, and submit the file (right-click the file and choose "solve ).

 

C. Manual resolution: when a conflict occurs, manually update the target file after communicating with other users. Then execute resolved filename to remove the conflict and finally submit the file.

 

The solution is as follows:

1. Execute the "Update" Operation in the current directory.

 

 

2. On a conflicting file (select the file -- Right-click the menu-tortoisesvn-edit conflicts (resolve the conflict), the following window appears:

 

Theirs window is the latest version on the server

The mine window is the locally modified version.

The merged window displays the merged file content.

3. If you want to use the server version, right-click the differential content in the theirs window and choose use this text block (use this text block ).

Similarly, if you want to use the local version, right-click the negotiate button in the mine window and select use this text block (use this text block ).

 

4. Save the contents of the kingtuns.txt file after modification.

 

5. In User B's conflict directory, right-click the file and choose tortoisesvn-resolved ). The list of conflicting files is listed. If you confirm that the file has been resolved, click OK.

 

6. Conflict Resolution

 

7. Submit the file after resolving the conflict.

 

 

 

 

How to reduce the complexity of conflict resolution:

1. After the document is edited, submit the document as soon as possible. Frequent submission/updates can reduce the probability of conflict occurrence and the complexity of conflict resolution.

2. When submitting a request, write a clear message so that you can find out the reasons for the user's update later. After all, the reasons for the original update may be forgotten over time.

3. develop a good habit of using SVN. When SVN is used, it is submitted first and updated later. After opening it every morning, you must first obtain the latest version from the version library. You must submit all edited documents to the version library before getting off work every day.

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.