简体   繁体   中英

How conflicts are detected in SVN?

I want to know the methods through which the Conflicts are detected in SVN ?

For example user 1 has committed the file.c and User 2 tries to update his local copy( svn up). There are two things happening

  1. Silent Merge:: SVN is able to merge the changes silently.

  2. Conflicts:: SVN is not able to merge changes itself. User has to do it manually.

Please help me where SVN will fail to merge the changes itself?

Simple example:

  • User 1 has modified line 42 of file.c in his last commit,
  • User 2 has also modified line 42 of file.c in his working copy,
  • User 2 issues svn up , therefore requesting the change committed by User 1 to be propagated to his working copy.

In this situation, SVN cannot determine if it should overwrite User 2's change to line 42 with User 1's, or just ignore User 1's change. It cannot possibly merge changes to the same line without human intervention. This is a conflict.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM