On Fri, Aug 22, 2014 at 09:29:27AM -0000, rhuij...@apache.org wrote: > Author: rhuijben > Date: Fri Aug 22 09:29:27 2014 > New Revision: 1619717 > > URL: http://svn.apache.org/r1619717
> * subversion/libsvn_wc/conflicts.c > (read_tree_conflict_desc): > Don't look at deleted nodes > when merging, as those nodes can be completely replaced by the merge. Given a merge that replaces a locally (uncommitted) deleted file, with something of a different node kind, say, a directory, then: The victim's node kind is 'file'. (local file delete ...) The merge-left node kind could be any of 'none' (the directory was added in the merge source), or 'file' or 'dir' (the directory replaced a file or directory in the merge source.) The merge-right node kind is 'directory'. (... incoming directory add/replace upon merge) It looks like we call the victim a 'directory'... $ cd svn-sandbox/trunk $ svn rm alpha # alpha is a file D alpha $ cd ../branch/ $ svn rm alpha D alpha $ svn mkdir alpha A alpha $ svn ci -mm Replacing alpha Committing transaction... Committed revision 3. $ cd ../trunk $ svn merge ^/branch --- Merging r2 through r3 into '.': C alpha A alpha --- Recording mergeinfo for merge of r2 through r3 into '.': U . Summary of conflicts: Tree conflicts: 1 Tree conflict on 'alpha' > local dir delete, incoming dir replace upon merge Select: (r) mark resolved, (p) postpone, (q) quit resolution, (h) help: I'm not sure this should even be flagged as a conflict. However, the victim node kind is wrong. > --- subversion/trunk/subversion/libsvn_wc/conflicts.c (original) > +++ subversion/trunk/subversion/libsvn_wc/conflicts.c Fri Aug 22 09:29:27 2014 > @@ -1813,11 +1813,14 @@ read_tree_conflict_desc(svn_wc_conflict_ > SVN_ERR(svn_io_check_path(local_abspath, &local_kind, scratch_pool)); > else if (operation == svn_wc_operation_merge) > { > - /* Read the tree conflict victim's node kind from the working > - * or base tree. */ > + /* Read the tree conflict victim's node kind from the working copy, > + or if it doesn't exist directly from disk. */ > SVN_ERR(svn_wc__db_read_kind(&local_kind, db, local_abspath, > - TRUE, TRUE, TRUE, scratch_pool)); > - if (local_kind == svn_node_unknown) > + TRUE /* allow missing */, > + FALSE /* show deleted */, > + FALSE /* show hidden */, scratch_pool)); > + > + if (local_kind == svn_node_unknown || local_kind == svn_node_none) > SVN_ERR(svn_io_check_path(local_abspath, &local_kind, scratch_pool)); > } > else if (operation == svn_wc_operation_update ||