Author: rhuijben
Date: Fri Aug 22 09:29:27 2014
New Revision: 1619717
URL: http://svn.apache.org/r1619717
Log:
Following up on r1619418, don't use not-present, excluded and server excluded
node kinds for reporting a tree conflict. These nodes are NOT in the working
copy, so they are not part of the creation of a tree conflict.
Whether deleted nodes should or shouldn't be handled as nodes in the WC
really depends on the specific kind of tree conflict. In many merge cases they
shouldn't, while for update/switch they usually should.
Note that the original check of local_kind == svn_node_unknown would almost
never be true, as this would only be valid for actual only nodes, which
by definition are deleted/absent in the working copy.
* subversion/libsvn_wc/conflicts.c
(read_tree_conflict_desc): Don't pass TRUE for show_hidden unless you
explicitly want to handle these cases. Don't look at deleted nodes
when merging, as those nodes can be completely replaced by the merge.
Modified:
subversion/trunk/subversion/libsvn_wc/conflicts.c
Modified: subversion/trunk/subversion/libsvn_wc/conflicts.c
URL:
http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_wc/conflicts.c?rev=1619717&r1=1619716&r2=1619717&view=diff
==============================================================================
--- 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 ||
@@ -1832,8 +1835,10 @@ read_tree_conflict_desc(svn_wc_conflict_
* because of a locally added node which was not part of the
* BASE tree before the update. */
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 */,
+ TRUE /* 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));
}