You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by ph...@apache.org on 2012/12/20 17:46:15 UTC

svn commit: r1424585 - /subversion/trunk/subversion/libsvn_wc/wc_db_update_move.c

Author: philip
Date: Thu Dec 20 16:46:15 2012
New Revision: 1424585

URL: http://svn.apache.org/viewvc?rev=1424585&view=rev
Log:
* subversion/libsvn_wc/wc_db_update_move.c
  (check_tree_conflict): Query wc.db rather than hard-coding the reason.

Modified:
    subversion/trunk/subversion/libsvn_wc/wc_db_update_move.c

Modified: subversion/trunk/subversion/libsvn_wc/wc_db_update_move.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_wc/wc_db_update_move.c?rev=1424585&r1=1424584&r2=1424585&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_wc/wc_db_update_move.c (original)
+++ subversion/trunk/subversion/libsvn_wc/wc_db_update_move.c Thu Dec 20 16:46:15 2012
@@ -233,6 +233,7 @@ check_tree_conflict(svn_boolean_t *is_co
   int dst_op_depth = relpath_depth(b->move_root_dst_relpath);
   int op_depth;
   const char *conflict_root_relpath = local_relpath;
+  const char *moved_to_relpath;
   svn_skel_t *conflict;
 
   SVN_ERR(svn_sqlite__get_statement(&stmt, b->wcroot->sdb,
@@ -264,12 +265,19 @@ check_tree_conflict(svn_boolean_t *is_co
     /* ### TODO: check this is the right sort of tree-conflict? */
     return SVN_NO_ERROR;
 
+  SVN_ERR(svn_wc__db_scan_deletion_internal(NULL, &moved_to_relpath,
+                                            NULL, NULL,
+                                            b->wcroot, conflict_root_relpath,
+                                            scratch_pool, scratch_pool));
+
   conflict = svn_wc__conflict_skel_create(scratch_pool);
   SVN_ERR(svn_wc__conflict_skel_add_tree_conflict(
                      conflict, NULL,
                      svn_dirent_join(b->wcroot->abspath, conflict_root_relpath,
                                      scratch_pool),
-                     svn_wc_conflict_reason_moved_away,
+                     (moved_to_relpath
+                      ? svn_wc_conflict_reason_moved_away
+                      : svn_wc_conflict_reason_deleted),
                      svn_wc_conflict_action_edit,
                      scratch_pool,
                      scratch_pool));