Conflicts occur when a file that contains local modifications is updated with overlapping changes from the latest version in the repository.
Conflicted files can’t be committed until the conflicts have been resolved.
A conflicted text file contains markers inserted by Subversion that identify the local and remote changes:
#import "ActivityLog.h" #import "Database.h" <<<<<<< .mine static ActivityLog * sharedInstance = nil; ======= extern ActivityLog * defaultActivityLog; >>>>>>> .r2839
In this example, the section beginning with <<<<<<< .mine
on line 23 contains the local change from the working version. The code on line 25 is the change from the latest version in the repository (marked as revision .r2839
).
To resolve the conflict:
Once resolved, the file is marked as modified and the changes can be committed like any other modification.
When a conflicted file is selected in the browser, the following toolbar buttons are displayed in the view’s toolbar:
These buttons can be used to compare the various file versions relevant to the conflict against the merged working version.
The Open button in the view’s toolbar also gains a popup menu:
Clicking and holding the Open button will display a popup menu allowing you to select which of the HEAD, BASE, .mine and merged (i.e. working) versions should be opened.
Sometimes you may be able to resolve all the conflicts in a file given the knowledge, for example, that the changes implemented by one team member will take precedence over another’s.
The conflict bar makes it easy to resolve a file to a particular revision:
Cornerstone also provides support for using external compare tools to resolve conflicts. See the dedicated topic in the Integration section for more information.