Search code examples
svnmerge-conflict-resolution

SVN merge conflict editing: What do vertical bars ("|||||||") mean?


When I hand-edit a merge conflict after svn update, I find something like this in the file:

<<<<<<< .mine
    act();
||||||| .r328
    bid();
=======
    cue();
>>>>>>> .r329

What do the vertical bars ("|||||||") mean?

Before posting this question, I checked the section on merging conflicts by hand in the online book Version Control with Subversion, svn help merge, and ≈20 guides to resolving merge conflicts with SVN (e.g., 1, 2, 3, 4, 5, 6, etc.). Searching for svn edit conflict vertical bars (with or without quotes) and other terms returned nothing useful. I also searched Stackoverflow directly (e.g., 1, 2, 3, etc.).

How can this be so hard to find‽‽‽


Solution

  • svn is showing conflicts (differences) across three different versions of the same file:

    • The edited version of the file in your working directory
    • Revision 328 in the repository
    • Revision 329 in the repository

    It looks like svn uses diff3 with the --merge option to display these differences. See this document for details.