SVN for Sublime Text

Conflicts

Conflicts occur when Subversion is unsure how properly to resolve the difference between two different versions of files or folders that original from the same revision. Often times conflicts can be confusing to users, especially when trying to figure out how to solve them.

SVN includes interfaces to help the user resolve any of the three different type of conflicts: Text Conflicts, Tree Conflicts and Property Conflicts.

Text Conflicts

Text conflicts happen when local changes have been made to a file and remote revisions also include changes to the file in such a way that it can not be automatically determined how they should be merged.

SVN includes a quick panel interface that allows for reviewing the different versions of the file, and then resolving the conflict by selecting one of the existing version, or editing the file. The options presented to the user include:

  • Review Old Repository Version
  • Review My Version
  • Review New Repository Version
  • Review/Edit Merged Version
  • Resolve with My Version
  • Resolve with New Repository Version
  • Resolve with Merged Version

Tree Conflicts

Tree conflicts happen when the working copy and remote revisions both perform actions on a file or folder such that it can not be automatically determined which action should be preferred.

This includes situations including:

  • Local delete, incoming edit upon update
  • Local edit, incoming delete upon update
  • Local delete, incoming delete upon update
  • Local missing, incoming edit upon merge
  • Local edit, incoming delete upon merge
  • Local delete, incoming delete upon merge
  • Folder added in both trunk and branch

The only way to resolve a tree conflict via Subversion is to accept the current state of the working copy. Thus, if the local version of a file or folder is not the preferred one, the Revert command should be run on it.

Resolution of a tree conflict involving a folder added to both the trunk and a branch separately is slightly different. If the folder added to the branch is preferred, the working copy should be reverted to undo the merge, the folder should be deleted from trunk and then the merge should be re-run.

Property Conflicts

Property conflicts happen when local changes have been made to one or more propeties and remote revisions also include changes to those properties.

The only way to resolve a property conflict is to edit the property to the desired final value and mark it as resolved. SVN provides a quick panel interface for these operations that allow you to see the conflict, edit the properties and then mark them as resolved.