简体   繁体   中英

How is merging working in SVN?

Imagine I've a difference in a piece of code between the branch A and the branch B which is seen by SVN as a conflict.

When I try to merge the possible situations are:

  1. only A has been modified
  2. only B has been modified
  3. Both A and B have been modified

Is SVN providing me this information? Since I'm getting crazy trying to compare some huge CSS files...

Of course, conflict means that both branches have modified the same code. Otherwise, there wouldn't be a conflict and Subversion would have been able to merge changes automatically.

Whenever there's a conflict related to file contents (directories are a different story) Subversion provides the following hints:

  1. All three involved files are dumped into your working copy:

    • foo.php.merge-left.r832
    • foo.php.merge-right.r833
    • foo.php.working
  2. Original file foo gets conflicts markers:

     <<<<<<< .working * Lower bound for DATETIME columns at SQL Server 2005 */ define('MIN_YEAR_SQL_SERVER', 1753); /* * Lower bound for date controls regarding building date ======= * Lower bound for date controls >>>>>>> .merge-right.r833 

    ... where first block is your current code and second block is incoming code.

Third-party merge tools can make this easier (or harder) but this is the information Subversion provides.

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