svn commit code to resolve conflicts

Especially team development when multiple developers on the same line of code in the same file have been modified, then the latter will override the former filed submissions, but will not cover svn will prompt the file conflict, we need to manually to resolve the conflict.

Here are two user dashen and cainiao user as an example.

17711648-54c9366afb720b6a.png
1.png

dashen user to edit files for 1.php then submit:

17711648-9070eaa97d849153.png
2.png

After dashen users to modify the lines 5 and 6 of the code, submit, is now the contents of the file svn server 1.php should dashen submitted.
Before cainiao user submits, to the fifth and sixth lines 1.php file it has also been modified, modified as follows:

17711648-68326e9b881996bb.png
3.png

Submitted will find that there is a conflict:

17711648-615494e3822ea2cb.png
4.png
17711648-2ad9d704b21e19cc.png
5.png

Solution: click on the upgrade. Or updates are available, the file appears as follows:

17711648-7e0ed15a0bbb45d9.png
6.png

File Description: The
file name .mine: the current user is ready to submit a file
filename .r8 (8 represents the version number): Before the two uncommitted, above the latest file server
file name .r9 (9 represents the version number): Represents ago the latest file server on top of a user submits a
yellow exclamation point file: to integrate the two conflicting code section.

Solution: In addition to the three documents open yellow exclamation mark to delete, file integration in yellow, again submit.
Integration of conflicts code, programmer (engineer) should consult each other before it, who use the code. Do not cover other people's code.

Reference:
version control of svn

Reproduced in: https: //www.jianshu.com/p/ea5d6dbc3a09

Guess you like

Origin blog.csdn.net/weixin_33725272/article/details/91253559