I have come across the following basic Tree conflict: Local add, incoming add upon merge.
I know we can use svn resolve --accept working file
to resolve it, but SVN prevent me to use accept their-conflict
to accept the incoming version.
Can anyone tell me how to replace my local file by the incoming one? Is it possible using svn resolved file
in any way?
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"