How to accept 'theirs-conflict' to resolve tree conflict: Local add, incoming add upon merge
The right thing to do is detect this problem in a previous --dry-run and delete the local conflicting dir with svn delete
before doing the merge.
First scenario: Working copy with the merge already done. Solution: Delete the working copy, checkout a clean copy and do the right thing.
Second scenario: Already commited wrong directory, after svn resolve --accept=working
.
You must svn delete
the conflicting directory, and rerun the merge from the parent directory of the conflicting directory ignoring mergeinfo
. Revert every object except the previous conflicting directory (now there isn't conflict). Check and commit the changes.
Ex. Working copy un WC folder. Your conflict in A/conflictDir directory:
cd A
svn delete conflictDir
svn merge --ignore-ancestry -rbeginRev:endRev <URLrepo/A>
svn -R revert `ls | grep -v conflictDir`
<... check ...>
svn ci -m "conflictDir fixed"
I had similar problem, where I svn update a file which has conflict with my local file. I want the remote copy to replace my local copy. What I did is
svn delete file_name
,
and then
svn revert file_name
.
It recovers to the remote copy. I am not sure if the first svn delete is necessary or not.