You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by ne...@apache.org on 2010/08/12 15:56:25 UTC
svn commit: r984781 - /subversion/trunk/subversion/libsvn_wc/update_editor.c
Author: neels
Date: Thu Aug 12 13:56:25 2010
New Revision: 984781
URL: http://svn.apache.org/viewvc?rev=984781&view=rev
Log:
* subversion/libsvn_wc/update_editor.c (add_file):
Cosmetically rejigger auto-remove of tree conflicts against local
unversioned obstructions. Also possibly fix some future case where a node
has other conflicts beside a tree conflict (currently not possible AFAIK),
by checking for conflicts again after a tree conflict has been
automatically removed.
Modified:
subversion/trunk/subversion/libsvn_wc/update_editor.c
Modified: subversion/trunk/subversion/libsvn_wc/update_editor.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_wc/update_editor.c?rev=984781&r1=984780&r2=984781&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_wc/update_editor.c (original)
+++ subversion/trunk/subversion/libsvn_wc/update_editor.c Thu Aug 12 13:56:25 2010
@@ -3817,52 +3817,54 @@ add_file(const char *path,
if (conflicted)
SVN_ERR(node_already_conflicted(&conflicted, eb->db,
fb->local_abspath, subpool));
- if (conflicted)
- {
- svn_boolean_t do_skip = TRUE;
- /* A conflict is flagged. Now let's do some user convenience.
- * When we flagged a tree conflict for a local unversioned node
- * vs. an incoming add, and we find that this unversioned node is
- * no longer in the way, automatically pull in the versioned node
- * and remove the conflict marker. */
- if (status == svn_wc__db_status_not_present
- && kind == svn_node_none)
- {
- /* Right, the node status matches (not_present) and there is no
- * unversioned obstruction in the file system (anymore?). If it
- * has a tree conflict with reason 'unversioned', remove that. */
- const svn_wc_conflict_description2_t *previous_tc;
- SVN_ERR(svn_wc__get_tree_conflict(&previous_tc,
- eb->wc_ctx,
- fb->local_abspath,
- subpool, subpool));
- if (previous_tc
- && previous_tc->reason == svn_wc_conflict_reason_unversioned)
- {
- do_skip = FALSE;
+ /* Do some user convenience in a specific tree conflicted state.
+ * When we flagged a tree conflict for a local unversioned node
+ * vs. an incoming add, and we find that this unversioned node is
+ * no longer in the way, automatically pull in the versioned node
+ * and remove the conflict marker. */
+ if (conflicted
+ && status == svn_wc__db_status_not_present
+ && kind == svn_node_none)
+ {
+ /* Right, the node status matches (not_present) and there is no
+ * unversioned obstruction in the file system (anymore?). If it
+ * has a tree conflict with reason 'unversioned', remove that. */
+ const svn_wc_conflict_description2_t *previous_tc;
+ SVN_ERR(svn_wc__get_tree_conflict(&previous_tc,
+ eb->wc_ctx,
+ fb->local_abspath,
+ subpool, subpool));
+ if (previous_tc
+ && previous_tc->reason == svn_wc_conflict_reason_unversioned)
+ {
+ /* Remove tree conflict. */
+ SVN_ERR(svn_wc__db_op_set_tree_conflict(eb->db,
+ fb->local_abspath,
+ NULL, subpool));
- /* Remove tree conflict. */
- SVN_ERR(svn_wc__db_op_set_tree_conflict(eb->db,
- fb->local_abspath,
- NULL, subpool));
- }
+ /* Verify that all conflicts are gone now. Since we don't ever have
+ * text/prop conflicts next to tree conflicts, this should always
+ * set CONFLICTED to FALSE. Making sure doesn't hurt though. */
+ SVN_ERR(node_already_conflicted(&conflicted, eb->db,
+ fb->local_abspath, subpool));
}
+ }
- if (do_skip)
- {
- SVN_ERR(remember_skipped_tree(eb, fb->local_abspath));
+ /* Now the usual conflict handling: skip. */
+ if (conflicted)
+ {
+ SVN_ERR(remember_skipped_tree(eb, fb->local_abspath));
- fb->skip_this = TRUE;
- fb->already_notified = TRUE;
+ fb->skip_this = TRUE;
+ fb->already_notified = TRUE;
- do_notification(eb, fb->local_abspath, svn_node_unknown,
- svn_wc_notify_skip, subpool);
+ do_notification(eb, fb->local_abspath, svn_node_unknown,
+ svn_wc_notify_skip, subpool);
- svn_pool_destroy(subpool);
+ svn_pool_destroy(subpool);
- return SVN_NO_ERROR;
- }
+ return SVN_NO_ERROR;
}