Resolve the Eclipse SVN file conflict detailed __SVN

Source: Internet
Author: User
Tags svn
☞ This article mainly describes the software "eclipse" related content: Resolve Eclipse svn file conflict detailed.

The following versions/branches refer to this article: Full Version/Branch

The process of using the Eclipse SVN plug-in for team development, suppose that both developers A and B get the latest version of the same file (if the version number is 8) and all of them have been changed, member A has submitted its own changes (version number 9), if member B wants to submit its own changes, There is a high likelihood of conflict with the changes already submitted by member B.

As the following illustration shows, the Test.java in the Eclipse SVN sync view is a file that produces a version conflict, so how do we resolve the SVN file conflict?

1, solve the simple file version of the conflict

For files that produce version conflicts, if two people change is not the same location, for example, member A only changes the file head, member B only changes the end of the file, so do not worry too much, because the SVN is now very intelligent, as long as the changes between the two do not affect, SVN can intelligently merge it, The final result is that the file head is the result of a change, the tail is the result of B change, the middle remains unchanged.

In this case, we can directly right-click the file, first click "Update" in the associated menu, update the server changes to the local, and then click "Submit" can be. 2, to resolve the two file version of the conflict of choice

After file contrast, if we find that the two changes are in the same position or the same function point, then we may need to selectively retain one, discard the other.

If the local file is discarded, right-click the file, and then click Overwrite/Update in the associated menu (English: Replace/update), at which time Eclipse prompts you to delete local changes and replace them with files in the repository, and click Yes to discard local changes. and update to the latest version in the repository.

If you are discarding a file in the repository, right-click the file, and then click Mark as Merge in the associated menu, and then click Submit. 3, solve the complex file version conflict

If the file changes in the local and resource pool are "required" and "discarded", 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, there are two icon buttons that are more important. The red border callout's two icons, shown in the following illustration, can copy the changes on the right side to the local file on the left with no conflict to the local file (for example, only the main () method has a conflict, the Sayhi () method on the right does not conflict, and the right Sayhi () The method section is copied to the location where the file on the left is matched, which is used to copy the right area of the mouse cursor to the left.

After confirming that the change is complete, click "Mark as Merge" in the associated menu of the same right-click and then "submit" directly.

Author: Software Compass (http://www.softown.cn), reprint please keep the source.

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.