SVN Update commit conflict resolution

Source: Internet
Author: User
Tags subversion client svn update

    • Most important: update before committing (when there is no conflict), or you can first synchronize and then update (when there is a conflict)
    • The update is to upgrade the local code to the server-side version, the update does not overwrite or delete our locally modified content , if there is no conflict, it is equivalent to porting our modified content to the latest version of the server (effective after submission), if there is a conflict, you must resolve the conflict before committing.
    • synchronization (synchronized with the repository) is the comparison of local and service-side differences in a synchronized perspective, and he marks the different files and the modules in the file, which are used when checking for conflicts and merging versions, and of course conflict resolution does not have to be before the update or must be in eclipse , or it can be processed in the local right-click-svn-edit conflict after the update.
    • Commit is the local code written to the latest source repository in the server

resolving file conflicts with Eclipse
for each conflicting file Subversion placed three files in your directory:
    • ". Mine": This is your the file to be submitted , it exists in your working copy before you update your working copy-that is, there is no conflict flag. This file has nothing else but your latest changes.
    • ". R (XXX)": This is the base version of the file before you update your working copy. In other words, it is the file that was checked out before you made the last modification.
    • "R (xxx+1)": This file is the one that your Subversion client received from the server when you updated your working copy. This file corresponds to the latest version in the repository.

1. Two-choice form of conflict resolution

After comparing the files, if we find that the two changes are in the same location or the same function point, then we may need to selectively keep one and discard the other.
    • If you discard a local file, right-click the file and click Overwrite/update (replace/update) in the context menu, then eclipse will prompt "whether to delete local changes and replace with files in the repository", and click "Yes" to discard local changes. and update to the latest version in the repository.
    • If you discard a file from the repository, right-click the file, then click "Mark Merge" in the context menu, then click "Submit".

2. Merging and resolving complex conflicts

If the file changes in the local and the repository are "every need" and "each discard", then we can only compare the differences in the file comparison, and gradually change to the final version.
In the process of modifying and merging, it is important to have two icon buttons. As shown in the red border callout two icons, the former can be Copy the right-to-local file without conflicting changes to the local file on the left , which is used to Copy the right-hand area of the mouse cursor to the appropriate location on the left .

After confirming that the changes are complete, click "Mark as Merge" in the context menu of the right button, and then "submit" directly.

resolving file conflicts with SVN
resolving file conflicts using TortoiseSVN  
1. A conflict was found during update. Three files are generated after update:  2, right-click to find edit conflicts (edit conflict), after opening, there are three documents in the window, left and right. Below is the final result, you need to synthesize a final version based on two different versions of the left and right3, right--resolved (or after the change to save will be prompted "whether marked as a solution", click to confirm) 4, yellow warning is missing, change back to the usual familiar modified Mark ~ ~ Now can be normal commit

Tree Clash
    • file Conflicts: A file conflict occurs when multiple developers modify an adjacent or identical row in the same file .
    • Tree conflict: A tree conflict occurs when a developer moves, renames , deletes a file or folder, and another developer moves, renames, deletes, or simply modifies it.
different situations require different steps to resolve the conflict.

From for notes (Wiz)

SVN Update commit conflict resolution

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: 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.