skip to primary navigationskip to content

Resolving conflicts

This information is from TortoiseSVN Help

Occasionally, you will get a conflict when you update files from the repository.

If you are new to Subversion and you get a conflict, you may want to request help from a Pagemaster.

  • A conflict occurs when two or more authors have changed the same lines of a file.
  • As Subversion knows nothing of your project, it leaves resolving the conflicts to you.
  • Whenever a conflict is reported, you should open the file, and search for lines starting with the string: <<<<<<<
  • A conflicting area is marked like this:
    <<<<<<< filename
        your changes
        code merged from repository
    >>>>>>> revision
  • For every conflicted file, Subversion places three additional files in your directory:

    This is your file as it existed in your working copy before you updated your working copy.
    That is, without conflict markers. This file has your latest changes in it and nothing else.

    This is the file that was the BASE revision before you updated your working copy.
    That is, it is the file that you checked out before you made your latest edits.

    This is the file that your Subversion client just received from the server when you updated your working copy.
    This file corresponds to the HEAD revision of the repository.

  • To fix a conflict you can:
    • either launch an external merge tool / conflict editor with TortoiseSVN -> Edit Conflicts
    • or use any other editor to manually resolve the conflict.
      You should decide what the code should look like, do the necessary changes and save the file.
  • When you have fixed the conflict, run the command:
    TortoiseSVN -> Resolved
    and commit your modifications to the repository.

    1. The Resolve command does not really resolve the conflict. It just removes the filename.ext.mine and filename.ext.r* files, to allow you to commit your changes.
    2. You can use the Resolved command for multiple files if you right click on the parent folder and select TortoiseSVN -> Resolved...
      This will bring up a dialogue box listing all conflicted files in that folder, and you can select which ones to mark as resolved.