Handling Conflict States

Topics:

Sometimes a file can be in a state of conflict and cannot be committed to the SVN repository. These conflicts can be categorized as follows:

File Conflicts

Two or more users modify the same line in a file and attempt to commit. SVN cannot detect the differences between them. Instead, work on a file that has not been updated.

When file conflicts exist, a file is created with the following characteristics:

<<<<<<< Filename
Your changes
=======
Code merged from repository
>>>>>>> Revision

Mark it in iIT and then proceed to resolve the conflict. Perform the following steps:

  1. Right-click the file in question, select Compare With from the context menu, and then click Base Revision.

    The Structure Compare dialog opens.

  2. Compare the contents of the file between the Workspace pane on the left and the BASE pane on the right. Make any appropriate changes within these two panes to ensure conflicts are solved.

    You can also copy changes between the Workspace pane on the left and the BASE pane on the right, and navigate within all conflicts one by one.

  3. After you have resolved all conflicts, save the file and update by right-clicking and selecting Update from the context menu.
  4. To override the file, right-click the file and select Override and Update from the context menu.

    The Override and Update prompt displays, as shown in the following image.

  5. Click Yes.

    The local file will be overwritten with the version in the repository.

  6. To push a local file, mark it as merged (Mark as Merged), make a commit, then update to head and commit the local file.

Tree Conflicts

Tree conflicts are caused when a user deletes, modifies, moves, or renames a file or folder that has already been deleted, modified, moved, or deleted by another user.

To resolve this conflict, decide which side takes priority over the files. Apply modifications from the repository or apply modifications on the local workspace.

To apply changes from the local workspace, identify the file, mark it as merged (Mark as Merged), and make a commit. To apply changes from iIT, right-click the file and select Override and Update from the context menu.